]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Dynamically composite xml in reply to GDB
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
0abe8a89
YQ
12017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
5 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6 .xmltarget.
7 * server.c (get_features_xml): Call tdesc_get_features_xml.
8 * tdesc.c (set_tdesc_architecture): New function.
9 (set_tdesc_osabi): New function.
10 (tdesc_get_features_xml): New function.
11 (tdesc_create_feature): Add an argument.
12 * tdesc.h (struct target_desc) <features>: New field.
13 <arch, osabi>: New field.
14 (~target_desc): xfree features, arch, and osabi.
15 (target_desc::oerator==): Don't compare .xmltarget.
16 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
17 (set_tdesc_osabi): Likewise.
18 (tdesc_get_features_xml): Likewise.
19
0a188386
YQ
202017-09-05 Yao Qi <yao.qi@linaro.org>
21
22 * linux-x86-tdesc.c: Include selftest.h.
23 (i386_tdesc_test): New function.
24 (initialize_low_tdesc): Call selftests::register_test.
25 * tdesc.h: Include regdef.h.
26 (target_desc): Override operator == and !=.
27
f49ff000
YQ
282017-09-05 Yao Qi <yao.qi@linaro.org>
29
30 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
31 (ipa_obj): Likewise.
32 * linux-i386-ipa.c: Include common/x86-xstate.h
33 (get_ipa_tdesc): Call i386_linux_read_description.
34 (initialize_low_tracepoint): Don't call init_registers_XXX
35 functions, call initialize_low_tdesc instead.
36 * linux-x86-low.c (x86_linux_read_description): Call
37 i386_linux_read_description.
38 (initialize_low_arch): Don't call init_registers_i386_XXX
39 functions, call initialize_low_tdesc.
40 * linux-x86-tdesc.c: New file.
41 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
42 (i386_get_ipa_tdesc_idx): Declare.
43 (i386_get_ipa_tdesc): Declare.
44 (initialize_low_tdesc): Declare.
45
2b68ef2f
YQ
462017-09-05 Yao Qi <yao.qi@linaro.org>
47
48 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
49 instead of 0.
50
f7000548
YQ
512017-09-05 Yao Qi <yao.qi@linaro.org>
52
53 * Makefile.in (IPA_OBJS): Add vec-ipa.o
54 * regcache.c (get_thread_regcache): Use VEC_length.
55 (init_register_cache): Likewise.
56 (regcache_cpy): Likewise.
57 (registers_to_string): Iterate reg_defs via VEC_iterate.
58 (find_regno): Likewise.
59 (find_register_by_number): Use VEC_index.
60 (register_size): Call find_register_by_number.
61 (register_data): Call find_register_by_number.
62 (supply_regblock): Use VEC_length.
63 (regcache_raw_read_unsigned): Likewise.
64 * tdesc.c (init_target_desc): Iterate reg_defs via
65 VEC_iterate.
66 (default_description): Update initializer.
67 (copy_target_description): Don't update field num_registers.
68 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
69 <num_registers>: Remove.
70
50a421ac
SM
712017-09-04 Simon Marchi <simon.marchi@ericsson.com>
72
73 * Makefile.in (.SECONDARY): Define target.
74
23fdd69e
SM
752017-09-03 Simon Marchi <simon.marchi@ericsson.com>
76
77 * linux-low.c (linux_wait_1): Adjust.
78 * server.c (queue_stop_reply_callback): Adjust.
79
0a2dde4a
SDJ
802017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
81
82 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
83 QEnvironmentUnset and QEnvironmentReset packets.
84 (handle_query): Inform remote that QEnvironmentHexEncoded,
85 QEnvironmentUnset and QEnvironmentReset are supported.
86
6afd337d
SM
872017-08-25 Simon Marchi <simon.marchi@ericsson.com>
88
89 * inferiors.h (inferior_target_data): Rename to ...
90 (thread_target_data): ... this.
91 (inferior_regcache_data): Rename to ...
92 (thread_regcache_data): ... this.
93 (set_inferior_regcache_data): Rename to ...
94 (set_thread_regcache_data): ... this.
95 * inferiors.c (inferior_target_data): Rename to ...
96 (thread_target_data): ... this.
97 (inferior_regcache_data): Rename to ...
98 (thread_regcache_data): ... this.
99 (set_inferior_regcache_data): Rename to ...
100 (set_thread_regcache_data): ... this.
101 (free_one_thread): Update.
102 * linux-low.h (get_thread_lwp): Update.
103 * regcache.c (get_thread_regcache): Update.
104 (regcache_invalidate_thread): Update.
105 (free_register_cache_thread): Update.
106 * win32-i386-low.c (update_debug_registers_callback): Update.
107 (win32_get_current_dr): Update.
108 * win32-low.c (thread_rec): Update.
109 (delete_thread_info): Update.
110 (continue_one_thread): Update.
111 (suspend_one_thread): Update.
112
a160cc46
SM
1132017-08-24 Simon Marchi <simon.marchi@ericsson.com>
114
115 * inferiors.c (set_inferior_target_data): Remove.
116 * inferiors.h (set_inferior_target_data): Remove.
117
6d580b63
YQ
1182017-08-18 Yao Qi <yao.qi@linaro.org>
119
120 * Makefile.in (OBS): Add selftest.o.
121 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
122 * configure, config.in: Re-generated.
123 * server.c: Include common/sefltest.h.
124 (captured_main): Handle option --selftest.
125
f5a29eb0
YQ
1262017-08-09 Yao Qi <yao.qi@linaro.org>
127
128 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
129 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
130 i386-avx-mpx.o and i386-mmx.o.
131 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
132 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
133 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
134 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
135 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
136 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
137 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
138 i386/amd64-avx-mpx.xml.
139
57757c2f
YQ
1402017-08-09 Yao Qi <yao.qi@linaro.org>
141
142 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
143 and x32-avx-avx512.o.
144 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
145 i386/x32-avx-avx512.xml.
146
229d26fc
SM
1472017-07-26 Simon Marchi <simon.marchi@ericsson.com>
148
149 * tracepoint.h (enum class fast_tpoint_collect_result): New
150 enumeration.
151 (fast_tracepoint_collecting): Change return type to
152 fast_tpoint_collect_result.
153 * tracepoint.c (fast_tracepoint_collecting): Likewise.
154 * linux-low.h: Include tracepoint.h.
155 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
156 fast_tpoint_collect_result.
157 * linux-low.c (handle_tracepoints): Adjust.
158 (linux_fast_tracepoint_collecting): Change return type to
159 fast_tpoint_collect_result.
160 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
161 linux_wait_1, stuck_in_jump_pad_callback,
162 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
163 proceed_one_lwp): Adjust to type change.
164
2e1e43e1
YQ
1652017-07-10 Yao Qi <yao.qi@linaro.org>
166
167 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
168
adc764e7
YQ
1692017-06-29 Yao Qi <yao.qi@linaro.org>
170
171 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
172 Remove.
173 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
174
a206891a
SM
1752017-06-20 Simon Marchi <simon.marchi@ericsson.com>
176
177 * Makefile.in (IPA_OBJS): Sort and format one item per line.
178
9a6c7d9c
SDJ
1792017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
180
181 * linux-low.c (linux_create_inferior): Adjust code to access the
182 environment information via 'gdb_environ' class.
183 * lynx-low.c (lynx_create_inferior): Likewise.
184 * server.c (our_environ): Make it an instance of 'gdb_environ'.
185 (get_environ): Return a pointer to 'our_environ'.
186 (captured_main): Initialize 'our_environ'.
187 * server.h (get_environ): Adjust prototype.
188 * spu-low.c (spu_create_inferior): Adjust code to access the
189 environment information via 'gdb_environ' class.
190
ae3e2ccf
SM
1912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
192
193 * linux-low.c (linux_read_memory, linux_write_memory): Remove
194 usage of "register" keyword.
195
3e019bdc
SM
1962017-06-17 Simon Marchi <simon.marchi@ericsson.com>
197
198 * configure: Re-generate.
199
8465943a
SM
2002017-06-17 Simon Marchi <simon.marchi@ericsson.com>
201
202 * configure: Re-generate.
203
cf0dd6f0
SM
2042017-06-17 Simon Marchi <simon.marchi@ericsson.com>
205
206 * Makefile.in (COMPILE.pre): Add "-x c++".
207
9845682b
SDJ
2082017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
209
210 * fork-child.c: Conditionally include <signal.h>.
211
aefd8b33
SDJ
2122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
213
214 * server.c (handle_general_set): Handle new packet
215 "QStartupWithShell".
216 (handle_query): Add "QStartupWithShell" to the list of supported
217 packets.
218 (gdbserver_usage): Add help text explaining the
219 new "--startup-with-shell" and "--no-startup-with-shell" CLI
220 options.
221 (captured_main): Recognize and act upon the presence of the new
222 CLI options.
223
2090129c
SDJ
2242017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
225 Pedro Alves <palves@redhat.com>
226
227 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
228 * configure: Regenerate.
229 * configure.srv (srv_linux_obj): Add "fork-child.o" and
230 "fork-inferior.o".
231 (i[34567]86-*-lynxos*): Likewise.
232 (spu*-*-*): Likewise.
233 * fork-child.c: New file.
234 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
235 and "environ.h".
236 (linux_ptrace_fun): New function.
237 (linux_create_inferior): Adjust function prototype to reflect
238 change on "target.h". Adjust function code to use
239 "fork_inferior".
240 (linux_request_interrupt): Delete "signal_pid".
241 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
242 (lynx_ptrace_fun): New function.
243 (lynx_create_inferior): Adjust function prototype to reflect
244 change on "target.h". Adjust function code to use
245 "fork_inferior".
246 * nto-low.c (nto_create_inferior): Adjust function prototype and
247 code to reflect change on "target.h". Update comments.
248 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
249 "common-terminal.h" and "environ.h".
250 (terminal_fd): Moved to fork-child.c.
251 (old_foreground_pgrp): Likewise.
252 (restore_old_foreground_pgrp): Likewise.
253 (last_status): Make it global.
254 (last_ptid): Likewise.
255 (our_environ): New variable.
256 (startup_with_shell): Likewise.
257 (program_name): Likewise.
258 (program_argv): Rename to...
259 (program_args): ...this.
260 (wrapper_argv): New variable.
261 (start_inferior): Delete function.
262 (get_exec_wrapper): New function.
263 (get_exec_file): Likewise.
264 (get_environ): Likewise.
265 (prefork_hook): Likewise.
266 (post_fork_inferior): Likewise.
267 (postfork_hook): Likewise.
268 (postfork_child_hook): Likewise.
269 (handle_v_run): Update code to deal with arguments coming from the
270 remote host. Update calls from "start_inferior" to
271 "create_inferior".
272 (captured_main): Likewise. Initialize environment variable. Call
273 "have_job_control".
274 * server.h (post_fork_inferior): New prototype.
275 (get_environ): Likewise.
276 (last_status): Declare.
277 (last_ptid): Likewise.
278 (signal_pid): Likewise.
279 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
280 (spu_ptrace_fun): New function.
281 (spu_create_inferior): Adjust function prototype to reflect change
282 on "target.h". Adjust function code to use "fork_inferior".
283 * target.c (target_terminal_init): New function.
284 (target_terminal_inferior): Likewise.
285 (target_terminal_ours): Likewise.
286 * target.h: Include <vector>.
287 (struct target_ops) <create_inferior>: Update prototype.
288 (create_inferior): Update macro.
289 * utils.c (gdb_flush_out_err): New function.
290 * win32-low.c (win32_create_inferior): Adjust function prototype
291 and code to reflect change on "target.h".
292
043a4934
SDJ
2932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
294
295 * inferiors.c (switch_to_thread): New function.
296
15652511
SDJ
2972017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
298
299 * Makefile.in (SFILE): Add "common/job-control.c".
300 (OBS): Add "job-control.o".
301
21ea5acd
SDJ
3022017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
303
304 * Makefile: Remove "@host_makefile_frag@".
305
e13cb306
PA
3062017-05-05 Pedro Alves <palves@redhat.com>
307
308 * configure: Regenerate.
309
c94fee56
SDJ
3102017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
311
312 * configure: Regenerate.
313
a0ff9e1a
SM
3142017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
315
316 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
317 software_single_step change of return type to
318 std::vector<CORE_ADDR>.
319 * linux-low.c (install_software_single_step_breakpoints):
320 Likewise.
321 * linux-low.h (install_software_single_step_breakpoints):
322 Likewise.
323
be628ab8
SDJ
3242017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
325
326 * remote-utils.c: Include "gdb_termios.h" instead of
327 "terminal.h".
328 * terminal.h: Delete file.
329
7c5ded6a
SDJ
3302017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
331
332 * server.c: Include <vector>.
333 <program_argv, wrapper_argv>: Convert to std::vector.
334 (start_inferior): Rewrite function to use C++.
335 (handle_v_run): Likewise. Update code that calculates the argv
336 based on the vRun packet; use C++.
337 (captured_main): Likewise.
338
436252de
SM
3392017-04-06 Simon Marchi <simon.marchi@ericsson.com>
340
341 * server.c (handle_v_cont): Initialize thread_resume::thread
342 with null_ptid.
343
9bf2a700
PA
3442017-04-05 Pedro Alves <palves@redhat.com>
345
346 * configure: Regenerate.
347
a121b7c1
PA
3482017-04-05 Pedro Alves <palves@redhat.com>
349
350 * gdbreplay.c (sync_error): Constify.
351 * linux-x86-low.c (push_opcode): Constify.
352
21c8a587
PA
3532017-04-05 Pedro Alves <palves@redhat.com>
354
355 * win32-low.c (get_child_debug_event)
356 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
357 Report TARGET_WAITKIND_SPURIOUS instead.
358
fb32b4f7
PA
3592017-04-05 Pedro Alves <palves@redhat.com>
360
361 * remote-utils.c (remote_prepare, remote_open): Constify.
362 * remote-utils.h (remote_prepare, remote_open): Constify.
363 * server.c (captured_main): Constify 'port' handling.
364
65dd1e59
SM
3652017-04-04 Simon Marchi <simon.marchi@ericsson.com>
366
367 * Makefile.in (clean): Clear .deps.
368
8fa5b777
SM
3692017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
370
371 * .gitignore: Remove generated files, replace with wildcard.
372 * (clean): Replace removal of generated files with wildcard.
373 (version.c): Replace with...
374 (version-generated.c): ...this.
375 (xml-builtin.c): Replace with...
376 (xml-builtin-generated.c): ...this.
377 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
378 (%.c: *regformats*): Replace with...
379 (%-generated.c: *regformats*): ...this.
380
a12e714b
MF
3812017-03-27 Max Filippov <jcmvbkbc@gmail.com>
382
383 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
384 (xtensa_fill_gregset): Call collect_register_by_name for
385 threadptr register.
386 (xtensa_store_gregset): Call supply_register_by_name for
387 threadptr register.
388
1a09b50a
MF
3892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
390
391 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
392 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
393 (xtensa_store_gregset): Call supply_register for all registers in
394 a0_regnum..a0_regnum + C0_NREGS range.
395
1a01e7c6
SM
3962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
397
398 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
399 (ax-ipa.o: ax.c): Remove.
400 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
401 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
402 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
403 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
404 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
405
36bc18a8
SM
4062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
407
408 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
409 (print-utils-ipa.o: ../common/print-utils.c): Remove.
410 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
411 (errors-ipa.o: ../common/errors.c): Remove.
412 (format-ipa.o: ../common/format.c): Remove.
413 (common-utils-ipa.o: ../common/common-utils.c): Remove.
414
a8ebe3d5
SM
4152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
416
417 * Makefile.in (%-ipa.o: %.c): New rule.
418 (tracepoint-ipa.o: tracepoint.c): Remove.
419 (utils-ipa.o: utils.c): Remove.
420 (remote-utils-ipa.o: remote-utils.c): Remove.
421 (regcache-ipa.o: regcache.c): Remove.
422 (i386-linux-ipa.o: i386-linux.c): Remove.
423 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
424 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
425 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
426 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
427 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
428 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
429 (amd64-linux-ipa.o: amd64-linux.c): Remove.
430 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
431 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
432 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
433 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
434 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
435 (aarch64-ipa.o: aarch64.c): Remove.
436 (s390-linux32-ipa.o: s390-linux32.c): Remove.
437 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
438 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
439 (s390-linux64-ipa.o: s390-linux64.c): Remove.
440 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
441 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
442 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
443 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
444 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
445 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
446 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
447 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
448 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
449 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
450 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
451 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
452 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
453 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
454 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
455 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
456 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
457 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
458 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
459 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
460 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
461 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
462 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
463 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
464 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
465 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
466 (tdesc-ipa.o: tdesc.c): Remove.
467 (x32-linux-ipa.o: x32-linux.c): Remove.
468 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
469 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
470
50cfacb7
SM
4712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
472
473 * Makefile.in (%.o: ../arch/%.c): New rule.
474 (arm.o: ../arch/arm.c): Remove.
475 (arm-linux.o: ../arch/arm-linux.c): Remove.
476 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
477 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
478
c5a22423
SM
4792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
480
481 * Makefile.in (%.o: ../nat/%.c): New rule.
482 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
483 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
484 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
485 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
486 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
487 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
488 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
489 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
490 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
491 (linux-personality.o: ../nat/linux-personality.c): Remove.
492 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
493 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
494 (x86-linux.o: ../nat/x86-linux.c): Remove.
495 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
496 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
497
6bda016b
SM
4982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
499
500 * Makefile.in (%.o: ../common/%.c): New rule.
501 (signals.o: ../common/signals.c): Remove.
502 (print-utils.o: ../common/print-utils.c): Remove.
503 (rsp-low.o: ../common/rsp-low.c): Remove.
504 (common-utils.o: ../common/common-utils.c): Remove.
505 (posix-strerror.o: ../common/posix-strerror.c): Remove.
506 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
507 (vec.o: ../common/vec.c): Remove.
508 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
509 (xml-utils.o: ../common/xml-utils.c): Remove.
510 (ptid.o: ../common/ptid.c): Remove.
511 (buffer.o: ../common/buffer.c): Remove.
512 (format.o: ../common/format.c): Remove.
513 (filestuff.o: ../common/filestuff.c): Remove.
514 (agent.o: ../common/agent.c): Remove.
515 (errors.o: ../common/errors.c): Remove.
516 (environ.o: ../common/environ.c): Remove.
517 (common-debug.o: ../common/common-debug.c): Remove.
518 (cleanups.o: ../common/cleanups.c): Remove.
519 (common-exceptions.o: ../common/common-exceptions.c): Remove.
520 (fileio.o: ../common/fileio.c): Remove.
521 (common-regcache.o: ../common/common-regcache.c): Remove.
522 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
523 (new-op.o: ../common/new-op.c): Remove.
524 (btrace-common.o: ../common/btrace-common.c): Remove.
525
21122961
SM
5262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
527
528 * Makefile.in (%.o: ../target/%.c): New rule.
529 (waitstatus.o: ../target/waitstatus.c): Remove.
530
c362e621
SM
5312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
532
533 * Makefile.in
534 (%.c: ../regformats/%.dat,
535 (%.c: ../regformats/arm/%.dat,
536 (%.c: ../regformats/i386/%.dat,
537 (%.c: ../regformats/rs6000/%.dat): New rules.
538 (aarch64.c): Remove.
539 (reg-arm.c): Remove.
540 (arm-with-iwmmxt.c): Remove.
541 (arm-with-vfpv2.c): Remove.
542 (arm-with-vfpv3.c): Remove.
543 (arm-with-neon.c): Remove.
544 (reg-bfin.c): Remove.
545 (reg-cris.c): Remove.
546 (reg-crisv32.c): Remove.
547 (i386.c): Remove.
548 (i386-linux.c): Remove.
549 (i386-avx.c): Remove.
550 (i386-avx-linux.c): Remove.
551 (i386-avx-avx512.c): Remove.
552 (i386-avx-avx512-linux.c): Remove.
553 (i386-mpx.c): Remove.
554 (i386-mpx-linux.c): Remove.
555 (i386-avx-mpx-avx512-pku.c): Remove.
556 (i386-avx-mpx-avx512-pku-linux.c): Remove.
557 (i386-avx-mpx.c): Remove.
558 (i386-avx-mpx-linux.c): Remove.
559 (i386-mmx.c): Remove.
560 (i386-mmx-linux.c): Remove.
561 (reg-ia64.c): Remove.
562 (reg-m32r.c): Remove.
563 (reg-m68k.c): Remove.
564 (reg-cf.c): Remove.
565 (mips-linux.c): Remove.
566 (mips-dsp-linux.c): Remove.
567 (mips64-linux.c): Remove.
568 (mips64-dsp-linux.c): Remove.
569 (nios2-linux.c): Remove.
570 (powerpc-32.c): Remove.
571 (powerpc-32l.c): Remove.
572 (powerpc-altivec32l.c): Remove.
573 (powerpc-cell32l.c): Remove.
574 (powerpc-vsx32l.c): Remove.
575 (powerpc-isa205-32l.c): Remove.
576 (powerpc-isa205-altivec32l.c): Remove.
577 (powerpc-isa205-vsx32l.c): Remove.
578 (powerpc-e500l.c): Remove.
579 (powerpc-64l.c): Remove.
580 (powerpc-altivec64l.c): Remove.
581 (powerpc-cell64l.c): Remove.
582 (powerpc-vsx64l.c): Remove.
583 (powerpc-isa205-64l.c): Remove.
584 (powerpc-isa205-altivec64l.c): Remove.
585 (powerpc-isa205-vsx64l.c): Remove.
586 (s390-linux32.c): Remove.
587 (s390-linux32v1.c): Remove.
588 (s390-linux32v2.c): Remove.
589 (s390-linux64.c): Remove.
590 (s390-linux64v1.c): Remove.
591 (s390-linux64v2.c): Remove.
592 (s390-te-linux64.c): Remove.
593 (s390-vx-linux64.c): Remove.
594 (s390-tevx-linux64.c): Remove.
595 (s390x-linux64.c): Remove.
596 (s390x-linux64v1.c): Remove.
597 (s390x-linux64v2.c): Remove.
598 (s390x-te-linux64.c): Remove.
599 (s390x-vx-linux64.c): Remove.
600 (s390x-tevx-linux64.c): Remove.
601 (tic6x-c64xp-linux.c): Remove.
602 (tic6x-c64x-linux.c): Remove.
603 (tic6x-c62x-linux.c): Remove.
604 (reg-sh.c): Remove.
605 (reg-sparc64.c): Remove.
606 (reg-spu.c): Remove.
607 (amd64.c): Remove.
608 (amd64-linux.c): Remove.
609 (amd64-avx.c): Remove.
610 (amd64-avx-linux.c): Remove.
611 (amd64-avx-avx512.c): Remove.
612 (amd64-avx-avx512-linux.c): Remove.
613 (amd64-mpx.c): Remove.
614 (amd64-mpx-linux.c): Remove.
615 (amd64-avx-mpx-avx512-pku.c): Remove.
616 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
617 (amd64-avx-mpx.c): Remove.
618 (amd64-avx-mpx-linux.c): Remove.
619 (x32.c): Remove.
620 (x32-linux.c): Remove.
621 (x32-avx.c): Remove.
622 (x32-avx-linux.c): Remove.
623 (x32-avx-avx512.c): Remove.
624 (x32-avx-avx512-linux.c): Remove.
625 (reg-xtensa.c): Remove.
626 (reg-tilegx.c): Remove.
627 (reg-tilegx32.c): Remove.
628
1672e0d9
SDJ
6292017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
630
631 * Makefile.in (SFILES): Add "common/environ.c".
632 (OBJS): Add "common/environ.h".
633
239b6d10
WT
6342017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
635
636 * configure.ac: Check if the fs_base and gs_base members of
637 `struct user_regs_struct' exist.
638 * config.in: Regenerated.
639 * configure: Likewise.
640
694b382c
AT
6412017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
642
643 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
644 target_read_memory.
645 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
646 (get_next_pcs_syscall_next_pc): Likewise.
647
7dc53023
LM
6482016-12-23 Luis Machado <lgustavo@codesourcery.com>
649
650 * win32-i386-low.c: Fix incorrect reference to a couple source files.
651 * nto-x86-low.c: Likewise.
652
ad02e4fe
SM
6532016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * Makefile.in: Include disable-implicit-rules.mk.
656
dcb07cfa
PA
6572016-11-23 Pedro Alves <palves@redhat.com>
658
659 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
660 (debug_vprintf): Use std::chrono::steady_clock instead of
661 gettimeofday. Use '.' instead of ':'.
662 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
663 (get_timestamp): Use std::chrono::steady_clock instead of
664 gettimeofday.
665
8629c02c
SM
6662016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
667
668 * Makefile.in: Fix whitespace formatting.
669
b593ecca
SM
6702016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
671
672 * Makefile.in (SFILES, OBS): Flatten list and order
673 alphabetically.
674
9986ba08
PA
6752016-11-23 Pedro Alves <palves@redhat.com>
676
677 * event-loop.c (handle_file_event): Use warning.
678 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
679 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
680 Use warning.
681
4eefa7bc
PA
6822016-11-23 Pedro Alves <palves@redhat.com>
683
684 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
685 output.
686 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
687 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
688 debug_printf and debug_flush for debug output.
689 * server.c (handle_general_set): Likewise.
690 * thread-db.c (try_thread_db_load): Use debug_printf for debug
691 output.
692
5443506e
SM
6932016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
694
695 * Makefile.in (.c.o): Replace rule with ...
696 (%.o: %.c): ... this one.
697
3b165252
SM
6982016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
699
700 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
701 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
702 make.
703 * configure.ac: Remove checks for the make program.
704 * configure: Re-generate.
705
0bcda685
PA
7062016-10-28 Pedro Alves <palves@redhat.com>
707
708 * Makefile.in (CXX_DIALECT): Get from configure.
709 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
710 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
711 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
712 * config.in: Regenerate.
713 * configure: Regenerate.
714
c3805894
YQ
7152016-10-27 Yao Qi <yao.qi@linaro.org>
716
717 * linux-low.c (linux_supports_range_stepping): Return true if
718 can_software_single_step return true.
719
89342618
YQ
7202016-10-27 Yao Qi <yao.qi@linaro.org>
721
722 * inferiors.c (find_inferior_in_random): New function.
723 * inferiors.h (find_inferior_in_random): Declare.
724 * linux-low.c (linux_wait_for_event_filtered): Call
725 find_inferior_in_random instead of find_inferior.
726
e3652c84
YQ
7272016-10-27 Yao Qi <yao.qi@linaro.org>
728
729 * linux-low.c (linux_wait_1): If single-step breakpoints are
730 inserted, remove them.
731
5a04c4cf
PA
7322016-10-26 Pedro Alves <palves@redhat.com>
733
734 * linux-low.c (handle_extended_wait): Link parent/child fork
735 threads.
736 (linux_wait_1): Unlink them.
737 (linux_set_resume_request): Ignore resume requests for
738 already-resumed and unhandled fork child threads.
739 * linux-low.h (struct lwp_info) <fork_relative>: New field.
740 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
741 New functions.
742 (handle_v_requests) <vCont>: Don't call require_running.
743 * server.h (in_queued_stop_replies): New declaration.
744
cb93dc7f
YQ
7452016-10-24 Yao Qi <yao.qi@linaro.org>
746
747 PR server/20733
748 * linux-aarch64-low.c (append_insns): Cast the return value to
749 'uint32_t *'.
750
a1078bea
YQ
7512016-10-10 Yao Qi <yao.qi@linaro.org>
752
753 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
754
1fb77080
SDJ
7552016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
756
757 * target.c (target_supports_multi_process): New function, moved
758 from...
759 * target.h (target_supports_multi_process): ... here. Remove
760 macro.
761
39b5a3b9
TT
7622016-10-05 Tom Tromey <tom@tromey.com>
763
764 PR remote/20655:
765 * tracepoint.c (handle_tracepoint_bkpts): Check
766 ipa_error_tracepoint, not ipa_stopping_tracepoint.
767
c1d0b70a
YQ
7682016-10-05 Yao Qi <yao.qi@linaro.org>
769
770 * configure.srv: Update the path of arm-*.xml files.
771
0a69eedb
YQ
7722016-10-05 Terry Guo <terry.guo@arm.com>
773 Yao Qi <yao.qi@linaro.org>
774
775 * Makefile.in: Adjust the path of rules.
776 * configure.srv: Update the path of xml files.
777 * regformats/arm-with-iwmmxt.dat: Regenerated.
778 * regformats/arm-with-neon.dat: Likewise.
779 * regformats/arm-with-vfpv2.dat: Likewise.
780 * regformats/arm-with-vfpv3.dat Likewise.
781
17e16485
YQ
7822016-09-30 Yao Qi <yao.qi@linaro.org>
783
784 PR gdbserver/20627
785 * target.c (target_stop_and_wait): Don't call
786 target_continue_no_signal, use resume_stop instead.
787
edeeb602
YQ
7882016-09-26 Yao Qi <yao.qi@linaro.org>
789
790 * linux-low.c (linux_wait_1): Call debug_exit.
791
503b1c39
PA
7922016-09-23 Pedro Alves <palves@redhat.com>
793
794 * Makefile.in (SFILES): Add common/new-op.c.
795 (OBS): Add common/new-op.o.
796 (new-op.o): New rule.
797
74172ecf
SM
7982016-09-21 Simon Marchi <simon.marchi@ericsson.com>
799
800 * .gitinore: Ignore more files.
801
fc6cda2e
YQ
8022016-09-21 Yao Qi <yao.qi@linaro.org>
803
804 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
805 23.
806
bc1e6c81
SDJ
8072016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
808
809 * server.c (start_inferior): Call target_mourn_inferior instead of
810 mourn_inferior; pass ptid_t argument to it.
811 (resume): Likewise.
812 (handle_target_event): Likewise.
813 * target.c (target_mourn_inferior): New function.
814 * target.h (mourn_inferior): Delete macro.
815
0e00e962
AA
8162016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
817
818 * linux-low.c (lwp_is_stepping): New function.
819
1d8cb77d
CL
8202016-09-06 Carl Love <cel@us.ibm.com>
821
822 * server.c (start_inferior): Fixed comment, requested comment change
823 didn't get updated correctly. Removed reference to ptrace () call as
824 it is only true on Linux systems.
825
7313bced
CL
8262016-09-06 Carl Love <cel@us.ibm.com>
827
828 * server.c (start_inferior): Do not call
829 function target_post_create_inferior () if the
830 inferior process has already exited.
831
cf6de44d
PA
8322016-09-05 Pedro Alves <palves@redhat.com>
833
834 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
835 (COMPILE.pre, CC_LD): Use CXX directly.
836 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
837 * acinclude.m4: Don't include build-with-cxx.m4.
838 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
839 * configure: Regenerate.
840
c1da6748
AT
8412016-09-02 Akash Trehan <akash.trehan123@gmail.com>
842
843 PR gdb/19495
844 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
845 call writing data to own_buf.
846
f2b9e3df
SDJ
8472016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
848
849 * target.c (mywait): Call target_wait instead of
850 the_target->wait.
851 (target_wait): New function.
852
049a8570
SDJ
8532016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
854
855 * server.c (start_inferior): New variable 'ptid'. Replace calls
856 to the_target->resume by target_continue{,_no_signal}, depending
857 on the case.
858 * target.c (target_stop_and_wait): Call target_continue_no_signal
859 instead of the_target->resume.
860 (target_continue): New function.
861
3aa5cfa0
AT
8622016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
863
864 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
865
754653a7
AZ
8662016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
867
868 PR server/20491
869 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
870 ps_prochandle.
871 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
872 * linux-arm-low.c (ps_get_thread_area): Likewise.
873 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
874 * linux-m68k-low.c (ps_get_thread_area): Likewise.
875 * linux-mips-low.c (ps_get_thread_area): Likewise.
876 * linux-nios2-low.c (ps_get_thread_area): Likewise.
877 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
878 * linux-x86-low.c (ps_get_thread_area): Likewise.
879 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
880
ed036b40
PA
8812016-08-19 Pedro Alves <palves@redhat.com>
882
883 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
884
c8ef42ee
PA
8852016-08-19 Pedro Alves <palves@redhat.com>
886
887 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
888 comment. Use memcpy instead of casting through unsigned long.
889
9c235a72
PA
8902016-08-19 Pedro Alves <palves@redhat.com>
891
892 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
893 allocating around 0x80000000.
894
201506da
PA
8952016-08-19 Pedro Alves <palves@redhat.com>
896
897 PR gdb/20415
898 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
899 (x32-avx512-linux-ipa.o): New rules.
900 * configure.ac (x86_64-*-linux*): New x32 check.
901 * configure.srv (ipa_x32_linux_regobj): New.
902 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
903 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
904 descriptions.
905 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
906 descriptions.
907 * configure: Regenerate.
908
f348d89a
PA
9092016-08-09 Pedro Alves <palves@redhat.com>
910
911 PR gdb/18653
912 * Makefile.in (OBS): Add signals-state-save-restore.o.
913 (signals-state-save-restore.o): New rule.
914 * config.in: Regenerate.
915 * configure: Regenerate.
916 * linux-low.c: Include "signals-state-save-restore.h".
917 (linux_create_inferior): Call
918 restore_original_signals_state.
919 * server.c: Include "dispositions-save-restore.h".
920 (captured_main): Call save_original_signals_state.
921
1baf5149
PA
9222016-08-05 Pedro Alves <palves@redhat.com>
923
924 * configure: Regenerate.
925
fcd4a73d
YQ
9262016-08-04 Yao Qi <yao.qi@linaro.org>
927
928 * linux-low.c (regsets_fetch_inferior_registers): Check
929 errno is ESRCH or not.
930
979659d0
YQ
9312016-08-02 Yao Qi <yao.qi@linaro.org>
932
933 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
934 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
935 (thread_db_load_search): Update.
936 (try_thread_db_load_1): Don't look for td_ta_event_addr,
937 td_ta_set_event and td_ta_event_getmsg.
938
6598661d
PA
9392016-07-26 Pedro Alves <palves@redhat.com>
940
941 PR server/20414
942 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
943 of unsigned long for 64-bit registers and use uint32_t instead of
944 unsigned int for 32-bit registers.
945
9cf12d57
PA
9462016-07-26 Pedro Alves <palves@redhat.com>
947
948 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
949 to 'ptrace'.
950
305450ed
TT
9512016-07-21 Tom Tromey <tom@tromey.com>
952
953 * configure: Rebuild.
954
2583da7c
YQ
9552016-07-21 Yao Qi <yao.qi@linaro.org>
956
957 * mem-break.c (find_gdb_breakpoint): Cast bp to
958 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
959
21536b36
YQ
9602016-07-21 Yao Qi <yao.qi@linaro.org>
961
962 * server.c (handle_v_requests): Support s and S actions
963 if target_supports_software_single_step return true.
964
8901d193
YQ
9652016-07-21 Yao Qi <yao.qi@linaro.org>
966
967 * linux-low.c (resume_stopped_resumed_lwps): If resume request
968 is resume_step, call maybe_hw_step.
969 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
970 and unstop them.
971 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
972 breakpoints or not.
973 (proceed_one_lwp): If resume request is resume_step, install
974 reinsert breakpoints and call maybe_hw_step.
975
0e9a339e
YQ
9762016-07-21 Yao Qi <yao.qi@linaro.org>
977
978 * linux-low.c (proceed_one_lwp): Declare.
979 (linux_resume_one_thread): Remove local variable 'step'.
980 Lift code enqueue signal. Call proceed_one_lwp instead of
981 linux_resume_one_lwp.
982
4281b351
YQ
9832016-07-21 Yao Qi <yao.qi@linaro.org>
984
985 * linux-low.c (linux_resume_one_thread): Call
986 enqueue_pending_signal.
987
984a2c04
YQ
9882016-07-21 Yao Qi <yao.qi@linaro.org>
989
990 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
991 * inferiors.c (do_restore_current_thread_cleanup): New function.
992 (make_cleanup_restore_current_thread): Likewise.
993 * linux-low.c (install_software_single_step_breakpoints): Call
994 make_cleanup_restore_current_thread. Switch current_thread to
995 thread.
996
bec903c9
YQ
9972016-07-21 Yao Qi <yao.qi@linaro.org>
998
999 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1000 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1001 (clone_one_breakpoint): Likewise.
1002 (delete_reinsert_breakpoints): Change parameter to thread.
1003 Callers updated.
1004 (has_reinsert_breakpoints): Likewise.
1005 (uninsert_reinsert_breakpoints): Likewise.
1006 (reinsert_reinsert_breakpoints): Likewise.
1007 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1008 (delete_reinsert_breakpoints): Likewise.
1009 (reinsert_reinsert_breakpoints): Likewise.
1010 (uninsert_reinsert_breakpoints): Likewise.
1011 (has_reinsert_breakpoints): Likewise.
1012
63c40ec7
YQ
10132016-07-21 Yao Qi <yao.qi@linaro.org>
1014
1015 * inferiors.c (get_thread_process): Make parameter const.
1016 * inferiors.h (get_thread_process): Update declaration.
1017 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1018 Add new parameters child_thread and parent_thread. Callers
1019 updated.
1020 * mem-break.h (clone_all_breakpoints): Update declaration.
1021
9aa76cd0
YQ
10222016-07-21 Yao Qi <yao.qi@linaro.org>
1023
1024 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1025 <command_list, handler>: Remove.
1026 (struct gdb_breakpoint): New.
1027 (struct other_breakpoint): New.
1028 (struct reinsert_breakpoint): New.
1029 (is_gdb_breakpoint): New function.
1030 (any_persistent_commands): Update command_list if
1031 is_gdb_breakpoint returns true.
1032 (set_breakpoint): Create breakpoints according to their types.
1033 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1034 (set_gdb_breakpoint_1): Likewise.
1035 (set_gdb_breakpoint): Likewise.
1036 (clear_breakpoint_conditions): Change parameter type to
1037 'struct gdb_breakpoint *'.
1038 (clear_breakpoint_commands): Likewise.
1039 (clear_breakpoint_conditions_and_commands): Likewise.
1040 (add_condition_to_breakpoint): Likewise.
1041 (add_breakpoint_condition): Likewise.
1042 (add_commands_to_breakpoint): Likewise.
1043 (check_breakpoints): Check other_breakpoint.
1044 (clone_one_breakpoint): Clone breakpopint according to its type.
1045 * mem-break.h (struct gdb_breakpoint): Declare.
1046 (set_gdb_breakpoint): Update declaration.
1047 (clear_breakpoint_conditions_and_commands): Likewise.
1048 (add_breakpoint_condition): Likewise.
1049 (add_breakpoint_commands): Likewise.
1050 * server.c (process_point_options): Change parameter type to
1051 'struct gdb_breakpoint *'.
1052
811f8301
YQ
10532016-07-21 Yao Qi <yao.qi@linaro.org>
1054
1055 * mem-break.c (set_breakpoint_at): Rename it to ...
1056 (set_breakpoint_type_at): ... it.
1057 (set_breakpoint_at): Call set_breakpoint_type_at.
1058 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1059 * mem-break.h (set_breakpoint_at): Update comments.
1060
b1c51e36
CLT
10612016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1062
1063 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1064 to buf parameter.
1065 (nios2_store_gregset): Likewise.
1066
ced2dffb
PA
10672016-07-01 Pedro Alves <palves@redhat.com>
1068 Antoine Tremblay <antoine.tremblay@ericsson.com>
1069
1070 * linux-low.c: Change interface to take the target lwp_info
1071 pointer directly and return void. Handle detaching from a zombie
1072 thread.
1073 (linux_detach_lwp_callback): New function.
1074 (linux_detach): Detach from the leader thread after detaching from
1075 the clone threads.
1076
2ac09a5b
YQ
10772016-06-28 Yao Qi <yao.qi@linaro.org>
1078
1079 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1080 for variable new_offset.
1081 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1082 (aarch64_ftrace_insn_reloc_cb): Likewise.
1083 (aarch64_ftrace_insn_reloc_tb): Likewise.
1084 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1085 PRIx64 instead of PRIx32.
1086
79e7fd4f
YQ
10872016-06-28 Yao Qi <yao.qi@linaro.org>
1088
1089 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1090 (the_low_target): Install arm_get_syscall_trapinfo.
1091
061fc021
YQ
10922016-06-28 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1095 function.
1096 (the_low_target): Install aarch64_get_syscall_trapinfo.
1097
4cc32bec
YQ
10982016-06-28 Yao Qi <yao.qi@linaro.org>
1099
1100 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1101 Callers updated.
1102 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1103 Remove parameter sysno.
1104 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1105 sysret.
1106
782c1122
AA
11072016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1108
1109 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1110 (s390_emit_ne_goto): Likewise.
1111 (s390_emit_lt_goto): Likewise.
1112 (s390_emit_le_goto): Likewise.
1113 (s390_emit_gt_goto): Likewise.
1114 (s390_emit_ge_goto): Likewise.
1115 (s390x_emit_eq_goto): Likewise.
1116 (s390x_emit_ne_goto): Likewise.
1117 (s390x_emit_lt_goto): Likewise.
1118 (s390x_emit_le_goto): Likewise.
1119 (s390x_emit_gt_goto): Likewise.
1120 (s390x_emit_ge_goto): Likewise.
1121 (s390_emit_ops_impl): Mark variable static.
1122 (s390x_emit_ops): Likewise.
1123
2e7b624b
YQ
11242016-06-17 Yao Qi <yao.qi@linaro.org>
1125
1126 * linux-low.c (handle_extended_wait): Call
1127 uninsert_reinsert_breakpoints for the parent process. Remove
1128 reinsert breakpoints from the child process. Reinsert them to
1129 the parent process when vfork is done.
1130 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1131 (reinsert_reinsert_breakpoints): New function.
1132 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1133 (reinsert_reinsert_breakpoints): Declare.
1134
8a81c5d7
YQ
11352016-06-17 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-low.c (handle_extended_wait): If the parent is doing
1138 step-over, remove the reinsert breakpoints from the forked child.
1139
f50bf8e5
YQ
11402016-06-17 Yao Qi <yao.qi@linaro.org>
1141
1142 * linux-low.c (unsuspend_all_lwps): Declare.
1143 (linux_low_filter_event): If thread exited, call finish_step_over.
1144 If step-over is finished, unsuspend other threads.
1145
8376a3cb
YQ
11462016-06-17 Yao Qi <yao.qi@linaro.org>
1147
1148 * linux-low.c (linux_resume_one_lwp_throw): Assert
1149 has_reinsert_breakpoints returns false.
1150 * mem-break.c (delete_disabled_breakpoints): Assert
1151 bp type isn't reinsert_breakpoint.
1152
f79b145d
YQ
11532016-06-17 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-low.c (maybe_hw_step): New function.
1156 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1157 (finish_step_over): Switch current_thread to lwp temporarily,
1158 and assert has_reinsert_breakpoints returns true.
1159 (proceed_one_lwp): Call maybe_hw_step.
1160 * mem-break.c (has_reinsert_breakpoints): New function.
1161 * mem-break.h (has_reinsert_breakpoints): Declare.
1162
0ae534d2
JT
11632016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1164
1165 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1166
fcdad592
YQ
11672016-05-17 Yao Qi <yao.qi@linaro.org>
1168
1169 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1170 instead of find_inferior.
1171
9e784964
YQ
11722016-05-05 Yao Qi <yao.qi@linaro.org>
1173
1174 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1175 Initialize res to zero.
1176
cf2ebb6e
YQ
11772016-05-05 Yao Qi <yao.qi@linaro.org>
1178
1179 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1180 to uint32_t.
1181
c1aebf87
UW
11822016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1183
1184 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1185 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1186 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1187
35fd2deb 11882016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1189 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1190
1191 * tracepoint.c (write_inferior_int8): New function.
1192 (cmd_qtenable_disable): Write enable flag using
1193 write_inferior_int8.
1194
484b3c32
YQ
11952016-04-25 Yao Qi <yao.qi@linaro.org>
1196
1197 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1198 (need_step_over_p): Return zero if the LWP has pending signals
1199 can be delivered on software single step target.
1200
85ba7d86
YQ
12012016-04-25 Yao Qi <yao.qi@linaro.org>
1202
1203 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1204 return instead of error.
1205
3539aa13
YQ
12062016-04-22 Yao Qi <yao.qi@linaro.org>
1207
1208 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1209 to 23.
1210
5b061e98
YQ
12112016-04-22 Yao Qi <yao.qi@linaro.org>
1212
1213 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1214 signal when stepping over breakpoint with software single
1215 step.
1216
3451269c
PA
12172016-04-21 Pedro Alves <palves@redhat.com>
1218
1219 * linux-s390-low.c (s390_collect_ptrace_register)
1220 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1221 add casts.
1222 (s390_check_regset): Use void * instead of gdb_byte *.
1223
a2358508
PA
12242016-04-20 Pedro Alves <palves@redhat.com>
1225
1226 * configure: Renegerate.
1227
6885166d
YQ
12282016-04-20 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1231 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1232 number 16.
1233 (arm_store_gregset): Likewise.
1234
2b863f51
WT
12352016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1236
1237 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1238 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1239 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1240 (amd64-avx-mpx-linux.c): New rules.
1241 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1242 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1243 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1244 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1245 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1246 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1247 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1248 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1249 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1250 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1251 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1252 * linux-x86-low.c (x86_linux_read_description): Add case for
1253 X86_XSTATE_AVX_MPX_MASK.
1254 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1255 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1256 init_registers_i386_avx_mpx_linux.
1257 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1258 (initialize_low_tracepoint): Call
1259 init_registers_i386_avx_mpx_linux.
1260 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1261 (initialize_low_tracepoint): Call
1262 init_registers_amd64_avx_mpx_linux.
1263 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1264 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1265 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1266 declarations.
1267
9b30624b
PA
12682016-04-18 Pedro Alves <palves@redhat.com>
1269
1270 * configure: Regenerate.
1271
45e3745e
AT
12722016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1273
1274 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1275 (aarch64_emit_sub): Likewise.
1276
2afc13ff
PA
12772016-04-12 Pedro Alves <palves@redhat.com>
1278
1279 * utils.c (prepare_to_throw_exception): Delete.
1280
6e774b13
SM
12812016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1282
1283 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1284
4dca19f8
MK
12852016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1286
1287 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1288
d0a9981f
MK
12892016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1290
1291 * linux-aarch64-ipa.c: Add <elf.h> include.
1292 * linux-ppc-ipa.c: Add <elf.h> include.
1293 * linux-s390-ipa.c: Add <elf.h> include.
1294
252db07e
MK
12952016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1296
1297 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1298 (get_raw_reg_ptr): Likewise.
1299 (get_trace_state_variable_value_ptr): Likewise.
1300 (set_trace_state_variable_value_ptr): Likewise.
1301 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1302 char *.
1303
14e2b6d9
MK
13042016-03-31 Wei-cheng Wang <cole945@gmail.com>
1305 Marcin Kościelnicki <koriakin@0x04.net>
1306
1307 PR/17221
1308 * linux-ppc-low.c (emit_insns): New function.
1309 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1310 (ppc_emit_prologue): New function.
1311 (ppc_emit_epilogue): New function.
1312 (ppc_emit_add): New function.
1313 (ppc_emit_sub): New function.
1314 (ppc_emit_mul): New function.
1315 (ppc_emit_lsh): New function.
1316 (ppc_emit_rsh_signed): New function.
1317 (ppc_emit_rsh_unsigned): New function.
1318 (ppc_emit_ext): New function.
1319 (ppc_emit_zero_ext): New function.
1320 (ppc_emit_log_not): New function.
1321 (ppc_emit_bit_and): New function.
1322 (ppc_emit_bit_or): New function.
1323 (ppc_emit_bit_xor): New function.
1324 (ppc_emit_bit_not): New function.
1325 (ppc_emit_equal): New function.
1326 (ppc_emit_less_signed): New function.
1327 (ppc_emit_less_unsigned): New function.
1328 (ppc_emit_ref): New function.
1329 (ppc_emit_const): New function.
1330 (ppc_emit_reg): New function.
1331 (ppc_emit_pop): New function.
1332 (ppc_emit_stack_flush): New function.
1333 (ppc_emit_swap): New function.
1334 (ppc_emit_stack_adjust): New function.
1335 (ppc_emit_call): New function.
1336 (ppc_emit_int_call_1): New function.
1337 (ppc_emit_void_call_2): New function.
1338 (ppc_emit_if_goto): New function.
1339 (ppc_emit_goto): New function.
1340 (ppc_emit_eq_goto): New function.
1341 (ppc_emit_ne_goto): New function.
1342 (ppc_emit_lt_goto): New function.
1343 (ppc_emit_le_goto): New function.
1344 (ppc_emit_gt_goto): New function.
1345 (ppc_emit_ge_goto): New function.
1346 (ppc_write_goto_address): New function.
1347 (ppc_emit_ops_impl): New static variable.
1348 (ppc64v1_emit_prologue): New function.
1349 (ppc64v2_emit_prologue): New function.
1350 (ppc64_emit_epilogue): New function.
1351 (ppc64_emit_add): New function.
1352 (ppc64_emit_sub): New function.
1353 (ppc64_emit_mul): New function.
1354 (ppc64_emit_lsh): New function.
1355 (ppc64_emit_rsh_signed): New function.
1356 (ppc64_emit_rsh_unsigned): New function.
1357 (ppc64_emit_ext): New function.
1358 (ppc64_emit_zero_ext): New function.
1359 (ppc64_emit_log_not): New function.
1360 (ppc64_emit_bit_and): New function.
1361 (ppc64_emit_bit_or): New function.
1362 (ppc64_emit_bit_xor): New function.
1363 (ppc64_emit_bit_not): New function.
1364 (ppc64_emit_equal): New function.
1365 (ppc64_emit_less_signed): New function.
1366 (ppc64_emit_less_unsigned): New function.
1367 (ppc64_emit_ref): New function.
1368 (ppc64_emit_const): New function.
1369 (ppc64v1_emit_reg): New function.
1370 (ppc64v2_emit_reg): New function.
1371 (ppc64_emit_pop): New function.
1372 (ppc64_emit_stack_flush): New function.
1373 (ppc64_emit_swap): New function.
1374 (ppc64v1_emit_call): New function.
1375 (ppc64v2_emit_call): New function.
1376 (ppc64v1_emit_int_call_1): New function.
1377 (ppc64v2_emit_int_call_1): New function.
1378 (ppc64v1_emit_void_call_2): New function.
1379 (ppc64v2_emit_void_call_2): New function.
1380 (ppc64_emit_if_goto): New function.
1381 (ppc64_emit_eq_goto): New function.
1382 (ppc64_emit_ne_goto): New function.
1383 (ppc64_emit_lt_goto): New function.
1384 (ppc64_emit_le_goto): New function.
1385 (ppc64_emit_gt_goto): New function.
1386 (ppc64_emit_ge_goto): New function.
1387 (ppc64v1_emit_ops_impl): New static variable.
1388 (ppc64v2_emit_ops_impl): New static variable.
1389 (ppc_emit_ops): New function.
1390 (linux_low_target): Wire in ppc_emit_ops.
1391
a2174ba4
MK
13922016-03-31 Wei-cheng Wang <cole945@gmail.com>
1393 Marcin Kościelnicki <koriakin@0x04.net>
1394
1395 PR/17221
1396 * Makefile.in: Add powerpc-*-ipa.o
1397 * configure.srv: Add ipa_obj for powerpc*-linux.
1398 * linux-ppc-ipa.c: New file.
1399 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1400 includes.
1401 (PPC_FIELD): New macro.
1402 (PPC_SEXT): New macro.
1403 (PPC_OP6): New macro.
1404 (PPC_BO): New macro.
1405 (PPC_LI): New macro.
1406 (PPC_BD): New macro.
1407 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1408 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1409 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1410 (ppc_get_thread_area): New function.
1411 (is_elfv2_inferior): New function.
1412 (gen_ds_form): New function.
1413 (GEN_STD): New macro.
1414 (GEN_STDU): New macro.
1415 (GEN_LD): New macro.
1416 (GEN_LDU): New macro.
1417 (gen_d_form): New function.
1418 (GEN_ADDI): New macro.
1419 (GEN_ADDIS): New macro.
1420 (GEN_LI): New macro.
1421 (GEN_LIS): New macro.
1422 (GEN_ORI): New macro.
1423 (GEN_ORIS): New macro.
1424 (GEN_LWZ): New macro.
1425 (GEN_STW): New macro.
1426 (GEN_STWU): New macro.
1427 (gen_xfx_form): New function.
1428 (GEN_MFSPR): New macro.
1429 (GEN_MTSPR): New macro.
1430 (GEN_MFCR): New macro.
1431 (GEN_MTCR): New macro.
1432 (GEN_SYNC): New macro.
1433 (GEN_LWSYNC): New macro.
1434 (gen_x_form): New function.
1435 (GEN_OR): New macro.
1436 (GEN_MR): New macro.
1437 (GEN_LWARX): New macro.
1438 (GEN_STWCX): New macro.
1439 (GEN_CMPW): New macro.
1440 (gen_md_form): New function.
1441 (GEN_RLDICL): New macro.
1442 (GEN_RLDICR): New macro.
1443 (gen_i_form): New function.
1444 (GEN_B): New macro.
1445 (GEN_BL): New macro.
1446 (gen_b_form): New function.
1447 (GEN_BNE): New macro.
1448 (GEN_LOAD): New macro.
1449 (GEN_STORE): New macro.
1450 (gen_limm): New function.
1451 (gen_atomic_xchg): New function.
1452 (gen_call): New function.
1453 (ppc_relocate_instruction): New function.
1454 (ppc_install_fast_tracepoint_jump_pad): New function.
1455 (ppc_get_min_fast_tracepoint_insn_len): New function.
1456 (ppc_get_ipa_tdesc_idx): New function.
1457 (the_low_target): Wire in the new functions.
1458 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1459 tdescs.
1460 * linux-ppc-tdesc.h: New file.
1461
a13c4696
MK
14622016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1463
1464 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1465 (alloc_jump_pad_buffer): New function.
1466 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1467 (alloc_jump_pad_buffer): New function.
1468 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1469 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1470 (alloc_jump_pad_buffer): New function.
1471 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1472 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1473 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1474 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1475
1cda1512
MK
14762016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1477
1478 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1479 * linux-amd64-ipa.c: Likewise.
1480 * linux-i386-ipa.c: Likewise.
1481 * linux-s390-ipa.c: Likewise.
1482 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1483 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1484 set_trace_state_variable_value_ptr.
1485 (struct ipa_sym_addresses): Likewise.
1486 (symbol_list): Likewise.
1487 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1488 accessing gdb_collect directly.
1489 (gdb_collect_ptr_type): New typedef.
1490 (get_raw_reg_ptr_type): New typedef.
1491 (get_trace_state_variable_value_ptr_type): New typedef.
1492 (set_trace_state_variable_value_ptr_type): New typedef.
1493 (gdb_collect_ptr): New global.
1494 (get_raw_reg_ptr): New global.
1495 (get_trace_state_variable_value_ptr): New global.
1496 (set_trace_state_variable_value_ptr): New global.
1497 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1498 accessing get_raw_reg directly.
1499 (get_get_tsv_func_addr): Likewise for
1500 get_trace_state_variable_value_ptr.
1501 (get_set_tsv_func_addr): Likewise for
1502 set_trace_state_variable_value_ptr.
1503 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1504
72fb5488
SM
15052016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1506
1507 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1508
28170b88
MK
15092016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1510
1511 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1512 packets.
1513 (relocate_instruction): Remove own_buf.
1514 * server.c (own_buf): Make global.
1515 (handle_v_requests): Make global.
1516 * server.h (own_buf): New declaration.
1517 (handle_v_requests): New prototype.
1518
f39e8743
MK
15192016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1520
1521 PR 18377
1522 * linux-s390-low.c (add_insns): New function.
1523 (s390_emit_prologue): New function.
1524 (s390_emit_epilogue): New function.
1525 (s390_emit_add): New function.
1526 (s390_emit_sub): New function.
1527 (s390_emit_mul): New function.
1528 (s390_emit_lsh): New function.
1529 (s390_emit_rsh_signed): New function.
1530 (s390_emit_rsh_unsigned): New function.
1531 (s390_emit_ext): New function.
1532 (s390_emit_log_not): New function.
1533 (s390_emit_bit_and): New function.
1534 (s390_emit_bit_or): New function.
1535 (s390_emit_bit_xor): New function.
1536 (s390_emit_bit_not): New function.
1537 (s390_emit_equal): New function.
1538 (s390_emit_less_signed): New function.
1539 (s390_emit_less_unsigned): New function.
1540 (s390_emit_ref): New function.
1541 (s390_emit_if_goto): New function.
1542 (s390_emit_goto): New function.
1543 (s390_write_goto_address): New function.
1544 (s390_emit_litpool): New function.
1545 (s390_emit_const): New function.
1546 (s390_emit_call): New function.
1547 (s390_emit_reg): New function.
1548 (s390_emit_pop): New function.
1549 (s390_emit_stack_flush): New function.
1550 (s390_emit_zero_ext): New function.
1551 (s390_emit_swap): New function.
1552 (s390_emit_stack_adjust): New function.
1553 (s390_emit_set_r2): New function.
1554 (s390_emit_int_call_1): New function.
1555 (s390_emit_void_call_2): New function.
1556 (s390_emit_eq_goto): New function.
1557 (s390_emit_ne_goto): New function.
1558 (s390_emit_lt_goto): New function.
1559 (s390_emit_le_goto): New function.
1560 (s390_emit_gt_goto): New function.
1561 (s390_emit_ge_goto): New function.
1562 (s390x_emit_prologue): New function.
1563 (s390x_emit_epilogue): New function.
1564 (s390x_emit_add): New function.
1565 (s390x_emit_sub): New function.
1566 (s390x_emit_mul): New function.
1567 (s390x_emit_lsh): New function.
1568 (s390x_emit_rsh_signed): New function.
1569 (s390x_emit_rsh_unsigned): New function.
1570 (s390x_emit_ext): New function.
1571 (s390x_emit_log_not): New function.
1572 (s390x_emit_bit_and): New function.
1573 (s390x_emit_bit_or): New function.
1574 (s390x_emit_bit_xor): New function.
1575 (s390x_emit_bit_not): New function.
1576 (s390x_emit_equal): New function.
1577 (s390x_emit_less_signed): New function.
1578 (s390x_emit_less_unsigned): New function.
1579 (s390x_emit_ref): New function.
1580 (s390x_emit_if_goto): New function.
1581 (s390x_emit_const): New function.
1582 (s390x_emit_call): New function.
1583 (s390x_emit_reg): New function.
1584 (s390x_emit_pop): New function.
1585 (s390x_emit_stack_flush): New function.
1586 (s390x_emit_zero_ext): New function.
1587 (s390x_emit_swap): New function.
1588 (s390x_emit_stack_adjust): New function.
1589 (s390x_emit_int_call_1): New function.
1590 (s390x_emit_void_call_2): New function.
1591 (s390x_emit_eq_goto): New function.
1592 (s390x_emit_ne_goto): New function.
1593 (s390x_emit_lt_goto): New function.
1594 (s390x_emit_le_goto): New function.
1595 (s390x_emit_gt_goto): New function.
1596 (s390x_emit_ge_goto): New function.
1597 (s390_emit_ops): New function.
1598 (struct linux_target_ops): Fill in emit_ops hook.
1599
abd9baf9
MK
16002016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1601
1602 PR 18377
1603 * Makefile.in: Add s390 IPA files.
1604 * configure.srv: Build IPA for s390.
1605 * linux-s390-ipa.c: New file.
1606 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1607 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1608 (tdesc_s390_linux32): Likewise.
1609 (init_registers_s390_linux32v1): Likewise.
1610 (tdesc_s390_linux32v1): Likewise.
1611 (init_registers_s390_linux32v2): Likewise.
1612 (tdesc_s390_linux32v2): Likewise.
1613 (init_registers_s390_linux64): Likewise.
1614 (tdesc_s390_linux64): Likewise.
1615 (init_registers_s390_linux64v1): Likewise.
1616 (tdesc_s390_linux64v1): Likewise.
1617 (init_registers_s390_linux64v2): Likewise.
1618 (tdesc_s390_linux64v2): Likewise.
1619 (init_registers_s390_te_linux64): Likewise.
1620 (tdesc_s390_te_linux64): Likewise.
1621 (init_registers_s390_vx_linux64): Likewise.
1622 (tdesc_s390_vx_linux64): Likewise.
1623 (init_registers_s390_tevx_linux64): Likewise.
1624 (tdesc_s390_tevx_linux64): Likewise.
1625 (init_registers_s390x_linux64): Likewise.
1626 (tdesc_s390x_linux64): Likewise.
1627 (init_registers_s390x_linux64v1): Likewise.
1628 (tdesc_s390x_linux64v1): Likewise.
1629 (init_registers_s390x_linux64v2): Likewise.
1630 (tdesc_s390x_linux64v2): Likewise.
1631 (init_registers_s390x_te_linux64): Likewise.
1632 (tdesc_s390x_te_linux64): Likewise.
1633 (init_registers_s390x_vx_linux64): Likewise.
1634 (tdesc_s390x_vx_linux64): Likewise.
1635 (init_registers_s390x_tevx_linux64): Likewise.
1636 (tdesc_s390x_tevx_linux64): Likewise.
1637 (have_hwcap_s390_vx): New static variable.
1638 (s390_arch_setup): Fill have_hwcap_s390_vx.
1639 (s390_get_thread_area): New function.
1640 (s390_ft_entry_gpr_esa): New const.
1641 (s390_ft_entry_gpr_zarch): New const.
1642 (s390_ft_entry_misc): New const.
1643 (s390_ft_entry_fr): New const.
1644 (s390_ft_entry_vr): New const.
1645 (s390_ft_main_31): New const.
1646 (s390_ft_main_64): New const.
1647 (s390_ft_exit_fr): New const.
1648 (s390_ft_exit_vr): New const.
1649 (s390_ft_exit_misc): New const.
1650 (s390_ft_exit_gpr_esa): New const.
1651 (s390_ft_exit_gpr_zarch): New const.
1652 (append_insns): New function.
1653 (s390_relocate_instruction): New function.
1654 (s390_install_fast_tracepoint_jump_pad): New function.
1655 (s390_get_min_fast_tracepoint_insn_len): New function.
1656 (s390_get_ipa_tdesc_idx): New function.
1657 (struct linux_target_ops): Wire in the above functions.
1658 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1659 * linux-s390-tdesc.h: New file.
1660
a4105d04
MK
16612016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1662
1663 * linux-s390-low.c (s390_supports_tracepoints): New function.
1664 (struct linux_target_ops): Fill supports_tracepoints hook.
1665
35ac8b3e
YQ
16662016-03-18 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-low.c (lwp_signal_can_be_delivered): New function.
1669 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1670
94610ec4
YQ
16712016-03-18 Yao Qi <yao.qi@linaro.org>
1672
1673 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1674 0 if signal is enqueued. Remove 'signal' from one debugging
1675 message. Move one debugging message to some lines below.
1676 Remove code setting 'signal' to 0.
1677
80aea927
YQ
16782016-03-18 Yao Qi <yao.qi@linaro.org>
1679
1680 * linux-low.c (linux_low_filter_event): Remove redundant
1681 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1682
b04fd3be
MK
16832016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1684
1685 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1686 (struct linux_target_ops): Wire in the above.
1687
c40c8d4b
YQ
16882016-03-03 Yao Qi <yao.qi@linaro.org>
1689
1690 * linux-low.c: Update comments to start_step_over.
1691
0f8288ae
YQ
16922016-03-03 Yao Qi <yao.qi@linaro.org>
1693
1694 PR server/19736
1695 * linux-low.c (handle_extended_wait): Set child suspended
1696 if event_lwp->bp_reinsert isn't zero.
1697
fdbd04a8
YQ
16982016-03-02 Yao Qi <yao.qi@linaro.org>
1699
1700 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1701 enqueue_pending_signal.
1702
6896a8fa
MK
17032016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1704
1705 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1706 is actually loaded.
1707
ab503087
MK
17082016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1709
1710 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1711 (s390_regmap_3264) [!__s390x__]: New global.
1712 (s390_collect_ptrace_register): Skip map entries containing -1.
1713 (s390_supply_ptrace_register): Ditto.
1714 (s390_fill_gprs_high): New function.
1715 (s390_store_gprs_high): New function.
1716 (s390_regsets): Add NT_S390_HIGH_GPRS.
1717 (s390_get_hwcap): Enable on 31-bit.
1718 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1719 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1720 Detect NT_S390_HIGH_GPRS.
1721 (s390_usrregs_info_3264): Enable on 31-bit.
1722 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1723 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1724
ae91f625
MK
17252016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1726
1727 PR gdb/13808
1728 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1729 * configure.srv: Ditto.
1730 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1731 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1732 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1733 (init_registers_amd64_linux): Remove prototype.
1734 (tdesc_amd64_linux): Remove declaration.
1735 (get_ipa_tdesc): New function.
1736 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1737 initialize remaining tdescs.
1738 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1739 (init_registers_i386_linux): Remove prototype.
1740 (tdesc_i386_linux): Remove declaration.
1741 (get_ipa_tdesc): New function.
1742 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1743 initialize remaining tdescs.
1744 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1745 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1746 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1747 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1748 (x86_get_ipa_tdesc_idx): New function.
1749 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1750 * linux-x86-tdesc.h: New file.
1751 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1752 (target_get_ipa_tdesc_idx): New macro.
1753 * tracepoint.c (ipa_tdesc_idx): New macro.
1754 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1755 (symbol_list): Add ipa_tdesc_idx.
1756 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1757 (ipa_tdesc): Remove.
1758 (ipa_tdesc_idx): New variable.
1759 (get_context_regcache): Use get_ipa_tdesc.
1760 (gdb_collect): Ditto.
1761 (gdb_probe): Ditto.
1762 * tracepoint.h (get_ipa_tdesc): New prototype.
1763 (ipa_tdesc): Remove.
1764
e7ad2f14
PA
17652016-02-24 Pedro Alves <palves@redhat.com>
1766
1767 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1768 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1769 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1770 Factor out common code between the USE_SIGTRAP_SIGINFO and
1771 !USE_SIGTRAP_SIGINFO blocks.
1772 (linux_low_filter_event): Call save_stop_reason instead of
1773 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1774 Update comments.
1775 (linux_wait_1): Update comments.
1776
657f9cde
WW
17772016-02-24 Wei-cheng Wang <cole945@gmail.com>
1778
1779 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1780 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1781 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1782 ppc_insert_point, ppc_remove_point.
1783
b00b61e1
MK
17842016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1785
1786 * linux-s390-low.c (s390_supports_z_point_type): New function.
1787 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1788
553cb527
YQ
17892016-02-16 Yao Qi <yao.qi@linaro.org>
1790
1791 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1792 PC. Get pc from regcache_read_pc.
1793
a5652c21
YQ
17942016-02-12 Yao Qi <yao.qi@linaro.org>
1795
1796 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1797 or linux_get_pc_32bit.
1798 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1799
ed443b61
YQ
18002016-02-12 Yao Qi <yao.qi@linaro.org>
1801
1802 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1803 arm_linux_get_next_pcs_fixup.
1804
020ecd38
MK
18052016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1806
1807 * tracepoint.c (x_tracepoint_action_download): Change
1808 write_inferior_data_ptr to write_inferior_data_pointer.
1809 (cmd_qtstart): Likewise.
1810 (write_inferior_data_ptr): Remove.
1811 (download_agent_expr): Change write_inferior_data_ptr to
1812 write_inferior_data_pointer.
1813 (download_tracepoint_1): Likewise.
1814 (download_tracepoint): Likewise.
1815 (download_trace_state_variables): Likewise.
1816
7cae9051
WW
18172016-02-11 Wei-cheng Wang <cole945@gmail.com>
1818 Marcin Kościelnicki <koriakin@0x04.net>
1819
1820 * tracepoint.c (struct tracepoint_action_ops): Remove.
1821 (struct tracepoint_action): Remove ops.
1822 (m_tracepoint_action_download, r_tracepoint_action_download)
1823 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1824 size and offset accordingly.
1825 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1826 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1827 (tracepoint_action_send, tracepoint_action_download): New functions.
1828 Helpers for trace action handlers.
1829 (add_tracepoint_action): Remove setup actions ops.
1830 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1831
9f6a71b4
YQ
18322016-02-10 Yao Qi <yao.qi@linaro.org>
1833
1834 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1835
1e94266c
SM
18362016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1837
1838 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1839 to AC_OUTPUT.
1840 * configure: Regenerate.
1841
8adce034
SM
18422016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1843
1844 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1845 void * to gdb_byte *.
1846 * linux-low.c (siginfo_fixup): Likewise.
1847 (linux_xfer_siginfo): Likewise.
1848 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1849 Likewise.
1850 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1851
93813b37
WT
18522016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1853
1854 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1855 to srv_tgtobj.
1856 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1857 to srv_tgtobj.
1858 * linux-x86-low.c [__x86_64__]: Include
1859 "nat/amd64-linux-siginfo.h".
1860 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1861 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1862 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1863 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1864 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1865 (cpt_si_fd, si_timerid, si_overrun): Move from
1866 nat/amd64-linux-siginfo.c.
1867 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1868
8424cc97
SM
18692016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1870
1871 * server.c (skip_to_semicolon): Remove.
1872 (process_point_options): Use strchrnul instead of
1873 skip_to_semicolon.
1874
4d18591b
YQ
18752016-01-26 Yao Qi <yao.qi@linaro.org>
1876
1877 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1878 * linux-low.c (install_software_single_step_breakpoints): Don't
1879 call regcache_read_pc.
1880 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1881 argument pc.
1882
d8020970
YQ
18832016-01-26 Yao Qi <yao.qi@linaro.org>
1884
1885 * linux-low.c (install_software_single_step_breakpoints): Call
1886 regcache_read_pc instead of get_pc.
1887
8b207339
YQ
18882016-01-26 Yao Qi <yao.qi@linaro.org>
1889
1890 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1891 (unblock_async_io): Rename to ...
1892 (block_unblock_async_io): ... it. New function.
1893 (enable_async_io): Don't install SIGIO handler. Unblock it
1894 instead.
1895 (disable_async_io): Don't ignore SIGIO. Block it instead.
1896 (initialize_async_io): Install SIGIO handler. Don't call
1897 unblock_async_io.
1898
18879fef
YQ
18992016-01-26 Yao Qi <yao.qi@linaro.org>
1900
1901 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1902 first character is '\003', call *the_target->request_interrupt.
1903
a0f8e08a
YQ
19042016-01-25 Yao Qi <yao.qi@linaro.org>
1905
1906 * remote-utils.c (new_thread_notify): Remove.
1907 (dead_thread_notify): Likewise.
1908 * remote-utils.h (new_thread_notify): Remove declaration.
1909 (dead_thread_notify): Likewise.
1910
cc5fd9ab
MK
19112016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1912
1913 * gdb.trace/pending.exp: Fix expected message on continue.
1914
99e8eb11
MK
19152016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1916
1917 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1918 it works properly on big-endian machines where sizeof (CORE_ADDR)
1919 != sizeof (void *).
1920
a994041d
PA
19212016-01-21 Pedro Alves <palves@redhat.com>
1922
1923 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1924 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1925 * configure: Regenerate.
1926
f7a6a40d
YQ
19272016-01-21 Yao Qi <yao.qi@linaro.org>
1928
1929 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1930 is_thumb and set it according to CPSR saved on the stack.
1931 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1932 arm_sigreturn_next_pc.
1933
6f69e520
YQ
19342016-01-18 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-low.c (linux_set_pc_64bit): New function.
1937 (linux_get_pc_64bit): New function.
1938 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1939 Declare.
1940 * linux-sparc-low.c (debug_threads): Remove declaration.
1941 (sparc_get_pc): Remove.
1942 (the_low_target): Use linux_get_pc_64bit instead of
1943 sparc_get_pc.
1944 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1945 (the_low_target): Use linux_get_pc_64bit and
1946 linux_set_pc_64bit.
1947
276d4552
YQ
19482016-01-18 Yao Qi <yao.qi@linaro.org>
1949
1950 * linux-arm-low.c (debug_threads): Remove declaration.
1951 (arm_get_pc, arm_set_pc): Remove.
1952 (the_low_target): Use linux_get_pc_32bit and
1953 linux_set_pc_32bit.
1954 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1955 (the_low_target): Use linux_get_pc_32bit and
1956 linux_set_pc_32bit.
1957 * linux-cris-low.c (debug_threads): Remove declaration.
1958 (cris_get_pc, cris_set_pc,): Remove.
1959 (the_low_target): Use linux_get_pc_32bit and
1960 linux_set_pc_32bit.
1961 * linux-crisv32-low.c (debug_threads): Remove declaration.
1962 (cris_get_pc, cris_set_pc): Remove.
1963 (the_low_target): Use linux_get_pc_32bit and
1964 linux_set_pc_32bit.
1965 * linux-low.c: Include inttypes.h.
1966 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1967 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1968 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1969 (the_low_target): Use linux_get_pc_32bit and
1970 linux_set_pc_32bit.
1971 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1972 (the_low_target): Use linux_get_pc_32bit and
1973 linux_set_pc_32bit.
1974 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1975 (the_low_target): Use linux_get_pc_32bit and
1976 linux_set_pc_32bit.
1977 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1978 (the_low_target): Use linux_get_pc_32bit and
1979 linux_set_pc_32bit.
1980 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1981 (the_low_target): Use linux_get_pc_32bit and
1982 linux_set_pc_32bit.
1983
eb0edac8
GB
19842016-01-18 Gary Benson <gbenson@redhat.com>
1985
1986 * configure.ac (AC_FUNC_FORK): New check.
1987 * config.in: Regenerate.
1988 * configure: Likewise.
1989
1b451dda
YQ
19902016-01-14 Yao Qi <yao.qi@linaro.org>
1991
1992 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1993 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1994 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1995 arm_get_next_pcs_ctor.
1996
82075af2
JS
19972016-01-12 Josh Stone <jistone@redhat.com>
1998 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1999
2000 * inferiors.h: Include "gdb_vecs.h".
2001 (struct process_info): Add syscalls_to_catch.
2002 * inferiors.c (remove_process): Free syscalls_to_catch.
2003 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2004 syscall_return stops.
2005 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2006 * server.c (handle_general_set): Handle QCatchSyscalls.
2007 (handle_query): Report support for QCatchSyscalls.
2008 * target.h (struct target_ops): Add supports_catch_syscall.
2009 (target_supports_catch_syscall): New macro.
2010 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2011 (struct lwp_info): Add syscall_state.
2012 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2013 Maintain syscall_state and syscalls_to_catch across exec.
2014 (get_syscall_trapinfo): New function, proxy to the_low_target.
2015 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2016 (linux_low_filter_event): Toggle syscall_state entry/return for
2017 syscall traps, and set it ignored for all others.
2018 (gdb_catching_syscalls_p): New function.
2019 (gdb_catch_this_syscall_p): New function.
2020 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2021 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2022 (linux_supports_catch_syscall): New function.
2023 (linux_target_ops): Install it.
2024 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2025 (the_low_target): Install it.
2026
8f13a3ce
MF
20272016-01-12 Mike Frysinger <vapier@gentoo.org>
2028
2029 * acinclude.m4: Include new ../warning.m4 file.
2030 * configure: Regenerated.
2031 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2032
5b3da067
MF
20332016-01-12 Mike Frysinger <vapier@gentoo.org>
2034
2035 * ax.c (is_goto_target): Mark static.
2036 * linux-low.c (register_addr): Likewise.
2037 (linux_fetch_registers, linux_store_registers): Likewise.
2038 * mem-break.c (any_persistent_commands): Fix old prototype.
2039 (add_commands_to_breakpoint): Mark static.
2040 * regcache.c (find_register_by_name): Delete unused func.
2041 * remote-utils.c (hex_or_minus_one): Mark static.
2042 * server.c (monitor_show_help): Mark static.
2043 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2044 handle_v_requests): Likewise.
2045
bc504a31
PA
20462016-01-12 Pedro Alves <palves@redhat.com>
2047
2048 Remove use of the registered trademark symbol throughout.
2049
5a0dd67a
YQ
20502016-01-08 Yao Qi <yao.qi@linaro.org>
2051
2052 * remote-utils.c (getpkt): If c is '\003', call target hook
2053 request_interrupt.
2054
b2ca446f
YQ
20552016-01-06 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2058 linux-aarch32-low.c.
2059 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2060 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2061 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2062 (thumb2_breakpoint): Declare.
2063 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2064 linux-aarch32-low.h.
2065 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2066 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2067 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2068
edd88788
JB
20692016-01-01 Joel Brobecker <brobecker@adacore.com>
2070
2071 * gdbreplay.c (gdbreplay_version): Change copyright year in
2072 version message.
2073 * server.c (gdbserver_version): Likewise.
2074
65da7f14
PP
20752015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2076
2077 * server.c (crc32_table): Delete.
2078 (crc32): Use libiberty's xcrc32 function.
2079
4abd5ed2
JB
20802015-12-22 Joel Brobecker <brobecker@adacore.com>
2081
2082 * lynx-low.c (lynx_delete_thread_callback): New function.
2083 (lynx_mourn): Properly delete our process and all of its
2084 threads. Remove call to clear_inferiors.
2085
0e50fe5c
JB
20862015-12-22 Joel Brobecker <brobecker@adacore.com>
2087
2088 * target.c (thread_search_callback): Add check that
2089 the thread_stopped target callback is not NULL before
2090 calling it.
2091
35adc03f
YQ
20922015-12-21 Yao Qi <yao.qi@linaro.org>
2093
2094 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2095 arm breakpoint.
2096
bd2b2909
AT
20972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2098
2099 * server.c (handle_query): Call target_supports_software_single_step.
2100
7fe5e27e
AT
21012015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2102
2103 * linux-low.c (single_step): New function.
2104 (linux_resume_one_lwp_throw): Call single_step.
2105 (start_step_over): Likewise.
2106
d9311bfa
AT
21072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2108
2109 * Makefile.in (SFILES): Append arch/arm-linux.c,
2110 arch/arm-get-next-pcs.c.
2111 (arm-linux.o): New rule.
2112 (arm-get-next-pcs.o): New rule.
2113 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2114 arm-linux.o.
2115 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2116 to linux-aarch32-low.c.
2117 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2118 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2119 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2120 (thumb2_breakpoint_len): Likewise.
2121 (arm_is_thumb_mode): Make non-static.
2122 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2123 from linux-aarch32-low.c.
2124 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2125 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2126 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2127 (thumb2_breakpoint_len): Likewise.
2128 (arm_is_thumb_mode): New declaration.
2129 * linux-arm-low.c: Include arch/arm-linux.h
2130 aarch/arm-get-next-pcs.h, sys/syscall.h.
2131 (get_next_pcs_ops): New struct.
2132 (get_next_pcs_addr_bits_remove): New function.
2133 (get_next_pcs_is_thumb): New function.
2134 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2135 (arm_sigreturn_next_pc): Likewise.
2136 (get_next_pcs_syscall_next_pc): Likewise.
2137 (arm_gdbserver_get_next_pcs): Likewise.
2138 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2139 Initialize.
2140 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2141 * server.h: Include gdb_vecs.h.
2142
68ce2059
AT
21432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2144
2145 * Makefile.in (SFILES): Append common/common-regcache.c.
2146 (OBS): Append common-regcache.o.
2147 (common-regcache.o): New rule.
2148 * regcache.c (init_register_cache): Initialize cache to
2149 REG_UNAVAILABLE.
2150 (regcache_raw_read_unsigned): New function.
2151 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2152 register_status enum.
2153
fa5308bd
AT
21542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2155
2156 * linux-aarch64-low.c (the_low_targets): Rename
2157 breakpoint_reinsert_addr to get_next_pcs.
2158 * linux-arm-low.c (the_low_targets): Likewise.
2159 * linux-bfin-low.c (the_low_targets): Likewise.
2160 * linux-cris-low.c (the_low_targets): Likewise.
2161 * linux-crisv32-low.c (the_low_targets): Likewise.
2162 * linux-low.c (can_software_single_step): Likewise.
2163 (install_software_single_step_breakpoints): New function.
2164 (start_step_over): Use install_software_single_step_breakpoints.
2165 * linux-low.h: New CORE_ADDR vector.
2166 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2167 get_next_pcs.
2168 * linux-mips-low.c (the_low_targets): Likewise.
2169 * linux-nios2-low.c (the_low_targets): Likewise.
2170 * linux-sparc-low.c (the_low_targets): Likewise.
2171
4a6ed09b
PA
21722015-12-17 Pedro Alves <palves@redhat.com>
2173
2174 * linux-low.c (linux_kill_one_lwp): Remove references to
2175 LinuxThreads.
2176 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2177 to 'kill'.
2178 (linux_init_signals): Delete.
2179 (initialize_low): Adjust.
2180 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2181
7544db95
PA
21822015-12-16 Pedro Alves <palves@redhat.com>
2183
2184 * configure.ac (compiler warning flags): When testing a
2185 -Wno-foo option, check whether -Wfoo works instead.
2186 * configure: Regenerate.
2187
8020350c
DB
21882015-12-11 Don Breazeal <donb@codesourcery.com>
2189
2190 * server.c (process_serial_event): Don't exit from gdbserver
2191 in remote mode if there are still active inferiors.
2192
db91f502
YQ
21932015-12-11 Yao Qi <yao.qi@linaro.org>
2194
2195 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2196 arm_breakpoint_at if the process is 32-bit.
2197
b37a6290
YQ
21982015-12-11 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2201 arm breakpoint.
2202
17b1509a
YQ
22032015-12-07 Yao Qi <yao.qi@linaro.org>
2204
2205 * configure.srv: Append arm.o to srv_tgtobj for
2206 aarch64*-*-linux* target.
2207 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2208 from linux-arm-low.c.
2209 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2210 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2211 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2212 (thumb2_breakpoint_len): Likewise.
2213 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2214 (arm_breakpoint_kinds): Likewise.
2215 (arm_breakpoint_kind_from_pc): Likewise.
2216 (arm_sw_breakpoint_from_kind): Likewise.
2217 (arm_breakpoint_kind_from_current_state): Likewise.
2218 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2219 (arm_sw_breakpoint_from_kind): Declare.
2220 (arm_breakpoint_kind_from_current_state): Declare.
2221 (arm_breakpoint_at): Declare.
2222 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2223 arm_sw_breakpoint_from_kind if process is 32-bit.
2224 (aarch64_breakpoint_kind_from_pc): New function.
2225 (aarch64_breakpoint_kind_from_current_state): New function.
2226 (the_low_target): Initialize fields breakpoint_kind_from_pc
2227 and breakpoint_kind_from_current_state.
2228 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2229 linux-aarch32-low.c.
2230 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2231 (arm_breakpoint, arm_breakpoint_len): Likewise.
2232 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2233 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2234 (arm_is_thumb_mode): Likewise.
2235 (arm_breakpoint_at): Likewise.
2236 (arm_breakpoint_kind_from_pc): Likewise.
2237 (arm_sw_breakpoint_from_kind): Likewise.
2238 (arm_breakpoint_kind_from_current_state): Likewise.
2239
2240 Revert:
2241 2015-08-04 Yao Qi <yao.qi@linaro.org>
2242
2243 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2244 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2245 * server.c (extended_protocol): Remove "static".
2246 * server.h (extended_protocol): Declare it.
2247
ece66d65
JS
22482015-12-04 Josh Stone <jistone@redhat.com>
2249
2250 * target.h (struct target_ops) <arch_setup>: Rename to ...
2251 (struct target_ops) <post_create_inferior>: ... this.
2252 (target_arch_setup): Rename to ...
2253 (target_post_create_inferior): ... this, calling post_create_inferior.
2254 * server.c (start_inferior): Update target_arch_setup calls to
2255 target_post_create_inferior.
2256 * linux-low.c (linux_low_ptrace_options): Forward declare.
2257 (linux_arch_setup): Update its comment for general use.
2258 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2259 (struct linux_target_ops): Use linux_post_create_inferior.
2260 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2261 to post_create_inferior.
2262 * nto-low.c (struct nto_target_ops): Likewise.
2263 * spu-low.c (struct spu_target_ops): Likewise.
2264 * win32-low.c (struct win32_target_ops): Likewise.
2265
e58c48b4
AT
22662015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2267
2268 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2269
fbec8956
AT
22702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2271
2272 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2273 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2274 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2275 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2276 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2277 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2278 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2279 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2280 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2281 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2282 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2283 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2284
9b4c5f87
AT
22852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2286
2287 * linux-low.c (linux_look_up_symbols): Don't call
2288 linux_supports_traceclone.
2289 * linux-low.h (thread_db_init): Remove use_events argument.
2290 * thread-db.c (thread_db_use_event): Remove global variable.
2291 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2292 (struct thread_db) <td_create_bp>: Remove field.
2293 (thread_db_create_event): Remove function.
2294 (thread_db_enable_reporting): Likewise.
2295 (find_one_thread): Don't check for thread_db_use_events.
2296 (attach_thread): Likewise.
2297 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2298 (try_thread_db_load_1): Don't check for thread_db_use_events.
2299 (thread_db_init): Remove use_events argument and thread events
2300 handling.
2301 (remove_thread_event_breakpoints): Remove function.
2302 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2303
7d00775e
AT
23042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2305
2306 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2307 New function.
2308 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2309 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2310 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2311 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2312 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2313 Initialize.
2314 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2315 New function.
2316 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2317 * linux-low.c (can_hardware_single_step): Use
2318 supports_hardware_single_step.
2319 (can_software_single_step): New function.
2320 (start_step_over): Call can_software_single_step.
2321 (linux_supports_hardware_single_step): New function.
2322 (struct target_ops) <supports_software_single_step>: Initialize.
2323 * linux-low.h (struct linux_target_ops)
2324 <supports_hardware_single_step>: Initialize.
2325 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2326 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2327 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2328 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2329 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2330 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2331 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2332 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2333 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2334 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2335 Initialize.
2336 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2337 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2338 Initialize.
2339 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2340 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2341 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2342 New function.
2343 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2344 * target.h (struct target_ops): <supports_software_single_step>:
2345 New field.
2346 (target_supports_software_single_step): New macro.
2347
2d97cd35
AT
23482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2349
2350 * linux-low.c (linux_wait_1): Fix pc advance condition.
2351 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2352 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2353
769ef81f
AT
23542015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2355
2356 * linux-arm-low.c (arm_is_thumb_mode): New function.
2357 (arm_breakpoint_at): Use arm_is_thumb_mode.
2358 (arm_breakpoint_kind_from_current_state): New function.
2359 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2360 Initialize.
2361 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2362 (linux_breakpoint_kind_from_current_state): New function.
2363 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2364 * linux-low.h (struct linux_target_ops)
2365 <breakpoint_kind_from_current_state>: New field.
2366 * target.h (struct target_ops): Likewise.
2367 (target_breakpoint_kind_from_current_state): New macro.
2368
1bebeeca
PA
23692015-11-30 Pedro Alves <palves@redhat.com>
2370
2371 * linux-low.c (linux_resume): Wake up the event loop before
2372 returning.
2373
a67a9fae
PA
23742015-11-30 Pedro Alves <palves@redhat.com>
2375
2376 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2377 check.
2378 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2379 to -1.
2380 * target.c (struct thread_search): New structure.
2381 (thread_search_callback): New function.
2382 (prev_general_thread): New global.
2383 (prepare_to_access_memory, done_accessing_memory): New functions.
2384 * target.h (prepare_to_access_memory, done_accessing_memory):
2385 Replace macros with function declarations.
2386
f2faf941
PA
23872015-11-30 Pedro Alves <palves@redhat.com>
2388
2389 PR 14618
2390 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2391 report TARGET_WAITKIND_NO_RESUMED.
2392 * remote-utils.c (prepare_resume_reply): Handle
2393 TARGET_WAITKIND_NO_RESUMED.
2394 * server.c (report_no_resumed): New global.
2395 (handle_query) <qSupported>: Handle "no-resumed+". Report
2396 "no-resumed+" support.
2397 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2398 return error if the client doesn't support no-resumed events.
2399 (push_stop_notification): New function.
2400 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2401 events if the client supports them.
2402
a681f9c9
PA
24032015-11-30 Pedro Alves <palves@redhat.com>
2404
2405 * linux-low.c (thread_still_has_status_pending_p): Don't check
2406 vCont;t here.
2407 (lwp_resumed): New function.
2408 (status_pending_p_callback): Return early if the LWP is not
2409 supposed to be resumed.
2410
65706a29
PA
24112015-11-30 Pedro Alves <palves@redhat.com>
2412
2413 * linux-low.c (handle_extended_wait): Assert that the LWP's
2414 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2415 thread create events, leave the new child's status pending.
2416 (linux_low_filter_event): If GDB wants to hear about thread exit
2417 events, leave the LWP marked dead and don't delete it.
2418 (linux_wait_for_event_filtered): Don't check for thread exit.
2419 (filter_exit_event): New function.
2420 (linux_wait_1): Use it, when returning an exit event.
2421 (linux_resume_one_lwp_throw): Assert that the LWP's
2422 waitstatus is TARGET_WAITKIND_IGNORE.
2423 * remote-utils.c (prepare_resume_reply): Handle
2424 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2425 * server.c (report_thread_events): New global.
2426 (handle_general_set): Handle QThreadEvents.
2427 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2428 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2429 TARGET_WAITKIND_THREAD_EXITED.
2430 * server.h (report_thread_events): Declare.
2431
56cf4bed
PA
24322015-11-30 Pedro Alves <palves@redhat.com>
2433
2434 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2435 the thread's last_resume_kind was resume_stop.
2436
500c1d85
PA
24372015-11-30 Pedro Alves <palves@redhat.com>
2438
2439 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2440 before returning.
2441
de979965
PA
24422015-11-30 Pedro Alves <palves@redhat.com>
2443
2444 * server.c (handle_v_requests): Handle vCtrlC.
2445
34c65914
PA
24462015-11-30 Pedro Alves <palves@redhat.com>
2447
2448 * gdbthread.h (find_any_thread_of_pid): Declare.
2449 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2450 functions.
2451 * server.c (handle_query): If current_thread is NULL, look for
2452 another thread of the selected process.
2453
79efa585 24542015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2455 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2456
2457 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2458 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2459 name in reply.
2460 * target.h (struct target_ops) <thread_name>: New field.
2461 (target_thread_name): New macro.
2462
80d82c19
JB
24632015-11-23 Joel Brobecker <brobecker@adacore.com>
2464
2465 * regcache.h (regcache_invalidate_pid): Add declaration.
2466 * regcache.c (regcache_invalidate_pid): New function, extracted
2467 from regcache_invalidate.
2468 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2469 Add trivial documentation comment.
2470 * lynx-low.c: Use regcache_invalidate_pid instead of
2471 regcache_invalidate.
2472
64da5dd5
JB
24732015-11-23 Joel Brobecker <brobecker@adacore.com>
2474
2475 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2476 and Elf64_auxv_t if the target is Android.
2477
37ce4055
DE
24782015-11-22 Doug Evans <xdje42@gmail.com>
2479
2480 * target.h: #include <sys/types.h>.
2481
06e03fff
PA
24822015-11-19 Pedro Alves <palves@redhat.com>
2483
2484 * linux-low.c (linux_process_qsupported): Change prototype.
2485 Adjust.
2486 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2487 Change prototype.
2488 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2489 and adjust to loop over all features.
2490 * server.c (handle_query) <qSupported>: Adjust to call
2491 target_process_qsupported once, passing it a vector of unprocessed
2492 features.
2493 * target.h (struct target_ops) <process_qsupported>: Change
2494 prototype.
2495 (target_process_qsupported): Adjust.
2496
9a084706
PA
24972015-11-19 Pedro Alves <palves@redhat.com>
2498
2499 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2500 mode.
2501 * configure: Regenerate.
2502
dad44a1f
PA
25032015-11-19 Pedro Alves <palves@redhat.com>
2504
2505 * configure: Regenerate.
2506
231c0592
YQ
25072015-11-19 Yao Qi <yao.qi@linaro.org>
2508
2509 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2510 type to uint32_t.
2511
6c1c9a8b
YQ
25122015-11-19 Yao Qi <yao.qi@linaro.org>
2513
2514 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2515 (struct aarch64_operand): Move enum out.
2516
9caa3311
YQ
25172015-11-19 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2520 struct user_fpsimd_state *.
2521 (aarch64_store_fpregset): Likewise.
2522
6a69a054
YQ
25232015-11-19 Yao Qi <yao.qi@linaro.org>
2524
2525 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2526 struct user_pt_regs *.
2527 (aarch64_store_gregset): Likewise.
2528
1798301e
PA
25292015-11-18 Pedro Alves <palves@redhat.com>
2530
2531 * Makefile.in (all_object_files): Add $IPA_OBJS.
2532
ce7715e2
PA
25332015-11-17 Pedro Alves <palves@redhat.com>
2534
2535 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2536 GDB_SIGNAL_0 and gdb_signal_to_string.
2537
c0879059
PA
25382015-11-17 Pedro Alves <palves@redhat.com>
2539
2540 * win32-low.c (handle_output_debug_string): Remove parameter.
2541 (win32_kill): Remove our_status local and adjust call to
2542 handle_output_debug_string.
2543 (get_child_debug_event): Adjust call to
2544 handle_output_debug_string.
2545
1996e237
SM
25462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2547
2548 * linux-mips-low.c (mips_fill_gregset): Add cast.
2549 (mips_store_gregset): Likewise.
2550 (mips_fill_fpregset): Likewise.
2551 (mips_store_fpregset): Likewise.
2552
cbec665b
SM
25532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2554
2555 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2556 priv.
2557
eb3e3c67
SM
25582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2559
2560 * linux-mips-low.c (mips_linux_new_thread): Change type of
2561 watch_type to enum target_hw_bp_type.
2562
171de4b8
SM
25632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2564
2565 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2566 Change return type to arm_hwbp_type.
2567
04248ead
SM
25682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2569
2570 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2571 (arm_store_gregset): Likewise.
2572 * linux-arm-low.c (arm_get_hwcap): Likewise.
2573 (arm_read_description): Likewise.
2574
04b3479c
SM
25752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2576
2577 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2578
2bc84e8a
SM
25792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2580
2581 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2582 (ppc_fill_vsxregset): Likewise.
2583 (ppc_store_vsxregset): Likewise.
2584 (ppc_fill_vrregset): Likewise.
2585 (ppc_store_vrregset): Likewise.
2586 (ppc_fill_evrregset): Likewise.
2587 (ppc_store_evrregset): Likewise.
2588
e6c5bb05
SM
25892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2590
2591 * linux-ppc-low.c (ppc_usrregs_info): Remove
2592 forward-declaration.
2593 (ppc_arch_setup): Move lower in file.
2594
7ea45d72
SM
25952015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2596
2597 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2598 (ps_pdwrite): Likewise.
2599
69291610
HW
26002015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2601
2602 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2603 to after assert checks.
2604
b42945fd
SM
26052015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2606
2607 * proc-service.c (ps_pdread): Add/adjust casts.
2608 (ps_pdwrite): Add/adjust casts.
2609
d6f85c84
SM
26102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2611
2612 * server.c (handle_search_memory_1): Cast return value of
2613 memmem.
2614
f98cd059
SM
26152015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2616
2617 * server.c (write_qxfer_response): Change type of data to
2618 gdb_byte *.
2619
d2412fa5
PA
26202015-10-29 Pedro Alves <palves@redhat.com>
2621
2622 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2623
c17414a2
PA
26242015-10-29 Pedro Alves <palves@redhat.com>
2625
2626 * tracepoint.c (clear_installed_tracepoints): Add casts.
2627
e053fbc4
PA
26282015-10-29 Pedro Alves <palves@redhat.com>
2629
2630 * server.c (handle_v_cont, process_serial_event): Add enum
2631 gdb_signal casts to signal parsing code.
2632
add67df8
PA
26332015-10-29 Pedro Alves <palves@redhat.com>
2634
2635 * linux-low.h (NULL_REGSET): Define.
2636 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2637 * linux-arm-low.c (arm_regsets): Likewise.
2638 * linux-crisv32-low.c (cris_regsets): Likewise.
2639 * linux-m68k-low.c (m68k_regsets): Likewise.
2640 * linux-mips-low.c (mips_regsets): Likewise.
2641 * linux-nios2-low.c (nios2_regsets): Likewise.
2642 * linux-ppc-low.c (ppc_regsets): Likewise.
2643 * linux-s390-low.c (s390_regsets): Likewise.
2644 * linux-sh-low.c (sh_regsets): Likewise.
2645 * linux-sparc-low.c (sparc_regsets): Likewise.
2646 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2647 * linux-tile-low.c (tile_regsets): Likewise.
2648 * linux-x86-low.c (x86_regsets): Likewise.
2649 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2650
50bc912a
PA
26512015-10-29 Pedro Alves <palves@redhat.com>
2652
2653 * linux-low.h (NULL_REGSET): Define.
2654 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2655 * linux-arm-low.c (arm_regsets): Likewise.
2656 * linux-crisv32-low.c (cris_regsets): Likewise.
2657 * linux-m68k-low.c (m68k_regsets): Likewise.
2658 * linux-mips-low.c (mips_regsets): Likewise.
2659 * linux-nios2-low.c (nios2_regsets): Likewise.
2660 * linux-ppc-low.c (ppc_regsets): Likewise.
2661 * linux-s390-low.c (s390_regsets): Likewise.
2662 * linux-sh-low.c (sh_regsets): Likewise.
2663 * linux-sparc-low.c (sparc_regsets): Likewise.
2664 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2665 * linux-tile-low.c (tile_regsets): Likewise.
2666 * linux-x86-low.c (x86_regsets): Likewise.
2667 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2668
682b2546
DE
26692015-10-26 Doug Evans <dje@google.com>
2670
2671 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2672
963843d4
DE
26732015-10-26 Doug Evans <dje@google.com>
2674
2675 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2676
d41401ac
DE
26772015-10-26 Doug Evans <dje@google.com>
2678
2679 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2680 for debug_printf.
2681 (attach_thread, find_new_threads_callback): Ditto.
2682
3db28855
AT
26832015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2684
2685 * mem-break.h (set_breakpoint_data): Remove.
2686
fb78e89c
AT
26872015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2688
2689 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2690 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2691 (initialize_low): Remove set_breakpoint_data call.
2692 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2693 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2694 (initialize_low): Remove set_breakpoint_data call.
2695 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2696 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2697 (initialize_low): Remove set_breakpoint_data call.
2698
2e6ee069
AT
26992015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2700
2701 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2702 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2703 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2704 * target.h (target_breakpoint_kind_from_pc): New macro.
2705
1652a986
AT
27062015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2707
2708 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2709 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2710 the default breakpoint kind.
2711
abeead09
AT
27122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2713
2714 * linux-arm-low.c (arm_supports_z_point_type): Add software
2715 breakpoint support.
2716
b0b4b501
AT
27172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2718
2719 * linux-arm-low.c: Refactor breakpoint definitions.
2720 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2721 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2722
8689682c
AT
27232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2724
2725 * Makefile.in: Add arm.c/o.
2726 * configure.srv: Likewise.
2727 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2728 (arm_breakpoint_kind_from_pc): New function.
2729 (arm_sw_breakpoint_from_kind): Return proper kind.
2730 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2731
27165294
AT
27322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2733
2734 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2735 removal.
2736 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2737 (struct raw_breakpoint) <size>: Remove.
2738 (struct raw_breakpoint) <kind>: Add.
2739 (bp_size): New function.
2740 (bp_opcode): Likewise.
2741 (find_raw_breakpoint_at): Adjust for kind.
2742 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2743 (remove_memory_breakpoint): Adjust for kind call bp_size.
2744 (set_raw_breakpoint_at): Adjust for kind.
2745 (set_breakpoint): Likewise.
2746 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2747 (delete_raw_breakpoint): Adjust for kind.
2748 (delete_breakpoint): Likewise.
2749 (find_gdb_breakpoint): Likewise.
2750 (set_gdb_breakpoint_1): Likewise.
2751 (set_gdb_breakpoint): Likewise.
2752 (delete_gdb_breakpoint_1): Likewise.
2753 (delete_gdb_breakpoint): Likewise.
2754 (uninsert_raw_breakpoint): Likewise.
2755 (reinsert_raw_breakpoint): Likewise.
2756 (set_breakpoint_data): Remove.
2757 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2758 (check_mem_read): Adjust for kind call bp_size.
2759 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2760 (clone_one_breakpoint): Adjust for kind.
2761 * mem-break.h (set_gdb_breakpoint): Likewise.
2762 (delete_gdb_breakpoint): Likewise.
2763 * server.c (process_serial_event): Likewise.
2764
dd373349
AT
27652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2766
2767 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2768 (struct linux_target_ops) <breakpoint>: Remove.
2769 (struct linux_target_ops) <breakpoint_len>: Remove.
2770 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2771 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2772 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2773 (arm_sw_breakpoint_from_kind): New function.
2774 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2775 (struct linux_target_ops) <breakpoint>: Remove.
2776 (struct linux_target_ops) <breakpoint_len>: Remove.
2777 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2778 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2779 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2780 (struct linux_target_ops) <breakpoint>: Remove.
2781 (struct linux_target_ops) <breakpoint_len>: Remove.
2782 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2783 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2784 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2785 (struct linux_target_ops) <breakpoint>: Remove.
2786 (struct linux_target_ops) <breakpoint_len>: Remove.
2787 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2788 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2789 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2790 and sw_breakpoint_from_kind to increment the pc.
2791 (linux_breakpoint_kind_from_pc): New function.
2792 (linux_sw_breakpoint_from_kind): New function.
2793 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2794 (initialize_low): Call breakpoint_kind_from_pc and
2795 sw_breakpoint_from_kind to replace breakpoint_data/len.
2796 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2797 New field.
2798 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2799 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2800 (struct linux_target_ops) <breakpoint>: Remove.
2801 (struct linux_target_ops) <breakpoint_len>: Remove.
2802 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2803 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2804 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2805 (struct linux_target_ops) <breakpoint>: Remove.
2806 (struct linux_target_ops) <breakpoint_len>: Remove.
2807 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2808 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2809 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2810 (struct linux_target_ops) <breakpoint>: Remove.
2811 (struct linux_target_ops) <breakpoint_len>: Remove.
2812 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2813 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2814 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2815 (struct linux_target_ops) <breakpoint>: Remove.
2816 (struct linux_target_ops) <breakpoint_len>: Remove.
2817 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2818 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2819 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2820 (struct linux_target_ops) <breakpoint>: Remove.
2821 (struct linux_target_ops) <breakpoint_len>: Remove.
2822 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2823 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2824 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2825 (struct linux_target_ops) <breakpoint>: Remove.
2826 (struct linux_target_ops) <breakpoint_len>: Remove.
2827 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2828 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2829 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2830 (struct linux_target_ops) <breakpoint>: Remove.
2831 (struct linux_target_ops) <breakpoint_len>: Remove.
2832 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2833 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2834 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2835 (struct linux_target_ops) <breakpoint>: Remove.
2836 (struct linux_target_ops) <breakpoint_len>: Remove.
2837 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2838 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2839 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2840 (struct linux_target_ops) <breakpoint>: Remove.
2841 (struct linux_target_ops) <breakpoint_len>: Remove.
2842 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2843 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2844 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2845 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2846 (struct linux_target_ops) <breakpoint>: Remove.
2847 (struct linux_target_ops) <breakpoint_len>: Remove.
2848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2850 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2851 (struct linux_target_ops) <breakpoint>: Remove.
2852 (struct linux_target_ops) <breakpoint_len>: Remove.
2853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2855
4cd98a19
AT
28562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2857
2858 * linux-cris-low.c (cris_get_pc): Remove void arg.
2859
774ee6d2
AR
28602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2861
2862 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2863 variable name.
2864
833dcd29
AR
28652015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2866
2867 * inferiors.c (thread_pid_matches_callback): New function.
2868 (find_thread_process): New function.
2869 (remove_thread): Reset current_thread.
2870 (remove_process): Assert threads have been removed first.
2871
8d689ee5
YQ
28722015-10-15 Yao Qi <yao.qi@linaro.org>
2873
2874 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2875 if it is 3.
2876 (aarch64_remove_point): Likewise.
2877 * regcache.c (regcache_register_size): New function.
2878
1c2e1515
YQ
28792015-10-12 Yao Qi <yao.qi@linaro.org>
2880
2881 * linux-aarch64-low.c: Update all callers as emit_load_store
2882 is renamed to aarch64_emit_load_store.
2883
e1c587c3
YQ
28842015-10-12 Yao Qi <yao.qi@linaro.org>
2885
2886 * linux-aarch64-low.c: Update all callers of function renaming
2887 from emit_insn to aarch64_emit_insn.
2888
b6542f81
YQ
28892015-10-12 Yao Qi <yao.qi@linaro.org>
2890
2891 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2892 arch/aarch64-insn.h.
2893 (struct aarch64_memory_operand): Likewise.
2894 (ENCODE): Likewise.
2895 (emit_insn): Move to arch/aarch64-insn.c.
2896 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2897 (emit_load_store): Move to arch/aarch64-insn.c.
2898 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2899 (can_encode_int32): Remove.
2900
246994ce
YQ
29012015-10-12 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2904 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2905 (aarch64_relocate_instruction): Likewise.
2906 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2907 (struct aarch64_insn_visitor): Likewise.
2908
0badd99f
YQ
29092015-10-12 Yao Qi <yao.qi@linaro.org>
2910
2911 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2912 (struct aarch64_insn_visitor): New.
2913 (struct aarch64_insn_relocation_data): New.
2914 (aarch64_ftrace_insn_reloc_b): New function.
2915 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2916 (aarch64_ftrace_insn_reloc_cb): Likewise.
2917 (aarch64_ftrace_insn_reloc_tb): Likewise.
2918 (aarch64_ftrace_insn_reloc_adr): Likewise.
2919 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2920 (aarch64_ftrace_insn_reloc_others): Likewise.
2921 (visitor): New.
2922 (aarch64_relocate_instruction): Use visitor.
2923
dfaffe9d
YQ
29242015-10-12 Yao Qi <yao.qi@linaro.org>
2925
2926 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2927 int. Add argument buf.
2928 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2929 aarch64_relocate_instruction.
2930
70b439f0
YQ
29312015-10-12 Yao Qi <yao.qi@linaro.org>
2932
2933 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2934 argument insn. Remove local variable insn. Don't call
2935 target_read_uint32.
2936 (aarch64_install_fast_tracepoint_jump_pad): Call
2937 target_read_uint32.
2938
7781c06f
YQ
29392015-09-30 Yao Qi <yao.qi@linaro.org>
2940
2941 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2942 (emit_load_store_pair): Likewise.
2943
9a3c8263
SM
29442015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2945
2946 * dll.c (match_dll): Add cast(s).
2947 (unloaded_dll): Likewise.
2948 * linux-low.c (second_thread_of_pid_p): Likewise.
2949 (delete_lwp_callback): Likewise.
2950 (count_events_callback): Likewise.
2951 (select_event_lwp_callback): Likewise.
2952 (linux_set_resume_request): Likewise.
2953 * server.c (accumulate_file_name_length): Likewise.
2954 (emit_dll_description): Likewise.
2955 (handle_qxfer_threads_worker): Likewise.
2956 (visit_actioned_threads): Likewise.
2957 * thread-db.c (any_thread_of): Likewise.
2958 * tracepoint.c (same_process_p): Likewise.
2959 (match_blocktype): Likewise.
2960 (build_traceframe_info_xml): Likewise.
2961
224c3ddb
SM
29622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2963
2964 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2965 assignment.
2966 (gdb_unparse_agent_expr): Likewise.
2967 * hostio.c (require_data): Likewise.
2968 (handle_pread): Likewise.
2969 * linux-low.c (disable_regset): Likewise.
2970 (fetch_register): Likewise.
2971 (store_register): Likewise.
2972 (get_dynamic): Likewise.
2973 (linux_qxfer_libraries_svr4): Likewise.
2974 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2975 (set_fast_tracepoint_jump): Likewise.
2976 (uninsert_fast_tracepoint_jumps_at): Likewise.
2977 (reinsert_fast_tracepoint_jumps_at): Likewise.
2978 (validate_inserted_breakpoint): Likewise.
2979 (clone_agent_expr): Likewise.
2980 * regcache.c (init_register_cache): Likewise.
2981 * remote-utils.c (putpkt_binary_1): Likewise.
2982 (decode_M_packet): Likewise.
2983 (decode_X_packet): Likewise.
2984 (look_up_one_symbol): Likewise.
2985 (relocate_instruction): Likewise.
2986 (monitor_output): Likewise.
2987 * server.c (handle_search_memory): Likewise.
2988 (handle_qxfer_exec_file): Likewise.
2989 (handle_qxfer_libraries): Likewise.
2990 (handle_qxfer): Likewise.
2991 (handle_query): Likewise.
2992 (handle_v_cont): Likewise.
2993 (handle_v_run): Likewise.
2994 (captured_main): Likewise.
2995 * target.c (write_inferior_memory): Likewise.
2996 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2997 * tracepoint.c (init_trace_buffer): Likewise.
2998 (add_tracepoint_action): Likewise.
2999 (add_traceframe): Likewise.
3000 (add_traceframe_block): Likewise.
3001 (cmd_qtdpsrc): Likewise.
3002 (cmd_qtdv): Likewise.
3003 (cmd_qtstatus): Likewise.
3004 (response_source): Likewise.
3005 (response_tsv): Likewise.
3006 (cmd_qtnotes): Likewise.
3007 (gdb_collect): Likewise.
3008 (initialize_tracepoint): Likewise.
3009
afbe19f8
PL
30102015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3011
3012 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3013 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3014 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3015 <NOP>: New.
3016 (enum aarch64_condition_codes): New enum.
3017 (w0): New static global.
3018 (fp): Likewise.
3019 (lr): Likewise.
3020 (struct aarch64_memory_operand) <type>: New
3021 MEMORY_OPERAND_POSTINDEX type.
3022 (postindex_memory_operand): New helper function.
3023 (emit_ret): New function.
3024 (emit_load_store_pair): New function, factored out of emit_stp
3025 with support for MEMORY_OPERAND_POSTINDEX.
3026 (emit_stp): Rewrite using emit_load_store_pair.
3027 (emit_ldp): New function.
3028 (emit_load_store): Likewise.
3029 (emit_ldr): Mention post-index instruction in comment.
3030 (emit_ldrh): New function.
3031 (emit_ldrb): New function.
3032 (emit_ldrsw): Mention post-index instruction in comment.
3033 (emit_str): Likewise.
3034 (emit_subs): New function.
3035 (emit_cmp): Likewise.
3036 (emit_and): Likewise.
3037 (emit_orr): Likewise.
3038 (emit_orn): Likewise.
3039 (emit_eor): Likewise.
3040 (emit_mvn): Likewise.
3041 (emit_lslv): Likewise.
3042 (emit_lsrv): Likewise.
3043 (emit_asrv): Likewise.
3044 (emit_mul): Likewise.
3045 (emit_sbfm): Likewise.
3046 (emit_sbfx): Likewise.
3047 (emit_ubfm): Likewise.
3048 (emit_ubfx): Likewise.
3049 (emit_csinc): Likewise.
3050 (emit_cset): Likewise.
3051 (emit_nop): Likewise.
3052 (emit_ops_insns): New helper function.
3053 (emit_pop): Likewise.
3054 (emit_push): Likewise.
3055 (aarch64_emit_prologue): New function.
3056 (aarch64_emit_epilogue): Likewise.
3057 (aarch64_emit_add): Likewise.
3058 (aarch64_emit_sub): Likewise.
3059 (aarch64_emit_mul): Likewise.
3060 (aarch64_emit_lsh): Likewise.
3061 (aarch64_emit_rsh_signed): Likewise.
3062 (aarch64_emit_rsh_unsigned): Likewise.
3063 (aarch64_emit_ext): Likewise.
3064 (aarch64_emit_log_not): Likewise.
3065 (aarch64_emit_bit_and): Likewise.
3066 (aarch64_emit_bit_or): Likewise.
3067 (aarch64_emit_bit_xor): Likewise.
3068 (aarch64_emit_bit_not): Likewise.
3069 (aarch64_emit_equal): Likewise.
3070 (aarch64_emit_less_signed): Likewise.
3071 (aarch64_emit_less_unsigned): Likewise.
3072 (aarch64_emit_ref): Likewise.
3073 (aarch64_emit_if_goto): Likewise.
3074 (aarch64_emit_goto): Likewise.
3075 (aarch64_write_goto_address): Likewise.
3076 (aarch64_emit_const): Likewise.
3077 (aarch64_emit_call): Likewise.
3078 (aarch64_emit_reg): Likewise.
3079 (aarch64_emit_pop): Likewise.
3080 (aarch64_emit_stack_flush): Likewise.
3081 (aarch64_emit_zero_ext): Likewise.
3082 (aarch64_emit_swap): Likewise.
3083 (aarch64_emit_stack_adjust): Likewise.
3084 (aarch64_emit_int_call_1): Likewise.
3085 (aarch64_emit_void_call_2): Likewise.
3086 (aarch64_emit_eq_goto): Likewise.
3087 (aarch64_emit_ne_goto): Likewise.
3088 (aarch64_emit_lt_goto): Likewise.
3089 (aarch64_emit_le_goto): Likewise.
3090 (aarch64_emit_gt_goto): Likewise.
3091 (aarch64_emit_ge_got): Likewise.
3092 (aarch64_emit_ops_impl): New static global variable.
3093 (aarch64_emit_ops): New target function, return
3094 &aarch64_emit_ops_impl.
3095 (struct linux_target_ops): Install it.
3096
bb903df0
PL
30972015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3098
3099 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3100 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3101 aarch64-ipa.o.
3102 * linux-aarch64-ipa.c: New file.
3103 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3104 and endian.h.
3105 (aarch64_get_thread_area): New target method.
3106 (extract_signed_bitfield): New helper function.
3107 (aarch64_decode_ldr_literal): New function.
3108 (enum aarch64_opcodes): New enum.
3109 (struct aarch64_register): New struct.
3110 (struct aarch64_operand): New struct.
3111 (x0): New static global.
3112 (x1): Likewise.
3113 (x2): Likewise.
3114 (x3): Likewise.
3115 (x4): Likewise.
3116 (w2): Likewise.
3117 (ip0): Likewise.
3118 (sp): Likewise.
3119 (xzr): Likewise.
3120 (aarch64_register): New helper function.
3121 (register_operand): Likewise.
3122 (immediate_operand): Likewise.
3123 (struct aarch64_memory_operand): New struct.
3124 (offset_memory_operand): New helper function.
3125 (preindex_memory_operand): Likewise.
3126 (enum aarch64_system_control_registers): New enum.
3127 (ENCODE): New macro.
3128 (emit_insn): New helper function.
3129 (emit_b): New function.
3130 (emit_bcond): Likewise.
3131 (emit_cb): Likewise.
3132 (emit_tb): Likewise.
3133 (emit_blr): Likewise.
3134 (emit_stp): Likewise.
3135 (emit_ldp_q_offset): Likewise.
3136 (emit_stp_q_offset): Likewise.
3137 (emit_load_store): Likewise.
3138 (emit_ldr): Likewise.
3139 (emit_ldrsw): Likewise.
3140 (emit_str): Likewise.
3141 (emit_ldaxr): Likewise.
3142 (emit_stxr): Likewise.
3143 (emit_stlr): Likewise.
3144 (emit_data_processing_reg): Likewise.
3145 (emit_data_processing): Likewise.
3146 (emit_add): Likewise.
3147 (emit_sub): Likewise.
3148 (emit_mov): Likewise.
3149 (emit_movk): Likewise.
3150 (emit_mov_addr): Likewise.
3151 (emit_mrs): Likewise.
3152 (emit_msr): Likewise.
3153 (emit_sevl): Likewise.
3154 (emit_wfe): Likewise.
3155 (append_insns): Likewise.
3156 (can_encode_int32_in): New helper function.
3157 (aarch64_relocate_instruction): New function.
3158 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3159 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3160 (struct linux_target_ops): Install aarch64_get_thread_area,
3161 aarch64_install_fast_tracepoint_jump_pad and
3162 aarch64_get_min_fast_tracepoint_insn_len.
3163
787749ea
PL
31642015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3165
3166 * Makefile.in (aarch64-insn.o): New rule.
3167 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3168
9812b2e6
YQ
31692015-09-21 Yao Qi <yao.qi@linaro.org>
3170
3171 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3172
18fe412b
YQ
31732015-09-21 Yao Qi <yao.qi@linaro.org>
3174
3175 * tracepoint.c (max_jump_pad_size): Remove.
3176
a0cc84cd
YQ
31772015-09-18 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-aarch64-low.c: Don't include sys/uio.h.
3180 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3181
d78908cf
WW
31822015-09-16 Wei-cheng Wang <cole945@gmail.com>
3183
3184 * tracepoint.c (eval_result_type): Change prototype.
3185 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3186
d57e0d50
PA
31872015-09-15 Pedro Alves <palves@redhat.com>
3188
3189 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3190 Check whether to report exec events instead of checking whether
3191 multiprocess is enabled.
3192
5a676acc
PA
31932015-09-15 Pedro Alves <palves@redhat.com>
3194
3195 PR remote/18965
3196 * remote-utils.c (prepare_resume_reply): Merge
3197 TARGET_WAITKIND_VFORK_DONE switch case with the
3198 TARGET_WAITKIND_FORKED case.
3199
7c5d0fad
YQ
32002015-09-15 Yao Qi <yao.qi@linaro.org>
3201
3202 * server.c (handle_query): Check string comparison using
3203 "else if" instead of "if".
3204
750ce8d1
YQ
32052015-09-15 Yao Qi <yao.qi@linaro.org>
3206
3207 * server.c (vCont_supported): New global variable.
3208 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3209 matches. Append ";vContSupported+" to own_buf.
3210 (handle_v_requests): Append ";s;S" to own_buf if target supports
3211 hardware single step or vCont_supported is false.
3212 (capture_main): Set vCont_supported to zero.
3213
70b90b91
YQ
32142015-09-15 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3217 it to ...
3218 (linux_supports_hardware_single_step): ... New function.
3219 (linux_target_ops): Update.
3220 * lynx-low.c (lynx_target_ops): Set field
3221 supports_hardware_single_step to target_can_do_hardware_single_step.
3222 * nto-low.c (nto_target_ops): Likewise.
3223 * spu-low.c (spu_target_ops): Likewise.
3224 * win32-low.c (win32_target_ops): Likewise.
3225 * target.c (target_can_do_hardware_single_step): New function.
3226 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3227 Remove. <supports_hardware_single_step>: New field.
3228 (target_supports_conditional_breakpoints): Remove.
3229 (target_supports_hardware_single_step): New macro.
3230 (target_can_do_hardware_single_step): Declare.
3231 * server.c (handle_query): Use target_supports_hardware_single_step
3232 instead of target_supports_conditional_breakpoints.
3233
ade90bde
YQ
32342015-09-15 Yao Qi <yao.qi@linaro.org>
3235
3236 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3237 function.
3238 (struct linux_target_ops the_low_target): Install
3239 aarch64_linux_siginfo_fixup.
3240
94585166
DB
32412015-09-11 Don Breazeal <donb@codesourcery.com>
3242 Luis Machado <lgustavo@codesourcery.com>
3243
3244 * linux-low.c (linux_mourn): Static declaration.
3245 (linux_arch_setup): Move in front of
3246 handle_extended_wait.
3247 (linux_arch_setup_thread): New function.
3248 (handle_extended_wait): Handle exec events. Call
3249 linux_arch_setup_thread. Make event_lwp argument a
3250 pointer-to-a-pointer.
3251 (check_zombie_leaders): Do not check stopped threads.
3252 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3253 (linux_low_filter_event): Add lwp and thread for exec'ing
3254 non-leader thread if leader thread has been deleted.
3255 Refactor code into linux_arch_setup_thread and call it.
3256 Pass child lwp pointer by reference to handle_extended_wait.
3257 (linux_wait_for_event_filtered): Update comment.
3258 (linux_wait_1): Prevent clobbering exec event status.
3259 (linux_supports_exec_events): New function.
3260 (linux_target_ops) <supports_exec_events>: Initialize new member.
3261 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3262 new member.
3263 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3264 * server.c (report_exec_events): New global variable.
3265 (handle_query): Handle qSupported query for exec-events feature.
3266 (captured_main): Initialize report_exec_events.
3267 * server.h (report_exec_events): Declare new global variable.
3268 * target.h (struct target_ops) <supports_exec_events>: New
3269 member.
3270 (target_supports_exec_events): New macro.
3271 * win32-low.c (win32_target_ops) <supports_exec_events>:
3272 Initialize new member.
3273
0568462b
MM
32742015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3275
3276 * linux-low.c (linux_low_enable_btrace): Remove.
3277 (linux_target_ops): Replace linux_low_enable_btrace with
3278 linux_enable_btrace.
3279
39edd165
YQ
32802015-09-03 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-aarch64-low.c (aarch64_insert_point): Call
3283 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3284 returns true.
3285
1db33b5a
UW
32862015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3287
3288 * linux-low.c (check_stopped_by_breakpoint): Use
3289 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3290
ab290430
PA
32912015-08-27 Pedro Alves <palves@redhat.com>
3292
3293 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3294
8d749320
SM
32952015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3296
6711b7f8
SM
3297 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3298 the XNEW-family equivalent.
8d749320
SM
3299 (compile_bytecodes): Likewise.
3300 * dll.c (loaded_dll): Likewise.
3301 * event-loop.c (append_callback_event): Likewise.
3302 (create_file_handler): Likewise.
3303 (create_file_event): Likewise.
3304 * hostio.c (handle_open): Likewise.
3305 * inferiors.c (add_thread): Likewise.
3306 (add_process): Likewise.
3307 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3308 * linux-arm-low.c (arm_new_process): Likewise.
3309 (arm_new_thread): Likewise.
3310 * linux-low.c (add_to_pid_list): Likewise.
3311 (linux_add_process): Likewise.
3312 (handle_extended_wait): Likewise.
3313 (add_lwp): Likewise.
3314 (enqueue_one_deferred_signal): Likewise.
3315 (enqueue_pending_signal): Likewise.
3316 (linux_resume_one_lwp_throw): Likewise.
3317 (linux_resume_one_thread): Likewise.
3318 (linux_read_memory): Likewise.
3319 (linux_write_memory): Likewise.
3320 * linux-mips-low.c (mips_linux_new_process): Likewise.
3321 (mips_linux_new_thread): Likewise.
3322 (mips_add_watchpoint): Likewise.
3323 * linux-x86-low.c (initialize_low_arch): Likewise.
3324 * lynx-low.c (lynx_add_process): Likewise.
3325 * mem-break.c (set_raw_breakpoint_at): Likewise.
3326 (set_breakpoint): Likewise.
3327 (add_condition_to_breakpoint): Likewise.
3328 (add_commands_to_breakpoint): Likewise.
3329 (clone_agent_expr): Likewise.
3330 (clone_one_breakpoint): Likewise.
3331 * regcache.c (new_register_cache): Likewise.
3332 * remote-utils.c (look_up_one_symbol): Likewise.
3333 * server.c (queue_stop_reply): Likewise.
3334 (start_inferior): Likewise.
3335 (queue_stop_reply_callback): Likewise.
3336 (handle_target_event): Likewise.
3337 * spu-low.c (fetch_ppc_memory): Likewise.
3338 (store_ppc_memory): Likewise.
3339 * target.c (set_target_ops): Likewise.
3340 * thread-db.c (thread_db_load_search): Likewise.
3341 (try_thread_db_load_1): Likewise.
3342 * tracepoint.c (add_tracepoint): Likewise.
3343 (add_tracepoint_action): Likewise.
3344 (create_trace_state_variable): Likewise.
3345 (cmd_qtdpsrc): Likewise.
3346 (cmd_qtro): Likewise.
3347 (add_while_stepping_state): Likewise.
3348 * win32-low.c (child_add_thread): Likewise.
3349 (get_image_name): Likewise.
3350
ed8b7b42
YQ
33512015-08-25 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3354
db3cb7cb
YQ
33552015-08-25 Yao Qi <yao.qi@linaro.org>
3356
3357 * Makefile.in (aarch64-linux.o): New rule.
3358 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3359 srv_tgtobj.
3360 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3361 (aarch64_init_debug_reg_state): Make it extern.
3362 (aarch64_linux_prepare_to_resume): Remove.
3363
f6011a1c
YQ
33642015-08-25 Yao Qi <yao.qi@linaro.org>
3365
3366 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3367 lwp_arch_private_info and ptid_of_lwp.
3368
88e2cf7e
YQ
33692015-08-25 Yao Qi <yao.qi@linaro.org>
3370
3371 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3372 Find proc_info by find_process_pid. All callers updated.
3373
5e35436e
YQ
33742015-08-25 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3377 Remove.
3378 (debug_reg_change_callback): Remove.
3379 (aarch64_notify_debug_reg_change): Remove.
3380
4a8a7965
YQ
33812015-08-25 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3384 Call current_lwp_ptid.
3385
32a271ee
YQ
33862015-08-25 Yao Qi <yao.qi@linaro.org>
3387
3388 * linux-aarch64-low.c (debug_reg_change_callback): Use
3389 debug_printf.
3390
0d51c8d7
YQ
33912015-08-25 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3394
31a43dd5
YQ
33952015-08-25 Yao Qi <yao.qi@linaro.org>
3396
3397 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3398
8ee52567
YQ
33992015-08-25 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3402 the code.
3403
ff3f0f45
YQ
34042015-08-25 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3407 Remove.
3408 (debug_reg_change_callback): Remove argument entry and add argument
3409 lwp. Remove local variable thread. Don't print thread id in the
3410 debugging output. Don't check whether pid of thread equals to pid.
3411 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3412 iterate_over_lwps instead find_inferior.
3413
3d40fbb5
PA
34142015-08-24 Pedro Alves <palves@redhat.com>
3415
3416 * inferiors.c (get_first_process): New function.
3417 * inferiors.h (get_first_process): New declaration.
3418 * remote-utils.c (read_ptid): Default to the first process in the
3419 list, instead of to the current thread's process.
3420
438e1e42
PA
34212015-08-24 Pedro Alves <palves@redhat.com>
3422
3423 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3424 * event-loop.c: Likewise.
3425 * remote-utils.c: Likewise.
3426 * tracepoint.c: Likewise.
3427
a8c6d4fc
PA
34282015-08-24 Pedro Alves <palves@redhat.com>
3429
3430 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3431 ptid_get_lwp.
3432
99b0bb12
PA
34332015-08-21 Pedro Alves <palves@redhat.com>
3434
3435 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3436 instead of literal 1.
3437
f8904751
PA
34382015-08-21 Pedro Alves <palves@redhat.com>
3439
3440 * tdesc.c (default_description): Explicitly zero-initialize.
3441
465a859e
PA
34422015-08-21 Pedro Alves <palves@redhat.com>
3443
3444 PR gdb/18749
3445 * inferiors.c (remove_thread): Discard any pending stop reply for
3446 this thread.
3447 * server.c (remove_all_on_match_pid): Rename to ...
3448 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3449 instead of a pid.
3450 (discard_queued_stop_replies): Change parameter to a ptid. Now
3451 extern.
3452 (handle_v_kill, kill_inferior_callback, captured_main)
3453 (process_serial_event): Adjust.
3454 * server.h (discard_queued_stop_replies): Declare.
3455
f0db101d
PA
34562015-08-21 Pedro Alves <palves@redhat.com>
3457
3458 * linux-low.c (wait_for_sigstop): Always switch to no thread
3459 selected if the previously current thread dies.
3460 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3461 process instead of the current thread's.
3462 * remote-utils.c (input_interrupt): Don't check if there's no
3463 current thread.
3464 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3465 current thread to the general thread fails, error out.
3466 (handle_qxfer_auxv, handle_qxfer_libraries)
3467 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3468 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3469 (handle_query): Check if there's a thread selected instead of
3470 checking whether there's any thread in the thread list.
3471 (handle_qxfer_threads, handle_qxfer_btrace)
3472 (handle_qxfer_btrace_conf): Don't error out early if there's no
3473 thread in the thread list.
3474 (handle_v_cont, myresume): Don't set the current thread to the
3475 continue thread.
3476 (process_serial_event) <Hg handling>: Also set thread_id if the
3477 previous general thread is still alive.
3478 (process_serial_event) <g/G handling>: If setting the current
3479 thread to the general thread fails, error out.
3480 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3481 thread's lwp instead of the current thread's.
3482 * target.c (set_desired_thread): If the desired thread was not
3483 found, leave the current thread pointing to NULL. Return an int
3484 (boolean) indicating success.
3485 * target.h (set_desired_thread): Change return type to int.
3486
40045d91
MF
34872015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3488
3489 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3490 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3491 #includes.
3492 (ps_get_thread_area): New function.
3493
45face3b
GB
34942015-08-19 Gary Benson <gbenson@redhat.com>
3495
3496 * hostio.c (handle_pread): Do not attempt to read more data
3497 than hostio_reply_with_data can fit in a packet.
3498
16d5f642
JB
34992015-08-18 Joel Brobecker <brobecker@adacore.com>
3500
3501 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3502
a738da3a
MF
35032015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3504
3505 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3506
33ebda9d
PA
35072015-08-06 Pedro Alves <palves@redhat.com>
3508
3509 * tracepoint.c (expr_eval_result): Now an int.
3510
a44892be
PA
35112015-08-06 Pedro Alves <palves@redhat.com>
3512
3513 * gdbthread.h (struct regcache): Forward declare.
3514 (struct thread_info) <regcache_data>: Now a struct regcache
3515 pointer.
3516 * inferiors.c (inferior_regcache_data)
3517 (set_inferior_regcache_data): Now work with struct regcache
3518 pointers.
3519 * inferiors.h (struct regcache): Forward declare.
3520 (inferior_regcache_data, set_inferior_regcache_data): Now work
3521 with struct regcache pointers.
3522 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3523 (free_register_cache_thread): Remove struct regcache pointer
3524 casts.
3525
608a1e46
PA
35262015-08-06 Pedro Alves <palves@redhat.com>
3527
3528 * server.c (captured_main): On error, print the exception message
3529 to stderr, and if run_once is set, throw a quit.
3530
f0ce0d3a
PA
35312015-08-06 Pedro Alves <palves@redhat.com>
3532
3533 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3534 the current thread.
3535
bf47e248
PA
35362015-08-06 Pedro Alves <palves@redhat.com>
3537
3538 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3539 reading beyond the passed in buffer length.
3540
b6b9ffcc
PL
35412015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3542
3543 * tracepoint.c (symbol_list) <required>: Remove.
3544
863d01bd
PA
35452015-08-06 Pedro Alves <palves@redhat.com>
3546
3547 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3548 count if stopping and suspending threads.
3549 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3550 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3551 (linux_detach): Complete an ongoing step-over.
3552 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3553 throughout.
3554 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3555 (linux_wait_1): If passing a signal to the inferior after
3556 finishing a step-over, unsuspend and re-resume all lwps. If we
3557 see a single-step event but the thread should be continuing, don't
3558 pass the trap to gdb.
3559 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3560 internal_error instead of gdb_assert.
3561 (enqueue_pending_signal): New function.
3562 (check_ptrace_stopped_lwp_gone): Add debug output.
3563 (start_step_over): Use internal_error instead of gdb_assert.
3564 (complete_ongoing_step_over): New function.
3565 (linux_resume_one_thread): Don't resume a suspended thread.
3566 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3567 it stepping.
3568
00db26fa
PA
35692015-08-06 Pedro Alves <palves@redhat.com>
3570
3571 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3572 (linux_thread_alive): Use lwp_is_marked_dead.
3573 (extended_event_reported): Delete.
3574 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3575 instead of extended_event_reported.
3576 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3577 as well.
3578 (lwp_is_marked_dead): New function.
3579 (lwp_running): Use lwp_is_marked_dead.
3580 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3581 comment.
3582
ad071a30
PA
35832015-08-06 Pedro Alves <palves@redhat.com>
3584
3585 * linux-low.c (linux_wait_1): Move fork event output out of the
3586 !report_to_gdb check. Pass event_child->waitstatus to
3587 target_waitstatus_to_string instead of ourstatus.
3588
524b57e6
YQ
35892015-08-04 Yao Qi <yao.qi@linaro.org>
3590
3591 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3592 if current_thread is 32 bit.
3593
6085d6f6
YQ
35942015-08-04 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3597 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3598 * server.c (extended_protocol): Remove "static".
3599 * server.h (extended_protocol): Declare it.
3600
8a7e4587
YQ
36012015-08-04 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3604 both aarch64 and aarch32.
3605 (aarch64_set_pc): Likewise.
3606
3b53ae99
YQ
36072015-08-04 Yao Qi <yao.qi@linaro.org>
3608
3609 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3610 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3611 arm-with-neon.xml to srv_xmlfiles.
3612 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3613 (is_64bit_tdesc): New function.
3614 (aarch64_linux_read_description): New function.
3615 (aarch64_arch_setup): Call aarch64_linux_read_description.
3616 (regs_info): Rename to regs_info_aarch64.
3617 (aarch64_regs_info): Return right regs_info.
3618 (initialize_low_arch): Call initialize_low_arch_aarch32.
3619
bd9e6534
YQ
36202015-08-04 Yao Qi <yao.qi@linaro.org>
3621
3622 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3623 * linux-aarch32-low.c: New file.
3624 * linux-aarch32-low.h: New file.
3625 * linux-arm-low.c (arm_fill_gregset): Move it to
3626 linux-aarch32-low.c.
3627 (arm_store_gregset): Likewise.
3628 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3629 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3630 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3631 (regs_info): Rename to regs_info_arm.
3632 (arm_regs_info): Return regs_info_aarch32 if
3633 have_ptrace_getregset is 1 and target description is
3634 arm_with_neon or arm_with_vfpv3.
3635 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3636 Call initialize_low_arch_aarch32 instead.
3637
ded48a5e
YQ
36382015-08-04 Yao Qi <yao.qi@linaro.org>
3639
3640 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3641 * linux-low.c: ... here.
3642 * linux-low.h (have_ptrace_getregset): Declare it.
3643
96e9210f
PA
36442015-08-04 Pedro Alves <palves@redhat.com>
3645
3646 * thread-db.c (struct thread_db): Use new typedefs.
3647 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3648 CHK calls.
3649 (disable_thread_event_reporting): Cast result of dlsym to
3650 destination function pointer type.
3651 (thread_db_mourn): Use td_ta_delete_ftype.
3652
af60a1ef
SL
36532015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3654
3655 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3656 arch variant.
3657 (CDX_BREAKPOINT): Define for R2.
3658 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3659 (the_low_target): Add comments.
3660
e8b41681
YQ
36612015-07-30 Yao Qi <yao.qi@linaro.org>
3662
3663 * linux-arm-low.c (arm_hwcap): Remove it.
3664 (arm_read_description): New local variable arm_hwcap. Don't
3665 set arm_hwcap to zero.
3666
89abb039
YQ
36672015-07-30 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3670 Use regcache->tdesc instead.
3671 (arm_store_wmmxregset): Likewise.
3672 (arm_fill_vfpregset): Likewise.
3673 (arm_store_vfpregset): Likewise.
3674
deca266c
YQ
36752015-07-30 Yao Qi <yao.qi@linaro.org>
3676
3677 * linux-arm-low.c: Include arch/arm.h.
3678 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3679 (arm_store_gregset): Likewise.
3680
aa58a496
SM
36812015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3682
3683 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3684 ptrace's 4th parameter.
3685
50904b25
YQ
36862015-07-27 Yao Qi <yao.qi@linaro.org>
3687
3688 * configure.srv (case aarch64*-*-linux*): Don't set
3689 srv_linux_usrregs.
3690
5826e159
PA
36912015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3692
3693 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3694 sys/ptrace.h.
3695 * linux-arm-low.c: Likewise.
3696 * linux-cris-low.c: Likewise.
3697 * linux-crisv32-low.c: Likewise.
3698 * linux-low.c: Likewise.
3699 * linux-m68k-low.c: Likewise.
3700 * linux-mips-low.c: Likewise.
3701 * linux-nios2-low.c: Likewise.
3702 * linux-s390-low.c: Likewise.
3703 * linux-sparc-low.c: Likewise.
3704 * linux-tic6x-low.c: Likewise.
3705 * linux-tile-low.c: Likewise.
3706 * linux-x86-low.c: Likewise.
3707
54019719
PA
37082015-07-24 Pedro Alves <palves@redhat.com>
3709
3710 * config.in: Regenerate.
3711 * configure: Regenerate.
3712
eb7aa561
PA
37132015-07-24 Pedro Alves <palves@redhat.com>
3714
3715 * acinclude.m4: Include ../ptrace.m4.
3716 * configure.ac: Call GDB_AC_PTRACE.
3717 * config.in, configure: Regenerate.
3718
55d7b841
YQ
37192015-07-24 Yao Qi <yao.qi@linaro.org>
3720
3721 * linux-low.c (linux_create_inferior): Remove setting to
3722 proc->priv->new_inferior.
3723 (linux_attach): Likewise.
3724 (linux_low_filter_event): Likewise.
3725 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3726
c06cbd92
YQ
37272015-07-24 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-low.c (linux_arch_setup): New function.
3730 (linux_low_filter_event): If proc->tdesc is NULL and
3731 proc->attached is true, call the_low_target.arch_setup.
3732 Otherwise, keep status pending, and return.
3733 (linux_resume_one_lwp_throw): Don't call get_pc if
3734 thread->while_stepping isn't NULL. Don't call
3735 get_thread_regcache if proc->tdesc is NULL.
3736 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3737 (linux_target_ops): Install arch_setup.
3738 * server.c (start_inferior): Call the_target->arch_setup.
3739 * target.h (struct target_ops) <arch_setup>: New field.
3740 (target_arch_setup): New marco.
3741 * lynx-low.c (lynx_target_ops): Update.
3742 * nto-low.c (nto_target_ops): Update.
3743 * spu-low.c (spu_target_ops): Update.
3744 * win32-low.c (win32_target_ops): Update.
3745
5ae3ebba
YQ
37462015-07-24 Yao Qi <yao.qi@linaro.org>
3747
3748 * linux-low.c (linux_add_process): Don't set
3749 proc->priv->new_inferior.
3750 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3751 (linux_attach): Likewise.
3752
eb97750b
YQ
37532015-07-24 Yao Qi <yao.qi@linaro.org>
3754
3755 * server.c (start_inferior): Code refactor.
3756
51aee833
YQ
37572015-07-24 Yao Qi <yao.qi@linaro.org>
3758
3759 * server.c (process_serial_event): Set general_thread.
3760
af1b22f3
YQ
37612015-07-21 Yao Qi <yao.qi@linaro.org>
3762
3763 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3764 aarch64_linux_get_debug_reg_capacity.
3765
554717a3
YQ
37662015-07-17 Yao Qi <yao.qi@linaro.org>
3767
3768 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3769 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3770 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3771 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3772 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3773 (AARCH64_HWP_ALIGNMENT): Likewise.
3774 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3775 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3776 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3777 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3778 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3779 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3780 (struct aarch64_debug_reg_state): Likewise.
3781 (struct arch_lwp_info): Likewise.
3782 (aarch64_align_watchpoint): Likewise.
3783 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3784 (aarch64_watchpoint_length): Likewise.
3785 (aarch64_point_encode_ctrl_reg): Likewise
3786 (aarch64_point_is_aligned): Likewise.
3787 (aarch64_align_watchpoint): Likewise.
3788 (aarch64_linux_set_debug_regs):
3789 (aarch64_dr_state_insert_one_point): Likewise.
3790 (aarch64_dr_state_remove_one_point): Likewise.
3791 (aarch64_handle_breakpoint): Likewise.
3792 (aarch64_handle_aligned_watchpoint): Likewise.
3793 (aarch64_handle_unaligned_watchpoint): Likewise.
3794 (aarch64_handle_watchpoint): Likewise.
3795
c67ca4de
YQ
37962015-07-17 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3799 and don't aarch64_get_debug_reg_state. All callers update.
3800 (aarch64_handle_aligned_watchpoint): Likewise.
3801 (aarch64_handle_unaligned_watchpoint): Likewise.
3802 (aarch64_handle_watchpoint): Likewise.
3803 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3804 (aarch64_remove_point): Likewise.
3805
25abf979
YQ
38062015-07-17 Yao Qi <yao.qi@linaro.org>
3807
3808 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3809 debug_printf.
3810 (aarch64_handle_unaligned_watchpoint): Likewise.
3811
db1ff28b
JK
38122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3813
3814 Revert the previous 3 commits:
3815 Move gdb_regex* to common/
3816 Move linux_find_memory_regions_full & co.
3817 gdbserver build-id attribute generator
3818
700ca40f
JK
38192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3820 Jan Kratochvil <jan.kratochvil@redhat.com>
3821
3822 gdbserver build-id attribute generator.
3823 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3824 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3825 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3826 (find_phdr): New.
3827 (get_dynamic): Use find_pdhr to traverse program headers.
3828 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3829 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3830 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3831 (get_hex_build_id): New.
3832 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3833 to reply XML document.
3834
9904185c
JK
38352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3836 Jan Kratochvil <jan.kratochvil@redhat.com>
3837
3838 * target.c: Include target/target-utils.h and fcntl.h.
3839 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3840 (target_fileio_read_stralloc): New functions.
3841
6e5b4429
JK
38422015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3843
3844 * Makefile.in (OBS): Add gdb_regex.o.
3845 (gdb_regex.o): New.
3846 * config.in: Rebuilt.
3847 * configure: Rebuilt.
3848
ddc98fbf
JK
38492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3850 Jan Kratochvil <jan.kratochvil@redhat.com>
3851
3852 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3853 * Makefile.in (OBS): Add target-utils.o.
3854 (linux-maps.o, target-utils.o): New.
3855 * configure.srv (srv_linux_obj): Add linux-maps.o.
3856
e57bb7a0
PL
38572015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3858
3859 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3860 function, return 1.
3861 (the_low_target): Install it.
3862
586b02a9
PA
38632015-07-14 Pedro Alves <palves@redhat.com>
3864
3865 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3866 Instead, ignore ECHILD, and throw an error for other errnos.
3867
58c1b36c
PA
38682015-07-10 Pedro Alves <palves@redhat.com>
3869
3870 * event-loop.c (struct callback_event) <data>: Change type to
3871 gdb_client_data instance instead of gdb_client_data pointer.
3872 (append_callback_event): Adjust.
3873
421530db
PL
38742015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3875
3876 * linux-aarch64-low.c: Add comments for each linux_target_ops
3877 method. Remove comments already covered in target_ops and
3878 linux_target_ops definitions.
3879 (the_low_target): Add comments for each unimplemented method.
3880
c2d65f38
YQ
38812015-07-09 Yao Qi <yao.qi@linaro.org>
3882
3883 * linux-aarch64-low.c (aarch64_regmap): Remove.
3884 (aarch64_usrregs_info): Remove.
3885 (regs_info): Set field usrregs to NULL.
3886
b20a6524
MM
38872015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3888
3889 * linux-low.c: Include "rsp-low.h"
3890 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3891 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3892 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3893 (handle_btrace_enable_pt): New.
3894 (handle_btrace_general_set): Support "pt".
3895 (handle_btrace_conf_general_set): Support "pt:size".
3896
96c97461
PL
38972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3898
3899 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3900 Z_PACKET_SW_BP.
3901
37d66942
PL
39022015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3903
3904 * linux-aarch64-low.c: Remove comment about endianness.
3905 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3906 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3907 memcmp.
3908
dc06243f
GB
39092015-06-24 Gary Benson <gbenson@redhat.com>
3910
3911 * linux-i386-ipa.c (stdint.h): Do not include.
3912 * lynx-i386-low.c (stdint.h): Likewise.
3913 * lynx-ppc-low.c (stdint.h): Likewise.
3914 * mem-break.c (stdint.h): Likewise.
3915 * thread-db.c (stdint.h): Likewise.
3916 * tracepoint.c (stdint.h): Likewise.
3917 * win32-low.c (stdint.h): Likewise.
3918
124e13d9
SM
39192015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3920
3921 * server.c (write_qxfer_response): Update call to
3922 remote_escape_output.
3923
909c2cda
JK
39242015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3925 Jan Kratochvil <jan.kratochvil@redhat.com>
3926
3927 Merge multiple hex conversions.
3928 * gdbreplay.c (tohex): Rename to 'fromhex'.
3929 (logchar): Use fromhex.
3930
24c05f46
JK
39312015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3932
3933 * server.c (handle_qxfer_libraries): Set `version' attribute for
3934 <library-list>.
3935
14d2069a
GB
39362015-06-10 Gary Benson <gbenson@redhat.com>
3937
3938 * target.h (struct target_ops) <multifs_open>: New field.
3939 <multifs_unlink>: Likewise.
3940 <multifs_readlink>: Likewise.
3941 * linux-low.c (nat/linux-namespaces.h): New include.
3942 (linux_target_ops): Initialize the_target->multifs_open,
3943 the_target->multifs_unlink and the_target->multifs_readlink.
3944 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3945 * hostio.c (hostio_fs_pid): New static variable.
3946 (hostio_handle_new_gdb_connection): New function.
3947 (handle_setfs): Likewise.
3948 (handle_open): Use the_target->multifs_open as appropriate.
3949 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3950 (handle_readlink): Use the_target->multifs_readlink as
3951 appropriate.
3952 (handle_vFile): Handle vFile:setfs packets.
3953 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3954 after target_handle_new_gdb_connection.
3955
4b8b5e72
GB
39562015-06-10 Gary Benson <gbenson@redhat.com>
3957
3958 * configure.ac (AC_CHECK_FUNCS): Add setns.
3959 * config.in: Regenerate.
3960 * configure: Likewise.
3961 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3962 (linux-namespaces.o): New rule.
3963 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3964
3ac2e371
GB
39652015-06-09 Gary Benson <gbenson@redhat.com>
3966
3967 * hostio.c (handle_open): Process mode argument with
3968 fileio_to_host_mode.
3969
ca9b78ce
YQ
39702015-06-01 Yao Qi <yao.qi@linaro.org>
3971
3972 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3973 * linux-x86-low.c: Likewise.
3974
bfacd19d
DB
39752015-05-28 Don Breazeal <donb@codesourcery.com>
3976
3977 * linux-low.c (handle_extended_wait): Initialize
3978 thread_info.last_resume_kind for new fork children.
3979
452003ef
PA
39802015-05-15 Pedro Alves <palves@redhat.com>
3981
3982 * target.h (target_handle_new_gdb_connection): Rewrite using if
3983 wrapped in do/while.
3984
1041a03c
JB
39852015-05-14 Joel Brobecker <brobecker@adacore.com>
3986
3987 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3988 * configure, config.in: Regenerate.
3989 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3990 Declare typedef.
3991
c269dbdb
DB
39922015-05-12 Don Breazeal <donb@codesourcery.com>
3993
3994 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3995 PTRACE_EVENT_VFORK_DONE.
3996 (linux_low_ptrace_options, extended_event_reported): Add vfork
3997 events.
3998 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3999 and "vforkdone" for RSP 'T' Stop Reply Packet.
4000 * server.h (report_vfork_events): Declare
4001 global variable.
4002
3a8a0396
DB
40032015-05-12 Don Breazeal <donb@codesourcery.com>
4004
4005 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4006 (the_low_target) <new_fork>: Initialize new member.
4007 * linux-arm-low.c (arm_new_fork): New function.
4008 (the_low_target) <new_fork>: Initialize new member.
4009 * linux-low.c (handle_extended_wait): Call new target function
4010 new_fork.
4011 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4012 * linux-mips-low.c (mips_add_watchpoint): New function
4013 extracted from mips_insert_point.
4014 (the_low_target) <new_fork>: Initialize new member.
4015 (mips_linux_new_fork): New function.
4016 (mips_insert_point): Call mips_add_watchpoint.
4017 * linux-x86-low.c (x86_linux_new_fork): New function.
4018 (the_low_target) <new_fork>: Initialize new member.
4019
de0d863e
DB
40202015-05-12 Don Breazeal <donb@codesourcery.com>
4021
4022 * linux-low.c (handle_extended_wait): Implement return value,
4023 rename argument 'event_child' to 'event_lwp', handle
4024 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4025 (linux_low_ptrace_options): New function.
4026 (linux_low_filter_event): Call linux_low_ptrace_options,
4027 use different argument fo linux_enable_event_reporting,
4028 use return value from handle_extended_wait.
4029 (extended_event_reported): New function.
4030 (linux_wait_1): Call extended_event_reported and set
4031 status to report fork events.
4032 (linux_write_memory): Add pid to debug message.
4033 (reset_lwp_ptrace_options_callback): New function.
4034 (linux_handle_new_gdb_connection): New function.
4035 (linux_target_ops): Initialize new structure member.
4036 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4037 * lynx-low.c: Initialize new structure member.
4038 * remote-utils.c (prepare_resume_reply): Implement stop reason
4039 "fork" for "T" stop message.
4040 * server.c (handle_query): Call handle_new_gdb_connection.
4041 * server.h (report_fork_events): Declare global flag.
4042 * target.h (struct target_ops) <handle_new_gdb_connection>:
4043 New member.
4044 (target_handle_new_gdb_connection): New macro.
4045 * win32-low.c: Initialize new structure member.
4046
ddcbc397
DB
40472015-05-12 Don Breazeal <donb@codesourcery.com>
4048
4049 * mem-break.c (APPEND_TO_LIST): Define macro.
4050 (clone_agent_expr): New function.
4051 (clone_one_breakpoint): New function.
4052 (clone_all_breakpoints): New function.
4053 * mem-break.h: Declare new functions.
4054
89245bc0
DB
40552015-05-12 Don Breazeal <donb@codesourcery.com>
4056
4057 * linux-low.c (linux_supports_fork_events): New function.
4058 (linux_supports_vfork_events): New function.
4059 (linux_target_ops): Initialize new structure members.
4060 (initialize_low): Call linux_check_ptrace_features.
4061 * lynx-low.c (lynx_target_ops): Initialize new structure
4062 members.
4063 * server.c (report_fork_events, report_vfork_events):
4064 New global flags.
4065 (handle_query): Add new features to qSupported packet and
4066 response.
4067 (captured_main): Initialize new global variables.
4068 * target.h (struct target_ops) <supports_fork_events>:
4069 New member.
4070 <supports_vfork_events>: New member.
4071 (target_supports_fork_events): New macro.
4072 (target_supports_vfork_events): New macro.
4073 * win32-low.c (win32_target_ops): Initialize new structure
4074 members.
4075
835205d0
GB
40762015-05-12 Gary Benson <gbenson@redhat.com>
4077
4078 * server.c (handle_qxfer_exec_file): Use current process
4079 if annex is empty.
4080
21e94bd9
SL
40812015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4082
4083 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4084 Remove HAVE_PTRACE_GETREGS conditionals.
4085 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4086 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4087
45614f15
YQ
40882015-05-08 Yao Qi <yao.qi@linaro.org>
4089
4090 * linux-low.c (linux_supports_conditional_breakpoints): New
4091 function.
4092 (linux_target_ops): Install new target method.
4093 * lynx-low.c (lynx_target_ops): Install NULL hook for
4094 supports_conditional_breakpoints.
4095 * nto-low.c (nto_target_ops): Likewise.
4096 * spu-low.c (spu_target_ops): Likewise.
4097 * win32-low.c (win32_target_ops): Likewise.
4098 * server.c (handle_query): Check
4099 target_supports_conditional_breakpoints.
4100 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4101 New field.
4102 (target_supports_conditional_breakpoints): New macro.
4103
80ad801e
PA
41042015-05-06 Pedro Alves <palves@redhat.com>
4105
4106 PR server/18081
4107 * server.c (start_inferior): If the process exits, mourn it.
4108
819843c7
GB
41092015-04-21 Gary Benson <gbenson@redhat.com>
4110
4111 * hostio.c (fileio_open_flags_to_host): Factored out to
4112 fileio_to_host_openflags in common/fileio.c. Single use
4113 updated.
4114
a2d5a9d7
MF
41152015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4116
4117 * linux-xtensa-low.c (xtensa_fill_gregset)
4118 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4119 XCHAL_HAVE_LOOP.
4120
deb44829
MF
41212015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4122
4123 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4124 (regs_info): Replace usrregs pointer with NULL.
4125
e57f1de3
GB
41262015-04-17 Gary Benson <gbenson@redhat.com>
4127
4128 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4129 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4130 * server.c (handle_qxfer_exec_file): New function.
4131 (qxfer_packets): Add exec-file entry.
4132 (handle_query): Report qXfer:exec-file:read as supported packet.
4133
62828379
RN
41342015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4135
4136 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4137
b88bb450
GB
41382015-04-09 Gary Benson <gbenson@redhat.com>
4139
4140 * hostio-errno.c (errno_to_fileio_error): Remove function.
4141 Update caller to use remote_fileio_to_fio_error.
4142
c8f4bfdd
YQ
41432015-04-09 Yao Qi <yao.qi@linaro.org>
4144
4145 * linux-low.c (linux_insert_point): Call
4146 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4147 (linux_remove_point): Call remove_memory_breakpoint if type is
4148 raw_bkpt_type_sw.
4149 * linux-x86-low.c (x86_insert_point): Don't call
4150 insert_memory_breakpoint.
4151 (x86_remove_point): Don't call remove_memory_breakpoint.
4152
41f98f02
PA
41532015-04-01 Pedro Alves <palves@redhat.com>
4154 Cleber Rosa <crosa@redhat.com>
4155
4156 * server.c (gdbserver_usage): Reorganize and extend the usage
4157 message.
4158
2bf6fb9d
PA
41592015-03-24 Pedro Alves <palves@redhat.com>
4160
4161 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4162 output. Also dump TRAP_TRACE.
4163 (linux_low_filter_event): In debug output, distinguish a
4164 resume_stop SIGSTOP from a delayed SIGSTOP.
4165
369f6daa
GB
41662015-03-24 Gary Benson <gbenson@redhat.com>
4167
4168 * linux-x86-low.c (x86_linux_new_thread): Moved to
4169 nat/x86-linux.c.
4170 (x86_linux_prepare_to_resume): Likewise.
4171
8e5d4070
GB
41722015-03-24 Gary Benson <gbenson@redhat.com>
4173
4174 * Makefile.in (x86-linux-dregs.o): New rule.
4175 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4176 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4177 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4178 (x86_linux_dr_get): Likewise.
4179 (x86_linux_dr_set): Likewise.
4180 (update_debug_registers_callback): Likewise.
4181 (x86_linux_dr_set_addr): Likewise.
4182 (x86_linux_dr_get_addr): Likewise.
4183 (x86_linux_dr_set_control): Likewise.
4184 (x86_linux_dr_get_control): Likewise.
4185 (x86_linux_dr_get_status): Likewise.
4186 (x86_linux_update_debug_registers): Likewise.
4187
2b95d440
GB
41882015-03-24 Gary Benson <gbenson@redhat.com>
4189
4190 * linux-x86-low.c (x86_linux_update_debug_registers):
4191 New function, factored out from...
4192 (x86_linux_prepare_to_resume): ...this.
4193
14b0bc68
GB
41942015-03-24 Gary Benson <gbenson@redhat.com>
4195
4196 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4197 (x86_linux_dr_set): Likewise.
4198 (update_debug_registers_callback): Likewise.
4199 (x86_linux_dr_set_addr): Likewise.
4200 (x86_linux_dr_get_addr): Likewise.
4201 (x86_linux_dr_set_control): Likewise.
4202 (x86_linux_dr_get_control): Likewise.
4203 (x86_linux_dr_get_status): Likewise.
4204 (x86_linux_prepare_to_resume): Likewise.
4205
5dfe6ca8
GB
42062015-03-24 Gary Benson <gbenson@redhat.com>
4207
4208 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4209 Use perror_with_name. Pass string through gettext.
4210 (x86_linux_dr_set): Likewise.
4211
d33472ad
GB
42122015-03-24 Gary Benson <gbenson@redhat.com>
4213
4214 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4215 (x86_linux_dr_set_addr): ...this.
4216 (x86_dr_low_get_addr): Rename to...
4217 (x86_linux_dr_get_addr): ...this.
4218 (x86_dr_low_set_control): Rename to...
4219 (x86_linux_dr_set_control): ...this.
4220 (x86_dr_low_get_control): Rename to...
4221 (x86_linux_dr_get_control): ...this.
4222 (x86_dr_low_get_status): Rename to...
4223 (x86_linux_dr_get_status): ...this.
4224 (x86_dr_low): Update with new function names.
4225
4b134ca1
GB
42262015-03-24 Gary Benson <gbenson@redhat.com>
4227
4228 * Makefile.in (x86-linux.o): New rule.
4229 * configure.srv: Add x86-linux.o to relevant targets.
4230 * linux-low.c (lwp_set_arch_private_info): New function.
4231 (lwp_arch_private_info): Likewise.
4232 * linux-x86-low.c: Include nat/x86-linux.h.
4233 (arch_lwp_info): Removed structure.
4234 (update_debug_registers_callback):
4235 Use lwp_set_debug_registers_changed.
4236 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4237 and lwp_set_debug_registers_changed.
4238 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4239
34c703da
GB
42402015-03-24 Gary Benson <gbenson@redhat.com>
4241
4242 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4243 * linux-arm-low.c (arm_new_thread): Likewise.
4244 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4245 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4246 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4247 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4248
cff068da
GB
42492015-03-24 Gary Benson <gbenson@redhat.com>
4250
4251 * linux-low.c (ptid_of_lwp): New function.
4252 (lwp_is_stopped): Likewise.
4253 (lwp_stop_reason): Likewise.
4254 * linux-x86-low.c (update_debug_registers_callback):
4255 Use lwp_is_stopped.
4256 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4257 lwp_stop_reason.
4258
b2f7c7e8
GB
42592015-03-24 Gary Benson <gbenson@redhat.com>
4260
4261 * linux-low.h (linux_stop_lwp): Remove declaration.
4262
6d4ee8c6
GB
42632015-03-24 Gary Benson <gbenson@redhat.com>
4264
4265 * linux-low.h: Include nat/linux-nat.h.
4266 * linux-low.c (iterate_over_lwps_args): New structure.
4267 (iterate_over_lwps_filter): New function.
4268 (iterate_over_lwps): Likewise.
4269 * linux-x86-low.c (update_debug_registers_callback):
4270 Update signature to what iterate_over_lwps expects.
4271 Remove PID check that iterate_over_lwps now performs.
4272 (x86_dr_low_set_addr): Use iterate_over_lwps.
4273 (x86_dr_low_set_control): Likewise.
4274
70a0bb6b
GB
42752015-03-24 Gary Benson <gbenson@redhat.com>
4276
4277 * linux-x86-low.c (x86_debug_reg_state): New function.
4278 (x86_linux_prepare_to_resume): Use the above.
4279
7b669087
GB
42802015-03-24 Gary Benson <gbenson@redhat.com>
4281
4282 * linux-low.c (current_lwp_ptid): New function.
4283 * linux-x86-low.c: Include nat/linux-nat.h.
4284 (x86_dr_low_get_addr): Use current_lwp_ptid.
4285 (x86_dr_low_get_control): Likewise.
4286 (x86_dr_low_get_status): Likewise.
4287
eef49a3d
PA
42882015-03-20 Pedro Alves <palves@redhat.com>
4289
4290 * tracepoint.c (cmd_qtstatus): Make "str" const.
4291
b2333d22
PA
42922015-03-20 Pedro Alves <palves@redhat.com>
4293
4294 * server.c (handle_general_set): Make "req_str" const.
4295
23f238d3
PA
42962015-03-19 Pedro Alves <palves@redhat.com>
4297
4298 * linux-low.c (linux_resume_one_lwp): Rename to ...
4299 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4300 instead call perror_with_name.
4301 (check_ptrace_stopped_lwp_gone): New function.
4302 (linux_resume_one_lwp): Reimplement as wrapper around
4303 linux_resume_one_lwp_throw that swallows errors if the LWP is
4304 gone.
4305
91baf43f
PA
43062015-03-19 Pedro Alves <palves@redhat.com>
4307
4308 * linux-low.c (count_events_callback, select_event_lwp_callback):
4309 No longer check whether the thread has resume_stop as last resume
4310 kind.
4311
8bf3b159
PA
43122015-03-19 Pedro Alves <palves@redhat.com>
4313
4314 * linux-low.c (count_events_callback, select_event_lwp_callback):
4315 Use the lwp's status_pending_p field, not the thread's.
4316
b90fc188
PA
43172015-03-19 Pedro Alves <palves@redhat.com>
4318
4319 * linux-low.c (select_event_lwp_callback): Update comments to
4320 no longer mention SIGTRAP.
4321
464b0089
GB
43222015-03-18 Gary Benson <gbenson@redhat.com>
4323
4324 * server.c (handle_query): Do not report vFile:fstat as supported.
4325
aa9e327f
GB
43262015-03-11 Gary Benson <gbenson@redhat.com>
4327
4328 * hostio.c (sys/types.h): New include.
4329 (sys/stat.h): Likewise.
4330 (common-remote-fileio.h): Likewise.
4331 (handle_fstat): New function.
4332 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4333
791c0056
GB
43342015-03-11 Gary Benson <gbenson@redhat.com>
4335
4336 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4337 struct stat.st_blocks and struct stat.st_blksize.
4338 * configure: Regenerate.
4339 * config.in: Likewise.
4340 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4341 (OBS): Add common-remote-fileio.o.
4342 (common-remote-fileio.o): New rule.
4343
9a9df970
PA
43442015-03-09 Pedro Alves <palves@redhat.com>
4345
4346 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4347 'struct sockaddr' pointer in 'accept' call.
4348
9eb1356e
PA
43492015-03-09 Pedro Alves <palves@redhat.com>
4350
4351 Revert:
4352 2015-03-07 Pedro Alves <palves@redhat.com>
4353 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4354 or <winsock2.h> here. Instead include "gdb_socket.h".
4355 (remote_open): Use union gdb_sockaddr_u.
4356 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4357 or <winsock2.h> here. Instead include "gdb_socket.h".
4358 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4359 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4360 or <sys/un.h>.
4361 (init_named_socket, gdb_agent_helper_thread): Use union
4362 gdb_sockaddr_u.
4363
aac331e4
PA
43642015-03-07 Pedro Alves <palves@redhat.com>
4365
4366 * configure.ac (build_warnings): Move
4367 -Wdeclaration-after-statement to the C-specific set.
4368 * configure: Regenerate.
4369
366c75fc
PA
43702015-03-07 Pedro Alves <palves@redhat.com>
4371
4372 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4373 or <winsock2.h> here. Instead include "gdb_socket.h".
4374 (remote_open): Use union gdb_sockaddr_u.
4375 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4376 or <winsock2.h> here. Instead include "gdb_socket.h".
4377 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4378 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4379 or <sys/un.h>.
4380 (init_named_socket, gdb_agent_helper_thread): Use union
4381 gdb_sockaddr_u.
4382
492d29ea
PA
43832015-03-07 Pedro Alves <palves@redhat.com>
4384
4385 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4386 instead.
4387
60a191ed
YQ
43882015-03-06 Yao Qi <yao.qi@linaro.org>
4389
4390 * linux-aarch64-low.c (aarch64_insert_point): Use
4391 show_debug_regs as a boolean.
4392 (aarch64_remove_point): Likewise.
4393
f5771b1d
PA
43942015-03-05 Pedro Alves <palves@redhat.com>
4395
4396 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4397 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4398 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4399 * nto-low.c (nto_target_ops): Likewise.
4400 * spu-low.c (spu_target_ops): Likewise.
4401 * win32-low.c (win32_target_ops): Likewise.
4402
3e572f71
PA
44032015-03-04 Pedro Alves <palves@redhat.com>
4404
72f4393d 4405 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4406 Decide whether a breakpoint triggered based on the SIGTRAP's
4407 siginfo.si_code.
72f4393d
L
4408 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4409 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4410 (linux_low_filter_event): Check for breakpoints before checking
4411 watchpoints.
4412 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4413 siginfo.si_code.
72f4393d
L
4414 (linux_stopped_by_sw_breakpoint)
4415 (linux_supports_stopped_by_sw_breakpoint)
4416 (linux_stopped_by_hw_breakpoint)
4417 (linux_supports_stopped_by_hw_breakpoint): New functions.
4418 (linux_target_ops): Install new target methods.
3e572f71 4419
1ec68e26
PA
44202015-03-04 Pedro Alves <palves@redhat.com>
4421
4422 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4423 * server.c (swbreak_feature, hwbreak_feature): New globals.
4424 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4425 (captured_main): Clear swbreak_feature and hwbreak_feature.
4426 * server.h (swbreak_feature, hwbreak_feature): Declare.
4427 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4428 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4429 supports_stopped_by_hw_breakpoint>: New fields.
4430 (target_supports_stopped_by_sw_breakpoint)
4431 (target_stopped_by_sw_breakpoint)
4432 (target_supports_stopped_by_hw_breakpoint)
4433 (target_stopped_by_hw_breakpoint): Declare.
4434
15c66dd6
PA
44352015-03-04 Pedro Alves <palves@redhat.com>
4436
4437 enum lwp_stop_reason -> enum target_stop_reason
4438 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4439 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4440 (linux_wait_1, stuck_in_jump_pad_callback)
4441 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4442 (linux_stopped_by_watchpoint):
4443 * linux-low.h (enum lwp_stop_reason): Delete.
4444 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4445 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4446
98fc70d6
YQ
44472015-03-04 Yao Qi <yao.qi@linaro.org>
4448
4449 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4450
dd2ac174
GB
44512015-03-03 Gary Benson <gbenson@redhat.com>
4452
4453 * hostio.c (handle_vFile): Fix prefix lengths.
4454
d68e53f4
MM
44552015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4456
4457 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4458 ptr_bits.
4459
bf2d68ab
AA
44602015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4461
4462 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4463 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4464 (clean): Add "rm -f" for above C files.
4465 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4466 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4467 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4468 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4469 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4470 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4471 (init_registers_s390x_vx_linux64)
4472 (init_registers_s390x_tevx_linux64)
4473 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4474 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4475 declarations.
4476 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4477 (s390_store_vxrs_high): New functions.
4478 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4479 NT_S390_VXRS_HIGH.
4480 (s390_arch_setup): Add logic for selecting one of the new target
4481 descriptions. Activate the new vector regsets if applicable.
4482 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4483 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4484 and init_registers_s390x_tevx_linux64.
4485
c966a859
PA
44862015-03-01 Pedro Alves <palves@redhat.com>
4487
4488 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4489 parameter.
4490
4180215b
PA
44912015-02-27 Pedro Alves <palves@redhat.com>
4492
4493 * linux-x86-low.c (u_debugreg_offset): New function.
4494 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4495
749bab01
PA
44962015-02-27 Pedro Alves <palves@redhat.com>
4497
4498 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4499 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4500 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4501 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4502 (ps_lsetfpregs, ps_getpid)
4503 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4504 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4505 (ps_lsetxregs, ps_plog): Declare.
4506
3c14e5a3
PA
45072015-02-27 Pedro Alves <palves@redhat.com>
4508
4509 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4510 IP_AGENT_EXPORT_FUNC.
4511 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4512 IP_AGENT_EXPORT_FUNC.
4513 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4514 (IP_AGENT_EXPORT): Delete.
4515 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4516 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4517 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4518 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4519 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4520 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4521 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4522 (traceframe_read_count, traceframe_write_count)
4523 (traceframes_created, trace_state_variables, get_raw_reg)
4524 (get_trace_state_variable_value, set_trace_state_variable_value)
4525 (ust_loaded, helper_thread_id, cmd_buf): Use
4526 IPA_SYM_EXPORTED_NAME.
4527 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4528 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4529 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4530 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4531 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4532 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4533 EXTERN_C_PUSH/EXTERN_C_POP.
4534 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4535 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4536 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4537 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4538 (traceframe_write_count, traceframe_read_count)
4539 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4540 (about_to_request_buffer_space, get_trace_state_variable_value)
4541 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4542 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4543 EXTERN_C_PUSH/EXTERN_C_POP.
4544 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4545 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4546 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4547 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4548 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4549 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4550 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4551 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4552 Define.
4553 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4554 (IP_AGENT_EXPORT_VAR_DECL): Define.
4555 (tracing): Declare.
4556 (gdb_agent_get_raw_reg): Declare.
4557
fe978cb0
PA
45582015-02-27 Tom Tromey <tromey@redhat.com>
4559 Pedro Alves <palves@redhat.com>
4560
4561 Rename symbols whose names are reserved C++ keywords throughout.
4562
3bc3d82a
PA
45632015-02-27 Pedro Alves <palves@redhat.com>
4564
4565 * Makefile.in (COMPILER): New, get it from autoconf.
4566 (CXX): Get from autoconf instead.
4567 (COMPILE.pre): Use COMPILER.
4568 (CC-LD): Rename to ...
4569 (CC_LD): ... this. Use COMPILER.
4570 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4571 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4572 * acinclude.m4: Include build-with-cxx.m4.
4573 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4574 Disable -Werror by default if building in C++ mode.
4575 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4576 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4577 the C++ compiler. Save/restore CXXFLAGS too.
4578 * configure: Regenerate.
4579
07697489
PA
45802015-02-27 Pedro Alves <palves@redhat.com>
4581
4582 * acinclude.m4: Include libiberty.m4.
4583 * configure.ac: Call libiberty_INIT.
4584 * config.in, configure: Regenerate.
4585
9beb7c4e
PA
45862015-02-26 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (linux_wait_1): When incrementing the PC past a
4589 program breakpoint always use the_low_target.breakpoint_len as
4590 increment, rather than the maximum between that and
4591 the_low_target.decr_pc_after_break.
4592
8090aef2
PA
45932015-02-23 Pedro Alves <palves@redhat.com>
4594
4595 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4596 thread was doing a step-over; always adjust the PC if
4597 we stepped over a permanent breakpoint.
4598 (linux_wait_1): If we stepped over breakpoint that was on top of a
4599 permanent breakpoint, manually advance the PC past it.
4600
bc9540e8
PA
46012015-02-23 Pedro Alves <palves@redhat.com>
4602
4603 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4604 modes.
4605 (x86_fill_gregset, x86_store_gregset): Use it when handling
4606 $orig_eax.
4607
2db9a427
PA
46082015-02-20 Pedro Alves <palves@redhat.com>
4609
4610 * thread-db.c: Include "nat/linux-procfs.h".
4611 (thread_db_init): Skip listing new threads if the kernel supports
4612 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4613
afa8d396
PA
46142015-02-20 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.c (status_pending_p_callback): Use ptid_match.
4617
c9587f88
AT
46182015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4619
4620 PR breakpoints/16812
4621 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4622 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4623 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4624
b05ec7a5
AT
46252015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4626
4627 PR breakpoints/15956
4628 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4629
d33501a5
MM
46302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4631
4632 * linux-low.c (linux_low_btrace_conf): Print size.
4633 * server.c (handle_btrace_conf_general_set): New.
4634 (hanle_general_set): Call handle_btrace_conf_general_set.
4635 (handle_query): Report Qbtrace-conf:bts:size as supported.
4636
f4abbc16
MM
46372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4638
4639 * linux-low.c (linux_low_enable_btrace): Update parameters.
4640 (linux_low_btrace_conf): New.
4641 (linux_target_ops)<to_btrace_conf>: Initialize.
4642 * server.c (current_btrace_conf): New.
4643 (handle_btrace_enable): Rename to ...
4644 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4645 to target_enable_btrace. Update comment. Update users.
4646 (handle_qxfer_btrace_conf): New.
4647 (qxfer_packets): Add btrace-conf entry.
4648 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4649 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4650 (target_ops)<read_btrace_conf>: New.
4651 (target_enable_btrace): Update parameters.
4652 (target_read_btrace_conf): New.
4653
043c3577
MM
46542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4655
4656 * server.c (handle_btrace_general_set): Remove call to
4657 target_supports_btrace.
4658 (supported_btrace_packets): New.
4659 (handle_query): Call supported_btrace_packets.
4660 * target.h: include btrace-common.h.
4661 (btrace_target_info): Removed.
4662 (supports_btrace, target_supports_btrace): Update parameters.
4663
734b0e4b
MM
46642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4665
4666 * Makefile.in (SFILES): Add common/btrace-common.c.
4667 (OBS): Add common/btrace-common.o.
4668 (btrace-common.o): Add build rules.
4669 * linux-low: Include btrace-common.h.
4670 (linux_low_read_btrace): Use struct btrace_data. Call
4671 btrace_data_init and btrace_data_fini.
4672
d6c146e9
PA
46732015-02-06 Pedro Alves <palves@redhat.com>
4674
4675 * thread-db.c (find_new_threads_callback): Add debug output.
4676
20ba1ce6
PA
46772015-02-04 Pedro Alves <palves@redhat.com>
4678
4679 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4680 (resume_stopped_resumed_lwps): New function.
4681 (linux_wait_for_event_filtered): Use it.
4682
8cc73a39
SDJ
46832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4684
4685 * Makefile.in (SFILES): Add linux-personality.c.
4686 (linux-personality.o): New rule.
4687 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4688 list of objects to be built.
4689 * linux-low.c: Include nat/linux-personality.h.
4690 (linux_create_inferior): Remove code to disable address space
4691 randomization (moved to ../nat/linux-personality.c). Create
4692 cleanup to disable address space randomization.
4693
fb23d554
SDJ
46942015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4695
4696 * Makefile.in (posix-strerror.o): New rule.
4697 (mingw-strerror.o): Likewise.
4698 * configure: Regenerated.
4699 * configure.ac: Source file ../common/common.host. Initialize new
4700 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4701
cdf43629
YQ
47022015-01-14 Yao Qi <yao@codesourcery.com>
4703
4704 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4705 (ppc-linux.o): New rule.
4706 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4707 * configure.ac: AC_CHECK_FUNCS(getauxval).
4708 * config.in: Re-generated.
4709 * configure: Re-generated.
4710 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4711 ppc64_64bit_inferior_p
4712
514c5338
YQ
47132015-01-14 Yao Qi <yao@codesourcery.com>
4714
4715 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4716 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4717 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4718 (PT_ORIG_R3, PT_TRAP): Likewise.
4719 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4720 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4721 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4722
3368c1e5
JB
47232015-01-10 Joel Brobecker <brobecker@adacore.com>
4724
4725 * i387-fp.c (i387_cache_to_xsave): In look over
4726 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4727 zmmh_low_space field by use of zmmh_high_space.
4728
582511be
PA
47292015-01-09 Pedro Alves <palves@redhat.com>
4730
4731 * linux-low.c (step_over_bkpt): Move higher up in the file.
4732 (handle_extended_wait): Don't store the stop_pc here.
4733 (get_stop_pc): Adjust comments and rename to ...
4734 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4735 stopped for a software breakpoint or hardware breakpoint.
4736 (thread_still_has_status_pending_p): New function.
4737 (status_pending_p_callback): Use
4738 thread_still_has_status_pending_p. If the event is no longer
4739 interesting, resume the LWP.
4740 (handle_tracepoints): Add assert.
4741 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4742 (wstatus_maybe_breakpoint): New function.
4743 (cancel_breakpoint): Delete function.
4744 (check_stopped_by_watchpoint): New function, factored out from
4745 linux_low_filter_event.
4746 (lp_status_maybe_breakpoint): Delete function.
4747 (linux_low_filter_event): Remove filter_ptid argument.
4748 Leave thread group exits pending here. Store the LWP's stop PC.
4749 Always leave events pending.
4750 (linux_wait_for_event_filtered): Pull all events out of the
4751 kernel, and leave them all pending.
4752 (count_events_callback, select_event_lwp_callback): Consider all
4753 events.
4754 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4755 (select_event_lwp): Only give preference to the stepping LWP in
4756 all-stop mode. Adjust comments.
4757 (ignore_event): New function.
4758 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4759 references to cancel_breakpoints. Adjust to renames. Also give
4760 equal priority to all LWPs that have had events in non-stop mode.
4761 If reporting a software breakpoint event, unadjust the LWP's PC.
4762 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4763 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4764 Adjust.
4765 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4766 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4767 (linux_stopped_by_watchpoint): Adjust.
4768 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4769 * linux-low.h (enum lwp_stop_reason): New.
4770 (struct lwp_info) <stop_pc>: Adjust comment.
4771 <stopped_by_watchpoint>: Delete field.
4772 <stop_reason>: New field.
4773 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4774 * mem-break.c (software_breakpoint_inserted_here)
4775 (hardware_breakpoint_inserted_here): New function.
4776 * mem-break.h (software_breakpoint_inserted_here)
4777 (hardware_breakpoint_inserted_here): Declare.
4778 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4779 (cancel_breakpoints): Delete.
4780 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4781 (upload_fast_traceframes): Remove references to
4782 cancel_breakpoints.
4783
a33e3959
PA
47842015-01-09 Pedro Alves <palves@redhat.com>
4785
4786 * thread-db.c (find_new_threads_callback): Ignore thread if the
4787 kernel thread ID is -1.
4788
8784d563
PA
47892015-01-09 Pedro Alves <palves@redhat.com>
4790
4791 * linux-low.c (linux_attach_fail_reason_string): Move to
4792 nat/linux-ptrace.c, and rename.
4793 (linux_attach_lwp): Update comment.
4794 (attach_proc_task_lwp_callback): New function.
4795 (linux_attach): Adjust to rename and use
4796 linux_proc_attach_tgid_threads.
4797 (linux_attach_fail_reason_string): Delete declaration.
4798
76f2b779
JB
47992015-01-01 Joel Brobecker <brobecker@adacore.com>
4800
4801 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4802 * server.c (gdbserver_version): Likewise.
4803
fafcc06a
SDJ
48042014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4805
4806 * remote-utils.c: Include ctype.h.
4807 (input_interrupt): Explicitly handle the case when the char
4808 received is the NUL byte. Improve the printing of non-ASCII
4809 characters.
4810
beed38b8
JB
48112014-12-16 Joel Brobecker <brobecker@adacore.com>
4812
4813 * linux-low.c (linux_low_filter_event): Update call to
4814 linux_enable_event_reporting following the addition of
4815 a new parameter to that function.
4816
bf330350
CU
48172014-12-16 Catalin Udma <catalin.udma@freescale.com>
4818
4819 PR server/17457
4820 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4821 (AARCH64_FPCR_REGNO): Likewise.
4822 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4823 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4824 (aarch64_store_fpregset): Likewise.
4825
5227d625
JB
48262014-12-15 Joel Brobecker <brobecker@adacore.com>
4827
4828 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4829 Remove FIXME comment about assumption about N.
4830
f93b65a0
JB
48312014-12-13 Joel Brobecker <brobecker@adacore.com>
4832
4833 * configure.ac: If large-file support is disabled in GDBserver,
4834 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4835 * configure: Regenerate.
4836
e5a9158d
AA
48372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4838
4839 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4840 warning upon ENODATA from ptrace.
4841 * linux-s390-low.c (s390_store_tdb): New.
4842 (s390_regsets): Add regset for NT_S390_TDB.
4843
feea5f36
AA
48442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4845
4846 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4847 without a fill_function.
4848 * linux-s390-low.c (s390_fill_last_break): Remove.
4849 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4850 (s390_arch_setup): Use regset's size instead of fill_function for
4851 loop end condition.
4852
098dbe61
AA
48532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4854
4855 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4856 the regset's store function when ptrace returned an error.
4857 * regcache.c (get_thread_regcache): Invalidate register cache
4858 before fetching inferior's registers.
4859
28eef672
AA
48602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4861
4862 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4863 while-loop as for-loop.
4864 (regsets_store_inferior_registers): Likewise.
4865
bdca27a2
YQ
48662014-11-28 Yao Qi <yao@codesourcery.com>
4867
4868 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4869 * config.in, configure: Re-generate.
4870 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4871 is defined.
4872
9c232dda
YQ
48732014-11-21 Yao Qi <yao@codesourcery.com>
4874
4875 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4876 (AC_CHECK_HEADERS): Remove malloc.h.
4877 * configure: Re-generated.
4878 * config.in: Re-generated.
4879 * server.h: Don't include alloca.h and malloc.h.
4880 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4881 Don't include malloc.h.
4882
43968415
JB
48832014-11-17 Joel Brobecker <brobecker@adacore.com>
4884
4885 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4886 corresponding ERRNO check in same block.
4887
40e91bc7
PA
48882014-11-12 Pedro Alves <palves@redhat.com>
4889
4890 * server.c (cont_thread): Update comment.
4891 (start_inferior, attach_inferior): No longer clear cont_thread.
4892 (handle_v_cont): No longer set cont_thread.
4893 (captured_main): Clear cont_thread each time a GDB connects.
4894
c2c118cf
PA
48952014-11-12 Pedro Alves <palves@redhat.com>
4896
4897 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4898 thread, and don't resume all threads if the Hc thread has exited.
4899
78708b7c
PA
49002014-11-12 Pedro Alves <palves@redhat.com>
4901
4902 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4903 the process group instead of to a specific LWP.
4904
a2abc7de
PA
49052014-10-15 Pedro Alves <palves@redhat.com>
4906
4907 PR server/17487
4908 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4909 parameter.
4910 (arm_set_thread_context): Delete.
4911 (the_low_target): Adjust.
4912 * win32-i386-low.c (debug_registers_changed)
4913 (debug_registers_used): Delete.
4914 (update_debug_registers_callback): New function.
4915 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4916 needing to update their debug registers.
4917 (win32_get_current_dr): New function.
4918 (x86_dr_low_get_addr, x86_dr_low_get_control)
4919 (x86_dr_low_get_status): Fetch the debug register from the thread
4920 record's context.
4921 (i386_initial_stuff): Adjust.
4922 (i386_get_thread_context): Remove current_event parameter. Don't
4923 clear debug_registers_changed nor copy DR values to
4924 debug_reg_state.
4925 (i386_set_thread_context): Delete.
4926 (i386_prepare_to_resume): New function.
4927 (i386_thread_added): Mark the thread as needing to update irs
4928 debug registers.
4929 (the_low_target): Remove i386_set_thread_context and install
4930 i386_prepare_to_resume.
4931 * win32-low.c (win32_get_thread_context): Adjust.
4932 (win32_set_thread_context): Use SetThreadContext
4933 directly.
4934 (win32_prepare_to_resume): New function.
4935 (win32_require_context): New function, factored out from ...
4936 (thread_rec): ... this.
4937 (continue_one_thread): Call win32_prepare_to_resume on each thread
4938 we're about to continue.
4939 (win32_resume): Call win32_prepare_to_resume on the event thread.
4940 * win32-low.h (struct win32_thread_info)
4941 <debug_registers_changed>: New field.
4942 (struct win32_target_ops): Change prototype of set_thread_context,
4943 delete set_thread_context and add prepare_to_resume.
4944 (win32_require_context): New declaration.
4945
a442d071
GB
49462014-10-08 Gary Benson <gbenson@redhat.com>
4947
4948 * server.h: Do not include common-exceptions.h.
4949
6f1947e8
GB
49502014-10-08 Gary Benson <gbenson@redhat.com>
4951
4952 * server.h: Do not include cleanups.h.
4953
63b434a4
JH
49542014-09-30 James Hogan <james.hogan@imgtec.com>
4955
4956 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4957 mips64-dsp-linux.c.
4958
c4d9ceb6
YQ
49592014-09-23 Yao Qi <yao@codesourcery.com>
4960
4961 * linux-low.c (lp_status_maybe_breakpoint): New function.
4962 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4963 (count_events_callback): Likewise.
4964 (select_event_lwp_callback): Likewise.
4965 (cancel_breakpoints_callback): Likewise.
4966
89a5711c
DB
49672014-09-19 Don Breazeal <donb@codesourcery.com>
4968
4969 * linux-low.c (handle_extended_wait): Call
4970 linux_ptrace_get_extended_event.
4971 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4972 linux_is_extended_waitstatus.
4973
bffc0964
JB
49742014-09-16 Joel Brobecker <brobecker@adacore.com>
4975
4976 * Makefile.in (CPPFLAGS): Define.
4977 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4978 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4979
0bfdf32f
GB
49802014-09-16 Gary Benson <gbenson@redhat.com>
4981
4982 * inferiors.h (current_inferior): Renamed as...
4983 (current_thread): New variable. All uses updated.
4984 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4985 (maybe_move_out_of_jump_pad): Likewise.
4986 (cancel_breakpoint): Likewise.
4987 (linux_low_filter_event): Likewise.
4988 (wait_for_sigstop): Likewise.
4989 (linux_resume_one_lwp): Likewise.
4990 (need_step_over_p): Likewise.
4991 (start_step_over): Likewise.
4992 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4993 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4994 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4995 and save_inferior as saved_thread.
4996 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4997 saved_thread.
4998 (regcache_invalidate_thread): Likewise.
4999 * remote-utils.c (prepare_resume_reply): Likewise.
5000 * thread-db.c (thread_db_get_tls_address): Likewise.
5001 (disable_thread_event_reporting): Likewise.
5002 (remove_thread_event_breakpoints): Likewise.
5003 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5004 as saved_thread.
5005 * target.h (set_desired_inferior): Renamed as...
5006 (set_desired_thread): New declaration. All uses updated.
5007 * server.c (myresume): Updated comment to reference thread instead
5008 of inferior.
5009 (handle_serial_event): Likewise.
5010 (handle_target_event): Likewise.
5011
361c8ade
GB
50122014-09-12 Tom Tromey <tromey@redhat.com>
5013 Gary Benson <gbenson@redhat.com>
5014
5015 * regcache.h: Include common-regcache.h.
5016 (regcache_read_pc): Don't declare.
5017 * regcache.c (get_thread_regcache_for_ptid): New function.
5018
bd9269f7
GB
50192014-09-11 Tom Tromey <tromey@redhat.com>
5020 Gary Benson <gbenson@redhat.com>
5021
5022 * symbol.c: New file.
5023 * Makefile.in (SFILES): Add symbol.c.
5024 (OBS): Add symbol.o.
5025
f8c1d06b
GB
50262014-09-11 Gary Benson <gbenson@redhat.com>
5027
5028 * target.c (target_stop_ptid, target_continue_ptid): New
5029 functions.
5030
721ec300
GB
50312014-09-11 Tom Tromey <tromey@redhat.com>
5032 Gary Benson <gbenson@redhat.com>
5033
5034 * target.h: Include target/target.h.
5035 * target.c (target_read_memory, target_read_uint32)
5036 (target_write_memory): New functions.
5037
c5e92cca
GB
50382014-09-11 Gary Benson <gbenson@redhat.com>
5039
5040 * server.h (debug_hw_points): Don't declare.
5041 * server.c (debug_hw_points): Don't define. Replace all uses
5042 with show_debug_regs.
5043 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5044 all uses with show_debug_regs.
5045
2e4bb98a
EBM
50462014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5047
5048 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5049 endianness into account.
5050 (ppc_supply_ptrace_register): Likewise.
5051
ac740bc7
JH
50522014-09-03 James Hogan <james.hogan@imgtec.com>
5053
5054 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5055 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5056
97ea6506
GB
50572014-09-03 Gary Benson <gbenson@redhat.com>
5058
5059 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5060 ALL_DEBUG_ADDRESS_REGISTERS.
5061
df7e5265
GB
50622014-09-02 Gary Benson <gbenson@redhat.com>
5063
5064 * i386-low.h: Renamed as...
5065 * x86-low.h: New file. All type, function and variable name
5066 prefixes changed from "i386_" to "x86_". All references updated.
5067 * i386-low.c: Renamed as...
5068 * x86-low.c: New file. All type, function and variable name
5069 prefixes changed from "i386_" to "x86_". All references updated.
5070
ed859da7
GB
50712014-09-02 Gary Benson <gbenson@redhat.com>
5072
5073 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5074 (x86_linux_new_thread): Likewise.
5075
860789c7
GB
50762014-08-29 Gary Benson <gbenson@redhat.com>
5077
5078 * server.h (setjmp.h): Do not include.
5079 (toplevel): Do not declare.
5080 (common-exceptions.h): Include.
5081 (cleanups.h): Likewise.
5082 * server.c (toplevel): Do not define.
5083 (exit_code): New static global.
5084 (detach_or_kill_for_exit_cleanup): New function.
5085 (main): New function. Original main renamed to...
5086 (captured_main): New function.
5087 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5088
ff55e1b5
GB
50892014-08-29 Gary Benson <gbenson@redhat.com>
5090
5091 * Makefile.in (SFILES): Add common/common-exceptions.c.
5092 (OBS): Add common-exceptions.o.
5093 (common-exceptions.o): New rule.
5094 * utils.c (prepare_to_throw_exception): New function.
5095
e9bcb658
GB
50962014-08-29 Gary Benson <gbenson@redhat.com>
5097
5098 * config.in: Regenerate.
5099 * configure: Likewise.
5100
e3180625
GB
51012014-08-29 Gary Benson <gbenson@redhat.com>
5102
5103 * Makefile.in (SFILES): Add common/cleanups.c.
5104 (OBS): cleanups.o.
5105 (cleanups.o): New rule.
5106
e3d6ba5d
GB
51072014-08-29 Gary Benson <gbenson@redhat.com>
5108
5109 * utils.c (internal_vwarning): New function.
5110
7096e886
GB
51112014-08-28 Gary Benson <gbenson@redhat.com>
5112
5113 * utils.h (fatal): Remove declaration.
5114 * utils.c (fatal): Remove function.
5115
14ce3192
GB
51162014-08-28 Gary Benson <gbenson@redhat.com>
5117
5118 * tracepoint.c (gdb_agent_init): Replace fatal with
5119 perror_with_name.
5120 (initialize_tracepoint): Likewise.
5121
50278d59
GB
51222014-08-28 Gary Benson <gbenson@redhat.com>
5123
5124 * remote-utils.c (remote_prepare): Replace fatal with error.
5125
aa96c426
GB
51262014-08-28 Gary Benson <gbenson@redhat.com>
5127
5128 * linux-low.c (linux_async): Replace fatal with warning.
5129 Tidy up and return.
5130 (linux_start_non_stop): Return -1 if linux_async failed.
5131
f7160e97
GB
51322014-08-28 Gary Benson <gbenson@redhat.com>
5133
5134 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5135 gdb_assert.
5136 (i386_dr_low_get_addr): Remove vague comment.
5137 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5138 gdb_assert.
5139
38e08fca
GB
51402014-08-28 Gary Benson <gbenson@redhat.com>
5141
5142 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5143 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5144 internal_error.
5145 (linux_resume_one_lwp): Likewise.
5146 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5147 gdb_assert.
5148 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5149 with internal_error.
5150 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5151 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5152 (find_register_by_name): Replace fatal with internal_error.
5153 (find_regno): Likewise.
5154 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5155 * thread-db.c (thread_db_create_event): Likewise.
5156 (thread_db_load_search): Likewise.
5157 (try_thread_db_load_1): Likewise.
5158 * tracepoint.c (get_jump_space_head): Replace fatal with
5159 internal_error.
5160 (claim_trampoline_space): Likewise.
5161 (have_fast_tracepoint_trampoline_buffer): Likewise.
5162 (cmd_qtstart): Likewise.
5163 (stop_tracing): Likewise.
5164 (fast_tracepoint_collecting): Likewise.
5165 (target_malloc): Likewise.
5166 (download_tracepoint): Likewise.
5167 (download_trace_state_variables): Replace check with gdb_assert.
5168 (upload_fast_traceframes): Replace fatal with internal_error.
5169
34abf635
GB
51702014-08-19 Tom Tromey <tromey@redhat.com>
5171 Gary Benson <gbenson@redhat.com>
5172
5173 * Makefile.in (SFILES): Add common/common-debug.c.
5174 (OBS): Add common-debug.o.
5175 (common-debug.o): New rule.
5176 * debug.h (debug_printf): Don't declare.
5177 * debug.c (debug_printf): Renamed and rewritten as...
5178 (debug_vprintf): New function.
5179
f6e94d78
GB
51802014-08-19 Gary Benson <gbenson@redhat.com>
5181
5182 * utils.h: Do not include print-utils.h.
5183
9239eeab
GB
51842014-08-19 Tom Tromey <tromey@redhat.com>
5185 Gary Benson <gbenson@redhat.com>
5186
5187 * server.h: Add static assertion.
5188 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5189
ef87c8bb
GB
51902014-08-19 Tom Tromey <tromey@redhat.com>
5191 Gary Benson <gbenson@redhat.com>
5192
5193 * Makefile.in (SFILES): Add common/errors.c.
5194 (OBS): Add errors.o.
5195 (IPA_OBS): Add errors-ipa.o.
5196 (errors.o): New rule.
5197 (errors-ipa.o): Likewise.
5198 * utils.h (perror_with_name, error, warning): Don't declare.
5199 * utils.c (warning): Renamed and rewritten as...
5200 (vwarning): New function.
5201 (error): Renamed and rewritten as...
5202 (verror): New function.
5203 (internal_error): Renamed and rewritten as...
5204 (internal_verror): New function.
5205
bb974a24
GB
52062014-08-07 Gary Benson <gbenson@redhat.com>
5207
5208 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5209 * configure: Regenerate.
5210 * config.in: Likewise.
5211 * server.h: Do not include errno.h.
5212 * event-loop.c: Likewise.
5213 * hostio-errno.c: Likewise.
5214 * linux-low.c: Likewise.
5215 * remote-utils.c: Likewise.
5216 * spu-low.c: Likewise.
5217 * utils.c: Likewise.
5218 * gdbreplay.c: Unconditionally include errno.h.
5219
6d3d12eb
GB
52202014-08-07 Gary Benson <gbenson@redhat.com>
5221
5222 * server.h: Do not include string.h.
5223 * event-loop.c: Likewise.
5224 * linux-low.c: Likewise.
5225 * regcache.c: Likewise.
5226 * remote-utils.c: Likewise.
5227 * spu-low.c: Likewise.
5228 * utils.c: Likewise.
5229
dccbb609
GB
52302014-08-07 Gary Benson <gbenson@redhat.com>
5231
5232 * server.h: Do not include gdb_assert.h.
5233
e76df0d0
GB
52342014-08-07 Gary Benson <gbenson@redhat.com>
5235
5236 * server.h: Do not include common-utils.h.
5237
4cb9c816
GB
52382014-08-07 Gary Benson <gbenson@redhat.com>
5239
5240 * server.h: Do not include ptid.h.
5241 * notif.h: Likewise.
5242
3995eeee
GB
52432014-08-07 Gary Benson <gbenson@redhat.com>
5244
5245 * server.h: Do not include gdb_locale.h.
5246
cb9f1a9b
GB
52472014-08-07 Gary Benson <gbenson@redhat.com>
5248
5249 * server.h: Do not include gdb/signals.h.
5250 * win32-low.c: Likewise.
5251
a5fceff8
GB
52522014-08-07 Gary Benson <gbenson@redhat.com>
5253
5254 * server.h: Do not include pathmax.h.
5255
b9391142
GB
52562014-08-07 Gary Benson <gbenson@redhat.com>
5257
5258 * server.h: Do not include libiberty.h.
5259 * linux-bfin-low.c: Likewise.
5260
0e443c87
GB
52612014-08-07 Gary Benson <gbenson@redhat.com>
5262
5263 * server.h: Do not include ansidecl.h.
5264
8ebb3f56
GB
52652014-08-07 Gary Benson <gbenson@redhat.com>
5266
5267 * linux-x86-low.c: Do not include stddef.h.
5268 * lynx-ppc-low.c: Likewise.
5269 * tracepoint.c: Likewise.
5270
8980bdf6
GB
52712014-08-07 Gary Benson <gbenson@redhat.com>
5272
5273 * server.h: Do not include stdarg.h.
5274 * nto-low.c: Likewise.
5275
d7096f71
GB
52762014-08-07 Gary Benson <gbenson@redhat.com>
5277
5278 * server.h: Do not include stdlib.h.
5279 * inferiors.c: Likewise.
5280 * linux-low.c: Likewise.
5281 * regcache.c: Likewise.
5282 * spu-low.c: Likewise.
5283 * tracepoint.c: Likewise.
5284 * utils.c: Likewise.
5285
d02f550d
GB
52862014-08-07 Gary Benson <gbenson@redhat.com>
5287
5288 * server.h: Do not include stdio.h.
5289 * linux-low.c: Likewise.
5290 * remote-utils.c: Likewise.
5291 * spu-low.c: Likewise.
5292 * utils.c: Likewise.
5293 * wincecompat.c: Likewise.
5294
87f6c4e3
GB
52952014-08-06 Gary Benson <gbenson@redhat.com>
5296
5297 * regcache.c (init_register_cache): Move conditionals inside if.
5298
7089dca4
GB
52992014-08-06 Gary Benson <gbenson@redhat.com>
5300
5301 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5302
462f517e
GB
53032014-07-31 Gary Benson <gbenson@redhat.com>
5304
5305 * ax.h: Do not include server.h.
5306 * gdbthread.h: Likewise.
5307 * lynx-low.h: Likewise.
5308 * notif.h: Likewise.
5309
976411d6
GB
53102014-07-30 Gary Benson <gbenson@redhat.com>
5311
5312 * server.h: Include common-defs.h.
5313 Do not include config.h or build-gnulib-gdbserver/config.h.
5314
d41f6d8e
GB
53152014-07-30 Gary Benson <gbenson@redhat.com>
5316
5317 * hostio-errno.c: Move server.h to top of includes list.
5318 * inferiors.c: Likewise.
5319 * linux-x86-low.c: Likewise.
5320 * notif.c: Include server.h.
5321
314c6a35
TT
53222014-07-24 Tom Tromey <tromey@redhat.com>
5323 Gary Benson <gbenson@redhat.com>
5324
5325 * server.h (CORE_ADDR): Now unsigned.
5326
69ff6be5
PA
53272014-07-16 Pedro Alves <palves@redhat.com>
5328
5329 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5330
ce9e3fe7
PA
53312014-07-15 Pedro Alves <palves@redhat.com>
5332
5333 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5334 copy.
5335
e76126e8
PA
53362014-07-11 Pedro Alves <palves@redhat.com>
5337
5338 * linux-low.c (kill_wait_lwp): New function, based on
5339 kill_one_lwp_callback, but use my_waitpid directly.
5340 (kill_one_lwp_callback, linux_kill): Use it.
5341
8e9db26e
PA
53422014-06-23 Pedro Alves <palves@redhat.com>
5343
5344 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5345 before setting DR0..DR3.
5346
698b3e08
GB
53472014-06-20 Gary Benson <gbenson@redhat.com>
5348
5349 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5350 * configure: Regenerated.
5351 * config.in: Likewise.
5352
125f8a3d
GB
53532014-06-20 Gary Benson <gbenson@redhat.com>
5354
5355 * Makefile.in (SFILES): Update locations for files moved
5356 from common to nat.
5357 (object file files): Reordered.
5358
42995dbd
GB
53592014-06-20 Gary Benson <gbenson@redhat.com>
5360
5361 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5362 (i386_dr_low_set_addr): Likewise.
5363 (i386_dr_low_get_addr): Likewise.
5364 (i386_dr_low_can_set_control): Likewise.
5365 (i386_dr_low_set_control): Likewise.
5366 (i386_dr_low_get_control): Likewise.
5367 (i386_dr_low_get_status): Likewise.
5368 (i386_get_debug_register_length): Likewise.
5369 * linux-x86-low.c (i386_dr_low_set_addr):
5370 Changed signature. Made static.
5371 (i386_dr_low_get_addr): Likewise.
5372 (i386_dr_low_set_control): Likewise.
5373 (i386_dr_low_get_control): Likewise.
5374 (i386_dr_low_get_status): Likewise.
5375 (i386_dr_low): New global variable.
5376 * win32-i386-low.c (i386_dr_low_set_addr):
5377 Changed signature. Made static.
5378 (i386_dr_low_get_addr): Likewise.
5379 (i386_dr_low_set_control): Likewise.
5380 (i386_dr_low_get_control): Likewise.
5381 (i386_dr_low_get_status): Likewise.
5382 (i386_dr_low): New global variable.
5383
e1d2394b
MS
53842014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5385
5386 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5387 * Makefile.in (AR, AR_FLAGS): Define.
5388 * configure: Regenerate.
5389
3a8ee006
GB
53902014-06-19 Gary Benson <gbenson@redhat.com>
5391
5392 * Makefile.in (i386-dregs.o): New rule.
5393 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5394 * i386-low.c (target.h): Remove include.
5395 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5396 (DR_CONTROL_SHIFT): Likewise.
5397 (DR_CONTROL_SIZE): Likewise.
5398 (DR_RW_EXECUTE): Likewise.
5399 (DR_RW_WRITE): Likewise.
5400 (DR_RW_READ): Likewise.
5401 (DR_RW_IORW): Likewise.
5402 (DR_LEN_1): Likewise.
5403 (DR_LEN_2): Likewise.
5404 (DR_LEN_4): Likewise.
5405 (DR_LEN_8): Likewise.
5406 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5407 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5408 (DR_ENABLE_SIZE): Likewise.
5409 (DR_LOCAL_SLOWDOWN): Likewise.
5410 (DR_GLOBAL_SLOWDOWN): Likewise.
5411 (DR_CONTROL_RESERVED): Likewise.
5412 (I386_DR_CONTROL_MASK): Likewise.
5413 (I386_DR_VACANT): Likewise.
5414 (I386_DR_LOCAL_ENABLE): Likewise.
5415 (I386_DR_GLOBAL_ENABLE): Likewise.
5416 (I386_DR_DISABLE): Likewise.
5417 (I386_DR_SET_RW_LEN): Likewise.
5418 (I386_DR_GET_RW_LEN): Likewise.
5419 (I386_DR_WATCH_HIT): Likewise.
5420 (i386_wp_op_t): Likewise.
5421 (i386_show_dr): Likewise.
5422 (i386_length_and_rw_bits): Likewise.
5423 (i386_insert_aligned_watchpoint): Likewise.
5424 (i386_remove_aligned_watchpoint): Likewise.
5425 (i386_handle_nonaligned_watchpoint): Likewise.
5426 i386_update_inferior_debug_regs(): Likewise.
5427 (i386_dr_insert_watchpoint): Likewise.
5428 (i386_dr_remove_watchpoint): Likewise.
5429 (i386_dr_region_ok_for_watchpoint): Likewise.
5430 (i386_dr_stopped_data_address): Likewise.
5431 (i386_dr_stopped_by_watchpoint): Likewise.
5432
8f26655c
GB
54332014-06-19 Gary Benson <gbenson@redhat.com>
5434
5435 * i386-low.c (i386_dr_show): Renamed to
5436 i386_show_dr and made static. All uses updated.
5437 (i386_dr_length_and_rw_bits): Renamed to
5438 i386_length_and_rw_bits and made static.
5439 All uses updated.
5440 (i386_dr_insert_aligned_watchpoint): Renamed to
5441 i386_insert_aligned_watchpoint and made static.
5442 All uses updated.
5443 (i386_dr_remove_aligned_watchpoint): Renamed to
5444 i386_remove_aligned_watchpoint and made static.
5445 All uses updated.
5446 (i386_dr_update_inferior_debug_regs): Renamed to
5447 i386_update_inferior_debug_regs and made static.
5448 All uses updated.
5449
b9228891
GB
54502014-06-18 Gary Benson <gbenson@redhat.com>
5451
5171def3
GB
5452 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5453 (i386_dr_low_can_set_control): Likewise.
5454 (i386_get_debug_register_length): Likewise.
5455 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5456 (i386_dr_low_can_set_control): Likewise.
5457 (i386_get_debug_register_length): Likewise.
5458
54592014-06-17 Gary Benson <gbenson@redhat.com>
5460
b9228891
GB
5461 * i386-low.h (i386-dregs.h): New include.
5462 (DR_FIRSTADDR): Now in i386-dregs.h.
5463 (DR_LASTADDR): Likewise.
5464 (DR_NADDR): Likewise.
5465 (DR_STATUS): Likewise.
5466 (DR_CONTROL): Likewise.
5467 (i386_debug_reg_state): Likewise.
5468 (i386_dr_insert_watchpoint): Likewise.
5469 (i386_dr_remove_watchpoint): Likewise.
5470 (i386_dr_region_ok_for_watchpoint): Likewise.
5471 (i386_dr_stopped_data_address): Likewise.
5472 (i386_dr_stopped_by_watchpoint): Likewise.
5473 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5474
4be83cc2
GB
54752014-06-18 Gary Benson <gbenson@redhat.com>
5476
5477 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5478 i386_dr_insert_watchpoint.
5479 (i386_low_remove_watchpoint): Renamed to
5480 i386_dr_remove_watchpoint.
5481 (i386_low_region_ok_for_watchpoint): Renamed to
5482 i386_dr_region_ok_for_watchpoint.
5483 (i386_low_stopped_data_address): Renamed to
5484 i386_dr_stopped_data_address.
5485 (i386_low_stopped_by_watchpoint): Renamed to
5486 i386_dr_stopped_by_watchpoint.
5487 * i386-low.c (i386_show_dr): Renamed to
5488 i386_dr_show and made nonstatic. All uses updated.
5489 (i386_length_and_rw_bits): Renamed to
5490 i386_dr_length_and_rw_bits and made nonstatic.
5491 All uses updated.
5492 (i386_insert_aligned_watchpoint): Renamed to
5493 i386_dr_insert_aligned_watchpoint and made nonstatic.
5494 All uses updated.
5495 (i386_remove_aligned_watchpoint): Renamed to
5496 i386_dr_remove_aligned_watchpoint and made nonstatic.
5497 All uses updated.
5498 (i386_update_inferior_debug_regs): Renamed to
5499 i386_dr_update_inferior_debug_regs and made nonstatic.
5500 All uses updated.
5501 (i386_low_insert_watchpoint): Renamed to
5502 i386_dr_insert_watchpoint. All uses updated.
5503 (i386_low_remove_watchpoint): Renamed to
5504 i386_dr_remove_watchpoint. All uses updated.
5505 (i386_low_region_ok_for_watchpoint): Renamed to
5506 i386_dr_region_ok_for_watchpoint. All uses updated.
5507 (i386_low_stopped_data_address): Renamed to
5508 i386_dr_stopped_data_address. All uses updated.
5509 (i386_low_stopped_by_watchpoint): Renamed to
5510 i386_dr_stopped_by_watchpoint. All uses updated.
5511
131aa0d4
GB
55122014-06-18 Gary Benson <gbenson@redhat.com>
5513
5514 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5515 (i386_dr_low_can_set_control): Likewise.
5516 (i386_insert_aligned_watchpoint): New check.
5517
d9305f7f
GB
55182014-06-18 Gary Benson <gbenson@redhat.com>
5519
5520 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5521 Renamed to state.
5522
e927c9fc
GB
55232014-06-18 Gary Benson <gbenson@redhat.com>
5524
5525 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5526 instead of fatal and error.
5527 (i386_handle_nonaligned_watchpoint): Likewise.
5528
1b6d4134
GB
55292014-06-18 Gary Benson <gbenson@redhat.com>
5530
5531 * i386-low.c (i386_get_debug_register_length): New macro.
5532 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5533 (i386_show_dr): Use debug_printf instead of fprintf. Use
5534 phex to format values.
5535
6e62758f
GB
55362014-06-18 Gary Benson <gbenson@redhat.com>
5537
5538 * i386-low.h: Comment changes.
5539 * i386-low.c: Likewise.
5540
fc6e2f03
GB
55412014-06-18 Gary Benson <gbenson@redhat.com>
5542
5543 * i386-low.c: Whitespace changes.
5544
f9d1eeed
TT
55452014-06-12 Tom Tromey <tromey@redhat.com>
5546
5547 * utils.c (freeargv): Remove.
5548
0b04e523
TT
55492014-06-12 Tom Tromey <tromey@redhat.com>
5550
5551 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5552 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5553 (parse_debug_format_options): Likewise.
5554 (gdbserver_usage): Likewise.
5555 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5556 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5557 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5558 against libiberty.
5559 ($(LIBGNU)): Depend on libiberty.
5560 (all-lib): Recurse into all subdirs.
5561 (install-only): Invoke "install" target in subdirs.
5562 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5563 targets.
5564 * configure: Rebuild.
5565 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5566 for vasprintf, vsnprintf, or gettimeofday.
5567 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5568 srv_tgtobj.
5569
270c9937
JB
55702014-06-05 Joel Brobecker <brobecker@adacore.com>
5571
5572 * development.sh: Delete.
5573 * Makefile.in (config.status): Adjust dependency on development.sh.
5574 * configure.ac: Adjust development.sh source call.
5575 * configure: Regenerate.
5576
0a261ed8
PA
55772014-06-02 Pedro Alves <palves@redhat.com>
5578
5579 * ax.c (gdb_free_agent_expr): New function.
5580 * ax.h (gdb_free_agent_expr): New declaration.
5581 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5582 list.
5583 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5584 static.
5585 (clear_breakpoint_conditions_and_commands): New function.
5586 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5587 (clear_breakpoint_conditions_and_commands): New declaration.
5588
e9dae05e
RR
55892014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5590
5591 * linux-aarch64-low.c (asm/ptrace.h): Include.
5592
5876f503
JK
55932014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5594
5595 Fix TLS access for -static -pthread.
5596 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5597 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5598 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5599
802e8e6d
PA
56002014-05-20 Pedro Alves <palves@redhat.com>
5601
5602 * linux-aarch64-low.c (aarch64_insert_point)
5603 (aarch64_remove_point): No longer check whether the type is
5604 supported here. Adjust to new interface.
5605 (the_low_target): Install aarch64_supports_z_point_type as
5606 supports_z_point_type method.
5607 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5608 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5609 instead of a Z packet char. Adjust.
5610 (arm_supports_z_point_type): New function.
5611 (arm_insert_point, arm_remove_point): Adjust to new interface.
5612 (the_low_target): Install arm_supports_z_point_type.
5613 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5614 (cris_insert_point, cris_remove_point): Adjust to new interface.
5615 Don't check whether the type is supported here.
5616 (the_low_target): Install cris_supports_z_point_type.
5617 * linux-low.c (linux_supports_z_point_type): New function.
5618 (linux_insert_point, linux_remove_point): Adjust to new interface.
5619 * linux-low.h (struct linux_target_ops) <insert_point,
5620 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5621 raw_breakpoint pointer parameter.
5622 <supports_z_point_type>: New method.
5623 * linux-mips-low.c (mips_supports_z_point_type): New function.
5624 (mips_insert_point, mips_remove_point): Adjust to new interface.
5625 Use mips_supports_z_point_type.
5626 (the_low_target): Install mips_supports_z_point_type.
5627 * linux-ppc-low.c (the_low_target): Install NULL as
5628 supports_z_point_type method.
5629 * linux-s390-low.c (the_low_target): Install NULL as
5630 supports_z_point_type method.
5631 * linux-sparc-low.c (the_low_target): Install NULL as
5632 supports_z_point_type method.
5633 * linux-x86-low.c (x86_supports_z_point_type): New function.
5634 (x86_insert_point): Adjust to new insert_point interface. Use
5635 insert_memory_breakpoint. Adjust to new
5636 i386_low_insert_watchpoint interface.
5637 (x86_remove_point): Adjust to remove_point interface. Use
5638 remove_memory_breakpoint. Adjust to new
5639 i386_low_remove_watchpoint interface.
5640 (the_low_target): Install x86_supports_z_point_type.
5641 * lynx-low.c (lynx_target_ops): Install NULL as
5642 supports_z_point_type callback.
5643 * nto-low.c (nto_supports_z_point_type): New.
5644 (nto_insert_point, nto_remove_point): Adjust to new interface.
5645 (nto_target_ops): Install nto_supports_z_point_type.
5646 * mem-break.c: Adjust intro comment.
5647 (struct raw_breakpoint) <raw_type, size>: New fields.
5648 <inserted>: Update comment.
5649 <shlib_disabled>: Delete field.
5650 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5651 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5652 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5653 (raw_bkpt_type_to_target_hw_bp_type): New function.
5654 (find_enabled_raw_code_breakpoint_at): New function.
5655 (find_raw_breakpoint_at): New type and size parameters. Use them.
5656 (insert_memory_breakpoint): New function, based off
5657 set_raw_breakpoint_at.
5658 (remove_memory_breakpoint): New function.
5659 (set_raw_breakpoint_at): Reimplement.
5660 (set_breakpoint): New, based on set_breakpoint_at.
5661 (set_breakpoint_at): Reimplement.
5662 (delete_raw_breakpoint): Go through the_target->remove_point
5663 instead of assuming memory breakpoints.
5664 (find_gdb_breakpoint_at): Delete.
5665 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5666 (find_gdb_breakpoint): New function.
5667 (set_gdb_breakpoint_at): Delete.
5668 (z_type_supported): New function.
5669 (set_gdb_breakpoint_1): New function, loosely based off
5670 set_gdb_breakpoint_at.
5671 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5672 (delete_gdb_breakpoint_at): Delete.
5673 (delete_gdb_breakpoint_1): New function, loosely based off
5674 delete_gdb_breakpoint_at.
5675 (delete_gdb_breakpoint): New function.
5676 (clear_gdb_breakpoint_conditions): Rename to ...
5677 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5678 breakpoint.
5679 (add_condition_to_breakpoint): Make static.
5680 (add_breakpoint_condition): Take a struct breakpoint pointer
5681 instead of an address. Adjust.
5682 (gdb_condition_true_at_breakpoint): Rename to ...
5683 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5684 z_type parameter.
5685 (gdb_condition_true_at_breakpoint): Reimplement.
5686 (add_breakpoint_commands): Take a struct breakpoint pointer
5687 instead of an address. Adjust.
5688 (gdb_no_commands_at_breakpoint): Rename to ...
5689 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5690 parameter. Return true if no breakpoint was found. Change debug
5691 output.
5692 (gdb_no_commands_at_breakpoint): Reimplement.
5693 (run_breakpoint_commands): Rename to ...
5694 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5695 and change return type to boolean.
5696 (run_breakpoint_commands): New function.
5697 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5698 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5699 breakpoint. Go through the_target->remove_point instead of
5700 assuming memory breakpoint.
5701 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5702 software and hardware breakpoints.
5703 (reinsert_raw_breakpoint): Go through the_target->insert_point
5704 instead of assuming memory breakpoint.
5705 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5706 software and hardware breakpoints.
5707 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5708 Check both software and hardware breakpoints.
5709 (validate_inserted_breakpoint): Assert the breakpoint is a
5710 software breakpoint. Set the inserted flag to -1 instead of
5711 setting shlib_disabled.
5712 (delete_disabled_breakpoints): Adjust.
5713 (validate_breakpoints): Only validate software breakpoints.
5714 Adjust to inserted flag change.
5715 (check_mem_read, check_mem_write): Skip breakpoint types other
5716 than software breakpoints. Adjust to inserted flag change.
5717 * mem-break.h (enum raw_bkpt_type): New enum.
5718 (raw_breakpoint, struct process_info): Forward declare.
5719 (Z_packet_to_target_hw_bp_type): Delete declaration.
5720 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5721 (set_gdb_breakpoint, delete_gdb_breakpoint)
5722 (clear_breakpoint_conditions): New declarations.
5723 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5724 (breakpoint_inserted_here): Update comment.
5725 (add_breakpoint_condition, add_breakpoint_commands): Replace
5726 address parameter with a breakpoint pointer parameter.
5727 (gdb_breakpoint_here): Update comment.
5728 (delete_gdb_breakpoint_at): Delete.
5729 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5730 * server.c (process_point_options): Take a struct breakpoint
5731 pointer instead of an address. Adjust.
5732 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5733 delete_gdb_breakpoint.
5734 * spu-low.c (spu_target_ops): Install NULL as
5735 supports_z_point_type method.
5736 * target.h: Include mem-break.h.
5737 (struct target_ops) <prepare_to_access_memory>: Update comment.
5738 <supports_z_point_type>: New field.
5739 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5740 instead of a char. Also take a raw breakpoint pointer.
5741 * win32-arm-low.c (the_low_target): Install NULL as
5742 supports_z_point_type.
5743 * win32-i386-low.c (i386_supports_z_point_type): New function.
5744 (i386_insert_point, i386_remove_point): Adjust to new interface.
5745 (the_low_target): Install i386_supports_z_point_type.
5746 * win32-low.c (win32_supports_z_point_type): New function.
5747 (win32_insert_point, win32_remove_point): Adjust to new interface.
5748 (win32_target_ops): Install win32_supports_z_point_type.
5749 * win32-low.h (struct win32_target_ops):
5750 <supports_z_point_type>: New method.
5751 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5752 instead of a char. Also take a raw breakpoint pointer.
5753
932539e3
PA
57542014-05-20 Pedro Alves <palves@redhat.com>
5755
5756 * mem-break.h: Include break-common.h.
5757 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5758 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5759 (Z_packet_to_target_hw_bp_type): New declaration.
5760 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5761 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5762 (Z_PACKET_ACCESS_WP): Delete macros.
5763 (Z_packet_to_hw_type): Delete function.
5764 * i386-low.h: Don't include break-common.h here.
5765 (Z_packet_to_hw_type): Delete declaration.
5766 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5767 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5768 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5769 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5770 * linux-aarch64-low.c: Don't include break-common.h here.
5771 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5772 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5773 (Z_packet_to_target_hw_bp_type): Delete function.
5774 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5775 function.
5776 (mips_insert_point, mips_remove_point): Use
5777 Z_packet_to_target_hw_bp_type.
5778
4ff0d3d8
PA
57792014-05-20 Pedro Alves <palves@redhat.com>
5780
5781 * linux-aarch64-low.c: Include break-common.h.
5782 (enum target_point_type): Delete.
5783 (Z_packet_to_point_type): Rename to ...
5784 (Z_packet_to_target_hw_bp_type): ... this, and return a
5785 target_hw_bp_type instead.
5786 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5787 instead of an enum target_point_type.
5788 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5789 breakpoint type.
5790 (aarch64_dr_state_insert_one_point)
5791 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5792 (aarch64_handle_aligned_watchpoint)
5793 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5794 Take an enum target_hw_bp_type instead of an enum
5795 target_point_type.
5796 (aarch64_supports_z_point_type): New function.
5797 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5798 use Z_packet_to_target_hw_bp_type.
5799
786dc519
JB
58002014-05-20 Joel Brobecker <brobecker@adacore.com>
5801
5802 * configure.ac: Only use -Werror by default when DEVELOPMENT
5803 is true.
5804 * configure: Regenerate.
5805
9e0aa64f
JK
58062014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5807
5808 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5809 * linux-x86-low.c (X86_64_USER_REGS): New.
5810 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5811
2b577b92
YQ
58122014-04-28 Yao Qi <yao@codesourcery.com>
5813
5814 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5815 name.
5816
94611da2
PA
58172014-04-25 Pedro Alves <palves@redhat.com>
5818
5819 PR server/16255
5820 * linux-low.c (linux_attach_fail_reason_string): New function.
5821 (linux_attach_lwp): Delete.
5822 (linux_attach_lwp_1): Rename to ...
5823 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5824 argument. Remove "initial" parameter. Return int instead of
5825 void. Don't error or warn here.
5826 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5827 failure to attach to the tgid. Call warning when failing to
5828 attach to an lwp.
5829 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5830 argument. Remove "initial" parameter. Return int instead of
5831 void. Don't error or warn here.
5832 (linux_attach_fail_reason_string): New declaration.
5833 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5834 interface change. Use linux_attach_fail_reason_string.
5835
01f9f808
MS
58362014-04-24 Michael Sturm <michael.sturm@mintel.com>
5837 Walfred Tedeschi <walfred.tedeschi@intel.com>
5838
5839 * Makefile.in: Added rules to handle new files
5840 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5841 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5842 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5843 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5844 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5845 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5846 x32-avx512-linux.o.
5847 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5848 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5849 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5850 i386/x32-avx512.xml.
5851 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5853 i386/x32-avx512-linux.xml.
5854 * i387-fp.c (num_avx512_k_registers): New constant for number
5855 of K registers.
5856 (num_avx512_zmmh_low_registers): New constant for number of
5857 lower ZMM registers (0-15).
5858 (num_avx512_zmmh_high_registers): New constant for number of
5859 higher ZMM registers (16-31).
5860 (num_avx512_ymmh_registers): New contant for number of higher
5861 YMM registers (ymm16-31 added by avx521 on x86_64).
5862 (num_avx512_xmm_registers): New constant for number of higher
5863 XMM registers (xmm16-31 added by AVX512 on x86_64).
5864 (struct i387_xsave): Add space for AVX512 registers.
5865 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5866 Add code to handle AVX512 registers.
5867 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5868 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5869 prototypei from generated file.
5870 (tdesc_amd64_avx512_linux): Likewise.
5871 (init_registers_x32_avx512_linux): Likewise.
5872 (tdesc_x32_avx512_linux): Likewise.
5873 (init_registers_i386_avx512_linux): Likewise.
5874 (tdesc_i386_avx512_linux): Likewise.
5875 (x86_64_regmap): Add AVX512 registers.
5876 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5877 mask.
5878 (initialize_low_arch): Add code to initialize AVX512 registers.
5879
51aa91f9
PA
58802014-04-23 Pedro Alves <palves@redhat.com>
5881
5882 * mem-break.c (find_gdb_breakpoint_at): Make static.
5883 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5884
a4165e94
PA
58852014-04-23 Pedro Alves <palves@redhat.com>
5886
5887 * i386-low.c: Don't include break-common.h here.
5888 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5889 prototype to take target_hw_bp_type as argument instead of a Z
5890 packet char.
5891 * i386-low.h: Include break-common.h here.
5892 (Z_packet_to_hw_type): Declare.
5893 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5894 prototypes.
5895 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5896 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5897 (x86_remove_point): Convert the packet number to a
5898 target_hw_bp_type before calling i386_low_remove_watchpoint.
5899 * win32-i386-low.c (i386_insert_point): Convert the packet number
5900 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5901 (i386_remove_point): Convert the packet number to a
5902 target_hw_bp_type before calling i386_low_remove_watchpoint.
5903
b8acf843
PA
59042014-04-23 Pedro Alves <palves@redhat.com>
5905
5906 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5907
d708bcd1
PA
59082014-04-10 Pedro Alves <palves@redhat.com>
5909
5910 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5911 Check if the condition or command is NULL before checking if the
5912 breakpoint is known. On success, return true.
5913 * mem-break.h (add_breakpoint_condition): Document return.
5914 (add_breakpoint_commands): Add describing comment.
5915 * server.c (skip_to_semicolon): New function.
5916 (process_point_options): Use it.
5917
2eec7d5b
PA
59182014-04-09 Pedro Alves <palves@redhat.com>
5919
5920 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5921 to lwpid_of.
5922
fa96cb38
PA
59232014-02-27 Pedro Alves <palves@redhat.com>
5924
5925 PR 12702
5926 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5927 macros.
5928 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5929 output.
5930 (last_thread_of_process_p): Take a PID argument instead of a
5931 thread pointer.
5932 (linux_wait_for_lwp): Delete.
5933 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5934 functions.
5935 (linux_low_filter_event): New function, party factored out from
5936 linux_wait_for_event.
5937 (linux_wait_for_event): Rename to ...
5938 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5939 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5940 sigsuspend. Check for zombie leaders.
5941 (linux_wait_for_event): Reimplement as wrapper around
5942 linux_wait_for_event_filtered.
5943 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5944 a normal or signal exit is seen, it's the whole process exiting.
5945 (wait_for_sigstop): No longer a for_each_inferior callback.
5946 Rewrite on top of linux_wait_for_event_filtered.
5947 (stop_all_lwps): Call wait_for_sigstop directly.
5948 * server.c (resume, handle_target_event): Handle
5949 TARGET_WAITKIND_NO_RESUMED.
5950
d763de10
JB
59512014-02-26 Joel Brobecker <brobecker@adacore.com>
5952
5953 * win32-low.c (psapi_get_dll_name,
5954 * win32_CreateToolhelp32Snapshot): Delete.
5955 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5956 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5957 Delete.
5958 (handle_load_dll): Add function description.
5959 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5960
850a0f76
JB
59612014-02-26 Joel Brobecker <brobecker@adacore.com>
5962
5963 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5964 Add comment.
5965 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5966 base address when calling win32_add_one_solib.
5967 (handle_load_dll): Delete local variable load_addr.
5968 Remove 0x1000 offset applied to DLL base address when calling
5969 win32_add_one_solib.
5970 (handle_unload_dll): Add comment.
5971
f25b3fc3
JB
59722014-02-26 Joel Brobecker <brobecker@adacore.com>
5973
5974 * win32-low.c (win32_add_all_dlls): Renames
5975 win32_ensure_ntdll_loaded. Rewrite function documentation.
5976 Adjust implementation to always load all DLLs.
5977 Add 0x1000 offset to DLL base address when calling
5978 win32_add_one_solib.
5979 (child_initialization_done): New static global.
5980 (do_initial_child_stuff): Set child_initialization_done to
5981 zero during child initialization, and 1 after. Replace call
5982 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5983 Add comment.
5984 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5985 (handle_unload_dll): Add function documentation.
5986 (get_child_debug_event): Ignore load and unload DLL events
5987 during child initialization.
5988
d86d4aaf
DE
59892014-02-20 Doug Evans <dje@google.com>
5990
3bc32da3 5991 Remove global all_lwps.
d86d4aaf
DE
5992 * inferiors.h (ptid_of): Move here from linux-low.h.
5993 (pid_of, lwpid_of): Ditto.
5994 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5995 parameter is a struct thread_info * now.
5996 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5997 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5998 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5999 directly.
6000 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6001 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6002 * linux-arm-low.c (update_registers_callback): Update, "entry"
6003 parameter is a struct thread_info * now.
6004 Fetch lwpid from current_inferior directly.
6005 (arm_insert_point): Pass &all_threads to find_inferior instead of
6006 &all_lwps.
6007 (arm_remove_point): Ditto.
6008 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6009 (arm_prepare_to_resume): Fetch pid from thread.
6010 (arm_read_description): Fetch lwpid from current_inferior directly.
6011 * linux-low.c (all_lwps): Delete.
6012 (delete_lwp): Delete call to remove_inferior.
6013 (handle_extended_wait): Fetch lwpid from thread.
6014 (add_lwp): Don't set lwp->entry.id. Remove call to
6015 add_inferior_to_list.
6016 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6017 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6018 (kill_one_lwp_callback): Ditto.
6019 (linux_kill): Don't dereference NULL pointer.
6020 Fetch ptid,lwpid from thread.
6021 (get_detach_signal): Fetch ptid from thread.
6022 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6023 Simplify call to regcache_invalidate_thread.
6024 (delete_lwp_callback): Update, "entry" parameter is a
6025 struct thread_info * now. Fetch pid from thread.
6026 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6027 (status_pending_p_callback): Update, "entry" parameter is a
6028 struct thread_info * now. Fetch ptid from thread.
6029 (find_lwp_pid): Update, "entry" parameter is a
6030 struct thread_info * now.
6031 (linux_wait_for_lwp): Fetch pid from thread.
6032 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6033 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6034 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6035 (dequeue_one_deferred_signal): Ditto.
6036 (cancel_breakpoint): Fetch ptid from current_inferior.
6037 (linux_wait_for_event): Pass &all_threads to find_inferior,
6038 not &all_lwps. Fetch ptid, lwpid from thread.
6039 (count_events_callback): Update, "entry" parameter is a
6040 struct thread_info * now.
6041 (select_singlestep_lwp_callback): Ditto.
6042 (select_event_lwp_callback): Ditto.
6043 (cancel_breakpoints_callback): Ditto.
6044 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6045 not &all_lwps.
6046 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6047 (unsuspend_one_lwp): Update, "entry" parameter is a
6048 struct thread_info * now.
6049 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6050 not &all_lwps.
6051 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6052 Fetch lwpid from thread, not lwp.
6053 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6054 Pass &all_threads to find_inferior, not &all_lwps.
6055 (send_sigstop): Fetch lwpid from thread, not lwp.
6056 (send_sigstop_callback): Update, "entry" parameter is a
6057 struct thread_info * now.
6058 (suspend_and_send_sigstop_callback): Ditto.
6059 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6060 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6061 struct thread_info * now.
6062 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6063 from thread, lwp.
6064 (lwp_running): Update, "entry" parameter is a
6065 struct thread_info * now.
6066 (stop_all_lwps): Fetch ptid from thread.
6067 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6068 (linux_resume_one_lwp): Fetch lwpid from thread.
6069 (linux_set_resume_request): Update, "entry" parameter is a
6070 struct thread_info * now. Fetch pid, lwpid from thread.
6071 (resume_status_pending_p): Update, "entry" parameter is a
6072 struct thread_info * now.
6073 (need_step_over_p): Ditto. Fetch lwpid from thread.
6074 (start_step_over): Fetch lwpid from thread.
6075 (linux_resume_one_thread): Update, "entry" parameter is a
6076 struct thread_info * now. Fetch lwpid from thread.
6077 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6078 (proceed_one_lwp): Update, "entry" parameter is a
6079 struct thread_info * now. Fetch lwpid from thread.
6080 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6081 struct thread_info * now.
6082 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6083 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6084 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6085 directly.
6086 (regsets_store_inferior_registers): Ditto.
6087 (fetch_register, store_register): Ditto.
6088 (linux_read_memory, linux_write_memory): Ditto.
6089 (linux_request_interrupt): Ditto.
6090 (linux_read_auxv): Ditto.
6091 (linux_xfer_siginfo): Ditto.
6092 (linux_qxfer_spu): Ditto.
6093 (linux_qxfer_libraries_svr4): Ditto.
6094 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6095 moved to inferiors.h.
6096 (get_lwp): Delete.
6097 (get_thread_lwp): Update.
6098 (struct lwp_info): Delete member "entry". Simplify comment for
6099 member "thread".
6100 (all_lwps): Delete.
6101 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6102 current_inferior directly.
6103 (update_watch_registers_callback): Update, "entry" parameter is a
6104 struct thread_info * now. Fetch pid from thread.
6105 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6106 (mips_insert_point): Fetch lwpid from current_inferior.
6107 Pass &all_threads to find_inferior, not &all_lwps.
6108 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6109 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6110 directly.
6111 (mips_stopped_data_address): Ditto.
6112 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6113 directly.
6114 * linux-tile-low.c (tile_arch_setup): Ditto.
6115 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6116 (update_debug_registers_callback): Update, "entry" parameter is a
6117 struct thread_info * now. Fetch pid from thread.
6118 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6119 Pass &all_threads to find_inferior, not &all_lwps.
6120 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6121 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6122 Pass &all_threads to find_inferior, not &all_lwps.
6123 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6124 (i386_dr_low_get_status): Ditto.
6125 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6126 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6127 (x86_linux_read_description): Ditto.
6128 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6129
3b8361aa
DE
61302014-02-20 Doug Evans <dje@google.com>
6131
6132 * inferiors.c (get_first_inferior): Fix buglet.
6133
f7667f0d
DE
61342014-02-19 Doug Evans <dje@google.com>
6135
6136 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6137 * inferiors.c (add_thread): Change result type to struct thread_info *.
6138 All callers updated.
6139 (add_lwp): Call add_thread here instead of in callers.
6140 All callers updated.
6141 * linux-low.h (get_lwp_thread): Rewrite.
6142 (struct lwp_info): New member "thread".
6143
b3312d80
DE
61442014-02-19 Doug Evans <dje@google.com>
6145
6146 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6147 All callers updated.
6148
ecc6f45c
DE
61492014-02-19 Doug Evans <dje@google.com>
6150
6151 * inferiors.c (add_thread): Fix whitespace.
6152
649ebbca
DE
61532014-02-19 Doug Evans <dje@google.com>
6154
6155 * dll.c (clear_dlls): Replace accessing list implemention details
6156 with API function.
6157 * gdbthread.h (get_first_thread): Declare.
6158 * inferiors.c (for_each_inferior_with_data): New function.
6159 (get_first_thread): New function.
6160 (find_thread_ptid): Simplify.
6161 (get_first_inferior): New function.
6162 (clear_list): Delete.
6163 (one_inferior_p): New function.
6164 (clear_inferior_list): New function.
6165 (clear_inferiors): Update.
6166 * inferiors.h (for_each_inferior_with_data): Declare.
6167 (clear_inferior_list): Declare.
6168 (one_inferior_p): Declare.
6169 (get_first_inferior): Declare.
6170 * linux-low.c (linux_wait_for_event): Replace accessing list
6171 implemention details with API function.
6172 * server.c (target_running): Ditto.
6173 (accumulate_file_name_length): New function.
6174 (emit_dll_description): New function.
6175 (handle_qxfer_libraries): Replace accessing list implemention
6176 details with API function.
6177 (handle_qxfer_threads_worker): New function.
6178 (handle_qxfer_threads_proper): Replace accessing list implemention
6179 details with API function.
6180 (handle_query): Ditto.
6181 (visit_actioned_threads_callback_ftype): New typedef.
6182 (visit_actioned_threads_data): New struct.
6183 (visit_actioned_threads): Rewrite to be find_inferior callback.
6184 (resume): Call find_inferior.
6185 (handle_status): Replace accessing list implemention
6186 details with API function.
6187 (process_serial_event): Replace accessing list implemention details
6188 with API function.
6189 * target.c (set_desired_inferior): Replace accessing list implemention
6190 details with API function.
6191 * tracepoint.c (same_process_p): New function.
6192 (gdb_agent_about_to_close): Replace accessing list implemention
6193 details with API function.
6194 * win32-low.c (child_delete_thread): Replace accessing list
6195 implemention details with API function.
6196 (match_dll_by_basename): New function.
6197 (dll_is_loaded_by_basename): New function.
6198 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6199 details call to dll_is_loaded_by_basename.
6200
80894984
DE
62012014-02-19 Doug Evans <dje@google.com>
6202
6203 * dll.h (struct dll_info): Add comment.
6204 * gdbthread.h (struct thread_info): Add comment.
6205 (current_ptid): Simplify.
6206 * inferiors.c (add_process): Update.
6207 (remove_process): Update.
6208 * inferiors.h (struct process_info): Rename member "head" to "entry".
6209 * linux-low.c (delete_lwp): Update.
6210 (add_lwp): Update.
6211 (last_thread_of_process_p): Update.
6212 (kill_one_lwp_callback, linux_kill): Update.
6213 (status_pending_p_callback): Update.
6214 (wait_for_sigstop): Update. Simplify read of ptid.
6215 (start_step_over): Update.
6216 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6217 (get_lwp_thread): Update.
6218 (struct lwp_info): Rename member "head" to "entry".
6219 * regcache.h (inferior_list_entry): Delete.
6220 * server.c (kill_inferior_callback): Update.
6221 (detach_or_kill_inferior_callback): Update.
6222 (print_started_pid): Update.
6223 (print_attached_pid): Update.
6224 (process_serial_event): Simplify read of ptid.
6225 * thread-db.c (thread_db_create_event): Update.
6226 (thread_db_get_tls_address): Update.
6227 * win32-low.c (current_inferior_ptid): Simplify.
6228
46917d26
TT
62292014-02-19 Tom Tromey <tromey@redhat.com>
6230
6231 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6232 argument.
6233 (target_supports_btrace): Update.
6234
0759a81e
YQ
62352014-02-14 Yao Qi <yao@codesourcery.com>
6236
6237 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6238 (rsp-low-ipa.o): New target.
6239
a7191e8b
TT
62402014-02-12 Tom Tromey <tromey@redhat.com>
6241
6242 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6243 convert_ascii_to_int.
6244 * regcache.c (registers_to_string): Likewise.
6245 * remote-utils.c (decode_M_packet): Likewise.
6246 * server.c (process_serial_event): Likewise.
6247
ff0e980e
TT
62482014-02-12 Tom Tromey <tromey@redhat.com>
6249
6250 * server.c (handle_query, handle_v_run): Use hex2bin, not
6251 unhexify.
6252 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6253
e9371aff
TT
62542014-02-12 Tom Tromey <tromey@redhat.com>
6255
6256 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6257 convert_int_to_ascii.
6258 * regcache.c (registers_to_string, collect_register_as_string):
6259 Likewise.
6260 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6261 Likewise.
6262 * server.c (process_serial_event): Likewise.
6263 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6264 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6265
971dc0b8
TT
62662014-02-12 Tom Tromey <tromey@redhat.com>
6267
6268 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6269 bin2hex, not hexify.
6270 * tracepoint.c (cmd_qtstatus): Likewise.
6271
0a822afb
TT
62722014-02-12 Tom Tromey <tromey@redhat.com>
6273
6274 * remote-utils.c (monitor_output): Pass explicit length to
6275 hexify.
6276
9c3d6531
TT
62772014-02-12 Tom Tromey <tromey@redhat.com>
6278
6279 * tracepoint.c: Include rsp-low.h.
6280 * server.c: Include rsp-low.h.
6281 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6282 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6283 declare.
6284 * remote-utils.c: Include rsp-low.h.
6285 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6286 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6287 (convert_int_to_ascii, convert_ascii_to_int): Move to
6288 common/rsp-low.c.
6289 * regcache.c: Include rsp-low.h.
6290 * ax.c: Include rsp-low.h.
6291 * Makefile.in (SFILES): Add common/rsp-low.c.
6292 (OBS): Add rsp-low.o.
6293 (rsp-low.o): New target.
6294
01fd3ea5
TT
62952014-02-12 Tom Tromey <tromey@redhat.com>
6296
6297 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6298 Include print-utils.h.
6299 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6300 (plongest, thirty_two, phex_nz): Remove.
6301 * Makefile.in (SFILES): Add common/print-utils.c.
6302 (OBS): Add print-utils.o.
6303 (print-utils-ipa.o): New target.
6304 (print-utils.o): New target.
6305 (IPA_OBJS): Add print-utils-ipa.o.
6306
e99dc820
TT
63072014-02-06 Tom Tromey <tromey@redhat.com>
6308
6309 * Makefile.in (SFILES): Fix indentation.
6310
ee1e2d4f
DE
63112014-02-05 Doug Evans <dje@google.com>
6312
6313 * linux-low.c (linux_wait_for_event): Improve comment.
6314 (linux_wait_1): Keep current_inferior in sync with event_child.
6315
f5a02773
DE
63162014-01-22 Doug Evans <dje@google.com>
6317
6318 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6319
87ce2a04
DE
63202014-01-22 Doug Evans <dje@google.com>
6321
6322 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6323 * configure: Regenerate.
6324 * config.in: Regenerate.
6325 * Makefile.in (SFILES): Add debug.c.
6326 (OBS): Add debug.o.
6327 * debug.c: New file.
6328 * debug.h: New file.
6329 * linux-aarch64-low.c (*): Update all debugging printfs to use
6330 debug_printf instead of fprintf.
6331 * linux-arm-low.c (*): Ditto.
6332 * linux-cris-low.c (*): Ditto.
6333 * linux-crisv32-low.c (*): Ditto.
6334 * linux-m32r-low.c (*): Ditto.
6335 * linux-sparc-low.c (*): Ditto.
6336 * linux-x86.c (*): Ditto.
6337 * linux-low.c (*): Ditto.
6338 (linux_wait_1): Add calls to debug_enter, debug_exit.
6339 (linux_wait): Remove redundant debugging printf.
6340 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6341 (linux_resume, unstop_all_lwps): Ditto.
6342 * mem-break.c (*): Update all debugging printfs to use
6343 debug_printf instead of fprintf.
6344 * remote-utils.c (*): Ditto.
6345 * thread-db.c (*): Ditto.
6346 * server.c #include <ctype.h>, "gdb_vecs.h".
6347 (debug_threads): Moved to debug.c.
6348 (*): Update all debugging printfs to use debug_printf instead of
6349 fprintf.
6350 (start_inferior): Replace call to fflush with call to debug_flush.
6351 (monitor_show_help): Mention set debug-format.
6352 (parse_debug_format_options): New function.
6353 (handle_monitor_command): Handle "monitor set debug-format".
6354 (gdbserver_usage): Mention --debug-format.
6355 (main): Parse --debug-format.
6356 * server.h (debug_threads): Declaration moved to debug.h.
6357 #include "debug.h".
6358 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6359 trace_debug_1 that uses debug_printf.
6360 (tracepoint_look_up_symbols): Update all debugging printfs to use
6361 debug_printf instead of fprintf.
6362
e671835b
BS
63632014-01-20 Baruch Siach <baruch@tkos.co.il>
6364
6365 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6366 sys/ptrace.h.
6367
b5737fa9
PA
63682014-01-17 Pedro Alves <palves@redhat.com>
6369
ea38d2a9 6370 PR build/16445
c7faa97a
PA
6371 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6372 defined after including gdb_proc_service.h.
b5737fa9 6373
40ed484e
DE
63742014-01-16 Doug Evans <dje@google.com>
6375
6376 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6377 (match_dll): Use it.
6378
969c39fb
MM
63792014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6380
6381 * target.h (target_ops) <read_btrace>: Change parameters and
6382 return type to allow error reporting.
6383 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6384 trace reading errors on.
6385 * linux-low.c (linux_low_read_btrace): Pass trace reading
6386 errors on.
6387 (linux_low_disable_btrace): New.
6388
ab7f45ba
DE
63892014-01-15 Doug Evans <dje@google.com>
6390
6391 * inferiors.c (thread_id_to_gdb_id): Delete.
6392 * inferiors.h (thread_id_to_gdb_id): Delete.
6393
66af0f44
EZ
63942014-01-13 Eli Zaretskii <eliz@gnu.org>
6395
6396 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6397 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6398 versions.
6399
9939e131
PA
64002014-01-08 Pedro Alves <palves@redhat.com>
6401
6402 * server.c (handle_status): Don't discard previous queued stop
6403 replies or thread's pending status here.
6404 (main) <disconnection>: Do it here instead.
6405
b7ea362b
PA
64062014-01-08 Pedro Alves <palves@redhat.com>
6407
6408 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6409 * server.c (visit_actioned_threads, handle_pending_status): New
6410 function.
6411 (handle_v_cont): Factor out parts to ...
6412 (resume): ... this new function. If in all-stop, and a thread
6413 being resumed has a pending status, report it without actually
6414 resuming.
6415 (myresume): Adjust to use the new 'resume' function.
6416 (clear_pending_status_callback, set_pending_status_callback)
6417 (find_status_pending_thread_callback): New functions.
6418 (handle_status): Handle the case of multiple threads having
6419 interesting statuses to report. Report threads' real last signal
6420 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6421 with an interesting thread to report the status for, instead of
6422 always reporting the status of the first thread.
6423
28498c42
JB
64242014-01-01 Joel Brobecker <brobecker@adacore.com>
6425
6426 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6427 * gdbreplay.c (gdbreplay_version): Likewise.
6428
f45c82da
YZ
64292013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6430
6431 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6432 iov.iov_len with the real length in use.
6433
379a5e2d
JB
64342013-12-13 Joel Brobecker <brobecker@adacore.com>
6435
6436 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6437 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6438 for all targets that use win32-low.c.
6439 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6440 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6441
4210d83e
PA
64422013-12-13 Pedro Alves <palves@redhat.com>
6443
6444 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6445 if equal to TARGET_WAITKIND_LOADED.
6446 * win32-low.c (cached_status): New static global.
6447 (win32_wait): Add declaration.
6448 (do_initial_child_stuff): Flush all initial pending debug events
6449 up to the initial breakpoint.
6450 (win32_wait): If CACHED_STATUS was set, return that instead
6451 of doing a real wait. Remove the code resuming the execution
6452 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6453 during the initial phase. Also remove the code changing
6454 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6455 TARGET_WAITKIND_STOPPED.
6456
e7f0d979
YQ
64572013-12-11 Yao Qi <yao@codesourcery.com>
6458
6459 * notif.c (handle_notif_ack): Return 0 if no notification
6460 matches.
6461
ebcf782c
DE
64622013-11-20 Doug Evans <dje@google.com>
6463
6464 * linux-low.c (linux_set_resume_request): Fix comment.
6465
20ad9378
DE
64662013-11-20 Doug Evans <dje@google.com>
6467
6468 * linux-low.c (resume_status_pending_p): Tweak comment.
6469
a196ebeb
WT
64702013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6471
6472 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6473 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6474 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6475 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6476 (srv_amd64_regobj): Add amd64-mpx.o.
6477 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6478 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6479 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6480 * i387-fp.c (num_pl_bnd_register) Added constant.
6481 (num_pl_bnd_cfg_registers) Added constant.
6482 (struct i387_xsave) Added reserved area and MPX fields.
6483 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6484 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6485 function.
6486 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6487 (init_registers_amd64_mpx_linux): Declare new function.
6488 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6489 (x86_64_regmap): Add MPX registers.
6490 (x86_linux_read_description): Add MPX case.
6491 (initialize_low_arch): Initialize MPX targets.
6492
0080a2f6
TT
64932013-11-18 Tom Tromey <tromey@redhat.com>
6494
6495 * configure: Rebuild.
6496 * configure.ac: Don't check for stdlib.h.
6497 * gdbreplay.c: Unconditionally include stdlib.h.
6498
2978b111
TT
64992013-11-18 Tom Tromey <tromey@redhat.com>
6500
6501 * config.in: Rebuild.
6502 * configure: Rebuild.
6503 * configure.ac: Don't use AC_HEADER_DIRENT.
6504
a3d08894
TT
65052013-11-18 Tom Tromey <tromey@redhat.com>
6506
6507 * server.h: Don't check HAVE_STRING_H.
6508 * gdbreplay.c: Don't check HAVE_STRING_H.
6509 * configure: Rebuild.
6510
0a5dd17d
TT
65112013-11-18 Tom Tromey <tromey@redhat.com>
6512
6513 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6514 LIBGNU.
6515
1bd2f0ba
TT
65162013-11-08 Tom Tromey <tromey@redhat.com>
6517
6518 * configure, config.in: Rebuild.
6519 * configure.ac: Remove unused configury.
6520
3266f10b
TT
65212013-11-08 Tom Tromey <tromey@redhat.com>
6522
6523 * acinclude.m4: Include common.m4, codeset.m4.
6524 * configure, config.in: Rebuild.
6525 * configure.ac: Use GDB_AC_COMMON.
6526
6682d959
AA
65272013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6528
6529 * linux-s390-low.c (HWCAP_S390_TE): New define.
6530 (s390_arch_setup): Consider the TE field in the HWCAP for
6531 determining 'have_regset_tdb'.
6532
fd0a4d76
SDJ
65332013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6534
6535 PR gdb/16014
6536 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6537 call to sizeof.
6538
1a3d890b
PA
65392013-10-02 Pedro Alves <palves@redhat.com>
6540
6541 * server.c (process_serial_event): Don't output "GDBserver
6542 exiting" if GDB is connected through stdio.
6543 * target.c (mywait): Likewise, be silent if GDB is connected
6544 through stdio.
6545
97ad4581
JB
65462013-10-01 Joel Brobecker <brobecker@adacore.com>
6547
6548 * lynx-low.c (lynx_add_threads_after_attach): New function.
6549 (lynx_attach): Remove call to add_thread. Add call to
6550 lynx_add_threads_after_attach instead.
6551
5b4e221c
MF
65522013-09-28 Mike Frysinger <vapier@gentoo.org>
6553
6554 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6555 * config.in, configure: Regenerated.
6556
ee47b2f8
YQ
65572013-09-18 Yao Qi <yao@codesourcery.com>
6558
6559 PR server/15959
6560 * server.c (start_inferior): Clear 'resume_info'.
6561
d6707650 65622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6563
d6707650
JW
6564 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6565 for each register.
6566
9243dd0e 65672013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6568
9243dd0e
JW
6569 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6570 linux-tile-low.o to srv_tgtobj.
6571
c623a6ef
WN
65722013-09-16 Will Newton <will.newton@linaro.org>
6573
6574 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6575 out regs.
6576
fb71d39e
PA
65772013-09-06 Pedro Alves <palves@redhat.com>
6578
6579 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6580 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6581 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6582 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6583 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6584 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6585
8e7e9910
PA
65862013-09-06 Pedro Alves <palves@redhat.com>
6587
6588 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6589 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6590
7c3a12ca
PA
65912013-09-06 Pedro Alves <palves@redhat.com>
6592
6593 * linux-amd64-ipa.c: Include tracepoint.h.
6594 * linux-i386-ipa.c: Include tracepoint.h.
6595
8eb3d7b6
RW
65962013-09-06 Ricard Wanderlof <ricardw@axis.com>
6597
6598 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6599 (ps_get_thread_area): New function.
6600
eddddb9d
RW
66012013-09-06 Ricard Wanderlof <ricardw@axis.com>
6602
6603 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6604 (initialize_low_arch): Call init_registers_crisv32 rather than
6605 init_register_crisv32.
6606
533b0600
PA
66072013-09-05 Pedro Alves <palves@redhat.com>
6608
6609 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6610 to ...
6611 * hostio.h: ... this new file.
6612 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6613 win32-low.c: Include hostio.h.
6614
0ce3d3b5
PA
66152013-09-05 Pedro Alves <palves@redhat.com>
6616
6617 * server.h (gdb_client_data, handler_func, callback_handler_func)
6618 (delete_file_handler, add_file_handler, append_callback_event)
6619 (delete_callback_event, start_event_loop, initialize_event_loop):
6620 Move to event-loop.h and include it.
6621 * event-loop.h: New file.
6622
799cdc37
PA
66232013-09-05 Pedro Alves <palves@redhat.com>
6624
6625 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6626 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6627 (loaded_dll, unloaded_dll): Move to ...
6628 * dll.h: ... this new file.
6629 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6630
6a6bbd9d
PA
66312013-09-05 Pedro Alves <palves@redhat.com>
6632
6633 * server.h (current_process, get_thread_process, all_processes)
6634 (add_inferior_to_list, for_each_inferior, current_inferior)
6635 (remove_inferior, add_process, remove_process, find_process_pid)
6636 (have_started_inferiors_p, have_attached_inferiors_p)
6637 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6638 (clear_inferiors, find_inferior, find_inferior_id)
6639 (inferior_target_data, set_inferior_target_data)
6640 (inferior_regcache_data, set_inferior_regcache_data): Move to
6641 inferiors.h, and include it.
6642 * inferiors.h: New file.
6643
f699aaba
PA
66442013-09-05 Pedro Alves <palves@redhat.com>
6645
6646 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6647 Move ...
72f4393d 6648 * ax.h: ... here.
f699aaba 6649
c144c7a0
PA
66502013-09-05 Pedro Alves <palves@redhat.com>
6651
6652 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6653 tracepoint.h.
6654 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6655 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6656 (handle_tracepoint_general_set, handle_tracepoint_query)
6657 (tracepoint_finished_step, tracepoint_was_hit)
6658 (release_while_stepping_state_list, current_traceframe)
6659 (in_readonly_region, traceframe_read_mem)
6660 (fetch_traceframe_registers, traceframe_read_sdata)
6661 (traceframe_read_info, struct fast_tpoint_collect_status)
6662 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6663 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6664 (supply_fast_tracepoint_registers)
6665 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6666 (ipa_tdesc, claim_trampoline_space)
6667 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6668 (agent_mem_read, agent_get_trace_state_variable_value)
6669 (agent_set_trace_state_variable_value, agent_tsv_read)
6670 (agent_mem_read_string, get_raw_reg_func_addr)
6671 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6672 * tracepoint.h: ... this new file.
6673
ff42e6ab
PA
66742013-09-05 Pedro Alves <palves@redhat.com>
6675
6676 * server.h (perror_with_name, error, fatal, warning, paddress)
6677 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6678 include it.
6679 * utils.h: New file.
6680
541af0f4
PA
66812013-09-05 Pedro Alves <palves@redhat.com>
6682
6683 * server.h (remote_debug, noack_mode, transport_is_reliable)
6684 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6685 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6686 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6687 (write_enn, initialize_async_io, enable_async_io)
6688 (disable_async_io, check_remote_input_interrupt_request)
6689 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6690 (dead_thread_notify, prepare_resume_reply)
6691 (decode_address_to_semicolon, decode_address, decode_m_packet)
6692 (decode_M_packet, decode_X_packet, decode_xfer_write)
6693 (decode_search_memory_packet, unhexify, hexify)
6694 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6695 (look_up_one_symbol, relocate_instruction)
6696 (monitor_output): Move to remote-utils.h, and include it.
6697 * remote-utils.h: New file.
6698
eebdf26b
PA
66992013-09-05 Pedro Alves <palves@redhat.com>
6700
6701 * server.h (_): Delete.
6702
3aafd2ff
PA
67032013-09-02 Pedro Alves <palves@redhat.com>
6704
6705 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6706 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6707 allocated.
6708 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6709
cee83bcb
PM
67102013-09-02 Pierre Muller <muller@sourceware.org>
6711
6712 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6713 or WriteProcessMemory complete successfully and handle
6714 ERROR_PARTIAL_COPY error.
6715
9a13b2fa
PA
67162013-09-02 Pedro Alves <palves@redhat.com>
6717
6718 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6719 error instead of EIO.
6720
602e3198
JK
67212013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6722
6723 PR server/15604
6724 * linux-low.c: Include filestuff.h.
6725 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6726 * lynx-low.c: Include filestuff.h.
6727 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6728 * server.c: Include filestuff.h.
6729 (main): Call notice_open_fds.
6730 * spu-low.c: Include filestuff.h.
6731 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6732
96d7229d
LM
67332013-08-22 Luis Machado <lgustavo@codesourcery.com>
6734
6735 * Makefile.in: Explain why ../target and ../nat are not
6736 listed as include file search paths.
6737 (linux-waitpid.o): New object file rule.
6738 * configure.srv (srv_native_linux_obj): New variable.
6739 Replace all occurrences of linux native object files with
6740 $srv_native_linux_obj.
6741 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6742 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6743 (linux_enable_event_reporting): Remove declaration.
6744 (my_waitpid): Moved to common/linux-waitpid.c.
6745 (linux_wait_for_event): Pass ptid when calling
6746 linux_enable_event_reporting.
6747 (linux_supports_tracefork_flag): Remove.
6748 (linux_enable_event_reporting): Likewise.
6749 (linux_tracefork_grandchild): Remove.
6750 (STACK_SIZE): Moved to common/linux-ptrace.c.
6751 (linux_tracefork_child): Remove.
6752 (linux_test_for_tracefork): Remove.
6753 (linux_look_up_symbols): Call linux_supports_traceclone.
6754 (initialize_low): Remove call to linux_test_for_tracefork.
6755 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6756 common/linux-ptrace.h.
6757 (PTRACE_TYPE_ARG4): Likewise.
6758 Include linux-ptrace.h.
6759
32940073
PA
67602013-08-21 Pedro Alves <palves@redhat.com>
6761
6762 * config.in: Renegerate.
6763
33b60d58 67642013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6765
33b60d58
LM
6766 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6767 (SFILES): Remove $(srcdir)/common/target-common.c and
6768 add $(srcdir)/target/waitstatus.c.
6769 (OBS): Remove target-common.o and add waitstatus.o.
6770 (server_h): Remove $(srcdir)/../common/target-common.h and
6771 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6772 and $(srcdir)/../target/waitstatus.h.
6773 (target-common.o): Remove.
6774 (waitstatus.o): New target object file.
6775 * target.h: Do not include target-common.h and
6776 include target/resume.h, target/wait.h and
6777 target/waitstatus.h.
6778
b8e1b30e
LM
67792013-08-13 Luis Machado <lgustavo@codesourcery.com>
6780
6781 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6782 to PTRACE_TYPE_ARG3.
6783 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6784 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6785 PTRACE_TYPE_ARG4.
6786 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6787 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6788
7a60ad40
YQ
67892013-07-27 Jie Zhang <jie@codesourcery.com>
6790 Daniel Jacobowitz <dan@codesourcery.com>
6791 Yao Qi <yao@codesourcery.com>
6792
6793 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6794 (mips-linux-watch.o): New rule.
6795 (mips_linux_watch_h): New variable.
6796 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6797 srv_tgtobj.
6798 * linux-mips-low.c: Include mips-linux-watch.h.
6799 (struct arch_process_info, struct arch_lwp_info): New.
6800 (update_watch_registers_callback): New function.
6801 (mips_linux_new_process, mips_linux_new_thread) New functions.
6802 (mips_linux_prepare_to_resume, mips_insert_point): New
6803 functions.
6804 (mips_remove_point, mips_stopped_by_watchpoint): New
6805 functions.
6806 (rsp_bp_type_to_target_hw_bp_type): New function.
6807 (mips_stopped_data_address): New function.
6808 (the_low_target): Add watchpoint support functions.
6809
de6f69ad
YQ
68102013-07-27 Yao Qi <yao@codesourcery.com>
6811
6812 * i386-low.c: Include break-common.h.
6813 (enum target_hw_bp_type): Remove.
6814
3360c0bf
LM
68152013-07-24 Luis Machado <lgustavo@codesourcery.com>
6816
6817 * Makefile.in (SFILES): /common/target-common.c.
6818 (OBS): Add target-common.o.
6819 (server_h): Add $(srcdir)/../common/target-common.h.
6820 (target-common.o): New target.
6821 * server.c (queue_stop_reply_callback): Free
6822 status string after use.
6823 * target.c (target_waitstatus_to_string): Remove.
6824 * target.h: Include target-common.h.
6825 (resume_kind): Likewise.
6826 (target_waitkind): Likewise.
6827 (target_waitstatus): Likewise.
6828 (TARGET_WNOHANG): Likewise.
6829
bd885420
YQ
68302013-07-04 Yao Qi <yao@codesourcery.com>
6831
6832 * Makefile.in (host_alias): Use @host_noncanonical@.
6833 (target_alias): Use @target_noncanonical@.
6834 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6835 ACX_NONCANONICAL_HOST.
6836 * configure: Regenerated.
6837
6838 Revert:
6839 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6840
6841 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6842 * configure: Rebuild.
6843 * Makefile.in (version_host, version_target): Get from configure.
6844 (version.c): Use $(version_host) and $(version_target).
6845
17ef446e
PA
68462013-07-03 Pedro Alves <palves@redhat.com>
6847
6848 * Makefile.in (config.status): Depend on development.sh.
6849 * acinclude.m4: Include libmcheck.m4.
6850 * configure: Regenerate.
6851
7a9a7487
MG
68522013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6853
6854 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6855 attribute inside the parentheses.
6856 (winapi_DebugSetProcessKillOnExit): Ditto.
6857 (winapi_DebugBreakProcess): Ditto.
6858 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6859
49b64de6
MG
68602013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6861
6862 * notif.h (notif_event): Add a dummy member to avoid compiler
6863 errors.
6864
d5749ee7
PA
68652013-07-01 Pedro Alves <palves@redhat.com>
6866
6867 * hostio.c (HOSTIO_PATH_MAX): Define.
6868 (require_filename, handle_open, handle_unlink, handle_readlink):
6869 Use it.
6870
d8d2a3ee
PA
68712013-07-01 Pedro Alves <palves@redhat.com>
6872
6873 * server.h: Include "pathmax.h".
6874 * linux-low.c: Don't include sys/param.h.
6875 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6876 MAXPATHLEN.
6877 * win32-low.c: Don't include sys/param.h.
6878 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6879
bc7dea8d
PA
68802013-07-01 Pedro Alves <palves@redhat.com>
6881
6882 * event-loop.c: Don't check HAVE_UNISTD_H before including
6883 <unistd.h>.
6884 * gdbreplay.c: Likewise.
6885 * remote-utils.c: Likewise.
6886 * server.c: Likewise.
6887 * configure.ac: Don't check for unistd.h.
6888 * configure: Regenerate.
6889
d6c2da54
TT
68902013-06-28 Tom Tromey <tromey@redhat.com>
6891
6892 * Makefile.in (version.c): Use version.in, not
6893 common/version.in.
6894
257b6bec
MG
68952013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6896
6897 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6898 * configure: Rebuild.
6899 * Makefile.in (version_host, version_target): Get from configure.
6900 (version.c): Use $(version_host) and $(version_target).
6901
86ebe149
DK
69022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6903
6904 Fix trace-status to output user name without trailing colon.
6905 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6906
f30aa5af
DK
69072013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6908
6909 Fix trace-status to output proper start-time and stop-time.
6910 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6911 output start time and stop time in hex as gdb expects.
6912
28a93511
YQ
69132013-06-26 Pedro Alves <pedro@codesourcery.com>
6914
6915 * tracepoint.c (build_traceframe_info_xml): Output trace state
6916 variables present in the trace buffer.
6917
01208463
TT
69182013-06-24 Tom Tromey <tromey@redhat.com>
6919
6920 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6921 create-version.sh.
6922 (version.o): Remove.
6923 * gdbreplay.c: Include version.h.
6924 (version, host_name): Don't declare.
6925 * server.h: Include version.h.
6926 (version, host_name): Don't declare.
6927
760256f9
PA
69282013-06-12 Pedro Alves <palves@redhat.com>
6929
6930 * linux-x86-low.c (linux_is_elf64): Delete global.
6931 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6932 with local linux_pid_exe_is_elf_64_file use.
6933
030031ee
PA
69342013-06-11 Pedro Alves <palves@redhat.com>
6935
6936 * linux-low.c (regset_disabled, disable_regset): New functions.
6937 (regsets_fetch_inferior_registers)
6938 (regsets_store_inferior_registers): Use them.
6939 (initialize_regsets_info); Don't allocate the disabled_regsets
6940 array here.
6941 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6942 comment.
6943
5da6eb0a
PA
69442013-06-11 Pedro Alves <palves@redhat.com>
6945
6946 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6947 xmalloc.
6948
7e5aaa09
PA
69492013-06-11 Pedro Alves <palves@redhat.com>
6950
6951 * linux-x86-low.c (initialize_low_arch): Call
6952 init_registers_x32_avx_linux.
6953
d878444c
JK
69542013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6955
6956 Fix compatibility with Android Bionic.
6957 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6958 it is not empty.
6959
3aee8918
PA
69602013-06-07 Pedro Alves <palves@redhat.com>
6961
5f2b57b5 6962 PR server/14823
3aee8918
PA
6963 * Makefile.in (OBS): Add tdesc.o.
6964 (IPA_OBJS): Add tdesc-ipa.o.
6965 (tdesc-ipa.o): New rule.
6966 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6967 interface.
6968 * linux-low.c (new_inferior): Delete.
6969 (disabled_regsets, num_regsets): Delete.
6970 (linux_add_process): Adjust to set the new per-process
6971 new_inferior flag.
6972 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6973 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6974 was a stop. When calling arch_setup, switch the current inferior
6975 to the thread that got an event.
6976 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6977 (regsets_fetch_inferior_registers)
6978 (regsets_store_inferior_registers): New regsets_info parameter.
6979 Adjust to use it.
6980 (linux_register_in_regsets): New regs_info parameter. Adjust to
6981 use it.
6982 (register_addr, fetch_register, store_register): New usrregs_info
6983 parameter. Adjust to use it.
6984 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6985 parameter regs_info. Adjust to use it.
6986 (linux_fetch_registers): Get the current inferior's regs_info, and
6987 adjust to use it.
6988 (linux_store_registers): Ditto.
6989 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6990 (initialize_low): Don't initialize the target_regsets here. Call
6991 initialize_low_arch.
6992 * linux-low.h (target_regsets): Delete declaration.
6993 (struct regsets_info): New.
6994 (struct usrregs_info): New.
6995 (struct regs_info): New.
6996 (struct process_info_private) <new_inferior>: New field.
6997 (struct linux_target_ops): Delete the num_regs, regmap, and
6998 regset_bitmap fields. New field regs_info.
6999 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7000 * i387-fp.c (num_xmm_registers): Delete.
7001 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7002 calls to new interface.
7003 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7004 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7005 Infer the number of xmm registers from the regcache's target
7006 description.
7007 * i387-fp.h (num_xmm_registers): Delete.
7008 * inferiors.c (add_thread): Don't install the thread's regcache
7009 here.
7010 * proc-service.c (gregset_info): Fetch the current inferior's
7011 regs_info. Adjust to use it.
7012 * regcache.c: Include tdesc.h.
7013 (register_bytes, reg_defs, num_registers)
7014 (gdbserver_expedite_regs): Delete.
7015 (get_thread_regcache): If the thread doesn't have a regcache yet,
7016 create one, instead of aborting gdbserver.
7017 (regcache_invalidate_one): Rename to ...
7018 (regcache_invalidate_thread): ... this.
7019 (regcache_invalidate_one): New.
7020 (regcache_invalidate): Only invalidate registers of the current
7021 process.
7022 (init_register_cache): Add target_desc parameter, and use it.
7023 (new_register_cache): Ditto. Assert the target description has a
7024 non zero registers_size.
7025 (regcache_cpy): Add assertions. Adjust.
7026 (realloc_register_cache, set_register_cache): Delete.
7027 (registers_to_string, registers_from_string): Adjust.
7028 (find_register_by_name, find_regno, find_register_by_number)
7029 (register_cache_size): Add target_desc parameter, and use it.
7030 (free_register_cache_thread, free_register_cache_thread_one)
7031 (regcache_release, register_cache_size): New.
7032 (register_size): Add target_desc parameter, and use it.
7033 (register_data, supply_register, supply_register_zeroed)
7034 (supply_regblock, supply_register_by_name, collect_register)
7035 (collect_register_as_string, collect_register_by_name): Adjust.
7036 * regcache.h (struct target_desc): Forward declare.
7037 (struct regcache) <tdesc>: New field.
7038 (init_register_cache, new_register_cache): Add target_desc
7039 parameter.
7040 (regcache_invalidate_thread): Declare.
7041 (regcache_invalidate_one): Delete declaration.
7042 (regcache_release): Declare.
7043 (find_register_by_number, register_cache_size, register_size)
7044 (find_regno): Add target_desc parameter.
7045 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7046 declarations.
7047 * remote-utils.c: Include tdesc.h.
7048 (outreg, prepare_resume_reply): Adjust.
7049 * server.c: Include tdesc.h.
7050 (gdbserver_xmltarget): Delete declaration.
7051 (get_features_xml, process_serial_event): Adjust.
7052 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7053 declare.
7054 (struct process_info) <tdesc>: New field.
7055 (ipa_tdesc): Declare.
7056 * tdesc.c: New file.
7057 * tdesc.h: New file.
7058 * tracepoint.c: Include tdesc.h.
7059 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7060 (get_context_regcache): Adjust to pass ipa_tdesc down.
7061 (do_action_at_tracepoint): Adjust to get the register cache size
7062 from the context regcache's description.
7063 (traceframe_walk_blocks): Adjust to get the register cache size
7064 from the current trace frame's description.
7065 (traceframe_get_pc): Adjust to get current trace frame's
7066 description and pass it down.
7067 (gdb_collect): Adjust to get the register cache size from the
7068 IPA's description.
7069 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7070 (gdbserver_xmltarget): Delete.
7071 (initialize_low_tracepoint): Set the ipa's target description.
7072 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7073 (initialize_low_tracepoint): Set the ipa's target description.
7074 * linux-x86-low.c: Include tdesc.h.
7075 [__x86_64__] (is_64bit_tdesc): New.
7076 (ps_get_thread_area, x86_get_thread_area): Use it.
7077 (i386_cannot_store_register): Rename to ...
7078 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7079 (i386_cannot_fetch_register): Rename to ...
7080 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7081 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7082 to new interface.
7083 (target_regsets): Rename to ...
7084 (x86_regsets): ... this.
7085 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7086 interface.
7087 (x86_siginfo_fixup): Use is_64bit_tdesc.
7088 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7089 (tdesc_x32_avx_linux, tdesc_x32_linux)
7090 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7091 Declare.
7092 (x86_linux_update_xmltarget): Delete.
7093 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7094 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7095 (AMD64_LINUX_USER64_CS): New.
7096 (x86_linux_read_description): New, based on
7097 x86_linux_update_xmltarget.
7098 (same_process_callback): New.
7099 (x86_arch_setup_process_callback): New.
7100 (x86_linux_update_xmltarget): New.
7101 (x86_regsets_info): New.
7102 (amd64_linux_regs_info): New.
7103 (i386_linux_usrregs_info): New.
7104 (i386_linux_regs_info): New.
7105 (x86_linux_regs_info): New.
7106 (x86_arch_setup): Reimplement.
7107 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7108 (x86_emit_ops): Ditto.
7109 (the_low_target): Adjust. Install x86_linux_regs_info,
7110 x86_cannot_fetch_register, and x86_cannot_store_register.
7111 (initialize_low_arch): New.
7112 * linux-ia64-low.c (tdesc_ia64): Declare.
7113 (ia64_fetch_register): Adjust.
7114 (ia64_usrregs_info, regs_info): New globals.
7115 (ia64_regs_info): New function.
7116 (the_low_target): Adjust.
7117 (initialize_low_arch): New function.
7118 * linux-sparc-low.c (tdesc_sparc64): Declare.
7119 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7120 Adjust.
7121 (sparc_arch_setup): New function.
7122 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7123 (the_low_target): Adjust.
7124 (initialize_low_arch): New function.
7125 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7126 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7127 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7128 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7129 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7130 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7131 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7132 (tdesc_powerpc_isa205_vsx64l): Declare.
7133 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7134 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7135 (ppc_set_pc, ppc_get_hwcap): Adjust.
7136 (ppc_usrregs_info): Forward declare.
7137 (!__powerpc64__) ppc_regmap_adjusted: New global.
7138 (ppc_arch_setup): Adjust to the current process'es target
7139 description.
7140 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7141 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7142 (ppc_store_evrregset): Adjust.
7143 (target_regsets): Rename to ...
7144 (ppc_regsets): ... this, and make static.
7145 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7146 (ppc_regs_info): New function.
7147 (the_low_target): Adjust.
7148 (initialize_low_arch): New function.
7149 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7150 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7151 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7152 (tdesc_s390x_linux64v2): Declare.
7153 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7154 (s390_fill_gregset, s390_store_last_break): Adjust.
7155 (target_regsets): Rename to ...
7156 (s390_regsets): ... this, and make static.
7157 (s390_get_pc, s390_set_pc): Adjust.
7158 (s390_get_hwcap): New target_desc parameter, and use it.
7159 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7160 (s390_arch_setup): Adjust to set the current process'es target
7161 description. Don't adjust the regmap.
7162 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7163 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7164 (regs_info_3264): New globals.
7165 (s390_regs_info): New function.
7166 (the_low_target): Adjust.
7167 (initialize_low_arch): New function.
7168 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7169 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7170 [__mips64] (init_registers_mips_linux)
7171 (init_registers_mips_dsp_linux): Delete defines.
7172 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7173 (have_dsp): New global.
7174 (mips_read_description): New, based on mips_arch_setup.
7175 (mips_arch_setup): Reimplement.
7176 (get_usrregs_info): New function.
7177 (mips_cannot_fetch_register, mips_cannot_store_register)
7178 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7179 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7180 (target_regsets): Rename to ...
7181 (mips_regsets): ... this, and make static.
7182 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7183 (dsp_regs_info, regs_info): New globals.
7184 (mips_regs_info): New function.
7185 (the_low_target): Adjust.
7186 (initialize_low_arch): New function.
7187 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7188 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7189 Declare.
7190 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7191 (arm_read_description): New, with bits factored from
7192 arm_arch_setup.
7193 (arm_arch_setup): Reimplement.
7194 (target_regsets): Rename to ...
7195 (arm_regsets): ... this, and make static.
7196 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7197 (arm_regs_info): New function.
7198 (the_low_target): Adjust.
7199 (initialize_low_arch): New function.
7200 * linux-m68k-low.c (tdesc_m68k): Declare.
7201 (target_regsets): Rename to ...
7202 (m68k_regsets): ... this, and make static.
7203 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7204 (m68k_regs_info): New function.
7205 (m68k_arch_setup): New function.
7206 (the_low_target): Adjust.
7207 (initialize_low_arch): New function.
7208 * linux-sh-low.c (tdesc_sharch): Declare.
7209 (target_regsets): Rename to ...
7210 (sh_regsets): ... this, and make static.
7211 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7212 (sh_regs_info, sh_arch_setup): New functions.
7213 (the_low_target): Adjust.
7214 (initialize_low_arch): New function.
7215 * linux-bfin-low.c (tdesc_bfin): Declare.
7216 (bfin_arch_setup): New function.
7217 (bfin_usrregs_info, regs_info): New globals.
7218 (bfin_regs_info): New function.
7219 (the_low_target): Adjust.
7220 (initialize_low_arch): New function.
7221 * linux-cris-low.c (tdesc_cris): Declare.
7222 (cris_arch_setup): New function.
7223 (cris_usrregs_info, regs_info): New globals.
7224 (cris_regs_info): New function.
7225 (the_low_target): Adjust.
7226 (initialize_low_arch): New function.
7227 * linux-cris-low.c (tdesc_crisv32): Declare.
7228 (cris_arch_setup): New function.
7229 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7230 (cris_regs_info): New function.
7231 (the_low_target): Adjust.
7232 (initialize_low_arch): New function.
7233 * linux-m32r-low.c (tdesc_m32r): Declare.
7234 (m32r_arch_setup): New function.
7235 (m32r_usrregs_info, regs_info): New globals.
7236 (m32r_regs_info): Adjust.
7237 (initialize_low_arch): New function.
7238 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7239 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7240 (tic6x_usrregs_info): Forward declare.
7241 (tic6x_read_description): New function, based on ...
7242 (tic6x_arch_setup): ... this. Reimplement.
7243 (target_regsets): Rename to ...
7244 (tic6x_regsets): ... this, and make static.
7245 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7246 (tic6x_regs_info): New function.
7247 (the_low_target): Adjust.
7248 (initialize_low_arch): New function.
7249 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7250 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7251 (target_regsets): Rename to ...
7252 (xtensa_regsets): ... this, and make static.
7253 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7254 globals.
7255 (xtensa_arch_setup, xtensa_regs_info): New functions.
7256 (the_low_target): Adjust.
7257 (initialize_low_arch): New function.
7258 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7259 (nios2_arch_setup): Set the current process'es tdesc.
7260 (target_regsets): Rename to ...
7261 (nios2_regsets): ... this.
7262 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7263 (nios2_regs_info): New function.
7264 (the_low_target): Adjust.
7265 (initialize_low_arch): New function.
a261b8f5
PA
7266 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7267 (aarch64_arch_setup): Set the current process'es tdesc.
7268 (target_regsets): Rename to ...
7269 (aarch64_regsets): ... this.
7270 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7271 (aarch64_regs_info): New function.
7272 (the_low_target): Adjust.
7273 (initialize_low_arch): New function.
3aee8918
PA
7274 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7275 globals.
7276 (target_regsets): Rename to ...
7277 (tile_regsets): ... this.
7278 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7279 (tile_regs_info): New function.
7280 (tile_arch_setup): Set the current process'es tdesc.
7281 (the_low_target): Adjust.
7282 (initialize_low_arch): New function.
7283 * spu-low.c (tdesc_spu): Declare.
7284 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7285 * win32-arm-low.c (tdesc_arm): Declare.
7286 (arm_arch_setup): New function.
7287 (the_low_target): Install arm_arch_setup instead of
7288 init_registers_arm.
7289 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7290 (init_windows_x86): Rename to ...
7291 (i386_arch_setup): ... this. Set `win32_tdesc'.
7292 (the_low_target): Adjust.
7293 * win32-low.c (win32_tdesc): New global.
7294 (child_add_thread): Don't create the thread cache here.
7295 (do_initial_child_stuff): Set the new process'es tdesc.
7296 * win32-low.h (struct target_desc): Forward declare.
7297 (win32_tdesc): Declare.
7298 * lynx-i386-low.c (tdesc_i386): Declare global.
7299 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7300 * lynx-low.c (lynx_tdesc): New global.
7301 (lynx_add_process): Set the new process'es tdesc.
7302 * lynx-low.h (struct target_desc): Forward declare.
7303 (lynx_tdesc): Declare global.
7304 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7305 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7306 * nto-low.c (nto_tdesc): New global.
7307 (do_attach): Set the new process'es tdesc.
7308 * nto-low.h (struct target_desc): Forward declare.
7309 (nto_tdesc): Declare.
7310 * nto-x86-low.c (tdesc_i386): Declare.
7311 (nto_x86_arch_setup): Set `nto_tdesc'.
7312
b1fbec62
GB
73132013-06-04 Gary Benson <gbenson@redhat.com>
7314
7315 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7316 to qSupported response when appropriate.
7317 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7318 with nonzero-length annex.
7319 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7320 arguments supplied in annex.
7321
d1ec4ce7
DE
73222013-05-31 Doug Evans <dje@google.com>
7323
ac44adcb 7324 PR server/15594
d1ec4ce7
DE
7325 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7326 64 bits in 64-cross-32 environment.
7327
9b25f2d3
PA
73282013-05-28 Pedro Alves <palves@redhat.com>
7329
7330 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7331 (aarch64-without-fpu.c): Delete rule.
7332 * configure.srv (aarch64*-*-linux*): Remove references to
7333 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7334 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7335 declaration.
7336
6740dc9c
PA
73372013-05-24 Pedro Alves <palves@redhat.com>
7338
7339 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7340 instead of strchr/decode_address. Error if the range isn't split
7341 with a ','. Don't assume there's be a ':' in the action.
7342
c2d6af84
PA
73432013-05-23 Yao Qi <yao@codesourcery.com>
7344 Pedro Alves <palves@redhat.com>
7345
7346 * linux-low.c (lwp_in_step_range): New function.
7347 (linux_wait_1): If the thread was range stepping and stopped
7348 outside the stepping range, report the stop to GDB. Otherwise,
7349 continue stepping. Add range stepping debug output.
7350 (linux_set_resume_request): Copy the step range from the resume
7351 request to the lwp.
7352 (linux_supports_range_stepping): New.
7353 (linux_target_ops) <supports_range_stepping>: Set to
7354 linux_supports_range_stepping.
7355 * linux-low.h (struct linux_target_ops)
7356 <supports_range_stepping>: New field.
7357 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7358 * linux-x86-low.c (x86_supports_range_stepping): New.
7359 (the_low_target) <supports_range_stepping>: Set to
7360 x86_supports_range_stepping.
7361 * server.c (handle_v_cont): Handle 'r' action.
7362 (handle_v_requests): Append ";r" if the target supports range
7363 stepping.
7364 * target.h (struct thread_resume) <step_range_start,
7365 step_range_end>: New fields.
7366 (struct target_ops) <supports_range_stepping>:
7367 New field.
7368 (target_supports_range_stepping): New macro.
7369
58794e1a
JB
73702013-05-17 Joel Brobecker <brobecker@adacore.com>
7371
7372 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7373 confusion in comment.
7374
d631c5a7
JB
73752013-05-17 Joel Brobecker <brobecker@adacore.com>
7376
7377 * lynx-low.c (struct process_info_private): New type.
7378 (lynx_add_process): New function.
7379 (lynx_create_inferior, lynx_attach): Replace calls to
7380 add_process by calls to lynx_add_process.
7381 (lynx_resume): If PTID is null, then try using
7382 current_process()->private->last_wait_event_ptid.
7383 Add comments.
7384 (lynx_clear_inferiors): Delete. The contents of that function
7385 has been inlined in lynx_mourn;
7386 (lynx_wait_1): Save the ptid in the process's private data.
7387 (lynx_mourn): Free the process' private data. Replace call
7388 to lynx_clear_inferiors by call to clear_inferiors.
7389
96f7a20f
YQ
73902013-05-17 Yao Qi <yao@codesourcery.com>
7391
7392 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7393 the right place.
7394
db0dfaa0
LM
73952013-05-16 Luis Machado <lgustavo@codesourcery.com>
7396
7397 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7398 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7399 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7400 PT_TEXT_END_ADDR guards. Update comments.
7401 (linux_target_op) <read_offsets>: Conditionally define to
7402 linux_read_offsets if the target is UCLIBC and if it defines
7403 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7404
68f5f838
SL
74052013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7406 Andrew Jenner <andrew@codesourcery.com>
7407
7408 * Makefile.in (SFILES): Add linux-nios2-low.c.
7409 (clean): Add action to delete nios2-linux.c.
7410 (nios2-linux.c): New rule.
7411 * configure.srv: Add nios2*-*-linux*.
7412 * linux-nios2-low.c: New.
7413
1ebff1fd
HAQ
74142013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7415
7416 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7417
f6150862
HZ
74182013-04-25 Hui Zhu <hui@codesourcery.com>
7419
7420 PR gdb/15186
f6150862
HZ
7421 * ax.c (ax_printf): Add fflush.
7422
614c279d
TT
74232013-04-22 Tom Tromey <tromey@redhat.com>
7424
7425 * Makefile.in (SFILES): Add filestuff.c.
7426 (OBS): Add filestuff.o.
7427 (filestuff.o): New target.
7428 * config.in, configure: Rebuild.
7429 * configure.ac: Check for fdwalk, pipe2.
7430
7d4e5717
PA
74312013-04-17 Pedro Alves <palves@redhat.com>
7432
7433 * configure.ac (USE_THREAD_DB): Delete variable.
7434 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7435 Don't AC_SUBST USE_THREAD_DB.
7436 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7437 * config.in, configure: Regenerate.
7438
d5c93e41
PA
74392013-04-16 Pedro Alves <palves@redhat.com>
7440
7441 * linux-low.h (struct lwp_info) <thread_known>: Move under
7442 the USE_THREAD_DB #ifdef.
7443
04f5fe89
PA
74442013-04-16 Pedro Alves <palves@redhat.com>
7445
7446 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7447 (linux-low.o): Delete rule.
7448 * linux-low.h: Always include "gdb_thread_db.h" instead of
7449 conditionally including thread_db.h.
7450 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7451 HAVE_THREAD_DB_H.
7452
480b27bf
JK
74532013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7454
7455 * Makefile.in (install-only): Fix make install regression.
7456
43662968
JK
74572013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7458
7459 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7460 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7461 installation.
7462 * gdbserver.1: Remove.
7463
3e74e146
PA
74642013-03-22 Pedro Alves <palves@redhat.com>
7465
7466 * linux-low.c (handle_extended_wait): Don't call
7467 linux_enable_event_reporting.
7468
a8347a2a
TT
74692013-03-15 Tony Theodore <tonyt@logyst.com>
7470
7471 PR build/9098:
7472 * Makefile.in (SHELL): Use @SHELL@.
7473
eeb56fa7
SDJ
74742013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7475
7476 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7477 compiler warning.
7478
4fa7e2ff
JB
74792013-03-13 Joel Brobecker <brobecker@adacore.com>
7480
7481 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7482 Remove extraneous NULL element.
7483
8ddb1965
YQ
74842013-03-13 Yao Qi <yao@codesourcery.com>
7485
7486 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7487 'V' block in trace frame.
7488
9accd112
MM
74892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7490
7491 * target.h (struct target_ops): Add btrace ops.
7492 (target_supports_btrace): New macro.
7493 (target_enable_btrace): New macro.
7494 (target_disable_btrace): New macro.
7495 (target_read_btrace): New macro.
7496 * gdbthread.h (struct thread_info): Add btrace field.
7497 * server.c: Include btrace-common.h.
7498 (handle_btrace_general_set): New function.
7499 (handle_btrace_enable): New function.
7500 (handle_btrace_disable): New function.
7501 (handle_general_set): Call handle_btrace_general_set.
7502 (handle_qxfer_btrace): New function.
7503 (struct qxfer qxfer_packets[]): Add btrace entry.
7504 * inferiors.c (remove_thread): Disable btrace.
7505 * linux-low: Include linux-btrace.h.
7506 (linux_low_enable_btrace): New function.
7507 (linux_low_read_btrace): New function.
7508 (linux_target_ops): Add btrace ops.
7509 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7510 Add srv_linux_btrace=yes.
7511 (x86_64-*-linux*): Add linux-btrace.o.
7512 Add srv_linux_btrace=yes.
7513 * configure.ac: Define HAVE_LINUX_BTRACE.
7514 * config.in: Regenerated.
7515 * configure: Regenerated.
7516
5cc22e4c
MM
75172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7518
7519 * server.c (handle_qxfer): Preserve error message if -3 is
7520 returned.
7521 (qxfer): Document the -3 return value.
7522
7c97f91e
MM
75232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7524
7525 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7526 (linux_btrace_h): New variable.
7527 (linux-btrace.o): New rule.
7528
be9a119c 75292013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7530 Hafiz Abid Qadeer <abidh@codesourcery.com>
7531
7532 * tracepoint.c (trace_buffer_size): New global.
7533 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7534 (init_trace_buffer): Change to one-argument function. Allocate
7535 trace buffer memory.
7536 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7537 handle QTBuffer:size packet.
7538 (cmd_bigqtbuffer_size): New function.
7539 (initialize_tracepoint): Call init_trace_buffer with
7540 DEFAULT_TRACE_BUFFER_SIZE.
7541 * server.c (handle_query): Add QTBuffer:size in the
7542 supported packets.
7543
e64f7499
YQ
75442013-03-07 Yao Qi <yao@codesourcery.com>
7545
7546 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7547 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7548 of -1.
7549 (cmd_qtsp): Adjust condition. Do post increment.
7550 Set cur_action and cur_step_action back to 0.
7551
f0ae6fc3
PA
75522013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7553
7554 PR server/15236
7555 * linux-low.c (linux_write_memory): Return early success if LEN is
7556 zero.
7557
b5b0b0af
CV
75582013-03-05 Corinna Vinschen <vinschen@redhat.de>
7559
334ad4a8 7560 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7561
589bc927
TT
75622013-02-28 Tom Tromey <tromey@redhat.com>
7563
7564 * configure.ac: Invoke AC_SYS_LARGEFILE.
7565 * configure, config.in: Rebuild.
7566
dfe07582
CV
75672013-02-28 Corinna Vinschen <vinschen@redhat.com>
7568
7569 * win32-low.c: Throughout, fix format strings and casts of
7570 printf-like functions to avoid type related warnings on all
7571 platforms.
7572 (get_child_debug_event): Print dwDebugEventCode as hex since
7573 that's how it's usually documented.
7574
736cd585
YQ
75752013-02-28 Yao Qi <yao@codesourcery.com>
7576
7577 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7578 pulongest.
7579
e1f58301
JW
75802013-02-27 Jiong Wang <jiwang@tilera.com>
7581
7582 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7583 (reg-tilegx32.c): New rule.
7584 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7585 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7586 different register info initializer according to elf class.
7587 (init_registers_tilgx32): New function. The tilegx32 register info
7588 initializer.
7589 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7590 (tile_store_gregset): Likewise.
7591
d171ca78
YQ
75922013-02-27 Yao Qi <yao@codesourcery.com>
7593
7594 * server.c (process_point_options): Print debug message when
7595 debug_threads is true.
7596
282bbdf3
YQ
75972013-02-26 Yao Qi <yao@codesourcery.com>
7598
7599 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7600
aca22551
PA
76012013-02-19 Pedro Alves <palves@redhat.com>
7602 Kai Tietz <ktietz@redhat.com>
7603
7604 PR gdb/15161
7605
7606 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7607 instead of strtoul to extract address from packet.
7608 (process_serial_event) <'z'>: Likewise.
7609
4f3cee1c
YQ
76102013-02-18 Yao Qi <yao@codesourcery.com>
7611
7612 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7613
8e1d55a3
PA
76142013-02-14 Pedro Alves <palves@redhat.com>
7615
7616 Plug memory leak.
7617
7618 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7619 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7620
458820da
PA
76212013-02-14 Pedro Alves <palves@redhat.com>
7622
7623 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7624
baea0dae
PA
76252013-02-14 Pedro Alves <palves@redhat.com>
7626
7627 * tracepoint.c (save_string): Delete.
7628 (add_tracepoint_action): Use savestring instead of save_string.
7629
0b1afbb3
PA
76302013-02-12 Pedro Alves <palves@redhat.com>
7631
7632 * linux-xtensa-low.c: Ditto.
7633 * xtensa-xtregs.c: Ditto.
7634
8a4ac37e
PA
76352013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7636
7637 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7638 thread_db.
7639
148de6bb
MS
76402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7641
7642 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7643 aarch64_num_wp_regs and aarch64_num_bp_regs to
7644 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7645
55fac6e0
MS
76462013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7647
7648 * linux-aarch64-low.c (ps_get_thread_area): Replace
7649 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7650
176eb98c
MS
76512013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7652 Marcus Shawcroft <marcus.shawcroft@arm.com>
7653 Nigel Stephens <nigel.stephens@arm.com>
7654 Yufeng Zhang <yufeng.zhang@arm.com>
7655
7656 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7657 (aarch64.c, aarch64-without-fpu.c): New targets.
7658 * configure.srv (aarch64*-*-linux*): New.
7659 * linux-aarch64-low.c: New file.
7660
56f7af9c
MS
76612013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7662
43aaf8b6 7663 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7664 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7665 (dequeue_one_deferred_signal, linux_resume_one_thread)
7666 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7667 (linux_tracefork_grandchild, linux_test_for_tracefork)
7668 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7669 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7670 where the argument is 0.
7671
60f662b0
YQ
76722013-01-25 Yao Qi <yao@codesourcery.com>
7673
7674 * event-loop.c: Include "queue.h".
7675 (gdb_event_p): New typedef.
7676 (struct gdb_event) <next_event>: Remove.
7677 (event_queue): Change to QUEUE(gdb_event_p).
7678 (async_queue_event): Remove.
7679 (gdb_event_xfree): New.
7680 (initialize_event_loop): New.
7681 (process_event): Use API from QUEUE.
7682 (wait_for_event): Likewise.
7683 * server.c (main): Call initialize_event_loop.
7684 * server.h (initialize_event_loop): Declare.
7685
5ae4861a
YQ
76862013-01-18 Yao Qi <yao@codesourcery.com>
7687
7688 * ax.h (struct eval_agent_expr_context): New.
7689 (gdb_eval_agent_expr): Update declaration.
7690 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7691 TFRAME. Add new argument CTX.
7692 * server.h (struct eval_agent_expr_context): Declare.
7693 (agent_mem_read, agent_tsv_read): Update declaration.
7694 (agent_mem_read_string): Likewise.
7695 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7696 (add_traceframe_block): Add new argument TPOINT.
7697 Increase TPOINT->traceframe_usage.
7698 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7699 eval_tracepoint_agent_expr.
7700 (condition_true_at_tracepoint): Likewise.
7701 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7702 (agent_mem_read_string, agent_tsv_read): Likewise.
7703
85e00e85
YQ
77042013-01-16 Yao Qi <yao@codesourcery.com>
7705
7706 * linux-low.c (linux_resume_one_lwp): Don't check
7707 'lwp->bp_reinsert != 0'.
7708
4039cf45
JB
77092013-01-07 Joel Brobecker <brobecker@adacore.com>
7710 Pedro Alves <palves@redhat.com>
7711
7712 * lynx-low.c (ptrace_request_to_str): Define a temporary
7713 macro and use it to simplify this function's implementation.
7714
9044dee2
JB
77152013-01-07 Joel Brobecker <brobecker@adacore.com>
7716
7717 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7718 sets errno.
7719
e6352c8f
JB
77202013-01-07 Joel Brobecker <brobecker@adacore.com>
7721
7722 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7723
50681a27
JB
77242013-01-07 Joel Brobecker <brobecker@adacore.com>
7725
7726 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7727
3f6e77ef
JB
77282013-01-07 Joel Brobecker <brobecker@adacore.com>
7729
7730 * lynx-low.c (lynx_resume): Use the resume_info parameter
7731 to determine the ptid for the lynx_ptrace call, unless
7732 it is equal to minus_one_ptid, in which case we use the
7733 ptid of the current_inferior.
7734 (lynx_wait_1): After having received a thread create/exit
7735 event, resume the inferior's execution using the signaling
7736 thread's ptid, rather than the old ptid.
7737
7fda33ae
JB
77382013-01-07 Joel Brobecker <brobecker@adacore.com>
7739
7740 * lynx-low.c (lynx_resume): Delete variable ret.
7741
b9786c74
JB
77422013-01-01 Joel Brobecker <brobecker@adacore.com>
7743
7744 * gdbreplay.c (gdbreplay_version): Update copyright year.
7745 * server.c (gdbserver_version): Likewise.
7746
8b93d60f
JB
77472012-12-17 Joel Brobecker <brobecker@adacore.com>
7748
7749 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7750 new thread.
7751
037335a7
JB
77522012-12-17 Joel Brobecker <brobecker@adacore.com>
7753
7754 * lynx-low.c (ptrace_request_to_str): Add handling for
7755 PTRACE_GETTRACESIG.
7756
52d4cbd8
JB
77572012-12-17 Joel Brobecker <brobecker@adacore.com>
7758
7759 * lynx-low.c (lynx_attach): Delete variable new_process.
7760
ab8f6ca9
JB
77612012-12-17 Joel Brobecker <brobecker@adacore.com>
7762
7763 * lynx-low.c (lynx_create_inferior): Delete variable
7764 new_process.
7765
78cbc024
JB
77662012-12-17 Joel Brobecker <brobecker@adacore.com>
7767
7768 * lynx-low.c (ptrace_request_to_str): Do not handle
7769 PTRACE_GETTHREADLIST if this macro does not exist.
7770
14a00470
YQ
77712012-12-15 Yao Qi <yao@codesourcery.com>
7772
7773 * Makefile.in (OBS): Add notif.o.
7774 * notif.c, notif.h: New.
7775 * server.c: Include "notif.h".
7776 (struct vstop_notif) <next>: Remove.
7777 <base>: New field.
7778 (queue_stop_reply): Update.
7779 (push_event, send_next_stop_reply): Remove.
7780 (discard_queued_stop_replies): Update.
7781 (notif_stop): New variable.
7782 (handle_v_stopped): Remove.
7783 (handle_v_requests): Don't call handle_v_stopped. Call
7784 handle_ack_notif instead.
7785 (queue_stop_reply_callback): Call notif_event_enque instead
7786 of queue_stop_reply.
7787 (handle_status): Don't call send_next_stop_reply, call
7788 notif_write_event instead.
7789 (kill_inferior_callback): Likewise.
7790 (detach_or_kill_inferior_callback): Likewise.
7791 (main): Call initialize_notif.
7792 (process_serial_event): Call QUEUE_is_empty.
7793 (handle_target_event): Call notif_push instead of push event.
7794 * server.h (push_event): Remove declaration.
7795
61c125b9
TT
77962012-12-10 Tom Tromey <tromey@redhat.com>
7797
7798 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7799 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7800 macros.
7801 (.c.o): Rewrite.
7802 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7803 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7804 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7805 (amd64-linux-ipa.o, ax.o): Rewrite.
7806 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7807 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7808 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7809 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7810 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7811 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7812 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7813 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7814 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7815 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7816 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7817 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7818 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7819 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7820 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7821 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7822 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7823 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7824 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7825 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7826 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7827 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7828 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7829 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7830 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7831 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7832 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7833 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7834 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7835 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7836 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7837 (reg-tilegx.o): Remove.
7838 (all_object_files): New macro.
7839 Include .deps files.
7840 * aclocal.m4, configure: Rebuild.
7841 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7842 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7843 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7844
e90e9ad9
TT
78452012-12-05 Tom Tromey <tromey@redhat.com>
7846
7847 PR gdb/14917:
7848 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7849
02d403bf 78502012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7851
7852 * configure.ac: Check for linux/perf_event.h.
7853 * config.in: Regenerated.
7854 * configure: Regenerated.
7855
0270a750
PA
78562012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7857
7858 * hostio.c (handle_readlink): Decrease buffer size
7859 parameter passed to readlink by one byte.
7860
8c29b58e
YQ
78612012-11-26 Yao Qi <yao@codesourcery.com>
7862
7863 * configure.ac (build_warnings): Append '-Wempty-body'.
7864 * configure: Regenerated.
7865 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7866 body.
7867
8bdce1ff
PM
78682012-11-15 Pierre Muller <muller@sourceware.org>
7869
7870 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7871 * config.in: Regenerate.
7872 * configure: Regenerate.
7873 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7874 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7875 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7876 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7877 header.
7878 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7879 instead of <sys/wait.h> header.
7880 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7881
02d403bf 78822012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7883
7884 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7885 (various make rules): Remove -DGDBSERVER
7886
fbd5db48
YQ
78872012-11-09 Yao Qi <yao@codesourcery.com>
7888
7889 * spu-low.c (current_ptid): Move it to ..
7890 * gdbthread.h: ... here. New.
7891 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7892 * server.c (myresume, process_serial_event): Likewise.
7893 * thread-db.c (thread_db_find_new_threads): Likewise.
7894 * tracepoint.c (run_inferior_command): Likewise.
7895
b3dc46ff
AB
78962012-10-01 Andrew Burgess <aburgess@broadcom.com>
7897
7898 * server.c (handle_search_memory_1): Include access length in
7899 warning message.
7900
07c04788
HPN
79012012-09-05 Michael Brandt <michael.brandt@axis.com>
7902
7903 * linux-crisv32-low.c: Fix compile errors.
7904
918d227b
YQ
79052012-09-04 Yao Qi <yao@codesourcery.com>
7906
7907 * tracepoint.c (cmd_qtsv): Adjust debug message.
7908 Don't check CUR_TPOINT.
7909
18c1b81a
YQ
79102012-08-28 Yao Qi <yao@codesourcery.com>
7911
7912 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7913 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7914 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7915 Remove declarations of xmalloc, xreallloc, xstrdup and
7916 freeargv.
7917 * Makefile.in (libiberty_h): New.
7918 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7919 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7920
dc82f37b
YQ
79212012-08-23 Yao Qi <yao@codesourcery.com>
7922
7923 * server.h: Remove declaration of 'xsnprintf'.
7924
406b1477
KS
79252012-08-22 Keith Seitz <keiths@redhat.com>
7926
7927 * server.h: Include build-gnulib-gbserver/config.h.
7928 * gdbreplay.c: Likewise.
7929
e6712ff1
DE
79302012-08-08 Doug Evans <dje@google.com>
7931
7932 * Makefile.in (SFILES): Add gdb_vecs.c.
7933 (OBS): Add gdb_vecs.o.
7934 (gdb_vecs_h, host_defs_h): New variables.
7935 (thread-db.o): Add $(gdb_vecs_h) dependency.
7936 (gdb_vecs.o): New rule.
7937 * thread-db.c: #include "gdb_vecs.h".
7938 (thread_db_load_search): Use a vector to iterate over path elements.
7939 Handle text appearing after "$pdir".
7940
7941 * configure.ac: Add check for strstr.
7942 * config.in: Regenerate.
7943 * configure: Regenerate.
7944
7c3270ae
UW
79452012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7946
7947 * hostio.c (handle_pread): If pread fails, fall back to attempting
7948 lseek/read.
7949 (handle_pwrite): Likewise for pwrite.
7950
b62e2b27
UW
79512012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7952
7953 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7954 between unsupported TYPE and unimplementable ADDR/LEN combination.
7955 (arm_insert_point): Act on new return value.
7956
78a99e91
PA
79572012-07-31 Pedro Alves <palves@redhat.com>
7958
7959 * server.c (process_point_options): Only skip tokens if we find
7960 one that is unrecognized. Don't treat 'X' specially while
7961 skipping unrecognized tokens.
7962
fcf303ab
UW
79632012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7964
7965 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7966 to 4-byte-align HW breakpoint addresses for Thumb.
7967
7255706c
YQ
79682012-07-27 Yao Qi <yao@codesourcery.com>
7969
7970 PR remote/14161.
7971
7972 * server.h: Declare gdb_agent_about_to_close.
7973 * target.c (kill_inferior): Include "agent.h".
7974 New. Send command 'kill'.
7975 * target.h (kill_inferior): Removed macro.
7976 * tracepoint.c (gdb_agent_about_to_close): New.
7977 (gdb_agent_helper_thread): Handle command 'close'.
7978 Wait endlessly until the inferior stops.
7979 Install gdb_agent_remove_socket to atexit hook.
7980 (agent_socket_name): New static variable.
7981 (gdb_agent_socket_init): Replace local variable 'name' with
7982 'agent_socket_name'.
7983 (gdb_agent_remove_socket): New.
7984
5a3f286f
YQ
79852012-07-27 Yao Qi <yao@codesourcery.com>
7986
7987 * server.c (process_point_options): Stop at 'X' when parsing.
7988
961bd387
ME
79892012-07-19 Michael Eager <eager@eagercon.com>
7990
a261b8f5 7991 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7992 to hw_execute.
7993 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7994 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7995 hardware breakpoint.
7996
aa7c7447
JK
79972012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7998
7999 * gdbserver/linux-low.c (initialize_low): Call
8000 linux_ptrace_init_warnings.
8001
7f216e7c
DE
80022012-07-02 Doug Evans <dje@google.com>
8003
8004 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8005 pointer to int.
8006
d3ce09f5
SS
80072012-07-02 Stan Shebs <stan@codesourcery.com>
8008
8009 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8010 (ax.o): Add it to build rule.
8011 (ax-ipa.o): Ditto.
8012 (OBS): Add format.o.
8013 (IPA_OBS): Add format.o.
8014 * server.c (handle_query): Claim support for breakpoint commands.
8015 (process_point_options): Add command case.
8016 (process_serial_event): Leave running if there are printfs in
8017 effect.
8018 * mem-break.h (any_persistent_commands): Declare.
8019 (add_breakpoint_commands): Declare.
8020 (gdb_no_commands_at_breakpoint): Declare.
8021 (run_breakpoint_commands): Declare.
8022 * mem-break.c (struct point_command_list): New struct.
8023 (struct breakpoint): New field command_list.
8024 (any_persistent_commands): New function.
8025 (add_commands_to_breakpoint): New function.
8026 (add_breakpoint_commands): New function.
8027 (gdb_no_commands_at_breakpoint): New function.
8028 (run_breakpoint_commands): New function.
8029 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8030 locally.
8031 * ax.c: Include format.h.
8032 (ax_printf): New function.
8033 (gdb_eval_agent_expr): Add printf opcode.
8034
2f8f6aed
YQ
80352012-06-13 Yao Qi <yao@codesourcery.com>
8036
8037 * server.c (start_inferior): Remove duplicated writes to fields
8038 'last_resume_kind' and 'last_status' of 'current_inferior'.
8039
0c9070b3
YQ
80402012-06-12 Yao Qi <yao@codesourcery.com>
8041 Pedro Alves <palves@redhat.com>
8042
8043 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8044 comment.
8045 * server.c (handle_v_cont): Extend comment.
8046
c52daf70
YQ
80472012-06-11 Yao Qi <yao@codesourcery.com>
8048
8049 * linux-low.c (linux_attach): Add 'static'.
8050
d38bbb0a
YQ
80512012-06-06 Yao Qi <yao@codesourcery.com>
8052
8053 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8054
89dc0afd
JK
80552012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8056
8057 Fix gcc -flto compilation warning.
8058 * server.c (main): Make variable multi_mode and attach volatile.
8059
75f62ce7
TJB
80602012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8061
8062 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8063 if the platform doesn't know about it.
8064
65f479b6
PA
80652012-05-30 Jeff Kenton <jkenton@tilera.com>
8066
8067 * Makefile.in (SFILES): Add linux-tile-low.c.
8068 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8069 * configure.srv: Handle tilegx-*-linux*.
8070 * linux-tile-low.c: New file.
8071
0c5bf5a9
JK
80722012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8073
8074 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8075
a493e3e2
PA
80762012-05-24 Pedro Alves <palves@redhat.com>
8077
8078 PR gdb/7205
8079
43aaf8b6 8080 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8081
2ea28649
PA
80822012-05-24 Pedro Alves <palves@redhat.com>
8083
8084 PR gdb/7205
8085
8086 Replace target_signal with gdb_signal throughout.
8087
8d409d16
MR
80882012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8089
8090 * linux-low.c (linux_store_registers): Avoid the copying sequence
8091 when no data has been retrieved by ptrace.
8092
23512c01
MGD
80932012-05-22 Will Deacon <will.deacon@arm.com>
8094
8095 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8096 Include asm/ptrace.h.
8097 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8098 already defined.
8099
4934b29e
MR
81002012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8101
8102 * linux-low.c (linux_store_registers): Don't re-retrieve data
8103 with ptrace that has already been obtained from /proc. Always
8104 copy any data retrieved with ptrace to the buffer supplied.
8105
bde24c0a
PA
81062012-05-11 Yao Qi <yao@codesourcery.com>
8107 Pedro Alves <palves@redhat.com>
8108
8109 * linux-low.c (enum stopping_threads_kind): New.
8110 (stopping_threads): Change type to `enum stopping_threads_kind'.
8111 (handle_extended_wait): If stopping and suspending threads, leave
8112 the new_lwp suspended too.
8113 (linux_wait_for_event): Adjust.
8114 (stop_all_lwps): Set `stopping_threads' to
8115 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8116 whether we're suspending threads or just stopping them. Assert no
8117 recursion happens.
8118
623b6bdf
YQ
81192012-04-29 Yao Qi <yao@codesourcery.com>
8120
8121 * server.h: Move some code to ...
8122 * gdbthread.h: ... here. New.
8123 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8124 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8125 (nto-low.o, win32-low.o): Likewise.
8126 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8127 * regcache.c, remote-utils.c, server.c: Likewise.
8128 * target.c, tracepoint.c, win32-low.c: Likewise.
8129
f15f9948
TJB
81302012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8131
8132 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8133 (PTRACE_ARG4_TYPE): Likewise.
8134 (PTRACE_XFER_TYPE): Likewise.
8135 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8136 ptrace to PTRACE_ARG3_TYPE.
8137 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8138 (PTRACE_ARG4_TYPE): Likewise.
8139 (PTRACE_XFER_TYPE): Likewise.
8140 (linux_detach_one_lwp): Cast fourth argument of
8141 ptrace to long then PTRACE_ARG4_TYPE.
8142 (regsets_fetch_inferior_registers): Cast third argument of
8143 ptrace to long then PTRACE_ARG3_TYPE.
8144 (regsets_store_inferior_registers): Likewise.
8145
38ea300a
PA
81462012-04-20 Pedro Alves <palves@redhat.com>
8147
8148 * configure: Regenerate.
8149
c971b7fa
PA
81502012-04-19 Pedro Alves <palves@redhat.com>
8151
43aaf8b6 8152 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8153 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8154 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8155 (all, install-only, uninstall, clean-info, all-lib, clean): No
8156 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8157 (maintainer-clean realclean distclean): Use subdir_do.
8158 (subdir_do): New.
8159 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8160 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8161 * acinclude.m4: Include acx_configure_dir.m4.
8162 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8163 calls. Call AC_PROG_RANLIB. Configure gnulib using
8164 ACX_CONFIGURE_DIR.
8165 (GNULIB): New.
8166 (GNULIB_STDINT_H): Adjust.
8167 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8168 * gdbreplay.c: Include build-gnulib/config.h.
8169 * server.h: Likewise.
8170 * aclocal.m4: Regenerate.
8171 * config.in: Regenerate.
8172 * configure: Regenerate.
c971b7fa 8173
809277f8
PA
81742012-04-19 Pedro Alves <palves@redhat.com>
8175
8176 * Makefile.in (LIBGNU, INCGNU): Adjust.
8177 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8178 (all, install-only, uninstall, clean-info, all-lib, clean)
8179 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8180 * configure.ac: Adjust AC_OUTPUT output.
8181 * aclocal.m4: Regenerate.
8182 * configure: Regenerate.
8183
fd9bb8b8
PA
81842012-04-19 Pedro Alves <palves@redhat.com>
8185
8186 * Makefile.in (generated_files): New.
8187 (server_h): Remove the explicit dependency on config.h, and depend
8188 on $generated_files.
8189
1c298c66
PA
81902012-04-19 Pedro Alves <palves@redhat.com>
8191
8192 * Makefile.in (INCGNU): Add -Ignulib.
8193
57c4b50b
PA
81942012-04-19 Pedro Alves <palves@redhat.com>
8195
8196 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8197 (INCGNU): ... this, and spell out -I here.
8198 (GNULIB_LIB): Rename to ...
8199 (LIBGNU): ... this.
8200 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8201
1030e047
PA
82022012-04-19 Pedro Alves <palves@redhat.com>
8203
8204 * config.in: Regenerate.
8205
447d4319
PA
82062012-04-19 Pedro Alves <palves@redhat.com>
8207
8208 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8209 * server.h (memmem): Remove declaration.
8210 * config.in: Regenerate.
8211 * configure: Regenerate.
8212
aad9eab9
YQ
82132012-04-19 Yao Qi <yao@codesourcery.com>
8214
8215 * Makefile.in (SFILES): Add common/vec.c.
8216 (OBS): Add vec.o.
8217 (vec.o): New rule.
8218
3e10640f
YQ
82192012-04-19 Yao Qi <yao@codesourcery.com>
8220
8221 * remote-utils.c (prepare_resume_reply): Replace with macro
8222 target_core_of_thread.
8223 * server.c (handle_qxfer_threads_proper): Likewise.
8224 * target.h (traget_core_of_thread): New macro.
8225
71622373
PA
82262012-04-18 Pedro Alves <palves@redhat.com>
8227
8228 * aclocal.m4: Regenerate.
8229 * configure: Regenerate.
8230
80d26939
YQ
82312012-04-16 Yao Qi <yao@codesourcery.com>
8232
8233 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8234 duplicated on address.
8235
42476b70
YQ
82362012-04-16 Yao Qi <yao@codesourcery.com>
8237
8238 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8239 (struct tracepoint_action_ops) <send>: New field.
8240 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8241 (agent_expr_send, x_tracepoint_action_send): New.
8242 (l_tracepoint_action_send): New.
8243 (cmd_qtdp): Download and install tracepoint
8244 according to `use_agent'.
8245 (run_inferior_command): Add one more parameter `len'.
8246 Update callers.
8247 (tracepoint_send_agent): New.
8248 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8249
7bc83639
YQ
82502012-04-16 Yao Qi <yao@codesourcery.com>
8251
8252 * tracepoint.c (download_tracepoints): Moved to ...
8253 (cmd_qtstart): ... here.
8254
5f18041e
YQ
82552012-04-14 Yao Qi <yao@codesourcery.com>
8256
8257 * tracepoint.c: Include inttypes.h.
8258 (struct collect_memory_action): Use sized types.
8259 (struct tracepoint): Likewise.
8260 (cmd_qtdp, stop_tracing): Update print specifiers.
8261 (cmd_qtp, response_tracepoint): Likewise.
8262 (collect_data_at_tracepoint): Likewise.
8263 (collect_data_at_step): Likewise.
8264
55a8c076
YQ
82652012-04-14 Yao Qi <yao@codesourcery.com>
8266
8267 Import gnulib module inttypes.
8268 * aclocal.m4, config.in, configure: Regenerated.
8269
dc750257
YQ
82702012-04-14 Yao Qi <yao@codesourcery.com>
8271
8272 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8273 Makefile and config.status at last.
8274
0ab5faf9
YQ
82752012-04-13 Yao Qi <yao@codesourcery.com>
8276
8277 * tracepoint.c: Include stdint.h unconditionally.
8278
18f5fd81
TJB
82792012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8280
8281 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8282 on BFD_HAVE_SYS_PROCFS_TYPE.
8283 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8284 * configure: Regenerate.
8285 * config.in: Likewise.
8286
4d47af5c
L
82872012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8288
8289 * Makefile.in (clean): Also remove x32.c x32-linux.c
8290 x32-avx.c x32-avx-linux.c.
8291 (x32.o): New target.
8292 (x32.c): Likewise.
8293 (x32-linux.o): Likewise.
8294 (x32-linux.c): Likewise.
8295 (x32-avx.o): Likewise.
8296 (x32-avx.c): Likewise.
8297 (x32-avx-linux.o): Likewise.
8298 (x32-avx-linux.c): Likewise.
8299
8300 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8301 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8302 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8303 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8304 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8305 i386/x32-avx-linux.xml.
8306
8307 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8308 (init_registers_x32_avx_linux): Likwise.
8309 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8310 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8311
ecedbe58
PA
83122012-04-13 Pedro Alves <palves@redhat.com>
8313
8314 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8315 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8316 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8317 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8318 the sub-make.
8319
c92b5177
L
83202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8321
8322 * linux-x86-low.c (compat_x32_clock_t): New.
8323 (compat_x32_siginfo_t): Likewise.
8324 (compat_x32_siginfo_from_siginfo): Likewise.
8325 (siginfo_from_compat_x32_siginfo): Likewise.
8326 (linux_is_elf64): Likewise.
8327 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8328 and siginfo_from_compat_x32_siginfo for x32.
8329 (x86_arch_setup): Set linux_is_elf64.
8330
214d508e
L
83312012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8332
8333 PR gdb/13969
8334 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8335 e_machine field.
8336 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8337 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8338 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8339 compatible with process.
8340
c9a1864a
YQ
83412012-04-12 Yao Qi <yao@codesourcery.com>
8342
8343 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8344 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8345 (install-only, install-info, clean): Handle sub dir gnulib.
8346 (all-lib, am--refresh): New targets.
8347 (memmem.o): Remove target.
8348 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8349 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8350 (AC_REPLACE_FUNCS): Remove memmem.
8351 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8352 (AC_OUTPUT): Generate Makefile in gnulib/.
8353 * aclocal.m4, config.in, configure: Regenerated.
8354
367ba2c2
MR
83552012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8356
8357 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8358
9d236627
PA
83592012-04-05 Pedro Alves <palves@redhat.com>
8360
8361 -Werror=strict-aliasing
8362
8363 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8364 pointer.
8365
111217b3
PA
83662012-04-04 Pedro Alves <palves@redhat.com>
8367
8368 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8369 (sparc_store_gregset_from_stack, sparc_store_gregset)
8370 (sparc_breakpoint_at): Fix formatting.
8371
8365dcf5
TJB
83722012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8373
8374 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8375 are available.
8376 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8377 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8378 * config.in: Regenerate.
8379 * configure: Likewise.
8380
689cc2ae
PA
83812012-03-29 Pedro Alves <palves@redhat.com>
8382
8383 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8384 Correct ptrace arguments.
8385
c14dfd32
PA
83862012-03-28 Pedro Alves <palves@redhat.com>
8387
8388 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8389 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8390 (IA64_FR1_REGNUM): New defines.
8391 (ia64_fetch_register): New.
8392 (the_low_target): Install it.
8393 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8394 field.
8395 * linux-low.c (linux_fetch_registers): Try the
8396 the_low_target.fetch_register hook first.
8397
8398 * linux-arm-low.c (the_low_target): Adjust.
8399 * linux-bfin-low.c (the_low_target): Adjust.
8400 * linux-cris-low.c (the_low_target): Adjust.
8401 * linux-crisv32-low.c (the_low_target): Adjust.
8402 * linux-m32r-low.c (the_low_target): Adjust.
8403 * linux-m68k-low.c (the_low_target): Adjust.
8404 * linux-mips-low.c (the_low_target): Adjust.
8405 * linux-ppc-low.c (the_low_target): Adjust.
8406 * linux-s390-low.c (the_low_target): Adjust.
8407 * linux-sh-low.c (the_low_target): Adjust.
8408 * linux-sparc-low.c (the_low_target): Adjust.
8409 * linux-tic6x-low.c (the_low_target): Adjust.
8410 * linux-x86-low.c (the_low_target): Adjust.
8411 * linux-xtensa-low.c (the_low_target): Adjust.
8412
63c88e13
PA
84132012-03-26 Pedro Alves <palves@redhat.com>
8414
8415 * server.c (handle_qxfer_libraries): Don't bail early if
8416 the_target->qxfer_libraries_svr4 is not NULL.
8417
fb723180
PA
84182012-03-26 Pedro Alves <palves@redhat.com>
8419
8420 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8421
0afae3cf
PA
84222012-03-23 Pedro Alves <palves@redhat.com>
8423
8424 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8425 "library-list-svr4" element's start tag when the the DSO list is
8426 empty.
8427
485f1ee4
PA
84282012-03-23 Pedro Alves <palves@redhat.com>
8429
8430 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8431 a variable whose type size is the same as the inferior's pointer
8432 size.
8433
a5362b9a
TS
84342012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8435
8436 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8437 struct siginfo.
8438 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8439 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8440 * linux-low.h: Include <signal.h>.
8441 (struct siginfo): Remove forward declaration.
8442 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8443 struct siginfo.
8444
d226c142
MF
84452012-03-21 Mike Frysinger <vapier@gentoo.org>
8446
8447 * .gitignore: Ignore more files.
8448
122f36ef
PA
84492012-03-19 Pedro Alves <palves@redhat.com>
8450 Jan Kratochvil <jan.kratochvil@redhat.com>
8451
8452 * server.c (cont_thread, general_thread): Add describing comments.
8453 (start_inferior): Clear `cont_thread'.
8454 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8455 of a process.
8456
fc3e5175
YQ
84572012-03-15 Yao Qi <yao@codesourcery.com>
8458
8459 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8460 handling to ...
8461 (cmd_qtdp): ... here.
8462
8d0d92cd
YQ
84632012-03-15 Yao Qi <yao@codesourcery.com>
8464
8465 * tracepoint.c (struct tracepoint_action_ops): New.
8466 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8467 (m_tracepoint_action_download): New.
8468 (r_tracepoint_action_download): New.
8469 (x_tracepoint_action_download): New.
8470 (l_tracepoint_action_download): New.
8471 (add_tracepoint_action): Install `action->ops' according type.
8472 (download_tracepoint_1): Move code `download' function pointer
8473 of various tracepoint_action_ops.
8474
87b0bb13
JK
84752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8476
8477 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8478 linux_ptrace_attach_warnings.
8479
5f572dec
JK
84802012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8481
8482 * Makefile.in (linux-ptrace.o): New.
8483 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8484 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8485 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8486 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8487 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8488 of these targets.
8489 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8490
f4647387
YQ
84912012-03-08 Yao Qi <yao@codesourcery.com>
8492 Pedro Alves <palves@redhat.com>
8493
8494 Fix PR server/13392.
8495 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8496 offset of JMP insn.
8497 * tracepoint.c (remove_tracepoint): New.
8498 (cmd_qtdp): Call remove_tracepoint when failed to install.
8499
9b224c5e
PA
85002012-03-07 Pedro Alves <palves@redhat.com>
8501
8502 * linux-low.c (get_detach_signal): New.
8503 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8504 Pass on pending signals to PTRACE_DETACH. Check the result of the
8505 ptrace call.
8506 * server.c (program_signals, program_signals_p): New.
8507 (handle_general_set): Handle QProgramSignals.
8508 * server.h (program_signals, program_signals_p): Declare.
8509
e237a7e2
JK
85102012-03-05 Pedro Alves <palves@redhat.com>
8511 Jan Kratochvil <jan.kratochvil@redhat.com>
8512
8513 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8514 New comment why.
8515
5808517f
YQ
85162012-03-03 Yao Qi <yao@codesourcery.com>
8517
8518 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8519 agent_look_up_symbols.
8520
58b4daa5
YQ
85212012-03-03 Yao Qi <yao@codesourcery.com>
8522
8523 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8524 (linux-x86-low.o): Likewise.
8525 * server.h: Remove in_process_agent_loaded.
8526 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8527 common/agent.c.
8528 Update callers.
8529
8ffcbaaf
YQ
85302012-03-03 Yao Qi <yao@codesourcery.com>
8531
8532 * tracepoint.c (gdb_agent_capability): New global.
8533 (in_process_agent_loaded_ust): Renamed to
8534 `in_process_agent_supports_ust'.
8535 Update callers.
8536 (in_process_agent_supports_ust): Call agent_capability_check.
8537 (clear_installed_tracepoints): Assert that agent supports
8538 agent.
8539
d1feda86
YQ
85402012-03-03 Yao Qi <yao@codesourcery.com>
8541
8542 * linux-low.c (linux_supports_agent): New.
8543 (linux_target_ops): Initialize field `supports_agent' with
8544 linux_supports_agent.
8545 * target.h (struct target_ops) <supports_agent>: New.
8546 (target_supports_agent): New macro.
8547 * server.c (handle_general_set): Handle packet 'QAgent'.
8548 (handle_query): Send `QAgent+'.
8549 * Makefile.in (server.o): Depends on agent.h.
8550
2fa291ac
YQ
85512012-03-03 Yao Qi <yao@codesourcery.com>
8552
8553 * Makefile.in (OBS): Add agent.o.
8554 Add new rule for agent.o.
8555 Track dependence of tracepoint.c on agent.h.
8556 * tracepoint.c (run_inferior_command_1):
8557 (run_inferior_command): Call agent_run_command.
8558 (gdb_ust_connect_sync_socket): Deleted. Move it to
8559 common/agent.c.
8560 (resume_thread, stop_thread): Likewise.
8561 (gdb_ust_socket_init): Renamed to ...
8562 (gdb_agent_socket_init): ... New.
8563 (gdb_ust_thread): Renamed to ...
8564 (gdb_agent_helper_thread): ... New.
8565 (gdb_ust_init): Move some code to ...
8566 (gdb_agent_init): ... here. New.
8567 [HAVE_UST]: Call gdb_ust_init.
8568 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8569 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8570 * config.in, configure: Regenerated.
8571
05044653
PA
85722012-03-02 Pedro Alves <palves@redhat.com>
8573
8574 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8575 * linux-low.c (struct simple_pid_list): New.
8576 (stopped_pids): New a struct simple_pid_list pointer.
8577 (add_to_pid_list, pull_pid_from_list): New.
8578 (handle_extended_wait): Don't assume the first signal new children
8579 report is SIGSTOP. Adjust call to pull_pid_from_list.
8580 (linux_wait_for_lwp): Adjust.
8581
8d00225b
YQ
85822012-03-02 Yao Qi <yao@codesourcery.com>
8583
8584 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8585 debug log.
8586
19560ba5
YQ
85872012-03-02 Yao Qi <yao@codesourcery.com>
8588
8589 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8590 `stop_pc' and `tpoint'. Update caller.
8591
1faeff08
MR
85922012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8593
8594 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8595 * linux-low.c (use_linux_regsets): New macro.
8596 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8597 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8598 (linux_register_in_regsets): New function.
8599 (usr_fetch_inferior_registers): Skip registers covered by
8600 regsets.
8601 (usr_store_inferior_registers): Likewise.
8602 (usr_fetch_inferior_registers): New macro.
8603 (usr_store_inferior_registers): Likewise.
8604 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8605 (linux_store_registers): Likewise.
8606 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8607 prototype.
8608 (init_registers_mips64_dsp_linux): Likewise.
8609 (init_registers_mips_linux): New macro.
8610 (init_registers_mips_dsp_linux): Likewise.
8611 (mips_dsp_num_regs): Likewise.
8612 (DSP_BASE, DSP_CONTROL): New fallback macros.
8613 (mips_base_regs): New macro.
8614 (mips_regmap): Use it. Fix the size.
8615 (mips_dsp_regmap): New variable.
8616 (mips_dsp_regset_bitmap): Likewise.
8617 (mips_arch_setup): New function.
8618 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8619 than mips_regmap.
8620 (mips_cannot_store_register): Likewise.
8621 (the_low_target): Update .arch_setup, .num_regs and .regmap
8622 initializers. Add .regset_bitmap initializer.
8623 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8624 initializer.
8625 * linux-bfin-low.c (the_low_target): Likewise.
8626 * linux-cris-low.c (the_low_target): Likewise.
8627 * linux-crisv32-low.c (the_low_target): Likewise.
8628 * linux-ia64-low.c (the_low_target): Likewise.
8629 * linux-m32r-low.c (the_low_target): Likewise.
8630 * linux-m68k-low.c (the_low_target): Likewise.
8631 * linux-ppc-low.c (the_low_target): Likewise.
8632 * linux-s390-low.c (the_low_target): Likewise.
8633 * linux-sh-low.c (the_low_target): Likewise.
8634 * linux-sparc-low.c (the_low_target): Likewise.
8635 * linux-tic6x-low.c (the_low_target): Likewise.
8636 * linux-x86-low.c (the_low_target): Likewise.
8637 * linux-xtensa-low.c (the_low_target): Likewise.
8638 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8639 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8640 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8641 srv_xmlfiles.
8642 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8643 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8644
c03e6ccc
YQ
86452012-02-29 Yao Qi <yao@codesourcery.com>
8646 Pedro Alves <palves@redhat.com>
8647
8648 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8649 `step_over_finished' is true.
8650
644cebc9
PA
86512012-02-27 Pedro Alves <palves@redhat.com>
8652
8653 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8654 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8655
c14d7ab2
PA
86562012-02-27 Pedro Alves <palves@redhat.com>
8657
8658 PR server/9684
8659 * linux-low.c (pid_is_stopped): New.
8660 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8661
412c89dd
LM
86622012-02-25 Luis Machado <lgustavo@codesourcery.com>
8663
8664 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8665 of conditions.
8666
b745defe
MR
86672012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8668
8669 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8670
9f3a5c85
LM
86712012-02-24 Luis Machado <lgustavo@codesourcery>
8672
8673 * server.c (handle_query): Advertise support for target-side
8674 breakpoint condition evaluation.
8675 (process_point_options): New function.
8676 (process_serial_event): When inserting a breakpoint, check for
8677 a target-side condition that should be evaluated.
8678
8679 * mem-break.c: Include regcache.h and ax.h.
8680 (point_cond_list_t): New data structure.
8681 (breakpoint) <cond_list>: New field.
8682 (find_gdb_breakpoint_at): Make non-static.
8683 (delete_gdb_breakpoint_at): Clear any target-side
8684 conditions.
8685 (clear_gdb_breakpoint_conditions): New function.
8686 (add_condition_to_breakpoint): Likewise.
8687 (add_breakpoint_condition): Likewise.
8688 (gdb_condition_true_at_breakpoint): Likewise.
8689 (gdb_breakpoint_here): Return result directly instead
8690 of going through a local variable.
8691
8692 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8693 (clear_gdb_breakpoint_conditions): Likewise.
8694 (add_breakpoint_condition): Likewise.
8695 (gdb_condition_true_at_breakpoint): Likewise.
8696
8697 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8698 (need_step_over_p): Take target-side breakpoint condition into
8699 consideration.
8700
5e1dc496
LM
87012012-02-24 Luis Machado <lgustavo@codesourcery>
8702
8703 * server.h: Include tracepoint.h.
8704 (agent_mem_read, agent_get_trace_state_variable_value,
8705 agent_set_trace_state_variable_value,
8706 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8707 get_set_tsv_func_addr): New prototypes.
8708
8709 * ax.h: New include file.
8710 * ax.c: New source file.
8711
8712 * tracepoint.c: Include ax.h.
8713 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8714 agent_expr, eval_result_type): Move to ax.h.
8715 (parse_agent_expr): Rename to ...
8716 (gdb_parse_agent_expr): ... this, make it non-static and move
8717 to ax.h.
8718 (unparse_agent_expr) Rename to ...
8719 (gdb_unparse_agent_expr): ... this, make it non-static and move
8720 to ax.h.
8721 (eval_agent_expr): Rename to ...
8722 (eval_tracepoint_agent_expr): ... this.
8723 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8724 forward declarations.
8725 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8726 (agent_get_trace_state_variable_value): New function.
8727 (agent_set_trace_state_variable_value): New function.
8728 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8729 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8730 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8731 (condition_true_at_tracepoint): Likewise.
8732 (parse_agent_expr): Rename to ...
8733 (gdb_parse_agent_expr): ... this and move to ax.c.
8734 (unparse_agent_expr): Rename to ...
8735 (gdb_unparse_agent_expr): ... this and move to ax.c.
8736 (gdb_agent_op_name): Move to ax.c.
8737 (eval_agent_expr): Rename to ...
8738 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8739 and move to ax.c.
8740 (eval_tracepoint_agent_expr): New function.
8741 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8742 non-static.
5e1dc496
LM
8743 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8744 ax.c.
8745 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8746 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8747 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8748 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8749 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8750 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8751 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8752 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8753 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8754 (compile_bytecodes): Remove forward declaration.
8755 (is_goto_target): Move to ax.c.
8756 (compile_bytecodes): Move to ax.c and call
8757 agent_get_trace_state_variable_value (...) and
8758 agent_set_trace_state_variable_value (...).
8759
8760 * Makefile.in: Update ax.c and IPA dependencies.
8761
277e4e52
PA
87622012-02-24 Pedro Alves <palves@redhat.com>
8763
8764 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8765 (cmd_bigqtbuffer_circular): ... this. Only handle
8766 'QTBuffer:circular:'.
8767 (handle_tracepoint_general_set): Adjust.
8768
bf4c19f7
YQ
87692012-02-16 Yao Qi <yao@codesourcery.com>
8770
8771 * inferiors.c: Move code to ...
8772 * dll.c: .... here. New.
8773 * server.h: Declare clear_dlls.
8774 * Makefile.in (SFILES): Add dll.c.
8775 (OBS): Add dll.o
8776 (dll.o): New rule.
8777
d73f2619
YQ
87782012-02-11 Yao Qi <yao@codesourcery.com>
8779
8780 * server.c: (handle_monitor_command): Add a new parameter
8781 `own_buf'.
8782 (handle_query): Update caller.
8783
f8255c2a
JB
87842012-02-09 Joel Brobecker <brobecker@adacore.com>
8785
8786 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8787 * configure, config.in: Regenerate.
8788 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8789 is not defined.
8790
da84f473
PA
87912012-02-02 Pedro Alves <palves@redhat.com>
8792
8793 Try SIGKILL first, then PTRACE_KILL.
8794 * linux-low.c (linux_kill_one_lwp): New.
8795 (linux_kill_one_lwp): Rename to ...
8796 (kill_one_lwp_callback): ... this. Use the new
8797 linux_kill_one_lwp.
8798
e886a173
PA
87992012-02-02 Pedro Alves <palves@redhat.com>
8800
8801 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8802 inferior.
8803
be07f1a2
PA
88042012-01-27 Pedro Alves <palves@redhat.com>
8805
8806 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8807 (elf_64_file_p): Make static.
8808 (linux_pid_exe_is_elf_64_file): New.
8809 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8810 Delete declarations.
8811 (linux_pid_exe_is_elf_64_file): Declare.
8812 * linux-x86-low.c (x86_arch_setup): Use
8813 linux_pid_exe_is_elf_64_file.
8814
d8301ad1
JK
88152012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8816
8817 * linux-low.c (linux_wait_for_event_1): Rename to ...
8818 (linux_wait_for_event): ... here and merge it with former
8819 linux_wait_for_event - new variable wait_ptid, use it.
8820 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8821
01b17894
PA
88222012-01-23 Pedro Alves <palves@redhat.com>
8823
8824 * server.c (main): Avoid yet another case of infinite loop while
8825 detaching/killing after a longjmp.
8826
e825046f
JK
88272012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8828
8829 Code cleanup.
8830 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8831
b9e7b9c3
UW
88322012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8833
8834 * hostio.c (handle_readlink): New function.
8835 (handle_vFile): Call it to handle "vFile:readlink" packets.
8836
901f9912
UW
88372012-01-20 Pedro Alves <palves@redhat.com>
8838 Ulrich Weigand <ulrich.weigand@linaro.org>
8839
8840 * server.c (handle_v_requests): Only support vAttach and vRun to
8841 start multiple processes when in extended protocol mode.
8842
fc1ab1a0
PA
88432012-01-17 Pedro Alves <palves@redhat.com>
8844
8845 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8846 memalign plus mprotect to allocate the scratch buffer.
8847
7d5d4e98
PA
88482012-01-13 Pedro Alves <palves@redhat.com>
8849
8850 * server.c (attach_inferior): Clear `cont_thread'.
8851
f128d5e9
PA
88522012-01-13 Pedro Alves <palves@redhat.com>
8853
8854 * server.c (main): Avoid infinite loop while detaching/killing
8855 after a longjmp.
8856
06db92f0
DE
88572012-01-09 Doug Evans <dje@google.com>
8858
8859 * server.c (start_inferior): Set last_ptid in --wrapper case.
8860
32d92999
YQ
88612012-01-06 Yao Qi <yao@codesourcery.com>
8862
8863 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8864 defined.
8865 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8866
5e0a92a9
YQ
88672012-01-04 Yao Qi <yao@codesourcery.com>
8868
8869 * tracepoint.c (cmd_qtdp): Print debug message
8870 for static tracepoint.
8871
ae639e8c
YQ
88722012-01-04 Yao Qi <yao@codesourcery.com>
8873
8874 * tracepoint.c (trace_vdebug): Differentiate debug message
8875 between gdbserver and IPA.
8876
f72429c5
YQ
88772012-01-03 Yao Qi <yao@codesourcery.com>
8878
8879 * tracepoint.c (tracepoint_was_hit): Don't collect for
8880 static tracepoint.
8881
12c3e59c
JB
88822012-01-02 Joel Brobecker <brobecker@adacore.com>
8883
8884 * terminal.h: Reformat copyright header.
8885
67827812
JB
88862012-01-02 Joel Brobecker <brobecker@adacore.com>
8887
8888 * server.c (gdbserver_version): Update copyright year.
8889 * gdbreplay.c (gdbreplay_version): Likewise.
8890
3e52c33d
JK
88912011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8892
8893 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8894
8895 Revert:
8896 2011-12-18 Hui Zhu <teawater@gmail.com>
8897 * linux-low.c (linux_create_inferior): Save return value to ret.
8898
66f1260e
HZ
88992011-12-18 Hui Zhu <teawater@gmail.com>
8900
8901 * linux-low.c (linux_create_inferior): Save return value to ret.
8902
e77616d7
DE
89032011-12-16 Doug Evans <dje@google.com>
8904
e7b06c57
DE
8905 * linux-low.c (linux_create_inferior): If stdio connection,
8906 redirect stdin from /dev/null, stdout to stderr.
8907 * remote-utils.c (remote_is_stdio): New static global.
8908 (remote_connection_is_stdio): New function.
8909 (remote_prepare): Handle stdio connection.
8910 (remote_open): Ditto.
8911 (remote_close): Don't close stdin for stdio connections.
8912 (read_prim,write_prim): New functions. Replace all calls to
8913 read/write to these.
8914 * server.c (main): Watch for "-" argument. Move call to
8915 remote_prepare before start_inferior.
8916 * server.h (STDIO_CONNECTION_NAME): New macro.
8917 (remote_connection_is_stdio): Declare.
8918
e77616d7
DE
8919 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8920 in debugging output.
8921
82067193
YQ
89222011-12-15 Yao Qi <yao@codesourcery.com>
8923
8924 * tracepoint.c: Include sys/syscall.h.
8925 (gdb_ust_thread): Remove preprocessor conditional.
8926
82bfbe7e
PA
89272011-12-14 Pedro Alves <pedro@codesourcery.com>
8928
8929 * linux-low.c (linux_detach_one_lwp): Call
8930 the_low_target.prepare_to_resume before detaching.
8931
712c6575
YQ
89322011-12-14 Yao Qi <yao@codesourcery.com>
8933
8934 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8935 of write.
8936
d54d1edf
YQ
89372011-12-14 Yao Qi <yao@codesourcery.com>
8938
8939 * i386-low.c (i386_low_stopped_data_address): Initialize local
8940 variable `control'.
8941
6210a125
PA
89422011-12-13 Pedro Alves <pedro@codesourcery.com>
8943
8944 PR remote/13492
8945
8946 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8947 DR_CONTROL unless necessary. Extend comments.
8948 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8949 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8950
2ece8244
YQ
89512011-12-13 Yao Qi <yao@codesourcery.com>
8952
8953 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8954 macros.
8955 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8956
784867a5
JK
89572011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8958
8959 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8960 Print new debug message for such case.
8961
6bf36717
JK
89622011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8963
8964 Fix overlapping memcpy.
8965 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8966 the read_inferior_memory transfer.
8967 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8968 write_inferior_memory transfer.
8969 (set_fast_tracepoint_jump): New variable buf. Use it for the
8970 read_inferior_memory and write_inferior_memory transfers.
8971 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8972 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8973 Use it for the write_inferior_memory transfer.
8974 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8975 buffers.
8976
50275556
MR
89772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8978
8979 * linux-low.c (fetch_register, store_register): Make code
8980 consistent, fix formatting.
8981
7325beb4
MR
89822011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8983
8984 * linux-low.c (usr_store_inferior_registers): Factor out code
8985 to handle individual registers into...
8986 (store_register): ... this new function.
8987
c642a434
UW
89882011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8989
8990 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8991 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8992 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8993 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8994 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8995 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8996 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8997 (srv_xmlfiles): Add new XML files.
8998
8999 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9000 and <sys/uio.h>.
9001 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9002 (init_registers_s390_linux32v1): Add prototype.
9003 (init_registers_s390_linux32v2): Likewise.
9004 (init_registers_s390_linux64v1): Likewise.
9005 (init_registers_s390_linux64v2): Likewise.
9006 (init_registers_s390x_linux64v1): Likewise.
9007 (init_registers_s390x_linux64v2): Likewise.
9008 (s390_num_regs): Increment to 52.
9009 (s390_regmap): Add orig_r2 register.
9010 (s390_num_regs_3264): Increment to 68.
9011 (s390_regmap_3264): Add orig_r2 register.
9012 (s390_collect_ptrace_register): Handle orig_r2 register.
9013 (s390_supply_ptrace_register): Likewise.
9014 (s390_fill_last_break): New function.
9015 (s390_store_last_break): Likewise.
9016 (s390_fill_system_call): New function.
9017 (s390_store_system_call): Likewise.
9018 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9019 register sets.
9020 (s390_check_regset): New function.
9021 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9022 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9023 Update target_regsets for available register sets.
9024
2268b414
JK
90252011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9026 Jan Kratochvil <jan.kratochvil@redhat.com>
9027
9028 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9029 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9030 New.
9031 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9032 * linux-low.h (struct process_info_private): New member r_debug.
9033 * server.c (handle_qxfer_libraries): Call
9034 the_target->qxfer_libraries_svr4.
9035 (handle_qxfer_libraries_svr4): New function.
9036 (qxfer_packets): New entry "libraries-svr4".
9037 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9038 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9039 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9040 PACKET_qXfer_libraries_svr4.
9041
d6db1fab
UW
90422011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9043
9044 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9045 PSW address/mask between 8-byte and 16-byte formats.
9046 (s390_supply_ptrace_register): Likewise.
9047 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9048 basic addressing mode bit.
9049
242f5f1c
SS
90502011-11-24 Stan Shebs <stan@codesourcery.com>
9051
9052 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9053
f196051f
SS
90542011-11-17 Stan Shebs <stan@codesourcery.com>
9055
9056 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9057 (tracing_start_time): New global.
9058 (tracing_stop_time): New global.
9059 (tracing_user_name): New global.
9060 (tracing_notes): New global.
9061 (tracing_stop_note): New global.
9062 (cmd_qtstart): Set traceframe_usage, start_time.
9063 (stop_tracing): Set stop_time.
9064 (cmd_qtstatus): Report additional status.
9065 (cmd_qtp): New function.
9066 (handle_tracepoint_query): Call it.
9067 (cmd_qtnotes): New function.
9068 (handle_tracepoint_general_set): Call it.
9069 (get_timestamp): Rename from tsv_get_timestamp.
9070
405f8e94
SS
90712011-11-14 Stan Shebs <stan@codesourcery.com>
9072 Kwok Cheung Yeung <kcy@codesourcery.com>
9073
9074 * linux-x86-low.c (small_jump_insn): New.
9075 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9076 trampoline and error message, build a trampoline and issue a small
9077 jump instruction to it.
9078 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9079 trampoline and error message.
9080 (x86_get_min_fast_tracepoint_insn_len): New.
9081 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9082 * linux-low.h (struct linux_target_ops): Add arguments to
9083 install_fast_tracepoint_jump_pad operation, add new operation.
9084 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9085 arguments.
9086 (linux_get_min_fast_tracepoint_insn_len): New function.
9087 (linux_target_op): Add new operation.
9088 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9089 (gdb_trampoline_buffer_end): Ditto.
9090 (gdb_trampoline_buffer_error): Ditto.
9091 (struct ipa_sym_addresses): Add fields for new IPA variables.
9092 (symbol_list): Add entries for new IPA variables.
9093 (struct tracepoint): Add fields to hold the address range of the
9094 trampoline used by the tracepoint.
9095 (trampoline_buffer_head): New static variable.
9096 (trampoline_buffer_tail): Ditto.
9097 (claim_trampoline_space): New function.
9098 (have_fast_tracepoint_trampoline_buffer): New function.
9099 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9100 structure.
9101 (install_fast_tracepoint): Ditto, also add error buffer argument.
9102 (cmd_qtminftpilen): New function.
9103 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9104 (fast_tracepoint_from_trampoline_address): New function.
9105 (fast_tracepoint_collecting): Handle trampoline as part of jump
9106 pad space.
9107 (set_trampoline_buffer_space): New function.
9108 (initialize_tracepoint): Initialize new IPA variables.
9109 * target.h (struct target_ops): Add arguments to
9110 install_fast_tracepoint_jump_pad operation, add new
9111 get_min_fast_tracepoint_insn_len operation.
9112 (target_get_min_fast_tracepoint_insn_len): New.
9113 (install_fast_tracepoint_jump_pad): Add arguments.
9114 * server.h (IPA_BUFSIZ): Define.
9115 * linux-i386-ipa.c: Include extra header files.
9116 (initialize_fast_tracepoint_trampoline_buffer): New function.
9117 (initialize_low_tracepoint): Call it.
9118 * server.h (set_trampoline_buffer_space): Declare.
9119 (claim_trampoline_space): Ditto.
9120 (have_fast_tracepoint_trampoline_buffer): Ditto.
9121
1e4d1764
YQ
91222011-11-14 Yao Qi <yao@codesourcery.com>
9123
9124 * server.c (handle_query): Handle InstallInTrace for qSupported.
9125 * tracepoint.c (add_tracepoint): Sort list.
9126 (install_tracepoint, download_tracepoint): New.
9127 (cmd_qtdp): Call them to install and download tracepoints.
9128 (sort_tracepoints): Removed.
9129 (cmd_qtstart): Update.
9130
5c73ff4e
YQ
91312011-11-14 Yao Qi <yao@codesourcery.com>
9132
9133 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9134 * mem-break.h: Declare.
9135 * tracepoint.c (cmd_qtstart): Move some code to ...
9136 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9137 New.
9138 (download_tracepoints): Move some code to ...
9139 (download_tracepoint_1): ... here. New.
9140
86a30030
YQ
91412011-11-08 Yao Qi <yao@codesourcery.com>
9142
9143 * remote-utils.c (relocate_instruction): A comment fix.
9144
8d26e50c
JB
91452011-11-07 Joel Brobecker <brobecker@adacore.com>
9146
9147 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9148 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9149 dr_status_mirror and dr_control_mirror from debug_reg_state.
9150 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9151 (i386_initial_stuff): Remove use of deleted globals.
9152 (i386_get_thread_context, i386_set_thread_context,
9153 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9154 from debug_reg_state.
9155
a59306a3
YQ
91562011-11-05 Yao Qi <yao@codesourcery.com>
9157
9158 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9159 address as TPOINT's.
9160
3065dfb6
SS
91612011-11-02 Stan Shebs <stan@codesourcery.com>
9162
9163 * tracepoint.c (agent_mem_read_string): New function.
9164 (eval_agent_expr): Call it for tracenz.
9165 * server.c (handle_query): Report support for tracenz.
9166
fd0d8c7c
YQ
91672011-11-02 Yao Qi <yao@codesourcery.com>
9168
9169 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9170
609086b1
YQ
91712011-11-02 Yao Qi <yao@codesourcery.com>
9172
9173 * target.h: Fix a typo in comment.
9174
b9fd1791
PA
91752011-10-31 Pedro Alves <pedro@codesourcery.com>
9176
9177 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9178 clobber the breakpoints' shadows with fast tracepoint jumps.
9179 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9180 * target.c (write_inferior_memory): Also pass MYADDR down to
9181 check_mem_write.
9182
03583c20
UW
91832011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9184
9185 * configure.ac: Check support for personality routine.
9186 * configure: Regenerate.
9187 * config.in: Likewise.
9188 * linux-low.c: Include <sys/personality.h>.
9189 Define ADDR_NO_RANDOMIZE if necessary.
9190 (linux_create_inferior): Disable address space randomization when
9191 forking inferior, if requested.
9192 (linux_supports_disable_randomization): New function.
9193 (linux_target_ops): Install it.
9194 * server.h (disable_randomization): Declare.
9195 * server.c (disable_randomization): New global variable.
9196 (handle_general_set): Handle QDisableRandomization.
9197 (handle_query): Likewise for qSupported.
9198 (main): Support --disable-randomization and --no-disable-randomization
9199 command line arguments.
9200 * target.h (struct target_ops): Add supports_disable_randomization.
9201 (target_supports_disable_randomization): New macro.
9202
723b724b
MF
92032011-09-29 Mike Frysinger <vapier@gentoo.org>
9204
9205 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9206 ifdef check.
9207 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9208 [!PT_GETDSBT] (target_loadmap): New definition.
9209 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9210 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9211 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9212 and PT_GETDSBT to LINUX_LOADMAP.
9213 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9214 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9215
55329a5c 92162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9217
9218 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9219 (arm_linux_hwbp_cap): New static variable.
9220 (arm_linux_get_hwbp_cap): Replace by ...
9221 (arm_linux_init_hwbp_cap): ... this new function.
9222 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9223 (arm_linux_get_hw_watchpoint_count): Likewise.
9224 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9225 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9226 (arm_prepare_to_resume): Use perror_with_name instead of error.
9227
55329a5c 92282011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9229
9230 * linux-arm-low.c: Include <signal.h>.
9231 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9232 (struct arm_linux_hwbp_cap): New data type.
9233 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9234 (struct arm_linux_hw_breakpoint): New data type.
9235 (MAX_BPTS, MAX_WPTS): Define.
9236 (struct arch_process_info, struct arch_lwp_info): New data types.
9237 (arm_linux_get_hwbp_cap): New function.
9238 (arm_linux_get_hw_breakpoint_count): Likewise.
9239 (arm_linux_get_hw_watchpoint_count): Likewise.
9240 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9241 (arm_hwbp_control_initialize): Likewise.
9242 (arm_hwbp_control_is_enabled): Likewise.
9243 (arm_hwbp_control_is_initialized): Likewise.
9244 (arm_hwbp_control_disable): Likewise.
9245 (arm_linux_hw_breakpoint_equal): Likewise.
9246 (arm_linux_hw_point_initialize): Likewise.
9247 (struct update_registers_data): New data structure.
9248 (update_registers_callback: New function.
9249 (arm_insert_point): Likewise.
9250 (arm_remove_point): Likewise.
9251 (arm_stopped_by_watchpoint): Likewise.
9252 (arm_stopped_data_address): Likewise.
9253 (arm_new_process): Likewise.
9254 (arm_new_thread): Likewise.
9255 (arm_prepare_to_resume): Likewise.
9256 (the_low_target): Register arm_insert_point, arm_remove_point,
9257 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9258 arm_new_thread, and arm_prepare_to_resume.
9259
6b9801d4
SS
92602011-09-15 Stan Shebs <stan@codesourcery.com>
9261
9262 * server.h (struct emit_ops): Add compare-goto fields.
9263 * tracepoint.c (gdb_agent_op_sizes): New table.
9264 (emit_eq_goto): New function.
9265 (emit_ne_goto): New function.
9266 (emit_lt_goto): New function.
9267 (emit_le_goto): New function.
9268 (emit_gt_goto): New function.
9269 (emit_ge_goto): New function.
9270 (is_goto_target): New function.
9271 (compile_bytecodes): Recognize special cases of compare-goto
9272 combinations and call specialized emitters for them.
9273 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9274 (amd64_emit_ne_goto): New function.
9275 (amd64_emit_lt_goto): New function.
9276 (amd64_emit_le_goto): New function.
9277 (amd64_emit_gt_goto): New function.
9278 (amd64_emit_ge_goto): New function.
9279 (amd64_emit_ops): Add the new functions.
9280 (i386_emit_eq_goto): New function.
9281 (i386_emit_ne_goto): New function.
9282 (i386_emit_lt_goto): New function.
9283 (i386_emit_le_goto): New function.
9284 (i386_emit_gt_goto): New function.
9285 (i386_emit_ge_goto): New function.
9286 (i386_emit_ops): Add the new functions.
9287
bf15cbda
SS
92882011-09-08 Stan Shebs <stan@codesourcery.com>
9289
9290 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9291 (i386_emit_epilogue): Restore %ebx.
9292
943ca1dd
JZ
92932011-08-31 Jie Zhang <jzhang918@gmail.com>
9294
9295 * server.c (step_thread): Remove definition.
9296 (process_serial_event): Don't handle Hs.
9297 * server.h (step_thread): Remove declaration.
9298 * target.c (set_desired_inferior): Remove use of step_thread.
9299
e3deef73
LM
93002011-08-24 Luis Machado <lgustavo@codesourcery.com>
9301
9302 * linux-low.c: Include linux-procfs.h.
9303 (linux_attach_lwp_1): Update comments.
9304 (linux_attach): Scan for existing threads when attaching to a
9305 process that is the tgid.
9306 * Makefile.in: Update dependencies.
9307
13da1c97
LM
93082011-08-24 Luis Machado <lgustavo@codesourcery.com>
9309
9310 * configure.srv: Add linux-procfs.o dependencies.
9311
881127c9
YQ
93122011-08-14 Yao Qi <yao@codesourcery.com>
9313
9314 * target.h (struct target_ops): Fix indent.
9315 * win32-low.c (win32_target_ops): Fix comment.
9316
58dbd541
YQ
93172011-08-14 Andrew Jenner <andrew@codesourcery.com>
9318 Yao Qi <yao@codesourcery.com>
9319
9320 * Makefile.in (clean): Remove tic6x-*.c files.
9321 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9322 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9323 (tic6x-c64xp-linux.c): Likewise.
9324 * configure.srv: Add support for tic6x-*-uclinux.
9325 * linux-tic6x-low.c: New.
9326 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9327
78d85199
YQ
93282011-08-14 Andrew Stubbs <ams@codesourcery.com>
9329 Yao Qi <yao@codesourcery.com>
9330
9331 * target.h (struct target_ops): Add read_loadmap.
9332 * linux-low.c (struct target_loadseg): New type.
9333 (struct target_loadmap): New type.
9334 (linux_read_loadmap): New function.
9335 (linux_target_ops): Add linux_read_loadmap.
9336 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9337 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9338 to NULL.
78d85199 9339
a959a88d
EZ
93402011-08-05 Eli Zaretskii <eliz@gnu.org>
9341
9342 * win32-low.c: Include <stdint.h>.
9343
1ced966e
PA
93442011-07-22 Pedro Alves <pedro@codesourcery.com>
9345
9346 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9347 to the inferior here.
9348 (i386_remove_aligned_watchpoint): Ditto.
9349 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9350 fit part of the watchpoint in the debug registers.
9351 (i386_update_inferior_debug_regs): New.
9352 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9353 registers, and only update the inferior on success.
9354 (i386_low_remove_watchpoint): Ditto.
9355
d26e3629
KY
93562011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9357
9358 * linux-low.c (compare_ints, unique, list_threads, show_process,
9359 linux_core_of_thread): Delete.
9360 (linux_target_ops): Change linux_core_of_thread to
9361 linux_common_core_of_thread.
9362 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9363 * utils.c (malloc_failure): Change type of argument.
9364 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9365 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9366 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9367 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9368 (IPA_OBJS): Add common-utils-ipa.o.
9369 (ptid_h, linux_osdata_h): New macros.
9370 (server_h): Add common/common-utils.h, common/xml-utils.h,
9371 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9372 common/ptid.h.
9373 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9374 ptid.o, buffer.o): New rules.
9375 (linux-low.o): Add common/linux-osdata.h as a dependency.
9376 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9377 * configure.ac: Add AC_HEADER_DIRENT check.
9378 * config.in: Regenerate.
9379 * configure: Regenerate.
9380 * remote-utils.c (xml_escape_text): Delete.
9381 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9382 buffer_xml_printf): Move to common/buffer.c.
9383 * server.c (main): Remove call to initialize_inferiors.
9384 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9385 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9386 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9387 internal_error, gdb_assert, gdb_assert_fail): Delete.
9388 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9389 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9390 common/buffer.h.
9391 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9392 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9393 initialize_inferiors): Delete.
9394
2275a1a7
PA
93952011-07-20 Pedro Alves <pedro@codesourcery.com>
9396
9397 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9398 symbol error.
9399
0a5b1e09
PA
94002011-05-31 Pedro Alves <pedro@codesourcery.com>
9401
9402 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9403 assertion.
9404 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9405
6938fd34
YQ
94062011-05-26 Yao Qi <yao@codesourcery.com>
9407
9408 * Makefile.in (thread-db.o): Track dependence to
9409 common/gdb_thread_db.h.
9410 * thread-db.c: include gdb_thread_db.h from right place.
9411
b481f9e0
TT
94122011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9413
9414 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9415 __FILE__ and __LINE__ to internal_error.
9416
98a5dd13
DE
94172011-05-13 Doug Evans <dje@google.com>
9418
9419 * thread-db.c (try_thread_db_load_from_sdir): New function.
9420 (try_thread_db_load_from_dir): New function.
9421 (thread_db_load_search): Handle $sdir, ignore $pdir.
9422 Remove trying of system directories if search of
9423 libthread-db-search-path fails, that is now done via $sdir.
9424
d248b706
KY
94252011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9426
9427 * server.c (handle_query): Add EnableDisableTracepoints to the list
9428 of supported features.
43aaf8b6 9429 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9430 tracepoints.
43aaf8b6
PA
9431 (cmd_qtenable_disable): New.
9432 (cmd_qtstart): Install tracepoints even if disabled.
9433 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9434 receiving a QTEnable or QTDisable packet.
9435 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9436 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9437 tracepoints.
9438 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9439
84e578fb
DE
94402011-05-10 Doug Evans <dje@google.com>
9441
9442 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9443
71f55dd8
DE
94442011-05-04 Doug Evans <dje@google.com>
9445
9446 * linux-low.c (linux_join): Skip process lookup.
9447 * spu-low.c (spu_join): Ditto.
9448 * server.c (join_inferiors_callback): Delete.
9449 (process_serial_event): For 'D' packet (detach) call join_inferior
9450 directly.
9451
4d393d60
JM
94522011-05-04 Joseph Myers <joseph@codesourcery.com>
9453
9454 * README: Don't mention xscale*-*-linux*.
9455 * configure.srv (xscale*-*-linux*): Don't handle target.
9456
b00ad6ff
NF
94572011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9458
9459 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9460 casting pointers.
9461 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9462 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9463 (i386_emit_void_call_2): Likewise.
9464
af96c192
YQ
94652011-04-26 Yao Qi <yao@codesourcery.com>
9466
43aaf8b6
PA
9467 * linux-low.c: Move common macros to linux-ptrace.h.
9468 Include linux-ptrace.h.
af96c192
YQ
9469 * Makefile.in (linux_ptrace_h): New.
9470 (linux-low.o): Depends on linux-ptrace.h.
9471
03f2bd59
JK
94722011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9473
9474 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9475 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9476 (remote_prepare): New function with most of the TCP code from ...
9477 (remote_open): ... here. Detect PORT here unconditionally. Move also
9478 setting transport_is_reliable.
9479 * server.c (run_once): New variable.
9480 (gdbserver_usage): Document it.
9481 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9482 the first run if RUN_ONCE.
9483 * server.h (run_once, remote_prepare): New declarations.
9484
7a9dd1b2
TT
94852011-04-19 Tom Tromey <tromey@redhat.com>
9486
9487 * win32-low.c (handle_load_dll): Remove duplicate "the".
9488
81239425
PM
94892011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9490
9491 Remove support for old Cygwin 1.5 versions.
9492 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9493 function to avoid warning.
9494 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9495 warning.
9496
9e0627f1
PM
94972011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9498
9499 * gdbserver/server.h (Macro _): Define it if not available.
9500
588eebee
MS
95012011-03-14 Michael Snyder <msnyder@vmware.com>
9502
348af9f7 9503 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9504
43f70d4c
JB
95052011-03-10 Joel Brobecker <brobecker@adacore.com>
9506
9507 * Makefile.in (maintainer-clean realclean distclean): Remove
9508 "make ... subdir_do" command.
9509
348af9f7
MS
95102011-03-10 Michael Snyder <msnyder@vmware.com>
9511
9512 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9513
9514 * server.c (handle_v_run): Free alloced buffer on early return.
9515
e637a4f5
YQ
95162011-03-09 Yao Qi <yao@codesourcery.com>
9517
9518 Revert:
9519 2011-03-04 Yao Qi <yao@codesourcery.com>
9520
9521 * Makefile.in: Remove GNU make feature --directory.
9522
9523 2011-03-05 Yao Qi <yao@codesourcery.com>
9524
9525 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9526 (subdir_do): New make target. Copied from gdb/Makefile.
9527 (maintainer-clean, realclean, distclean, clean): Call corresponding
9528 make targets in common/Makefile.
9529
9530 2011-02-11 Yao Qi <yao@codesourcery.com>
9531
9532 * configure.ac: Call AC_PROG_RANLIB.
9533 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9534 * configure: Regenerate.
9535
e6edda56
JK
95362011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9537
9538 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9539
e5141119
JB
95402011-03-06 Yao Qi <yao@codesourcery.com>
9541
9542 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9543
64794aa4
JB
95442011-03-05 Yao Qi <yao@codesourcery.com>
9545
9546 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9547 (subdir_do): New make target. Copied from gdb/Makefile.
9548 (maintainer-clean, realclean, distclean, clean): Call corresponding
9549 make targets in common/Makefile.
9550
7a762829
YQ
95512011-03-04 Yao Qi <yao@codesourcery.com>
9552
9553 * Makefile.in: Remove GNU make feature --directory.
9554
348af9f7
MS
95552011-03-04 Michael Snyder <msnyder@vmware.com>
9556
9557 * server.c (queue_stop_reply): Call xmalloc not malloc.
9558
95592011-03-02 Michael Snyder <msnyder@vmware.com>
9560
9561 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9562
9f72fee2
MS
95632011-02-28 Michael Snyder <msnyder@vmware.com>
9564
588eebee
MS
9565 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9566 (cmd_qtframe): Ditto.
9567 (cmd_qtbuffer): Ditto.
9568 (cmd_bigqtbuffer): Ditto.
9569
9f72fee2
MS
9570 * utils.c (decimal2str): Initialize 'width' to nine, then
9571 don't mess with it.
9572
8040bd49
UW
95732011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9574
9575 * hostio.c (require_data): Free *data, not data.
9576
7e52cbd0
JK
95772011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9578
9579 * hostio.c (require_data): Use free, not xfree.
9580
9130f83e
MS
95812011-02-27 Michael Snyder <msnyder@vmware.com>
9582
4b812f4e
MS
9583 * server.c (handle_query): Discard unused value.
9584
9130f83e
MS
9585 * hostio.c (require_data): Free malloc memory before returning
9586 error.
9587
69d37113
MS
95882011-02-26 Michael Snyder <msnyder@vmware.com>
9589
9590 * linux-low.c (list_threads): Call closedir for dirent.
9591
35f5825a
MS
95922011-02-27 Michael Snyder <msnyder@vmware.com>
9593
2a589cef
MS
9594 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9595 a case statement falls through.
9596
0adea5f7
MS
9597 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9598
35f5825a
MS
9599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9600 in comparison.
9601
238f1c74
MS
96022011-02-26 Michael Snyder <msnyder@vmware.com>
9603
9604 * utils.c (decimal2str): Eliminate dead code and dead param.
9605 (pulongest): Drop dead param from call to decimal2str.
9606 (plongest): Ditto.
9607
633ff500
JB
96082011-02-24 Joel Brobecker <brobecker@adacore.com>
9609
9610 Revert the following patch (not approved yet):
9611 2011-02-21 Hui Zhu <teawater@gmail.com>
9612 * tracepoint.c (tp_printf): New function.
9613 (eval_agent_expr): Handle gdb_agent_op_printf.
9614
f9c6ff72
HZ
96152011-02-21 Hui Zhu <teawater@gmail.com>
9616
9617 * tracepoint.c (tp_printf): New function.
9618 (eval_agent_expr): Handle gdb_agent_op_printf.
9619
94d5e490
TT
96202011-02-18 Tom Tromey <tromey@redhat.com>
9621
9622 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9623 (tracepoint.o): Likewise.
9624 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9625 (gdb_agent_op_names): Likewise.
9626
c7f96d2b
TT
96272011-02-18 Tom Tromey <tromey@redhat.com>
9628
9629 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9630 gdb_agent_op_rot>: New constants.
9631 (gdb_agent_op_names): Add pick and roll.
9632 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9633 cases.
9634
0feedb2c
JK
96352011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9636
9637 * aclocal.m4: Regenerated with aclocal-1.11.1.
9638
b3b9301e
PA
96392011-02-14 Pedro Alves <pedro@codesourcery.com>
9640
9641 * server.c (handle_qxfer_traceframe_info): New.
9642 (qxfer_packets): Register "traceframe-info".
9643 (handle_query): Report support for qXfer:traceframe-info:read+.
9644 * tracepoint.c (match_blocktype): New.
9645 (traceframe_find_block_type): Rename to ...
9646 (traceframe_walk_blocks): ... this. Add callback filter argument,
9647 and use it.
9648 (traceframe_find_block_type): New, reimplemented on top of
9649 traceframe_walk_blocks.
9650 (build_traceframe_info_xml): New.
9651 (traceframe_read_info): New.
9652 * server.h (traceframe_read_info): Declare.
9653
4f3e6fb7
YQ
96542011-02-11 Yao Qi <yao@codesourcery.com>
9655
9656 * configure.ac: Call AC_PROG_RANLIB.
9657 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9658 * configure: Regenerate.
9659
764880b7
PA
96602011-02-07 Pedro Alves <pedro@codesourcery.com>
9661
9662 * server.c (gdb_read_memory): Change return semantics to allow
9663 partial transfers.
9664 (handle_search_memory_1): Adjust.
9665 (process_serial_event) <'m' packet>: Handle partial transfers.
9666 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9667
1c79eb8a
PA
96682011-01-28 Pedro Alves <pedro@codesourcery.com>
9669
9670 * regcache.c (init_register_cache): Initialize
9671 regcache->register_status.
9672 (free_register_cache): Release regcache->register_status.
9673 (regcache_cpy): Copy register_status.
9674 (registers_to_string): Print 'x's for unavailable registers.
9675 (supply_register): Mark the register's status valid or
9676 unavailable, depending on whether a buffer was passed in or not.
9677 (supply_register_zeroed): New.
9678 (supply_regblock): Mark the registers' status valid or
9679 unavailable, depending on whether a buffer was passed in or not.
9680 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9681 (struct regcache): New `register_status' field.
9682 (supply_register_zeroed): Declare.
9683 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9684 supply_register_zeroed, rather than passing a NULL buffer to
9685 supply_register.
9686 * tracepoint.c (fetch_traceframe_registers): Update comment.
9687
85724a0e
PA
96882011-01-28 Pedro Alves <pedro@codesourcery.com>
9689
9690 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9691 buffer explicit.
9692
d08aafef
PA
96932011-01-25 Pedro Alves <pedro@codesourcery.com>
9694
9695 * server.h (decode_xfer_write): Change prototype.
9696 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9697 and don't extract the annex here.
9698 * server.c (decode_xfer_read): Remove `annex' parameter,
9699 and don't extract the annex here.
9700 (decode_xfer): New.
9701 (struct qxfer): New.
9702 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9703 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9704 (handle_qxfer_statictrace): New functions, abstracted out from
9705 handle_query, and made to use the struct qxfer interface.
9706 (handle_threads_qxfer_proper): Rename to ...
9707 (handle_qxfer_threads_proper): ... this.
9708 (handle_threads_qxfer): Rename to ...
9709 (handle_qxfer_threads): ... this. Adjust.
9710 (qxfer_packets): New array.
9711 (handle_qxfer): New function.
9712 (handle_query): Use handle_qxfer.
9713
493e2a69
MS
97142011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9715
9716 * gdbreplay.c: Shorten lines of >= 80 columns.
9717 * linux-low.c: Ditto.
9718 * linux-ppc-low.c: Ditto.
9719 * linux-s390-low.c: Ditto.
9720 * linux-sparc-low.c: Ditto.
9721 * linux-x86-low.c: Ditto.
9722 * linux-xtensa-low.c: Ditto.
9723 * mem-break.c: Ditto.
9724 * nto-low.c: Ditto.
9725 * regcache.h: Ditto.
9726 * remote-utils.c: Ditto.
9727 * server.c: Ditto.
9728 * server.h: Ditto.
9729 * thread-db.c: Ditto.
9730 * tracepoint.c: Ditto.
9731 * utils.c: Ditto.
9732 * win32-low.h: Ditto.
9733
44944448
JB
97342011-01-05 Joel Brobecker <brobecker@adacore.com>
9735
9736 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9737 update.
9738
71ce852c
JB
97392011-01-01 Joel Brobecker <brobecker@adacore.com>
9740
9741 * server.c (gdbserver_version): Update copyright year in version
9742 output.
9743 * gdbreplay.c (gdbreplay_version): Ditto.
9744
eb826dc6
MF
97452010-12-29 Jie Zhang <jie.zhang@analog.com>
9746
9747 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9748 * linux-bfin-low.c: New file.
9749 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9750 PT_DATA_ADDR for BFIN targets.
9751 * Makefile.in (SFILES): Add linux-bfin-low.c.
9752 (clean): Remove reg-bfin.c.
9753 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9754 * README: Mention supported Blackfin targets.
9755
39ab222a
MF
97562010-12-23 Mike Frysinger <vapier@gentoo.org>
9757
9758 * .gitignore: New file.
9759
a1f2ce7d
MF
97602010-11-16 Mike Frysinger <vapier@gentoo.org>
9761
9762 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9763
f474844c
JZ
97642010-10-22 Jie Zhang <jie@codesourcery.com>
9765
9766 * Makefile.in: Add FLAGS_TO_PASS variable.
9767 (install): Remove dependency of install-only and recursively
9768 invoke make for install-only.
9769
f1048712
DE
97702010-10-04 Doug Evans <dje@google.com>
9771
9772 * Makefile.in (uninstall): Use $(DESTDIR).
9773
b53a1623
PA
97742010-09-24 Pedro Alves <pedro@codesourcery.com>
9775
e6ee044d
PA
9776 PR gdb/11842
9777
b53a1623
PA
9778 * linux-x86-low.c (compat_siginfo_from_siginfo)
9779 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9780 si_code is < 0. Check for si_code == SI_TIMER before checking for
9781 si_code < 0.
9782
fa1bd1e4
JB
97832010-09-13 Joel Brobecker <brobecker@adacore.com>
9784
9785 * lynx-i386-low.c: New file.
9786 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9787
47fac8f8
JB
97882010-09-13 Joel Brobecker <brobecker@adacore.com>
9789
9790 * lynx-low.c (ptrace_request_to_str): Remove handling for
9791 request values that have been removed in LynxOS 5.x.
9792
1adfc54d
JB
97932010-09-13 Joel Brobecker <brobecker@adacore.com>
9794
9795 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9796 <ptrace.h>
9797
c2a66c29
NS
97982010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9799
9800 * configure.ac: Add --enable-inprocess-agent option.
9801 * configure: Rebuilt.
9802
32fcada3
YQ
98032010-09-06 Yao Qi <yao@codesourcery.com>
9804
9805 * linux-low.c (linux_kill): Remove unused variable.
9806 (linux_stabilize_threads): Likewise.
9807 * server.c (start_inferior): Likewise.
9808 (queue_stop_reply_callback): Likewise.
9809 * tracepoint.c (do_action_at_tracepoint): Likewise.
9810
0cccb683
YQ
98112010-09-06 Yao Qi <yao@codesourcery.com>
9812
9813 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9814 on return.
9815
423ec54c
JK
98162010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9817
9818 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9819
12ac6819
PA
98202010-09-06 Pedro Alves <pedro@codesourcery.com>
9821
9822 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9823 "$(IPA_DEPFILES)".
9824
8ed54b31
JB
98252010-09-01 Joel Brobecker <brobecker@adacore.com>
9826
9827 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9828 gdbserver/lynx-ppc-low.c: New files.
9829 * Makefile.in (lynx_low_h): New variable.
9830 (lynx-low.o, lynx-ppc-low.o): New rules.
9831 * configure.ac: On LynxOS, link with -lnetinet.
9832 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9833 * configure: regenerate.
9834
bb0116a4
JB
98352010-09-01 Joel Brobecker <brobecker@adacore.com>
9836
9837 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9838 * configure.ac: Add check for vasprintf and vsnprintf.
9839 * configure, config.in: Regenerate.
9840 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9841
a778ab81 98422010-09-01 Joel Brobecker <brobecker@adacore.com>
9843
9844 * gdbreplay.c: Move include of alloca.h up, next to include of
9845 malloc.h.
9846 * server.h: Add include of malloc.h.
9847 * mem-break.c: Remove include of malloc.h.
9848 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9849
8b034a19 98502010-09-01 Joel Brobecker <brobecker@adacore.com>
9851
9852 * Makefile.in (memmem.o): Build with -Wno-error.
9853
98542010-09-01 Joel Brobecker <brobecker@adacore.com>
9855
9856 * utils.c (xsnprintf): Make non-static.
9857 * server.h: Add xsnprintf declaration.
9858 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9859 replace calls to snprintf by calls to xsnprintf throughout.
9860
98612010-09-01 Joel Brobecker <brobecker@adacore.com>
9862
9863 * configure.ac: Add configure check for alloca.
9864 * configure, config.in: Regenerate.
9865 * server.h: Include alloca.h if it exists.
9866 * gdbreplay.c: Include alloca.h if it exists.
9867
1a981360
PA
98682010-08-28 Pedro Alves <pedro@codesourcery.com>
9869
9870 * linux-low.c (__SIGRTMIN): Define if not already defined.
9871 (linux_create_inferior): Check for __ANDROID__ rather than
9872 __SIGRTMIN.
9873 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9874 are already deferred.
9875 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9876 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9877 stopped and already has a pending signal to report.
9878 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9879 a pending signal to report or is moving out of a jump pad.
9880 (linux_init_signals): Check for __ANDROID__ rather than
9881 __SIGRTMIN.
9882
b4d51a55
PA
98832010-08-28 Pedro Alves <pedro@codesourcery.com>
9884
9885 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9886 debug_threads check. Avoid a linear search when not doing debug
9887 output.
9888
ec48365d
PA
98892010-08-27 Pedro Alves <pedro@codesourcery.com>
9890
9891 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9892 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9893 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9894 (process_event): Change local fd's type to gdb_fildes_t.
9895 (create_file_handler): Adjust prototype.
9896 (delete_file_handler): Adjust prototype.
9897 (handle_file_event): Adjust prototype. Use pfildes.
9898 (create_file_event): Adjsut prototype.
9899 * remote-utils.c (remote_desc, listen_desc): Change type to
9900 gdb_fildes_t.
9901 * server.h: New gdb_fildes_t typedef.
9902 [USE_WIN32API]: Include winsock2.h.
9903 (delete_file_handler, add_file_handler): Adjust prototypes.
9904 (pfildes): Declare.
9905 * utils.c (pfildes): New.
9906
854d88f0
PA
99072010-08-27 Pedro Alves <pedro@codesourcery.com>
9908
9909 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9910 * configure: Regenerate.
9911
0146f85b
PA
99122010-08-27 Pedro Alves <pedro@codesourcery.com>
9913
9914 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9915 (linux_done_accessing_memory): ... this.
9916 (linux_target_ops): Adjust.
9917 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9918 * nto-low.c (nto_target_ops): Adjust comment.
9919 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9920 * spu-low.c (spu_target_ops): Adjust comment.
9921 * target.h (target_ops): Rename unprepare_to_access_memory field
9922 to done_accessing_memory.
9923 (unprepare_to_access_memory): Rename to ...
9924 (done_accessing_memory): ... this.
9925
90d74c30
PA
99262010-08-26 Pedro Alves <pedro@codesourcery.com>
9927
9928 * linux-low.c (linux_prepare_to_access_memory): New.
9929 (linux_unprepare_to_access_memory): New.
9930 (linux_target_ops): Install them.
9931 * server.c (read_memory): Rename to ...
9932 (gdb_read_memory): ... this. Use
9933 prepare_to_access_memory/prepare_to_access_memory.
9934 (write_memory): Rename to ...
9935 (gdb_write_memory): ... this. Use
9936 prepare_to_access_memory/prepare_to_access_memory.
9937 (handle_search_memory_1): Adjust.
9938 (process_serial_event): Adjust.
9939 * target.h (struct target_ops): New fields
9940 prepare_to_access_memory and unprepare_to_access_memory.
9941 (prepare_to_access_memory, unprepare_to_access_memory): New.
9942 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9943 prepare_to_access_memory/prepare_to_access_memory.
9944 * nto-low.c (nto_target_ops): Adjust.
9945 * spu-low.c (spu_target_ops): Adjust.
9946 * win32-low.c (win32_target_ops): Adjust.
9947
fd467969
PA
99482010-08-26 Pedro Alves <pedro@codesourcery.com>
9949
9950 * Makefile.in (WARN_CFLAGS): Get it from configure.
9951 (WERROR_CFLAGS): New.
9952 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9953 * configure.ac: Introduce --enable-werror, which adds -Werror to
9954 the compiler command line. Enabled by default. Disable with
9955 --disable-werror. Add -Wdeclaration-after-statement
9956 Wpointer-arith and -Wformat-nonliteral to warning flags.
9957 * configure: Regenerate.
9958
331e2f5f
PA
99592010-08-26 Pedro Alves <pedro@codesourcery.com>
9960
9961 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9962
e581f2b4
PA
99632010-08-26 Pedro Alves <pedro@codesourcery.com>
9964
9965 * gdbreplay.c (remote_error): New.
9966 (gdbchar): New.
9967 (expect): Use gdbchar. Check for error reading from GDB.
9968 Clarify sync error output.
9969 (play): Check for errors writing to GDB.
9970 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9971 * remote-utils.c (getpkt): Check for errors writing to the remote
9972 descriptor.
9973
3c11dd79
PA
99742010-08-25 Pedro Alves <pedro@codesourcery.com>
9975
9976 * linux-low.c (linux_wait_1): Move non-debugging code out of
9977 `debug_threads' control.
9978
d20a8ad9
PA
99792010-08-25 Pedro Alves <pedro@codesourcery.com>
9980
9981 * linux-low.c (linux_wait_1): Don't set last_status here.
9982 * server.c (push_event, queue_stop_reply_callback): Assert we're
9983 not pushing a TARGET_WAITKIND_IGNORE event.
9984 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9985 (myresume, handle_target_event): Set the thread's last_resume_kind
9986 and last_status from the target returned status.
9987
964e4306
PA
99882010-08-25 Pedro Alves <pedro@codesourcery.com>
9989
9990 PR threads/10729
9991
9992 * linux-x86-low.c (update_debug_registers_callback): New.
9993 (i386_dr_low_set_addr): Use it.
9994 (i386_dr_low_get_addr): New.
9995 (i386_dr_low_set_control): Use update_debug_registers_callback.
9996 (i386_dr_low_get_control): New.
9997 (i386_dr_low_get_status): Adjust.
9998 * linux-low.c (linux_stop_lwp): New.
9999 * linux-low.h (linux_stop_lwp): Declare.
10000
10001 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10002 argument instead of a i386_debug_reg_state.
10003 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10004 a i386_debug_reg_state.
10005 (i386_insert_aligned_watchpoint): Adjust.
10006 (i386_remove_aligned_watchpoint): Adjust.
10007 (i386_low_stopped_data_address): Read the debug registers from the
10008 inferior instead of from the mirrors.
10009 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10010 (i386_dr_low_get_addr): Declare.
10011 (i386_dr_low_get_control): Declare.
10012 (i386_dr_low_get_status): Change prototype.
10013
10014 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10015 (i386_dr_low_get_addr): New.
10016 (i386_dr_low_get_control): New.
10017 (i386_dr_low_get_status): Adjust prototype. Return
10018 dr_status_mirror.
10019 (i386_initial_stuff): Clear dr_status_mirror and
10020 dr_control_mirror.
10021 (i386_get_thread_context): Adjust.
10022 (i386_set_thread_context): Adjust.
10023 (i386_thread_added): Adjust.
10024
5f21a75b
PA
100252010-08-24 Pedro Alves <pedro@codesourcery.com>
10026
10027 * linux-low.h (linux_thread_area): Delete declaration.
10028
3e4c1235
TS
100292010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10030
10031 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10032 after its termination.
10033
1971b033
PA
100342010-08-09 Pedro Alves <pedro@codesourcery.com>
10035
10036 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10037 (gdb_wants_all_stopped): Delete.
10038 (linux_wait_1): Don't call them.
10039 * server.c (handle_v_cont): Tag all threads as want-stopped.
10040 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10041 stopped as "client-wants-stopped".
10042
310444ac
PA
100432010-07-31 Pedro Alves <pedro@codesourcery.com>
10044
10045 * Makefile.in (signals_h): New.
10046 (server_h): Depend on it.
10047 (server.o): Don't depend on $(signals_def).
10048 (signals.o): Depend on $(signals_def).
10049
a19cae16
JK
100502010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10051
10052 * Makefile.in (signals_def): New.
10053 (server_h): Append include/gdb/signals.h and signals_def.
10054 (server.o): Append signals_def.
10055
30d50328
JK
100562010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10057
10058 * server.c (handle_target_event): Use target_signal_to_host for
10059 resume_info.sig initialization.
10060 * target.h (struct thread_resume) <sig>: New comment.
10061
5c3216e2
OS
100622010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10063
c6f46ca0
OS
10064 * server.c (handle_query): strcpy() the returned string from paddress()
10065 instead of sprintf().
5c3216e2
OS
10066 * utils.c (paddress): Return phex_nz().
10067
6bd31874
JB
100682010-07-07 Joel Brobecker <brobecker@adacore.com>
10069
10070 * server.c (handle_v_cont): Call mourn_inferior if process
10071 just exited.
10072 (myresume): Likewise.
10073
0fb4aa4b
PA
100742010-07-01 Pedro Alves <pedro@codesourcery.com>
10075
10076 Static tracepoints, and integration with UST.
10077
10078 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10079 * mem-break.c (uninsert_all_breakpoints)
10080 (reinsert_all_breakpoints): New.
10081 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10082 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10083 (gdb_agent_ust_loaded, helper_thread_id)
10084 (gdb_agent_helper_thread_id): New macros.
10085 (struct ipa_sym_addresses): Add addr_ust_loaded,
10086 addr_helper_thread_id, addr_cmd_buf.
10087 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10088 (in_process_agent_loaded_ust): New.
10089 (write_e_ust_not_loaded): New.
10090 (maybe_write_ipa_ust_not_loaded): New.
10091 (struct collect_static_trace_data_action): New.
10092 (enum tracepoint_type) <static_tracepoint>: New.
10093 (struct tracepoint) <handle>: Mention static tracepoints.
10094 (struct static_tracepoint_ctx): New.
10095 (CMD_BUF_SIZE): New.
10096 (add_tracepoint_action): Handle static tracepoint actions.
10097 (unprobe_marker_at): New.
10098 (clear_installed_tracepoints): Handle static tracepoints.
10099 (cmd_qtdp): Handle static tracepoints.
10100 (probe_marker_at): New.
10101 (cmd_qtstart): Handle static tracepoints.
10102 (response_tracepoint): Handle static tracepoints.
10103 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10104 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10105 (get_context_regcache): Handle static tracepoints.
10106 (do_action_at_tracepoint): Handle static tracepoint actions.
10107 (traceframe_find_block_type): Handle static trace data blocks.
10108 (traceframe_read_sdata): New.
10109 (download_tracepoints): Download static tracepoint actions.
10110 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10111 (GDB_PROBE_NAME): New.
10112 (ust_ops): New.
10113 (GET_UST_SYM): New.
10114 (USTF): New.
10115 (dlsym_ust): New.
10116 (ust_marker_to_static_tracepoint): New.
10117 (gdb_probe): New.
10118 (collect_ust_data_at_tracepoint): New.
10119 (gdb_ust_probe): New.
10120 (UNIX_PATH_MAX, SOCK_DIR): New.
10121 (gdb_ust_connect_sync_socket): New.
10122 (resume_thread, stop_thread): New.
10123 (run_inferior_command): New.
10124 (init_named_socket): New.
10125 (gdb_ust_socket_init): New.
10126 (cstr_to_hexstr): New.
10127 (next_st): New.
10128 (first_marker, next_marker): New.
10129 (response_ust_marker): New.
10130 (cmd_qtfstm, cmd_qtsstm): New.
10131 (unprobe_marker_at, probe_marker_at): New.
10132 (cmd_qtstmat, gdb_ust_thread): New.
10133 (gdb_ust_init): New.
10134 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10135 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10136 (ST_REGENTRY): New.
10137 (x86_64_st_collect_regmap): New.
10138 (X86_64_NUM_ST_COLLECT_GREGS): New.
10139 (AMD64_RIP_REGNUM): New.
10140 (supply_static_tracepoint_registers): New.
10141 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10142 (ST_REGENTRY): New.
10143 (i386_st_collect_regmap): New.
10144 (i386_NUM_ST_COLLECT_GREGS): New.
10145 (supply_static_tracepoint_registers): New.
10146 * server.c (handle_query): Handle qXfer:statictrace:read.
10147 <qSupported>: Report support for StaticTracepoints, and
10148 qXfer:statictrace:read features.
10149 * server.h (traceframe_read_sdata)
10150 (supply_static_tracepoint_registers): Declare.
10151 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10152 (unpack_varlen_hex): Include in IPA build.
10153 * Makefile.in (ustlibs, ustinc): New.
10154 (IPA_OBJS): Add remote-utils-ipa.o.
10155 ($(IPA_LIB)): Link -ldl and -lpthread.
10156 (UST_CFLAGS): New.
10157 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10158 * config.in, configure: Regenerate.
10159
9e4344e5
PA
101602010-06-20 Ian Lance Taylor <iant@google.com>
10161 Pedro Alves <pedro@codesourcery.com>
10162
10163 * linux-x86-low.c (always_true): Delete.
10164 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10165 trying to fool the compiler with always_true.
10166
c6beb2cb
PA
101672010-06-20 Pedro Alves <pedro@codesourcery.com>
10168
10169 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10170 conditions in gdbserver.
10171
d2ed6730
UW
101722010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10173
10174 * spu-low.c (spu_read_memory): Wrap around local store limit.
10175 (spu_write_memory): Likewise.
10176
4e29fb54
PA
101772010-06-15 Pedro Alves <pedro@codesourcery.com>
10178
10179 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10180 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10181 LONGEST uses.
10182 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10183 uses.
10184 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10185 uses with LONGEST uses.
10186
6a271cae
PA
101872010-06-14 Stan Shebs <stan@codesourcery.com>
10188 Pedro Alves <pedro@codesourcery.com>
10189
10190 Bytecode compiler.
10191
10192 * linux-x86-low.c: Include limits.h.
10193 (add_insns): New.
10194 (always_true): New.
10195 (EMIT_ASM): New.
10196 (EMIT_ASM32): New.
10197 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10198 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10199 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10200 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10201 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10202 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10203 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10204 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10205 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10206 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10207 (amd64_emit_void_call_2): New.
10208 (amd64_emit_ops): New.
10209 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10210 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10211 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10212 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10213 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10214 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10215 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10216 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10217 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10218 (i386_emit_stack_adjust, i386_emit_int_call_1)
10219 (i386_emit_void_call_2): New.
10220 (i386_emit_ops): New.
10221 (x86_emit_ops): New.
10222 (the_low_target): Install x86_emit_ops.
10223 * server.h (struct emit_ops): New.
10224 (get_raw_reg_func_addr): Declare.
10225 (current_insn_ptr, emit_error): Declare.
10226 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10227 (set_trace_state_variable_value): New defines.
10228 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10229 addr_get_trace_state_variable_value and
10230 addr_set_trace_state_variable_value.
10231 (symbol_list): New fields for get_raw_reg,
10232 get_trace_state_variable_value and set_trace_state_variable_value.
10233 (condfn): New typedef.
10234 (struct tracepoint): New field `compiled_cond'.
10235 (do_action_at_tracepoint): Clear compiled_cond.
10236 (get_trace_state_variable_value, set_trace_state_variable_value):
10237 Export in the IPA.
10238 (condition_true_at_tracepoint): If there's a compiled condition,
10239 run that.
10240 (current_insn_ptr, emit_error): New globals.
10241 (struct bytecode_address): New.
10242 (get_raw_reg_func_addr): New.
10243 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10244 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10245 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10246 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10247 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10248 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10249 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10250 (compile_tracepoint_condition, compile_bytecodes): New.
10251 * target.h (emit_ops): Forward declare.
10252 (struct target_ops): New field emit_ops.
10253 (target_emit_ops): New.
10254 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10255 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10256 * linux-low.c (linux_emit_ops): New.
10257 (linux_target_ops): Install it.
10258 * linux-low.h (struct linux_target_ops): New field emit_ops.
10259
92b72907
UW
102602010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10261
10262 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10263 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10264
fa593d66
PA
102652010-06-01 Pedro Alves <pedro@codesourcery.com>
10266 Stan Shebs <stan@codesourcery.com>
10267
10268 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10269 (all): Depend on $(extra_libraries).
10270 (install-only): Install the IPA.
10271 (IPA_OBJS, IPA_LIB): New.
10272 (clean): Remove the IPA lib.
10273 (IPAGENT_CFLAGS): New.
10274 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10275 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10276 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10277 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10278 * configure.ac: Check for atomic builtins support in the compiler.
10279 (IPA_DEPFILES, extra_libraries): Define.
10280 * configure.srv (ipa_obj): Add description.
10281 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10282 (i[34567]86-*-linux*): Set ipa_obj.
10283 (x86_64-*-linux*): Set ipa_obj.
10284 * linux-low.c (stabilizing_threads): New.
10285 (supports_fast_tracepoints): New.
10286 (linux_detach): Stabilize threads before detaching.
10287 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10288 the lwp is either not stabilizing, or is moving out of a jump pad.
10289 (linux_fast_tracepoint_collecting): New.
10290 (maybe_move_out_of_jump_pad): New.
10291 (enqueue_one_deferred_signal): New.
10292 (dequeue_one_deferred_signal): New.
10293 (linux_wait_for_event_1): If moving out of a jump pad, defer
10294 pending signals to later.
10295 (linux_stabilize_threads): New.
10296 (linux_wait_1): Check if threads need moving out of jump pads, and
10297 do it if so.
10298 (stuck_in_jump_pad_callback): New.
10299 (move_out_of_jump_pad_callback): New.
10300 (lwp_running): New.
10301 (linux_resume_one_lwp): Handle moving out of jump pads.
10302 (linux_set_resume_request): Dequeue deferred signals.
10303 (need_step_over_p): Also step over fast tracepoint jumps.
10304 (start_step_over): Also uninsert fast tracepoint jumps.
10305 (finish_step_over): Also reinsert fast tracepoint jumps.
10306 (linux_install_fast_tracepoint_jump): New.
10307 (linux_target_ops): Install linux_stabilize_threads and
10308 linux_install_fast_tracepoint_jump_pad.
10309 * linux-low.h (linux_target_ops) <get_thread_area,
10310 install_fast_tracepoint_jump_pad>: New fields.
10311 (struct lwp_info) <collecting_fast_tracepoint,
10312 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10313 (linux_get_thread_area): Declare.
10314 * linux-x86-low.c (jump_insn): New.
10315 (x86_get_thread_area): New.
10316 (append_insns): New.
10317 (push_opcode): New.
10318 (amd64_install_fast_tracepoint_jump_pad): New.
10319 (i386_install_fast_tracepoint_jump_pad): New.
10320 (x86_install_fast_tracepoint_jump_pad): New.
10321 (the_low_target): Install x86_get_thread_area and
10322 x86_install_fast_tracepoint_jump_pad.
10323 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10324 (struct fast_tracepoint_jump): New.
10325 (fast_tracepoint_jump_insn): New.
10326 (fast_tracepoint_jump_shadow): New.
10327 (find_fast_tracepoint_jump_at): New.
10328 (fast_tracepoint_jump_here): New.
10329 (delete_fast_tracepoint_jump): New.
10330 (set_fast_tracepoint_jump): New.
10331 (uninsert_fast_tracepoint_jumps_at): New.
10332 (reinsert_fast_tracepoint_jumps_at): New.
10333 (set_breakpoint_at): Use write_inferior_memory.
10334 (uninsert_raw_breakpoint): Use write_inferior_memory.
10335 (check_mem_read): Mask out fast tracepoint jumps.
10336 (check_mem_write): Mask out fast tracepoint jumps.
10337 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10338 (set_fast_tracepoint_jump): Declare.
10339 (delete_fast_tracepoint_jump)
10340 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10341 (reinsert_fast_tracepoint_jumps_at): Declare.
10342 * regcache.c: Don't compile many functions when building the
10343 in-process agent library.
10344 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10345 the register buffer in the heap.
10346 (free_register_cache): If the register buffer isn't owned by the
10347 regcache, don't free it.
10348 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10349 pre-existing register caches.
10350 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10351 type.
10352 (convert_ascii_to_int): : Constify `from' parameter type.
10353 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10354 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10355 the needed buffer in-place.
10356 (relocate_instruction): New.
10357 * server.c (handle_query) <qSymbols>: If the target supports
10358 tracepoints, give it a chance of looking up symbols. Report
10359 support for fast tracepoints.
10360 (handle_status): Stabilize threads.
10361 (process_serial_event): Adjust.
10362 * server.h (struct fast_tracepoint_jump): Forward declare.
10363 (struct process_info) <fast_tracepoint_jumps>: New field.
10364 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10365 (decode_X_packet, decode_M_packet): Adjust.
10366 (relocate_instruction): Declare.
10367 (in_process_agent_loaded): Declare.
10368 (tracepoint_look_up_symbols): Declare.
10369 (struct fast_tpoint_collect_status): Declare.
10370 (fast_tracepoint_collecting): Declare.
10371 (force_unlock_trace_buffer): Declare.
10372 (handle_tracepoint_bkpts): Declare.
10373 (initialize_low_tracepoint)
10374 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10375 * target.h (struct target_ops) <stabilize_threads,
10376 install_fast_tracepoint_jump_pad>: New fields.
10377 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10378 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10379 [HAVE_STDINT_H]: Include stdint.h.
10380 (trace_debug_1): Rename to ...
10381 (trace_vdebug): ... this.
10382 (trace_debug): Rename to ...
10383 (trace_debug_1): ... this. Add `level' parameter.
10384 (trace_debug): New.
10385 (ATTR_USED, ATTR_NOINLINE): New.
10386 (IP_AGENT_EXPORT): New.
10387 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10388 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10389 (about_to_request_buffer_space, trace_buffer_is_full)
10390 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10391 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10392 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10393 (traceframe_write_count, traceframes_created)
10394 (trace_state_variables)
10395 New renaming defines.
10396 (struct ipa_sym_addresses): New.
10397 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10398 (symbol_list): New.
10399 (ipa_sym_addrs): New.
10400 (all_tracepoint_symbols_looked_up): New.
10401 (in_process_agent_loaded): New.
10402 (write_e_ipa_not_loaded): New.
10403 (maybe_write_ipa_not_loaded): New.
10404 (tracepoint_look_up_symbols): New.
10405 (debug_threads) [IN_PROCESS_AGENT]: New.
10406 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10407 (UNKNOWN_SIDE_EFFECTS): New.
10408 (stop_tracing): New.
10409 (flush_trace_buffer): New.
10410 (stop_tracing_bkpt): New.
10411 (flush_trace_buffer_bkpt): New.
10412 (read_inferior_integer): New.
10413 (read_inferior_uinteger): New.
10414 (read_inferior_data_pointer): New.
10415 (write_inferior_data_pointer): New.
10416 (write_inferior_integer): New.
10417 (write_inferior_uinteger): New.
10418 (struct collect_static_trace_data_action): Delete.
10419 (enum tracepoint_type): New.
10420 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10421 <actions_str, step_actions, step_actions_str>: Only include in
10422 GDBserver.
fa593d66
PA
10423 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10424 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10425 (tracepoints): Use IP_AGENT_EXPORT.
10426 (last_tracepoint): Don't include in the IPA.
10427 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10428 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10429 (alloced_trace_state_variables): New.
10430 (trace_state_variables): Use IP_AGENT_EXPORT.
10431 (traceframe_t): Delete unused variable.
10432 (circular_trace_buffer): Don't include in the IPA.
10433 (trace_buffer_start): Delete.
10434 (struct trace_buffer_control): New.
10435 (trace_buffer_free): Delete.
10436 (struct ipa_trace_buffer_control): New.
10437 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10438 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10439 New.
10440 (trace_buffer_ctrl): New.
10441 (TRACE_BUFFER_CTRL_CURR): New.
10442 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10443 Reimplement as macros.
10444 (trace_buffer_wrap): Delete.
10445 (traceframe_write_count, traceframe_read_count)
10446 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10447 (struct tracepoint_hit_ctx) <type>: New field.
10448 (struct fast_tracepoint_ctx): New.
10449 (memory_barrier): New.
10450 (cmpxchg): New.
10451 (record_tracepoint_error): Update atomically in the IPA.
10452 (clear_inferior_trace_buffer): New.
10453 (about_to_request_buffer_space): New.
10454 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10455 updating the same buffer.
10456 (add_tracepoint): Default the tracepoint's type to trap
10457 tracepoint, and orig_size to -1.
10458 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10459 internal variables.
10460 (create_trace_state_variable): New parameter `gdb'. Handle it.
10461 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10462 (cmd_qtdp): Handle fast tracepoints.
10463 (cmd_qtdv): Adjust.
10464 (max_jump_pad_size): New.
10465 (gdb_jump_pad_head): New.
10466 (get_jump_space_head): New.
10467 (claim_jump_space): New.
10468 (sort_tracepoints): New.
10469 (MAX_JUMP_SIZE): New.
10470 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10471 IPA.
10472 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10473 support. Upload fast traceframes, and delete internal IPA
10474 breakpoints.
10475 (stop_tracing_handler): New.
10476 (flush_trace_buffer_handler): New.
10477 (cmd_qtstop): Upload fast tracepoints.
10478 (response_tracepoint): Handle fast tracepoints.
10479 (tracepoint_finished_step): Upload fast traceframes. Set the
10480 tracepoint hit context's tracepoint type.
10481 (handle_tracepoint_bkpts): New.
10482 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10483 type. Add comment about fast tracepoints.
10484 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10485 non-existing action_str field.
10486 (get_context_regcache): Handle fast tracepoints.
10487 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10488 to the regcache.
10489 (fast_tracepoint_from_jump_pad_address): New.
10490 (fast_tracepoint_from_ipa_tpoint_address): New.
10491 (collecting_t): New.
10492 (force_unlock_trace_buffer): New.
10493 (fast_tracepoint_collecting): New.
10494 (collecting): New.
10495 (gdb_collect): New.
10496 (write_inferior_data_ptr): New.
10497 (target_tp_heap): New.
10498 (target_malloc): New.
10499 (download_agent_expr): New.
10500 (UALIGN): New.
10501 (download_tracepoints): New.
10502 (download_trace_state_variables): New.
10503 (upload_fast_traceframes): New.
10504 (IPA_FIRST_TRACEFRAME): New.
10505 (IPA_NEXT_TRACEFRAME_1): New.
10506 (IPA_NEXT_TRACEFRAME): New.
10507 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10508 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10509 (gdb_jump_pad_buffer_end): New.
10510 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10511 (initialize_tracepoint): Adjust.
10512 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10513 buffer. Initialize the low module.
10514 * utils.c (PREFIX, TOOLNAME): New.
10515 (malloc_failure): Use PREFIX.
10516 (error): In the IPA, an error causes an exit.
10517 (fatal, warning): Use PREFIX.
10518 (internal_error): Use TOOLNAME.
10519 (NUMCELLS): Increase to 10.
10520 * configure, config.in: Regenerate.
10521
d149dd1d
PA
105222010-06-01 Pedro Alves <pedro@codesourcery.com>
10523
10524 * server.c (handle_query) <qSupported>: Do two passes over the
10525 qSupported string to avoid nesting strtok.
10526
f6528abd
JK
105272010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10528
10529 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10530 (CDEPS): New.
10531 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10532 -Wl,--dynamic-list.
10533 * configure: Regenerate.
10534 * proc-service.list: New.
10535
ca2a87a0
JK
105362010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10537
10538 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10539 New comment.
10540
363a6e9f
OS
105412010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10542
10543 * gdbreplay.c (remote_open): Check error return from socket() call by
10544 its equality to -1 not by it being negative.
10545 * remote-utils.c (remote_open): Likewise.
10546
d23b6cb1
PA
105472010-05-23 Pedro Alves <pedro@codesourcery.com>
10548
10549 * config.h: Regenerate.
10550
28d3cf85
MK
105512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10552
10553 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10554 doesn't provide PTRACE_GET_THREAD_AREA.
10555
fea36a59
MK
105562010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10557
10558 * linux-m68k-low.c: Include <asm/ptrace.h>
10559 (ps_get_thread_area): Implement.
10560
24b066ba
DE
105612010-05-03 Doug Evans <dje@google.com>
10562
10563 * event-loop.c (struct callback_event): New struct.
10564 (callback_list): New global.
10565 (append_callback_event, delete_callback_event): New functions.
10566 (process_callback): New function.
10567 (start_event_loop): Call it.
10568 * remote-utils.c (NOT_SCHEDULED): Define.
10569 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10570 moved out of readchar.
10571 (readchar): Rewrite. Call reschedule before returning.
10572 (reset_readchar): New function.
10573 (remote_close): Call it.
10574 (process_remaining, reschedule): New functions.
10575 * server.h (callback_handler_func): New typedef.
10576 (append_callback_event, delete_callback_event): Declare.
10577
9836d6ea
PA
105782010-05-03 Pedro Alves <pedro@codesourcery.com>
10579
10580 * proc-service.c (ps_pglobal_lookup): Use
10581 thread_db_look_up_one_symbol.
10582 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10583 parameter. Use it instead of all_symbols_looked_up.
10584 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10585 field.
10586 (all_symbols_looked_up): Don't declare.
10587 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10588 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10589 field.
10590 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10591 Set all_symbols_looked_up here.
10592 (thread_db_look_up_one_symbol): New.
10593 (thread_db_get_tls_address): Adjust.
10594 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10595 thread_db object on the heap, and tentatively set it in the
10596 process structure.
10597 (thread_db_init): Don't set all_symbols_looked_up here.
10598 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10599
7984d532
PA
106002010-05-03 Pedro Alves <pedro@codesourcery.com>
10601
10602 * linux-low.c (linux_kill, linux_detach): Adjust.
10603 (status_pending_p_callback): Remove redundant statement. Check
10604 for !TARGET_WAITIKIND_IGNORE, instead of
10605 TARGET_WAITKIND_STOPPED.
10606 (handle_tracepoints): Make sure LWP is locked. Adjust.
10607 (linux_wait_for_event_1): Adjust.
10608 (linux_cancel_breakpoints): New.
10609 (unsuspend_one_lwp): New.
10610 (unsuspend_all_lwps): New.
10611 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10612 (send_sigstop_callback): Change return type to int, add new
10613 `except' parameter and handle it.
10614 (suspend_and_send_sigstop_callback): New.
10615 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10616 pass them down. If SUSPEND, also increment the lwp's suspend
10617 count.
10618 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10619 (need_step_over_p): Don't consider suspended LWPs.
10620 (start_step_over): Adjust.
10621 (proceed_one_lwp): Change return type to int, add new `except'
10622 parameter and handle it.
10623 (unsuspend_and_proceed_one_lwp): New.
10624 (proceed_all_lwps): Use find_inferior instead of
10625 for_each_inferior.
10626 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10627 also decrement the suspend count of LWPs. Pass `except' down,
10628 instead of hacking its suspend count.
10629 (linux_pause_all): Add `freeze' parameter. Adjust.
10630 (linux_unpause_all): New.
10631 (linux_target_ops): Install linux_unpause_all.
10632 * server.c (handle_status): Adjust.
10633 * target.h (struct target_ops): New fields `unpause_all' and
10634 `cancel_breakpoints'. Add new parameter to `pause_all'.
10635 (pause_all): Add new `freeze' parameter.
10636 (unpause_all): New.
10637 (cancel_breakpoints): New.
10638 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10639 cancel breakpoints.
10640 (cmd_qtstart): Pause threads.
10641 (stop_tracing): Pause threads, and cancel breakpoints.
10642 * win32-low.c (win32_target_ops): Adjust.
10643
e471f25b
PA
106442010-05-03 Pedro Alves <pedro@codesourcery.com>
10645
10646 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10647 the inferior right away from here...
10648 (linux_wait_1): ... to here, and adjust to check the thread's
10649 last_resume_kind instead of the lwp's step or stop_expected flags.
10650
1915ef4f
PA
106512010-05-02 Pedro Alves <pedro@codesourcery.com>
10652
10653 * README: Use consistent `GDB' and `GDBserver' spellings.
10654
f9e39928
PA
106552010-05-02 Pedro Alves <pedro@codesourcery.com>
10656
10657 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10658 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10659 (linux_detach_one_lwp): Assume the lwp is stopped.
10660 (any_thread_of): Delete.
10661 (linux_detach): Stop all lwps here. Don't blindly delete all
10662 breakpoints.
10663 (delete_lwp_callback): New.
10664 (linux_mourn): Delete all lwps of the process that is gone.
10665 (linux_wait_1): Don't delete the last lwp of the process here.
10666 * mem-break.h (mark_breakpoints_out): Declare.
10667 * mem-break.c (mark_breakpoints_out): New.
10668 (free_all_breakpoints): Use it.
10669 * server.c (handle_target_event): If the process is gone, mark
10670 breakpoints out.
10671 * thread-db.c (struct thread_db) <create_bp>: New field.
10672 (thread_db_enable_reporting): Fix prototype. Store a thread event
10673 breakpoint reference in the thread_db struct.
10674 (thread_db_load_search): Clear the thread_db object.
10675 (try_thread_db_load_1): Ditto.
10676 (switch_to_process): New.
10677 (disable_thread_event_reporting): Use it.
10678 (remove_thread_event_breakpoints): New.
10679 (thread_db_detach, thread_db_mourn): Use it.
10680
1e7fc18c
PA
106812010-05-01 Pedro Alves <pedro@codesourcery.com>
10682
10683 * linux-low.c (linux_enable_event_reporting): New.
10684 (linux_wait_for_event_1, handle_extended_wait): Use it.
10685
02fc4de7
PA
106862010-04-30 Pedro Alves <pedro@codesourcery.com>
10687
10688 * linux-low.c (linux_kill_one_lwp, linux_kill)
10689 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10690 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10691 SIGSTOP even if the LWP is stopped.
10692 (send_sigstop_callback): New.
10693 (stop_all_lwps): Use send_sigstop_callback instead.
10694 (linux_resume_one_thread): Adjust.
10695 (proceed_one_lwp): Still proceed an LWP that the client has
10696 requested to stop, if we haven't reported it as stopped yet. Make
10697 sure that LWPs the client want stopped, have a pending SIGSTOP.
10698
bc3b5632
DE
106992010-04-26 Doug Evans <dje@google.com>
10700
ae1ada35
DE
10701 * server.c (handle_general_set): Make static.
10702
bc3b5632
DE
10703 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10704 Print received char after testing for error/eof instead of before.
10705 (input_interrupt): Tweak comment.
10706
65730243
DE
107072010-04-23 Doug Evans <dje@google.com>
10708
10709 * server.c (start_inferior): Print inferior argv if --debug.
10710
a8ae7dc0
AR
107112010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10712
10713 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10714 * nto-x86-low.c: Include server.h
10715
1c07cc19
PM
107162010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10717
10718 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10719 be consistent with other sources of this directory.
10720 (init_registers_amd64): Correct name of source file of this function
10721 in the comment.
10722
e0a61e09
PM
107232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10724
10725 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10726 64-bit executables.
10727
54709339
PM
107282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10729
10730 * win32-i386-low.c: Add 64-bit support.
10731 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10732 (init_registers_amd64): Declare.
10733 (mappings): Add 64-bit version of array.
10734 (init_windows_x86): New function.
10735 (the_low_target): Change init_arch field to init_windows_x86.
10736
e8f0053d
PM
107372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10738
10739 * win32-low.c: Adapt to support also 64-bit architecture.
10740 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10741 (get_image_name): Use SIZE_T type for local variable `done'.
10742 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10743 (toolhelp_get_dll_name): Idem.
10744 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10745 Use uintptr_t typecast to avoid warning.
10746 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10747 (handle_exception): Use phex_nz to avoid warning.
10748 (win32_wait): Remove unused local variable `process'.
10749
c481e77e
PM
107502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10751
10752 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10753 `amd64-avx.o'.
10754
12ea4b69
PM
107552010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10756
10757 * configure.ac: Use `ws2_32' library for srv_mingw.
10758 * configure: Regenerate.
10759 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10760 * remote-utils.c: Likewise.
10761
f6d1620c
L
107622010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10763
10764 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10765 if __x86_64__ is defined.
10766
8e642873
PM
107672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10768
10769 * configure: Regenerate.
10770
711e434b
PM
107712010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10772
10773 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10774 * target.h (target_ops): New get_tib_address field.
10775 * win32-low.h (win32_thread_info): Add thread_local_base field.
10776 * win32-low.c (child_add_thread): Add tlb argument.
10777 Set thread_local_base field to TLB.
10778 (get_child_debug_event): Adapt to child_add_thread change.
10779 (win32_get_tib_address): New function.
10780 (win32_target_ops): Set get_tib_address field to
10781 win32_get_tib_address.
10782 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10783
505106cd
PA
107842010-04-12 Pedro Alves <pedro@codesourcery.com>
10785
505106cd
PA
10786 * linux-low.c (linux_mourn): Also remove the process.
10787 * server.c (handle_target_event): Don't remove the process here.
10788 * nto-low.c (nto_mourn): New.
10789 (nto_target_ops): Install it.
10790 * spu-low.c (spu_mourn): New.
10791 (spu_target_ops): Install it.
10792 * win32-low.c (win32_mourn): New.
10793 (win32_target_ops): Install it.
10794
e8470a06
PA
107952010-04-12 Pedro Alves <pedro@codesourcery.com>
10796
10797 * server.h (buffer_xml_printf): Remove redundant `;'.
10798
45ba0d02
PA
107992010-04-12 Pedro Alves <pedro@codesourcery.com>
10800
10801 * regcache.c (set_register_cache): Invalidate regcaches before
10802 changing the register cache layout.
10803 (regcache_invalidate_one): Allow a NULL regcache.
10804 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10805 regcaches before changing the register cache layout or the target
10806 regsets.
10807
59e04013
L
108082010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10809
10810 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10811 variable warning on Linux/x86-64.
10812
8336d594
PA
108132010-04-11 Pedro Alves <pedro@codesourcery.com>
10814
10815 GDBserver disconnected tracing support.
10816
10817 * linux-low.c (linux_remove_process): Delete.
10818 (add_lwp): Don't set last_resume_kind here.
10819 (linux_kill): Use `mourn'.
10820 (linux_detach): Use `thread_db_detach', and `mourn'.
10821 (linux_mourn): New.
10822 (linux_attach_lwp_1): Adjust comment.
10823 (linux_attach): last_resume_kind moved the thread_info; adjust.
10824 (status_pending_p_callback): Adjust.
10825 (linux_wait_for_event_1): Adjust.
10826 (count_events_callback, select_singlestep_lwp_callback)
10827 (select_event_lwp_callback, cancel_breakpoints_callback)
10828 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10829 (proceed_one_lwp): Adjust.
10830 (linux_async): Add debug output.
10831 (linux_thread_stopped): New.
10832 (linux_pause_all): New.
10833 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10834 linux_pause_all.
10835 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10836 (thread_db_free): Delete declaration.
10837 (thread_db_detach, thread_db_mourn): Declare.
10838 * thread-db.c (thread_db_init): Use thread_db_mourn.
10839 (thread_db_free): Delete, split in two.
10840 (disable_thread_event_reporting): New.
10841 (thread_db_detach): New.
10842 (thread_db_mourn): New.
10843
10844 * server.h (struct thread_info) <last_resume_kind>: New field.
10845 <attached>: Add comment.
10846 <gdb_detached>: New field.
10847 (handler_func): Change return type to int.
10848 (handle_serial_event, handle_target_event): Ditto.
10849 (gdb_connected): Declare.
10850 (tracing): Delete.
10851 (disconnected_tracing): Declare.
10852 (stop_tracing): Declare.
10853
10854 * server.c (handle_query) <qSupported>: Report support for
10855 disconnected tracing.
10856 (queue_stop_reply_callback): Account for running threads.
10857 (gdb_wants_thread_stopped): New.
10858 (gdb_wants_all_threads_stopped): New.
10859 (gdb_reattached_process): New.
10860 (handle_status): Clear the `gdb_detached' flag of all processes.
10861 In all-stop, stop all threads.
10862 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10863 (process_serial_event): If the remote connection breaks, or if an
10864 exit was forced with "monitor exit", force an event loop exit.
10865 Handle disconnected tracing on detach.
10866 (handle_serial_event): Adjust.
10867 (handle_target_event): If GDB isn't connected, forward events back
10868 to the inferior, unless the last process exited, in which case,
10869 exit gdbserver. Adjust interface.
10870
10871 * remote-utils.c (remote_open): Don't block in accept. Instead
10872 register an event loop source on the listen socket file
10873 descriptor. Refactor bits into ...
10874 (listen_desc): ... this new global.
10875 (gdb_connected): ... this new function.
10876 (enable_async_notification): ... this new function.
10877 (handle_accept_event): ... this new function.
10878 (remote_close): Clear remote_desc.
10879
10880 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10881
10882 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10883 New fields.
10884 (mourn_inferior): Define.
10885 (target_process_qsupported): Avoid the dangling else problem.
10886 (thread_stopped): Define.
10887 (pause_all): Define.
10888 (target_waitstatus_to_string): Declare.
10889 * target.c (target_waitstatus_to_string): New.
10890
10891 * tracepoint.c (tracing): Make extern.
10892 (disconnected_tracing): New.
10893 (stop_tracing): Make extern. Handle tracing stops due to GDB
10894 disconnecting.
10895 (cmd_qtdisconnected): New.
10896 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10897 (handle_tracepoint_general_set): Handle QTDisconnected.
10898
10899 * event-loop.c (event_handler_func): Change return type to int.
10900 (process_event): Bail out if the event handler wants the event
10901 loop to stop.
10902 (handle_file_event): Ditto.
10903 (start_event_loop): Bail out if the event handler wants the event
10904 loop to stop.
10905
10906 * nto-low.c (nto_target_ops): Adjust.
10907 * spu-low.c (spu_wait): Don't remove the process here.
10908 (spu_target_ops): Adjust.
10909 * win32-low.c (win32_wait): Don't remove the process here.
10910 (win32_target_ops): Adjust.
10911
5d267c4c
PA
109122010-04-11 Pedro Alves <pedro@codesourcery.com>
10913
10914 * regcache.c (realloc_register_cache): Invalidate inferior's
10915 regcache before recreating it.
10916
623ccd72
PA
109172010-04-09 Pedro Alves <pedro@codesourcery.com>
10918
10919 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10920
219f2f23
PA
109212010-04-09 Stan Shebs <stan@codesourcery.com>
10922 Pedro Alves <pedro@codesourcery.com>
10923
10924 * server.h (LONGEST): New.
10925 (struct thread_info) <while_stepping>: New field.
10926 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10927 Declare.
10928 (initialize_tracepoint, handle_tracepoint_general_set)
10929 (handle_tracepoint_query, tracepoint_finished_step)
10930 (tracepoint_was_hit, release_while_stepping_state_list):
10931 (current_traceframe): Declare.
10932 * server.c (handle_general_set): Handle tracepoint packets.
10933 (read_memory): New.
10934 (write_memory): New.
10935 (handle_search_memory_1): Use read_memory.
10936 (handle_query): Report support for conditional tracepoints, trace
10937 state variables, and tracepoint sources. Handle tracepoint
10938 queries.
10939 (main): Initialize the tracepoints module.
10940 (process_serial_event): Handle traceframe reads/writes.
10941
10942 * linux-low.c (handle_tracepoints): New.
10943 (linux_wait_1): Call it.
10944 (linux_resume_one_lwp): Handle while-stepping.
10945 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10946 (linux_target_ops): Install them.
10947 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10948 New field.
10949 * linux-x86-low.c (x86_supports_tracepoints): New.
10950 (the_low_target). Install it.
10951
10952 * mem-break.h (delete_breakpoint): Declare.
10953 * mem-break.c (delete_breakpoint): Make external.
10954
10955 * target.h (struct target_ops): Add `supports_tracepoints',
10956 `read_pc', and `write_pc' fields.
10957 (target_supports_tracepoints): Define.
10958 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10959 (phex_nz): New.
10960
10961 * regcache.h (struct regcache) <registers_owned>: New field.
10962 (init_register_cache, regcache_cpy): Declare.
10963 (regcache_read_pc, regcache_write_pc): Declare.
10964 (register_cache_size): Declare.
10965 (supply_regblock): Declare.
10966 * regcache.c (init_register_cache): New.
10967 (new_register_cache): Use it.
10968 (regcache_cpy): New.
10969 (register_cache_size): New.
10970 (supply_regblock): New.
10971 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10972
219f2f23
PA
10973 * tracepoint.c: New.
10974
10975 * Makefile.in (OBS): Add tracepoint.o.
10976 (tracepoint.o): New rule.
10977
3a13a53b
L
109782010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10979
10980 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10981 (i386-mmx.o): New.
10982 (i386-mmx.c): Likewise.
10983 (i386-mmx-linux.o): Likewise.
10984 (i386-mmx-linux.c): Likewise.
10985
10986 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10987 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10988 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10989 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10990
10991 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10992 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10993 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10994
1570b33e
L
109952010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10996
10997 * Makefile.in (clean): Updated.
10998 (i386-avx.o): New.
10999 (i386-avx.c): Likewise.
11000 (i386-avx-linux.o): Likewise.
11001 (i386-avx-linux.c): Likewise.
11002 (amd64-avx.o): Likewise.
11003 (amd64-avx.c): Likewise.
11004 (amd64-avx-linux.o): Likewise.
11005 (amd64-avx-linux.c): Likewise.
11006
11007 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11008 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11009 (srv_amd64_regobj): Add amd64-avx.o.
11010 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11011 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11012 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11013 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11014 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11015 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11016 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11017
11018 * i387-fp.c: Include "i386-xstate.h".
11019 (i387_xsave): New.
11020 (i387_cache_to_xsave): Likewise.
11021 (i387_xsave_to_cache): Likewise.
11022 (x86_xcr0): Likewise.
11023
11024 * i387-fp.h (i387_cache_to_xsave): Likewise.
11025 (i387_xsave_to_cache): Likewise.
11026 (x86_xcr0): Likewise.
11027
11028 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11029 * linux-crisv32-low.c (target_regsets): Likewise.
11030 * linux-m68k-low.c (target_regsets): Likewise.
11031 * linux-mips-low.c (target_regsets): Likewise.
11032 * linux-ppc-low.c (target_regsets): Likewise.
11033 * linux-s390-low.c (target_regsets): Likewise.
11034 * linux-sh-low.c (target_regsets): Likewise.
11035 * linux-sparc-low.c (target_regsets): Likewise.
11036 * linux-xtensa-low.c (target_regsets): Likewise.
11037
11038 * linux-low.c: Include <sys/uio.h>.
11039 (regsets_fetch_inferior_registers): Support nt_type.
11040 (regsets_store_inferior_registers): Likewise.
11041 (linux_process_qsupported): New.
11042 (linux_target_ops): Add linux_process_qsupported.
11043
11044 * linux-low.h (regset_info): Add nt_type.
11045 (linux_target_ops): Add process_qsupported.
11046
11047 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11048 and <sys/uio.h>.
11049 (init_registers_i386_avx_linux): New.
11050 (init_registers_amd64_avx_linux): Likewise.
11051 (xmltarget_i386_linux_no_xml): Likewise.
11052 (xmltarget_amd64_linux_no_xml): Likewise.
11053 (PTRACE_GETREGSET): Likewise.
11054 (PTRACE_SETREGSET): Likewise.
11055 (x86_fill_xstateregset): Likewise.
11056 (x86_store_xstateregset): Likewise.
11057 (use_xml): Likewise.
11058 (x86_linux_update_xmltarget): Likewise.
11059 (x86_linux_process_qsupported): Likewise.
11060 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11061 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11062 init_registers_i386_linux here. Call
11063 x86_linux_update_xmltarget.
11064 (the_low_target): Add x86_linux_process_qsupported.
11065
11066 * server.c (handle_query): Call target_process_qsupported.
11067
11068 * target.h (target_ops): Add process_qsupported.
11069 (target_process_qsupported): New.
11070
fc7238bb
PA
110712010-04-03 Pedro Alves <pedro@codesourcery.com>
11072
11073 * inferiors.c (add_thread): Set last_status kind to
11074 TARGET_WAITKIND_IGNORE.
11075 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11076 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11077 (linux_wait_1): Move `thread' local definition to block that uses
11078 it. Don't NULL initialize `event_child'.
11079 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11080 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11081 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11082
bdabb078
PA
110832010-04-01 Pedro Alves <pedro@codesourcery.com>
11084
11085 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11086 an extended waitstatus, or by a watchpoint.
11087 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11088 thread was stepping or has been stopped by a watchpoint.
11089
d3bbe7a0
PA
110902010-04-01 Pedro Alves <pedro@codesourcery.com>
11091
11092 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11093 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11094 of another, then delete the previous, and validate all
11095 breakpoints.
11096 (validate_inserted_breakpoint): New.
11097 (delete_disabled_breakpoints): New.
11098 (validate_breakpoints): New.
11099 (check_mem_read): Validate breakpoints before trusting their
11100 shadow. Delete disabled breakpoints.
11101 (check_mem_write): Validate breakpoints before trusting they
11102 should be inserted. Delete disabled breakpoints.
11103 * mem-break.h (validate_breakpoints):
11104 * server.c (handle_query): Validate breakpoints when we see a
11105 qSymbol query.
11106
8b07ae33
PA
111072010-04-01 Pedro Alves <pedro@codesourcery.com>
11108
11109 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11110 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11111 if we could tell there's a GDB breakpoint at stop_pc.
11112 (need_step_over_p): Don't do a step over if we find a GDB
11113 breakpoint at the resume PC.
11114
11115 * mem-break.c (struct raw_breakpoint): New.
11116 (enum bkpt_type): New type `gdb_breakpoint'.
11117 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11118 fields. New field `raw'.
11119 (find_raw_breakpoint_at): New.
11120 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11121 breakpoint instead.
11122 (set_breakpoint_at): Adjust.
11123 (delete_raw_breakpoint): New.
11124 (release_breakpoint): New.
11125 (delete_breakpoint): Rename to...
11126 (delete_breakpoint_1): ... this. Add proc parameter. Use
11127 release_breakpoint. Return ENOENT.
11128 (delete_breakpoint): Reimplement.
11129 (find_breakpoint_at): Delete.
11130 (find_gdb_breakpoint_at): New.
11131 (delete_breakpoint_at): Delete.
11132 (set_gdb_breakpoint_at): New.
11133 (delete_gdb_breakpoint_at): New.
11134 (gdb_breakpoint_here): New.
11135 (set_reinsert_breakpoint): Use release_breakpoint.
11136 (uninsert_breakpoint): Rename to ...
11137 (uninsert_raw_breakpoint): ... this.
11138 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11139 (reinsert_raw_breakpoint): Change parameter type to
11140 raw_breakpoint.
11141 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11142 instead.
11143 (check_breakpoints): Adjust. Use release_breakpoint.
11144 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11145 (breakpoint_inserted_here): Ditto.
11146 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11147 Don't trust the breakpoint's shadow if it is not inserted.
11148 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11149 (delete_all_breakpoints): Adjust.
11150 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11151 use delete_breakpoint_1.
11152
11153 * mem-break.h (breakpoints_supported): Delete declaration.
11154 (set_gdb_breakpoint_at): Declare.
11155 (gdb_breakpoint_here): Declare.
11156 (delete_breakpoint_at): Delete.
11157 (delete_gdb_breakpoint_at): Declare.
11158
11159 * server.h (struct raw_breakpoint): Forward declare.
11160 (struct process_info): New field `raw_breakpoints'.
11161
11162 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11163 breakpoints.
11164
6bf5e0ba
PA
111652010-03-24 Pedro Alves <pedro@codesourcery.com>
11166
11167 * linux-low.c (status_pending_p_callback): Fix comment.
11168 (linux_wait_for_event_1): Move most of the internal breakpoint
11169 handling from here...
11170 (linux_wait_1): ... to here.
11171 (count_events_callback): New.
11172 (select_singlestep_lwp_callback): New.
11173 (select_event_lwp_callback): New.
11174 (cancel_breakpoints_callback): New.
11175 (select_event_lwp): New.
11176 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11177 priority to all LWPs that have had events that should be reported
11178 to the client. Cancel breakpoints when about to reporting the
11179 event to the client, not while stopping lwps. No longer cancel
11180 finished single-steps here.
11181 (cancel_finished_single_step): Delete.
11182 (cancel_finished_single_steps): Delete.
11183
414a389f
PA
111842010-03-24 Pedro Alves <pedro@codesourcery.com>
11185
11186 * mem-break.c (enum bkpt_type): New.
11187 (struct breakpoint): New field `type'.
11188 (set_breakpoint_at): Change return type to struct breakpoint
11189 pointer. Set type to `other_breakpoint' by default.
11190 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11191 in the breakpoint list.
11192 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11193 (reinsert_breakpoint): Rename to ...
11194 (reinsert_raw_breakpoint): ... this.
11195 (reinsert_breakpoints_at): Adjust.
11196 * mem-break.h (struct breakpoint): Declare.
11197 (set_breakpoint_at): Change return type to struct breakpoint
11198 pointer.
11199
2280c721
PA
112002010-03-24 Pedro Alves <pedro@codesourcery.com>
11201
11202 * server.c (handle_query): Assign, not compare.
11203
d50171e4
PA
112042010-03-24 Pedro Alves <pedro@codesourcery.com>
11205
11206 Teach linux gdbserver to step-over-breakpoints.
11207
11208 * linux-low.c (can_hardware_single_step): New.
11209 (supports_breakpoints): New.
11210 (handle_extended_wait): If stopping threads, read the stop pc of
11211 the new cloned LWP.
11212 (get_pc): New.
11213 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11214 low target doesn't support retrieving the PC.
11215 (add_lwp): Set last_resume_kind to resume_continue.
11216 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11217 (linux_attach): Don't clear stop_expected. Set the lwp's
11218 last_resume_kind to resume_stop.
11219 (linux_detach_one_lwp): Don't check for removed breakpoints.
11220 (check_removed_breakpoint): Delete.
11221 (status_pending_p): Rename to ...
11222 (status_pending_p_callback): ... this. Don't check for removed
11223 breakpoints. Don't consider threads that are stopped from GDB's
11224 perspective.
11225 (linux_wait_for_lwp): Always read the stop_pc here.
11226 (cancel_breakpoint): New.
11227 (step_over_bkpt): New global.
11228 (linux_wait_for_event_1): Implement stepping over breakpoints.
11229 (gdb_wants_lwp_stopped): New.
11230 (gdb_wants_all_stopped): New.
11231 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11232 single-step traps here. Store the thread's last reported target
11233 wait status.
11234 (send_sigstop): Don't clear stop_expected. Always set it,
11235 instead.
11236 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11237 (cancel_finished_single_step): New.
11238 (cancel_finished_single_steps): New.
11239 (wait_for_sigstop): Don't cancel finished single-step traps here.
11240 (linux_resume_one_lwp): Don't check for removed breakpoints.
11241 Don't set `step' on non-hardware step archs.
11242 (linux_set_resume_request): Ignore resume_stop requests if already
11243 stopping or stopped. Set the lwp's last_resume_kind.
11244 (resume_status_pending_p): Don't check for removed breakpoints.
11245 (need_step_over_p): New.
11246 (start_step_over): New.
11247 (finish_step_over): New.
11248 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11249 requests. Clear the thread's last reported target waitstatus.
11250 Don't use the `suspended' flag. Don't consider pending breakpoints.
11251 (linux_resume): Start a step-over if necessary.
11252 (proceed_one_lwp): New.
11253 (proceed_all_lwps): New.
11254 (unstop_all_lwps): New.
11255 * linux-low.h (struct lwp_info): Rewrite comment for the
11256 `suspended' flag. Add the `stop_pc' field. Delete the
11257 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11258 Add `'last_resume_kind' and `need_step_over' fields.
11259 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11260 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11261 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11262 (set_raw_breakpoint_at): New.
11263 (set_breakpoint_at): Rewrite to use it.
11264 (reinsert_breakpoint_handler): Delete.
11265 (set_reinsert_breakpoint): New.
11266 (reinsert_breakpoint_by_bp): Delete.
11267 (delete_reinsert_breakpoints): New.
11268 (uninsert_breakpoint): Rewrite.
11269 (uninsert_breakpoints_at): New.
11270 (reinsert_breakpoint): Rewrite.
11271 (reinsert_breakpoints_at): New.
11272 (check_breakpoints): Rewrite.
11273 (breakpoint_here): New.
11274 (breakpoint_inserted_here): New.
11275 (check_mem_read): Adjust.
11276 * mem-break.h (breakpoints_supported, breakpoint_here)
11277 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11278 (reinsert_breakpoint_by_bp): Delete declaration.
11279 (delete_reinsert_breakpoints): Declare.
11280 (reinsert_breakpoint): Delete declaration.
11281 (reinsert_breakpoints_at): Declare.
11282 (uninsert_breakpoint): Delete declaration.
11283 (uninsert_breakpoints_at): Declare.
11284 (check_breakpoints): Adjust prototype.
11285 * server.h: Adjust include order.
11286 (struct thread_info): Declare here. Add a `last_status' field.
11287
30ba68cb
MS
112882010-03-23 Michael Snyder <msnyder@vmware.com>
11289
11290 * server.c (crc32): New function.
11291 (handle_query): Add handling for 'qCRC:' request.
11292
b9a881c2
PA
112932010-03-23 Pedro Alves <pedro@codesourcery.com>
11294
11295 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11296 lwp had been stopped by a watchpoint.
11297
e92d13d5
PA
112982010-03-16 Pedro Alves <pedro@codesourcery.com>
11299
11300 * server.h (internal_error): Declare.
11301 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11302 * utils.c (internal_error): New function.
11303
64daa791
AS
113042010-03-15 Andreas Schwab <schwab@redhat.com>
11305
11306 * configure.srv: Fix typo setting srv_regobj.
11307
f52cd8cd
PA
113082010-03-15 Pedro Alves <pedro@codesourcery.com>
11309
11310 * linux-low.c (fetch_register): Avoid passing a non string literal
11311 format to `error'.
11312 (usr_store_inferior_registers): Ditto.
11313
93ae6fdc
PA
113142010-03-14 Pedro Alves <pedro@codesourcery.com>
11315
11316 * linux-low.c (linux_write_memory): Bail out early if peeking
11317 memory failed.
11318
c3adc08c
PA
113192010-03-14 Pedro Alves <pedro@codesourcery.com>
11320
11321 * linux-low.h (struct lwp_info): New fields
11322 `stopped_by_watchpoint' and `stopped_data_address'.
11323 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11324 here, and cache them in the lwp object.
11325 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11326 directly.
11327 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11328 field.
11329 (linux_stopped_by_watchpoint): Rewrite.
11330 (linux_stopped_data_address): Rewrite.
11331
bce522a2
PA
113322010-03-06 Simo Melenius <simo.melenius@iki.fi>
11333
11334 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11335 switching the current inferior, not before.
11336
90884b2b
L
113372010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11338
11339 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11340 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11341 i386-linux.c and amd64-linux.c.
11342 (reg-i386.o): Removed.
11343 (reg-i386.c): Likewise.
11344 (reg-i386-linux.o): Likewise.
11345 (reg-i386-linux.c): Likewise.
11346 (reg-x86-64.o): Likewise.
11347 (reg-x86-64.c): Likewise.
11348 (reg-x86-64-linux.o): Likewise.
11349 (reg-x86-64-linux.c): Likewise.
11350 (i386.o): New.
11351 (i386.c): Likewise.
11352 (i386-linux.o): Likewise.
11353 (i386-linux.c): Likewise.
11354 (amd64.o): Likewise.
11355 (amd64.c): Likewise.
11356 (amd64-linux.o): Likewise.
11357 (amd64-linux.c): Likewise.
11358
11359 * configure.srv (srv_i386_regobj): New.
11360 (srv_i386_linux_regobj): Likewise.
11361 (srv_amd64_regobj): Likewise.
11362 (srv_amd64_linux_regobj): Likewise.
11363 (srv_i386_32bit_xmlfiles): Likewise.
11364 (srv_i386_64bit_xmlfiles): Likewise.
11365 (srv_i386_xmlfiles): Likewise.
11366 (srv_amd64_xmlfiles): Likewise.
11367 (srv_i386_linux_xmlfiles): Likewise.
11368 (srv_amd64_linux_xmlfiles): Likewise.
11369 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11370 srv_xmlfiles to $srv_i386_xmlfiles.
11371 (i[34567]86-*-mingw32ce*): Likewise.
11372 (i[34567]86-*-mingw*): Likewise.
11373 (i[34567]86-*-nto*): Likewise.
11374 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11375 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11376 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11377 (x86_64-*-linux*): Likewise.
11378
11379 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11380 (init_registers_amd64_linux): New.
11381 (x86_arch_setup): Replace init_registers_x86_64_linux with
11382 init_registers_amd64_linux.
11383
193f13e6
MK
113842010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11385
11386 * configure.ac: Check for libdl. If it is not available link against
11387 static libthread_db.
11388 * configure: Regenerate.
11389
85d721b8
PA
113902010-02-22 Pedro Alves <pedro@codesourcery.com>
11391
11392 PR9605
11393
11394 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11395 handing a read watchpoint.
11396 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11397
6076632b
DE
113982010-02-12 Doug Evans <dje@google.com>
11399
11400 * linux-low.c (linux_supports_tracefork_flag): Document.
11401 (linux_look_up_symbols): Add comment.
11402
3327ccf7
L
114032010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11404
11405 * regcache.c (supply_register): Clear regcache if buf is NULL.
11406
0718675c 114072010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11408 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11409
11410 * inferiors.c (find_inferior): Add function documentation.
11411 (unloaded_dll): Handle the case where the unloaded dll has not
11412 been previously registered in the dll list.
11413
177321bd
DJ
114142010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11415
11416 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11417 (thumb2_breakpoint): New.
11418 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11419
2b009048
DJ
114202010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11421
11422 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11423 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11424 breakpoints.
11425
3be029c7
PA
114262010-01-21 Pedro Alves <pedro@codesourcery.com>
11427
11428 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11429
18f5de3b
JK
114302010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11431
11432 * linux-s390-low.c (s390_collect_ptrace_register)
11433 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11434
3743bb4f
DE
114352010-01-21 Doug Evans <dje@google.com>
11436
14ce3065
DE
11437 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11438 (PTRACE_ARG4_TYPE): New macro.
11439 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11440 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11441 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11442 (usr_store_inferior_registers): Ditto.
11443 (linux_read_memory, linux_write_memory): Ditto.
11444 (linux_test_for_tracefork): Ditto.
11445
3743bb4f
DE
11446 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11447 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11448
8b315be5
PA
114492010-01-21 Pedro Alves <pedro@codesourcery.com>
11450
11451 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11452 target.
11453
85492558
PA
114542010-01-21 Pedro Alves <pedro@codesourcery.com>
11455
11456 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11457 prototype to take a regcache. Adjust.
11458
442ea881
PA
114592010-01-20 Pedro Alves <pedro@codesourcery.com>
11460
11461 * regcache.h (struct thread_info): Forward declare.
11462 (struct regcache): New.
11463 (new_register_cache): Adjust prototype.
11464 (get_thread_regcache): Declare.
11465 (free_register_cache): Adjust prototype.
11466 (registers_to_string, registers_from_string): Ditto.
11467 (supply_register, supply_register_by_name, collect_register)
11468 (collect_register_as_string, collect_register_by_name): Ditto.
11469 * regcache.c (struct inferior_regcache_data): Delete.
11470 (get_regcache): Rename to ...
11471 (get_thread_regcache): ... this. Adjust. Switch inferior before
11472 fetching registers.
11473 (regcache_invalidate_one): Adjust.
11474 (regcache_invalidate): Fix prototype.
11475 (new_register_cache): Return the new register cache.
11476 (free_register_cache): Change prototype.
11477 (realloc_register_cache): Adjust.
11478 (registers_to_string): Change prototype to take a regcache. Adjust.
11479 (registers_from_string): Ditto.
11480 (register_data): Ditto.
11481 (supply_register): Ditto.
11482 (supply_register_by_name): Ditto.
11483 (collect_register): Ditto.
11484 (collect_register_as_string): Ditto.
11485 (collect_register_by_name): Ditto.
11486 * server.c (process_serial_event): Adjust.
11487 * linux-low.h (regset_fill_func, regset_store_func): Change
11488 prototype.
11489 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11490 Change prototype.
11491 * linux-low.c (get_stop_pc): Adjust.
11492 (check_removed_breakpoint): Adjust.
11493 (linux_wait_for_event): Adjust.
11494 (linux_resume_one_lwp): Adjust.
11495 (fetch_register): Add regcache parameter. Adjust.
11496 (usr_store_inferior_registers): Ditto.
11497 (regsets_fetch_inferior_registers): Ditto.
11498 (regsets_store_inferior_registers): Ditto.
11499 (linux_fetch_registers, linux_store_registers): Ditto.
11500 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11501 regcache. Adjust.
43aaf8b6
PA
11502 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11503 Ditto.
442ea881
PA
11504 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11505 prototype to take a regcache.
11506 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11507 * remote-utils.c (convert_ascii_to_int, outreg)
11508 (prepare_resume_reply): Change prototype to take a regcache.
11509 Adjust.
11510 * target.h (struct target_ops) <fetch_registers, store_registers>:
11511 Change prototype to take a regcache.
11512 (fetch_inferior_registers, store_inferior_registers): Change
11513 prototype to take a regcache. Adjust.
11514 * proc-service.c (ps_lgetregs): Adjust.
11515 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11516 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11517 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11518 take a regcache. Adjust.
11519 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11520 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11521 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11522 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11523 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11524 (cris_cannot_fetch_register):
11525 (cris_breakpoint_at): Change prototype to take a regcache.
11526 Adjust.
11527 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11528 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11529 to take a regcache. Adjust.
11530 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11531 Adjust.
11532 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11533 take a regcache. Adjust.
11534 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11535 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11536 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11537 * linux-mips-low.c (mips_get_pc):
11538 (mips_set_pc): Change prototype to take a regcache. Adjust.
11539 (mips_reinsert_addr): Adjust.
11540 (mips_collect_register): Change prototype to take a regcache.
11541 Adjust.
11542 (mips_supply_register):
11543 (mips_collect_register_32bit, mips_supply_register_32bit)
11544 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11545 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11546 * linux-ppc-low.c (ppc_supply_ptrace_register)
11547 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11548 (parse_spufs_run): Adjust.
11549 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11550 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11551 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11552 take a regcache. Adjust.
11553 * linux-s390-low.c (s390_collect_ptrace_register)
11554 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11555 (s390_set_pc): Change prototype to take a regcache. Adjust.
11556 (s390_arch_setup): Adjust.
11557 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11558 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11559 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11560 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11561 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11562 regcache. Adjust.
11563 (sparc_breakpoint_at): Adjust.
11564 * linux-xtensa-low.c (xtensa_fill_gregset):
11565 (xtensa_store_gregset):
11566 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11567 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11568 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11569 prototype to take a regcache. Adjust.
11570 * win32-arm-low.c (arm_fetch_inferior_register)
11571 (arm_store_inferior_register): Change prototype to take a
11572 regcache. Adjust.
11573 * win32-i386-low.c (i386_fetch_inferior_register)
11574 (i386_store_inferior_register): Change prototype to take a
11575 regcache. Adjust.
11576 * win32-low.c (child_fetch_inferior_registers)
11577 (child_store_inferior_registers): Change prototype to take a
11578 regcache. Adjust.
11579 (win32_wait): Adjust.
11580 (win32_fetch_inferior_registers): Change prototype to take a
11581 regcache. Adjust.
11582 (win32_store_inferior_registers): Adjust.
11583 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11584 store_inferior_register>: Change prototype to take a regcache.
11585
60c3d7b0
DE
115862010-01-20 Doug Evans <dje@google.com>
11587
11588 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11589 #ifdef.
11590 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11591 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11592
dc146f7c
VP
115932010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11594
11595 * linux-low.c (linux_core_of_thread): New.
11596 (compare_ints, show_process, list_threads): New.
11597 (linux_qxfer_osdata): Report threads and cores.
11598 (linux_target_op): Register linux_core_of_thread.
11599 * remote-utils.c (prepare_resume_reply): Report the core.
11600 (buffer_xml_printf): Support %d specifier.
11601 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11602 New.
11603 (handle_query): Handle qXfer:threads. Announce availability
11604 thereof.
11605 * target.h (struct target_ops): New field core_of_thread.
11606
7803799a
UW
116072010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11608
11609 * Makefile.in (clean): Remove new generated files.
11610 (reg-s390.o, reg-s390.c): Remove rules.
11611 (reg-s390x.o, reg-s390x.c): Likewise.
11612 (s390-linux32.o, s390-linux32.c): Add rules.
11613 (s390-linux64.o, s390-linux64.c): Likewise.
11614 (s390x-linux64.o, s390x-linux64.c): Likewise.
11615 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11616 * linux-s390-low.c: Include <elf.h>.
11617 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11618 (init_registers_s390): Remove prototype.
11619 (init_registers_s390x): Likewise.
11620 (init_registers_s390_linux32): Add prototype.
11621 (init_registers_s390_linux64): Likewise.
11622 (init_registers_s390x_linux64): Likewise.
11623 (s390_num_regs_3264): New define.
11624 (s390_regmap_3264): New global variable.
11625 (s390_cannot_fetch_register): Remove obsolete check.
11626 (s390_cannot_store_register): Likewise.
11627 (s390_collect_ptrace_register): Handle upper/lower register halves.
11628 (s390_supply_ptrace_register): Likewise.
11629 (s390_fill_gregset): Update to register number changes.
11630 (s390_get_hwcap): New routine.
11631 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11632 Install appropriate regmap and register set.
11633
6e7ffa39
JB
116342010-01-01 Joel Brobecker <brobecker@adacore.com>
11635
11636 * server.c (gdbserver_version): Update copyright year to 2010.
11637 * gdbreplay.c (gdbreplay_version): Likewise.
11638
957f3f49
DE
116392009-12-28 Doug Evans <dje@google.com>
11640
11641 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11642 elf/external.h. Include <elf.h> instead but only if necessary.
11643
ca5c370d
PA
116442009-12-28 Pedro Alves <pedro@codesourcery.com>
11645
11646 * linux-low.c (linux_remove_process): Remove `detaching'
11647 parameter. Don't release/detach from thread_db here.
11648 (linux_kill): Release/detach from thread_db here, ...
11649 (linux_detach): ... and here, before actually detaching.
11650 (linux_wait_1): ... and here, when a process exits.
11651 * thread-db.c (any_thread_of): New.
11652 (thread_db_free): Switch the current inferior to a thread of the
11653 passed in process.
11654
4ee62156
DE
116552009-12-21 Doug Evans <dje@google.com>
11656
d90e6a88
DE
11657 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11658
c5f62d5f
DE
11659 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11660 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11661 warning ifndef __NR_tkill. Move setting of errno there too.
11662 Delete unnecessary resetting of errno after syscall.
11663 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11664
10e86dd7
DE
11665 * configure.ac: Check for dladdr.
11666 * config.in: Regenerate.
11667 * configure: Regenerate.
11668 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11669 (try_thread_db_load): Update.
11670
4ee62156
DE
11671 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11672
00f515da
DE
116732009-12-18 Doug Evans <dje@google.com>
11674
e9464885
DE
11675 * event-loop.c: Include unistd.h if it exists.
11676
07d4f67e
DE
11677 * linux-low.c (my_waitpid): Move definition away from being in
11678 between linux_tracefork_child/linux_test_for_tracefork.
11679
00f515da
DE
11680 * gdb_proc_service.h (psaddr_t): Fix type.
11681 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11682 signature to match glibc.
11683
1de1badb
DE
116842009-12-16 Doug Evans <dje@google.com>
11685
11686 * linux-low.c (linux_read_memory): Fix argument to read.
11687
aeeb81d1
PA
116882009-11-26 Pedro Alves <pedro@codesourcery.com>
11689
11690 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11691 events, don't leave current_inferior pointing at null.
11692
10357975
PA
116932009-11-26 Pedro Alves <pedro@codesourcery.com>
11694
11695 * win32-low.c (LOG): Delete.
11696 (OUTMSG): Output to stderr.
11697 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11698 on compile time LOG macro.
11699 (win32_wait): Fix debug output.
11700
cf6e3471
PA
117012009-11-26 Pedro Alves <pedro@codesourcery.com>
11702
11703 * win32-low.c (win32_add_one_solib): If the dll name is
11704 "ntdll.dll", prepend the system directory to the dll path.
11705
0c85e18e
MK
117062009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11707
11708 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11709
9ac544ce 117102009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11711 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11712
11713 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11714 * configure.ac: Check for __mcoldfire__ and set
11715 gdb_cv_m68k_is_coldfire.
11716 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11717 reg-cf.o and reg-m68k.o.
11718 * configure: Regenerated.
11719
fd7dd3e6
PA
117202009-11-16 Pedro Alves <pedro@codesourcery.com>
11721
11722 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11723 Pass it to thread_db_free.
11724 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11725 proper `detaching' argument to linux_remove_process.
11726 * linux-low.h (thread_db_free): Add `detaching' parameter.
11727 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11728 to thread_db_free.
11729 (thread_db_free): Add `detaching' parameter. Only
11730 call td_ta_clear_event if detaching from process.
11731
75aa492e
MK
117322009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11733
11734 * thread-db.c (thread_db_free): Fix typo.
11735
21e1bee4
PP
117362009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11737
11738 PR gdb/10838
11739 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11740
8838b45e
NS
117412009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11742
11743 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11744 with an i686 compiler.
11745 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11746 needed.
11747 * configure: Rebuilt.
11748
8a35fb51
SL
117492009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11750
11751 PR gdb/10783
11752
11753 * server.c (handle_search_memory_1): Correct read_addr initialization
11754 in loop for searching subsequent chunks.
11755
96f15937
PP
117562009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11757
11758 * configure.ac: New --with-libthread-db option.
11759 * thread-db.c: Allow direct dependence on libthread_db.
11760 (thread_db_free): Adjust.
11761 * config.in: Regenerate.
11762 * configure: Likewise.
889bf7c5 11763
5f7d1694
PP
117642009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11765
11766 PR gdb/10757
11767 * thread-db.c (attach_thread): New function.
11768 (maybe_attach_thread): Return success/failure.
11769 (find_new_threads_callback): Adjust.
889bf7c5
PA
11770 (thread_db_find_new_threads): Loop until no new threads.
11771
88e3b899
PA
117722009-10-13 Pedro Alves <pedro@codesourcery.com>
11773
11774 * proc-service.c (ps_lgetregs): Formatting.
11775
cdbfd419
PP
117762009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11777
11778 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11779 * configure.ac: Adjust.
11780 * linux-low.h (struct process_info_private): Move members to struct
11781 thread_db.
11782 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11783 * linux-low.c (linux_remove_process): Adjust.
11784 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11785 * server.c (handle_query): Move code ...
11786 (handle_monitor_command): ... here. New function.
11787 * target.h (struct target_ops): New member.
11788 * thread-db.c (struct thread_db): New.
11789 (libthread_db_search_path): New variable.
11790 (thread_db_create_event, thread_db_enable_reporting)
11791 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11792 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11793 (try_thread_db_load_1, dladdr_to_soname): New functions.
11794 (try_thread_db_load, thread_db_load_search): New functions.
11795 (thread_db_init): Search for libthread_db.
11796 (thread_db_free): New function.
11797 (thread_db_handle_monitor_command): Likewise.
11798 * config.in: Regenerate.
11799 * configure: Regenerate.
889bf7c5 11800
4168d2d6
UW
118012009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11802
11803 * spu-low.c (spu_kill): Wait for inferior to terminate.
11804 Call clear_inferiors.
11805 (spu_detach): Call clear_inferiors.
11806
81ecdfbb
RW
118072009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11808
11809 * aclocal.m4: Regenerate.
11810 * config.in: Likewise.
11811 * configure: Likewise.
11812
0b9ff2c0
UW
118132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11814
11815 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11816 (parse_spufs_run): New function.
11817 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11818 (ppc_breakpoint_at): Handle SPU breakpoints.
11819
efcbbd14
UW
118202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11821
11822 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11823 (SPUFS_MAGIC): Define.
11824 (spu_enumerate_spu_ids): New function.
11825 (linux_qxfer_spu): New function.
11826 (linux_target_ops): Install linux_qxfer_spu.
11827
f4d9bade
UW
118282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11829
11830 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11831 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11832 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11833 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11834 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11835 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11836 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11837 (init_registers_powerpc_cell32l): Add prototype.
11838 (init_registers_powerpc_cell64l): Likewise.
11839 (ppc_arch_setup): Detect Cell/B.E. architecture.
11840
96e946ca
RW
118412009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11842
11843 * Makefile.in (datarootdir): New variable.
11844
58d6951d
DJ
118452009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11846
11847 * linux-low.c (linux_write_memory): Update debugging output.
11848 * Makefile.in (clean): Add new descriptions.
11849 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11850 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11851 * configure.srv: Add new files for arm*-*-linux*.
11852 * linux-arm-low.c: Add new declarations.
11853 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11854 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11855 (HWCAP_VFPv3D16): New.
11856 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11857 instead of __IWMMXT__.
11858 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11859 (arm_arch_setup): New.
11860 (target_regsets): Remove #ifdef. Add VFP regset.
11861 (the_low_target): Use arm_arch_setup.
11862
12b42a12
DJ
118632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11864
11865 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11866 the main thread again.
11867
ac8c974e
AR
118682009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11869
11870 Adding Neutrino gdbserver.
11871 * configure: Regenerated.
11872 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11873 * configure.srv (i[34567]86-*-nto*): New target.
11874 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11875 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11876 (nto_comctrl) [__QNX__]: New function.
11877 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11878
4424e0c3 118792009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11880
11881 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11882 srv_tgtobj.
11883
912cf4ba
PA
118842009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11885 Pedro Alves <pedro@codesourcery.com>
11886
11887 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11888 don't support CONTEXT_EXTENDED_REGISTERS.
11889 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11890 (the_low_target): Install them.
11891 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11892 failing with ERROR_PIPE_NOT_CONNECTED.
11893
aa5ca48f
DE
118942009-06-30 Doug Evans <dje@google.com>
11895 Pierre Muller <muller@ics.u-strasbg.fr>
11896
11897 Add h/w watchpoint support to x86-linux, win32-i386.
11898 * Makefile.in (SFILES): Add i386-low.c
11899 (i386_low_h): Define.
11900 (i386-low.o): Add dependencies.
11901 (linux-x86-low.o): Add i386-low.h dependency.
11902 (win32-i386-low.o): Ditto.
11903 * i386-low.c: New file.
11904 * i386-low.h: New file.
11905 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11906 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11907 * linux-low.c (linux_add_process): Initialize arch_private.
11908 (linux_remove_process): Free arch_private.
11909 (add_lwp): Initialize arch_private.
11910 (delete_lwp): Free arch_private.
11911 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11912 provided.
11913 * linux-low.h (process_info_private): New member arch_private.
11914 (lwp_info): New member arch_private.
11915 (linux_target_ops): New members new_process, new_thread,
11916 prepare_to_resume.
11917 (ptid_of): New macro.
11918 * linux-x86-low.c: Include stddef.h, i386-low.h.
11919 (arch_process_info): New struct.
11920 (arch_lwp_info): New struct.
11921 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11922 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11923 (i386_dr_low_get_status): New function.
11924 (x86_insert_point, x86_remove_point): New functions.
11925 (x86_stopped_by_watchpoint): New function.
11926 (x86_stopped_data_address): New function.
11927 (x86_linux_new_process, x86_linux_new_thread): New functions.
11928 (x86_linux_prepare_to_resume): New function.
11929 (the_low_target): Add entries for insert_point, remove_point,
11930 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11931 prepare_to_resume.
11932 * server.c (debug_hw_points): New global.
11933 (monitor_show_help): Document set debug-hw-points.
11934 (handle_query): Process "set debug-hw-points".
11935 * server.h (debug_hw_points): Declare.
11936 (paddress): Declare.
11937 * utils.c (NUMCELLS, CELLSIZE): New macros.
11938 (get_sell, xsnprintf, paddress): New functions.
11939 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11940 remove_point, stopped_by_watchpoint, stopped_data_address.
11941 * win32-i386-low.c: Include i386-low.h.
11942 (debug_reg_state): Replaces dr.
11943 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11944 (i386_dr_low_get_status): New function.
11945 (i386_insert_point, i386_remove_point): New functions.
11946 (i386_stopped_by_watchpoint): New function.
11947 (i386_stopped_data_address): New function.
11948 (i386_initial_stuff): Update.
11949 (get_thread_context,set_thread_context,i386_thread_added): Update.
11950 (the_low_target): Add entries for insert_point,
11951 remove_point, stopped_by_watchpoint, stopped_data_address.
11952 * win32-low.c (win32_insert_watchpoint): New function.
11953 (win32_remove_watchpoint): New function.
11954 (win32_stopped_by_watchpoint): New function.
11955 (win32_stopped_data_address): New function.
11956 (win32_target_ops): Add entries for insert_watchpoint,
11957 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11958 * win32-low.h (win32_target_ops): New members insert_point,
11959 remove_point, stopped_by_watchpoint, stopped_data_address.
11960
d993e290
PA
119612009-06-25 Pedro Alves <pedro@codesourcery.com>
11962
11963 * server.c (process_serial_event): Re-return unsupported, not
11964 error, if the type isn't recognized. Re-allow supporting only
11965 insert or remove packets. Also call require_running for
11966 breakpoints. Add missing break statement to default case. Tidy.
11967 * target.h (struct target_ops): Rename insert_watchpoint to
11968 insert_point, and remove_watchpoint to remove_point.
11969
11970 * linux-low.h (struct linux_target_ops): Likewise.
11971 * linux-low.c (linux_insert_watchpoint): Rename to ...
11972 (linux_insert_point): ... this. Adjust.
11973 (linux_remove_watchpoint): Rename to ...
11974 (linux_remove_point): ... this. Adjust.
11975 (linux_target_ops): Adjust.
11976 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11977 (cris_insert_point): ... this.
11978 (cris_remove_watchpoint): Rename to ...
11979 (cris_remove_point): ... this.
11980 (the_low_target): Adjust.
11981
0f54c268
PM
119822009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11983
11984 * server.c (handle_v_kill): Pass signal_pid to
11985 kill_inferior if multi_process is zero.
11986
c6314022
AR
119872009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11988
11989 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11990 * target.h (target_ops): Comment for *_watchpoint to make it clear
11991 the functions can get types '0' and '1'.
11992
4463ce24
AR
119932009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11994
11995 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11996 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11997 * regcache.c (get_regcache): Likewise.
11998 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11999 * win32-low.c (child_fetch_inferior_registers): Remove check for
12000 regno 0.
12001
cf8fd78b
PA
120022009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12003 Pedro Alves <pedro@codesourcery.com>
12004
12005 * target.h (struct target_ops) <supports_multi_process>: New
12006 callback.
12007 (target_supports_multi_process): New.
12008 * server.c (handle_query): Even if GDB reports support, only
12009 enable multi-process if the target also supports it. Report
12010 multi-process support only if the target backend supports it.
12011 * linux-low.c (linux_supports_multi_process): New function.
12012 (linux_target_ops): Install it as target_supports_multi_process
12013 callback.
12014
47c0c975
DE
120152009-05-24 Doug Evans <dje@google.com>
12016
e09875d4
DE
12017 Global renaming of find_thread_pid to find_thread_ptid.
12018 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12019 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12020 All callers updated.
12021
e27d73f6
DE
12022 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12023 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12024 directly.
12025
47c0c975
DE
12026 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12027 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12028 (linux_resume_one_lwp): Ditto.
12029
2acc282a
DE
120302009-05-23 Doug Evans <dje@google.com>
12031
12032 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12033 from struct inferior_list_entry * to struct lwp_info *.
12034 All callers updated.
12035
9f1036c1
DE
120362009-05-13 Doug Evans <dje@google.com>
12037
12038 * linux-x86-low.c: Don't include assert.h.
12039 (x86_siginfo_fixup): Use fatal, not assert.
12040 (x86_arch_setup): Fix comment.
12041
d0722149
DE
120422009-05-12 Doug Evans <dje@google.com>
12043
12044 Biarch support for i386/amd64 gdbserver.
12045 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12046 Add linux-x86-low.c.
12047 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12048 (linux-x86-low.o): Add.
12049 * linux-x86-64-low.c: Delete.
12050 * linux-i386-low.c: Delete.
12051 * linux-x86-low.c: New file.
12052 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12053 linux-x86-low.o.
12054 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12055 linux-x86-low.o.
12056 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12057 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12058 (linux_child_pid_to_exec_file): New function.
12059 (elf_64_header_p, elf_64_file_p): New functions.
12060 (siginfo_fixup): New function.
12061 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12062 give target a chance to convert layout.
12063 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12064 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12065
fdeb2a12
DE
120662009-05-07 Doug Evans <dje@google.com>
12067
12068 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12069 (regsets_store_inferior_registers): Ditto.
12070
a6dbe5df
PA
120712009-05-06 Pedro Alves <pedro@codesourcery.com>
12072
12073 PR server/10048
12074
12075 * linux-low.c (must_set_ptrace_flags): Delete.
12076 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12077 of the global.
12078 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12079 `lwp->must_set_ptrace_flags' instead.
ba42693b 12080 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12081 (linux_wait_1): ... not here.
12082
5091eb23
DE
120832009-04-30 Doug Evans <dje@google.com>
12084
9f767825
DE
12085 * inferiors.c (started_inferior_callback): New function.
12086 (attached_inferior_callback): New function.
12087 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12088 * server.c (print_started_pid, print_attached_pid): New functions.
12089 (detach_or_kill_for_exit): New function.
12090 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12091 * server.h (have_started_inferiors_p): Declare.
12092 (have_attached_inferiors_p): Declare.
12093
5091eb23
DE
12094 * inferiors.c (remove_process): Fix memory leak, free process.
12095 * linux-low.c (linux_remove_process): New function.
12096 (linux_kill): Call it instead of remove_process.
12097 (linux_detach, linux_wait_1): Ditto.
12098
155c8968
PA
120992009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12100
12101 * configure.srv: Add x86 Windows CE target.
12102
7fe519cb
UW
121032009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12104
12105 * inferiors.c (get_thread_process): Make global.
12106 * server.h (get_thread_process): Add prototype.
12107 * thread-db.c (find_one_thread): Use get_thread_process
12108 instead of current_process.
12109 (thread_db_get_tls_address): Do not crash if called when
12110 thread layer is not yet initialized.
12111
5472f405
UW
121122009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12113
12114 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12115 * spu-low.c (current_tid): Rename to ...
12116 (current_ptid): ... this.
12117 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12118 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12119 ptid_get_lwp (current_ptid) instead of current_tid.
12120 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12121 instead of current_tid. Use find_process_pid to verify pid
12122 argument is valid. Pass proper argument to remove_process.
12123 (spu_thread_alive): Compare current_ptid instead of current_tid.
12124 (spu_resume): Likewise.
12125
55ac2b99
PA
121262009-04-02 Pedro Alves <pedro@codesourcery.com>
12127
12128 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12129 variable.
12130
95954743
PA
121312009-04-01 Pedro Alves <pedro@codesourcery.com>
12132
12133 Implement the multiprocess extensions, and add linux multiprocess
12134 support.
12135
12136 * server.h (ULONGEST): Declare.
12137 (struct ptid, ptid_t): New.
12138 (minus_one_ptid, null_ptid): Declare.
12139 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12140 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12141 (struct inferior_list_entry): Change `id' type from unsigned from
12142 to ptid_t.
12143 (struct sym_cache, struct breakpoint, struct
12144 process_info_private): Forward declare.
12145 (struct process_info): Declare.
12146 (current_process): Declare.
12147 (all_processes): Declare.
12148 (initialize_inferiors): Declare.
12149 (add_thread): Adjust to use ptid_t.
12150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12151 (add_process, remove_process, find_thread_pid): Declare.
12152 (find_inferior_id): Adjust to use ptid_t.
12153 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12154 (multi_process): Declare.
12155 (push_event): Adjust to use ptid_t.
12156 (read_ptid, write_ptid): Declare.
12157 (prepare_resume_reply): Adjust to use ptid_t.
12158 (clear_symbol_cache): Declare.
12159 * inferiors.c (all_processes): New.
12160 (null_ptid, minus_one_ptid): New.
12161 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12162 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12163 (add_thread): Change unsigned long to ptid. Remove gdb_id
12164 parameter. Adjust.
12165 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12166 (gdb_id_to_thread): Rename to ...
12167 (find_thread_pid): ... this. Change unsigned long to ptid.
12168 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12169 (loaded_dll, pull_pid_from_list): Adjust.
12170 (add_process, remove_process, find_process_pid)
12171 (get_thread_process, current_process, initialize_inferiors): New.
12172 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12173 (struct target_waitstatus) <related_pid>: Ditto.
12174 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12175 return type to int.
12176 (struct target_ops) <join>: Add `pid' argument.
12177 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12178 (struct target_ops) <wait>: Add `ptid' field. Change return type
12179 to ptid.
12180 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12181 (mywait): Add `ptid' argument. Change return type to ptid_t.
12182 (target_pid_to_str): Declare.
12183 * target.c (set_desired_inferior): Adjust to use ptids.
12184 (mywait): Add new `ptid' argument. Adjust.
12185 (target_pid_to_str): New.
12186 * mem-break.h (free_all_breakpoints): Declare.
12187 * mem-break.c (breakpoints): Delelete.
12188 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12189 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12190 to use per-process breakpoint list.
12191 (free_all_breakpoints): New.
12192 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12193 (symbol_cache, all_symbols_looked_up): Delete.
12194 (hexchars): New.
12195 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12196 read_ptid): New.
12197 (prepare_resume_reply): Change ptid argument's type from unsigned
12198 long to ptid_t. Adjust. Implement W;process and X;process.
12199 (free_sym_cache, clear_symbol_cache): New.
12200 (look_up_one_symbol): Adjust to per-process symbol cache. *
12201 * server.c (cont_thread, general_thread, step_thread): Change type
12202 to ptid_t.
12203 (attached): Delete.
12204 (multi_process): New.
12205 (last_ptid): Change type to ptid_t.
12206 (struct vstop_notif) <ptid>: Change type to ptid_t.
12207 (queue_stop_reply, push_event): Change `ptid' argument's type to
12208 ptid_t.
12209 (discard_queued_stop_replies): Add `pid' argument.
12210 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12211 changes. Don't reference the `attached' global.
12212 (attach_inferior): Adjust to mywait interface changes.
12213 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12214 features. Handle and report "multiprocess+". Handle
12215 "qAttached:PID".
12216 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12217 changes.
12218 (handle_v_kill): New.
12219 (handle_v_stopped): Adjust to use target_pid_to_str.
12220 (handle_v_requests): Allow multiple attaches and runs when
12221 multiprocess extensions are in effect. Handle "vKill".
12222 (myresume): Adjust to use ptids.
12223 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12224 (handle_status): Adjust to discard_queued_stop_replies interface
12225 change.
12226 (first_thread_of, kill_inferior_callback)
12227 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12228 (main): Call initialize_inferiors. Adjust to use ptids, killing
12229 and detaching from all inferiors. Handle multiprocess packet
12230 variants.
12231 * linux-low.h: Include gdb_proc_service.h.
12232 (struct process_info_private): New.
12233 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12234 <lwpid_of>: Use ptid_get_lwp.
12235 (get_lwp_thread): Adjust.
12236 (struct lwp_info): Add `dead' member.
12237 (find_lwp_pid): Declare.
12238 * linux-low.c (thread_db_active): Delete.
12239 (new_inferior): Adjust comment.
12240 (inferior_pid): Delete.
12241 (linux_add_process): New.
12242 (handle_extended_wait): Adjust.
12243 (add_lwp): Change unsigned long to ptid.
12244 (linux_create_inferior): Add process to processes table. Adjust
12245 to use ptids. Don't set new_inferior here.
12246 (linux_attach_lwp): Rename to ...
12247 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12248 it. Adjust to use ptids.
12249 (linux_attach_lwp): New.
12250 (linux_attach): Add process to processes table. Don't set
12251 new_inferior here.
12252 (struct counter): New.
12253 (second_thread_of_pid_p, last_thread_of_process_p): New.
12254 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12255 multiple processes.
12256 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12257 processes. Remove process from process table.
12258 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12259 to multiple processes.
12260 (any_thread_of): New.
12261 (linux_detach): Add `pid' argument, and handle it. Remove process
12262 from processes table.
12263 (linux_join): Add `pid' argument. Handle it.
12264 (linux_thread_alive): Change unsighed long argument to ptid_t.
12265 Consider dead lwps as not being alive.
12266 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12267 threads we're not interested in.
12268 (same_lwp, find_lwp_pid): New.
12269 (linux_wait_for_lwp): Change `pid' argument's type from int to
12270 ptid_t. Adjust.
12271 (linux_wait_for_event): Rename to ...
12272 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12273 from int to ptid_t. Adjust.
12274 (linux_wait_for_event): New.
12275 (linux_wait_1): Add `ptid' argument. Change return type to
12276 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12277 that exit from the process table.
12278 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12279 Adjust.
12280 (mark_lwp_dead): New.
12281 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12282 stopping all threads, mark its main lwp as dead.
12283 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12284 ptids.
12285 (fetch_register, usr_store_inferior_registers)
12286 (regsets_fetch_inferior_registers)
12287 (regsets_store_inferior_registers, linux_read_memory)
12288 (linux_write_memory): Inline `inferior_pid'.
12289 (linux_look_up_symbols): Adjust to use per-process
12290 `thread_db_active'.
12291 (linux_request_interrupt): Adjust to use ptids.
12292 (linux_read_auxv): Inline `inferior_pid'.
12293 (initialize_low): Don't reference thread_db_active.
12294 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12295 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12296 (ps_getpid): Return the pid of the current inferior.
12297 * thread-db.c (proc_handle, thread_agent): Delete.
12298 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12299 per-process data.
12300 (find_one_thread): Change argument type to ptid_t. Adjust to
12301 per-process data.
12302 (maybe_attach_thread): Adjust to per-process data and ptids.
12303 (thread_db_find_new_threads): Ditto.
12304 (thread_db_init): Ditto.
12305 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12306 processes table. Adjust to use ptids.
12307 (spu_kill, spu_detach): Adjust interface. Remove process from
12308 processes table.
12309 (spu_join, spu_thread_alive): Adjust interface.
12310 (spu_wait): Adjust interface. Remove process from processes
12311 table. Adjust to use ptids.
12312 * win32-low.c (current_inferior_tid): Delete.
12313 (current_inferior_ptid): New.
12314 (debug_event_ptid): New.
12315 (thread_rec): Take a ptid. Adjust.
12316 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12317 (child_delete_thread): Ditto.
12318 (do_initial_child_stuff): Add `attached' argument. Add process to
12319 processes table.
12320 (child_fetch_inferior_registers, child_store_inferior_registers):
12321 Adjust.
12322 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12323 (win32_attach): Pass 1 to do_initial_child_stuff.
12324 (win32_kill): Adjust interface. Remove process from processes
12325 table.
12326 (win32_detach): Ditto.
12327 (win32_join): Adjust interface.
12328 (win32_thread_alive): Take a ptid.
12329 (win32_resume): Adjust to use ptids.
12330 (get_child_debug_event): Ditto.
12331 (win32_wait): Adjust interface. Remove exiting process from
12332 processes table.
12333
bd99dc85
PA
123342009-04-01 Pedro Alves <pedro@codesourcery.com>
12335
12336 Non-stop mode support.
12337
12338 * server.h (non_stop): Declare.
12339 (gdb_client_data, handler_func): Declare.
12340 (delete_file_handler, add_file_handler, start_event_loop):
12341 Declare.
12342 (handle_serial_event, handle_target_event, push_event)
12343 (putpkt_notif): Declare.
12344 * target.h (enum resume_kind): New.
12345 (struct thread_resume): Replace `step' field by `kind' field.
12346 (TARGET_WNOHANG): Define.
12347 (struct target_ops) <wait>: Add `options' argument.
12348 <supports_non_stop, async, start_non_stop>: New fields.
12349 (target_supports_non_stop, target_async): New.
12350 (start_non_stop): Declare.
12351 (mywait): Add `options' argument.
12352 * target.c (mywait): Add `options' argument. Print child exit
12353 notifications here.
12354 (start_non_stop): New.
12355 * server.c (non_stop, own_buf, mem_buf): New globals.
12356 (struct vstop_notif): New.
12357 (notif_queue): New global.
12358 (queue_stop_reply, push_event, discard_queued_stop_replies)
12359 (send_next_stop_reply): New.
12360 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12361 interface changes.
12362 (attach_inferior): In non-stop mode, don't wait for the target
12363 here.
12364 (handle_general_set): Handle QNonStop.
12365 (handle_query): When handling qC, return the current general
12366 thread, instead of the first thread of the list.
12367 (handle_query): If the backend supports non-stop mode, include
12368 QNonStop+ in the qSupported query response.
12369 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12370 and non-stop mode.
12371 (handle_v_attach, handle_v_run): Handle non-stop mode.
12372 (handle_v_stopped): New.
12373 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12374 (myresume): Adjust to use resume_kind. Handle non-stop.
12375 (queue_stop_reply_callback): New.
12376 (handle_status): Handle non-stop mode.
12377 (main): Clear non_stop flag on reconnection. Use the event-loop.
12378 Refactor serial protocol handling from here ...
12379 (process_serial_event): ... to this new function. When GDB
12380 selects any thread, select one here. In non-stop mode, wait until
12381 GDB acks all pending events before exiting.
12382 (handle_serial_event, handle_target_event): New.
12383 * remote-utils.c (remote_open): Install remote_desc in the event
12384 loop.
12385 (remote_close): Remove remote_desc from the event loop.
12386 (putpkt_binary): Rename to...
12387 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12388 (putpkt_binary): New as wrapper around putpkt_binary_1.
12389 (putpkt_notif): New.
12390 (prepare_resume_reply): In non-stop mode, don't change the
12391 general_thread.
12392 * event-loop.c: New.
12393 * Makefile.in (OBJ): Add event-loop.o.
12394 (event-loop.o): New rule.
12395
12396 * linux-low.h (pid_of): Moved here.
12397 (lwpid_of): New.
12398 (get_lwp_thread): Use lwpid_of.
12399 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12400 * linux-low.c (pid_of): Delete.
12401 (inferior_pid): Use lwpid_of.
12402 (linux_event_pipe): New.
12403 (target_is_async_p): New.
12404 (delete_lwp): New.
12405 (handle_extended_wait): Use lwpid_of.
12406 (add_lwp): Don't set lwpid field.
12407 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12408 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12409 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12410 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12411 first. Adjust to linux_wait_for_event interface changes. Use
12412 lwpid_of.
12413 (linux_detach): Don't delete the main lwp here.
12414 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12415 (status_pending_p): Don't consider explicitly suspended lwps.
12416 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12417 pointer. Add OPTIONS argument. Change return type to int. Use
12418 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12419 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12420 pointer. Add status pointer argument. Return a pid instead of a
12421 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12422 changes. In non-stop mode, don't switch to a random thread.
12423 (linux_wait): Rename to...
12424 (linux_wait_1): ... this. Add target_options argument, and handle
12425 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12426 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12427 clean exit and signal exit code. Don't stop all threads in
12428 non-stop mode. In all-stop mode, only stop all threads when
12429 reporting a stop to GDB. Handle explicit thread stop requests.
12430 (async_file_flush, async_file_mark): New.
12431 (linux_wait): New.
12432 (send_sigstop): Use lwpid_of.
12433 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12434 interface changes. In non-stop mode, don't switch to a random
12435 thread.
12436 (linux_resume_one_lwp): Use lwpid_of.
12437 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12438 (linux_resume_one_thread): ... this. Handle resume_stop. In
12439 non-stop mode, don't look for pending flag in all threads.
12440 (resume_status_pending_p): Don't consider explicitly suspended
12441 threads.
12442 (my_waitpid): Reimplement. Emulate __WALL.
12443 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12444 Use lwpid_of.
12445 (sigchld_handler, linux_supports_non_stop, linux_async)
12446 (linux_start_non_stop): New.
12447 (linux_target_ops): Register linux_supports_non_stop, linux_async
12448 and linux_start_non_stop.
12449 (initialize_low): Install SIGCHLD handler.
12450 * thread-db.c (thread_db_create_event, find_one_thread)
12451 (thread_db_get_tls_address): Use lwpid_of.
12452 * win32-low.c (win32_detach): Adjust to use resume_kind.
12453 (win32_wait): Add `options' argument.
12454 * spu-low.c (spu_resume): Adjust to use resume_kind.
12455 (spu_wait): Add `options' argument.
12456
5b1c542e
PA
124572009-04-01 Pedro Alves <pedro@codesourcery.com>
12458
12459 Decouple target code from remote protocol.
12460
12461 * target.h (enum target_waitkind): New.
12462 (struct target_waitstatus): New.
12463 (struct target_ops) <wait>: Return an unsigned long. Take a
12464 target_waitstatus pointer instead of a char pointer.
12465 (mywait): Likewise.
12466 * target.c (mywait): Change prototype to return an unsigned long.
12467 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12468 * server.h (thread_from_wait, old_thread_from_wait): Delete
12469 declarations.
12470 (prepare_resume_reply): Change prototype to take a
12471 target_waitstatus.
12472 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12473 (last_status, last_ptid): New.
12474 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12475 pid instead of a signal.
12476 (attach_inferior): Remove "status" and "signal" parameters.
12477 Adjust.
12478 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12479 not as an address.
12480 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12481 (handle_v_requests, myresume): Remove "status" and "signal"
12482 parameters. Adjust.
12483 (handle_status): New.
12484 (main): Delete local `status'. Adjust.
12485 * remote-utils.c: Include target.h.
12486 (prepare_resume_reply): Change prototype to take a
12487 target_waitstatus. Adjust.
12488
12489 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12490 interface.
12491 * spu-low.c (spu_wait): Adjust.
12492 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12493 Delete.
12494 (win32_wait): Adjust.
12495
2bd7c093
PA
124962009-04-01 Pedro Alves <pedro@codesourcery.com>
12497
12498 * target.h (struct thread_resume): Delete leave_stopped member.
12499 (struct target_ops): Add a `n' argument to the `resume' callback.
12500 * server.c (start_inferior): Adjust.
12501 (handle_v_cont, myresume): Adjust.
12502 * linux-low.c (check_removed_breakpoint): Adjust to resume
12503 interface change, and to removed leave_stopped field.
12504 (resume_ptr): Delete.
12505 (struct thread_resume_array): New.
12506 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12507 resume interface change.
12508 (linux_continue_one_thread, linux_queue_one_thread)
12509 (resume_status_pending_p): Check if the resume field is NULL
12510 instead of checking the leave_stopped member.
12511 (linux_resume): Adjust to the target resume interface change.
12512 * spu-low.c (spu_resume): Adjust to the target resume interface
12513 change.
12514 * win32-low.c (win32_detach, win32_resume): Ditto.
12515
c35fafde
PA
125162009-04-01 Pedro Alves <pedro@codesourcery.com>
12517
12518 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12519 flag.
12520 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12521 pending.
12522 (linux_continue_one_thread): Only preserve the stepping flag if
12523 there's a pending breakpoint.
12524
0a59d50b
PA
125252009-03-31 Pedro Alves <pedro@codesourcery.com>
12526
12527 * server.c (main): After the inferior having exited, call
12528 remote_close before exiting gdbserver.
12529
f04c6d38
TJB
125302009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12531
12532 Fix size of FPSCR in Power 7 processors.
12533 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12534 (PPC_FEATURE_HAS_DFP): New #define.
12535 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12536 size of the FPSCR.
12537
78e5cee6
PA
125382009-03-23 Pedro Alves <pedro@codesourcery.com>
12539
12540 * server.c (handle_query) Whitespace and formatting.
12541
1b3f6016
PA
125422009-03-22 Pedro Alves <pedro@codesourcery.com>
12543
12544 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12545 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12546 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12547 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12548 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12549 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12550 Makefile.in, configure.ac: Fix whitespace throughout.
12551 * configure: Regenerate.
12552
a07b2135
PA
125532009-03-22 Pedro Alves <pedro@codesourcery.com>
12554
12555 * inferiors.c (find_inferior): Make it safe for the callback
12556 function to delete the currently iterated inferior.
12557
67cc2626
PA
125582009-03-22 Pedro Alves <pedro@codesourcery.com>
12559
12560 * Makefile.in (linuw_low_h): Move higher.
12561 (thread-db.o): Depend on $(linux_low_h).
12562
54a0b537
PA
125632009-03-17 Pedro Alves <pedro@codesourcery.com>
12564
12565 Rename "process" to "lwp" throughout.
12566
12567 * linux-low.c (all_processes): Rename to...
12568 (all_lwps): ... this.
12569 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12570 (add_process): Rename to ...
12571 (add_lwp): ... this. Adjust.
12572 (linux_create_inferior): Adjust.
12573 (linux_attach_lwp): Adjust.
12574 (linux_attach): Adjust.
12575 (linux_kill_one_process): Rename to ...
12576 (linux_kill_one_lwp): ... this. Adjust.
12577 (linux_kill): Adjust.
12578 (linux_detach_one_process): Rename to ...
12579 (linux_detach_one_lwp): ... this. Adjust.
12580 (linux_detach): Adjust.
12581 (check_removed_breakpoint): Adjust.
12582 (status_pending_p): Adjust.
12583 (linux_wait_for_process): Rename to ...
12584 (linux_wait_for_lwp): ... this. Adjust.
12585 (linux_wait_for_event): Adjust.
12586 (send_sigstop): Adjust.
12587 (wait_for_sigstop): Adjust.
12588 (stop_all_processes): Rename to ...
12589 (stop_all_lwps): ... this.
12590 (linux_resume_one_process): Rename to ...
12591 (linux_resume_one_lwp): ... this. Adjust.
12592 (linux_set_resume_request, linux_continue_one_thread)
12593 (linux_queue_one_thread, resume_status_pending_p)
12594 (usr_store_inferior_registers, regsets_store_inferior_registers)
12595 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12596 Adjust.
12597 * linux-low.h (get_process): Rename to ...
12598 (get_lwp): ... this. Adjust.
12599 (get_thread_process): Rename to ...
12600 (get_thread_lwp): ... this. Adjust.
12601 (get_process_thread): Rename to ...
12602 (get_lwp_thread): ... this. Adjust.
12603 (struct process_info): Rename to ...
12604 (struct lwp_info): ... this.
12605 (all_processes): Rename to ...
12606 (all_lwps): ... this.
12607 * proc-service.c (ps_lgetregs): Adjust.
12608 * thread-db.c (thread_db_create_event, find_one_thread)
12609 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12610
0b16c5cf
PA
126112009-03-14 Pedro Alves <pedro@codesourcery.com>
12612
12613 * server.c (handle_query): Handle "qAttached".
12614
32de4b9d
NS
126152009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12616
12617 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12618 GPLv3, update license URL.
12619
2aecd87f
DE
126202009-03-01 Doug Evans <dje@google.com>
12621
93efd302 12622 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12623 (server_h): Add gdb_signals.h.
12624 (signals.o): Update.
12625 * server.h (target_signal_from_host,target_signal_to_host_p)
12626 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12627
86b1f9c5
PM
126282009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12629
12630 * remote-utils.c (getpkt): Also generate remote-debug
12631 information if noack_mode is set.
12632
4aa995e1
PA
126332009-02-06 Pedro Alves <pedro@codesourcery.com>
12634
12635 * server.c (handle_query): Report qXfer:siginfo:read and
12636 qXfer:siginfo:write as supported and handle them.
12637 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12638 * linux-low.c (linux_xfer_siginfo): New.
12639 (linux_target_ops): Set it.
12640
62709adf
PA
126412009-01-26 Pedro Alves <pedro@codesourcery.com>
12642
12643 * server.c (gdbserver_usage): Mention --remote-debug.
12644 (main): Accept '--remote-debug' switch.
12645
aef93bd7
DE
126462009-01-18 Doug Evans <dje@google.com>
12647
12648 * regcache.c (new_register_cache): No need to check result of xcalloc.
12649 * server.c (handle_search_memory): Back out calls to xmalloc,
12650 result is checked and error is returned to user upon failure.
12651 (handle_query): Ditto. Add more checks for result of malloc.
12652 (handle_v_cont): Check result of malloc, report error back to
12653 user upon failure.
12654 (handle_v_run): Ditto. Call freeargv.
12655 * server.h (freeargv): Declare.
12656 * utils.c (freeargv): New fn.
12657
54363045
DE
126582009-01-15 Doug Evans <dje@google.com>
12659
f626972c
DE
12660 * gdbreplay.c (perror_with_name): Make arg const char *.
12661 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12662 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12663 * utils.c (perror_with_name): Make arg const char *.
54363045 12664
18aae699
PA
126652009-01-14 Pedro Alves <pedro@codesourcery.com>
12666
12667 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12668 when handling a EXIT_PROCESS_DEBUG_EVENT.
12669
ff703abe
JB
126702009-01-06 Joel Brobecker <brobecker@adacore.com>
12671
12672 * gdbreplay.c (gdbreplay_version): Update copyright year.
12673 * server.c (gdbserver_version): Likewise.
12674
f21cc1a2 126752009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12676
12677 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12678 (handle_extended_wait): Improve comment.
0e21c1ec 12679
bca929d3
DE
126802008-12-13 Doug Evans <dje@google.com>
12681
12682 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12683 * server.h (ATTR_MALLOC): New macro.
12684 (xmalloc,xcalloc,xstrdup): Declare.
12685 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12686 * inferiors.c: Ditto.
12687 * linux-low.c: Ditto.
12688 * mem-break.c: Ditto.
12689 * regcache.c: Ditto.
12690 * remote-utils.c: Ditto.
12691 * server.c: Ditto.
12692 * target.c: Ditto.
12693 * win32-low.c: Ditto.
12694
97438e3f
DE
126952008-12-12 Doug Evans <dje@google.com>
12696
896c7fbb
DE
12697 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12698 in debugging printf.
12699
97438e3f
DE
12700 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12701
e3b886f8
DE
127022008-12-09 Doug Evans <dje@google.com>
12703
12704 * linux-low.h (struct process_info): Delete member tid, unused.
12705 * thread-db.c (find_one_thread): Update.
12706 (maybe_attach_thread): Update.
12707
07e059b5
VP
127082008-12-02 Pedro Alves <pedro@codesourcery.com>
12709
889bf7c5
PA
12710 * target.h (struct target_ops): Add qxfer_osdata member.
12711 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12712 and dirent.h.
12713 (linux_qxfer_osdata): New functions.
12714 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12715 callback.
12716 * server.c (handle_query): Handle "qXfer:osdata:read:".
12717 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12718 (buffer_xml_printf): New functions.
12719 * server.h (struct buffer): New.
12720 (buffer_grow_str, buffer_grow_str0): New macros.
12721 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12722 (buffer_xml_printf): Declare.
07e059b5 12723
4cab47ab
DE
127242008-11-24 Doug Evans <dje@google.com>
12725
12726 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12727
f142445f
DJ
127282008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12729
12730 * server.c (handle_v_run): Always use the supplied argument list.
12731
d0107bb6 127322008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12733
d0107bb6
BW
12734 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12735 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12736
2c4ad781
TJB
127372008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12738
12739 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12740 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12741 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12742 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12743 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12744 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12745 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12746 XML target descriptions.
12747 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12748 when inferior is running on an ISA 2.05 or later processor. Add
12749 special case to return offset for full 64-bit slot of FPSCR when
12750 in 32-bits.
12751
dfb64f85
DJ
127522008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12753
12754 * Makefile.in (SFILES, clean): Added sparc64 files.
12755 (reg-sparc64.o, reg-sparc64.c): New.
12756 * configure.srv (sparc*-*-linux*): New configuration.
12757 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12758 syscall arguments for SPARC.
12759 (regsets_store_inferior_registers): Likewise.
12760 * linux-sparc-low.c: New file.
12761
66b6e1dd
DE
127622008-10-21 Doug Evans <dje@google.com>
12763
12764 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12765 (READLINE_DIR,READLINE_DEP): Delete.
12766 (INTERNAL_CFLAGS): Update.
12767 (LINTFLAGS): Update.
12768
9b710a42
PA
127692008-10-10 Pedro Alves <pedro@codesourcery.com>
12770
12771 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12772 whole argv from the last run, not just argv[0].
12773
5822d809
PA
127742008-09-08 Pedro Alves <pedro@codesourcery.com>
12775
12776 * regcache.c (new_register_cache): Return NULL if the register
12777 cache size isn't known yet.
12778 (free_register_cache): Avoid dereferencing a NULL regcache.
12779
74aac56f
DJ
127802008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12781
12782 * configure.srv: Merge MIPS and MIPS64.
12783
400b20f5
MR
127842008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12785
12786 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12787
677c5bb1
LM
127882008-08-18 Luis Machado <luisgpm@br.ibm.com>
12789
12790 * Makefile.in: Add required vsx dependencies.
12791
12792 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12793 Declare init_registers_powerpc_vsx32l.
12794 Declare init_registers_powerpc_vsx64l.
12795 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12796 (ppc_arch_setup): Check for VSX in hwcap.
12797 (ppc_fill_vsxregset): New function.
12798 (ppc_store_vsxregset): New function.
12799 Add new VSX entry in regset_info target_regsets.
12800
12801 * configure.srv: Add new VSX dependencies.
12802
a6f3e723
SL
128032008-08-12 Pedro Alves <pedro@codesourcery.com>
12804
12805 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12806 (remote_open): Set or clear transport_is_reliable.
12807 (putpkt_binary): Don't expect acks in noack mode.
12808 (getpkt): Don't send ack/nac in noack mode.
12809 * server.c (handle_general_set): Handle QStartNoAckMode.
12810 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12811 qSupported.
12812 (main): Reset noack_mode on every connection.
12813 * server.h (noack_mode): Declare.
12814
a417dc56
RW
128152008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12816
12817 * Makefile.in (GDBREPLAY_OBS): New variable.
12818 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12819
3221518c
UW
128202008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12821 Daniel Jacobowitz <dan@codesourcery.com>
12822
12823 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12824 (usr_store_inferior_registers): Likewise.
12825 (regsets_store_inferior_registers): Likewise.
12826
ec56be1b
PA
128272008-07-31 Rolf Jansen <rj@surtec.com>
12828 Pedro Alves <pedro@codesourcery.com>
12829
12830 * configure.ac: Check for memmem declaration.
12831 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12832 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12833 (disable_packet_qfThreadInfo): Unconditionally compile.
12834 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12835 * configure, config.in: Regenerate.
12836
2fe5e3ff
DE
128372008-07-28 Doug Kwan <dougkwan@google.com>
12838
12839 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12840 (linux_write_memory): Remove declaration of errno.
12841
836acd6d
UW
128422008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12843
12844 * linux-low.c (handle_extended_wait): Do not use "status"
12845 variable uninitialized.
12846
aeba519e
PA
128472008-07-07 Pedro Alves <pedro@codesourcery.com>
12848
12849 * server.c (handle_v_attach): Inhibit reporting dll changes.
12850
db42f210
PA
128512008-06-27 Pedro Alves <pedro@codesourcery.com>
12852
12853 * remote-utils.c (prepare_resume_reply): If requested, don't
12854 output "thread:TID" in the T stop reply.
12855
12856 * server.c (disable_packet_vCont, disable_packet_Tthread)
12857 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12858 (handle_query): If requested, disable support for qC, qfThreadInfo
12859 and qsThreadInfo.
12860 (handle_v_requests): If requested, disable support for vCont.
12861 (gdbserver_show_disableable): New.
12862 (main): Handle --disable-packet and --disable-packet=LIST.
12863
12864 * server.h (disable_packet_vCont, disable_packet_Tthread)
12865 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12866
8e4c5421
CD
128672008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12868
12869 * server.c (gdbserver_usage): Mention --version.
12870
6e23a804
DJ
128712008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12872
12873 * Makefile.in (gdbreplay.o): New rule.
12874
90aa6a40
JM
128752008-06-06 Joseph Myers <joseph@codesourcery.com>
12876
12877 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12878 message, not gdbserver.
12879
c16158bc 128802008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12881 Nathan Sidwell <nathan@codesourcery.com>
12882 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12883
12884 * acinclude.m4: Include ../../config/acx.m4.
12885 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12886 * configure, config.in: Regenerate.
12887 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12888 * server.c (gdbserver_version): Print PKGVERSION.
12889 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12890 (main): Adjust gdbserver_usage calls.
12891 * gdbreplay.c (version, host_name): Add declarations.
12892 (gdbreplay_version, gdbreplay_usage): New.
12893 (main): Accept --version and --help options.
12894
aeb75bf5
DJ
128952008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12896
12897 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12898 (arm_breakpoint_at): Handle Thumb.
12899 (the_low_target): Add comment.
12900
76b233dd
UW
129012008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12902
12903 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12904
08388c79
DE
129052008-05-09 Doug Evans <dje@google.com>
12906
a3c83fae
DE
12907 * server.h (decode_search_memory_packet): Declare.
12908 * remote-utils.c (decode_search_memory_packet): New fn.
12909 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12910 (handle_search_memory): New fn.
12911 (handle_query): Process qSearch:memory packets.
12912
bb9c3d36
UW
129132008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12914
12915 * regcache.c (registers_length): Remove.
12916 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12917 full register packet.
12918 * regcache.h (registers_length): Remove prototype.
12919 * server.h (PBUFSIZ): Define to 16384.
12920
7284e1be
UW
129212008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12922
12923 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12924 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12925 powerpc-64l.o, and powerpc-altivec64l.o.
12926 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12927 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12928 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12929 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12930 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12931 to srv_xmlfiles.
12932
12933 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12934 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12935 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12936 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12937 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12938 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12939 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12940 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12941 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12942 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12943 (clean): Update.
12944
12945 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12946 (init_registers_powerpc_32l): ... this new prototype.
12947 (init_registers_powerpc_32): Remove, replace by ...
12948 (init_registers_powerpc_altivec32l): ... this new prototype.
12949 (init_registers_powerpc_e500): Remove, replace by ...
12950 (init_registers_powerpc_e500l): ... this new prototype.
12951 (init_registers_ppc64): Remove, replace by ...
12952 (init_registers_powerpc_64l): ... this new prototype.
12953 (init_registers_powerpc_64): Remove, replace by ...
12954 (init_registers_powerpc_altivec64l): ... this new prototype.
12955 (ppc_num_regs): Set to 73.
12956 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12957 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12958 (ppc_cannot_store_register): Handle orig_r3 and trap.
12959 (ppc_arch_setup): Update init_registers_... calls.
12960 (ppc_fill_gregset): Handle orig_r3 and trap.
12961
12962 * inferiors.c (clear_inferiors): Reset current_inferior.
12963
fdc59709
PB
129642008-04-23 Paolo Bonzini <bonzini@gnu.org>
12965
889bf7c5
PA
12966 * acinclude.m4: Add override.m4.
12967 * configure: Regenerate.
fdc59709 12968
c9b2f845
UW
129692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12970
12971 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12972 initial call to init_register_ppc64.
12973
550512b8
UW
129742008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12975
43aaf8b6
PA
12976 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12977 single powerpc*-*-linux* case.
550512b8
UW
12978 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12979
b6430ec3
UW
129802008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12981
12982 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12983 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12984 from reg_xmlfiles.
12985 * linux-ppc-low.c: Include <elf.h>.
12986 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12987 (ppc_hwcap): New global variable.
12988 (ppc_regmap): Remove __SPE__ #ifdef sections.
12989 (ppc_regmap_e500): New global variable.
12990 (ppc_cannot_store_register): Update __SPE__ special case.
12991 (ppc_get_hwcap): New function.
12992 (ppc_arch_setup): Use it to determine whether inferior supports
12993 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12994 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12995 Do not access registers if target does not support AltiVec.
12996 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12997 Do not access registers if target does not support SPE.
12998 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12999
52fa2412
UW
130002008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13001
13002 * linux-low.c (disabled_regsets, num_regsets): New.
13003 (use_regsets_p): Delete.
13004 (linux_wait_for_process): Clear disabled_regsets.
13005 (regsets_fetch_inferior_registers): Check and set it.
13006 (regsets_store_inferior_registers): Likewise.
13007 (linux_fetch_registers, linux_store_registers): Do not use
13008 use_regsets_p.
13009 (initialize_low): Allocate disabled_regsets.
13010
e28b3332
DJ
130112008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13012
13013 * Makefile.in (LIBOBJS): New.
13014 (OBS): Use LIBOBJS.
13015 (memmem.o): New rule.
13016 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13017 * configure: Regenerated.
13018
4536995d
UW
130192008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13020
13021 * server.c (handle_query): Never return "unsupported" for
13022 qXfer:features:read queries.
13023
221c031f
UW
130242008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13025
13026 * server.c (get_features_xml): Fix inverted condition.
13027 (handle_query): Always support qXfer:feature:read.
13028
ccd213ac
DJ
130292008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13030
13031 * server.c (wrapper_argv): New.
13032 (start_inferior): Handle wrapper_argv. If set, expect an extra
13033 trap.
13034 (gdbserver_usage): Document --wrapper.
13035 (main): Parse --wrapper.
13036
6fe305f7
UW
130372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13038
13039 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13040 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13041 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13042 (ppc_set_pc): Likewise.
13043 (ppc_arch_setup): New function.
13044 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13045 of collect_register.
889bf7c5 13046 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13047
5b0a002e
UW
130482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13049
13050 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13051 instead of linux-ppc64-low.o.
13052 * linux-ppc64-low.c: Remove file.
13053 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13054 (linux-ppc64-low.o): Remove rule.
13055
13056 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13057 (init_registers_powerpc_64): Likewise.
13058 (ppc_regmap): Conditionally define depending on __powerpc64__.
13059 (ppc_cannot_store_register): Do not special-case "fpscr" when
13060 compiled on __powerpc64__.
13061 (ppc_collect_ptrace_register): New function.
13062 (ppc_supply_ptrace_register): New function.
13063 (ppc_breakpoint): Change type to "unsigned int".
13064 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13065 (the_low_target): Conditionally provide initializers for the
889bf7c5 13066 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13067 collect_ptrace_register and supply_ptrace_register members.
13068
9b4b61c8
UW
130692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13070
13071 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13072 * server.c (gdbserver_xmltarget): Define.
13073 (get_features_xml): Use it to replace "target.xml" and arch_string.
13074
13075 * configure.srv: Remove srv_xmltarget. Add XML files that were
13076 mentioned there to srv_xmlfiles instead. Remove conditional tests
13077 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13078 srv_xmlfiles and srv_regobj to include all possible choices.
13079 * configure.ac (srv_xmltarget): Remove.
13080 (srv_xmlfiles): Do not add "target.xml".
13081 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13082 checks for supplementary target information.
13083 * configure: Regenerate.
13084 * Makefile.in (XML_TARGET): Remove.
13085 (target.xml): Remove rule.
13086 (clean): Do not clean up target.xml.
13087 (.PRECIOUS): Do not mention target.xml.
13088
13089 * target.h (struct target_ops): Remove arch_string member.
13090 * linux-low.c (linux_arch_string): Remove.
13091 (linux_target_ops): Remove arch_string initializer.
13092 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13093 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13094 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13095 * spu-low.c (spu_arch_string): Remove.
13096 (spu_target_ops): Remove arch_string initializer.
13097 * win32-low.c (win32_arch_string): Remove.
13098 (win32_target_ops): Remove arch_string initializer.
13099 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13100 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13101 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13102
ee1a7ae4
UW
131032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13104
13105 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13106 by collect_ptrace_register and supply_ptrace_register hooks.
13107 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13108 instead of checking for the_low_target.left_pad_xfer.
13109 (usr_store_inferior_registers): Use collect_ptrace_register callback
13110 instead of checking for the_low_target.left_pad_xfer.
13111
13112 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13113 (s390_supply_ptrace_register): Likewise.
13114 (s390_fill_gregset): Call s390_collect_ptrace_register.
13115 (the_low_target): Update.
13116
13117 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13118 (ppc_supply_ptrace_register): Likewise.
13119 (the_low_target): Update.
13120
13121 * linux-i386-low.c (the_low_target): Update.
13122 * linux-x86-64-low.c (the_low_target): Update.
13123
d61ddec4
UW
131242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13125
13126 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13127 reg-s390.o and reg-s390x.o.
13128
13129 * linux-low.c (new_inferior): New global variable.
13130 (linux_create_inferior, linux_attach): Set it.
13131 (linux_wait_for_process): Call the_low_target.arch_setup after the
13132 target has stopped for the first time.
13133 (initialize_low): Do not call the_low_target.arch_setup.
13134
13135 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13136 (s390_set_pc): Likewise.
13137 (s390_arch_setup): New function.
13138 (the_low_target): Use s390_arch_setup as arch_setup routine.
13139
13140 * regcache.c (realloc_register_cache): New function.
13141 (set_register_cache): Call it for each existing regcache.
13142
d05b4ac3
UW
131432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13144
13145 * server.h (init_registers): Remove prototype.
13146
13147 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13148 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13149 instead of init_registers ().
13150 * linux-arm-low.c (init_registers_arm): Add prototype.
13151 (init_registers_arm_with_iwmmxt): Likewise.
13152 (the_low_target): Add initializer for arch_setup field.
13153 * linux-cris-low.c (init_registers_cris): Add prototype.
13154 (the_low_target): Add initializer for arch_setup field.
13155 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13156 (the_low_target): Add initializer for arch_setup field.
13157 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13158 (the_low_target): Add initializer for arch_setup field.
13159 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13160 (the_low_target): Add initializer for arch_setup field.
13161 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13162 (the_low_target): Add initializer for arch_setup field.
13163 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13164 (the_low_target): Add initializer for arch_setup field.
13165 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13166 (init_registers_mips64_linux): Likewise.
13167 (the_low_target): Add initializer for arch_setup field.
13168 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13169 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13170 (the_low_target): Add initializer for arch_setup field.
13171 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13172 (init_registers_powerpc_64): Likewise.
13173 (the_low_target): Add initializer for arch_setup field.
13174 * linux-s390-low.c (init_registers_s390): Add prototype.
13175 (init_registers_s390x): Likewise.
13176 (the_low_target): Add initializer for arch_setup field.
13177 * linux-sh-low.c (init_registers_sh): Add prototype.
13178 (the_low_target): Add initializer for arch_setup field.
13179 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13180 (the_low_target): Add initializer for arch_setup field.
13181 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13182 (the_low_target): Add initializer for arch_setup field.
13183
13184 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13185 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13186 instead of init_registers ().
13187 * win32-arm-low.c (init_registers_arm): Add prototype.
13188 (the_low_target): Add initializer for arch_setup field.
13189 * win32-i386-low.c (init_registers_i386): Add prototype.
13190 (the_low_target): Add initializer for arch_setup field.
13191
13192 * spu-low.c (init_registers_spu): Add prototype.
13193 (initialize_low): Call initialie_registers_spu () instead of
13194 initialize_registers ().
13195
fd96d250
PA
131962008-02-19 Pedro Alves <pedro@codesourcery.com>
13197
13198 * server.c (handle_v_requests): When handling the vRun and vAttach
13199 packets, if already debugging a process, don't kill it. Return an
13200 error instead.
13201
d41b6bb4
DJ
132022008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13203
13204 * server.c (handle_query): Correct length check.
13205
5ac588cf
PA
132062008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13207
13208 * win32-low.c (do_initial_child_stuff): Add process handle
13209 parameter. Set current_process_handle and current_process_id from the
13210 parameters. Clear globals.
13211 (win32_create_inferior): Don't set current_process_handle and
13212 current_process_id here. Instead pass them on the call to
13213 do_initial_child_stuff.
13214 (win32_attach): Likewise.
13215 (win32_clear_inferiors): New.
13216 (win32_kill): Don't close the current process handle or the
13217 current thread handle here. Instead call win32_clear_inferiors.
13218 (win32_detach): Don't open a new handle to the process. Call
13219 win32_clear_inferiors.
13220 (win32_join): Don't rely on current_process_handle; open a new
13221 handle using the process id.
13222 (win32_wait): Call win32_clear_inferiors when the inferior process
13223 has exited.
13224
ecd7ecbc
DJ
132252008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13226
13227 * server.c (monitor_show_help): Add "exit".
13228
1525d545
MG
132292008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13230
ecd7ecbc 13231 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13232 (clean): Add reg-xtensa.c.
13233 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13234 * configure.srv (xtensa*-*-linux*) New target.
13235 * linux-xtensa-low.c: New.
13236 * xtensa-xtregs.c: New.
1525d545 13237
59a016f0
PA
132382008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13239
13240 * hostio.c: Don't include errno.h.
13241 (errno_to_fileio_errno): Move to hostio-errno.
13242 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13243 error number outputting to the target->hostio_last_error callback.
13244 (hostio_packet_error): Use FILEIO_EINVAL directly.
13245 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13246 calls to hostio_error.
13247 * hostio-errno.c: New.
13248 * server.h (hostio_last_error_from_errno): Declare.
13249 * target.h (target_ops): Add hostio_last_error member.
13250 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13251 as hostio_last_error handler.
889bf7c5 13252 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13253 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13254 (wince_hostio_last_error): New functions.
13255 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13256 as hostio_last_error handler.
13257 (win32_target_ops) [!_WIN32_WCE]: Register
13258 hostio_last_error_from_errno as hostio_last_error handler.
13259 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13260 (hostio-errno.o): New rule.
13261 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13262 * configure.srv (srv_hostio_err_objs): New variable. Default to
13263 hostio-errno.o.
13264 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13265 * configure: Regenerate.
13266
2d717e4f
DJ
132672008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13268
13269 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13270 (linux_kill, linux_detach): Clean up the process list.
13271 * remote-utils.c (remote_open): Improve port number parsing.
13272 (putpkt_binary, input_interrupt): Only send interrupts if the target
13273 is running.
13274 * server.c (extended_protocol): Make static.
13275 (attached): Define earlier.
13276 (exit_requested, response_needed, program_argv): New variables.
13277 (target_running): New.
13278 (start_inferior): Clear attached here.
13279 (attach_inferior): Set attached here.
13280 (require_running): Define.
13281 (handle_query): Use require_running and target_running. Implement
13282 "monitor exit".
13283 (handle_v_attach, handle_v_run): New.
13284 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13285 (gdbserver_usage): Update.
13286 (main): Redo argument parsing. Handle --debug and --multi. Handle
13287 --attach along with other options or after the port. Save
13288 program_argv. Support no initial program. Resynchronize
13289 communication with GDB after an error. Handle "monitor exit".
13290 Use require_running and target_running. Always allow the extended
13291 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13292 restart in extended mode.
13293 * README: Refer to the GDB manual. Update --attach usage.
13294
7407e2de
AS
132952007-12-20 Andreas Schwab <schwab@suse.de>
13296
13297 * linux-low.c (STACK_SIZE): Define.
13298 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13299 (linux_test_for_tracefork): Likewise.
13300
b65d95c5
DJ
133012007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13302
13303 * linux-low.c (linux_wait_for_event): Update messages. Do not
13304 reinsert auto-delete breakpoints.
13305 * mem-break.c (struct breakpoint): Change return type of handler to
13306 int.
13307 (set_breakpoint_at): Update handler type.
13308 (reinsert_breakpoint_handler): Return 1 instead of calling
13309 delete_breakpoint.
13310 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13311 setting a new one.
13312 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13313 * mem-break.h (set_breakpoint_at): Update handler type.
13314 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13315 * win32-low.c (auto_delete_breakpoint): New.
13316 (get_child_debug_event): Use it.
13317
4e799345
DJ
133182007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13319
13320 * configure.ac: Check for pread and pwrite.
13321 * hostio.c (handle_pread): Fall back to lseek and read.
13322 (handle_pwrite): Fall back to lseek and write.
13323 * config.in, configure: Regenerated.
13324
27524b67
DJ
133252007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13326
13327 * server.c (myresume): Add own_buf argument.
13328 (main): Update calls.
13329
a20d5e98
DJ
133302007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13333 * remote-utils.c (remote_open): Do not call disable_async_io.
13334 (block_async_io): Delete.
13335 (unblock_async_io): Make static.
13336 (initialize_async_io): New.
13337 * server.c (handle_v_cont): Handle async I/O here.
13338 (myresume): Likewise. Move other common resume tasks here...
13339 (main): ... from here. Call initialize_async_io. Disable async
13340 I/O before the main loop.
13341 * server.h (initialize_async_io): Declare.
13342 (block_async_io, unblock_async_io): Delete prototypes.
13343 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13344
b79d787e
DJ
133452007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13346
13347 * remote-utils.c (readchar): Allow binary data in received messages.
13348
d97903b2
PA
133492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13350
13351 * win32-low.c (attaching): New global.
13352 (win32_create_inferior): Clear the `attaching' global.
13353 (win32_attach): Set the `attaching' global.
13354 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13355 attaching. Only set a breakpoint at the entry point if not
13356 attaching.
13357
311de423
PA
133582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13359
13360 * server.c (main): Don't report dll events on the initial
13361 connection on attaches.
13362
6c2d16d2
PA
133632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13364
13365 * server.c (main): Relax numerical bases supported for the pid of
13366 the --attach command line argument.
13367
5ca906e6
PA
133682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13369
13370 * win32-low.c (win32_attach): Call OpenProcess before
13371 DebugActiveProcess, not after. Add last error output to error
13372 call.
13373
9c6c8194
PA
133742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13375
13376 * win32-low.c (win32_get_thread_context)
13377 (win32_set_thread_context): New functions.
13378 (thread_rec): Use win32_get_thread_context.
13379 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13380 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13381 field.
13382
4d5d1aaa
PA
133832007-12-03 Leo Zayas
13384 Pedro Alves <pedro_alves@portugalmail.pt>
13385
13386 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13387 global variables.
13388 (child_add_thread): Minor cleanup.
13389 (child_continue): Resume artificially suspended threads before
13390 calling ContinueDebugEvent.
13391 (suspend_one_thread): New.
13392 (fake_breakpoint_event): New.
13393 (get_child_debug_event): Change return type to int. Check here if
13394 gdb sent an interrupt request. If a soft interrupt was requested,
13395 fake a breakpoint event. Return 0 if there is no event to handle,
13396 and 1 otherwise.
13397 (win32_wait): Don't check here if gdb sent an interrupt request.
13398 Ensure there is a valid event to handle.
13399 (win32_request_interrupt): Add soft interruption method as last
13400 resort.
13401
c436e841
PA
134022007-12-03 Leo Zayas
13403 Pedro Alves <pedro_alves@portugalmail.pt>
13404
13405 * win32-low.h (win32_thread_info): Add descriptions to the
13406 structure members. Replace `suspend_count' counter by a
13407 `suspended' flag.
13408 * win32-low.c (thread_rec): Update condition of when to get the
13409 context from the inferior. Rely on ContextFlags being set if it
13410 has already been retrieved. Only suspend the inferior thread if
13411 we haven't already. Warn if that fails.
13412 (continue_one_thread): s/suspend_count/suspended/. Only call
13413 ResumeThread once. Warn if that fails.
13414
e7b5fa67
PA
134152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13416
13417 * win32-low.c (win32_wait): Don't read from the inferior when it
13418 has already exited.
13419
a385171d
PA
134202007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13421
13422 * Makefile.in (win32_low_h): New variable.
13423 (win32-low.o): Add dependency on $(win32_low_h).
13424 (win32-arm-low.o, win32-i386-low.o): New rules.
13425
f80c84b3
DJ
134262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13427
13428 * hostio.c: Correct copyright year.
13429
a6b151f1
DJ
134302007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * Makefile.in (OBS): Add hostio.o.
13433 (hostio.o): New rule.
13434 * server.h (handle_vFile): Declare.
13435 * hostio.c: New file.
13436 * server.c (handle_v_requests): Take packet_len and new_packet_len
13437 for binary packets. Call handle_vFile.
13438 (main): Update call to handle_v_requests.
13439
f9387fc3
DJ
134402007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13441
13442 * linux-low.c: Include <sched.h>.
13443
51c2684e
DJ
134442007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13445
13446 * linux-low.c (linux_tracefork_grandchild): New.
13447 (linux_tracefork_child): Use clone.
13448 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13449
75f83163
JB
134502007-10-31 Joel Brobecker <brobecker@adacore.com>
13451
13452 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13453
da5898ce
DJ
134542007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13455
13456 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13457
24a09b5f
DJ
134582007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13459
13460 * inferiors.c (change_inferior_id): Delete.
13461 (add_pid_to_list, pull_pid_from_list): New.
13462 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13463 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13464 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13465 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13466 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13467 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13468 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13469 (using_threads): Always set to 1.
13470 (handle_extended_wait): New.
13471 (add_process): Do not set TID.
13472 (linux_create_inferior): Set must_set_ptrace_flags.
13473 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13474 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13475 (linux_thread_alive): Rename TID argument to LWPID.
13476 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13477 (linux_wait_for_event): Do not use TID or check using_threads. Update
13478 call to dead_thread_notify. Call handle_extended_wait.
13479 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13480 (send_sigstop): Delete sigstop_sent.
13481 (wait_for_sigstop): Avoid TID.
13482 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13483 (linux_test_for_tracefork): New.
13484 (linux_lookup_signals): Use thread_db_active and
13485 linux_supports_tracefork_flag.
13486 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13487 * linux-low.h (get_process_thread): Avoid TID.
13488 (struct process_ifo): Move thread_known and tid to the end. Remove
13489 sigstop_sent.
13490 (linux_attach_lwp, thread_db_init): Update prototypes.
13491 * server.h (change_inferior_id): Delete prototype.
13492 (add_pid_to_list, pull_pid_from_list): New prototypes.
13493 * thread-db.c (thread_db_use_events): New.
13494 (find_first_thread): Rename to...
13495 (find_one_thread): ...this. Update callers and messages. Do not
13496 call fatal. Check thread_db_use_events. Do not call
13497 change_inferior_id or new_thread_notify.
13498 (maybe_attach_thread): Update. Do not call new_thread_notify.
13499 (thread_db_init): Set thread_db_use_events. Check use_events.
13500 * utils.c (fatal, warning): Correct message prefix.
13501
30ed0a8f
DJ
135022007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13503
13504 * Makefile.in (clean): Remove new files.
13505 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13506 (powerpc-64.o, powerpc-64.c): New rules.
13507 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13508 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13509 with SPE.
13510 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13511 SPE targets.
13512 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13513 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13514 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13515 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13516 (target_regsets): Add AltiVec and SPE register sets.
13517 * configure.ac: Check for AltiVec and SPE.
13518 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13519 (ppc_fill_vrregset, ppc_store_vrregset): New.
13520 (target_regsets): Add AltiVec register set.
13521 * configure: Regenerated.
13522
fd462a61
DJ
135232007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13524
13525 * linux-low.c (O_LARGEFILE): Define.
13526 (linux_read_memory): Use /proc/PID/mem.
13527 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13528 * configure, config.in: Regenerated.
13529
69f223ed
DJ
135302007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13531
13532 * linux-low.c (linux_wait_for_event): Do not pass signals while
13533 single-stepping.
13534
aec18585
PA
135352007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13536
13537 * win32-low.c (create_process): New.
13538 (win32_create_inferior): Use create_process instead of
13539 CreateProcess. If create_process failed retry appending an ".exe"
13540 suffix. Store the GetLastError result immediatelly after
13541 create_process calls and use it on the call to error.
13542
34d86ddd
PA
135432007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13544
13545 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13546
5a0e3bd0
JB
135472007-08-23 Joel Brobecker <brobecker@adacore.com>
13548
13549 * configure.ac: Switch license to GPLv3.
13550
f88c79e6
MS
135512007-08-01 Michael Snyder <msnyder@access-company.com>
13552
13553 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13554
6b3d9b83
PA
135552007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13556
13557 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13558 typedef.
13559 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13560 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13561 CloseToolhelp32Snapshot.
13562 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13563 CloseToolhelp32Snapshot.
13564
c588c53c
MS
135652007-07-27 Michael Snyder <michael.snyder@access-company.com>
13566
13567 * server.c (main): Check for inferior exit before main loop.
13568
aa0403d9
PA
135692007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13570
13571 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13572 instead of on tmp_desc.
13573
255e7678
DJ
135742007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13575 Daniel Jacobowitz <dan@codesourcery.com>
13576
13577 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13578 (add_thread): Minor cleanups.
13579 (clear_inferiors): Move lower in the file. Clear the DLL
13580 list.
13581 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13582 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13583 (xml_escape_text): New.
13584 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13585 for qSupported.
13586 (handle_v_cont): Report errors.
13587 (gdbserver_version): Update.
13588 (main): Correct size of own_buf. Do not report initial DLL events.
13589 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13590 (unloaded_dll, xml_escape_text): New.
13591 * win32-low.c (enum target_waitkind): Update comments.
13592 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13593 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13594 (win32_EnumProcessModules, win32_GetModuleInformation)
13595 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13596 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13597 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13598 (win32_Module32First, win32_Module32Next, load_toolhelp)
13599 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13600 (get_child_debug_event): Handle DLL events.
13601 (win32_wait): Likewise.
13602
0d37add9
DJ
136032007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13604
13605 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13606 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13607
45e2715e
PA
136082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13609
13610 * win32-low.c (handle_output_debug_string): Ignore event if not
13611 waiting.
13612
c5674cf1
PA
136132007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13614
13615 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13616
2bbe3cc1
DJ
136172007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13620
ae13219e
DJ
136212007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13622
13623 * inferiors.c (change_inferior_id): Add comment.
13624 * linux-low.c (check_removed_breakpoint): Add an early
13625 prototype. Improve debug output.
13626 (linux_attach): Doc update.
13627 (linux_detach_one_process, linux_detach): Clean up before releasing
13628 each process.
13629 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13630 * linux-low.h (struct process_info): Doc improvement.
13631 * mem-break.c (delete_all_breakpoints): New.
13632 * mem-break.h (delete_all_breakpoints): New prototype.
13633 * thread-db.c (find_first_thread): New.
13634 (thread_db_create_event): Call it instead of
13635 thread_db_find_new_threads. Clean up unused variables.
13636 (maybe_attach_thread): Remove first thread handling.
13637 (thread_db_find_new_threads): Use find_first_thread.
13638 (thread_db_get_tls_address): Likewise.
13639
4105de34
DJ
136402007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * thread-db.c (thread_db_find_new_threads): Add prototype.
13643 (thread_db_create_event): Check for the main thread before adding
13644 a new thread.
13645 (maybe_attach_thread): Only enable event reporting if TID == 0.
13646 (thread_db_get_tls_address): Check for new threads.
13647
2b876972
DJ
136482007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13649
13650 * linux-low.c (linux_create_inferior): Try execv before execvp.
13651 * spu-low.c (spu_create_inferior): Likewise.
13652
7a245884
DJ
136532007-06-13 Mike Frysinger <vapier@gentoo.org>
13654
13655 * linux-low.c (linux_create_inferior): Change execv to execvp.
13656 * spu-low.c (spu_create_inferior): Likewies.
13657
117ce543
DJ
136582007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * Makefile.in (clean): Clean new files instead of deleted ones.
13661 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13662 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13663 rules.
13664 * configure.srv: Specify XML files and new regformats for MIPS and
13665 MIPS64 GNU/Linux.
13666 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13667 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13668 an entry for the restart register.
13669 (mips_cannot_fetch_register, mips_cannot_store_register)
13670 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13671 register names to match the XML descriptions.
13672 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13673 restart register instead of $0.
13674
0e7f50da
UW
136752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13676 Markus Deuling <deuling@de.ibm.com>
13677
13678 * remote-utils.c (decode_xfer_write): New function.
13679 * server.h (decode_xfer_write): Add prototype.
13680 * server.c (handle_query): Add PACKET_LEN argument. Support
13681 qXfer:spu:read and qXfer:spu:write packets.
13682 (main): Pass packet_len to handle_query.
13683 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13684 * target.h (target_ops): Add qxfer_spu.
13685
374c1d38
UW
136862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13687
13688 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13689 accessing non-seekable spufs files.
13690
bb63802a
UW
136912007-05-16 Markus Deuling <deuling@de.ibm.com>
13692
889bf7c5 13693 * server.c (handle_query): Add reply for qC packet.
bb63802a 13694
7390519e
PA
136952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13696 Leo Zayas <lerele@champenstudios@com>
13697
13698 * server.h (check_remote_input_interrupt_request): New function.
13699 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13700 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13701 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13702 (check_remote_input_interrupt_request): New function.
13703 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13704 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13705 winapi_GenerateConsoleCtrlEvent): New typedefs.
13706 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13707 to 250 ms.
13708 (win32_wait): Check for remote interrupt request
13709 with check_remote_input_interrupt_request.
13710 (win32_request_interrupt): New function.
13711 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13712
34b34921
PA
137132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13714
13715 * win32-low.c (debug_registers_changed,
13716 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13717 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13718 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13719 (thread_rec): Get context using the low target.
13720 (child_add_thread): Call thread_added on the low target,
13721 which does the same thing.
13722 (regptr): Delete.
13723 (do_initial_child_stuff): Remove debug registers references.
13724 Set context using the low target. Resume threads after
13725 setting the contexts.
13726 (child_continue): Remove dead variable. Remove debug
13727 registers references.
13728 (child_fetch_inferior_registers): Go through the low target.
13729 (do_child_store_inferior_registers): Remove.
13730 (child_store_inferior_registers): Go through the low target.
13731 (win32_resume): Remove debug registers references.
13732 Set context using the low target.
13733 (handle_exception): Change return type to void. Don't record
13734 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13735 first chance exception.
889bf7c5 13736 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13737 goto loop. Always return after waiting for debug event.
13738 (win32_wait): Convert to switch statement. Handle spurious
13739 events.
13740
13741 * win32-i386-low.c (debug_registers_changed,
13742 debug_registers_used): New.
13743 (initial_stuff): Rename to ...
13744 (i386_initial_stuff): ... this. Clear debug registers
13745 state variables.
13746 (store_debug_registers): Delete.
13747 (i386_get_thread_context): New.
13748 (load_debug_registers): Delete.
13749 (i386_set_thread_context): New.
13750 (i386_thread_added): New.
13751 (single_step): Rename to ...
13752 (i386_single_step): ... this.
13753 (do_fetch_inferior_registers): Rename to ...
13754 (i386_fetch_inferior_register): ... this.
13755 (i386_store_inferior_register): New.
13756 (the_low_target): Adapt to new interface.
13757
13758 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13759 (arm_get_thread_context): New.
13760 (arm_set_thread_context): New.
13761 (regptr): New.
13762 (do_fetch_inferior_registers): Rename to ...
13763 (arm_fetch_inferior_register): ... this.
13764 (arm_store_inferior_register): New.
13765 (arm_wince_breakpoint): Reimplement as unsigned long.
13766 (arm_wince_breakpoint_len): Define.
13767 (the_low_target): Adapt to new interface.
13768
13769 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13770 load_debug_registers. Add get_thread_context, set_thread_context,
13771 thread_added and store_inferior_register. Rename
13772 fetch_inferior_registers to fetch_inferior_register.
13773 (regptr): Remove declaration.
13774
dd6953e1
PA
137752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13776
13777 * linux-low.c (linux_detach): Change return type to int. Return 0.
13778 * spu-low.c (spu_detach): Likewise.
13779
444d6139
PA
137802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13781
13782 * target.h (target_ops): Change return type of detach to int.
13783 Add join.
13784 (join_inferior): New.
13785 * server.c (main): Don't skip detach support on mingw32.
13786 If the inferior doesn't support detaching return error.
13787 Call join_inferior instead of using waitpid.
13788 * linux-low.c (linux_join): New.
13789 (linux_target_op): Add linux_join.
13790 * spu-low.c (spu_join): New.
13791 (spu_target_ops): Add spu_join.
13792 * win32-low.c (win32_detach): Adapt to new interface.
13793 Reopen current_process_handle before detaching. Issue a child
13794 resume before detaching.
13795 (win32_join): New.
13796 (win32_target_op): Add win32_join.
13797
1d5315fe
PA
137982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13799
13800 * win32-low.c (win32-attach): Fix return value.
13801 * target.h (target_ops): Describe ATTACH return values.
13802
bf914831
PA
138032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13804
13805 * win32-low.c (GETPROCADDRESS): Define.
13806 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13807 (winapi_DebugSetProcessKillOnExit): Likewise.
13808 (win32_create_inferior): Force usage of ansi CreateProcessA.
13809 (win32_attach): Use GETPROCADDRESS.
13810 (win32_detach): Likewise.
13811
f72f3e60
PA
138122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13813
13814 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13815
ed50f18f
PA
138162007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13817
13818 * win32-low.c: Commit leftover changes from 2007-03-29.
13819
0c2ead7e
DJ
138202007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13821
13822 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13823 fields short instead of int. Add explicit padding.
13824 (i387_cache_to_fsave): Remove unnecessary casts.
13825 (i387_fsave_to_cache): Doc fix.
13826 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13827
73725ff3
DJ
138282007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13831 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13832
d99f33d8
PA
138332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13834
13835 * configure.srv (arm*-*-mingw32ce*): Move near the other
13836 arm targets.
13837
68070c10
PA
138382007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13839
2482afc6 13840 * configure.ac: Add errno checking.
68070c10
PA
13841 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13842 sys/file.h and malloc.h.
13843 (AC_CHECK_DECLS): Add perror.
13844 (srv_mingwce): Handle.
2482afc6 13845 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13846 win32-i386-low.o to srv_tgtobj.
13847 (i[34567]86-*-mingw*): Likewise.
13848 (arm*-*-mingw32ce*): Add case.
13849 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13850 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13851 [__MINGW32CE__] (strerror): New function.
13852 [__MINGW32CE__] (errno): Define to GetLastError.
13853 [__MINGW32CE__] (COUNTOF): New macro.
13854 (remote_open): Remove extra close call.
13855 * mem-break.c (delete_breakpoint_at): New function.
13856 * mem-break.h (delete_breakpoint_at): Declare.
13857 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13858 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13859 [USE_WIN32API] (read, write): Add char* casts.
13860 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13861 * server.h: Include wincecompat.h on Windows CE.
13862 [HAVE_ERRNO_H]: Check.
13863 (perror): Declare if not declared.
13864 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13865 (perror_with_name): Remove errno declaration.
13866 * wincecompat.h: New.
13867 * wincecompat.c: New.
13868 * win32-low.h: New.
13869 * win32-arm-low.c: New.
13870 * win32-i386-low.c: New.
13871 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13872 (OUTMSG2): Make it safe.
13873 (_T): New macro.
13874 (COUNTOF): New macro.
13875 (NUM_REGS): Get it from the low target.
13876 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13877 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13878 (thread_rec): Let low target handle debug registers.
13879 (child_add_thread): Likewise.
13880 (child_init_thread_list): Likewise.
13881 (continue_one_thread): Likewise.
13882 (regptr): New.
13883 (do_child_fetch_inferior_registers): Move to ...
13884 * win32-i386-low.c: ... here, and rename to ...
13885 (do_fetch_inferior_registers): ... this.
889bf7c5 13886 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13887 Go through the low target.
13888 (do_child_store_inferior_registers): Use regptr.
13889 (strwinerror): New function.
13890 (win32_create_inferior): Handle Windows CE.
13891 Use strwinerror instead of strerror on Windows error
13892 codes. Add program to the error output.
13893 Don't close the main thread handle on Windows CE.
13894 (win32_attach): Use coredll.dll on Windows CE.
13895 (win32_kill): Close current process and current
13896 thread handles.
13897 (win32_detach): Use coredll.dll on Windows CE.
13898 (win32_resume): Let low target handle debug registers, and
13899 step request.
13900 (handle_exception): Add/Remove initial breakpoint. Avoid
13901 non-existant WSTOPSIG on Windows CE.
13902 (win32_read_inferior_memory): Cast to remove warning.
13903 (win32_arch_string): Go through the low target.
13904 (initialize_low): Call set_breakpoint_data with the low
13905 target's breakpoint.
13906 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13907 FOP_REGNUM, mappings): Move to ...
13908 * win32-i386-low.c: ... here.
13909 * win32-low.c (win32_thread_info): Move to ...
13910 * win32-low.h: ... here.
13911 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13912 win32-arm-low.c and wincecompat.c.
13913 (all:): Add $EXEEXT.
13914 (install-only:): Likewise.
13915 (gdbserver:): Likewise.
13916 (gdbreplay:): Likewise.
13917 * config.in: Regenerate.
13918 * configure: Regenerate.
13919
41093d81
PA
139202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13921
13922 * win32-low.c: Rename typedef thread_info to
13923 win32_thread_info throughout.
13924
544afa54
PA
139252007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13926
13927 * win32-i386-low.c: Rename to ...
13928 * win32-low.c: ... this.
13929 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13930 * Makefile.in: Likewise.
13931
bce7165d
PA
139322007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13933
13934 * remote-utils.c (monitor_output): Constify msg parameter.
13935 * server.h (monitor_output): Likewise.
13936 * win32-i386-low.c (handle_output_debug_string): New.
13937 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13938 handle_output_debug_string.
13939 (get_child_debug_event): Likewise.
13940
506c7aa0
DJ
139412007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13942
13943 * server.c (main): Correct strtoul check.
13944
42c81e2a
DJ
139452007-03-27 Jon Ringle <jon@ringle.org>
13946
13947 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13948
9453113a
DJ
139492007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13950
13951 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13952
64a69107
DJ
139532007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * terminal.h: Check HAVE_SGTTY_H.
13956
139572007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13958
13959 * remote-utils.c (remote_open): Print out the assigned port number.
13960
c74d0ad8
DJ
139612007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * remote-utils.c (monitor_output): New function.
13964 * server.c (debug_threads): Define here.
13965 (monitor_show_help): New function.
13966 (handle_query): Handle qRcmd.
13967 (main): Do not handle 'd' packet.
13968 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13969 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13970 of debug_threads.
13971
de7c3b4a
PA
139722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13973
13974 * Makefile.in (EXEEXT): New.
13975 (clean): Use $(EXEEXT).
13976
ef57601b
PA
139772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13978
13979 * target.h (target_ops): Rename send_signal to request_interrupt,
13980 and remove enum target_signal parameter.
13981 * linux-low.c (linux_request_interrupt): Rename from
13982 linux_send_signal, and always send SIGINT.
13983 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13984 and always send SIGINT.
13985 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13986 of send_signal.
13987 (input_interrupt): Likewise.
13988
820f2bda
PA
139892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13990
13991 * server.c (get_features_xml): Check if target implemented
13992 arch_string.
13993 * win32-i386-low.c (win32_arch_string): New.
13994 (win32_target_ops): Add win32_arch_string as arch_string member.
13995
ab39bf24
UW
139962007-02-22 Markus Deuling <deuling@de.ibm.com>
13997
13998 * spu-low.c (spu_arch_string): New.
13999 (spu_target_ops): Add spu_arch_string.
14000
61ff6e04
DJ
140012007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14002
14003 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14004 * configure.ac: Do not check for terminal.h.
14005 * configure, config.in: Regenerated.
14006
fb1e4ffc
DJ
140072007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14008
14009 * Makefile.in (OBS): Add $(XML_BUILTIN).
14010 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14011 (clean): Update.
14012 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14013 (arm-with-iwmmxt.c): New.
14014 * config.in, configure: Regenerate.
14015 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14016 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14017 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14018 (arm*-*-linux*): Add iWMMXt and regset support.
14019 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14020 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14021 (arm_store_wmmxregset, target_regsets): New.
14022 * server.c (get_features_xml): Take annex argument. Check builtin
14023 XML documents.
14024 (handle_query): Handle multiple annexes.
14025
0f48aa01
DJ
140262007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14027
14028 * remote-utils.c [USE_WIN32API] (read, write): Define.
14029 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14030 write.
14031
23181151
DJ
140322007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14033
14034 * linux-i386-low.c (the_low_target): Set arch_string.
14035 * linux-x86-64-low.c (the_low_target): Likewise.
14036 * linux-low.c (linux_arch_string): New.
14037 (linux_target_ops): Add it.
14038 * linux-low.h (struct linux_target_ops): Add arch_string.
14039 * server.c (write_qxfer_response): Use const void * for DATA.
14040 (get_features_xml): New.
14041 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14042 * target.h (struct target_ops): Add arch_string method.
14043
9d606399
DJ
140442007-01-03 Denis Pilat <denis.pilat@st.com>
14045 Daniel Jacobowitz <dan@codesourcery.com>
14046
14047 * linux-low.c (linux_kill): Handle being called with no threads.
14048 * win32-i386-low.c (win32_kill): Likewise.
14049 (get_child_debug_event): Clear current_process_handle.
14050
140512006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14052 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * remote-utils.c (remote_open): Check the type of specified
14055 serial port devices before opening them.
14056 * server.c (main): Kill the inferior if an error occurs during
14057 the first remote_open.
14058
a5e13d24
DJ
140592006-12-05 Markus Deuling <deuling@de.ibm.com>
14060
14061 * README: Update supported targets.
14062
186947f7
DJ
140632006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14064
14065 * Makefile.in (clean): Remove reg-mips64.c.
14066 (reg-mips64.c, reg-mips64.o): New rules.
14067 * configure.srv: Handle mips64. Include regset support for mips.
14068 * linux-mips-low.c (union mips_register): New.
14069 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14070 (mips_breakpoint, mips_breakpoint_at): Use int.
14071 (mips_collect_register, mips_supply_register)
14072 (mips_collect_register_32bit, mips_supply_register_32bit)
14073 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14074 (mips_store_fpregset, target_regsets): New.
14075 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14076
a13e2c95
UW
140772006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14078
14079 * configure.srv: Add target "spu*-*-*".
14080 * Makefile.in (clean): Remove reg-spu.c.
14081 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14082 * spu-low.c: New file.
14083
cb7283db
DJ
140842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14085
14086 * configure.ac: Correct td_thr_tls_get_addr test.
14087 * configure: Regenerated.
14088
89be2091
DJ
140892006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14090
14091 * linux-low.c (linux_wait_for_event): Reformat. Use the
14092 pass_signals array.
14093 * remote-utils.c (decode_address_to_semicolon): New.
14094 * server.c (pass_signals, handle_general_set): New.
14095 (handle_query): Mention QPassSignals for qSupported.
14096 (main): Call handle_general_set.
14097 * server.h (pass_signals, decode_address_to_semicolon): New.
14098
000ef4f0
DJ
140992006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14100
14101 * server.c (handle_query): Correct error handling for read_auxv.
14102
b7149293
UW
141032005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14104
14105 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14106 and srv_linux_thread_db to yes.
14107 * linux-s390-low.c (s390_fill_gregset): New function.
14108 (target_regsets): Define data structure.
14109
dae5f5cf
DJ
141102006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14111
14112 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14113 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14114 * config.in, configure: Regenerated.
14115 * inferiors.c (gdb_id_to_thread): New function.
14116 (gdb_id_to_thread_id): Use it.
14117 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14118 * linux-low.h (struct process_info): Add th member.
14119 (thread_db_get_tls_address): New prototype.
14120 * remote-utils.c (decode_address): Make non-static.
14121 * server.c (handle_query): Handle qGetTLSAddr.
14122 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14123 * target.h (struct target_ops): Add get_tls_address.
14124 * thread-db.c (maybe_attach_thread): Save the thread handle.
14125 (thread_db_get_tls_address): New.
14126
32ca6d61
DJ
141272006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14130 (linux_resume_one_process): Take a siginfo_t *. Update all
14131 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14132 (struct pending_signals): Add a siginfo_t.
14133 (linux_wait_for_process): Always set last_status.
14134 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14135 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14136 * linux-low.h (struct process_info): Add last_status.
14137
5ffff7c1
DJ
141382006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14139
14140 * remote-utils.c (try_rle): New function.
14141 (putpkt_binary): Use it.
14142
8695c747
DJ
141432006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14146 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14147 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14148 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14149 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14150 point registers.
14151
290fadea
RS
141522006-08-08 Richard Sandiford <richard@codesourcery.com>
14153
14154 * server.c (terminal_fd): New variable.
14155 (old_foreground_pgrp): Likewise.
14156 (restore_old_foreground_pgrp): New function.
14157 (start_inferior): Record the terminal file descriptor in terminal_fd
14158 and its original foreground group in old_foreground_pgrp. Register
14159 restore_old_foreground_pgrp with atexit().
14160
9f2e1e63
DJ
141612006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * server.c (handle_query): Correct qPart to qXfer.
14164
b80864fb
DJ
141652006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * configure.ac: Check for more headers which are missing on
14168 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14169 * configure.srv: Add Cygwin and mingw32.
14170 * remote-utils.c: Don't include headers unconditionally which
14171 are missing on mingw32. Include <winsock.h> for mingw32.
14172 (remote_open): Adjust for mingw32 support. Flush
14173 standard error after writing to it.
14174 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14175 (unblock_async_io, enable_async_io, disable_async_io)
14176 (readchar, getpkt): Update for Winsock support.
14177 (prepare_resume_reply): Expect a protocol signal number.
14178 * server.c: Disable <sys/wait.h> on mingw32.
14179 (start_inferior): Adjust for mingw32 support. Flush
14180 standard error after writing to it.
14181 (attach_inferior): Likewise. Use protocol signal
14182 numbers.
14183 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14184 and names.
14185 * win32-i386-low.c: New file.
14186 * Makefile.in (XM_CLIBS): Set.
14187 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14188 (win32-i386-low.o): New dependency rule.
14189 * linux-low.c (linux_wait): Use target signal numbers.
14190 * target.h (struct target_ops): Doc fix.
14191 * server.h (target_signal_to_name): New prototype.
14192 * gdbreplay.c: Don't include headers unconditionally which
14193 are missing on mingw32. Include <winsock.h> for mingw32.
14194 (remote_close, remote_open): Adjust for Winsock support.
14195 * configure, config.in: Regenerated.
14196
0876f84a
DJ
141972006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * server.c (decode_xfer_read, write_qxfer_response): New.
14200 (handle_query): Take a packet length argument. Handle
14201 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14202 the qSupported response.
14203 (main): Update call to handle_query.
14204
01f9e8fa
DJ
142052006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14206
14207 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14208 (putpkt_binary): Renamed from putpkt and adjusted for binary
14209 data.
14210 (putpkt): New wrapper for putpkt_binary.
14211 (readchar): Don't mask off the high bit.
14212 (decode_X_packet): New function.
14213 * server.c (main): Call putpkt_binary if a handler sets the packet
14214 length. Save the length of the incoming packet. Handle 'X'.
14215 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14216
be2a5f71
DJ
142172006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * server.c (handle_query): Handle qSupported.
14220
ea025f5f
DJ
142212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * remote-utils.c (all_symbols_looked_up): New variable.
14224 (look_up_one_symbol): Check it.
14225 * server.h (look_up_one_symbol): New declaration.
14226 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14227
9308fc88
DJ
142282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14229
14230 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14231 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14232 (PTRACE_GET_THREAD_AREA): Define.
14233 (ps_get_thread_area): New function.
14234
52fb6437
NS
142352006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14236
14237 * configure.srv (m68k*-*-uclinux*): New target.
14238 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14239 (linux_resume_one_process): Remove extraneous cast.
14240 (linux_read_offsets): New.
14241 (linux_target_op): Add linux_read_offsets on mmuless systems.
14242 * server.c (handle_query): Add qOffsets logic.
14243 * target.h (struct target_ops): Add read_offsets.
14244
21b0f40c
DJ
142452006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14246
14247 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14248 (PTRACE_GET_THREAD_AREA): Define.
14249 (ps_get_thread_area): New function.
14250 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14251 (linux-x86-64-low.o): Update.
14252
0050a760
DJ
142532006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * configure.ac: Remove checks for prfpregset_t.
14256 * gdb_proc_service.h: New file.
14257 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14258 new "gdb_proc_service.h".
14259 * proc-service.c: Likewise.
14260 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14261 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14262 * Makefile.in (gdb_proc_service_h): Updated.
14263 * configure, config.in: Regenerated.
14264
b92a518e
DJ
142652006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14266
14267 * remote-utils.c (prepare_resume_reply): Move declaration
14268 of gdb_id_from_wait to the top of the block.
14269
545587ee
DJ
142702006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14271
14272 * linux-low.c (regsets_store_inferior_registers): Read the regset
14273 from the target before filling it.
14274
9db87ebd
DJ
142752006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14276
14277 * server.c (attach_inferior): Return SIGTRAP for a successful
14278 attach.
14279
dd24457d
DJ
142802006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14281
14282 * Makefile.in (OBS): Add version.o.
14283 (STAGESTUFF): Delete.
14284 (version.o): Add dependencies.
14285 (version.c): Replace rule.
14286 (clean): Remove version.c.
14287 * server.c (gdbserver_version): New.
14288 (gdbserver_usage): Use printf.
14289 (main): Handle --version and --help.
14290 * server.h (version, host_name): Add declarations.
14291
6f0f660e
EZ
142922005-12-23 Eli Zaretskii <eliz@gnu.org>
14293
889bf7c5
PA
14294 * linux-arm-low.c:
14295 * linux-arm-low.c:
14296 * inferiors.c:
14297 * i387-fp.h:
14298 * i387-fp.c:
14299 * gdbreplay.c:
14300 * regcache.c:
14301 * proc-service.c:
14302 * mem-break.h:
14303 * mem-break.c:
14304 * linux-x86-64-low.c:
14305 * linux-sh-low.c:
14306 * linux-s390-low.c:
14307 * linux-ppc64-low.c:
14308 * linux-ppc-low.c:
14309 * linux-mips-low.c:
14310 * linux-m68k-low.c:
14311 * linux-m32r-low.c:
14312 * linux-low.h:
14313 * linux-low.c:
14314 * linux-ia64-low.c:
14315 * linux-i386-low.c:
14316 * linux-crisv32-low.c:
14317 * thread-db.c:
14318 * terminal.h:
14319 * target.h:
14320 * target.c:
14321 * server.h:
14322 * server.c:
14323 * remote-utils.c:
14324 * regcache.h:
14325 * utils.c:
14326 * Makefile.in:
14327 * configure.ac:
6f0f660e
EZ
14328 * gdbserver.1: Add (C) after Copyright. Update the FSF
14329 address.
14330
9d1fb177
DJ
143312005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14334 (arm_breakpoint_at): Recognize both breakpoints.
14335 (the_low_target): Use the correct breakpoint instruction.
14336
011a70c2
DJ
143372005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14338
14339 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14340 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14341 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14342 (the_low_target): Update.
14343
7fb85e41
AS
143442005-10-25 Andreas Schwab <schwab@suse.de>
14345
14346 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14347
14348 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14349 (ia64_num_regs): Reduce to 462.
14350
3db0444b
DJ
143512005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * acinclude.m4: Correct quoting.
14354 * aclocal.m4: Regenerated.
14355
14356 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14357 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14358 (thread_db_init): Call thread_db_err_str.
14359 * configure.ac: Check for TD_VERSION.
14360 * config.in, configure: Regenerated.
14361
bee0189a
DJ
143622005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14363
14364 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14365
e9d25b98
DJ
143662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14367
14368 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14369 is not available. Define HAVE_PTRACE_GETREGS if it is.
14370 * config.in, configure: Regenerated.
14371 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14372 * linux-i386-low.c, linux-m68k-low.c: Update to use
14373 HAVE_PTRACE_GETREGS.
14374 * linux-low.c (regsets_fetch_inferior_registers)
14375 (regsets_store_inferior_registers): Only return 0 if we processed
14376 GENERAL_REGS.
14377 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14378 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14379
a06660f7
DJ
143802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * inferiors.c (struct thread_info): Add gdb_id.
14383 (add_thread): Add gdb_id argument.
14384 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14385 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14386 calls to add_thread.
14387 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14388 * server.c (handle_query): Use thread_to_gdb_id.
14389 (handle_v_cont, main): Use gdb_id_to_thread_id.
14390 * server.h (add_thread): Update prototype.
14391 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14392 prototypes.
14393
5a1f5858
DJ
143942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14395
14396 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14397 left-padded registers.
14398 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14399 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14400
e122f1f5
SE
144012005-07-01 Steve Ellcey <sje@cup.hp.com>
14402
14403 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14404 * configure: Regenerate.
14405 * config.in: Regenerate.
14406 * server.h (NEED_DECLARATION_STRERROR):
14407 Replace with !HAVE_DECL_STRERROR.
14408
d592fa2f
DJ
144092005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * linux-low.c (linux_wait, linux_send_signal): Don't test
14412 an unsigned long variable for > 0 if it could be MAX_ULONG.
14413 * server.c (myresume): Likewise.
14414 * target.c (set_desired_inferior): Likewise.
14415
ccbd4912
MK
144162005-06-13 Mark Kettenis <kettenis@gnu.org>
14417
14418 * configure.ac: Simplify and improve check for socklen_t.
14419 * configure, config.in: Regenerate.
14420
f450004a
DJ
144212005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * acconfig.h: Remove.
14424 * configure.ac: Add a test for socklen_t. Use three-argument
14425 AC_DEFINE throughout.
14426 * config.in: Regenerated using autoheader 2.59.
14427 * configure: Regenerated.
14428
14429 * gdbreplay.c (socklen_t): Provide a default.
14430 (remote_open): Use socklen_t.
14431 * remote-utils.c (socklen_t): Provide a default.
14432 (remote_open): Use socklen_t.
14433 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14434 unsigned char.
14435
14436 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14437 char for buffers.
14438 * linux-low.c (linux_read_memory, linux_write_memory)
14439 (linux_read_auxv): Likewise.
14440 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14441 (check_mem_write): Likewise.
14442 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14443 Likewise.
14444 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14445 (registers_from_string, register_data): Likewise.
14446 * server.c (handle_query, main): Likewise.
14447 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14448 (decode_M_packet): Likewise.
14449 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14450 * target.h (struct target_ops): Update read_memory, write_memory,
14451 and read_auxv.
14452 (read_inferior_memory, write_inferior_memory): Update.
14453 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14454 to unsigned char *.
14455 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14456 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14457 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14458 linux-s390-low.c, linux-sh-low.c: Update for changes in
14459 read_inferior_memory and the_low_target->breakpoint.
14460
eee84df1
DJ
144612005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14462
14463 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14464 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14465 * configure.srv: Add powerpc64-*-linux*.
14466 * linux-ppc64-low.c: New file.
14467
45b134e5
OF
144682005-05-23 Orjan Friberg <orjanf@axis.com>
14469
14470 * linux-cris-low.c: New file with support for CRIS.
14471 * linux-crisv32-low.c: Ditto for CRISv32.
14472 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14473 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14474 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14475 reg-crisv32.o, and reg-crisv32.c to make rules.
14476 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14477 recognized targets.
14478
48d93c75
UW
144792005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14480
14481 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14482 of sizeof (PTRACE_XFER_TYPE).
14483 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14484
e013ee27
OF
144852005-05-12 Orjan Friberg <orjanf@axis.com>
14486
889bf7c5 14487 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14488 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14489 pointers for hardware watchpoint support.
14490 * linux-low.h (struct linux_target_ops): Ditto.
14491 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14492 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14493 to linux_target_ops.
14494 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14495 reply packet.
14496 * server.c (main): Recognize 'Z' and 'z' packets.
14497
b0ded00b
UW
144982005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14499
14500 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14501 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14502 (the_low_target): Add new members.
14503
8643e2ad
DJ
145042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * proc-service.c (ps_lgetregs): Search all_processes instead of
14507 all_threads.
14508
fc620387
DJ
145092005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * server.c (start_inferior): Change return type to int.
14512 (attach_inferior): Change sigptr to int *.
14513 (handle_v_cont, handle_v_requests): Change signal to int *.
14514 (main): Change signal to int.
14515
145162005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14517
14518 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14519 * configure.srv: Add m32r*-*-linux*.
14520 * linux-m32r-low.c: New file.
14521
e0e76420
DJ
145222005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14523
14524 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14525
a1928bad
DJ
145262005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14527
14528 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14529 Take unsigned long arguments for PIDs.
14530 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14531 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14532 (wait_for_sigstop, linux_resume_one_process)
14533 (regsets_fetch_inferior_registers, linux_send_signal)
14534 (linux_read_auxv): Likewise. Update the types of variables holding
14535 PIDs. Update format string specifiers.
14536 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14537 * remote-utils.c (prepare_resume_reply): Likewise.
14538 * server.c (cont_thread, general_thread, step_thread)
14539 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14540 unsigned long.
14541 (handle_query): Update format specifiers.
14542 (handle_v_cont, main): Use strtoul for thread IDs.
14543 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14544 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14545 (general_thread, step_thread, thread_from_wait)
14546 (old_thread_from_wait): Update.
14547 * target.h (struct thread_resume): Use unsigned long for THREAD.
14548 (struct target_ops): Use unsigned long for arguments to attach and
14549 thread_alive.
14550
dcdb98d2
DJ
145512005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * acinclude.m4: Include bfd/bfd.m4 directly.
14554 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14555 <agriffis@toolchain.org>.
14556 * aclocal.m4, configure: Regenerated.
14557
bec39cab
AC
145582005-01-07 Andrew Cagney <cagney@gnu.org>
14559
14560 * configure.ac: Rename configure.in, require autoconf 2.59.
14561 * configure: Re-generate.
14562
434c4c77
DJ
145632004-12-08 Daniel Jacobowitz <dan@debian.org>
14564
14565 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14566 LIBS when finished.
14567 * aclocal.m4: Regenerated.
14568 * configure: Regenerated.
14569
db1d3e1b
AS
145702004-11-21 Andreas Schwab <schwab@suse.de>
14571
14572 * linux-m68k-low.c (m68k_num_gregs): Define.
14573 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14574 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14575 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14576 (m68k_breakpoint_at): New. Add to the_low_target.
14577
14578 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14579 srv_linux_thread_db to yes.
14580
43360365
JB
145812004-10-20 Joel Brobecker <brobecker@gnat.com>
14582
14583 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14584 (ARCH_SET_FS): Likewise.
14585 (ARCH_GET_FS): Likewise.
14586 (ARCH_GET_GS): Likewise.
14587
fd500816
DJ
145882004-10-16 Daniel Jacobowitz <dan@debian.org>
14589
14590 * linux-i386-low.c (ps_get_thread_area): New.
14591 * linux-x86-64-low.c (ps_get_thread_area): New.
14592 * linux-low.c: Include <sys/syscall.h>.
14593 (linux_kill_one_process): Don't kill the first thread here.
14594 (linux_kill): Kill the first thread here.
14595 (kill_lwp): New function.
14596 (send_sigstop, linux_send_signal): Use it.
14597 * proc-service.c: Clean up #ifdefs.
14598 (fpregset_info): Delete.
14599 (ps_lgetregs): Update and enable implementation.
14600 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14601 implementations.
14602 * remote-utils.c (struct sym_cache, symbol_cache): New.
14603 (input_interrupt): Print a clearer message.
14604 (async_io_enabled): New variable.
14605 (enable_async_io, disable_async_io): Use it. Update comments.
14606 (look_up_one_symbol): Use the symbol cache.
14607 * thread-db.c (thread_db_look_up_symbols): New function.
14608 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14609
f6de3c42
DJ
146102004-10-16 Daniel Jacobowitz <dan@debian.org>
14611
14612 * configure.in: Test for -rdynamic.
14613 * configure: Regenerated.
14614 * Makefile (INTERNAL_LDFLAGS): New.
14615 (gdbserver, gdbreplay): Use it.
14616
2c0fc042
AC
146172004-09-02 Andrew Cagney <cagney@gnu.org>
14618
14619 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14620
075b3282
DJ
146212004-03-23 Daniel Jacobowitz <drow@mvista.com>
14622
14623 * linux-low.c (linux_wait): Clear all_processes list also.
14624
fa6a77dc
DJ
146252004-03-12 Daniel Jacobowitz <drow@mvista.com>
14626
14627 * linux-low.c: Include <errno.h>. Remove extern declaration of
14628 errno.
14629
6d782a97
DJ
146302004-03-12 Daniel Jacobowitz <drow@mvista.com>
14631
14632 * gdbreplay.c, server.h, utils.c: Update copyright years.
14633
3a7fb99b
DJ
146342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14635
14636 * server.c (main): Print child status or termination signal from
14637 variable 'signal', not 'sig'.
14638
c3e735a6
DJ
146392004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14640
14641 * linux-low.c (linux_read_memory): Change return type to
14642 int. Check for and return error from ptrace().
14643 * target.c (read_inferior_memory): Change return type to int. Pass
14644 back return status from the_target->read_memory().
14645 * target.h (struct target_ops): Adapt *read_memory() prototype.
14646 Update comment.
14647 (read_inferior_memory): Adapt prototype.
14648 * server.c (main): Return an error packet if
14649 read_inferior_memory() returns an error.
14650
a59d1c82
DJ
146512004-03-04 Daniel Jacobowitz <drow@mvista.com>
14652
14653 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14654 Unify with other clean targets.
14655
dc3f8883
DJ
146562004-02-29 Daniel Jacobowitz <drow@mvista.com>
14657
14658 * server.c (handle_v_cont): Call set_desired_inferior.
14659
89a208da
DJ
146602004-02-29 Daniel Jacobowitz <drow@mvista.com>
14661
14662 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14663
62ea82f5
DJ
146642004-02-29 Daniel Jacobowitz <drow@mvista.com>
14665
14666 * linux-low.c (linux_wait): Unblock async I/O.
14667 (linux_resume): Block and enable async I/O.
14668 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14669 * server.h (block_async_io, unblock_async_io): Add prototypes.
14670
6910d122
DJ
146712004-02-29 Daniel Jacobowitz <drow@mvista.com>
14672
14673 * remote-utils.c (remote_open): Print a status notice after
14674 opening a TCP port.
14675 * server.c (attach_inferior): Print a status notice after
14676 attaching.
14677
146782004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14679
14680 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14681
c89dc5d4
DJ
146822004-02-26 Daniel Jacobowitz <drow@mvista.com>
14683
14684 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14685 error packet.
14686 * server.c, target.h: Update copyright years.
14687
4b8dad4a
RM
146882004-02-25 Roland McGrath <roland@redhat.com>
14689
14690 * target.h (struct target_ops): New member `read_auxv'.
14691 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14692 * linux-low.c (linux_read_auxv): New function.
14693 (linux_target_ops): Initialize `read_auxv' member to that.
14694
d7446758
JB
146952004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14696
14697 Committed by Jim Blandy <jimb@redhat.com>.
14698
14699 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14700 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14701 instead of GPR_SIZE to distiguish s390 and s390x targets.
14702
5544ad89
DJ
147032004-01-31 Daniel Jacobowitz <drow@mvista.com>
14704
14705 * linux-low.c: Update copyright year.
14706 (check_removed_breakpoint): Clear pending_is_breakpoint.
14707 (linux_set_resume_request, linux_queue_one_thread)
14708 (resume_status_pending_p): New functions.
14709 (linux_continue_one_thread): Use process->resume.
14710 (linux_resume): Only resume threads if there are no pending events.
14711 * linux-low.h (struct process_info): Add resume request
14712 pointer.
14713
2a68b70e
DJ
147142004-01-30 Daniel Jacobowitz <drow@mvista.com>
14715
14716 * regcache.c (new_register_cache): Clear the allocated register
14717 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14718
64386c31
DJ
147192003-10-13 Daniel Jacobowitz <drow@mvista.com>
14720
14721 * linux-low.c (linux_resume): Take a struct thread_resume *
14722 argument.
14723 (linux_wait): Update call.
14724 (resume_ptr): New static variable.
14725 (linux_continue_one_thread): Renamed from
14726 linux_continue_one_process. Use resume_ptr.
14727 (linux_resume): Use linux_continue_one_thread.
14728 * server.c (handle_v_cont, handle_v_requests): New functions.
14729 (myresume): New function.
14730 (main): Handle 'v' case.
14731 * target.h (struct thread_resume): New type.
14732 (struct target_ops): Change argument of "resume" to struct
14733 thread_resume *.
14734 (myresume): Delete macro.
14735
c938e9b0
L
147362003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14737
14738 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14739 (uninstall): Support DESTDIR.
14740
7f313d07
BC
14741Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14742
14743 * configure.srv: Add xscale*linux copy of arm*linux entry.
14744
3b2fc2ea
DJ
147452003-07-24 Daniel Jacobowitz <drow@mvista.com>
14746
14747 * linux-arm-low.c (arm_reinsert_addr): New function.
14748 (the_low_target): Add arm_reinsert_addr.
14749
1c0a559e
MK
147502003-07-08 Mark Kettenis <kettenis@gnu.org>
14751
14752 * mem-break.c: Remove whitespace at end of file.
14753
43d5792c
DJ
147542003-06-28 Daniel Jacobowitz <drow@mvista.com>
14755
14756 * configure.in: Check whether we need to prototype strerror.
14757 * server.h: Optionally prototype strerror.
14758 * gdbreplay.c (perror_with_name): Use strerror.
14759 * linux-low.c (linux_attach_lwp): Use strerror.
14760 * utils.c (perror_with_name): Use strerror.
14761 * config.in, configure: Regenerated.
14762
c8a86edf
DJ
147632003-06-28 Daniel Jacobowitz <drow@mvista.com>
14764
14765 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14766 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14767
73d37363
DJ
147682003-06-20 Daniel Jacobowitz <drow@mvista.com>
14769
14770 * Makefile.in (SFILES): Update.
14771 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14772 low-sun3.c: Remove files.
14773
6ad8ae5c
DJ
147742003-06-17 Daniel Jacobowitz <drow@mvista.com>
14775
14776 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14777 (linux_detach_one_process, linux_detach): New functions.
14778 (linux_target_ops): Add linux_detach.
14779 * server.c (main): Handle 'D' packet.
14780 * target.h (struct target_ops): Add "detach" member.
14781 (detach_inferior): Define.
14782
1581182a
MK
147832003-06-13 Mark Kettenis <kettenis@gnu.org>
14784
14785 From Kelley Cook <kelleycook@wideopenwest.com>:
14786 * configure.srv: Accept i[34567]86 variants.
14787
e5379b03
DJ
147882003-06-05 Daniel Jacobowitz <drow@mvista.com>
14789
14790 * linux-low.c (linux_wait_for_event): Correct comment typos.
14791 (linux_resume_one_process): Call check_removed_breakpoint.
14792 (linux_send_signal): New function.
14793 (linux_target_ops): Add linux_send_signal.
14794 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14795 of kill.
14796 * target.h (struct target_ops): Add send_signal.
14797
2ff29de4
JB
147982003-05-29 Jim Blandy <jimb@redhat.com>
14799
14800 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14801 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14802 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14803 away part of the register's value.
14804
254787d4
DJ
148052003-03-26 Daniel Jacobowitz <drow@mvista.com>
14806
14807 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14808 (linux_wait_for_event, linux_init_signals): Likewise.
14809
94e10508
DJ
148102003-03-17 Daniel Jacobowitz <drow@mvista.com>
14811
14812 * configure.in: Check for stdlib.h.
14813 * configure: Regenerated.
14814 * config.in: Regenerated.
14815
4c0711e0
DJ
148162003-01-04 Andreas Schwab <schwab@suse.de>
14817
14818 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14819
ef66e766
AC
148202003-01-02 Andrew Cagney <ac131313@redhat.com>
14821
14822 * Makefile.in: Remove obsolete code.
14823
a1358604
DJ
148242002-11-20 Daniel Jacobowitz <drow@mvista.com>
14825
14826 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14827 defined(PT_FPR0_HI).
14828
23ce3b1c
DJ
148292002-11-17 Stuart Hughes <seh@zee2.com>
14830
14831 * linux-arm-low.c (arm_num_regs): Increase.
14832 (arm_regmap): Include status register.
14833
148342002-11-17 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * linux-low.c (register_addr): Remove incorrect -1 check.
14837
a9fa9f7d
DJ
148382002-08-29 Daniel Jacobowitz <drow@mvista.com>
14839
14840 * linux-low.c (linux_create_inferior): Call setpgid. Return
14841 the new PID.
14842 (unstopped_p, linux_signal_pid): Remove.
14843 (linux_target_ops): Remove linux_signal_pid.
14844 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14845 global instead of target method.
14846 * target.h (struct target_ops): Remove signal_pid. Update comment
14847 for create_inferior.
14848 * server.c (signal_pid): New variable.
14849 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14850 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14851 (attach_inferior): Set signal_pid.
14852
17574093
DJ
148532002-08-23 Daniel Jacobowitz <drow@mvista.com>
14854
14855 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14856
148572002-08-20 Jim Blandy <jimb@redhat.com>
14858
14859 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14860 default for this.
14861
148622002-08-01 Andrew Cagney <cagney@redhat.com>
14863
14864 * Makefile.in: Make chill references obsolete.
14865
148662002-07-24 Kevin Buettner <kevinb@redhat.com>
14867
14868 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14869 * configure: Regenerate.
14870 * config.in: Regenerate.
14871
148722002-07-09 David O'Brien <obrien@FreeBSD.org>
14873
14874 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14875 (perror_with_name, remote_close, remote_open, expect, play): Static.
14876
148772002-07-04 Michal Ludvig <mludvig@suse.cz>
14878
4b8dad4a 14879 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14880 byte offsets instead of an array of indexes.
14881 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14882
148832002-06-13 Daniel Jacobowitz <drow@mvista.com>
14884
14885 * regcache.c: Add comment.
14886
148872002-06-11 Daniel Jacobowitz <drow@mvista.com>
14888
14889 * thread-db.c: New file.
14890 * proc-service.c: New file.
14891 * acinclude.m4: New file.
14892 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14893 proc-service.o, and thread-db.o.
14894 (linux-low.o): Add USE_THREAD_DB.
14895 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14896 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14897 * aclocal.m4: Regenerated.
14898 * config.in: Regenerated.
14899 * configure: Regenerated.
14900 * configure.in: Check for proc_service.h, sys/procfs.h,
14901 thread_db.h, and linux/elf.h headrs.
14902 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14903 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14904 Check for -lthread_db and thread support.
14905 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14906 PowerPC, and SuperH.
14907 * i387-fp.c: Constify arguments.
14908 * i387-fp.h: Likewise.
14909 * inferiors.c: (struct thread_info): Renamed from
14910 `struct inferior_info'. Remove PID member. Use generic inferior
14911 list header. All uses updated.
14912 (inferiors, signal_pid): Removed.
14913 (all_threads): New variable.
14914 (get_thread): Define.
14915 (add_inferior_to_list): New function.
14916 (for_each_inferior): New function.
14917 (change_inferior_id): New function.
14918 (add_inferior): Removed.
14919 (remove_inferior): New function.
14920 (add_thread): New function.
14921 (free_one_thread): New function.
14922 (remove_thread): New function.
14923 (clear_inferiors): Use for_each_inferior and free_one_thread.
14924 (find_inferior): New function.
14925 (find_inferior_id): New function.
14926 (inferior_target_data): Update argument type.
14927 (set_inferior_target_data): Likewise.
14928 (inferior_regcache_data): Likewise.
14929 (set_inferior_regcache_data): Likewise.
14930 * linux-low.c (linux_bp_reinsert): Remove.
14931 (all_processes, stopping_threads, using_thrads)
14932 (struct pending_signals, debug_threads, pid_of): New.
14933 (inferior_pid): Replace with macro.
14934 (struct inferior_linux_data): Remove.
14935 (get_stop_pc, add_process): New functions.
14936 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14937 Use add_process and add_thread.
14938 (linux_attach_lwp): New function, based on old linux_attach. Use
14939 add_process and add_thread. Set stop_expected for new threads.
14940 (linux_attach): New function.
14941 (linux_kill_one_process): New function.
14942 (linux_kill): Kill all LWPs.
14943 (linux_thread_alive): Use find_inferior_id.
14944 (check_removed_breakpoints, status_pending_p): New functions.
14945 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14946 Update. Use WNOHANG. Wait for cloned processes also. Update process
14947 struct for the found process.
14948 (linux_wait_for_event): New function.
14949 (linux_wait): Use it. Support LWPs.
14950 (send_sigstop, wait_for_sigstop, stop_all_processes)
14951 (linux_resume_one_process, linux_continue_one_process): New functions.
14952 (linux_resume): Support LWPs.
14953 (REGISTER_RAW_SIZE): Remove.
14954 (fetch_register): Use register_size instead. Call supply_register.
14955 (usr_store_inferior_registers): Likewise. Call collect_register.
14956 Fix recursive case.
14957 (regsets_fetch_inferior_registers): Improve error message.
14958 (regsets_store_inferior_registers): Add debugging.
14959 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14960 (unstopped_p, linux_signal_pid): New functions.
14961 (linux_target_ops): Add linux_signal_pid.
14962 (linux_init_signals): New function.
14963 (initialize_low): Call it. Initialize using_threads.
14964 * regcache.c (inferior_regcache_data): Add valid
14965 flag.
14966 (get_regcache): Fetch registers lazily. Add fetch argument
14967 and update all callers.
14968 (regcache_invalidate_one, regcache_invalidate): New
14969 functions.
14970 (new_register_cache): Renamed from create_register_cache.
14971 Return the new regcache.
14972 (free_register_cache): Change argument to a void *.
14973 (registers_to_string, registers_from_string): Call get_regcache
14974 with fetch flag set.
14975 (register_data): Make static. Pass fetch flag to get_regcache.
14976 (supply_register): Call get_regcache with fetch flag clear.
14977 (collect_register): Call get_regcache with fetch flag set.
14978 (collect_register_as_string): New function.
14979 * regcache.h: Update.
14980 * remote-utils.c (putpkt): Flush after debug output and use
14981 stderr.
14982 Handle input interrupts while waiting for an ACK.
14983 (input_interrupt): Use signal_pid method.
14984 (getpkt): Flush after debug output and use stderr.
14985 (outreg): Use collect_register_as_string.
14986 (new_thread_notify, dead_thread_notify): New functions.
14987 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14988 and general_thread.
14989 (look_up_one_symbol): Flush after debug output.
14990 * server.c (step_thread, server_waiting): New variables.
14991 (start_inferior): Don't use signal_pid. Update call to mywait.
14992 (attach_inferior): Update call to mywait.
14993 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14994 (main): Don't fetch/store registers explicitly. Use
14995 set_desired_inferior. Support proposed ``Hs'' packet. Update
14996 calls to mywait.
14997 * server.h: Update.
14998 (struct inferior_list, struct_inferior_list_entry): New.
14999 * target.c (set_desired_inferior): New.
15000 (write_inferior_memory): Constify.
15001 (mywait): New function.
15002 * target.h: Update.
15003 (struct target_ops): New signal_pid method.
15004 (mywait): Removed macro, added prototype.
15005
15006 * linux-low.h (regset_func): Removed.
15007 (regset_fill_func, regset_store_func): New.
15008 (enum regset_type): New.
15009 (struct regset_info): Add type field. Use new operation types.
15010 (struct linux_target_ops): stop_pc renamed to get_pc.
15011 Add decr_pc_after_break and breakpoint_at.
15012 (get_process, get_thread_proess, get_process_thread)
15013 (strut process_info, all_processes, linux_attach_lwp)
15014 (thread_db_init): New.
15015
15016 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15017 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15018 (the_low_target): Add new members.
15019 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15020 (i386_store_fpxregset): Constify.
15021 (target_regsets): Add new kind identifier.
15022 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15023 (i386_set_pc): Add debugging.
15024 (i386_breakpoint_at): New function.
15025 (the_low_target): Add new members.
15026 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15027 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15028 (mips_breakpoint_at): New.
15029 (the_low_target): Add new members.
15030 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15031 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15032 (the_low_target): Add new members.
15033 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15034 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15035 (the_low_target): Add new members.
15036 * linux-x86-64-low.c (target_regsets): Add new kind
15037 identifier.
15038
150392002-05-15 Daniel Jacobowitz <drow@mvista.com>
15040
15041 From Martin Pool <mbp@samba.org>:
15042 * server.c (gdbserver_usage): New function.
15043 (main): Call it.
15044
150452002-05-14 Daniel Jacobowitz <drow@mvista.com>
15046
15047 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15048 stop_at -> stop_pc.
15049
150502002-05-04 Andrew Cagney <ac131313@redhat.com>
15051
15052 * Makefile.in: Remove obsolete code.
15053
150542002-04-24 Michal Ludvig <mludvig@suse.cz>
15055
15056 * linux-low.c (regsets_fetch_inferior_registers),
15057 (regsets_store_inferior_registers): Removed cast to int from
15058 ptrace() calls.
15059 * regcache.h: Added declaration of struct inferior_info.
15060
150612002-04-20 Daniel Jacobowitz <drow@mvista.com>
15062
15063 * inferiors.c (struct inferior_info): Add regcache_data.
15064 (add_inferior): Call create_register_cache.
15065 (clear_inferiors): Call free_register_cache.
15066 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15067 * regcache.c (struct inferior_regcache_data): New.
15068 (registers): Remove.
15069 (get_regcache): New function.
15070 (create_register_cache, free_register_cache): New functions.
15071 (set_register_cache): Don't initialize the register cache here.
15072 (registers_to_string, registers_from_string, register_data): Call
15073 get_regcache.
15074 * regcache.h: Add prototypes.
15075 * server.h: Likewise.
15076
150772002-04-20 Daniel Jacobowitz <drow@mvista.com>
15078
15079 * mem-break.c: New file.
15080 * mem-break.h: New file.
15081 * Makefile.in: Add mem-break.o rule; update server.h
15082 dependencies.
15083 * inferiors.c (struct inferior_info): Add target_data
15084 member.
15085 (clear_inferiors): Free target_data member if set.
15086 (inferior_target_data, set_inferior_target_data): New functions.
15087 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15088 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15089 * linux-low.c (linux_bp_reinsert): New variable.
15090 (struct inferior_linux_data): New.
15091 (linux_create_inferior): Use set_inferior_target_data.
15092 (linux_attach): Likewise. Call add_inferior.
15093 (linux_wait_for_one_inferior): New function.
15094 (linux_wait): Call it.
15095 (linux_write_memory): Add const.
15096 (initialize_low): Call set_breakpoint_data.
15097 * linux-low.h (struct linux_target_ops): Add breakpoint
15098 handling members.
15099 * server.c (attach_inferior): Remove extra add_inferior
15100 call.
15101 * server.h: Include mem-break.h. Update inferior.c
15102 prototypes.
15103 * target.c (read_inferior_memory)
15104 (write_inferior_memory): New functions.
15105 * target.h (read_inferior_memory)
15106 (write_inferior_memory): Change macros to prototypes.
15107 (struct target_ops): Update comments. Add const to write_memory
15108 definition.
15109
151102002-04-11 Daniel Jacobowitz <drow@mvista.com>
15111
15112 * linux-low.c (usr_store_inferior_registers): Support
15113 registers which are allowed to fail to store.
15114 * linux-low.h (linux_target_ops): Likewise.
15115 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15116 (ppc_cannot_store_register): FPSCR may not be storable.
15117
151182002-04-09 Daniel Jacobowitz <drow@mvista.com>
15119
15120 * server.h: Include <string.h> if HAVE_STRING_H.
15121 * ChangeLog: Correct paths in last ChangeLog entry.
15122
151232002-04-09 Daniel Jacobowitz <drow@mvista.com>
15124
15125 * linux-low.h: Remove obsolete prototypes.
15126 (struct linux_target_ops): New.
15127 (extern the_low_target): New.
15128 * linux-low.c (num_regs, regmap): Remove declarations.
15129 (register_addr): Use the_low_target explicitly.
15130 (fetch_register): Likewise.
15131 (usr_fetch_inferior_registers): Likewise.
15132 (usr_store_inferior_registers): Likewise.
15133 * linux-arm-low.c (num_regs): Remove.
15134 (arm_num_regs): Define.
15135 (arm_regmap): Renamed from regmap, made static.
15136 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15137 made static.
15138 (arm_cannot_store_register): Renamed from cannot_store_register,
15139 made static.
15140 (the_low_target): New.
15141 * linux-i386-low.c (num_regs): Remove.
15142 (i386_num_regs): Define.
15143 (i386_regmap): Renamed from regmap, made static.
15144 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15145 made static.
15146 (i386_cannot_store_register): Renamed from cannot_store_register,
15147 made static.
15148 (the_low_target): New.
15149 * linux-ia64-low.c (num_regs): Remove.
15150 (ia64_num_regs): Define.
15151 (ia64_regmap): Renamed from regmap, made static.
15152 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15153 made static.
15154 (ia64_cannot_store_register): Renamed from cannot_store_register,
15155 made static.
15156 (the_low_target): New.
15157 * linux-m68k-low.c (num_regs): Remove.
15158 (m68k_num_regs): Define.
15159 (m68k_regmap): Renamed from regmap, made static.
15160 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15161 made static.
15162 (m68k_cannot_store_register): Renamed from cannot_store_register,
15163 made static.
15164 (the_low_target): New.
15165 * linux-mips-low.c (num_regs): Remove.
15166 (mips_num_regs): Define.
15167 (mips_regmap): Renamed from regmap, made static.
15168 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15169 made static.
15170 (mips_cannot_store_register): Renamed from cannot_store_register,
15171 made static.
15172 (the_low_target): New.
15173 * linux-ppc-low.c (num_regs): Remove.
15174 (ppc_num_regs): Define.
15175 (ppc_regmap): Renamed from regmap, made static.
15176 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15177 made static.
15178 (ppc_cannot_store_register): Renamed from cannot_store_register,
15179 made static.
15180 (the_low_target): New.
15181 * linux-s390-low.c (num_regs): Remove.
15182 (s390_num_regs): Define.
15183 (s390_regmap): Renamed from regmap, made static.
15184 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15185 made static.
15186 (s390_cannot_store_register): Renamed from cannot_store_register,
15187 made static.
15188 (the_low_target): New.
15189 * linux-sh-low.c (num_regs): Remove.
15190 (sh_num_regs): Define.
15191 (sh_regmap): Renamed from regmap, made static.
15192 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15193 made static.
15194 (sh_cannot_store_register): Renamed from cannot_store_register,
15195 made static.
15196 (the_low_target): New.
15197 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15198 (the_low_target): New.
15199
152002002-04-09 Daniel Jacobowitz <drow@mvista.com>
15201
15202 * Makefile.in: Add stamp-h target.
15203 * configure.in: Create stamp-h.
15204 * configure: Regenerated.
15205
152062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15207
15208 * inferiors.c: New file.
15209 * target.c: New file.
15210 * target.h: New file.
15211 * Makefile.in: Add target.o and inferiors.o. Update
15212 dependencies.
15213 * linux-low.c (inferior_pid): New static variable,
15214 moved from server.c.
15215 (linux_create_inferior): Renamed from create_inferior.
15216 Call add_inferior. Return 0 on success instead of a PID.
15217 (linux_attach): Renamed from myattach.
15218 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15219 (linux_thread_alive): Renamed from mythread_alive.
15220 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15221 child dies.
15222 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15223 (regsets_store_inferior_registers): Correct error message.
15224 Add missing ``return 0''.
15225 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15226 (linux_store_registers): Renamed from store_inferior_registers.
15227 (linux_read_memory): Renamed from read_inferior_memory.
15228 (linux_write_memory): Renamed from write_inferior_memory.
15229 (linux_target_ops): New structure.
15230 (initialize_low): Call set_target_ops ().
15231 * remote-utils.c (unhexify): New function.
15232 (hexify): New function.
15233 (input_interrupt): Send signals to ``signal_pid''.
15234 * server.c (inferior_pid): Remove.
15235 (start_inferior): Update create_inferior call.
15236 (attach_inferior): Call add_inferior.
15237 (handle_query): New function.
15238 (main): Call handle_query for `q' packets.
15239 * server.h: Include "target.h". Remove obsolete prototypes.
15240 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15241
152422002-04-09 Daniel Jacobowitz <drow@mvista.com>
15243
15244 * Makefile.in: Add WARN_CFLAGS. Update configury
15245 dependencies.
15246 * configure.in: Check for <string.h>
15247 * configure: Regenerate.
15248 * config.in: Regenerate.
15249 * gdbreplay.c: Include needed system headers.
15250 (remote_open): Remove strchr prototype.
15251 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15252 * regcache.c (supply_register): Change buf argument to const void *.
15253 (supply_register_by_name): Likewise.
15254 (collect_register): Change buf argument to void *.
15255 (collect_register_by_name): Likewise.
15256 * regcache.h: Add missing prototypes.
15257 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15258 * server.c (handle_query): New function.
15259 (attached): New static variable, moved out of main.
15260 (main): Quiet longjmp clobber warnings.
15261 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15262 * utils.c (error): Remove NORETURN.
15263 (fatal): Likewise.