]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Kill init_sal
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
23fdd69e
SM
12017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (linux_wait_1): Adjust.
4 * server.c (queue_stop_reply_callback): Adjust.
5
0a2dde4a
SDJ
62017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7
8 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
9 QEnvironmentUnset and QEnvironmentReset packets.
10 (handle_query): Inform remote that QEnvironmentHexEncoded,
11 QEnvironmentUnset and QEnvironmentReset are supported.
12
6afd337d
SM
132017-08-25 Simon Marchi <simon.marchi@ericsson.com>
14
15 * inferiors.h (inferior_target_data): Rename to ...
16 (thread_target_data): ... this.
17 (inferior_regcache_data): Rename to ...
18 (thread_regcache_data): ... this.
19 (set_inferior_regcache_data): Rename to ...
20 (set_thread_regcache_data): ... this.
21 * inferiors.c (inferior_target_data): Rename to ...
22 (thread_target_data): ... this.
23 (inferior_regcache_data): Rename to ...
24 (thread_regcache_data): ... this.
25 (set_inferior_regcache_data): Rename to ...
26 (set_thread_regcache_data): ... this.
27 (free_one_thread): Update.
28 * linux-low.h (get_thread_lwp): Update.
29 * regcache.c (get_thread_regcache): Update.
30 (regcache_invalidate_thread): Update.
31 (free_register_cache_thread): Update.
32 * win32-i386-low.c (update_debug_registers_callback): Update.
33 (win32_get_current_dr): Update.
34 * win32-low.c (thread_rec): Update.
35 (delete_thread_info): Update.
36 (continue_one_thread): Update.
37 (suspend_one_thread): Update.
38
a160cc46
SM
392017-08-24 Simon Marchi <simon.marchi@ericsson.com>
40
41 * inferiors.c (set_inferior_target_data): Remove.
42 * inferiors.h (set_inferior_target_data): Remove.
43
6d580b63
YQ
442017-08-18 Yao Qi <yao.qi@linaro.org>
45
46 * Makefile.in (OBS): Add selftest.o.
47 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
48 * configure, config.in: Re-generated.
49 * server.c: Include common/sefltest.h.
50 (captured_main): Handle option --selftest.
51
f5a29eb0
YQ
522017-08-09 Yao Qi <yao.qi@linaro.org>
53
54 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
55 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
56 i386-avx-mpx.o and i386-mmx.o.
57 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
58 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
59 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
60 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
61 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
62 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
63 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
64 i386/amd64-avx-mpx.xml.
65
57757c2f
YQ
662017-08-09 Yao Qi <yao.qi@linaro.org>
67
68 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
69 and x32-avx-avx512.o.
70 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
71 i386/x32-avx-avx512.xml.
72
229d26fc
SM
732017-07-26 Simon Marchi <simon.marchi@ericsson.com>
74
75 * tracepoint.h (enum class fast_tpoint_collect_result): New
76 enumeration.
77 (fast_tracepoint_collecting): Change return type to
78 fast_tpoint_collect_result.
79 * tracepoint.c (fast_tracepoint_collecting): Likewise.
80 * linux-low.h: Include tracepoint.h.
81 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
82 fast_tpoint_collect_result.
83 * linux-low.c (handle_tracepoints): Adjust.
84 (linux_fast_tracepoint_collecting): Change return type to
85 fast_tpoint_collect_result.
86 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
87 linux_wait_1, stuck_in_jump_pad_callback,
88 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
89 proceed_one_lwp): Adjust to type change.
90
2e1e43e1
YQ
912017-07-10 Yao Qi <yao.qi@linaro.org>
92
93 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
94
adc764e7
YQ
952017-06-29 Yao Qi <yao.qi@linaro.org>
96
97 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
98 Remove.
99 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
100
a206891a
SM
1012017-06-20 Simon Marchi <simon.marchi@ericsson.com>
102
103 * Makefile.in (IPA_OBJS): Sort and format one item per line.
104
9a6c7d9c
SDJ
1052017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
106
107 * linux-low.c (linux_create_inferior): Adjust code to access the
108 environment information via 'gdb_environ' class.
109 * lynx-low.c (lynx_create_inferior): Likewise.
110 * server.c (our_environ): Make it an instance of 'gdb_environ'.
111 (get_environ): Return a pointer to 'our_environ'.
112 (captured_main): Initialize 'our_environ'.
113 * server.h (get_environ): Adjust prototype.
114 * spu-low.c (spu_create_inferior): Adjust code to access the
115 environment information via 'gdb_environ' class.
116
ae3e2ccf
SM
1172017-06-17 Simon Marchi <simon.marchi@ericsson.com>
118
119 * linux-low.c (linux_read_memory, linux_write_memory): Remove
120 usage of "register" keyword.
121
3e019bdc
SM
1222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
123
124 * configure: Re-generate.
125
8465943a
SM
1262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
127
128 * configure: Re-generate.
129
cf0dd6f0
SM
1302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
131
132 * Makefile.in (COMPILE.pre): Add "-x c++".
133
9845682b
SDJ
1342017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
135
136 * fork-child.c: Conditionally include <signal.h>.
137
aefd8b33
SDJ
1382017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
139
140 * server.c (handle_general_set): Handle new packet
141 "QStartupWithShell".
142 (handle_query): Add "QStartupWithShell" to the list of supported
143 packets.
144 (gdbserver_usage): Add help text explaining the
145 new "--startup-with-shell" and "--no-startup-with-shell" CLI
146 options.
147 (captured_main): Recognize and act upon the presence of the new
148 CLI options.
149
2090129c
SDJ
1502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
151 Pedro Alves <palves@redhat.com>
152
153 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
154 * configure: Regenerate.
155 * configure.srv (srv_linux_obj): Add "fork-child.o" and
156 "fork-inferior.o".
157 (i[34567]86-*-lynxos*): Likewise.
158 (spu*-*-*): Likewise.
159 * fork-child.c: New file.
160 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
161 and "environ.h".
162 (linux_ptrace_fun): New function.
163 (linux_create_inferior): Adjust function prototype to reflect
164 change on "target.h". Adjust function code to use
165 "fork_inferior".
166 (linux_request_interrupt): Delete "signal_pid".
167 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
168 (lynx_ptrace_fun): New function.
169 (lynx_create_inferior): Adjust function prototype to reflect
170 change on "target.h". Adjust function code to use
171 "fork_inferior".
172 * nto-low.c (nto_create_inferior): Adjust function prototype and
173 code to reflect change on "target.h". Update comments.
174 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
175 "common-terminal.h" and "environ.h".
176 (terminal_fd): Moved to fork-child.c.
177 (old_foreground_pgrp): Likewise.
178 (restore_old_foreground_pgrp): Likewise.
179 (last_status): Make it global.
180 (last_ptid): Likewise.
181 (our_environ): New variable.
182 (startup_with_shell): Likewise.
183 (program_name): Likewise.
184 (program_argv): Rename to...
185 (program_args): ...this.
186 (wrapper_argv): New variable.
187 (start_inferior): Delete function.
188 (get_exec_wrapper): New function.
189 (get_exec_file): Likewise.
190 (get_environ): Likewise.
191 (prefork_hook): Likewise.
192 (post_fork_inferior): Likewise.
193 (postfork_hook): Likewise.
194 (postfork_child_hook): Likewise.
195 (handle_v_run): Update code to deal with arguments coming from the
196 remote host. Update calls from "start_inferior" to
197 "create_inferior".
198 (captured_main): Likewise. Initialize environment variable. Call
199 "have_job_control".
200 * server.h (post_fork_inferior): New prototype.
201 (get_environ): Likewise.
202 (last_status): Declare.
203 (last_ptid): Likewise.
204 (signal_pid): Likewise.
205 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
206 (spu_ptrace_fun): New function.
207 (spu_create_inferior): Adjust function prototype to reflect change
208 on "target.h". Adjust function code to use "fork_inferior".
209 * target.c (target_terminal_init): New function.
210 (target_terminal_inferior): Likewise.
211 (target_terminal_ours): Likewise.
212 * target.h: Include <vector>.
213 (struct target_ops) <create_inferior>: Update prototype.
214 (create_inferior): Update macro.
215 * utils.c (gdb_flush_out_err): New function.
216 * win32-low.c (win32_create_inferior): Adjust function prototype
217 and code to reflect change on "target.h".
218
043a4934
SDJ
2192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
220
221 * inferiors.c (switch_to_thread): New function.
222
15652511
SDJ
2232017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
224
225 * Makefile.in (SFILE): Add "common/job-control.c".
226 (OBS): Add "job-control.o".
227
21ea5acd
SDJ
2282017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
229
230 * Makefile: Remove "@host_makefile_frag@".
231
e13cb306
PA
2322017-05-05 Pedro Alves <palves@redhat.com>
233
234 * configure: Regenerate.
235
c94fee56
SDJ
2362017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
237
238 * configure: Regenerate.
239
a0ff9e1a
SM
2402017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
241
242 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
243 software_single_step change of return type to
244 std::vector<CORE_ADDR>.
245 * linux-low.c (install_software_single_step_breakpoints):
246 Likewise.
247 * linux-low.h (install_software_single_step_breakpoints):
248 Likewise.
249
be628ab8
SDJ
2502017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
251
252 * remote-utils.c: Include "gdb_termios.h" instead of
253 "terminal.h".
254 * terminal.h: Delete file.
255
7c5ded6a
SDJ
2562017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
257
258 * server.c: Include <vector>.
259 <program_argv, wrapper_argv>: Convert to std::vector.
260 (start_inferior): Rewrite function to use C++.
261 (handle_v_run): Likewise. Update code that calculates the argv
262 based on the vRun packet; use C++.
263 (captured_main): Likewise.
264
436252de
SM
2652017-04-06 Simon Marchi <simon.marchi@ericsson.com>
266
267 * server.c (handle_v_cont): Initialize thread_resume::thread
268 with null_ptid.
269
9bf2a700
PA
2702017-04-05 Pedro Alves <palves@redhat.com>
271
272 * configure: Regenerate.
273
a121b7c1
PA
2742017-04-05 Pedro Alves <palves@redhat.com>
275
276 * gdbreplay.c (sync_error): Constify.
277 * linux-x86-low.c (push_opcode): Constify.
278
21c8a587
PA
2792017-04-05 Pedro Alves <palves@redhat.com>
280
281 * win32-low.c (get_child_debug_event)
282 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
283 Report TARGET_WAITKIND_SPURIOUS instead.
284
fb32b4f7
PA
2852017-04-05 Pedro Alves <palves@redhat.com>
286
287 * remote-utils.c (remote_prepare, remote_open): Constify.
288 * remote-utils.h (remote_prepare, remote_open): Constify.
289 * server.c (captured_main): Constify 'port' handling.
290
65dd1e59
SM
2912017-04-04 Simon Marchi <simon.marchi@ericsson.com>
292
293 * Makefile.in (clean): Clear .deps.
294
8fa5b777
SM
2952017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * .gitignore: Remove generated files, replace with wildcard.
298 * (clean): Replace removal of generated files with wildcard.
299 (version.c): Replace with...
300 (version-generated.c): ...this.
301 (xml-builtin.c): Replace with...
302 (xml-builtin-generated.c): ...this.
303 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
304 (%.c: *regformats*): Replace with...
305 (%-generated.c: *regformats*): ...this.
306
a12e714b
MF
3072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
308
309 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
310 (xtensa_fill_gregset): Call collect_register_by_name for
311 threadptr register.
312 (xtensa_store_gregset): Call supply_register_by_name for
313 threadptr register.
314
1a09b50a
MF
3152017-03-27 Max Filippov <jcmvbkbc@gmail.com>
316
317 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
318 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
319 (xtensa_store_gregset): Call supply_register for all registers in
320 a0_regnum..a0_regnum + C0_NREGS range.
321
1a01e7c6
SM
3222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
323
324 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
325 (ax-ipa.o: ax.c): Remove.
326 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
327 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
328 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
329 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
330 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
331
36bc18a8
SM
3322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
333
334 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
335 (print-utils-ipa.o: ../common/print-utils.c): Remove.
336 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
337 (errors-ipa.o: ../common/errors.c): Remove.
338 (format-ipa.o: ../common/format.c): Remove.
339 (common-utils-ipa.o: ../common/common-utils.c): Remove.
340
a8ebe3d5
SM
3412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
342
343 * Makefile.in (%-ipa.o: %.c): New rule.
344 (tracepoint-ipa.o: tracepoint.c): Remove.
345 (utils-ipa.o: utils.c): Remove.
346 (remote-utils-ipa.o: remote-utils.c): Remove.
347 (regcache-ipa.o: regcache.c): Remove.
348 (i386-linux-ipa.o: i386-linux.c): Remove.
349 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
350 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
351 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
352 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
353 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
354 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
355 (amd64-linux-ipa.o: amd64-linux.c): Remove.
356 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
357 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
358 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
359 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
360 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
361 (aarch64-ipa.o: aarch64.c): Remove.
362 (s390-linux32-ipa.o: s390-linux32.c): Remove.
363 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
364 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
365 (s390-linux64-ipa.o: s390-linux64.c): Remove.
366 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
367 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
368 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
369 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
370 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
371 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
372 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
373 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
374 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
375 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
376 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
377 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
378 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
379 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
380 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
381 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
382 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
383 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
384 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
385 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
386 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
387 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
388 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
389 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
390 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
391 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
392 (tdesc-ipa.o: tdesc.c): Remove.
393 (x32-linux-ipa.o: x32-linux.c): Remove.
394 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
395 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
396
50cfacb7
SM
3972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * Makefile.in (%.o: ../arch/%.c): New rule.
400 (arm.o: ../arch/arm.c): Remove.
401 (arm-linux.o: ../arch/arm-linux.c): Remove.
402 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
403 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
404
c5a22423
SM
4052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
406
407 * Makefile.in (%.o: ../nat/%.c): New rule.
408 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
409 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
410 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
411 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
412 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
413 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
414 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
415 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
416 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
417 (linux-personality.o: ../nat/linux-personality.c): Remove.
418 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
419 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
420 (x86-linux.o: ../nat/x86-linux.c): Remove.
421 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
422 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
423
6bda016b
SM
4242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
425
426 * Makefile.in (%.o: ../common/%.c): New rule.
427 (signals.o: ../common/signals.c): Remove.
428 (print-utils.o: ../common/print-utils.c): Remove.
429 (rsp-low.o: ../common/rsp-low.c): Remove.
430 (common-utils.o: ../common/common-utils.c): Remove.
431 (posix-strerror.o: ../common/posix-strerror.c): Remove.
432 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
433 (vec.o: ../common/vec.c): Remove.
434 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
435 (xml-utils.o: ../common/xml-utils.c): Remove.
436 (ptid.o: ../common/ptid.c): Remove.
437 (buffer.o: ../common/buffer.c): Remove.
438 (format.o: ../common/format.c): Remove.
439 (filestuff.o: ../common/filestuff.c): Remove.
440 (agent.o: ../common/agent.c): Remove.
441 (errors.o: ../common/errors.c): Remove.
442 (environ.o: ../common/environ.c): Remove.
443 (common-debug.o: ../common/common-debug.c): Remove.
444 (cleanups.o: ../common/cleanups.c): Remove.
445 (common-exceptions.o: ../common/common-exceptions.c): Remove.
446 (fileio.o: ../common/fileio.c): Remove.
447 (common-regcache.o: ../common/common-regcache.c): Remove.
448 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
449 (new-op.o: ../common/new-op.c): Remove.
450 (btrace-common.o: ../common/btrace-common.c): Remove.
451
21122961
SM
4522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
453
454 * Makefile.in (%.o: ../target/%.c): New rule.
455 (waitstatus.o: ../target/waitstatus.c): Remove.
456
c362e621
SM
4572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * Makefile.in
460 (%.c: ../regformats/%.dat,
461 (%.c: ../regformats/arm/%.dat,
462 (%.c: ../regformats/i386/%.dat,
463 (%.c: ../regformats/rs6000/%.dat): New rules.
464 (aarch64.c): Remove.
465 (reg-arm.c): Remove.
466 (arm-with-iwmmxt.c): Remove.
467 (arm-with-vfpv2.c): Remove.
468 (arm-with-vfpv3.c): Remove.
469 (arm-with-neon.c): Remove.
470 (reg-bfin.c): Remove.
471 (reg-cris.c): Remove.
472 (reg-crisv32.c): Remove.
473 (i386.c): Remove.
474 (i386-linux.c): Remove.
475 (i386-avx.c): Remove.
476 (i386-avx-linux.c): Remove.
477 (i386-avx-avx512.c): Remove.
478 (i386-avx-avx512-linux.c): Remove.
479 (i386-mpx.c): Remove.
480 (i386-mpx-linux.c): Remove.
481 (i386-avx-mpx-avx512-pku.c): Remove.
482 (i386-avx-mpx-avx512-pku-linux.c): Remove.
483 (i386-avx-mpx.c): Remove.
484 (i386-avx-mpx-linux.c): Remove.
485 (i386-mmx.c): Remove.
486 (i386-mmx-linux.c): Remove.
487 (reg-ia64.c): Remove.
488 (reg-m32r.c): Remove.
489 (reg-m68k.c): Remove.
490 (reg-cf.c): Remove.
491 (mips-linux.c): Remove.
492 (mips-dsp-linux.c): Remove.
493 (mips64-linux.c): Remove.
494 (mips64-dsp-linux.c): Remove.
495 (nios2-linux.c): Remove.
496 (powerpc-32.c): Remove.
497 (powerpc-32l.c): Remove.
498 (powerpc-altivec32l.c): Remove.
499 (powerpc-cell32l.c): Remove.
500 (powerpc-vsx32l.c): Remove.
501 (powerpc-isa205-32l.c): Remove.
502 (powerpc-isa205-altivec32l.c): Remove.
503 (powerpc-isa205-vsx32l.c): Remove.
504 (powerpc-e500l.c): Remove.
505 (powerpc-64l.c): Remove.
506 (powerpc-altivec64l.c): Remove.
507 (powerpc-cell64l.c): Remove.
508 (powerpc-vsx64l.c): Remove.
509 (powerpc-isa205-64l.c): Remove.
510 (powerpc-isa205-altivec64l.c): Remove.
511 (powerpc-isa205-vsx64l.c): Remove.
512 (s390-linux32.c): Remove.
513 (s390-linux32v1.c): Remove.
514 (s390-linux32v2.c): Remove.
515 (s390-linux64.c): Remove.
516 (s390-linux64v1.c): Remove.
517 (s390-linux64v2.c): Remove.
518 (s390-te-linux64.c): Remove.
519 (s390-vx-linux64.c): Remove.
520 (s390-tevx-linux64.c): Remove.
521 (s390x-linux64.c): Remove.
522 (s390x-linux64v1.c): Remove.
523 (s390x-linux64v2.c): Remove.
524 (s390x-te-linux64.c): Remove.
525 (s390x-vx-linux64.c): Remove.
526 (s390x-tevx-linux64.c): Remove.
527 (tic6x-c64xp-linux.c): Remove.
528 (tic6x-c64x-linux.c): Remove.
529 (tic6x-c62x-linux.c): Remove.
530 (reg-sh.c): Remove.
531 (reg-sparc64.c): Remove.
532 (reg-spu.c): Remove.
533 (amd64.c): Remove.
534 (amd64-linux.c): Remove.
535 (amd64-avx.c): Remove.
536 (amd64-avx-linux.c): Remove.
537 (amd64-avx-avx512.c): Remove.
538 (amd64-avx-avx512-linux.c): Remove.
539 (amd64-mpx.c): Remove.
540 (amd64-mpx-linux.c): Remove.
541 (amd64-avx-mpx-avx512-pku.c): Remove.
542 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
543 (amd64-avx-mpx.c): Remove.
544 (amd64-avx-mpx-linux.c): Remove.
545 (x32.c): Remove.
546 (x32-linux.c): Remove.
547 (x32-avx.c): Remove.
548 (x32-avx-linux.c): Remove.
549 (x32-avx-avx512.c): Remove.
550 (x32-avx-avx512-linux.c): Remove.
551 (reg-xtensa.c): Remove.
552 (reg-tilegx.c): Remove.
553 (reg-tilegx32.c): Remove.
554
1672e0d9
SDJ
5552017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
556
557 * Makefile.in (SFILES): Add "common/environ.c".
558 (OBJS): Add "common/environ.h".
559
239b6d10
WT
5602017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
561
562 * configure.ac: Check if the fs_base and gs_base members of
563 `struct user_regs_struct' exist.
564 * config.in: Regenerated.
565 * configure: Likewise.
566
694b382c
AT
5672017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
568
569 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
570 target_read_memory.
571 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
572 (get_next_pcs_syscall_next_pc): Likewise.
573
7dc53023
LM
5742016-12-23 Luis Machado <lgustavo@codesourcery.com>
575
576 * win32-i386-low.c: Fix incorrect reference to a couple source files.
577 * nto-x86-low.c: Likewise.
578
ad02e4fe
SM
5792016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
580
581 * Makefile.in: Include disable-implicit-rules.mk.
582
dcb07cfa
PA
5832016-11-23 Pedro Alves <palves@redhat.com>
584
585 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
586 (debug_vprintf): Use std::chrono::steady_clock instead of
587 gettimeofday. Use '.' instead of ':'.
588 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
589 (get_timestamp): Use std::chrono::steady_clock instead of
590 gettimeofday.
591
8629c02c
SM
5922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * Makefile.in: Fix whitespace formatting.
595
b593ecca
SM
5962016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
597
598 * Makefile.in (SFILES, OBS): Flatten list and order
599 alphabetically.
600
9986ba08
PA
6012016-11-23 Pedro Alves <palves@redhat.com>
602
603 * event-loop.c (handle_file_event): Use warning.
604 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
605 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
606 Use warning.
607
4eefa7bc
PA
6082016-11-23 Pedro Alves <palves@redhat.com>
609
610 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
611 output.
612 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
613 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
614 debug_printf and debug_flush for debug output.
615 * server.c (handle_general_set): Likewise.
616 * thread-db.c (try_thread_db_load): Use debug_printf for debug
617 output.
618
5443506e
SM
6192016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
620
621 * Makefile.in (.c.o): Replace rule with ...
622 (%.o: %.c): ... this one.
623
3b165252
SM
6242016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
625
626 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
627 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
628 make.
629 * configure.ac: Remove checks for the make program.
630 * configure: Re-generate.
631
0bcda685
PA
6322016-10-28 Pedro Alves <palves@redhat.com>
633
634 * Makefile.in (CXX_DIALECT): Get from configure.
635 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
636 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
637 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
638 * config.in: Regenerate.
639 * configure: Regenerate.
640
c3805894
YQ
6412016-10-27 Yao Qi <yao.qi@linaro.org>
642
643 * linux-low.c (linux_supports_range_stepping): Return true if
644 can_software_single_step return true.
645
89342618
YQ
6462016-10-27 Yao Qi <yao.qi@linaro.org>
647
648 * inferiors.c (find_inferior_in_random): New function.
649 * inferiors.h (find_inferior_in_random): Declare.
650 * linux-low.c (linux_wait_for_event_filtered): Call
651 find_inferior_in_random instead of find_inferior.
652
e3652c84
YQ
6532016-10-27 Yao Qi <yao.qi@linaro.org>
654
655 * linux-low.c (linux_wait_1): If single-step breakpoints are
656 inserted, remove them.
657
5a04c4cf
PA
6582016-10-26 Pedro Alves <palves@redhat.com>
659
660 * linux-low.c (handle_extended_wait): Link parent/child fork
661 threads.
662 (linux_wait_1): Unlink them.
663 (linux_set_resume_request): Ignore resume requests for
664 already-resumed and unhandled fork child threads.
665 * linux-low.h (struct lwp_info) <fork_relative>: New field.
666 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
667 New functions.
668 (handle_v_requests) <vCont>: Don't call require_running.
669 * server.h (in_queued_stop_replies): New declaration.
670
cb93dc7f
YQ
6712016-10-24 Yao Qi <yao.qi@linaro.org>
672
673 PR server/20733
674 * linux-aarch64-low.c (append_insns): Cast the return value to
675 'uint32_t *'.
676
a1078bea
YQ
6772016-10-10 Yao Qi <yao.qi@linaro.org>
678
679 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
680
1fb77080
SDJ
6812016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
682
683 * target.c (target_supports_multi_process): New function, moved
684 from...
685 * target.h (target_supports_multi_process): ... here. Remove
686 macro.
687
39b5a3b9
TT
6882016-10-05 Tom Tromey <tom@tromey.com>
689
690 PR remote/20655:
691 * tracepoint.c (handle_tracepoint_bkpts): Check
692 ipa_error_tracepoint, not ipa_stopping_tracepoint.
693
c1d0b70a
YQ
6942016-10-05 Yao Qi <yao.qi@linaro.org>
695
696 * configure.srv: Update the path of arm-*.xml files.
697
0a69eedb
YQ
6982016-10-05 Terry Guo <terry.guo@arm.com>
699 Yao Qi <yao.qi@linaro.org>
700
701 * Makefile.in: Adjust the path of rules.
702 * configure.srv: Update the path of xml files.
703 * regformats/arm-with-iwmmxt.dat: Regenerated.
704 * regformats/arm-with-neon.dat: Likewise.
705 * regformats/arm-with-vfpv2.dat: Likewise.
706 * regformats/arm-with-vfpv3.dat Likewise.
707
17e16485
YQ
7082016-09-30 Yao Qi <yao.qi@linaro.org>
709
710 PR gdbserver/20627
711 * target.c (target_stop_and_wait): Don't call
712 target_continue_no_signal, use resume_stop instead.
713
edeeb602
YQ
7142016-09-26 Yao Qi <yao.qi@linaro.org>
715
716 * linux-low.c (linux_wait_1): Call debug_exit.
717
503b1c39
PA
7182016-09-23 Pedro Alves <palves@redhat.com>
719
720 * Makefile.in (SFILES): Add common/new-op.c.
721 (OBS): Add common/new-op.o.
722 (new-op.o): New rule.
723
74172ecf
SM
7242016-09-21 Simon Marchi <simon.marchi@ericsson.com>
725
726 * .gitinore: Ignore more files.
727
fc6cda2e
YQ
7282016-09-21 Yao Qi <yao.qi@linaro.org>
729
730 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
731 23.
732
bc1e6c81
SDJ
7332016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
734
735 * server.c (start_inferior): Call target_mourn_inferior instead of
736 mourn_inferior; pass ptid_t argument to it.
737 (resume): Likewise.
738 (handle_target_event): Likewise.
739 * target.c (target_mourn_inferior): New function.
740 * target.h (mourn_inferior): Delete macro.
741
0e00e962
AA
7422016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
743
744 * linux-low.c (lwp_is_stepping): New function.
745
1d8cb77d
CL
7462016-09-06 Carl Love <cel@us.ibm.com>
747
748 * server.c (start_inferior): Fixed comment, requested comment change
749 didn't get updated correctly. Removed reference to ptrace () call as
750 it is only true on Linux systems.
751
7313bced
CL
7522016-09-06 Carl Love <cel@us.ibm.com>
753
754 * server.c (start_inferior): Do not call
755 function target_post_create_inferior () if the
756 inferior process has already exited.
757
cf6de44d
PA
7582016-09-05 Pedro Alves <palves@redhat.com>
759
760 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
761 (COMPILE.pre, CC_LD): Use CXX directly.
762 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
763 * acinclude.m4: Don't include build-with-cxx.m4.
764 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
765 * configure: Regenerate.
766
c1da6748
AT
7672016-09-02 Akash Trehan <akash.trehan123@gmail.com>
768
769 PR gdb/19495
770 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
771 call writing data to own_buf.
772
f2b9e3df
SDJ
7732016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
774
775 * target.c (mywait): Call target_wait instead of
776 the_target->wait.
777 (target_wait): New function.
778
049a8570
SDJ
7792016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
780
781 * server.c (start_inferior): New variable 'ptid'. Replace calls
782 to the_target->resume by target_continue{,_no_signal}, depending
783 on the case.
784 * target.c (target_stop_and_wait): Call target_continue_no_signal
785 instead of the_target->resume.
786 (target_continue): New function.
787
3aa5cfa0
AT
7882016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
789
790 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
791
754653a7
AZ
7922016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
793
794 PR server/20491
795 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
796 ps_prochandle.
797 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
798 * linux-arm-low.c (ps_get_thread_area): Likewise.
799 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
800 * linux-m68k-low.c (ps_get_thread_area): Likewise.
801 * linux-mips-low.c (ps_get_thread_area): Likewise.
802 * linux-nios2-low.c (ps_get_thread_area): Likewise.
803 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
804 * linux-x86-low.c (ps_get_thread_area): Likewise.
805 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
806
ed036b40
PA
8072016-08-19 Pedro Alves <palves@redhat.com>
808
809 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
810
c8ef42ee
PA
8112016-08-19 Pedro Alves <palves@redhat.com>
812
813 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
814 comment. Use memcpy instead of casting through unsigned long.
815
9c235a72
PA
8162016-08-19 Pedro Alves <palves@redhat.com>
817
818 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
819 allocating around 0x80000000.
820
201506da
PA
8212016-08-19 Pedro Alves <palves@redhat.com>
822
823 PR gdb/20415
824 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
825 (x32-avx512-linux-ipa.o): New rules.
826 * configure.ac (x86_64-*-linux*): New x32 check.
827 * configure.srv (ipa_x32_linux_regobj): New.
828 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
829 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
830 descriptions.
831 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
832 descriptions.
833 * configure: Regenerate.
834
f348d89a
PA
8352016-08-09 Pedro Alves <palves@redhat.com>
836
837 PR gdb/18653
838 * Makefile.in (OBS): Add signals-state-save-restore.o.
839 (signals-state-save-restore.o): New rule.
840 * config.in: Regenerate.
841 * configure: Regenerate.
842 * linux-low.c: Include "signals-state-save-restore.h".
843 (linux_create_inferior): Call
844 restore_original_signals_state.
845 * server.c: Include "dispositions-save-restore.h".
846 (captured_main): Call save_original_signals_state.
847
1baf5149
PA
8482016-08-05 Pedro Alves <palves@redhat.com>
849
850 * configure: Regenerate.
851
fcd4a73d
YQ
8522016-08-04 Yao Qi <yao.qi@linaro.org>
853
854 * linux-low.c (regsets_fetch_inferior_registers): Check
855 errno is ESRCH or not.
856
979659d0
YQ
8572016-08-02 Yao Qi <yao.qi@linaro.org>
858
859 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
860 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
861 (thread_db_load_search): Update.
862 (try_thread_db_load_1): Don't look for td_ta_event_addr,
863 td_ta_set_event and td_ta_event_getmsg.
864
6598661d
PA
8652016-07-26 Pedro Alves <palves@redhat.com>
866
867 PR server/20414
868 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
869 of unsigned long for 64-bit registers and use uint32_t instead of
870 unsigned int for 32-bit registers.
871
9cf12d57
PA
8722016-07-26 Pedro Alves <palves@redhat.com>
873
874 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
875 to 'ptrace'.
876
305450ed
TT
8772016-07-21 Tom Tromey <tom@tromey.com>
878
879 * configure: Rebuild.
880
2583da7c
YQ
8812016-07-21 Yao Qi <yao.qi@linaro.org>
882
883 * mem-break.c (find_gdb_breakpoint): Cast bp to
884 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
885
21536b36
YQ
8862016-07-21 Yao Qi <yao.qi@linaro.org>
887
888 * server.c (handle_v_requests): Support s and S actions
889 if target_supports_software_single_step return true.
890
8901d193
YQ
8912016-07-21 Yao Qi <yao.qi@linaro.org>
892
893 * linux-low.c (resume_stopped_resumed_lwps): If resume request
894 is resume_step, call maybe_hw_step.
895 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
896 and unstop them.
897 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
898 breakpoints or not.
899 (proceed_one_lwp): If resume request is resume_step, install
900 reinsert breakpoints and call maybe_hw_step.
901
0e9a339e
YQ
9022016-07-21 Yao Qi <yao.qi@linaro.org>
903
904 * linux-low.c (proceed_one_lwp): Declare.
905 (linux_resume_one_thread): Remove local variable 'step'.
906 Lift code enqueue signal. Call proceed_one_lwp instead of
907 linux_resume_one_lwp.
908
4281b351
YQ
9092016-07-21 Yao Qi <yao.qi@linaro.org>
910
911 * linux-low.c (linux_resume_one_thread): Call
912 enqueue_pending_signal.
913
984a2c04
YQ
9142016-07-21 Yao Qi <yao.qi@linaro.org>
915
916 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
917 * inferiors.c (do_restore_current_thread_cleanup): New function.
918 (make_cleanup_restore_current_thread): Likewise.
919 * linux-low.c (install_software_single_step_breakpoints): Call
920 make_cleanup_restore_current_thread. Switch current_thread to
921 thread.
922
bec903c9
YQ
9232016-07-21 Yao Qi <yao.qi@linaro.org>
924
925 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
926 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
927 (clone_one_breakpoint): Likewise.
928 (delete_reinsert_breakpoints): Change parameter to thread.
929 Callers updated.
930 (has_reinsert_breakpoints): Likewise.
931 (uninsert_reinsert_breakpoints): Likewise.
932 (reinsert_reinsert_breakpoints): Likewise.
933 * mem-break.h (set_reinsert_breakpoint): Update declaration.
934 (delete_reinsert_breakpoints): Likewise.
935 (reinsert_reinsert_breakpoints): Likewise.
936 (uninsert_reinsert_breakpoints): Likewise.
937 (has_reinsert_breakpoints): Likewise.
938
63c40ec7
YQ
9392016-07-21 Yao Qi <yao.qi@linaro.org>
940
941 * inferiors.c (get_thread_process): Make parameter const.
942 * inferiors.h (get_thread_process): Update declaration.
943 * mem-break.c (clone_all_breakpoints): Remove all parameters.
944 Add new parameters child_thread and parent_thread. Callers
945 updated.
946 * mem-break.h (clone_all_breakpoints): Update declaration.
947
9aa76cd0
YQ
9482016-07-21 Yao Qi <yao.qi@linaro.org>
949
950 * mem-break.c (struct breakpoint) <cond_list>: Remove.
951 <command_list, handler>: Remove.
952 (struct gdb_breakpoint): New.
953 (struct other_breakpoint): New.
954 (struct reinsert_breakpoint): New.
955 (is_gdb_breakpoint): New function.
956 (any_persistent_commands): Update command_list if
957 is_gdb_breakpoint returns true.
958 (set_breakpoint): Create breakpoints according to their types.
959 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
960 (set_gdb_breakpoint_1): Likewise.
961 (set_gdb_breakpoint): Likewise.
962 (clear_breakpoint_conditions): Change parameter type to
963 'struct gdb_breakpoint *'.
964 (clear_breakpoint_commands): Likewise.
965 (clear_breakpoint_conditions_and_commands): Likewise.
966 (add_condition_to_breakpoint): Likewise.
967 (add_breakpoint_condition): Likewise.
968 (add_commands_to_breakpoint): Likewise.
969 (check_breakpoints): Check other_breakpoint.
970 (clone_one_breakpoint): Clone breakpopint according to its type.
971 * mem-break.h (struct gdb_breakpoint): Declare.
972 (set_gdb_breakpoint): Update declaration.
973 (clear_breakpoint_conditions_and_commands): Likewise.
974 (add_breakpoint_condition): Likewise.
975 (add_breakpoint_commands): Likewise.
976 * server.c (process_point_options): Change parameter type to
977 'struct gdb_breakpoint *'.
978
811f8301
YQ
9792016-07-21 Yao Qi <yao.qi@linaro.org>
980
981 * mem-break.c (set_breakpoint_at): Rename it to ...
982 (set_breakpoint_type_at): ... it.
983 (set_breakpoint_at): Call set_breakpoint_type_at.
984 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
985 * mem-break.h (set_breakpoint_at): Update comments.
986
b1c51e36
CLT
9872016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
988
989 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
990 to buf parameter.
991 (nios2_store_gregset): Likewise.
992
ced2dffb
PA
9932016-07-01 Pedro Alves <palves@redhat.com>
994 Antoine Tremblay <antoine.tremblay@ericsson.com>
995
996 * linux-low.c: Change interface to take the target lwp_info
997 pointer directly and return void. Handle detaching from a zombie
998 thread.
999 (linux_detach_lwp_callback): New function.
1000 (linux_detach): Detach from the leader thread after detaching from
1001 the clone threads.
1002
2ac09a5b
YQ
10032016-06-28 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1006 for variable new_offset.
1007 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1008 (aarch64_ftrace_insn_reloc_cb): Likewise.
1009 (aarch64_ftrace_insn_reloc_tb): Likewise.
1010 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1011 PRIx64 instead of PRIx32.
1012
79e7fd4f
YQ
10132016-06-28 Yao Qi <yao.qi@linaro.org>
1014
1015 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1016 (the_low_target): Install arm_get_syscall_trapinfo.
1017
061fc021
YQ
10182016-06-28 Yao Qi <yao.qi@linaro.org>
1019
1020 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1021 function.
1022 (the_low_target): Install aarch64_get_syscall_trapinfo.
1023
4cc32bec
YQ
10242016-06-28 Yao Qi <yao.qi@linaro.org>
1025
1026 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1027 Callers updated.
1028 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1029 Remove parameter sysno.
1030 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1031 sysret.
1032
782c1122
AA
10332016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1034
1035 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1036 (s390_emit_ne_goto): Likewise.
1037 (s390_emit_lt_goto): Likewise.
1038 (s390_emit_le_goto): Likewise.
1039 (s390_emit_gt_goto): Likewise.
1040 (s390_emit_ge_goto): Likewise.
1041 (s390x_emit_eq_goto): Likewise.
1042 (s390x_emit_ne_goto): Likewise.
1043 (s390x_emit_lt_goto): Likewise.
1044 (s390x_emit_le_goto): Likewise.
1045 (s390x_emit_gt_goto): Likewise.
1046 (s390x_emit_ge_goto): Likewise.
1047 (s390_emit_ops_impl): Mark variable static.
1048 (s390x_emit_ops): Likewise.
1049
2e7b624b
YQ
10502016-06-17 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-low.c (handle_extended_wait): Call
1053 uninsert_reinsert_breakpoints for the parent process. Remove
1054 reinsert breakpoints from the child process. Reinsert them to
1055 the parent process when vfork is done.
1056 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1057 (reinsert_reinsert_breakpoints): New function.
1058 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1059 (reinsert_reinsert_breakpoints): Declare.
1060
8a81c5d7
YQ
10612016-06-17 Yao Qi <yao.qi@linaro.org>
1062
1063 * linux-low.c (handle_extended_wait): If the parent is doing
1064 step-over, remove the reinsert breakpoints from the forked child.
1065
f50bf8e5
YQ
10662016-06-17 Yao Qi <yao.qi@linaro.org>
1067
1068 * linux-low.c (unsuspend_all_lwps): Declare.
1069 (linux_low_filter_event): If thread exited, call finish_step_over.
1070 If step-over is finished, unsuspend other threads.
1071
8376a3cb
YQ
10722016-06-17 Yao Qi <yao.qi@linaro.org>
1073
1074 * linux-low.c (linux_resume_one_lwp_throw): Assert
1075 has_reinsert_breakpoints returns false.
1076 * mem-break.c (delete_disabled_breakpoints): Assert
1077 bp type isn't reinsert_breakpoint.
1078
f79b145d
YQ
10792016-06-17 Yao Qi <yao.qi@linaro.org>
1080
1081 * linux-low.c (maybe_hw_step): New function.
1082 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1083 (finish_step_over): Switch current_thread to lwp temporarily,
1084 and assert has_reinsert_breakpoints returns true.
1085 (proceed_one_lwp): Call maybe_hw_step.
1086 * mem-break.c (has_reinsert_breakpoints): New function.
1087 * mem-break.h (has_reinsert_breakpoints): Declare.
1088
0ae534d2
JT
10892016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1090
1091 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1092
fcdad592
YQ
10932016-05-17 Yao Qi <yao.qi@linaro.org>
1094
1095 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1096 instead of find_inferior.
1097
9e784964
YQ
10982016-05-05 Yao Qi <yao.qi@linaro.org>
1099
1100 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1101 Initialize res to zero.
1102
cf2ebb6e
YQ
11032016-05-05 Yao Qi <yao.qi@linaro.org>
1104
1105 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1106 to uint32_t.
1107
c1aebf87
UW
11082016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1109
1110 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1111 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1112 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1113
35fd2deb 11142016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1115 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1116
1117 * tracepoint.c (write_inferior_int8): New function.
1118 (cmd_qtenable_disable): Write enable flag using
1119 write_inferior_int8.
1120
484b3c32
YQ
11212016-04-25 Yao Qi <yao.qi@linaro.org>
1122
1123 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1124 (need_step_over_p): Return zero if the LWP has pending signals
1125 can be delivered on software single step target.
1126
85ba7d86
YQ
11272016-04-25 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1130 return instead of error.
1131
3539aa13
YQ
11322016-04-22 Yao Qi <yao.qi@linaro.org>
1133
1134 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1135 to 23.
1136
5b061e98
YQ
11372016-04-22 Yao Qi <yao.qi@linaro.org>
1138
1139 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1140 signal when stepping over breakpoint with software single
1141 step.
1142
3451269c
PA
11432016-04-21 Pedro Alves <palves@redhat.com>
1144
1145 * linux-s390-low.c (s390_collect_ptrace_register)
1146 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1147 add casts.
1148 (s390_check_regset): Use void * instead of gdb_byte *.
1149
a2358508
PA
11502016-04-20 Pedro Alves <palves@redhat.com>
1151
1152 * configure: Renegerate.
1153
6885166d
YQ
11542016-04-20 Yao Qi <yao.qi@linaro.org>
1155
1156 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1157 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1158 number 16.
1159 (arm_store_gregset): Likewise.
1160
2b863f51
WT
11612016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1162
1163 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1164 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1165 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1166 (amd64-avx-mpx-linux.c): New rules.
1167 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1168 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1169 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1170 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1171 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1172 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1173 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1174 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1175 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1176 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1177 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1178 * linux-x86-low.c (x86_linux_read_description): Add case for
1179 X86_XSTATE_AVX_MPX_MASK.
1180 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1181 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1182 init_registers_i386_avx_mpx_linux.
1183 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1184 (initialize_low_tracepoint): Call
1185 init_registers_i386_avx_mpx_linux.
1186 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1187 (initialize_low_tracepoint): Call
1188 init_registers_amd64_avx_mpx_linux.
1189 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1190 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1191 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1192 declarations.
1193
9b30624b
PA
11942016-04-18 Pedro Alves <palves@redhat.com>
1195
1196 * configure: Regenerate.
1197
45e3745e
AT
11982016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1199
1200 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1201 (aarch64_emit_sub): Likewise.
1202
2afc13ff
PA
12032016-04-12 Pedro Alves <palves@redhat.com>
1204
1205 * utils.c (prepare_to_throw_exception): Delete.
1206
6e774b13
SM
12072016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1208
1209 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1210
4dca19f8
MK
12112016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1212
1213 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1214
d0a9981f
MK
12152016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1216
1217 * linux-aarch64-ipa.c: Add <elf.h> include.
1218 * linux-ppc-ipa.c: Add <elf.h> include.
1219 * linux-s390-ipa.c: Add <elf.h> include.
1220
252db07e
MK
12212016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1222
1223 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1224 (get_raw_reg_ptr): Likewise.
1225 (get_trace_state_variable_value_ptr): Likewise.
1226 (set_trace_state_variable_value_ptr): Likewise.
1227 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1228 char *.
1229
14e2b6d9
MK
12302016-03-31 Wei-cheng Wang <cole945@gmail.com>
1231 Marcin Kościelnicki <koriakin@0x04.net>
1232
1233 PR/17221
1234 * linux-ppc-low.c (emit_insns): New function.
1235 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1236 (ppc_emit_prologue): New function.
1237 (ppc_emit_epilogue): New function.
1238 (ppc_emit_add): New function.
1239 (ppc_emit_sub): New function.
1240 (ppc_emit_mul): New function.
1241 (ppc_emit_lsh): New function.
1242 (ppc_emit_rsh_signed): New function.
1243 (ppc_emit_rsh_unsigned): New function.
1244 (ppc_emit_ext): New function.
1245 (ppc_emit_zero_ext): New function.
1246 (ppc_emit_log_not): New function.
1247 (ppc_emit_bit_and): New function.
1248 (ppc_emit_bit_or): New function.
1249 (ppc_emit_bit_xor): New function.
1250 (ppc_emit_bit_not): New function.
1251 (ppc_emit_equal): New function.
1252 (ppc_emit_less_signed): New function.
1253 (ppc_emit_less_unsigned): New function.
1254 (ppc_emit_ref): New function.
1255 (ppc_emit_const): New function.
1256 (ppc_emit_reg): New function.
1257 (ppc_emit_pop): New function.
1258 (ppc_emit_stack_flush): New function.
1259 (ppc_emit_swap): New function.
1260 (ppc_emit_stack_adjust): New function.
1261 (ppc_emit_call): New function.
1262 (ppc_emit_int_call_1): New function.
1263 (ppc_emit_void_call_2): New function.
1264 (ppc_emit_if_goto): New function.
1265 (ppc_emit_goto): New function.
1266 (ppc_emit_eq_goto): New function.
1267 (ppc_emit_ne_goto): New function.
1268 (ppc_emit_lt_goto): New function.
1269 (ppc_emit_le_goto): New function.
1270 (ppc_emit_gt_goto): New function.
1271 (ppc_emit_ge_goto): New function.
1272 (ppc_write_goto_address): New function.
1273 (ppc_emit_ops_impl): New static variable.
1274 (ppc64v1_emit_prologue): New function.
1275 (ppc64v2_emit_prologue): New function.
1276 (ppc64_emit_epilogue): New function.
1277 (ppc64_emit_add): New function.
1278 (ppc64_emit_sub): New function.
1279 (ppc64_emit_mul): New function.
1280 (ppc64_emit_lsh): New function.
1281 (ppc64_emit_rsh_signed): New function.
1282 (ppc64_emit_rsh_unsigned): New function.
1283 (ppc64_emit_ext): New function.
1284 (ppc64_emit_zero_ext): New function.
1285 (ppc64_emit_log_not): New function.
1286 (ppc64_emit_bit_and): New function.
1287 (ppc64_emit_bit_or): New function.
1288 (ppc64_emit_bit_xor): New function.
1289 (ppc64_emit_bit_not): New function.
1290 (ppc64_emit_equal): New function.
1291 (ppc64_emit_less_signed): New function.
1292 (ppc64_emit_less_unsigned): New function.
1293 (ppc64_emit_ref): New function.
1294 (ppc64_emit_const): New function.
1295 (ppc64v1_emit_reg): New function.
1296 (ppc64v2_emit_reg): New function.
1297 (ppc64_emit_pop): New function.
1298 (ppc64_emit_stack_flush): New function.
1299 (ppc64_emit_swap): New function.
1300 (ppc64v1_emit_call): New function.
1301 (ppc64v2_emit_call): New function.
1302 (ppc64v1_emit_int_call_1): New function.
1303 (ppc64v2_emit_int_call_1): New function.
1304 (ppc64v1_emit_void_call_2): New function.
1305 (ppc64v2_emit_void_call_2): New function.
1306 (ppc64_emit_if_goto): New function.
1307 (ppc64_emit_eq_goto): New function.
1308 (ppc64_emit_ne_goto): New function.
1309 (ppc64_emit_lt_goto): New function.
1310 (ppc64_emit_le_goto): New function.
1311 (ppc64_emit_gt_goto): New function.
1312 (ppc64_emit_ge_goto): New function.
1313 (ppc64v1_emit_ops_impl): New static variable.
1314 (ppc64v2_emit_ops_impl): New static variable.
1315 (ppc_emit_ops): New function.
1316 (linux_low_target): Wire in ppc_emit_ops.
1317
a2174ba4
MK
13182016-03-31 Wei-cheng Wang <cole945@gmail.com>
1319 Marcin Kościelnicki <koriakin@0x04.net>
1320
1321 PR/17221
1322 * Makefile.in: Add powerpc-*-ipa.o
1323 * configure.srv: Add ipa_obj for powerpc*-linux.
1324 * linux-ppc-ipa.c: New file.
1325 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1326 includes.
1327 (PPC_FIELD): New macro.
1328 (PPC_SEXT): New macro.
1329 (PPC_OP6): New macro.
1330 (PPC_BO): New macro.
1331 (PPC_LI): New macro.
1332 (PPC_BD): New macro.
1333 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1334 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1335 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1336 (ppc_get_thread_area): New function.
1337 (is_elfv2_inferior): New function.
1338 (gen_ds_form): New function.
1339 (GEN_STD): New macro.
1340 (GEN_STDU): New macro.
1341 (GEN_LD): New macro.
1342 (GEN_LDU): New macro.
1343 (gen_d_form): New function.
1344 (GEN_ADDI): New macro.
1345 (GEN_ADDIS): New macro.
1346 (GEN_LI): New macro.
1347 (GEN_LIS): New macro.
1348 (GEN_ORI): New macro.
1349 (GEN_ORIS): New macro.
1350 (GEN_LWZ): New macro.
1351 (GEN_STW): New macro.
1352 (GEN_STWU): New macro.
1353 (gen_xfx_form): New function.
1354 (GEN_MFSPR): New macro.
1355 (GEN_MTSPR): New macro.
1356 (GEN_MFCR): New macro.
1357 (GEN_MTCR): New macro.
1358 (GEN_SYNC): New macro.
1359 (GEN_LWSYNC): New macro.
1360 (gen_x_form): New function.
1361 (GEN_OR): New macro.
1362 (GEN_MR): New macro.
1363 (GEN_LWARX): New macro.
1364 (GEN_STWCX): New macro.
1365 (GEN_CMPW): New macro.
1366 (gen_md_form): New function.
1367 (GEN_RLDICL): New macro.
1368 (GEN_RLDICR): New macro.
1369 (gen_i_form): New function.
1370 (GEN_B): New macro.
1371 (GEN_BL): New macro.
1372 (gen_b_form): New function.
1373 (GEN_BNE): New macro.
1374 (GEN_LOAD): New macro.
1375 (GEN_STORE): New macro.
1376 (gen_limm): New function.
1377 (gen_atomic_xchg): New function.
1378 (gen_call): New function.
1379 (ppc_relocate_instruction): New function.
1380 (ppc_install_fast_tracepoint_jump_pad): New function.
1381 (ppc_get_min_fast_tracepoint_insn_len): New function.
1382 (ppc_get_ipa_tdesc_idx): New function.
1383 (the_low_target): Wire in the new functions.
1384 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1385 tdescs.
1386 * linux-ppc-tdesc.h: New file.
1387
a13c4696
MK
13882016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1389
1390 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1391 (alloc_jump_pad_buffer): New function.
1392 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1393 (alloc_jump_pad_buffer): New function.
1394 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1395 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1396 (alloc_jump_pad_buffer): New function.
1397 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1398 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1399 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1400 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1401
1cda1512
MK
14022016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1403
1404 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1405 * linux-amd64-ipa.c: Likewise.
1406 * linux-i386-ipa.c: Likewise.
1407 * linux-s390-ipa.c: Likewise.
1408 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1409 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1410 set_trace_state_variable_value_ptr.
1411 (struct ipa_sym_addresses): Likewise.
1412 (symbol_list): Likewise.
1413 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1414 accessing gdb_collect directly.
1415 (gdb_collect_ptr_type): New typedef.
1416 (get_raw_reg_ptr_type): New typedef.
1417 (get_trace_state_variable_value_ptr_type): New typedef.
1418 (set_trace_state_variable_value_ptr_type): New typedef.
1419 (gdb_collect_ptr): New global.
1420 (get_raw_reg_ptr): New global.
1421 (get_trace_state_variable_value_ptr): New global.
1422 (set_trace_state_variable_value_ptr): New global.
1423 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1424 accessing get_raw_reg directly.
1425 (get_get_tsv_func_addr): Likewise for
1426 get_trace_state_variable_value_ptr.
1427 (get_set_tsv_func_addr): Likewise for
1428 set_trace_state_variable_value_ptr.
1429 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1430
72fb5488
SM
14312016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1432
1433 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1434
28170b88
MK
14352016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1436
1437 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1438 packets.
1439 (relocate_instruction): Remove own_buf.
1440 * server.c (own_buf): Make global.
1441 (handle_v_requests): Make global.
1442 * server.h (own_buf): New declaration.
1443 (handle_v_requests): New prototype.
1444
f39e8743
MK
14452016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1446
1447 PR 18377
1448 * linux-s390-low.c (add_insns): New function.
1449 (s390_emit_prologue): New function.
1450 (s390_emit_epilogue): New function.
1451 (s390_emit_add): New function.
1452 (s390_emit_sub): New function.
1453 (s390_emit_mul): New function.
1454 (s390_emit_lsh): New function.
1455 (s390_emit_rsh_signed): New function.
1456 (s390_emit_rsh_unsigned): New function.
1457 (s390_emit_ext): New function.
1458 (s390_emit_log_not): New function.
1459 (s390_emit_bit_and): New function.
1460 (s390_emit_bit_or): New function.
1461 (s390_emit_bit_xor): New function.
1462 (s390_emit_bit_not): New function.
1463 (s390_emit_equal): New function.
1464 (s390_emit_less_signed): New function.
1465 (s390_emit_less_unsigned): New function.
1466 (s390_emit_ref): New function.
1467 (s390_emit_if_goto): New function.
1468 (s390_emit_goto): New function.
1469 (s390_write_goto_address): New function.
1470 (s390_emit_litpool): New function.
1471 (s390_emit_const): New function.
1472 (s390_emit_call): New function.
1473 (s390_emit_reg): New function.
1474 (s390_emit_pop): New function.
1475 (s390_emit_stack_flush): New function.
1476 (s390_emit_zero_ext): New function.
1477 (s390_emit_swap): New function.
1478 (s390_emit_stack_adjust): New function.
1479 (s390_emit_set_r2): New function.
1480 (s390_emit_int_call_1): New function.
1481 (s390_emit_void_call_2): New function.
1482 (s390_emit_eq_goto): New function.
1483 (s390_emit_ne_goto): New function.
1484 (s390_emit_lt_goto): New function.
1485 (s390_emit_le_goto): New function.
1486 (s390_emit_gt_goto): New function.
1487 (s390_emit_ge_goto): New function.
1488 (s390x_emit_prologue): New function.
1489 (s390x_emit_epilogue): New function.
1490 (s390x_emit_add): New function.
1491 (s390x_emit_sub): New function.
1492 (s390x_emit_mul): New function.
1493 (s390x_emit_lsh): New function.
1494 (s390x_emit_rsh_signed): New function.
1495 (s390x_emit_rsh_unsigned): New function.
1496 (s390x_emit_ext): New function.
1497 (s390x_emit_log_not): New function.
1498 (s390x_emit_bit_and): New function.
1499 (s390x_emit_bit_or): New function.
1500 (s390x_emit_bit_xor): New function.
1501 (s390x_emit_bit_not): New function.
1502 (s390x_emit_equal): New function.
1503 (s390x_emit_less_signed): New function.
1504 (s390x_emit_less_unsigned): New function.
1505 (s390x_emit_ref): New function.
1506 (s390x_emit_if_goto): New function.
1507 (s390x_emit_const): New function.
1508 (s390x_emit_call): New function.
1509 (s390x_emit_reg): New function.
1510 (s390x_emit_pop): New function.
1511 (s390x_emit_stack_flush): New function.
1512 (s390x_emit_zero_ext): New function.
1513 (s390x_emit_swap): New function.
1514 (s390x_emit_stack_adjust): New function.
1515 (s390x_emit_int_call_1): New function.
1516 (s390x_emit_void_call_2): New function.
1517 (s390x_emit_eq_goto): New function.
1518 (s390x_emit_ne_goto): New function.
1519 (s390x_emit_lt_goto): New function.
1520 (s390x_emit_le_goto): New function.
1521 (s390x_emit_gt_goto): New function.
1522 (s390x_emit_ge_goto): New function.
1523 (s390_emit_ops): New function.
1524 (struct linux_target_ops): Fill in emit_ops hook.
1525
abd9baf9
MK
15262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1527
1528 PR 18377
1529 * Makefile.in: Add s390 IPA files.
1530 * configure.srv: Build IPA for s390.
1531 * linux-s390-ipa.c: New file.
1532 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1533 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1534 (tdesc_s390_linux32): Likewise.
1535 (init_registers_s390_linux32v1): Likewise.
1536 (tdesc_s390_linux32v1): Likewise.
1537 (init_registers_s390_linux32v2): Likewise.
1538 (tdesc_s390_linux32v2): Likewise.
1539 (init_registers_s390_linux64): Likewise.
1540 (tdesc_s390_linux64): Likewise.
1541 (init_registers_s390_linux64v1): Likewise.
1542 (tdesc_s390_linux64v1): Likewise.
1543 (init_registers_s390_linux64v2): Likewise.
1544 (tdesc_s390_linux64v2): Likewise.
1545 (init_registers_s390_te_linux64): Likewise.
1546 (tdesc_s390_te_linux64): Likewise.
1547 (init_registers_s390_vx_linux64): Likewise.
1548 (tdesc_s390_vx_linux64): Likewise.
1549 (init_registers_s390_tevx_linux64): Likewise.
1550 (tdesc_s390_tevx_linux64): Likewise.
1551 (init_registers_s390x_linux64): Likewise.
1552 (tdesc_s390x_linux64): Likewise.
1553 (init_registers_s390x_linux64v1): Likewise.
1554 (tdesc_s390x_linux64v1): Likewise.
1555 (init_registers_s390x_linux64v2): Likewise.
1556 (tdesc_s390x_linux64v2): Likewise.
1557 (init_registers_s390x_te_linux64): Likewise.
1558 (tdesc_s390x_te_linux64): Likewise.
1559 (init_registers_s390x_vx_linux64): Likewise.
1560 (tdesc_s390x_vx_linux64): Likewise.
1561 (init_registers_s390x_tevx_linux64): Likewise.
1562 (tdesc_s390x_tevx_linux64): Likewise.
1563 (have_hwcap_s390_vx): New static variable.
1564 (s390_arch_setup): Fill have_hwcap_s390_vx.
1565 (s390_get_thread_area): New function.
1566 (s390_ft_entry_gpr_esa): New const.
1567 (s390_ft_entry_gpr_zarch): New const.
1568 (s390_ft_entry_misc): New const.
1569 (s390_ft_entry_fr): New const.
1570 (s390_ft_entry_vr): New const.
1571 (s390_ft_main_31): New const.
1572 (s390_ft_main_64): New const.
1573 (s390_ft_exit_fr): New const.
1574 (s390_ft_exit_vr): New const.
1575 (s390_ft_exit_misc): New const.
1576 (s390_ft_exit_gpr_esa): New const.
1577 (s390_ft_exit_gpr_zarch): New const.
1578 (append_insns): New function.
1579 (s390_relocate_instruction): New function.
1580 (s390_install_fast_tracepoint_jump_pad): New function.
1581 (s390_get_min_fast_tracepoint_insn_len): New function.
1582 (s390_get_ipa_tdesc_idx): New function.
1583 (struct linux_target_ops): Wire in the above functions.
1584 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1585 * linux-s390-tdesc.h: New file.
1586
a4105d04
MK
15872016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1588
1589 * linux-s390-low.c (s390_supports_tracepoints): New function.
1590 (struct linux_target_ops): Fill supports_tracepoints hook.
1591
35ac8b3e
YQ
15922016-03-18 Yao Qi <yao.qi@linaro.org>
1593
1594 * linux-low.c (lwp_signal_can_be_delivered): New function.
1595 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1596
94610ec4
YQ
15972016-03-18 Yao Qi <yao.qi@linaro.org>
1598
1599 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1600 0 if signal is enqueued. Remove 'signal' from one debugging
1601 message. Move one debugging message to some lines below.
1602 Remove code setting 'signal' to 0.
1603
80aea927
YQ
16042016-03-18 Yao Qi <yao.qi@linaro.org>
1605
1606 * linux-low.c (linux_low_filter_event): Remove redundant
1607 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1608
b04fd3be
MK
16092016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1610
1611 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1612 (struct linux_target_ops): Wire in the above.
1613
c40c8d4b
YQ
16142016-03-03 Yao Qi <yao.qi@linaro.org>
1615
1616 * linux-low.c: Update comments to start_step_over.
1617
0f8288ae
YQ
16182016-03-03 Yao Qi <yao.qi@linaro.org>
1619
1620 PR server/19736
1621 * linux-low.c (handle_extended_wait): Set child suspended
1622 if event_lwp->bp_reinsert isn't zero.
1623
fdbd04a8
YQ
16242016-03-02 Yao Qi <yao.qi@linaro.org>
1625
1626 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1627 enqueue_pending_signal.
1628
6896a8fa
MK
16292016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1630
1631 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1632 is actually loaded.
1633
ab503087
MK
16342016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1635
1636 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1637 (s390_regmap_3264) [!__s390x__]: New global.
1638 (s390_collect_ptrace_register): Skip map entries containing -1.
1639 (s390_supply_ptrace_register): Ditto.
1640 (s390_fill_gprs_high): New function.
1641 (s390_store_gprs_high): New function.
1642 (s390_regsets): Add NT_S390_HIGH_GPRS.
1643 (s390_get_hwcap): Enable on 31-bit.
1644 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1645 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1646 Detect NT_S390_HIGH_GPRS.
1647 (s390_usrregs_info_3264): Enable on 31-bit.
1648 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1649 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1650
ae91f625
MK
16512016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1652
1653 PR gdb/13808
1654 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1655 * configure.srv: Ditto.
1656 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1657 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1658 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1659 (init_registers_amd64_linux): Remove prototype.
1660 (tdesc_amd64_linux): Remove declaration.
1661 (get_ipa_tdesc): New function.
1662 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1663 initialize remaining tdescs.
1664 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1665 (init_registers_i386_linux): Remove prototype.
1666 (tdesc_i386_linux): Remove declaration.
1667 (get_ipa_tdesc): New function.
1668 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1669 initialize remaining tdescs.
1670 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1671 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1672 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1673 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1674 (x86_get_ipa_tdesc_idx): New function.
1675 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1676 * linux-x86-tdesc.h: New file.
1677 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1678 (target_get_ipa_tdesc_idx): New macro.
1679 * tracepoint.c (ipa_tdesc_idx): New macro.
1680 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1681 (symbol_list): Add ipa_tdesc_idx.
1682 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1683 (ipa_tdesc): Remove.
1684 (ipa_tdesc_idx): New variable.
1685 (get_context_regcache): Use get_ipa_tdesc.
1686 (gdb_collect): Ditto.
1687 (gdb_probe): Ditto.
1688 * tracepoint.h (get_ipa_tdesc): New prototype.
1689 (ipa_tdesc): Remove.
1690
e7ad2f14
PA
16912016-02-24 Pedro Alves <palves@redhat.com>
1692
1693 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1694 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1695 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1696 Factor out common code between the USE_SIGTRAP_SIGINFO and
1697 !USE_SIGTRAP_SIGINFO blocks.
1698 (linux_low_filter_event): Call save_stop_reason instead of
1699 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1700 Update comments.
1701 (linux_wait_1): Update comments.
1702
657f9cde
WW
17032016-02-24 Wei-cheng Wang <cole945@gmail.com>
1704
1705 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1706 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1707 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1708 ppc_insert_point, ppc_remove_point.
1709
b00b61e1
MK
17102016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1711
1712 * linux-s390-low.c (s390_supports_z_point_type): New function.
1713 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1714
553cb527
YQ
17152016-02-16 Yao Qi <yao.qi@linaro.org>
1716
1717 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1718 PC. Get pc from regcache_read_pc.
1719
a5652c21
YQ
17202016-02-12 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1723 or linux_get_pc_32bit.
1724 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1725
ed443b61
YQ
17262016-02-12 Yao Qi <yao.qi@linaro.org>
1727
1728 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1729 arm_linux_get_next_pcs_fixup.
1730
020ecd38
MK
17312016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1732
1733 * tracepoint.c (x_tracepoint_action_download): Change
1734 write_inferior_data_ptr to write_inferior_data_pointer.
1735 (cmd_qtstart): Likewise.
1736 (write_inferior_data_ptr): Remove.
1737 (download_agent_expr): Change write_inferior_data_ptr to
1738 write_inferior_data_pointer.
1739 (download_tracepoint_1): Likewise.
1740 (download_tracepoint): Likewise.
1741 (download_trace_state_variables): Likewise.
1742
7cae9051
WW
17432016-02-11 Wei-cheng Wang <cole945@gmail.com>
1744 Marcin Kościelnicki <koriakin@0x04.net>
1745
1746 * tracepoint.c (struct tracepoint_action_ops): Remove.
1747 (struct tracepoint_action): Remove ops.
1748 (m_tracepoint_action_download, r_tracepoint_action_download)
1749 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1750 size and offset accordingly.
1751 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1752 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1753 (tracepoint_action_send, tracepoint_action_download): New functions.
1754 Helpers for trace action handlers.
1755 (add_tracepoint_action): Remove setup actions ops.
1756 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1757
9f6a71b4
YQ
17582016-02-10 Yao Qi <yao.qi@linaro.org>
1759
1760 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1761
1e94266c
SM
17622016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1763
1764 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1765 to AC_OUTPUT.
1766 * configure: Regenerate.
1767
8adce034
SM
17682016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1769
1770 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1771 void * to gdb_byte *.
1772 * linux-low.c (siginfo_fixup): Likewise.
1773 (linux_xfer_siginfo): Likewise.
1774 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1775 Likewise.
1776 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1777
93813b37
WT
17782016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1779
1780 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1781 to srv_tgtobj.
1782 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1783 to srv_tgtobj.
1784 * linux-x86-low.c [__x86_64__]: Include
1785 "nat/amd64-linux-siginfo.h".
1786 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1787 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1788 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1789 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1790 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1791 (cpt_si_fd, si_timerid, si_overrun): Move from
1792 nat/amd64-linux-siginfo.c.
1793 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1794
8424cc97
SM
17952016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1796
1797 * server.c (skip_to_semicolon): Remove.
1798 (process_point_options): Use strchrnul instead of
1799 skip_to_semicolon.
1800
4d18591b
YQ
18012016-01-26 Yao Qi <yao.qi@linaro.org>
1802
1803 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1804 * linux-low.c (install_software_single_step_breakpoints): Don't
1805 call regcache_read_pc.
1806 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1807 argument pc.
1808
d8020970
YQ
18092016-01-26 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-low.c (install_software_single_step_breakpoints): Call
1812 regcache_read_pc instead of get_pc.
1813
8b207339
YQ
18142016-01-26 Yao Qi <yao.qi@linaro.org>
1815
1816 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1817 (unblock_async_io): Rename to ...
1818 (block_unblock_async_io): ... it. New function.
1819 (enable_async_io): Don't install SIGIO handler. Unblock it
1820 instead.
1821 (disable_async_io): Don't ignore SIGIO. Block it instead.
1822 (initialize_async_io): Install SIGIO handler. Don't call
1823 unblock_async_io.
1824
18879fef
YQ
18252016-01-26 Yao Qi <yao.qi@linaro.org>
1826
1827 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1828 first character is '\003', call *the_target->request_interrupt.
1829
a0f8e08a
YQ
18302016-01-25 Yao Qi <yao.qi@linaro.org>
1831
1832 * remote-utils.c (new_thread_notify): Remove.
1833 (dead_thread_notify): Likewise.
1834 * remote-utils.h (new_thread_notify): Remove declaration.
1835 (dead_thread_notify): Likewise.
1836
cc5fd9ab
MK
18372016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1838
1839 * gdb.trace/pending.exp: Fix expected message on continue.
1840
99e8eb11
MK
18412016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1842
1843 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1844 it works properly on big-endian machines where sizeof (CORE_ADDR)
1845 != sizeof (void *).
1846
a994041d
PA
18472016-01-21 Pedro Alves <palves@redhat.com>
1848
1849 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1850 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1851 * configure: Regenerate.
1852
f7a6a40d
YQ
18532016-01-21 Yao Qi <yao.qi@linaro.org>
1854
1855 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1856 is_thumb and set it according to CPSR saved on the stack.
1857 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1858 arm_sigreturn_next_pc.
1859
6f69e520
YQ
18602016-01-18 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-low.c (linux_set_pc_64bit): New function.
1863 (linux_get_pc_64bit): New function.
1864 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1865 Declare.
1866 * linux-sparc-low.c (debug_threads): Remove declaration.
1867 (sparc_get_pc): Remove.
1868 (the_low_target): Use linux_get_pc_64bit instead of
1869 sparc_get_pc.
1870 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1871 (the_low_target): Use linux_get_pc_64bit and
1872 linux_set_pc_64bit.
1873
276d4552
YQ
18742016-01-18 Yao Qi <yao.qi@linaro.org>
1875
1876 * linux-arm-low.c (debug_threads): Remove declaration.
1877 (arm_get_pc, arm_set_pc): Remove.
1878 (the_low_target): Use linux_get_pc_32bit and
1879 linux_set_pc_32bit.
1880 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1881 (the_low_target): Use linux_get_pc_32bit and
1882 linux_set_pc_32bit.
1883 * linux-cris-low.c (debug_threads): Remove declaration.
1884 (cris_get_pc, cris_set_pc,): Remove.
1885 (the_low_target): Use linux_get_pc_32bit and
1886 linux_set_pc_32bit.
1887 * linux-crisv32-low.c (debug_threads): Remove declaration.
1888 (cris_get_pc, cris_set_pc): Remove.
1889 (the_low_target): Use linux_get_pc_32bit and
1890 linux_set_pc_32bit.
1891 * linux-low.c: Include inttypes.h.
1892 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1893 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1894 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1895 (the_low_target): Use linux_get_pc_32bit and
1896 linux_set_pc_32bit.
1897 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1898 (the_low_target): Use linux_get_pc_32bit and
1899 linux_set_pc_32bit.
1900 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1901 (the_low_target): Use linux_get_pc_32bit and
1902 linux_set_pc_32bit.
1903 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1904 (the_low_target): Use linux_get_pc_32bit and
1905 linux_set_pc_32bit.
1906 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1907 (the_low_target): Use linux_get_pc_32bit and
1908 linux_set_pc_32bit.
1909
eb0edac8
GB
19102016-01-18 Gary Benson <gbenson@redhat.com>
1911
1912 * configure.ac (AC_FUNC_FORK): New check.
1913 * config.in: Regenerate.
1914 * configure: Likewise.
1915
1b451dda
YQ
19162016-01-14 Yao Qi <yao.qi@linaro.org>
1917
1918 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1919 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1920 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1921 arm_get_next_pcs_ctor.
1922
82075af2
JS
19232016-01-12 Josh Stone <jistone@redhat.com>
1924 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1925
1926 * inferiors.h: Include "gdb_vecs.h".
1927 (struct process_info): Add syscalls_to_catch.
1928 * inferiors.c (remove_process): Free syscalls_to_catch.
1929 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1930 syscall_return stops.
1931 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1932 * server.c (handle_general_set): Handle QCatchSyscalls.
1933 (handle_query): Report support for QCatchSyscalls.
1934 * target.h (struct target_ops): Add supports_catch_syscall.
1935 (target_supports_catch_syscall): New macro.
1936 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1937 (struct lwp_info): Add syscall_state.
1938 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1939 Maintain syscall_state and syscalls_to_catch across exec.
1940 (get_syscall_trapinfo): New function, proxy to the_low_target.
1941 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1942 (linux_low_filter_event): Toggle syscall_state entry/return for
1943 syscall traps, and set it ignored for all others.
1944 (gdb_catching_syscalls_p): New function.
1945 (gdb_catch_this_syscall_p): New function.
1946 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1947 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1948 (linux_supports_catch_syscall): New function.
1949 (linux_target_ops): Install it.
1950 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1951 (the_low_target): Install it.
1952
8f13a3ce
MF
19532016-01-12 Mike Frysinger <vapier@gentoo.org>
1954
1955 * acinclude.m4: Include new ../warning.m4 file.
1956 * configure: Regenerated.
1957 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1958
5b3da067
MF
19592016-01-12 Mike Frysinger <vapier@gentoo.org>
1960
1961 * ax.c (is_goto_target): Mark static.
1962 * linux-low.c (register_addr): Likewise.
1963 (linux_fetch_registers, linux_store_registers): Likewise.
1964 * mem-break.c (any_persistent_commands): Fix old prototype.
1965 (add_commands_to_breakpoint): Mark static.
1966 * regcache.c (find_register_by_name): Delete unused func.
1967 * remote-utils.c (hex_or_minus_one): Mark static.
1968 * server.c (monitor_show_help): Mark static.
1969 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1970 handle_v_requests): Likewise.
1971
bc504a31
PA
19722016-01-12 Pedro Alves <palves@redhat.com>
1973
1974 Remove use of the registered trademark symbol throughout.
1975
5a0dd67a
YQ
19762016-01-08 Yao Qi <yao.qi@linaro.org>
1977
1978 * remote-utils.c (getpkt): If c is '\003', call target hook
1979 request_interrupt.
1980
b2ca446f
YQ
19812016-01-06 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1984 linux-aarch32-low.c.
1985 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1986 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1987 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1988 (thumb2_breakpoint): Declare.
1989 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1990 linux-aarch32-low.h.
1991 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1992 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1993 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1994
edd88788
JB
19952016-01-01 Joel Brobecker <brobecker@adacore.com>
1996
1997 * gdbreplay.c (gdbreplay_version): Change copyright year in
1998 version message.
1999 * server.c (gdbserver_version): Likewise.
2000
65da7f14
PP
20012015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2002
2003 * server.c (crc32_table): Delete.
2004 (crc32): Use libiberty's xcrc32 function.
2005
4abd5ed2
JB
20062015-12-22 Joel Brobecker <brobecker@adacore.com>
2007
2008 * lynx-low.c (lynx_delete_thread_callback): New function.
2009 (lynx_mourn): Properly delete our process and all of its
2010 threads. Remove call to clear_inferiors.
2011
0e50fe5c
JB
20122015-12-22 Joel Brobecker <brobecker@adacore.com>
2013
2014 * target.c (thread_search_callback): Add check that
2015 the thread_stopped target callback is not NULL before
2016 calling it.
2017
35adc03f
YQ
20182015-12-21 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2021 arm breakpoint.
2022
bd2b2909
AT
20232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2024
2025 * server.c (handle_query): Call target_supports_software_single_step.
2026
7fe5e27e
AT
20272015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2028
2029 * linux-low.c (single_step): New function.
2030 (linux_resume_one_lwp_throw): Call single_step.
2031 (start_step_over): Likewise.
2032
d9311bfa
AT
20332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2034
2035 * Makefile.in (SFILES): Append arch/arm-linux.c,
2036 arch/arm-get-next-pcs.c.
2037 (arm-linux.o): New rule.
2038 (arm-get-next-pcs.o): New rule.
2039 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2040 arm-linux.o.
2041 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2042 to linux-aarch32-low.c.
2043 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2044 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2045 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2046 (thumb2_breakpoint_len): Likewise.
2047 (arm_is_thumb_mode): Make non-static.
2048 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2049 from linux-aarch32-low.c.
2050 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2051 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2052 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2053 (thumb2_breakpoint_len): Likewise.
2054 (arm_is_thumb_mode): New declaration.
2055 * linux-arm-low.c: Include arch/arm-linux.h
2056 aarch/arm-get-next-pcs.h, sys/syscall.h.
2057 (get_next_pcs_ops): New struct.
2058 (get_next_pcs_addr_bits_remove): New function.
2059 (get_next_pcs_is_thumb): New function.
2060 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2061 (arm_sigreturn_next_pc): Likewise.
2062 (get_next_pcs_syscall_next_pc): Likewise.
2063 (arm_gdbserver_get_next_pcs): Likewise.
2064 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2065 Initialize.
2066 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2067 * server.h: Include gdb_vecs.h.
2068
68ce2059
AT
20692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2070
2071 * Makefile.in (SFILES): Append common/common-regcache.c.
2072 (OBS): Append common-regcache.o.
2073 (common-regcache.o): New rule.
2074 * regcache.c (init_register_cache): Initialize cache to
2075 REG_UNAVAILABLE.
2076 (regcache_raw_read_unsigned): New function.
2077 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2078 register_status enum.
2079
fa5308bd
AT
20802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2081
2082 * linux-aarch64-low.c (the_low_targets): Rename
2083 breakpoint_reinsert_addr to get_next_pcs.
2084 * linux-arm-low.c (the_low_targets): Likewise.
2085 * linux-bfin-low.c (the_low_targets): Likewise.
2086 * linux-cris-low.c (the_low_targets): Likewise.
2087 * linux-crisv32-low.c (the_low_targets): Likewise.
2088 * linux-low.c (can_software_single_step): Likewise.
2089 (install_software_single_step_breakpoints): New function.
2090 (start_step_over): Use install_software_single_step_breakpoints.
2091 * linux-low.h: New CORE_ADDR vector.
2092 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2093 get_next_pcs.
2094 * linux-mips-low.c (the_low_targets): Likewise.
2095 * linux-nios2-low.c (the_low_targets): Likewise.
2096 * linux-sparc-low.c (the_low_targets): Likewise.
2097
4a6ed09b
PA
20982015-12-17 Pedro Alves <palves@redhat.com>
2099
2100 * linux-low.c (linux_kill_one_lwp): Remove references to
2101 LinuxThreads.
2102 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2103 to 'kill'.
2104 (linux_init_signals): Delete.
2105 (initialize_low): Adjust.
2106 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2107
7544db95
PA
21082015-12-16 Pedro Alves <palves@redhat.com>
2109
2110 * configure.ac (compiler warning flags): When testing a
2111 -Wno-foo option, check whether -Wfoo works instead.
2112 * configure: Regenerate.
2113
8020350c
DB
21142015-12-11 Don Breazeal <donb@codesourcery.com>
2115
2116 * server.c (process_serial_event): Don't exit from gdbserver
2117 in remote mode if there are still active inferiors.
2118
db91f502
YQ
21192015-12-11 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2122 arm_breakpoint_at if the process is 32-bit.
2123
b37a6290
YQ
21242015-12-11 Yao Qi <yao.qi@linaro.org>
2125
2126 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2127 arm breakpoint.
2128
17b1509a
YQ
21292015-12-07 Yao Qi <yao.qi@linaro.org>
2130
2131 * configure.srv: Append arm.o to srv_tgtobj for
2132 aarch64*-*-linux* target.
2133 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2134 from linux-arm-low.c.
2135 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2136 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2137 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2138 (thumb2_breakpoint_len): Likewise.
2139 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2140 (arm_breakpoint_kinds): Likewise.
2141 (arm_breakpoint_kind_from_pc): Likewise.
2142 (arm_sw_breakpoint_from_kind): Likewise.
2143 (arm_breakpoint_kind_from_current_state): Likewise.
2144 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2145 (arm_sw_breakpoint_from_kind): Declare.
2146 (arm_breakpoint_kind_from_current_state): Declare.
2147 (arm_breakpoint_at): Declare.
2148 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2149 arm_sw_breakpoint_from_kind if process is 32-bit.
2150 (aarch64_breakpoint_kind_from_pc): New function.
2151 (aarch64_breakpoint_kind_from_current_state): New function.
2152 (the_low_target): Initialize fields breakpoint_kind_from_pc
2153 and breakpoint_kind_from_current_state.
2154 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2155 linux-aarch32-low.c.
2156 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2157 (arm_breakpoint, arm_breakpoint_len): Likewise.
2158 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2159 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2160 (arm_is_thumb_mode): Likewise.
2161 (arm_breakpoint_at): Likewise.
2162 (arm_breakpoint_kind_from_pc): Likewise.
2163 (arm_sw_breakpoint_from_kind): Likewise.
2164 (arm_breakpoint_kind_from_current_state): Likewise.
2165
2166 Revert:
2167 2015-08-04 Yao Qi <yao.qi@linaro.org>
2168
2169 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2170 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2171 * server.c (extended_protocol): Remove "static".
2172 * server.h (extended_protocol): Declare it.
2173
ece66d65
JS
21742015-12-04 Josh Stone <jistone@redhat.com>
2175
2176 * target.h (struct target_ops) <arch_setup>: Rename to ...
2177 (struct target_ops) <post_create_inferior>: ... this.
2178 (target_arch_setup): Rename to ...
2179 (target_post_create_inferior): ... this, calling post_create_inferior.
2180 * server.c (start_inferior): Update target_arch_setup calls to
2181 target_post_create_inferior.
2182 * linux-low.c (linux_low_ptrace_options): Forward declare.
2183 (linux_arch_setup): Update its comment for general use.
2184 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2185 (struct linux_target_ops): Use linux_post_create_inferior.
2186 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2187 to post_create_inferior.
2188 * nto-low.c (struct nto_target_ops): Likewise.
2189 * spu-low.c (struct spu_target_ops): Likewise.
2190 * win32-low.c (struct win32_target_ops): Likewise.
2191
e58c48b4
AT
21922015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2193
2194 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2195
fbec8956
AT
21962015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2197
2198 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2199 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2200 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2201 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2202 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2203 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2204 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2205 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2206 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2207 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2208 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2209 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2210
9b4c5f87
AT
22112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2212
2213 * linux-low.c (linux_look_up_symbols): Don't call
2214 linux_supports_traceclone.
2215 * linux-low.h (thread_db_init): Remove use_events argument.
2216 * thread-db.c (thread_db_use_event): Remove global variable.
2217 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2218 (struct thread_db) <td_create_bp>: Remove field.
2219 (thread_db_create_event): Remove function.
2220 (thread_db_enable_reporting): Likewise.
2221 (find_one_thread): Don't check for thread_db_use_events.
2222 (attach_thread): Likewise.
2223 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2224 (try_thread_db_load_1): Don't check for thread_db_use_events.
2225 (thread_db_init): Remove use_events argument and thread events
2226 handling.
2227 (remove_thread_event_breakpoints): Remove function.
2228 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2229
7d00775e
AT
22302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2231
2232 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2233 New function.
2234 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2235 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2236 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2237 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2238 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2239 Initialize.
2240 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2241 New function.
2242 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2243 * linux-low.c (can_hardware_single_step): Use
2244 supports_hardware_single_step.
2245 (can_software_single_step): New function.
2246 (start_step_over): Call can_software_single_step.
2247 (linux_supports_hardware_single_step): New function.
2248 (struct target_ops) <supports_software_single_step>: Initialize.
2249 * linux-low.h (struct linux_target_ops)
2250 <supports_hardware_single_step>: Initialize.
2251 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2252 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2253 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2254 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2255 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2256 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2257 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2259 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2260 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2261 Initialize.
2262 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2263 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2264 Initialize.
2265 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2266 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2267 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2268 New function.
2269 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2270 * target.h (struct target_ops): <supports_software_single_step>:
2271 New field.
2272 (target_supports_software_single_step): New macro.
2273
2d97cd35
AT
22742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2275
2276 * linux-low.c (linux_wait_1): Fix pc advance condition.
2277 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2278 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2279
769ef81f
AT
22802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2281
2282 * linux-arm-low.c (arm_is_thumb_mode): New function.
2283 (arm_breakpoint_at): Use arm_is_thumb_mode.
2284 (arm_breakpoint_kind_from_current_state): New function.
2285 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2286 Initialize.
2287 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2288 (linux_breakpoint_kind_from_current_state): New function.
2289 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2290 * linux-low.h (struct linux_target_ops)
2291 <breakpoint_kind_from_current_state>: New field.
2292 * target.h (struct target_ops): Likewise.
2293 (target_breakpoint_kind_from_current_state): New macro.
2294
1bebeeca
PA
22952015-11-30 Pedro Alves <palves@redhat.com>
2296
2297 * linux-low.c (linux_resume): Wake up the event loop before
2298 returning.
2299
a67a9fae
PA
23002015-11-30 Pedro Alves <palves@redhat.com>
2301
2302 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2303 check.
2304 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2305 to -1.
2306 * target.c (struct thread_search): New structure.
2307 (thread_search_callback): New function.
2308 (prev_general_thread): New global.
2309 (prepare_to_access_memory, done_accessing_memory): New functions.
2310 * target.h (prepare_to_access_memory, done_accessing_memory):
2311 Replace macros with function declarations.
2312
f2faf941
PA
23132015-11-30 Pedro Alves <palves@redhat.com>
2314
2315 PR 14618
2316 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2317 report TARGET_WAITKIND_NO_RESUMED.
2318 * remote-utils.c (prepare_resume_reply): Handle
2319 TARGET_WAITKIND_NO_RESUMED.
2320 * server.c (report_no_resumed): New global.
2321 (handle_query) <qSupported>: Handle "no-resumed+". Report
2322 "no-resumed+" support.
2323 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2324 return error if the client doesn't support no-resumed events.
2325 (push_stop_notification): New function.
2326 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2327 events if the client supports them.
2328
a681f9c9
PA
23292015-11-30 Pedro Alves <palves@redhat.com>
2330
2331 * linux-low.c (thread_still_has_status_pending_p): Don't check
2332 vCont;t here.
2333 (lwp_resumed): New function.
2334 (status_pending_p_callback): Return early if the LWP is not
2335 supposed to be resumed.
2336
65706a29
PA
23372015-11-30 Pedro Alves <palves@redhat.com>
2338
2339 * linux-low.c (handle_extended_wait): Assert that the LWP's
2340 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2341 thread create events, leave the new child's status pending.
2342 (linux_low_filter_event): If GDB wants to hear about thread exit
2343 events, leave the LWP marked dead and don't delete it.
2344 (linux_wait_for_event_filtered): Don't check for thread exit.
2345 (filter_exit_event): New function.
2346 (linux_wait_1): Use it, when returning an exit event.
2347 (linux_resume_one_lwp_throw): Assert that the LWP's
2348 waitstatus is TARGET_WAITKIND_IGNORE.
2349 * remote-utils.c (prepare_resume_reply): Handle
2350 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2351 * server.c (report_thread_events): New global.
2352 (handle_general_set): Handle QThreadEvents.
2353 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2354 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2355 TARGET_WAITKIND_THREAD_EXITED.
2356 * server.h (report_thread_events): Declare.
2357
56cf4bed
PA
23582015-11-30 Pedro Alves <palves@redhat.com>
2359
2360 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2361 the thread's last_resume_kind was resume_stop.
2362
500c1d85
PA
23632015-11-30 Pedro Alves <palves@redhat.com>
2364
2365 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2366 before returning.
2367
de979965
PA
23682015-11-30 Pedro Alves <palves@redhat.com>
2369
2370 * server.c (handle_v_requests): Handle vCtrlC.
2371
34c65914
PA
23722015-11-30 Pedro Alves <palves@redhat.com>
2373
2374 * gdbthread.h (find_any_thread_of_pid): Declare.
2375 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2376 functions.
2377 * server.c (handle_query): If current_thread is NULL, look for
2378 another thread of the selected process.
2379
79efa585 23802015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2381 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2382
2383 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2384 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2385 name in reply.
2386 * target.h (struct target_ops) <thread_name>: New field.
2387 (target_thread_name): New macro.
2388
80d82c19
JB
23892015-11-23 Joel Brobecker <brobecker@adacore.com>
2390
2391 * regcache.h (regcache_invalidate_pid): Add declaration.
2392 * regcache.c (regcache_invalidate_pid): New function, extracted
2393 from regcache_invalidate.
2394 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2395 Add trivial documentation comment.
2396 * lynx-low.c: Use regcache_invalidate_pid instead of
2397 regcache_invalidate.
2398
64da5dd5
JB
23992015-11-23 Joel Brobecker <brobecker@adacore.com>
2400
2401 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2402 and Elf64_auxv_t if the target is Android.
2403
37ce4055
DE
24042015-11-22 Doug Evans <xdje42@gmail.com>
2405
2406 * target.h: #include <sys/types.h>.
2407
06e03fff
PA
24082015-11-19 Pedro Alves <palves@redhat.com>
2409
2410 * linux-low.c (linux_process_qsupported): Change prototype.
2411 Adjust.
2412 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2413 Change prototype.
2414 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2415 and adjust to loop over all features.
2416 * server.c (handle_query) <qSupported>: Adjust to call
2417 target_process_qsupported once, passing it a vector of unprocessed
2418 features.
2419 * target.h (struct target_ops) <process_qsupported>: Change
2420 prototype.
2421 (target_process_qsupported): Adjust.
2422
9a084706
PA
24232015-11-19 Pedro Alves <palves@redhat.com>
2424
2425 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2426 mode.
2427 * configure: Regenerate.
2428
dad44a1f
PA
24292015-11-19 Pedro Alves <palves@redhat.com>
2430
2431 * configure: Regenerate.
2432
231c0592
YQ
24332015-11-19 Yao Qi <yao.qi@linaro.org>
2434
2435 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2436 type to uint32_t.
2437
6c1c9a8b
YQ
24382015-11-19 Yao Qi <yao.qi@linaro.org>
2439
2440 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2441 (struct aarch64_operand): Move enum out.
2442
9caa3311
YQ
24432015-11-19 Yao Qi <yao.qi@linaro.org>
2444
2445 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2446 struct user_fpsimd_state *.
2447 (aarch64_store_fpregset): Likewise.
2448
6a69a054
YQ
24492015-11-19 Yao Qi <yao.qi@linaro.org>
2450
2451 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2452 struct user_pt_regs *.
2453 (aarch64_store_gregset): Likewise.
2454
1798301e
PA
24552015-11-18 Pedro Alves <palves@redhat.com>
2456
2457 * Makefile.in (all_object_files): Add $IPA_OBJS.
2458
ce7715e2
PA
24592015-11-17 Pedro Alves <palves@redhat.com>
2460
2461 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2462 GDB_SIGNAL_0 and gdb_signal_to_string.
2463
c0879059
PA
24642015-11-17 Pedro Alves <palves@redhat.com>
2465
2466 * win32-low.c (handle_output_debug_string): Remove parameter.
2467 (win32_kill): Remove our_status local and adjust call to
2468 handle_output_debug_string.
2469 (get_child_debug_event): Adjust call to
2470 handle_output_debug_string.
2471
1996e237
SM
24722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2473
2474 * linux-mips-low.c (mips_fill_gregset): Add cast.
2475 (mips_store_gregset): Likewise.
2476 (mips_fill_fpregset): Likewise.
2477 (mips_store_fpregset): Likewise.
2478
cbec665b
SM
24792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2480
2481 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2482 priv.
2483
eb3e3c67
SM
24842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2485
2486 * linux-mips-low.c (mips_linux_new_thread): Change type of
2487 watch_type to enum target_hw_bp_type.
2488
171de4b8
SM
24892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2490
2491 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2492 Change return type to arm_hwbp_type.
2493
04248ead
SM
24942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2495
2496 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2497 (arm_store_gregset): Likewise.
2498 * linux-arm-low.c (arm_get_hwcap): Likewise.
2499 (arm_read_description): Likewise.
2500
04b3479c
SM
25012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2502
2503 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2504
2bc84e8a
SM
25052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2506
2507 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2508 (ppc_fill_vsxregset): Likewise.
2509 (ppc_store_vsxregset): Likewise.
2510 (ppc_fill_vrregset): Likewise.
2511 (ppc_store_vrregset): Likewise.
2512 (ppc_fill_evrregset): Likewise.
2513 (ppc_store_evrregset): Likewise.
2514
e6c5bb05
SM
25152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2516
2517 * linux-ppc-low.c (ppc_usrregs_info): Remove
2518 forward-declaration.
2519 (ppc_arch_setup): Move lower in file.
2520
7ea45d72
SM
25212015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2522
2523 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2524 (ps_pdwrite): Likewise.
2525
69291610
HW
25262015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2527
2528 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2529 to after assert checks.
2530
b42945fd
SM
25312015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2532
2533 * proc-service.c (ps_pdread): Add/adjust casts.
2534 (ps_pdwrite): Add/adjust casts.
2535
d6f85c84
SM
25362015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2537
2538 * server.c (handle_search_memory_1): Cast return value of
2539 memmem.
2540
f98cd059
SM
25412015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2542
2543 * server.c (write_qxfer_response): Change type of data to
2544 gdb_byte *.
2545
d2412fa5
PA
25462015-10-29 Pedro Alves <palves@redhat.com>
2547
2548 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2549
c17414a2
PA
25502015-10-29 Pedro Alves <palves@redhat.com>
2551
2552 * tracepoint.c (clear_installed_tracepoints): Add casts.
2553
e053fbc4
PA
25542015-10-29 Pedro Alves <palves@redhat.com>
2555
2556 * server.c (handle_v_cont, process_serial_event): Add enum
2557 gdb_signal casts to signal parsing code.
2558
add67df8
PA
25592015-10-29 Pedro Alves <palves@redhat.com>
2560
2561 * linux-low.h (NULL_REGSET): Define.
2562 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2563 * linux-arm-low.c (arm_regsets): Likewise.
2564 * linux-crisv32-low.c (cris_regsets): Likewise.
2565 * linux-m68k-low.c (m68k_regsets): Likewise.
2566 * linux-mips-low.c (mips_regsets): Likewise.
2567 * linux-nios2-low.c (nios2_regsets): Likewise.
2568 * linux-ppc-low.c (ppc_regsets): Likewise.
2569 * linux-s390-low.c (s390_regsets): Likewise.
2570 * linux-sh-low.c (sh_regsets): Likewise.
2571 * linux-sparc-low.c (sparc_regsets): Likewise.
2572 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2573 * linux-tile-low.c (tile_regsets): Likewise.
2574 * linux-x86-low.c (x86_regsets): Likewise.
2575 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2576
50bc912a
PA
25772015-10-29 Pedro Alves <palves@redhat.com>
2578
2579 * linux-low.h (NULL_REGSET): Define.
2580 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2581 * linux-arm-low.c (arm_regsets): Likewise.
2582 * linux-crisv32-low.c (cris_regsets): Likewise.
2583 * linux-m68k-low.c (m68k_regsets): Likewise.
2584 * linux-mips-low.c (mips_regsets): Likewise.
2585 * linux-nios2-low.c (nios2_regsets): Likewise.
2586 * linux-ppc-low.c (ppc_regsets): Likewise.
2587 * linux-s390-low.c (s390_regsets): Likewise.
2588 * linux-sh-low.c (sh_regsets): Likewise.
2589 * linux-sparc-low.c (sparc_regsets): Likewise.
2590 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2591 * linux-tile-low.c (tile_regsets): Likewise.
2592 * linux-x86-low.c (x86_regsets): Likewise.
2593 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2594
682b2546
DE
25952015-10-26 Doug Evans <dje@google.com>
2596
2597 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2598
963843d4
DE
25992015-10-26 Doug Evans <dje@google.com>
2600
2601 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2602
d41401ac
DE
26032015-10-26 Doug Evans <dje@google.com>
2604
2605 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2606 for debug_printf.
2607 (attach_thread, find_new_threads_callback): Ditto.
2608
3db28855
AT
26092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2610
2611 * mem-break.h (set_breakpoint_data): Remove.
2612
fb78e89c
AT
26132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2614
2615 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2616 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2617 (initialize_low): Remove set_breakpoint_data call.
2618 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2619 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2620 (initialize_low): Remove set_breakpoint_data call.
2621 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2622 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2623 (initialize_low): Remove set_breakpoint_data call.
2624
2e6ee069
AT
26252015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2626
2627 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2628 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2629 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2630 * target.h (target_breakpoint_kind_from_pc): New macro.
2631
1652a986
AT
26322015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2633
2634 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2635 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2636 the default breakpoint kind.
2637
abeead09
AT
26382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2639
2640 * linux-arm-low.c (arm_supports_z_point_type): Add software
2641 breakpoint support.
2642
b0b4b501
AT
26432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2644
2645 * linux-arm-low.c: Refactor breakpoint definitions.
2646 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2647 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2648
8689682c
AT
26492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2650
2651 * Makefile.in: Add arm.c/o.
2652 * configure.srv: Likewise.
2653 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2654 (arm_breakpoint_kind_from_pc): New function.
2655 (arm_sw_breakpoint_from_kind): Return proper kind.
2656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2657
27165294
AT
26582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2659
2660 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2661 removal.
2662 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2663 (struct raw_breakpoint) <size>: Remove.
2664 (struct raw_breakpoint) <kind>: Add.
2665 (bp_size): New function.
2666 (bp_opcode): Likewise.
2667 (find_raw_breakpoint_at): Adjust for kind.
2668 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2669 (remove_memory_breakpoint): Adjust for kind call bp_size.
2670 (set_raw_breakpoint_at): Adjust for kind.
2671 (set_breakpoint): Likewise.
2672 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2673 (delete_raw_breakpoint): Adjust for kind.
2674 (delete_breakpoint): Likewise.
2675 (find_gdb_breakpoint): Likewise.
2676 (set_gdb_breakpoint_1): Likewise.
2677 (set_gdb_breakpoint): Likewise.
2678 (delete_gdb_breakpoint_1): Likewise.
2679 (delete_gdb_breakpoint): Likewise.
2680 (uninsert_raw_breakpoint): Likewise.
2681 (reinsert_raw_breakpoint): Likewise.
2682 (set_breakpoint_data): Remove.
2683 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2684 (check_mem_read): Adjust for kind call bp_size.
2685 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2686 (clone_one_breakpoint): Adjust for kind.
2687 * mem-break.h (set_gdb_breakpoint): Likewise.
2688 (delete_gdb_breakpoint): Likewise.
2689 * server.c (process_serial_event): Likewise.
2690
dd373349
AT
26912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2692
2693 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2694 (struct linux_target_ops) <breakpoint>: Remove.
2695 (struct linux_target_ops) <breakpoint_len>: Remove.
2696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2698 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2699 (arm_sw_breakpoint_from_kind): New function.
2700 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2701 (struct linux_target_ops) <breakpoint>: Remove.
2702 (struct linux_target_ops) <breakpoint_len>: Remove.
2703 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2704 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2705 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2706 (struct linux_target_ops) <breakpoint>: Remove.
2707 (struct linux_target_ops) <breakpoint_len>: Remove.
2708 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2709 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2710 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2711 (struct linux_target_ops) <breakpoint>: Remove.
2712 (struct linux_target_ops) <breakpoint_len>: Remove.
2713 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2715 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2716 and sw_breakpoint_from_kind to increment the pc.
2717 (linux_breakpoint_kind_from_pc): New function.
2718 (linux_sw_breakpoint_from_kind): New function.
2719 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2720 (initialize_low): Call breakpoint_kind_from_pc and
2721 sw_breakpoint_from_kind to replace breakpoint_data/len.
2722 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2723 New field.
2724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2725 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2726 (struct linux_target_ops) <breakpoint>: Remove.
2727 (struct linux_target_ops) <breakpoint_len>: Remove.
2728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2730 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2731 (struct linux_target_ops) <breakpoint>: Remove.
2732 (struct linux_target_ops) <breakpoint_len>: Remove.
2733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2735 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2736 (struct linux_target_ops) <breakpoint>: Remove.
2737 (struct linux_target_ops) <breakpoint_len>: Remove.
2738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2740 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2741 (struct linux_target_ops) <breakpoint>: Remove.
2742 (struct linux_target_ops) <breakpoint_len>: Remove.
2743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2745 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2746 (struct linux_target_ops) <breakpoint>: Remove.
2747 (struct linux_target_ops) <breakpoint_len>: Remove.
2748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2750 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2751 (struct linux_target_ops) <breakpoint>: Remove.
2752 (struct linux_target_ops) <breakpoint_len>: Remove.
2753 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2754 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2755 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2756 (struct linux_target_ops) <breakpoint>: Remove.
2757 (struct linux_target_ops) <breakpoint_len>: Remove.
2758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2760 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2761 (struct linux_target_ops) <breakpoint>: Remove.
2762 (struct linux_target_ops) <breakpoint_len>: Remove.
2763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2765 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2766 (struct linux_target_ops) <breakpoint>: Remove.
2767 (struct linux_target_ops) <breakpoint_len>: Remove.
2768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2770 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2771 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2772 (struct linux_target_ops) <breakpoint>: Remove.
2773 (struct linux_target_ops) <breakpoint_len>: Remove.
2774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2776 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2777 (struct linux_target_ops) <breakpoint>: Remove.
2778 (struct linux_target_ops) <breakpoint_len>: Remove.
2779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2781
4cd98a19
AT
27822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2783
2784 * linux-cris-low.c (cris_get_pc): Remove void arg.
2785
774ee6d2
AR
27862015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2787
2788 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2789 variable name.
2790
833dcd29
AR
27912015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2792
2793 * inferiors.c (thread_pid_matches_callback): New function.
2794 (find_thread_process): New function.
2795 (remove_thread): Reset current_thread.
2796 (remove_process): Assert threads have been removed first.
2797
8d689ee5
YQ
27982015-10-15 Yao Qi <yao.qi@linaro.org>
2799
2800 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2801 if it is 3.
2802 (aarch64_remove_point): Likewise.
2803 * regcache.c (regcache_register_size): New function.
2804
1c2e1515
YQ
28052015-10-12 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-aarch64-low.c: Update all callers as emit_load_store
2808 is renamed to aarch64_emit_load_store.
2809
e1c587c3
YQ
28102015-10-12 Yao Qi <yao.qi@linaro.org>
2811
2812 * linux-aarch64-low.c: Update all callers of function renaming
2813 from emit_insn to aarch64_emit_insn.
2814
b6542f81
YQ
28152015-10-12 Yao Qi <yao.qi@linaro.org>
2816
2817 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2818 arch/aarch64-insn.h.
2819 (struct aarch64_memory_operand): Likewise.
2820 (ENCODE): Likewise.
2821 (emit_insn): Move to arch/aarch64-insn.c.
2822 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2823 (emit_load_store): Move to arch/aarch64-insn.c.
2824 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2825 (can_encode_int32): Remove.
2826
246994ce
YQ
28272015-10-12 Yao Qi <yao.qi@linaro.org>
2828
2829 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2830 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2831 (aarch64_relocate_instruction): Likewise.
2832 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2833 (struct aarch64_insn_visitor): Likewise.
2834
0badd99f
YQ
28352015-10-12 Yao Qi <yao.qi@linaro.org>
2836
2837 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2838 (struct aarch64_insn_visitor): New.
2839 (struct aarch64_insn_relocation_data): New.
2840 (aarch64_ftrace_insn_reloc_b): New function.
2841 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2842 (aarch64_ftrace_insn_reloc_cb): Likewise.
2843 (aarch64_ftrace_insn_reloc_tb): Likewise.
2844 (aarch64_ftrace_insn_reloc_adr): Likewise.
2845 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2846 (aarch64_ftrace_insn_reloc_others): Likewise.
2847 (visitor): New.
2848 (aarch64_relocate_instruction): Use visitor.
2849
dfaffe9d
YQ
28502015-10-12 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2853 int. Add argument buf.
2854 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2855 aarch64_relocate_instruction.
2856
70b439f0
YQ
28572015-10-12 Yao Qi <yao.qi@linaro.org>
2858
2859 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2860 argument insn. Remove local variable insn. Don't call
2861 target_read_uint32.
2862 (aarch64_install_fast_tracepoint_jump_pad): Call
2863 target_read_uint32.
2864
7781c06f
YQ
28652015-09-30 Yao Qi <yao.qi@linaro.org>
2866
2867 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2868 (emit_load_store_pair): Likewise.
2869
9a3c8263
SM
28702015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2871
2872 * dll.c (match_dll): Add cast(s).
2873 (unloaded_dll): Likewise.
2874 * linux-low.c (second_thread_of_pid_p): Likewise.
2875 (delete_lwp_callback): Likewise.
2876 (count_events_callback): Likewise.
2877 (select_event_lwp_callback): Likewise.
2878 (linux_set_resume_request): Likewise.
2879 * server.c (accumulate_file_name_length): Likewise.
2880 (emit_dll_description): Likewise.
2881 (handle_qxfer_threads_worker): Likewise.
2882 (visit_actioned_threads): Likewise.
2883 * thread-db.c (any_thread_of): Likewise.
2884 * tracepoint.c (same_process_p): Likewise.
2885 (match_blocktype): Likewise.
2886 (build_traceframe_info_xml): Likewise.
2887
224c3ddb
SM
28882015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2889
2890 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2891 assignment.
2892 (gdb_unparse_agent_expr): Likewise.
2893 * hostio.c (require_data): Likewise.
2894 (handle_pread): Likewise.
2895 * linux-low.c (disable_regset): Likewise.
2896 (fetch_register): Likewise.
2897 (store_register): Likewise.
2898 (get_dynamic): Likewise.
2899 (linux_qxfer_libraries_svr4): Likewise.
2900 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2901 (set_fast_tracepoint_jump): Likewise.
2902 (uninsert_fast_tracepoint_jumps_at): Likewise.
2903 (reinsert_fast_tracepoint_jumps_at): Likewise.
2904 (validate_inserted_breakpoint): Likewise.
2905 (clone_agent_expr): Likewise.
2906 * regcache.c (init_register_cache): Likewise.
2907 * remote-utils.c (putpkt_binary_1): Likewise.
2908 (decode_M_packet): Likewise.
2909 (decode_X_packet): Likewise.
2910 (look_up_one_symbol): Likewise.
2911 (relocate_instruction): Likewise.
2912 (monitor_output): Likewise.
2913 * server.c (handle_search_memory): Likewise.
2914 (handle_qxfer_exec_file): Likewise.
2915 (handle_qxfer_libraries): Likewise.
2916 (handle_qxfer): Likewise.
2917 (handle_query): Likewise.
2918 (handle_v_cont): Likewise.
2919 (handle_v_run): Likewise.
2920 (captured_main): Likewise.
2921 * target.c (write_inferior_memory): Likewise.
2922 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2923 * tracepoint.c (init_trace_buffer): Likewise.
2924 (add_tracepoint_action): Likewise.
2925 (add_traceframe): Likewise.
2926 (add_traceframe_block): Likewise.
2927 (cmd_qtdpsrc): Likewise.
2928 (cmd_qtdv): Likewise.
2929 (cmd_qtstatus): Likewise.
2930 (response_source): Likewise.
2931 (response_tsv): Likewise.
2932 (cmd_qtnotes): Likewise.
2933 (gdb_collect): Likewise.
2934 (initialize_tracepoint): Likewise.
2935
afbe19f8
PL
29362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2937
2938 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2939 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2940 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2941 <NOP>: New.
2942 (enum aarch64_condition_codes): New enum.
2943 (w0): New static global.
2944 (fp): Likewise.
2945 (lr): Likewise.
2946 (struct aarch64_memory_operand) <type>: New
2947 MEMORY_OPERAND_POSTINDEX type.
2948 (postindex_memory_operand): New helper function.
2949 (emit_ret): New function.
2950 (emit_load_store_pair): New function, factored out of emit_stp
2951 with support for MEMORY_OPERAND_POSTINDEX.
2952 (emit_stp): Rewrite using emit_load_store_pair.
2953 (emit_ldp): New function.
2954 (emit_load_store): Likewise.
2955 (emit_ldr): Mention post-index instruction in comment.
2956 (emit_ldrh): New function.
2957 (emit_ldrb): New function.
2958 (emit_ldrsw): Mention post-index instruction in comment.
2959 (emit_str): Likewise.
2960 (emit_subs): New function.
2961 (emit_cmp): Likewise.
2962 (emit_and): Likewise.
2963 (emit_orr): Likewise.
2964 (emit_orn): Likewise.
2965 (emit_eor): Likewise.
2966 (emit_mvn): Likewise.
2967 (emit_lslv): Likewise.
2968 (emit_lsrv): Likewise.
2969 (emit_asrv): Likewise.
2970 (emit_mul): Likewise.
2971 (emit_sbfm): Likewise.
2972 (emit_sbfx): Likewise.
2973 (emit_ubfm): Likewise.
2974 (emit_ubfx): Likewise.
2975 (emit_csinc): Likewise.
2976 (emit_cset): Likewise.
2977 (emit_nop): Likewise.
2978 (emit_ops_insns): New helper function.
2979 (emit_pop): Likewise.
2980 (emit_push): Likewise.
2981 (aarch64_emit_prologue): New function.
2982 (aarch64_emit_epilogue): Likewise.
2983 (aarch64_emit_add): Likewise.
2984 (aarch64_emit_sub): Likewise.
2985 (aarch64_emit_mul): Likewise.
2986 (aarch64_emit_lsh): Likewise.
2987 (aarch64_emit_rsh_signed): Likewise.
2988 (aarch64_emit_rsh_unsigned): Likewise.
2989 (aarch64_emit_ext): Likewise.
2990 (aarch64_emit_log_not): Likewise.
2991 (aarch64_emit_bit_and): Likewise.
2992 (aarch64_emit_bit_or): Likewise.
2993 (aarch64_emit_bit_xor): Likewise.
2994 (aarch64_emit_bit_not): Likewise.
2995 (aarch64_emit_equal): Likewise.
2996 (aarch64_emit_less_signed): Likewise.
2997 (aarch64_emit_less_unsigned): Likewise.
2998 (aarch64_emit_ref): Likewise.
2999 (aarch64_emit_if_goto): Likewise.
3000 (aarch64_emit_goto): Likewise.
3001 (aarch64_write_goto_address): Likewise.
3002 (aarch64_emit_const): Likewise.
3003 (aarch64_emit_call): Likewise.
3004 (aarch64_emit_reg): Likewise.
3005 (aarch64_emit_pop): Likewise.
3006 (aarch64_emit_stack_flush): Likewise.
3007 (aarch64_emit_zero_ext): Likewise.
3008 (aarch64_emit_swap): Likewise.
3009 (aarch64_emit_stack_adjust): Likewise.
3010 (aarch64_emit_int_call_1): Likewise.
3011 (aarch64_emit_void_call_2): Likewise.
3012 (aarch64_emit_eq_goto): Likewise.
3013 (aarch64_emit_ne_goto): Likewise.
3014 (aarch64_emit_lt_goto): Likewise.
3015 (aarch64_emit_le_goto): Likewise.
3016 (aarch64_emit_gt_goto): Likewise.
3017 (aarch64_emit_ge_got): Likewise.
3018 (aarch64_emit_ops_impl): New static global variable.
3019 (aarch64_emit_ops): New target function, return
3020 &aarch64_emit_ops_impl.
3021 (struct linux_target_ops): Install it.
3022
bb903df0
PL
30232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3024
3025 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3026 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3027 aarch64-ipa.o.
3028 * linux-aarch64-ipa.c: New file.
3029 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3030 and endian.h.
3031 (aarch64_get_thread_area): New target method.
3032 (extract_signed_bitfield): New helper function.
3033 (aarch64_decode_ldr_literal): New function.
3034 (enum aarch64_opcodes): New enum.
3035 (struct aarch64_register): New struct.
3036 (struct aarch64_operand): New struct.
3037 (x0): New static global.
3038 (x1): Likewise.
3039 (x2): Likewise.
3040 (x3): Likewise.
3041 (x4): Likewise.
3042 (w2): Likewise.
3043 (ip0): Likewise.
3044 (sp): Likewise.
3045 (xzr): Likewise.
3046 (aarch64_register): New helper function.
3047 (register_operand): Likewise.
3048 (immediate_operand): Likewise.
3049 (struct aarch64_memory_operand): New struct.
3050 (offset_memory_operand): New helper function.
3051 (preindex_memory_operand): Likewise.
3052 (enum aarch64_system_control_registers): New enum.
3053 (ENCODE): New macro.
3054 (emit_insn): New helper function.
3055 (emit_b): New function.
3056 (emit_bcond): Likewise.
3057 (emit_cb): Likewise.
3058 (emit_tb): Likewise.
3059 (emit_blr): Likewise.
3060 (emit_stp): Likewise.
3061 (emit_ldp_q_offset): Likewise.
3062 (emit_stp_q_offset): Likewise.
3063 (emit_load_store): Likewise.
3064 (emit_ldr): Likewise.
3065 (emit_ldrsw): Likewise.
3066 (emit_str): Likewise.
3067 (emit_ldaxr): Likewise.
3068 (emit_stxr): Likewise.
3069 (emit_stlr): Likewise.
3070 (emit_data_processing_reg): Likewise.
3071 (emit_data_processing): Likewise.
3072 (emit_add): Likewise.
3073 (emit_sub): Likewise.
3074 (emit_mov): Likewise.
3075 (emit_movk): Likewise.
3076 (emit_mov_addr): Likewise.
3077 (emit_mrs): Likewise.
3078 (emit_msr): Likewise.
3079 (emit_sevl): Likewise.
3080 (emit_wfe): Likewise.
3081 (append_insns): Likewise.
3082 (can_encode_int32_in): New helper function.
3083 (aarch64_relocate_instruction): New function.
3084 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3085 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3086 (struct linux_target_ops): Install aarch64_get_thread_area,
3087 aarch64_install_fast_tracepoint_jump_pad and
3088 aarch64_get_min_fast_tracepoint_insn_len.
3089
787749ea
PL
30902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3091
3092 * Makefile.in (aarch64-insn.o): New rule.
3093 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3094
9812b2e6
YQ
30952015-09-21 Yao Qi <yao.qi@linaro.org>
3096
3097 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3098
18fe412b
YQ
30992015-09-21 Yao Qi <yao.qi@linaro.org>
3100
3101 * tracepoint.c (max_jump_pad_size): Remove.
3102
a0cc84cd
YQ
31032015-09-18 Yao Qi <yao.qi@linaro.org>
3104
3105 * linux-aarch64-low.c: Don't include sys/uio.h.
3106 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3107
d78908cf
WW
31082015-09-16 Wei-cheng Wang <cole945@gmail.com>
3109
3110 * tracepoint.c (eval_result_type): Change prototype.
3111 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3112
d57e0d50
PA
31132015-09-15 Pedro Alves <palves@redhat.com>
3114
3115 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3116 Check whether to report exec events instead of checking whether
3117 multiprocess is enabled.
3118
5a676acc
PA
31192015-09-15 Pedro Alves <palves@redhat.com>
3120
3121 PR remote/18965
3122 * remote-utils.c (prepare_resume_reply): Merge
3123 TARGET_WAITKIND_VFORK_DONE switch case with the
3124 TARGET_WAITKIND_FORKED case.
3125
7c5d0fad
YQ
31262015-09-15 Yao Qi <yao.qi@linaro.org>
3127
3128 * server.c (handle_query): Check string comparison using
3129 "else if" instead of "if".
3130
750ce8d1
YQ
31312015-09-15 Yao Qi <yao.qi@linaro.org>
3132
3133 * server.c (vCont_supported): New global variable.
3134 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3135 matches. Append ";vContSupported+" to own_buf.
3136 (handle_v_requests): Append ";s;S" to own_buf if target supports
3137 hardware single step or vCont_supported is false.
3138 (capture_main): Set vCont_supported to zero.
3139
70b90b91
YQ
31402015-09-15 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3143 it to ...
3144 (linux_supports_hardware_single_step): ... New function.
3145 (linux_target_ops): Update.
3146 * lynx-low.c (lynx_target_ops): Set field
3147 supports_hardware_single_step to target_can_do_hardware_single_step.
3148 * nto-low.c (nto_target_ops): Likewise.
3149 * spu-low.c (spu_target_ops): Likewise.
3150 * win32-low.c (win32_target_ops): Likewise.
3151 * target.c (target_can_do_hardware_single_step): New function.
3152 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3153 Remove. <supports_hardware_single_step>: New field.
3154 (target_supports_conditional_breakpoints): Remove.
3155 (target_supports_hardware_single_step): New macro.
3156 (target_can_do_hardware_single_step): Declare.
3157 * server.c (handle_query): Use target_supports_hardware_single_step
3158 instead of target_supports_conditional_breakpoints.
3159
ade90bde
YQ
31602015-09-15 Yao Qi <yao.qi@linaro.org>
3161
3162 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3163 function.
3164 (struct linux_target_ops the_low_target): Install
3165 aarch64_linux_siginfo_fixup.
3166
94585166
DB
31672015-09-11 Don Breazeal <donb@codesourcery.com>
3168 Luis Machado <lgustavo@codesourcery.com>
3169
3170 * linux-low.c (linux_mourn): Static declaration.
3171 (linux_arch_setup): Move in front of
3172 handle_extended_wait.
3173 (linux_arch_setup_thread): New function.
3174 (handle_extended_wait): Handle exec events. Call
3175 linux_arch_setup_thread. Make event_lwp argument a
3176 pointer-to-a-pointer.
3177 (check_zombie_leaders): Do not check stopped threads.
3178 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3179 (linux_low_filter_event): Add lwp and thread for exec'ing
3180 non-leader thread if leader thread has been deleted.
3181 Refactor code into linux_arch_setup_thread and call it.
3182 Pass child lwp pointer by reference to handle_extended_wait.
3183 (linux_wait_for_event_filtered): Update comment.
3184 (linux_wait_1): Prevent clobbering exec event status.
3185 (linux_supports_exec_events): New function.
3186 (linux_target_ops) <supports_exec_events>: Initialize new member.
3187 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3188 new member.
3189 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3190 * server.c (report_exec_events): New global variable.
3191 (handle_query): Handle qSupported query for exec-events feature.
3192 (captured_main): Initialize report_exec_events.
3193 * server.h (report_exec_events): Declare new global variable.
3194 * target.h (struct target_ops) <supports_exec_events>: New
3195 member.
3196 (target_supports_exec_events): New macro.
3197 * win32-low.c (win32_target_ops) <supports_exec_events>:
3198 Initialize new member.
3199
0568462b
MM
32002015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3201
3202 * linux-low.c (linux_low_enable_btrace): Remove.
3203 (linux_target_ops): Replace linux_low_enable_btrace with
3204 linux_enable_btrace.
3205
39edd165
YQ
32062015-09-03 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-aarch64-low.c (aarch64_insert_point): Call
3209 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3210 returns true.
3211
1db33b5a
UW
32122015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3213
3214 * linux-low.c (check_stopped_by_breakpoint): Use
3215 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3216
ab290430
PA
32172015-08-27 Pedro Alves <palves@redhat.com>
3218
3219 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3220
8d749320
SM
32212015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3222
6711b7f8
SM
3223 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3224 the XNEW-family equivalent.
8d749320
SM
3225 (compile_bytecodes): Likewise.
3226 * dll.c (loaded_dll): Likewise.
3227 * event-loop.c (append_callback_event): Likewise.
3228 (create_file_handler): Likewise.
3229 (create_file_event): Likewise.
3230 * hostio.c (handle_open): Likewise.
3231 * inferiors.c (add_thread): Likewise.
3232 (add_process): Likewise.
3233 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3234 * linux-arm-low.c (arm_new_process): Likewise.
3235 (arm_new_thread): Likewise.
3236 * linux-low.c (add_to_pid_list): Likewise.
3237 (linux_add_process): Likewise.
3238 (handle_extended_wait): Likewise.
3239 (add_lwp): Likewise.
3240 (enqueue_one_deferred_signal): Likewise.
3241 (enqueue_pending_signal): Likewise.
3242 (linux_resume_one_lwp_throw): Likewise.
3243 (linux_resume_one_thread): Likewise.
3244 (linux_read_memory): Likewise.
3245 (linux_write_memory): Likewise.
3246 * linux-mips-low.c (mips_linux_new_process): Likewise.
3247 (mips_linux_new_thread): Likewise.
3248 (mips_add_watchpoint): Likewise.
3249 * linux-x86-low.c (initialize_low_arch): Likewise.
3250 * lynx-low.c (lynx_add_process): Likewise.
3251 * mem-break.c (set_raw_breakpoint_at): Likewise.
3252 (set_breakpoint): Likewise.
3253 (add_condition_to_breakpoint): Likewise.
3254 (add_commands_to_breakpoint): Likewise.
3255 (clone_agent_expr): Likewise.
3256 (clone_one_breakpoint): Likewise.
3257 * regcache.c (new_register_cache): Likewise.
3258 * remote-utils.c (look_up_one_symbol): Likewise.
3259 * server.c (queue_stop_reply): Likewise.
3260 (start_inferior): Likewise.
3261 (queue_stop_reply_callback): Likewise.
3262 (handle_target_event): Likewise.
3263 * spu-low.c (fetch_ppc_memory): Likewise.
3264 (store_ppc_memory): Likewise.
3265 * target.c (set_target_ops): Likewise.
3266 * thread-db.c (thread_db_load_search): Likewise.
3267 (try_thread_db_load_1): Likewise.
3268 * tracepoint.c (add_tracepoint): Likewise.
3269 (add_tracepoint_action): Likewise.
3270 (create_trace_state_variable): Likewise.
3271 (cmd_qtdpsrc): Likewise.
3272 (cmd_qtro): Likewise.
3273 (add_while_stepping_state): Likewise.
3274 * win32-low.c (child_add_thread): Likewise.
3275 (get_image_name): Likewise.
3276
ed8b7b42
YQ
32772015-08-25 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3280
db3cb7cb
YQ
32812015-08-25 Yao Qi <yao.qi@linaro.org>
3282
3283 * Makefile.in (aarch64-linux.o): New rule.
3284 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3285 srv_tgtobj.
3286 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3287 (aarch64_init_debug_reg_state): Make it extern.
3288 (aarch64_linux_prepare_to_resume): Remove.
3289
f6011a1c
YQ
32902015-08-25 Yao Qi <yao.qi@linaro.org>
3291
3292 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3293 lwp_arch_private_info and ptid_of_lwp.
3294
88e2cf7e
YQ
32952015-08-25 Yao Qi <yao.qi@linaro.org>
3296
3297 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3298 Find proc_info by find_process_pid. All callers updated.
3299
5e35436e
YQ
33002015-08-25 Yao Qi <yao.qi@linaro.org>
3301
3302 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3303 Remove.
3304 (debug_reg_change_callback): Remove.
3305 (aarch64_notify_debug_reg_change): Remove.
3306
4a8a7965
YQ
33072015-08-25 Yao Qi <yao.qi@linaro.org>
3308
3309 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3310 Call current_lwp_ptid.
3311
32a271ee
YQ
33122015-08-25 Yao Qi <yao.qi@linaro.org>
3313
3314 * linux-aarch64-low.c (debug_reg_change_callback): Use
3315 debug_printf.
3316
0d51c8d7
YQ
33172015-08-25 Yao Qi <yao.qi@linaro.org>
3318
3319 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3320
31a43dd5
YQ
33212015-08-25 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3324
8ee52567
YQ
33252015-08-25 Yao Qi <yao.qi@linaro.org>
3326
3327 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3328 the code.
3329
ff3f0f45
YQ
33302015-08-25 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3333 Remove.
3334 (debug_reg_change_callback): Remove argument entry and add argument
3335 lwp. Remove local variable thread. Don't print thread id in the
3336 debugging output. Don't check whether pid of thread equals to pid.
3337 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3338 iterate_over_lwps instead find_inferior.
3339
3d40fbb5
PA
33402015-08-24 Pedro Alves <palves@redhat.com>
3341
3342 * inferiors.c (get_first_process): New function.
3343 * inferiors.h (get_first_process): New declaration.
3344 * remote-utils.c (read_ptid): Default to the first process in the
3345 list, instead of to the current thread's process.
3346
438e1e42
PA
33472015-08-24 Pedro Alves <palves@redhat.com>
3348
3349 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3350 * event-loop.c: Likewise.
3351 * remote-utils.c: Likewise.
3352 * tracepoint.c: Likewise.
3353
a8c6d4fc
PA
33542015-08-24 Pedro Alves <palves@redhat.com>
3355
3356 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3357 ptid_get_lwp.
3358
99b0bb12
PA
33592015-08-21 Pedro Alves <palves@redhat.com>
3360
3361 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3362 instead of literal 1.
3363
f8904751
PA
33642015-08-21 Pedro Alves <palves@redhat.com>
3365
3366 * tdesc.c (default_description): Explicitly zero-initialize.
3367
465a859e
PA
33682015-08-21 Pedro Alves <palves@redhat.com>
3369
3370 PR gdb/18749
3371 * inferiors.c (remove_thread): Discard any pending stop reply for
3372 this thread.
3373 * server.c (remove_all_on_match_pid): Rename to ...
3374 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3375 instead of a pid.
3376 (discard_queued_stop_replies): Change parameter to a ptid. Now
3377 extern.
3378 (handle_v_kill, kill_inferior_callback, captured_main)
3379 (process_serial_event): Adjust.
3380 * server.h (discard_queued_stop_replies): Declare.
3381
f0db101d
PA
33822015-08-21 Pedro Alves <palves@redhat.com>
3383
3384 * linux-low.c (wait_for_sigstop): Always switch to no thread
3385 selected if the previously current thread dies.
3386 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3387 process instead of the current thread's.
3388 * remote-utils.c (input_interrupt): Don't check if there's no
3389 current thread.
3390 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3391 current thread to the general thread fails, error out.
3392 (handle_qxfer_auxv, handle_qxfer_libraries)
3393 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3394 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3395 (handle_query): Check if there's a thread selected instead of
3396 checking whether there's any thread in the thread list.
3397 (handle_qxfer_threads, handle_qxfer_btrace)
3398 (handle_qxfer_btrace_conf): Don't error out early if there's no
3399 thread in the thread list.
3400 (handle_v_cont, myresume): Don't set the current thread to the
3401 continue thread.
3402 (process_serial_event) <Hg handling>: Also set thread_id if the
3403 previous general thread is still alive.
3404 (process_serial_event) <g/G handling>: If setting the current
3405 thread to the general thread fails, error out.
3406 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3407 thread's lwp instead of the current thread's.
3408 * target.c (set_desired_thread): If the desired thread was not
3409 found, leave the current thread pointing to NULL. Return an int
3410 (boolean) indicating success.
3411 * target.h (set_desired_thread): Change return type to int.
3412
40045d91
MF
34132015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3414
3415 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3416 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3417 #includes.
3418 (ps_get_thread_area): New function.
3419
45face3b
GB
34202015-08-19 Gary Benson <gbenson@redhat.com>
3421
3422 * hostio.c (handle_pread): Do not attempt to read more data
3423 than hostio_reply_with_data can fit in a packet.
3424
16d5f642
JB
34252015-08-18 Joel Brobecker <brobecker@adacore.com>
3426
3427 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3428
a738da3a
MF
34292015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3430
3431 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3432
33ebda9d
PA
34332015-08-06 Pedro Alves <palves@redhat.com>
3434
3435 * tracepoint.c (expr_eval_result): Now an int.
3436
a44892be
PA
34372015-08-06 Pedro Alves <palves@redhat.com>
3438
3439 * gdbthread.h (struct regcache): Forward declare.
3440 (struct thread_info) <regcache_data>: Now a struct regcache
3441 pointer.
3442 * inferiors.c (inferior_regcache_data)
3443 (set_inferior_regcache_data): Now work with struct regcache
3444 pointers.
3445 * inferiors.h (struct regcache): Forward declare.
3446 (inferior_regcache_data, set_inferior_regcache_data): Now work
3447 with struct regcache pointers.
3448 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3449 (free_register_cache_thread): Remove struct regcache pointer
3450 casts.
3451
608a1e46
PA
34522015-08-06 Pedro Alves <palves@redhat.com>
3453
3454 * server.c (captured_main): On error, print the exception message
3455 to stderr, and if run_once is set, throw a quit.
3456
f0ce0d3a
PA
34572015-08-06 Pedro Alves <palves@redhat.com>
3458
3459 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3460 the current thread.
3461
bf47e248
PA
34622015-08-06 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3465 reading beyond the passed in buffer length.
3466
b6b9ffcc
PL
34672015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3468
3469 * tracepoint.c (symbol_list) <required>: Remove.
3470
863d01bd
PA
34712015-08-06 Pedro Alves <palves@redhat.com>
3472
3473 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3474 count if stopping and suspending threads.
3475 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3476 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3477 (linux_detach): Complete an ongoing step-over.
3478 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3479 throughout.
3480 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3481 (linux_wait_1): If passing a signal to the inferior after
3482 finishing a step-over, unsuspend and re-resume all lwps. If we
3483 see a single-step event but the thread should be continuing, don't
3484 pass the trap to gdb.
3485 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3486 internal_error instead of gdb_assert.
3487 (enqueue_pending_signal): New function.
3488 (check_ptrace_stopped_lwp_gone): Add debug output.
3489 (start_step_over): Use internal_error instead of gdb_assert.
3490 (complete_ongoing_step_over): New function.
3491 (linux_resume_one_thread): Don't resume a suspended thread.
3492 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3493 it stepping.
3494
00db26fa
PA
34952015-08-06 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3498 (linux_thread_alive): Use lwp_is_marked_dead.
3499 (extended_event_reported): Delete.
3500 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3501 instead of extended_event_reported.
3502 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3503 as well.
3504 (lwp_is_marked_dead): New function.
3505 (lwp_running): Use lwp_is_marked_dead.
3506 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3507 comment.
3508
ad071a30
PA
35092015-08-06 Pedro Alves <palves@redhat.com>
3510
3511 * linux-low.c (linux_wait_1): Move fork event output out of the
3512 !report_to_gdb check. Pass event_child->waitstatus to
3513 target_waitstatus_to_string instead of ourstatus.
3514
524b57e6
YQ
35152015-08-04 Yao Qi <yao.qi@linaro.org>
3516
3517 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3518 if current_thread is 32 bit.
3519
6085d6f6
YQ
35202015-08-04 Yao Qi <yao.qi@linaro.org>
3521
3522 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3523 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3524 * server.c (extended_protocol): Remove "static".
3525 * server.h (extended_protocol): Declare it.
3526
8a7e4587
YQ
35272015-08-04 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3530 both aarch64 and aarch32.
3531 (aarch64_set_pc): Likewise.
3532
3b53ae99
YQ
35332015-08-04 Yao Qi <yao.qi@linaro.org>
3534
3535 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3536 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3537 arm-with-neon.xml to srv_xmlfiles.
3538 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3539 (is_64bit_tdesc): New function.
3540 (aarch64_linux_read_description): New function.
3541 (aarch64_arch_setup): Call aarch64_linux_read_description.
3542 (regs_info): Rename to regs_info_aarch64.
3543 (aarch64_regs_info): Return right regs_info.
3544 (initialize_low_arch): Call initialize_low_arch_aarch32.
3545
bd9e6534
YQ
35462015-08-04 Yao Qi <yao.qi@linaro.org>
3547
3548 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3549 * linux-aarch32-low.c: New file.
3550 * linux-aarch32-low.h: New file.
3551 * linux-arm-low.c (arm_fill_gregset): Move it to
3552 linux-aarch32-low.c.
3553 (arm_store_gregset): Likewise.
3554 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3555 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3556 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3557 (regs_info): Rename to regs_info_arm.
3558 (arm_regs_info): Return regs_info_aarch32 if
3559 have_ptrace_getregset is 1 and target description is
3560 arm_with_neon or arm_with_vfpv3.
3561 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3562 Call initialize_low_arch_aarch32 instead.
3563
ded48a5e
YQ
35642015-08-04 Yao Qi <yao.qi@linaro.org>
3565
3566 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3567 * linux-low.c: ... here.
3568 * linux-low.h (have_ptrace_getregset): Declare it.
3569
96e9210f
PA
35702015-08-04 Pedro Alves <palves@redhat.com>
3571
3572 * thread-db.c (struct thread_db): Use new typedefs.
3573 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3574 CHK calls.
3575 (disable_thread_event_reporting): Cast result of dlsym to
3576 destination function pointer type.
3577 (thread_db_mourn): Use td_ta_delete_ftype.
3578
af60a1ef
SL
35792015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3580
3581 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3582 arch variant.
3583 (CDX_BREAKPOINT): Define for R2.
3584 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3585 (the_low_target): Add comments.
3586
e8b41681
YQ
35872015-07-30 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-arm-low.c (arm_hwcap): Remove it.
3590 (arm_read_description): New local variable arm_hwcap. Don't
3591 set arm_hwcap to zero.
3592
89abb039
YQ
35932015-07-30 Yao Qi <yao.qi@linaro.org>
3594
3595 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3596 Use regcache->tdesc instead.
3597 (arm_store_wmmxregset): Likewise.
3598 (arm_fill_vfpregset): Likewise.
3599 (arm_store_vfpregset): Likewise.
3600
deca266c
YQ
36012015-07-30 Yao Qi <yao.qi@linaro.org>
3602
3603 * linux-arm-low.c: Include arch/arm.h.
3604 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3605 (arm_store_gregset): Likewise.
3606
aa58a496
SM
36072015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3608
3609 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3610 ptrace's 4th parameter.
3611
50904b25
YQ
36122015-07-27 Yao Qi <yao.qi@linaro.org>
3613
3614 * configure.srv (case aarch64*-*-linux*): Don't set
3615 srv_linux_usrregs.
3616
5826e159
PA
36172015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3618
3619 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3620 sys/ptrace.h.
3621 * linux-arm-low.c: Likewise.
3622 * linux-cris-low.c: Likewise.
3623 * linux-crisv32-low.c: Likewise.
3624 * linux-low.c: Likewise.
3625 * linux-m68k-low.c: Likewise.
3626 * linux-mips-low.c: Likewise.
3627 * linux-nios2-low.c: Likewise.
3628 * linux-s390-low.c: Likewise.
3629 * linux-sparc-low.c: Likewise.
3630 * linux-tic6x-low.c: Likewise.
3631 * linux-tile-low.c: Likewise.
3632 * linux-x86-low.c: Likewise.
3633
54019719
PA
36342015-07-24 Pedro Alves <palves@redhat.com>
3635
3636 * config.in: Regenerate.
3637 * configure: Regenerate.
3638
eb7aa561
PA
36392015-07-24 Pedro Alves <palves@redhat.com>
3640
3641 * acinclude.m4: Include ../ptrace.m4.
3642 * configure.ac: Call GDB_AC_PTRACE.
3643 * config.in, configure: Regenerate.
3644
55d7b841
YQ
36452015-07-24 Yao Qi <yao.qi@linaro.org>
3646
3647 * linux-low.c (linux_create_inferior): Remove setting to
3648 proc->priv->new_inferior.
3649 (linux_attach): Likewise.
3650 (linux_low_filter_event): Likewise.
3651 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3652
c06cbd92
YQ
36532015-07-24 Yao Qi <yao.qi@linaro.org>
3654
3655 * linux-low.c (linux_arch_setup): New function.
3656 (linux_low_filter_event): If proc->tdesc is NULL and
3657 proc->attached is true, call the_low_target.arch_setup.
3658 Otherwise, keep status pending, and return.
3659 (linux_resume_one_lwp_throw): Don't call get_pc if
3660 thread->while_stepping isn't NULL. Don't call
3661 get_thread_regcache if proc->tdesc is NULL.
3662 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3663 (linux_target_ops): Install arch_setup.
3664 * server.c (start_inferior): Call the_target->arch_setup.
3665 * target.h (struct target_ops) <arch_setup>: New field.
3666 (target_arch_setup): New marco.
3667 * lynx-low.c (lynx_target_ops): Update.
3668 * nto-low.c (nto_target_ops): Update.
3669 * spu-low.c (spu_target_ops): Update.
3670 * win32-low.c (win32_target_ops): Update.
3671
5ae3ebba
YQ
36722015-07-24 Yao Qi <yao.qi@linaro.org>
3673
3674 * linux-low.c (linux_add_process): Don't set
3675 proc->priv->new_inferior.
3676 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3677 (linux_attach): Likewise.
3678
eb97750b
YQ
36792015-07-24 Yao Qi <yao.qi@linaro.org>
3680
3681 * server.c (start_inferior): Code refactor.
3682
51aee833
YQ
36832015-07-24 Yao Qi <yao.qi@linaro.org>
3684
3685 * server.c (process_serial_event): Set general_thread.
3686
af1b22f3
YQ
36872015-07-21 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3690 aarch64_linux_get_debug_reg_capacity.
3691
554717a3
YQ
36922015-07-17 Yao Qi <yao.qi@linaro.org>
3693
3694 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3695 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3696 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3697 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3698 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3699 (AARCH64_HWP_ALIGNMENT): Likewise.
3700 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3701 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3702 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3703 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3704 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3705 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3706 (struct aarch64_debug_reg_state): Likewise.
3707 (struct arch_lwp_info): Likewise.
3708 (aarch64_align_watchpoint): Likewise.
3709 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3710 (aarch64_watchpoint_length): Likewise.
3711 (aarch64_point_encode_ctrl_reg): Likewise
3712 (aarch64_point_is_aligned): Likewise.
3713 (aarch64_align_watchpoint): Likewise.
3714 (aarch64_linux_set_debug_regs):
3715 (aarch64_dr_state_insert_one_point): Likewise.
3716 (aarch64_dr_state_remove_one_point): Likewise.
3717 (aarch64_handle_breakpoint): Likewise.
3718 (aarch64_handle_aligned_watchpoint): Likewise.
3719 (aarch64_handle_unaligned_watchpoint): Likewise.
3720 (aarch64_handle_watchpoint): Likewise.
3721
c67ca4de
YQ
37222015-07-17 Yao Qi <yao.qi@linaro.org>
3723
3724 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3725 and don't aarch64_get_debug_reg_state. All callers update.
3726 (aarch64_handle_aligned_watchpoint): Likewise.
3727 (aarch64_handle_unaligned_watchpoint): Likewise.
3728 (aarch64_handle_watchpoint): Likewise.
3729 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3730 (aarch64_remove_point): Likewise.
3731
25abf979
YQ
37322015-07-17 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3735 debug_printf.
3736 (aarch64_handle_unaligned_watchpoint): Likewise.
3737
db1ff28b
JK
37382015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3739
3740 Revert the previous 3 commits:
3741 Move gdb_regex* to common/
3742 Move linux_find_memory_regions_full & co.
3743 gdbserver build-id attribute generator
3744
700ca40f
JK
37452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3746 Jan Kratochvil <jan.kratochvil@redhat.com>
3747
3748 gdbserver build-id attribute generator.
3749 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3750 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3751 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3752 (find_phdr): New.
3753 (get_dynamic): Use find_pdhr to traverse program headers.
3754 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3755 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3756 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3757 (get_hex_build_id): New.
3758 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3759 to reply XML document.
3760
9904185c
JK
37612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3762 Jan Kratochvil <jan.kratochvil@redhat.com>
3763
3764 * target.c: Include target/target-utils.h and fcntl.h.
3765 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3766 (target_fileio_read_stralloc): New functions.
3767
6e5b4429
JK
37682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3769
3770 * Makefile.in (OBS): Add gdb_regex.o.
3771 (gdb_regex.o): New.
3772 * config.in: Rebuilt.
3773 * configure: Rebuilt.
3774
ddc98fbf
JK
37752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3776 Jan Kratochvil <jan.kratochvil@redhat.com>
3777
3778 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3779 * Makefile.in (OBS): Add target-utils.o.
3780 (linux-maps.o, target-utils.o): New.
3781 * configure.srv (srv_linux_obj): Add linux-maps.o.
3782
e57bb7a0
PL
37832015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3784
3785 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3786 function, return 1.
3787 (the_low_target): Install it.
3788
586b02a9
PA
37892015-07-14 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3792 Instead, ignore ECHILD, and throw an error for other errnos.
3793
58c1b36c
PA
37942015-07-10 Pedro Alves <palves@redhat.com>
3795
3796 * event-loop.c (struct callback_event) <data>: Change type to
3797 gdb_client_data instance instead of gdb_client_data pointer.
3798 (append_callback_event): Adjust.
3799
421530db
PL
38002015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3801
3802 * linux-aarch64-low.c: Add comments for each linux_target_ops
3803 method. Remove comments already covered in target_ops and
3804 linux_target_ops definitions.
3805 (the_low_target): Add comments for each unimplemented method.
3806
c2d65f38
YQ
38072015-07-09 Yao Qi <yao.qi@linaro.org>
3808
3809 * linux-aarch64-low.c (aarch64_regmap): Remove.
3810 (aarch64_usrregs_info): Remove.
3811 (regs_info): Set field usrregs to NULL.
3812
b20a6524
MM
38132015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3814
3815 * linux-low.c: Include "rsp-low.h"
3816 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3817 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3818 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3819 (handle_btrace_enable_pt): New.
3820 (handle_btrace_general_set): Support "pt".
3821 (handle_btrace_conf_general_set): Support "pt:size".
3822
96c97461
PL
38232015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3824
3825 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3826 Z_PACKET_SW_BP.
3827
37d66942
PL
38282015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3829
3830 * linux-aarch64-low.c: Remove comment about endianness.
3831 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3832 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3833 memcmp.
3834
dc06243f
GB
38352015-06-24 Gary Benson <gbenson@redhat.com>
3836
3837 * linux-i386-ipa.c (stdint.h): Do not include.
3838 * lynx-i386-low.c (stdint.h): Likewise.
3839 * lynx-ppc-low.c (stdint.h): Likewise.
3840 * mem-break.c (stdint.h): Likewise.
3841 * thread-db.c (stdint.h): Likewise.
3842 * tracepoint.c (stdint.h): Likewise.
3843 * win32-low.c (stdint.h): Likewise.
3844
124e13d9
SM
38452015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3846
3847 * server.c (write_qxfer_response): Update call to
3848 remote_escape_output.
3849
909c2cda
JK
38502015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3851 Jan Kratochvil <jan.kratochvil@redhat.com>
3852
3853 Merge multiple hex conversions.
3854 * gdbreplay.c (tohex): Rename to 'fromhex'.
3855 (logchar): Use fromhex.
3856
24c05f46
JK
38572015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3858
3859 * server.c (handle_qxfer_libraries): Set `version' attribute for
3860 <library-list>.
3861
14d2069a
GB
38622015-06-10 Gary Benson <gbenson@redhat.com>
3863
3864 * target.h (struct target_ops) <multifs_open>: New field.
3865 <multifs_unlink>: Likewise.
3866 <multifs_readlink>: Likewise.
3867 * linux-low.c (nat/linux-namespaces.h): New include.
3868 (linux_target_ops): Initialize the_target->multifs_open,
3869 the_target->multifs_unlink and the_target->multifs_readlink.
3870 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3871 * hostio.c (hostio_fs_pid): New static variable.
3872 (hostio_handle_new_gdb_connection): New function.
3873 (handle_setfs): Likewise.
3874 (handle_open): Use the_target->multifs_open as appropriate.
3875 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3876 (handle_readlink): Use the_target->multifs_readlink as
3877 appropriate.
3878 (handle_vFile): Handle vFile:setfs packets.
3879 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3880 after target_handle_new_gdb_connection.
3881
4b8b5e72
GB
38822015-06-10 Gary Benson <gbenson@redhat.com>
3883
3884 * configure.ac (AC_CHECK_FUNCS): Add setns.
3885 * config.in: Regenerate.
3886 * configure: Likewise.
3887 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3888 (linux-namespaces.o): New rule.
3889 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3890
3ac2e371
GB
38912015-06-09 Gary Benson <gbenson@redhat.com>
3892
3893 * hostio.c (handle_open): Process mode argument with
3894 fileio_to_host_mode.
3895
ca9b78ce
YQ
38962015-06-01 Yao Qi <yao.qi@linaro.org>
3897
3898 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3899 * linux-x86-low.c: Likewise.
3900
bfacd19d
DB
39012015-05-28 Don Breazeal <donb@codesourcery.com>
3902
3903 * linux-low.c (handle_extended_wait): Initialize
3904 thread_info.last_resume_kind for new fork children.
3905
452003ef
PA
39062015-05-15 Pedro Alves <palves@redhat.com>
3907
3908 * target.h (target_handle_new_gdb_connection): Rewrite using if
3909 wrapped in do/while.
3910
1041a03c
JB
39112015-05-14 Joel Brobecker <brobecker@adacore.com>
3912
3913 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3914 * configure, config.in: Regenerate.
3915 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3916 Declare typedef.
3917
c269dbdb
DB
39182015-05-12 Don Breazeal <donb@codesourcery.com>
3919
3920 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3921 PTRACE_EVENT_VFORK_DONE.
3922 (linux_low_ptrace_options, extended_event_reported): Add vfork
3923 events.
3924 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3925 and "vforkdone" for RSP 'T' Stop Reply Packet.
3926 * server.h (report_vfork_events): Declare
3927 global variable.
3928
3a8a0396
DB
39292015-05-12 Don Breazeal <donb@codesourcery.com>
3930
3931 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3932 (the_low_target) <new_fork>: Initialize new member.
3933 * linux-arm-low.c (arm_new_fork): New function.
3934 (the_low_target) <new_fork>: Initialize new member.
3935 * linux-low.c (handle_extended_wait): Call new target function
3936 new_fork.
3937 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3938 * linux-mips-low.c (mips_add_watchpoint): New function
3939 extracted from mips_insert_point.
3940 (the_low_target) <new_fork>: Initialize new member.
3941 (mips_linux_new_fork): New function.
3942 (mips_insert_point): Call mips_add_watchpoint.
3943 * linux-x86-low.c (x86_linux_new_fork): New function.
3944 (the_low_target) <new_fork>: Initialize new member.
3945
de0d863e
DB
39462015-05-12 Don Breazeal <donb@codesourcery.com>
3947
3948 * linux-low.c (handle_extended_wait): Implement return value,
3949 rename argument 'event_child' to 'event_lwp', handle
3950 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3951 (linux_low_ptrace_options): New function.
3952 (linux_low_filter_event): Call linux_low_ptrace_options,
3953 use different argument fo linux_enable_event_reporting,
3954 use return value from handle_extended_wait.
3955 (extended_event_reported): New function.
3956 (linux_wait_1): Call extended_event_reported and set
3957 status to report fork events.
3958 (linux_write_memory): Add pid to debug message.
3959 (reset_lwp_ptrace_options_callback): New function.
3960 (linux_handle_new_gdb_connection): New function.
3961 (linux_target_ops): Initialize new structure member.
3962 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3963 * lynx-low.c: Initialize new structure member.
3964 * remote-utils.c (prepare_resume_reply): Implement stop reason
3965 "fork" for "T" stop message.
3966 * server.c (handle_query): Call handle_new_gdb_connection.
3967 * server.h (report_fork_events): Declare global flag.
3968 * target.h (struct target_ops) <handle_new_gdb_connection>:
3969 New member.
3970 (target_handle_new_gdb_connection): New macro.
3971 * win32-low.c: Initialize new structure member.
3972
ddcbc397
DB
39732015-05-12 Don Breazeal <donb@codesourcery.com>
3974
3975 * mem-break.c (APPEND_TO_LIST): Define macro.
3976 (clone_agent_expr): New function.
3977 (clone_one_breakpoint): New function.
3978 (clone_all_breakpoints): New function.
3979 * mem-break.h: Declare new functions.
3980
89245bc0
DB
39812015-05-12 Don Breazeal <donb@codesourcery.com>
3982
3983 * linux-low.c (linux_supports_fork_events): New function.
3984 (linux_supports_vfork_events): New function.
3985 (linux_target_ops): Initialize new structure members.
3986 (initialize_low): Call linux_check_ptrace_features.
3987 * lynx-low.c (lynx_target_ops): Initialize new structure
3988 members.
3989 * server.c (report_fork_events, report_vfork_events):
3990 New global flags.
3991 (handle_query): Add new features to qSupported packet and
3992 response.
3993 (captured_main): Initialize new global variables.
3994 * target.h (struct target_ops) <supports_fork_events>:
3995 New member.
3996 <supports_vfork_events>: New member.
3997 (target_supports_fork_events): New macro.
3998 (target_supports_vfork_events): New macro.
3999 * win32-low.c (win32_target_ops): Initialize new structure
4000 members.
4001
835205d0
GB
40022015-05-12 Gary Benson <gbenson@redhat.com>
4003
4004 * server.c (handle_qxfer_exec_file): Use current process
4005 if annex is empty.
4006
21e94bd9
SL
40072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4008
4009 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4010 Remove HAVE_PTRACE_GETREGS conditionals.
4011 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4012 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4013
45614f15
YQ
40142015-05-08 Yao Qi <yao.qi@linaro.org>
4015
4016 * linux-low.c (linux_supports_conditional_breakpoints): New
4017 function.
4018 (linux_target_ops): Install new target method.
4019 * lynx-low.c (lynx_target_ops): Install NULL hook for
4020 supports_conditional_breakpoints.
4021 * nto-low.c (nto_target_ops): Likewise.
4022 * spu-low.c (spu_target_ops): Likewise.
4023 * win32-low.c (win32_target_ops): Likewise.
4024 * server.c (handle_query): Check
4025 target_supports_conditional_breakpoints.
4026 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4027 New field.
4028 (target_supports_conditional_breakpoints): New macro.
4029
80ad801e
PA
40302015-05-06 Pedro Alves <palves@redhat.com>
4031
4032 PR server/18081
4033 * server.c (start_inferior): If the process exits, mourn it.
4034
819843c7
GB
40352015-04-21 Gary Benson <gbenson@redhat.com>
4036
4037 * hostio.c (fileio_open_flags_to_host): Factored out to
4038 fileio_to_host_openflags in common/fileio.c. Single use
4039 updated.
4040
a2d5a9d7
MF
40412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4042
4043 * linux-xtensa-low.c (xtensa_fill_gregset)
4044 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4045 XCHAL_HAVE_LOOP.
4046
deb44829
MF
40472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4048
4049 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4050 (regs_info): Replace usrregs pointer with NULL.
4051
e57f1de3
GB
40522015-04-17 Gary Benson <gbenson@redhat.com>
4053
4054 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4055 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4056 * server.c (handle_qxfer_exec_file): New function.
4057 (qxfer_packets): Add exec-file entry.
4058 (handle_query): Report qXfer:exec-file:read as supported packet.
4059
62828379
RN
40602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4061
4062 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4063
b88bb450
GB
40642015-04-09 Gary Benson <gbenson@redhat.com>
4065
4066 * hostio-errno.c (errno_to_fileio_error): Remove function.
4067 Update caller to use remote_fileio_to_fio_error.
4068
c8f4bfdd
YQ
40692015-04-09 Yao Qi <yao.qi@linaro.org>
4070
4071 * linux-low.c (linux_insert_point): Call
4072 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4073 (linux_remove_point): Call remove_memory_breakpoint if type is
4074 raw_bkpt_type_sw.
4075 * linux-x86-low.c (x86_insert_point): Don't call
4076 insert_memory_breakpoint.
4077 (x86_remove_point): Don't call remove_memory_breakpoint.
4078
41f98f02
PA
40792015-04-01 Pedro Alves <palves@redhat.com>
4080 Cleber Rosa <crosa@redhat.com>
4081
4082 * server.c (gdbserver_usage): Reorganize and extend the usage
4083 message.
4084
2bf6fb9d
PA
40852015-03-24 Pedro Alves <palves@redhat.com>
4086
4087 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4088 output. Also dump TRAP_TRACE.
4089 (linux_low_filter_event): In debug output, distinguish a
4090 resume_stop SIGSTOP from a delayed SIGSTOP.
4091
369f6daa
GB
40922015-03-24 Gary Benson <gbenson@redhat.com>
4093
4094 * linux-x86-low.c (x86_linux_new_thread): Moved to
4095 nat/x86-linux.c.
4096 (x86_linux_prepare_to_resume): Likewise.
4097
8e5d4070
GB
40982015-03-24 Gary Benson <gbenson@redhat.com>
4099
4100 * Makefile.in (x86-linux-dregs.o): New rule.
4101 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4102 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4103 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4104 (x86_linux_dr_get): Likewise.
4105 (x86_linux_dr_set): Likewise.
4106 (update_debug_registers_callback): Likewise.
4107 (x86_linux_dr_set_addr): Likewise.
4108 (x86_linux_dr_get_addr): Likewise.
4109 (x86_linux_dr_set_control): Likewise.
4110 (x86_linux_dr_get_control): Likewise.
4111 (x86_linux_dr_get_status): Likewise.
4112 (x86_linux_update_debug_registers): Likewise.
4113
2b95d440
GB
41142015-03-24 Gary Benson <gbenson@redhat.com>
4115
4116 * linux-x86-low.c (x86_linux_update_debug_registers):
4117 New function, factored out from...
4118 (x86_linux_prepare_to_resume): ...this.
4119
14b0bc68
GB
41202015-03-24 Gary Benson <gbenson@redhat.com>
4121
4122 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4123 (x86_linux_dr_set): Likewise.
4124 (update_debug_registers_callback): Likewise.
4125 (x86_linux_dr_set_addr): Likewise.
4126 (x86_linux_dr_get_addr): Likewise.
4127 (x86_linux_dr_set_control): Likewise.
4128 (x86_linux_dr_get_control): Likewise.
4129 (x86_linux_dr_get_status): Likewise.
4130 (x86_linux_prepare_to_resume): Likewise.
4131
5dfe6ca8
GB
41322015-03-24 Gary Benson <gbenson@redhat.com>
4133
4134 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4135 Use perror_with_name. Pass string through gettext.
4136 (x86_linux_dr_set): Likewise.
4137
d33472ad
GB
41382015-03-24 Gary Benson <gbenson@redhat.com>
4139
4140 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4141 (x86_linux_dr_set_addr): ...this.
4142 (x86_dr_low_get_addr): Rename to...
4143 (x86_linux_dr_get_addr): ...this.
4144 (x86_dr_low_set_control): Rename to...
4145 (x86_linux_dr_set_control): ...this.
4146 (x86_dr_low_get_control): Rename to...
4147 (x86_linux_dr_get_control): ...this.
4148 (x86_dr_low_get_status): Rename to...
4149 (x86_linux_dr_get_status): ...this.
4150 (x86_dr_low): Update with new function names.
4151
4b134ca1
GB
41522015-03-24 Gary Benson <gbenson@redhat.com>
4153
4154 * Makefile.in (x86-linux.o): New rule.
4155 * configure.srv: Add x86-linux.o to relevant targets.
4156 * linux-low.c (lwp_set_arch_private_info): New function.
4157 (lwp_arch_private_info): Likewise.
4158 * linux-x86-low.c: Include nat/x86-linux.h.
4159 (arch_lwp_info): Removed structure.
4160 (update_debug_registers_callback):
4161 Use lwp_set_debug_registers_changed.
4162 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4163 and lwp_set_debug_registers_changed.
4164 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4165
34c703da
GB
41662015-03-24 Gary Benson <gbenson@redhat.com>
4167
4168 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4169 * linux-arm-low.c (arm_new_thread): Likewise.
4170 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4171 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4172 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4173 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4174
cff068da
GB
41752015-03-24 Gary Benson <gbenson@redhat.com>
4176
4177 * linux-low.c (ptid_of_lwp): New function.
4178 (lwp_is_stopped): Likewise.
4179 (lwp_stop_reason): Likewise.
4180 * linux-x86-low.c (update_debug_registers_callback):
4181 Use lwp_is_stopped.
4182 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4183 lwp_stop_reason.
4184
b2f7c7e8
GB
41852015-03-24 Gary Benson <gbenson@redhat.com>
4186
4187 * linux-low.h (linux_stop_lwp): Remove declaration.
4188
6d4ee8c6
GB
41892015-03-24 Gary Benson <gbenson@redhat.com>
4190
4191 * linux-low.h: Include nat/linux-nat.h.
4192 * linux-low.c (iterate_over_lwps_args): New structure.
4193 (iterate_over_lwps_filter): New function.
4194 (iterate_over_lwps): Likewise.
4195 * linux-x86-low.c (update_debug_registers_callback):
4196 Update signature to what iterate_over_lwps expects.
4197 Remove PID check that iterate_over_lwps now performs.
4198 (x86_dr_low_set_addr): Use iterate_over_lwps.
4199 (x86_dr_low_set_control): Likewise.
4200
70a0bb6b
GB
42012015-03-24 Gary Benson <gbenson@redhat.com>
4202
4203 * linux-x86-low.c (x86_debug_reg_state): New function.
4204 (x86_linux_prepare_to_resume): Use the above.
4205
7b669087
GB
42062015-03-24 Gary Benson <gbenson@redhat.com>
4207
4208 * linux-low.c (current_lwp_ptid): New function.
4209 * linux-x86-low.c: Include nat/linux-nat.h.
4210 (x86_dr_low_get_addr): Use current_lwp_ptid.
4211 (x86_dr_low_get_control): Likewise.
4212 (x86_dr_low_get_status): Likewise.
4213
eef49a3d
PA
42142015-03-20 Pedro Alves <palves@redhat.com>
4215
4216 * tracepoint.c (cmd_qtstatus): Make "str" const.
4217
b2333d22
PA
42182015-03-20 Pedro Alves <palves@redhat.com>
4219
4220 * server.c (handle_general_set): Make "req_str" const.
4221
23f238d3
PA
42222015-03-19 Pedro Alves <palves@redhat.com>
4223
4224 * linux-low.c (linux_resume_one_lwp): Rename to ...
4225 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4226 instead call perror_with_name.
4227 (check_ptrace_stopped_lwp_gone): New function.
4228 (linux_resume_one_lwp): Reimplement as wrapper around
4229 linux_resume_one_lwp_throw that swallows errors if the LWP is
4230 gone.
4231
91baf43f
PA
42322015-03-19 Pedro Alves <palves@redhat.com>
4233
4234 * linux-low.c (count_events_callback, select_event_lwp_callback):
4235 No longer check whether the thread has resume_stop as last resume
4236 kind.
4237
8bf3b159
PA
42382015-03-19 Pedro Alves <palves@redhat.com>
4239
4240 * linux-low.c (count_events_callback, select_event_lwp_callback):
4241 Use the lwp's status_pending_p field, not the thread's.
4242
b90fc188
PA
42432015-03-19 Pedro Alves <palves@redhat.com>
4244
4245 * linux-low.c (select_event_lwp_callback): Update comments to
4246 no longer mention SIGTRAP.
4247
464b0089
GB
42482015-03-18 Gary Benson <gbenson@redhat.com>
4249
4250 * server.c (handle_query): Do not report vFile:fstat as supported.
4251
aa9e327f
GB
42522015-03-11 Gary Benson <gbenson@redhat.com>
4253
4254 * hostio.c (sys/types.h): New include.
4255 (sys/stat.h): Likewise.
4256 (common-remote-fileio.h): Likewise.
4257 (handle_fstat): New function.
4258 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4259
791c0056
GB
42602015-03-11 Gary Benson <gbenson@redhat.com>
4261
4262 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4263 struct stat.st_blocks and struct stat.st_blksize.
4264 * configure: Regenerate.
4265 * config.in: Likewise.
4266 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4267 (OBS): Add common-remote-fileio.o.
4268 (common-remote-fileio.o): New rule.
4269
9a9df970
PA
42702015-03-09 Pedro Alves <palves@redhat.com>
4271
4272 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4273 'struct sockaddr' pointer in 'accept' call.
4274
9eb1356e
PA
42752015-03-09 Pedro Alves <palves@redhat.com>
4276
4277 Revert:
4278 2015-03-07 Pedro Alves <palves@redhat.com>
4279 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4280 or <winsock2.h> here. Instead include "gdb_socket.h".
4281 (remote_open): Use union gdb_sockaddr_u.
4282 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4283 or <winsock2.h> here. Instead include "gdb_socket.h".
4284 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4285 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4286 or <sys/un.h>.
4287 (init_named_socket, gdb_agent_helper_thread): Use union
4288 gdb_sockaddr_u.
4289
aac331e4
PA
42902015-03-07 Pedro Alves <palves@redhat.com>
4291
4292 * configure.ac (build_warnings): Move
4293 -Wdeclaration-after-statement to the C-specific set.
4294 * configure: Regenerate.
4295
366c75fc
PA
42962015-03-07 Pedro Alves <palves@redhat.com>
4297
4298 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4299 or <winsock2.h> here. Instead include "gdb_socket.h".
4300 (remote_open): Use union gdb_sockaddr_u.
4301 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4302 or <winsock2.h> here. Instead include "gdb_socket.h".
4303 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4304 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4305 or <sys/un.h>.
4306 (init_named_socket, gdb_agent_helper_thread): Use union
4307 gdb_sockaddr_u.
4308
492d29ea
PA
43092015-03-07 Pedro Alves <palves@redhat.com>
4310
4311 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4312 instead.
4313
60a191ed
YQ
43142015-03-06 Yao Qi <yao.qi@linaro.org>
4315
4316 * linux-aarch64-low.c (aarch64_insert_point): Use
4317 show_debug_regs as a boolean.
4318 (aarch64_remove_point): Likewise.
4319
f5771b1d
PA
43202015-03-05 Pedro Alves <palves@redhat.com>
4321
4322 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4323 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4324 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4325 * nto-low.c (nto_target_ops): Likewise.
4326 * spu-low.c (spu_target_ops): Likewise.
4327 * win32-low.c (win32_target_ops): Likewise.
4328
3e572f71
PA
43292015-03-04 Pedro Alves <palves@redhat.com>
4330
72f4393d 4331 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4332 Decide whether a breakpoint triggered based on the SIGTRAP's
4333 siginfo.si_code.
72f4393d
L
4334 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4335 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4336 (linux_low_filter_event): Check for breakpoints before checking
4337 watchpoints.
4338 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4339 siginfo.si_code.
72f4393d
L
4340 (linux_stopped_by_sw_breakpoint)
4341 (linux_supports_stopped_by_sw_breakpoint)
4342 (linux_stopped_by_hw_breakpoint)
4343 (linux_supports_stopped_by_hw_breakpoint): New functions.
4344 (linux_target_ops): Install new target methods.
3e572f71 4345
1ec68e26
PA
43462015-03-04 Pedro Alves <palves@redhat.com>
4347
4348 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4349 * server.c (swbreak_feature, hwbreak_feature): New globals.
4350 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4351 (captured_main): Clear swbreak_feature and hwbreak_feature.
4352 * server.h (swbreak_feature, hwbreak_feature): Declare.
4353 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4354 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4355 supports_stopped_by_hw_breakpoint>: New fields.
4356 (target_supports_stopped_by_sw_breakpoint)
4357 (target_stopped_by_sw_breakpoint)
4358 (target_supports_stopped_by_hw_breakpoint)
4359 (target_stopped_by_hw_breakpoint): Declare.
4360
15c66dd6
PA
43612015-03-04 Pedro Alves <palves@redhat.com>
4362
4363 enum lwp_stop_reason -> enum target_stop_reason
4364 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4365 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4366 (linux_wait_1, stuck_in_jump_pad_callback)
4367 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4368 (linux_stopped_by_watchpoint):
4369 * linux-low.h (enum lwp_stop_reason): Delete.
4370 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4371 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4372
98fc70d6
YQ
43732015-03-04 Yao Qi <yao.qi@linaro.org>
4374
4375 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4376
dd2ac174
GB
43772015-03-03 Gary Benson <gbenson@redhat.com>
4378
4379 * hostio.c (handle_vFile): Fix prefix lengths.
4380
d68e53f4
MM
43812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4382
4383 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4384 ptr_bits.
4385
bf2d68ab
AA
43862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4387
4388 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4389 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4390 (clean): Add "rm -f" for above C files.
4391 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4392 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4393 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4394 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4395 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4396 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4397 (init_registers_s390x_vx_linux64)
4398 (init_registers_s390x_tevx_linux64)
4399 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4400 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4401 declarations.
4402 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4403 (s390_store_vxrs_high): New functions.
4404 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4405 NT_S390_VXRS_HIGH.
4406 (s390_arch_setup): Add logic for selecting one of the new target
4407 descriptions. Activate the new vector regsets if applicable.
4408 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4409 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4410 and init_registers_s390x_tevx_linux64.
4411
c966a859
PA
44122015-03-01 Pedro Alves <palves@redhat.com>
4413
4414 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4415 parameter.
4416
4180215b
PA
44172015-02-27 Pedro Alves <palves@redhat.com>
4418
4419 * linux-x86-low.c (u_debugreg_offset): New function.
4420 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4421
749bab01
PA
44222015-02-27 Pedro Alves <palves@redhat.com>
4423
4424 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4425 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4426 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4427 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4428 (ps_lsetfpregs, ps_getpid)
4429 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4430 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4431 (ps_lsetxregs, ps_plog): Declare.
4432
3c14e5a3
PA
44332015-02-27 Pedro Alves <palves@redhat.com>
4434
4435 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4436 IP_AGENT_EXPORT_FUNC.
4437 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4438 IP_AGENT_EXPORT_FUNC.
4439 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4440 (IP_AGENT_EXPORT): Delete.
4441 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4442 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4443 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4444 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4445 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4446 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4447 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4448 (traceframe_read_count, traceframe_write_count)
4449 (traceframes_created, trace_state_variables, get_raw_reg)
4450 (get_trace_state_variable_value, set_trace_state_variable_value)
4451 (ust_loaded, helper_thread_id, cmd_buf): Use
4452 IPA_SYM_EXPORTED_NAME.
4453 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4454 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4455 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4456 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4457 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4458 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4459 EXTERN_C_PUSH/EXTERN_C_POP.
4460 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4461 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4462 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4463 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4464 (traceframe_write_count, traceframe_read_count)
4465 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4466 (about_to_request_buffer_space, get_trace_state_variable_value)
4467 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4468 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4469 EXTERN_C_PUSH/EXTERN_C_POP.
4470 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4471 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4472 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4473 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4474 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4475 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4476 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4477 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4478 Define.
4479 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4480 (IP_AGENT_EXPORT_VAR_DECL): Define.
4481 (tracing): Declare.
4482 (gdb_agent_get_raw_reg): Declare.
4483
fe978cb0
PA
44842015-02-27 Tom Tromey <tromey@redhat.com>
4485 Pedro Alves <palves@redhat.com>
4486
4487 Rename symbols whose names are reserved C++ keywords throughout.
4488
3bc3d82a
PA
44892015-02-27 Pedro Alves <palves@redhat.com>
4490
4491 * Makefile.in (COMPILER): New, get it from autoconf.
4492 (CXX): Get from autoconf instead.
4493 (COMPILE.pre): Use COMPILER.
4494 (CC-LD): Rename to ...
4495 (CC_LD): ... this. Use COMPILER.
4496 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4497 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4498 * acinclude.m4: Include build-with-cxx.m4.
4499 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4500 Disable -Werror by default if building in C++ mode.
4501 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4502 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4503 the C++ compiler. Save/restore CXXFLAGS too.
4504 * configure: Regenerate.
4505
07697489
PA
45062015-02-27 Pedro Alves <palves@redhat.com>
4507
4508 * acinclude.m4: Include libiberty.m4.
4509 * configure.ac: Call libiberty_INIT.
4510 * config.in, configure: Regenerate.
4511
9beb7c4e
PA
45122015-02-26 Pedro Alves <palves@redhat.com>
4513
4514 * linux-low.c (linux_wait_1): When incrementing the PC past a
4515 program breakpoint always use the_low_target.breakpoint_len as
4516 increment, rather than the maximum between that and
4517 the_low_target.decr_pc_after_break.
4518
8090aef2
PA
45192015-02-23 Pedro Alves <palves@redhat.com>
4520
4521 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4522 thread was doing a step-over; always adjust the PC if
4523 we stepped over a permanent breakpoint.
4524 (linux_wait_1): If we stepped over breakpoint that was on top of a
4525 permanent breakpoint, manually advance the PC past it.
4526
bc9540e8
PA
45272015-02-23 Pedro Alves <palves@redhat.com>
4528
4529 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4530 modes.
4531 (x86_fill_gregset, x86_store_gregset): Use it when handling
4532 $orig_eax.
4533
2db9a427
PA
45342015-02-20 Pedro Alves <palves@redhat.com>
4535
4536 * thread-db.c: Include "nat/linux-procfs.h".
4537 (thread_db_init): Skip listing new threads if the kernel supports
4538 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4539
afa8d396
PA
45402015-02-20 Pedro Alves <palves@redhat.com>
4541
4542 * linux-low.c (status_pending_p_callback): Use ptid_match.
4543
c9587f88
AT
45442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4545
4546 PR breakpoints/16812
4547 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4548 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4549 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4550
b05ec7a5
AT
45512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4552
4553 PR breakpoints/15956
4554 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4555
d33501a5
MM
45562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4557
4558 * linux-low.c (linux_low_btrace_conf): Print size.
4559 * server.c (handle_btrace_conf_general_set): New.
4560 (hanle_general_set): Call handle_btrace_conf_general_set.
4561 (handle_query): Report Qbtrace-conf:bts:size as supported.
4562
f4abbc16
MM
45632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4564
4565 * linux-low.c (linux_low_enable_btrace): Update parameters.
4566 (linux_low_btrace_conf): New.
4567 (linux_target_ops)<to_btrace_conf>: Initialize.
4568 * server.c (current_btrace_conf): New.
4569 (handle_btrace_enable): Rename to ...
4570 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4571 to target_enable_btrace. Update comment. Update users.
4572 (handle_qxfer_btrace_conf): New.
4573 (qxfer_packets): Add btrace-conf entry.
4574 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4575 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4576 (target_ops)<read_btrace_conf>: New.
4577 (target_enable_btrace): Update parameters.
4578 (target_read_btrace_conf): New.
4579
043c3577
MM
45802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4581
4582 * server.c (handle_btrace_general_set): Remove call to
4583 target_supports_btrace.
4584 (supported_btrace_packets): New.
4585 (handle_query): Call supported_btrace_packets.
4586 * target.h: include btrace-common.h.
4587 (btrace_target_info): Removed.
4588 (supports_btrace, target_supports_btrace): Update parameters.
4589
734b0e4b
MM
45902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4591
4592 * Makefile.in (SFILES): Add common/btrace-common.c.
4593 (OBS): Add common/btrace-common.o.
4594 (btrace-common.o): Add build rules.
4595 * linux-low: Include btrace-common.h.
4596 (linux_low_read_btrace): Use struct btrace_data. Call
4597 btrace_data_init and btrace_data_fini.
4598
d6c146e9
PA
45992015-02-06 Pedro Alves <palves@redhat.com>
4600
4601 * thread-db.c (find_new_threads_callback): Add debug output.
4602
20ba1ce6
PA
46032015-02-04 Pedro Alves <palves@redhat.com>
4604
4605 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4606 (resume_stopped_resumed_lwps): New function.
4607 (linux_wait_for_event_filtered): Use it.
4608
8cc73a39
SDJ
46092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4610
4611 * Makefile.in (SFILES): Add linux-personality.c.
4612 (linux-personality.o): New rule.
4613 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4614 list of objects to be built.
4615 * linux-low.c: Include nat/linux-personality.h.
4616 (linux_create_inferior): Remove code to disable address space
4617 randomization (moved to ../nat/linux-personality.c). Create
4618 cleanup to disable address space randomization.
4619
fb23d554
SDJ
46202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4621
4622 * Makefile.in (posix-strerror.o): New rule.
4623 (mingw-strerror.o): Likewise.
4624 * configure: Regenerated.
4625 * configure.ac: Source file ../common/common.host. Initialize new
4626 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4627
cdf43629
YQ
46282015-01-14 Yao Qi <yao@codesourcery.com>
4629
4630 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4631 (ppc-linux.o): New rule.
4632 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4633 * configure.ac: AC_CHECK_FUNCS(getauxval).
4634 * config.in: Re-generated.
4635 * configure: Re-generated.
4636 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4637 ppc64_64bit_inferior_p
4638
514c5338
YQ
46392015-01-14 Yao Qi <yao@codesourcery.com>
4640
4641 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4642 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4643 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4644 (PT_ORIG_R3, PT_TRAP): Likewise.
4645 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4646 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4647 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4648
3368c1e5
JB
46492015-01-10 Joel Brobecker <brobecker@adacore.com>
4650
4651 * i387-fp.c (i387_cache_to_xsave): In look over
4652 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4653 zmmh_low_space field by use of zmmh_high_space.
4654
582511be
PA
46552015-01-09 Pedro Alves <palves@redhat.com>
4656
4657 * linux-low.c (step_over_bkpt): Move higher up in the file.
4658 (handle_extended_wait): Don't store the stop_pc here.
4659 (get_stop_pc): Adjust comments and rename to ...
4660 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4661 stopped for a software breakpoint or hardware breakpoint.
4662 (thread_still_has_status_pending_p): New function.
4663 (status_pending_p_callback): Use
4664 thread_still_has_status_pending_p. If the event is no longer
4665 interesting, resume the LWP.
4666 (handle_tracepoints): Add assert.
4667 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4668 (wstatus_maybe_breakpoint): New function.
4669 (cancel_breakpoint): Delete function.
4670 (check_stopped_by_watchpoint): New function, factored out from
4671 linux_low_filter_event.
4672 (lp_status_maybe_breakpoint): Delete function.
4673 (linux_low_filter_event): Remove filter_ptid argument.
4674 Leave thread group exits pending here. Store the LWP's stop PC.
4675 Always leave events pending.
4676 (linux_wait_for_event_filtered): Pull all events out of the
4677 kernel, and leave them all pending.
4678 (count_events_callback, select_event_lwp_callback): Consider all
4679 events.
4680 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4681 (select_event_lwp): Only give preference to the stepping LWP in
4682 all-stop mode. Adjust comments.
4683 (ignore_event): New function.
4684 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4685 references to cancel_breakpoints. Adjust to renames. Also give
4686 equal priority to all LWPs that have had events in non-stop mode.
4687 If reporting a software breakpoint event, unadjust the LWP's PC.
4688 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4689 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4690 Adjust.
4691 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4692 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4693 (linux_stopped_by_watchpoint): Adjust.
4694 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4695 * linux-low.h (enum lwp_stop_reason): New.
4696 (struct lwp_info) <stop_pc>: Adjust comment.
4697 <stopped_by_watchpoint>: Delete field.
4698 <stop_reason>: New field.
4699 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4700 * mem-break.c (software_breakpoint_inserted_here)
4701 (hardware_breakpoint_inserted_here): New function.
4702 * mem-break.h (software_breakpoint_inserted_here)
4703 (hardware_breakpoint_inserted_here): Declare.
4704 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4705 (cancel_breakpoints): Delete.
4706 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4707 (upload_fast_traceframes): Remove references to
4708 cancel_breakpoints.
4709
a33e3959
PA
47102015-01-09 Pedro Alves <palves@redhat.com>
4711
4712 * thread-db.c (find_new_threads_callback): Ignore thread if the
4713 kernel thread ID is -1.
4714
8784d563
PA
47152015-01-09 Pedro Alves <palves@redhat.com>
4716
4717 * linux-low.c (linux_attach_fail_reason_string): Move to
4718 nat/linux-ptrace.c, and rename.
4719 (linux_attach_lwp): Update comment.
4720 (attach_proc_task_lwp_callback): New function.
4721 (linux_attach): Adjust to rename and use
4722 linux_proc_attach_tgid_threads.
4723 (linux_attach_fail_reason_string): Delete declaration.
4724
76f2b779
JB
47252015-01-01 Joel Brobecker <brobecker@adacore.com>
4726
4727 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4728 * server.c (gdbserver_version): Likewise.
4729
fafcc06a
SDJ
47302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4731
4732 * remote-utils.c: Include ctype.h.
4733 (input_interrupt): Explicitly handle the case when the char
4734 received is the NUL byte. Improve the printing of non-ASCII
4735 characters.
4736
beed38b8
JB
47372014-12-16 Joel Brobecker <brobecker@adacore.com>
4738
4739 * linux-low.c (linux_low_filter_event): Update call to
4740 linux_enable_event_reporting following the addition of
4741 a new parameter to that function.
4742
bf330350
CU
47432014-12-16 Catalin Udma <catalin.udma@freescale.com>
4744
4745 PR server/17457
4746 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4747 (AARCH64_FPCR_REGNO): Likewise.
4748 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4749 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4750 (aarch64_store_fpregset): Likewise.
4751
5227d625
JB
47522014-12-15 Joel Brobecker <brobecker@adacore.com>
4753
4754 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4755 Remove FIXME comment about assumption about N.
4756
f93b65a0
JB
47572014-12-13 Joel Brobecker <brobecker@adacore.com>
4758
4759 * configure.ac: If large-file support is disabled in GDBserver,
4760 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4761 * configure: Regenerate.
4762
e5a9158d
AA
47632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4764
4765 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4766 warning upon ENODATA from ptrace.
4767 * linux-s390-low.c (s390_store_tdb): New.
4768 (s390_regsets): Add regset for NT_S390_TDB.
4769
feea5f36
AA
47702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4771
4772 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4773 without a fill_function.
4774 * linux-s390-low.c (s390_fill_last_break): Remove.
4775 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4776 (s390_arch_setup): Use regset's size instead of fill_function for
4777 loop end condition.
4778
098dbe61
AA
47792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4780
4781 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4782 the regset's store function when ptrace returned an error.
4783 * regcache.c (get_thread_regcache): Invalidate register cache
4784 before fetching inferior's registers.
4785
28eef672
AA
47862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4787
4788 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4789 while-loop as for-loop.
4790 (regsets_store_inferior_registers): Likewise.
4791
bdca27a2
YQ
47922014-11-28 Yao Qi <yao@codesourcery.com>
4793
4794 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4795 * config.in, configure: Re-generate.
4796 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4797 is defined.
4798
9c232dda
YQ
47992014-11-21 Yao Qi <yao@codesourcery.com>
4800
4801 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4802 (AC_CHECK_HEADERS): Remove malloc.h.
4803 * configure: Re-generated.
4804 * config.in: Re-generated.
4805 * server.h: Don't include alloca.h and malloc.h.
4806 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4807 Don't include malloc.h.
4808
43968415
JB
48092014-11-17 Joel Brobecker <brobecker@adacore.com>
4810
4811 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4812 corresponding ERRNO check in same block.
4813
40e91bc7
PA
48142014-11-12 Pedro Alves <palves@redhat.com>
4815
4816 * server.c (cont_thread): Update comment.
4817 (start_inferior, attach_inferior): No longer clear cont_thread.
4818 (handle_v_cont): No longer set cont_thread.
4819 (captured_main): Clear cont_thread each time a GDB connects.
4820
c2c118cf
PA
48212014-11-12 Pedro Alves <palves@redhat.com>
4822
4823 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4824 thread, and don't resume all threads if the Hc thread has exited.
4825
78708b7c
PA
48262014-11-12 Pedro Alves <palves@redhat.com>
4827
4828 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4829 the process group instead of to a specific LWP.
4830
a2abc7de
PA
48312014-10-15 Pedro Alves <palves@redhat.com>
4832
4833 PR server/17487
4834 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4835 parameter.
4836 (arm_set_thread_context): Delete.
4837 (the_low_target): Adjust.
4838 * win32-i386-low.c (debug_registers_changed)
4839 (debug_registers_used): Delete.
4840 (update_debug_registers_callback): New function.
4841 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4842 needing to update their debug registers.
4843 (win32_get_current_dr): New function.
4844 (x86_dr_low_get_addr, x86_dr_low_get_control)
4845 (x86_dr_low_get_status): Fetch the debug register from the thread
4846 record's context.
4847 (i386_initial_stuff): Adjust.
4848 (i386_get_thread_context): Remove current_event parameter. Don't
4849 clear debug_registers_changed nor copy DR values to
4850 debug_reg_state.
4851 (i386_set_thread_context): Delete.
4852 (i386_prepare_to_resume): New function.
4853 (i386_thread_added): Mark the thread as needing to update irs
4854 debug registers.
4855 (the_low_target): Remove i386_set_thread_context and install
4856 i386_prepare_to_resume.
4857 * win32-low.c (win32_get_thread_context): Adjust.
4858 (win32_set_thread_context): Use SetThreadContext
4859 directly.
4860 (win32_prepare_to_resume): New function.
4861 (win32_require_context): New function, factored out from ...
4862 (thread_rec): ... this.
4863 (continue_one_thread): Call win32_prepare_to_resume on each thread
4864 we're about to continue.
4865 (win32_resume): Call win32_prepare_to_resume on the event thread.
4866 * win32-low.h (struct win32_thread_info)
4867 <debug_registers_changed>: New field.
4868 (struct win32_target_ops): Change prototype of set_thread_context,
4869 delete set_thread_context and add prepare_to_resume.
4870 (win32_require_context): New declaration.
4871
a442d071
GB
48722014-10-08 Gary Benson <gbenson@redhat.com>
4873
4874 * server.h: Do not include common-exceptions.h.
4875
6f1947e8
GB
48762014-10-08 Gary Benson <gbenson@redhat.com>
4877
4878 * server.h: Do not include cleanups.h.
4879
63b434a4
JH
48802014-09-30 James Hogan <james.hogan@imgtec.com>
4881
4882 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4883 mips64-dsp-linux.c.
4884
c4d9ceb6
YQ
48852014-09-23 Yao Qi <yao@codesourcery.com>
4886
4887 * linux-low.c (lp_status_maybe_breakpoint): New function.
4888 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4889 (count_events_callback): Likewise.
4890 (select_event_lwp_callback): Likewise.
4891 (cancel_breakpoints_callback): Likewise.
4892
89a5711c
DB
48932014-09-19 Don Breazeal <donb@codesourcery.com>
4894
4895 * linux-low.c (handle_extended_wait): Call
4896 linux_ptrace_get_extended_event.
4897 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4898 linux_is_extended_waitstatus.
4899
bffc0964
JB
49002014-09-16 Joel Brobecker <brobecker@adacore.com>
4901
4902 * Makefile.in (CPPFLAGS): Define.
4903 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4904 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4905
0bfdf32f
GB
49062014-09-16 Gary Benson <gbenson@redhat.com>
4907
4908 * inferiors.h (current_inferior): Renamed as...
4909 (current_thread): New variable. All uses updated.
4910 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4911 (maybe_move_out_of_jump_pad): Likewise.
4912 (cancel_breakpoint): Likewise.
4913 (linux_low_filter_event): Likewise.
4914 (wait_for_sigstop): Likewise.
4915 (linux_resume_one_lwp): Likewise.
4916 (need_step_over_p): Likewise.
4917 (start_step_over): Likewise.
4918 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4919 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4920 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4921 and save_inferior as saved_thread.
4922 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4923 saved_thread.
4924 (regcache_invalidate_thread): Likewise.
4925 * remote-utils.c (prepare_resume_reply): Likewise.
4926 * thread-db.c (thread_db_get_tls_address): Likewise.
4927 (disable_thread_event_reporting): Likewise.
4928 (remove_thread_event_breakpoints): Likewise.
4929 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4930 as saved_thread.
4931 * target.h (set_desired_inferior): Renamed as...
4932 (set_desired_thread): New declaration. All uses updated.
4933 * server.c (myresume): Updated comment to reference thread instead
4934 of inferior.
4935 (handle_serial_event): Likewise.
4936 (handle_target_event): Likewise.
4937
361c8ade
GB
49382014-09-12 Tom Tromey <tromey@redhat.com>
4939 Gary Benson <gbenson@redhat.com>
4940
4941 * regcache.h: Include common-regcache.h.
4942 (regcache_read_pc): Don't declare.
4943 * regcache.c (get_thread_regcache_for_ptid): New function.
4944
bd9269f7
GB
49452014-09-11 Tom Tromey <tromey@redhat.com>
4946 Gary Benson <gbenson@redhat.com>
4947
4948 * symbol.c: New file.
4949 * Makefile.in (SFILES): Add symbol.c.
4950 (OBS): Add symbol.o.
4951
f8c1d06b
GB
49522014-09-11 Gary Benson <gbenson@redhat.com>
4953
4954 * target.c (target_stop_ptid, target_continue_ptid): New
4955 functions.
4956
721ec300
GB
49572014-09-11 Tom Tromey <tromey@redhat.com>
4958 Gary Benson <gbenson@redhat.com>
4959
4960 * target.h: Include target/target.h.
4961 * target.c (target_read_memory, target_read_uint32)
4962 (target_write_memory): New functions.
4963
c5e92cca
GB
49642014-09-11 Gary Benson <gbenson@redhat.com>
4965
4966 * server.h (debug_hw_points): Don't declare.
4967 * server.c (debug_hw_points): Don't define. Replace all uses
4968 with show_debug_regs.
4969 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4970 all uses with show_debug_regs.
4971
2e4bb98a
EBM
49722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4973
4974 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4975 endianness into account.
4976 (ppc_supply_ptrace_register): Likewise.
4977
ac740bc7
JH
49782014-09-03 James Hogan <james.hogan@imgtec.com>
4979
4980 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4981 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4982
97ea6506
GB
49832014-09-03 Gary Benson <gbenson@redhat.com>
4984
4985 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4986 ALL_DEBUG_ADDRESS_REGISTERS.
4987
df7e5265
GB
49882014-09-02 Gary Benson <gbenson@redhat.com>
4989
4990 * i386-low.h: Renamed as...
4991 * x86-low.h: New file. All type, function and variable name
4992 prefixes changed from "i386_" to "x86_". All references updated.
4993 * i386-low.c: Renamed as...
4994 * x86-low.c: New file. All type, function and variable name
4995 prefixes changed from "i386_" to "x86_". All references updated.
4996
ed859da7
GB
49972014-09-02 Gary Benson <gbenson@redhat.com>
4998
4999 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5000 (x86_linux_new_thread): Likewise.
5001
860789c7
GB
50022014-08-29 Gary Benson <gbenson@redhat.com>
5003
5004 * server.h (setjmp.h): Do not include.
5005 (toplevel): Do not declare.
5006 (common-exceptions.h): Include.
5007 (cleanups.h): Likewise.
5008 * server.c (toplevel): Do not define.
5009 (exit_code): New static global.
5010 (detach_or_kill_for_exit_cleanup): New function.
5011 (main): New function. Original main renamed to...
5012 (captured_main): New function.
5013 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5014
ff55e1b5
GB
50152014-08-29 Gary Benson <gbenson@redhat.com>
5016
5017 * Makefile.in (SFILES): Add common/common-exceptions.c.
5018 (OBS): Add common-exceptions.o.
5019 (common-exceptions.o): New rule.
5020 * utils.c (prepare_to_throw_exception): New function.
5021
e9bcb658
GB
50222014-08-29 Gary Benson <gbenson@redhat.com>
5023
5024 * config.in: Regenerate.
5025 * configure: Likewise.
5026
e3180625
GB
50272014-08-29 Gary Benson <gbenson@redhat.com>
5028
5029 * Makefile.in (SFILES): Add common/cleanups.c.
5030 (OBS): cleanups.o.
5031 (cleanups.o): New rule.
5032
e3d6ba5d
GB
50332014-08-29 Gary Benson <gbenson@redhat.com>
5034
5035 * utils.c (internal_vwarning): New function.
5036
7096e886
GB
50372014-08-28 Gary Benson <gbenson@redhat.com>
5038
5039 * utils.h (fatal): Remove declaration.
5040 * utils.c (fatal): Remove function.
5041
14ce3192
GB
50422014-08-28 Gary Benson <gbenson@redhat.com>
5043
5044 * tracepoint.c (gdb_agent_init): Replace fatal with
5045 perror_with_name.
5046 (initialize_tracepoint): Likewise.
5047
50278d59
GB
50482014-08-28 Gary Benson <gbenson@redhat.com>
5049
5050 * remote-utils.c (remote_prepare): Replace fatal with error.
5051
aa96c426
GB
50522014-08-28 Gary Benson <gbenson@redhat.com>
5053
5054 * linux-low.c (linux_async): Replace fatal with warning.
5055 Tidy up and return.
5056 (linux_start_non_stop): Return -1 if linux_async failed.
5057
f7160e97
GB
50582014-08-28 Gary Benson <gbenson@redhat.com>
5059
5060 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5061 gdb_assert.
5062 (i386_dr_low_get_addr): Remove vague comment.
5063 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5064 gdb_assert.
5065
38e08fca
GB
50662014-08-28 Gary Benson <gbenson@redhat.com>
5067
5068 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5069 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5070 internal_error.
5071 (linux_resume_one_lwp): Likewise.
5072 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5073 gdb_assert.
5074 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5075 with internal_error.
5076 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5077 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5078 (find_register_by_name): Replace fatal with internal_error.
5079 (find_regno): Likewise.
5080 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5081 * thread-db.c (thread_db_create_event): Likewise.
5082 (thread_db_load_search): Likewise.
5083 (try_thread_db_load_1): Likewise.
5084 * tracepoint.c (get_jump_space_head): Replace fatal with
5085 internal_error.
5086 (claim_trampoline_space): Likewise.
5087 (have_fast_tracepoint_trampoline_buffer): Likewise.
5088 (cmd_qtstart): Likewise.
5089 (stop_tracing): Likewise.
5090 (fast_tracepoint_collecting): Likewise.
5091 (target_malloc): Likewise.
5092 (download_tracepoint): Likewise.
5093 (download_trace_state_variables): Replace check with gdb_assert.
5094 (upload_fast_traceframes): Replace fatal with internal_error.
5095
34abf635
GB
50962014-08-19 Tom Tromey <tromey@redhat.com>
5097 Gary Benson <gbenson@redhat.com>
5098
5099 * Makefile.in (SFILES): Add common/common-debug.c.
5100 (OBS): Add common-debug.o.
5101 (common-debug.o): New rule.
5102 * debug.h (debug_printf): Don't declare.
5103 * debug.c (debug_printf): Renamed and rewritten as...
5104 (debug_vprintf): New function.
5105
f6e94d78
GB
51062014-08-19 Gary Benson <gbenson@redhat.com>
5107
5108 * utils.h: Do not include print-utils.h.
5109
9239eeab
GB
51102014-08-19 Tom Tromey <tromey@redhat.com>
5111 Gary Benson <gbenson@redhat.com>
5112
5113 * server.h: Add static assertion.
5114 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5115
ef87c8bb
GB
51162014-08-19 Tom Tromey <tromey@redhat.com>
5117 Gary Benson <gbenson@redhat.com>
5118
5119 * Makefile.in (SFILES): Add common/errors.c.
5120 (OBS): Add errors.o.
5121 (IPA_OBS): Add errors-ipa.o.
5122 (errors.o): New rule.
5123 (errors-ipa.o): Likewise.
5124 * utils.h (perror_with_name, error, warning): Don't declare.
5125 * utils.c (warning): Renamed and rewritten as...
5126 (vwarning): New function.
5127 (error): Renamed and rewritten as...
5128 (verror): New function.
5129 (internal_error): Renamed and rewritten as...
5130 (internal_verror): New function.
5131
bb974a24
GB
51322014-08-07 Gary Benson <gbenson@redhat.com>
5133
5134 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5135 * configure: Regenerate.
5136 * config.in: Likewise.
5137 * server.h: Do not include errno.h.
5138 * event-loop.c: Likewise.
5139 * hostio-errno.c: Likewise.
5140 * linux-low.c: Likewise.
5141 * remote-utils.c: Likewise.
5142 * spu-low.c: Likewise.
5143 * utils.c: Likewise.
5144 * gdbreplay.c: Unconditionally include errno.h.
5145
6d3d12eb
GB
51462014-08-07 Gary Benson <gbenson@redhat.com>
5147
5148 * server.h: Do not include string.h.
5149 * event-loop.c: Likewise.
5150 * linux-low.c: Likewise.
5151 * regcache.c: Likewise.
5152 * remote-utils.c: Likewise.
5153 * spu-low.c: Likewise.
5154 * utils.c: Likewise.
5155
dccbb609
GB
51562014-08-07 Gary Benson <gbenson@redhat.com>
5157
5158 * server.h: Do not include gdb_assert.h.
5159
e76df0d0
GB
51602014-08-07 Gary Benson <gbenson@redhat.com>
5161
5162 * server.h: Do not include common-utils.h.
5163
4cb9c816
GB
51642014-08-07 Gary Benson <gbenson@redhat.com>
5165
5166 * server.h: Do not include ptid.h.
5167 * notif.h: Likewise.
5168
3995eeee
GB
51692014-08-07 Gary Benson <gbenson@redhat.com>
5170
5171 * server.h: Do not include gdb_locale.h.
5172
cb9f1a9b
GB
51732014-08-07 Gary Benson <gbenson@redhat.com>
5174
5175 * server.h: Do not include gdb/signals.h.
5176 * win32-low.c: Likewise.
5177
a5fceff8
GB
51782014-08-07 Gary Benson <gbenson@redhat.com>
5179
5180 * server.h: Do not include pathmax.h.
5181
b9391142
GB
51822014-08-07 Gary Benson <gbenson@redhat.com>
5183
5184 * server.h: Do not include libiberty.h.
5185 * linux-bfin-low.c: Likewise.
5186
0e443c87
GB
51872014-08-07 Gary Benson <gbenson@redhat.com>
5188
5189 * server.h: Do not include ansidecl.h.
5190
8ebb3f56
GB
51912014-08-07 Gary Benson <gbenson@redhat.com>
5192
5193 * linux-x86-low.c: Do not include stddef.h.
5194 * lynx-ppc-low.c: Likewise.
5195 * tracepoint.c: Likewise.
5196
8980bdf6
GB
51972014-08-07 Gary Benson <gbenson@redhat.com>
5198
5199 * server.h: Do not include stdarg.h.
5200 * nto-low.c: Likewise.
5201
d7096f71
GB
52022014-08-07 Gary Benson <gbenson@redhat.com>
5203
5204 * server.h: Do not include stdlib.h.
5205 * inferiors.c: Likewise.
5206 * linux-low.c: Likewise.
5207 * regcache.c: Likewise.
5208 * spu-low.c: Likewise.
5209 * tracepoint.c: Likewise.
5210 * utils.c: Likewise.
5211
d02f550d
GB
52122014-08-07 Gary Benson <gbenson@redhat.com>
5213
5214 * server.h: Do not include stdio.h.
5215 * linux-low.c: Likewise.
5216 * remote-utils.c: Likewise.
5217 * spu-low.c: Likewise.
5218 * utils.c: Likewise.
5219 * wincecompat.c: Likewise.
5220
87f6c4e3
GB
52212014-08-06 Gary Benson <gbenson@redhat.com>
5222
5223 * regcache.c (init_register_cache): Move conditionals inside if.
5224
7089dca4
GB
52252014-08-06 Gary Benson <gbenson@redhat.com>
5226
5227 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5228
462f517e
GB
52292014-07-31 Gary Benson <gbenson@redhat.com>
5230
5231 * ax.h: Do not include server.h.
5232 * gdbthread.h: Likewise.
5233 * lynx-low.h: Likewise.
5234 * notif.h: Likewise.
5235
976411d6
GB
52362014-07-30 Gary Benson <gbenson@redhat.com>
5237
5238 * server.h: Include common-defs.h.
5239 Do not include config.h or build-gnulib-gdbserver/config.h.
5240
d41f6d8e
GB
52412014-07-30 Gary Benson <gbenson@redhat.com>
5242
5243 * hostio-errno.c: Move server.h to top of includes list.
5244 * inferiors.c: Likewise.
5245 * linux-x86-low.c: Likewise.
5246 * notif.c: Include server.h.
5247
314c6a35
TT
52482014-07-24 Tom Tromey <tromey@redhat.com>
5249 Gary Benson <gbenson@redhat.com>
5250
5251 * server.h (CORE_ADDR): Now unsigned.
5252
69ff6be5
PA
52532014-07-16 Pedro Alves <palves@redhat.com>
5254
5255 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5256
ce9e3fe7
PA
52572014-07-15 Pedro Alves <palves@redhat.com>
5258
5259 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5260 copy.
5261
e76126e8
PA
52622014-07-11 Pedro Alves <palves@redhat.com>
5263
5264 * linux-low.c (kill_wait_lwp): New function, based on
5265 kill_one_lwp_callback, but use my_waitpid directly.
5266 (kill_one_lwp_callback, linux_kill): Use it.
5267
8e9db26e
PA
52682014-06-23 Pedro Alves <palves@redhat.com>
5269
5270 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5271 before setting DR0..DR3.
5272
698b3e08
GB
52732014-06-20 Gary Benson <gbenson@redhat.com>
5274
5275 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5276 * configure: Regenerated.
5277 * config.in: Likewise.
5278
125f8a3d
GB
52792014-06-20 Gary Benson <gbenson@redhat.com>
5280
5281 * Makefile.in (SFILES): Update locations for files moved
5282 from common to nat.
5283 (object file files): Reordered.
5284
42995dbd
GB
52852014-06-20 Gary Benson <gbenson@redhat.com>
5286
5287 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5288 (i386_dr_low_set_addr): Likewise.
5289 (i386_dr_low_get_addr): Likewise.
5290 (i386_dr_low_can_set_control): Likewise.
5291 (i386_dr_low_set_control): Likewise.
5292 (i386_dr_low_get_control): Likewise.
5293 (i386_dr_low_get_status): Likewise.
5294 (i386_get_debug_register_length): Likewise.
5295 * linux-x86-low.c (i386_dr_low_set_addr):
5296 Changed signature. Made static.
5297 (i386_dr_low_get_addr): Likewise.
5298 (i386_dr_low_set_control): Likewise.
5299 (i386_dr_low_get_control): Likewise.
5300 (i386_dr_low_get_status): Likewise.
5301 (i386_dr_low): New global variable.
5302 * win32-i386-low.c (i386_dr_low_set_addr):
5303 Changed signature. Made static.
5304 (i386_dr_low_get_addr): Likewise.
5305 (i386_dr_low_set_control): Likewise.
5306 (i386_dr_low_get_control): Likewise.
5307 (i386_dr_low_get_status): Likewise.
5308 (i386_dr_low): New global variable.
5309
e1d2394b
MS
53102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5311
5312 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5313 * Makefile.in (AR, AR_FLAGS): Define.
5314 * configure: Regenerate.
5315
3a8ee006
GB
53162014-06-19 Gary Benson <gbenson@redhat.com>
5317
5318 * Makefile.in (i386-dregs.o): New rule.
5319 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5320 * i386-low.c (target.h): Remove include.
5321 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5322 (DR_CONTROL_SHIFT): Likewise.
5323 (DR_CONTROL_SIZE): Likewise.
5324 (DR_RW_EXECUTE): Likewise.
5325 (DR_RW_WRITE): Likewise.
5326 (DR_RW_READ): Likewise.
5327 (DR_RW_IORW): Likewise.
5328 (DR_LEN_1): Likewise.
5329 (DR_LEN_2): Likewise.
5330 (DR_LEN_4): Likewise.
5331 (DR_LEN_8): Likewise.
5332 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5333 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5334 (DR_ENABLE_SIZE): Likewise.
5335 (DR_LOCAL_SLOWDOWN): Likewise.
5336 (DR_GLOBAL_SLOWDOWN): Likewise.
5337 (DR_CONTROL_RESERVED): Likewise.
5338 (I386_DR_CONTROL_MASK): Likewise.
5339 (I386_DR_VACANT): Likewise.
5340 (I386_DR_LOCAL_ENABLE): Likewise.
5341 (I386_DR_GLOBAL_ENABLE): Likewise.
5342 (I386_DR_DISABLE): Likewise.
5343 (I386_DR_SET_RW_LEN): Likewise.
5344 (I386_DR_GET_RW_LEN): Likewise.
5345 (I386_DR_WATCH_HIT): Likewise.
5346 (i386_wp_op_t): Likewise.
5347 (i386_show_dr): Likewise.
5348 (i386_length_and_rw_bits): Likewise.
5349 (i386_insert_aligned_watchpoint): Likewise.
5350 (i386_remove_aligned_watchpoint): Likewise.
5351 (i386_handle_nonaligned_watchpoint): Likewise.
5352 i386_update_inferior_debug_regs(): Likewise.
5353 (i386_dr_insert_watchpoint): Likewise.
5354 (i386_dr_remove_watchpoint): Likewise.
5355 (i386_dr_region_ok_for_watchpoint): Likewise.
5356 (i386_dr_stopped_data_address): Likewise.
5357 (i386_dr_stopped_by_watchpoint): Likewise.
5358
8f26655c
GB
53592014-06-19 Gary Benson <gbenson@redhat.com>
5360
5361 * i386-low.c (i386_dr_show): Renamed to
5362 i386_show_dr and made static. All uses updated.
5363 (i386_dr_length_and_rw_bits): Renamed to
5364 i386_length_and_rw_bits and made static.
5365 All uses updated.
5366 (i386_dr_insert_aligned_watchpoint): Renamed to
5367 i386_insert_aligned_watchpoint and made static.
5368 All uses updated.
5369 (i386_dr_remove_aligned_watchpoint): Renamed to
5370 i386_remove_aligned_watchpoint and made static.
5371 All uses updated.
5372 (i386_dr_update_inferior_debug_regs): Renamed to
5373 i386_update_inferior_debug_regs and made static.
5374 All uses updated.
5375
b9228891
GB
53762014-06-18 Gary Benson <gbenson@redhat.com>
5377
5171def3
GB
5378 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5379 (i386_dr_low_can_set_control): Likewise.
5380 (i386_get_debug_register_length): Likewise.
5381 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5382 (i386_dr_low_can_set_control): Likewise.
5383 (i386_get_debug_register_length): Likewise.
5384
53852014-06-17 Gary Benson <gbenson@redhat.com>
5386
b9228891
GB
5387 * i386-low.h (i386-dregs.h): New include.
5388 (DR_FIRSTADDR): Now in i386-dregs.h.
5389 (DR_LASTADDR): Likewise.
5390 (DR_NADDR): Likewise.
5391 (DR_STATUS): Likewise.
5392 (DR_CONTROL): Likewise.
5393 (i386_debug_reg_state): Likewise.
5394 (i386_dr_insert_watchpoint): Likewise.
5395 (i386_dr_remove_watchpoint): Likewise.
5396 (i386_dr_region_ok_for_watchpoint): Likewise.
5397 (i386_dr_stopped_data_address): Likewise.
5398 (i386_dr_stopped_by_watchpoint): Likewise.
5399 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5400
4be83cc2
GB
54012014-06-18 Gary Benson <gbenson@redhat.com>
5402
5403 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5404 i386_dr_insert_watchpoint.
5405 (i386_low_remove_watchpoint): Renamed to
5406 i386_dr_remove_watchpoint.
5407 (i386_low_region_ok_for_watchpoint): Renamed to
5408 i386_dr_region_ok_for_watchpoint.
5409 (i386_low_stopped_data_address): Renamed to
5410 i386_dr_stopped_data_address.
5411 (i386_low_stopped_by_watchpoint): Renamed to
5412 i386_dr_stopped_by_watchpoint.
5413 * i386-low.c (i386_show_dr): Renamed to
5414 i386_dr_show and made nonstatic. All uses updated.
5415 (i386_length_and_rw_bits): Renamed to
5416 i386_dr_length_and_rw_bits and made nonstatic.
5417 All uses updated.
5418 (i386_insert_aligned_watchpoint): Renamed to
5419 i386_dr_insert_aligned_watchpoint and made nonstatic.
5420 All uses updated.
5421 (i386_remove_aligned_watchpoint): Renamed to
5422 i386_dr_remove_aligned_watchpoint and made nonstatic.
5423 All uses updated.
5424 (i386_update_inferior_debug_regs): Renamed to
5425 i386_dr_update_inferior_debug_regs and made nonstatic.
5426 All uses updated.
5427 (i386_low_insert_watchpoint): Renamed to
5428 i386_dr_insert_watchpoint. All uses updated.
5429 (i386_low_remove_watchpoint): Renamed to
5430 i386_dr_remove_watchpoint. All uses updated.
5431 (i386_low_region_ok_for_watchpoint): Renamed to
5432 i386_dr_region_ok_for_watchpoint. All uses updated.
5433 (i386_low_stopped_data_address): Renamed to
5434 i386_dr_stopped_data_address. All uses updated.
5435 (i386_low_stopped_by_watchpoint): Renamed to
5436 i386_dr_stopped_by_watchpoint. All uses updated.
5437
131aa0d4
GB
54382014-06-18 Gary Benson <gbenson@redhat.com>
5439
5440 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5441 (i386_dr_low_can_set_control): Likewise.
5442 (i386_insert_aligned_watchpoint): New check.
5443
d9305f7f
GB
54442014-06-18 Gary Benson <gbenson@redhat.com>
5445
5446 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5447 Renamed to state.
5448
e927c9fc
GB
54492014-06-18 Gary Benson <gbenson@redhat.com>
5450
5451 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5452 instead of fatal and error.
5453 (i386_handle_nonaligned_watchpoint): Likewise.
5454
1b6d4134
GB
54552014-06-18 Gary Benson <gbenson@redhat.com>
5456
5457 * i386-low.c (i386_get_debug_register_length): New macro.
5458 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5459 (i386_show_dr): Use debug_printf instead of fprintf. Use
5460 phex to format values.
5461
6e62758f
GB
54622014-06-18 Gary Benson <gbenson@redhat.com>
5463
5464 * i386-low.h: Comment changes.
5465 * i386-low.c: Likewise.
5466
fc6e2f03
GB
54672014-06-18 Gary Benson <gbenson@redhat.com>
5468
5469 * i386-low.c: Whitespace changes.
5470
f9d1eeed
TT
54712014-06-12 Tom Tromey <tromey@redhat.com>
5472
5473 * utils.c (freeargv): Remove.
5474
0b04e523
TT
54752014-06-12 Tom Tromey <tromey@redhat.com>
5476
5477 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5478 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5479 (parse_debug_format_options): Likewise.
5480 (gdbserver_usage): Likewise.
5481 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5482 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5483 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5484 against libiberty.
5485 ($(LIBGNU)): Depend on libiberty.
5486 (all-lib): Recurse into all subdirs.
5487 (install-only): Invoke "install" target in subdirs.
5488 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5489 targets.
5490 * configure: Rebuild.
5491 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5492 for vasprintf, vsnprintf, or gettimeofday.
5493 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5494 srv_tgtobj.
5495
270c9937
JB
54962014-06-05 Joel Brobecker <brobecker@adacore.com>
5497
5498 * development.sh: Delete.
5499 * Makefile.in (config.status): Adjust dependency on development.sh.
5500 * configure.ac: Adjust development.sh source call.
5501 * configure: Regenerate.
5502
0a261ed8
PA
55032014-06-02 Pedro Alves <palves@redhat.com>
5504
5505 * ax.c (gdb_free_agent_expr): New function.
5506 * ax.h (gdb_free_agent_expr): New declaration.
5507 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5508 list.
5509 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5510 static.
5511 (clear_breakpoint_conditions_and_commands): New function.
5512 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5513 (clear_breakpoint_conditions_and_commands): New declaration.
5514
e9dae05e
RR
55152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5516
5517 * linux-aarch64-low.c (asm/ptrace.h): Include.
5518
5876f503
JK
55192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5520
5521 Fix TLS access for -static -pthread.
5522 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5523 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5524 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5525
802e8e6d
PA
55262014-05-20 Pedro Alves <palves@redhat.com>
5527
5528 * linux-aarch64-low.c (aarch64_insert_point)
5529 (aarch64_remove_point): No longer check whether the type is
5530 supported here. Adjust to new interface.
5531 (the_low_target): Install aarch64_supports_z_point_type as
5532 supports_z_point_type method.
5533 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5534 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5535 instead of a Z packet char. Adjust.
5536 (arm_supports_z_point_type): New function.
5537 (arm_insert_point, arm_remove_point): Adjust to new interface.
5538 (the_low_target): Install arm_supports_z_point_type.
5539 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5540 (cris_insert_point, cris_remove_point): Adjust to new interface.
5541 Don't check whether the type is supported here.
5542 (the_low_target): Install cris_supports_z_point_type.
5543 * linux-low.c (linux_supports_z_point_type): New function.
5544 (linux_insert_point, linux_remove_point): Adjust to new interface.
5545 * linux-low.h (struct linux_target_ops) <insert_point,
5546 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5547 raw_breakpoint pointer parameter.
5548 <supports_z_point_type>: New method.
5549 * linux-mips-low.c (mips_supports_z_point_type): New function.
5550 (mips_insert_point, mips_remove_point): Adjust to new interface.
5551 Use mips_supports_z_point_type.
5552 (the_low_target): Install mips_supports_z_point_type.
5553 * linux-ppc-low.c (the_low_target): Install NULL as
5554 supports_z_point_type method.
5555 * linux-s390-low.c (the_low_target): Install NULL as
5556 supports_z_point_type method.
5557 * linux-sparc-low.c (the_low_target): Install NULL as
5558 supports_z_point_type method.
5559 * linux-x86-low.c (x86_supports_z_point_type): New function.
5560 (x86_insert_point): Adjust to new insert_point interface. Use
5561 insert_memory_breakpoint. Adjust to new
5562 i386_low_insert_watchpoint interface.
5563 (x86_remove_point): Adjust to remove_point interface. Use
5564 remove_memory_breakpoint. Adjust to new
5565 i386_low_remove_watchpoint interface.
5566 (the_low_target): Install x86_supports_z_point_type.
5567 * lynx-low.c (lynx_target_ops): Install NULL as
5568 supports_z_point_type callback.
5569 * nto-low.c (nto_supports_z_point_type): New.
5570 (nto_insert_point, nto_remove_point): Adjust to new interface.
5571 (nto_target_ops): Install nto_supports_z_point_type.
5572 * mem-break.c: Adjust intro comment.
5573 (struct raw_breakpoint) <raw_type, size>: New fields.
5574 <inserted>: Update comment.
5575 <shlib_disabled>: Delete field.
5576 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5577 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5578 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5579 (raw_bkpt_type_to_target_hw_bp_type): New function.
5580 (find_enabled_raw_code_breakpoint_at): New function.
5581 (find_raw_breakpoint_at): New type and size parameters. Use them.
5582 (insert_memory_breakpoint): New function, based off
5583 set_raw_breakpoint_at.
5584 (remove_memory_breakpoint): New function.
5585 (set_raw_breakpoint_at): Reimplement.
5586 (set_breakpoint): New, based on set_breakpoint_at.
5587 (set_breakpoint_at): Reimplement.
5588 (delete_raw_breakpoint): Go through the_target->remove_point
5589 instead of assuming memory breakpoints.
5590 (find_gdb_breakpoint_at): Delete.
5591 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5592 (find_gdb_breakpoint): New function.
5593 (set_gdb_breakpoint_at): Delete.
5594 (z_type_supported): New function.
5595 (set_gdb_breakpoint_1): New function, loosely based off
5596 set_gdb_breakpoint_at.
5597 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5598 (delete_gdb_breakpoint_at): Delete.
5599 (delete_gdb_breakpoint_1): New function, loosely based off
5600 delete_gdb_breakpoint_at.
5601 (delete_gdb_breakpoint): New function.
5602 (clear_gdb_breakpoint_conditions): Rename to ...
5603 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5604 breakpoint.
5605 (add_condition_to_breakpoint): Make static.
5606 (add_breakpoint_condition): Take a struct breakpoint pointer
5607 instead of an address. Adjust.
5608 (gdb_condition_true_at_breakpoint): Rename to ...
5609 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5610 z_type parameter.
5611 (gdb_condition_true_at_breakpoint): Reimplement.
5612 (add_breakpoint_commands): Take a struct breakpoint pointer
5613 instead of an address. Adjust.
5614 (gdb_no_commands_at_breakpoint): Rename to ...
5615 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5616 parameter. Return true if no breakpoint was found. Change debug
5617 output.
5618 (gdb_no_commands_at_breakpoint): Reimplement.
5619 (run_breakpoint_commands): Rename to ...
5620 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5621 and change return type to boolean.
5622 (run_breakpoint_commands): New function.
5623 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5624 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5625 breakpoint. Go through the_target->remove_point instead of
5626 assuming memory breakpoint.
5627 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5628 software and hardware breakpoints.
5629 (reinsert_raw_breakpoint): Go through the_target->insert_point
5630 instead of assuming memory breakpoint.
5631 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5632 software and hardware breakpoints.
5633 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5634 Check both software and hardware breakpoints.
5635 (validate_inserted_breakpoint): Assert the breakpoint is a
5636 software breakpoint. Set the inserted flag to -1 instead of
5637 setting shlib_disabled.
5638 (delete_disabled_breakpoints): Adjust.
5639 (validate_breakpoints): Only validate software breakpoints.
5640 Adjust to inserted flag change.
5641 (check_mem_read, check_mem_write): Skip breakpoint types other
5642 than software breakpoints. Adjust to inserted flag change.
5643 * mem-break.h (enum raw_bkpt_type): New enum.
5644 (raw_breakpoint, struct process_info): Forward declare.
5645 (Z_packet_to_target_hw_bp_type): Delete declaration.
5646 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5647 (set_gdb_breakpoint, delete_gdb_breakpoint)
5648 (clear_breakpoint_conditions): New declarations.
5649 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5650 (breakpoint_inserted_here): Update comment.
5651 (add_breakpoint_condition, add_breakpoint_commands): Replace
5652 address parameter with a breakpoint pointer parameter.
5653 (gdb_breakpoint_here): Update comment.
5654 (delete_gdb_breakpoint_at): Delete.
5655 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5656 * server.c (process_point_options): Take a struct breakpoint
5657 pointer instead of an address. Adjust.
5658 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5659 delete_gdb_breakpoint.
5660 * spu-low.c (spu_target_ops): Install NULL as
5661 supports_z_point_type method.
5662 * target.h: Include mem-break.h.
5663 (struct target_ops) <prepare_to_access_memory>: Update comment.
5664 <supports_z_point_type>: New field.
5665 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5666 instead of a char. Also take a raw breakpoint pointer.
5667 * win32-arm-low.c (the_low_target): Install NULL as
5668 supports_z_point_type.
5669 * win32-i386-low.c (i386_supports_z_point_type): New function.
5670 (i386_insert_point, i386_remove_point): Adjust to new interface.
5671 (the_low_target): Install i386_supports_z_point_type.
5672 * win32-low.c (win32_supports_z_point_type): New function.
5673 (win32_insert_point, win32_remove_point): Adjust to new interface.
5674 (win32_target_ops): Install win32_supports_z_point_type.
5675 * win32-low.h (struct win32_target_ops):
5676 <supports_z_point_type>: New method.
5677 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5678 instead of a char. Also take a raw breakpoint pointer.
5679
932539e3
PA
56802014-05-20 Pedro Alves <palves@redhat.com>
5681
5682 * mem-break.h: Include break-common.h.
5683 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5684 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5685 (Z_packet_to_target_hw_bp_type): New declaration.
5686 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5687 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5688 (Z_PACKET_ACCESS_WP): Delete macros.
5689 (Z_packet_to_hw_type): Delete function.
5690 * i386-low.h: Don't include break-common.h here.
5691 (Z_packet_to_hw_type): Delete declaration.
5692 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5693 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5694 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5695 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5696 * linux-aarch64-low.c: Don't include break-common.h here.
5697 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5698 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5699 (Z_packet_to_target_hw_bp_type): Delete function.
5700 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5701 function.
5702 (mips_insert_point, mips_remove_point): Use
5703 Z_packet_to_target_hw_bp_type.
5704
4ff0d3d8
PA
57052014-05-20 Pedro Alves <palves@redhat.com>
5706
5707 * linux-aarch64-low.c: Include break-common.h.
5708 (enum target_point_type): Delete.
5709 (Z_packet_to_point_type): Rename to ...
5710 (Z_packet_to_target_hw_bp_type): ... this, and return a
5711 target_hw_bp_type instead.
5712 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5713 instead of an enum target_point_type.
5714 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5715 breakpoint type.
5716 (aarch64_dr_state_insert_one_point)
5717 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5718 (aarch64_handle_aligned_watchpoint)
5719 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5720 Take an enum target_hw_bp_type instead of an enum
5721 target_point_type.
5722 (aarch64_supports_z_point_type): New function.
5723 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5724 use Z_packet_to_target_hw_bp_type.
5725
786dc519
JB
57262014-05-20 Joel Brobecker <brobecker@adacore.com>
5727
5728 * configure.ac: Only use -Werror by default when DEVELOPMENT
5729 is true.
5730 * configure: Regenerate.
5731
9e0aa64f
JK
57322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5733
5734 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5735 * linux-x86-low.c (X86_64_USER_REGS): New.
5736 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5737
2b577b92
YQ
57382014-04-28 Yao Qi <yao@codesourcery.com>
5739
5740 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5741 name.
5742
94611da2
PA
57432014-04-25 Pedro Alves <palves@redhat.com>
5744
5745 PR server/16255
5746 * linux-low.c (linux_attach_fail_reason_string): New function.
5747 (linux_attach_lwp): Delete.
5748 (linux_attach_lwp_1): Rename to ...
5749 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5750 argument. Remove "initial" parameter. Return int instead of
5751 void. Don't error or warn here.
5752 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5753 failure to attach to the tgid. Call warning when failing to
5754 attach to an lwp.
5755 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5756 argument. Remove "initial" parameter. Return int instead of
5757 void. Don't error or warn here.
5758 (linux_attach_fail_reason_string): New declaration.
5759 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5760 interface change. Use linux_attach_fail_reason_string.
5761
01f9f808
MS
57622014-04-24 Michael Sturm <michael.sturm@mintel.com>
5763 Walfred Tedeschi <walfred.tedeschi@intel.com>
5764
5765 * Makefile.in: Added rules to handle new files
5766 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5767 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5768 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5769 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5770 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5771 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5772 x32-avx512-linux.o.
5773 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5774 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5775 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5776 i386/x32-avx512.xml.
5777 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5778 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5779 i386/x32-avx512-linux.xml.
5780 * i387-fp.c (num_avx512_k_registers): New constant for number
5781 of K registers.
5782 (num_avx512_zmmh_low_registers): New constant for number of
5783 lower ZMM registers (0-15).
5784 (num_avx512_zmmh_high_registers): New constant for number of
5785 higher ZMM registers (16-31).
5786 (num_avx512_ymmh_registers): New contant for number of higher
5787 YMM registers (ymm16-31 added by avx521 on x86_64).
5788 (num_avx512_xmm_registers): New constant for number of higher
5789 XMM registers (xmm16-31 added by AVX512 on x86_64).
5790 (struct i387_xsave): Add space for AVX512 registers.
5791 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5792 Add code to handle AVX512 registers.
5793 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5794 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5795 prototypei from generated file.
5796 (tdesc_amd64_avx512_linux): Likewise.
5797 (init_registers_x32_avx512_linux): Likewise.
5798 (tdesc_x32_avx512_linux): Likewise.
5799 (init_registers_i386_avx512_linux): Likewise.
5800 (tdesc_i386_avx512_linux): Likewise.
5801 (x86_64_regmap): Add AVX512 registers.
5802 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5803 mask.
5804 (initialize_low_arch): Add code to initialize AVX512 registers.
5805
51aa91f9
PA
58062014-04-23 Pedro Alves <palves@redhat.com>
5807
5808 * mem-break.c (find_gdb_breakpoint_at): Make static.
5809 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5810
a4165e94
PA
58112014-04-23 Pedro Alves <palves@redhat.com>
5812
5813 * i386-low.c: Don't include break-common.h here.
5814 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5815 prototype to take target_hw_bp_type as argument instead of a Z
5816 packet char.
5817 * i386-low.h: Include break-common.h here.
5818 (Z_packet_to_hw_type): Declare.
5819 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5820 prototypes.
5821 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5822 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5823 (x86_remove_point): Convert the packet number to a
5824 target_hw_bp_type before calling i386_low_remove_watchpoint.
5825 * win32-i386-low.c (i386_insert_point): Convert the packet number
5826 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5827 (i386_remove_point): Convert the packet number to a
5828 target_hw_bp_type before calling i386_low_remove_watchpoint.
5829
b8acf843
PA
58302014-04-23 Pedro Alves <palves@redhat.com>
5831
5832 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5833
d708bcd1
PA
58342014-04-10 Pedro Alves <palves@redhat.com>
5835
5836 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5837 Check if the condition or command is NULL before checking if the
5838 breakpoint is known. On success, return true.
5839 * mem-break.h (add_breakpoint_condition): Document return.
5840 (add_breakpoint_commands): Add describing comment.
5841 * server.c (skip_to_semicolon): New function.
5842 (process_point_options): Use it.
5843
2eec7d5b
PA
58442014-04-09 Pedro Alves <palves@redhat.com>
5845
5846 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5847 to lwpid_of.
5848
fa96cb38
PA
58492014-02-27 Pedro Alves <palves@redhat.com>
5850
5851 PR 12702
5852 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5853 macros.
5854 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5855 output.
5856 (last_thread_of_process_p): Take a PID argument instead of a
5857 thread pointer.
5858 (linux_wait_for_lwp): Delete.
5859 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5860 functions.
5861 (linux_low_filter_event): New function, party factored out from
5862 linux_wait_for_event.
5863 (linux_wait_for_event): Rename to ...
5864 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5865 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5866 sigsuspend. Check for zombie leaders.
5867 (linux_wait_for_event): Reimplement as wrapper around
5868 linux_wait_for_event_filtered.
5869 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5870 a normal or signal exit is seen, it's the whole process exiting.
5871 (wait_for_sigstop): No longer a for_each_inferior callback.
5872 Rewrite on top of linux_wait_for_event_filtered.
5873 (stop_all_lwps): Call wait_for_sigstop directly.
5874 * server.c (resume, handle_target_event): Handle
5875 TARGET_WAITKIND_NO_RESUMED.
5876
d763de10
JB
58772014-02-26 Joel Brobecker <brobecker@adacore.com>
5878
5879 * win32-low.c (psapi_get_dll_name,
5880 * win32_CreateToolhelp32Snapshot): Delete.
5881 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5882 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5883 Delete.
5884 (handle_load_dll): Add function description.
5885 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5886
850a0f76
JB
58872014-02-26 Joel Brobecker <brobecker@adacore.com>
5888
5889 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5890 Add comment.
5891 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5892 base address when calling win32_add_one_solib.
5893 (handle_load_dll): Delete local variable load_addr.
5894 Remove 0x1000 offset applied to DLL base address when calling
5895 win32_add_one_solib.
5896 (handle_unload_dll): Add comment.
5897
f25b3fc3
JB
58982014-02-26 Joel Brobecker <brobecker@adacore.com>
5899
5900 * win32-low.c (win32_add_all_dlls): Renames
5901 win32_ensure_ntdll_loaded. Rewrite function documentation.
5902 Adjust implementation to always load all DLLs.
5903 Add 0x1000 offset to DLL base address when calling
5904 win32_add_one_solib.
5905 (child_initialization_done): New static global.
5906 (do_initial_child_stuff): Set child_initialization_done to
5907 zero during child initialization, and 1 after. Replace call
5908 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5909 Add comment.
5910 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5911 (handle_unload_dll): Add function documentation.
5912 (get_child_debug_event): Ignore load and unload DLL events
5913 during child initialization.
5914
d86d4aaf
DE
59152014-02-20 Doug Evans <dje@google.com>
5916
3bc32da3 5917 Remove global all_lwps.
d86d4aaf
DE
5918 * inferiors.h (ptid_of): Move here from linux-low.h.
5919 (pid_of, lwpid_of): Ditto.
5920 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5921 parameter is a struct thread_info * now.
5922 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5923 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5924 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5925 directly.
5926 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5927 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5928 * linux-arm-low.c (update_registers_callback): Update, "entry"
5929 parameter is a struct thread_info * now.
5930 Fetch lwpid from current_inferior directly.
5931 (arm_insert_point): Pass &all_threads to find_inferior instead of
5932 &all_lwps.
5933 (arm_remove_point): Ditto.
5934 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5935 (arm_prepare_to_resume): Fetch pid from thread.
5936 (arm_read_description): Fetch lwpid from current_inferior directly.
5937 * linux-low.c (all_lwps): Delete.
5938 (delete_lwp): Delete call to remove_inferior.
5939 (handle_extended_wait): Fetch lwpid from thread.
5940 (add_lwp): Don't set lwp->entry.id. Remove call to
5941 add_inferior_to_list.
5942 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5943 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5944 (kill_one_lwp_callback): Ditto.
5945 (linux_kill): Don't dereference NULL pointer.
5946 Fetch ptid,lwpid from thread.
5947 (get_detach_signal): Fetch ptid from thread.
5948 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5949 Simplify call to regcache_invalidate_thread.
5950 (delete_lwp_callback): Update, "entry" parameter is a
5951 struct thread_info * now. Fetch pid from thread.
5952 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5953 (status_pending_p_callback): Update, "entry" parameter is a
5954 struct thread_info * now. Fetch ptid from thread.
5955 (find_lwp_pid): Update, "entry" parameter is a
5956 struct thread_info * now.
5957 (linux_wait_for_lwp): Fetch pid from thread.
5958 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5959 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5960 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5961 (dequeue_one_deferred_signal): Ditto.
5962 (cancel_breakpoint): Fetch ptid from current_inferior.
5963 (linux_wait_for_event): Pass &all_threads to find_inferior,
5964 not &all_lwps. Fetch ptid, lwpid from thread.
5965 (count_events_callback): Update, "entry" parameter is a
5966 struct thread_info * now.
5967 (select_singlestep_lwp_callback): Ditto.
5968 (select_event_lwp_callback): Ditto.
5969 (cancel_breakpoints_callback): Ditto.
5970 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5971 not &all_lwps.
5972 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5973 (unsuspend_one_lwp): Update, "entry" parameter is a
5974 struct thread_info * now.
5975 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5976 not &all_lwps.
5977 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5978 Fetch lwpid from thread, not lwp.
5979 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5980 Pass &all_threads to find_inferior, not &all_lwps.
5981 (send_sigstop): Fetch lwpid from thread, not lwp.
5982 (send_sigstop_callback): Update, "entry" parameter is a
5983 struct thread_info * now.
5984 (suspend_and_send_sigstop_callback): Ditto.
5985 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5986 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5987 struct thread_info * now.
5988 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5989 from thread, lwp.
5990 (lwp_running): Update, "entry" parameter is a
5991 struct thread_info * now.
5992 (stop_all_lwps): Fetch ptid from thread.
5993 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5994 (linux_resume_one_lwp): Fetch lwpid from thread.
5995 (linux_set_resume_request): Update, "entry" parameter is a
5996 struct thread_info * now. Fetch pid, lwpid from thread.
5997 (resume_status_pending_p): Update, "entry" parameter is a
5998 struct thread_info * now.
5999 (need_step_over_p): Ditto. Fetch lwpid from thread.
6000 (start_step_over): Fetch lwpid from thread.
6001 (linux_resume_one_thread): Update, "entry" parameter is a
6002 struct thread_info * now. Fetch lwpid from thread.
6003 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6004 (proceed_one_lwp): Update, "entry" parameter is a
6005 struct thread_info * now. Fetch lwpid from thread.
6006 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6007 struct thread_info * now.
6008 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6009 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6010 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6011 directly.
6012 (regsets_store_inferior_registers): Ditto.
6013 (fetch_register, store_register): Ditto.
6014 (linux_read_memory, linux_write_memory): Ditto.
6015 (linux_request_interrupt): Ditto.
6016 (linux_read_auxv): Ditto.
6017 (linux_xfer_siginfo): Ditto.
6018 (linux_qxfer_spu): Ditto.
6019 (linux_qxfer_libraries_svr4): Ditto.
6020 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6021 moved to inferiors.h.
6022 (get_lwp): Delete.
6023 (get_thread_lwp): Update.
6024 (struct lwp_info): Delete member "entry". Simplify comment for
6025 member "thread".
6026 (all_lwps): Delete.
6027 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6028 current_inferior directly.
6029 (update_watch_registers_callback): Update, "entry" parameter is a
6030 struct thread_info * now. Fetch pid from thread.
6031 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6032 (mips_insert_point): Fetch lwpid from current_inferior.
6033 Pass &all_threads to find_inferior, not &all_lwps.
6034 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6035 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6036 directly.
6037 (mips_stopped_data_address): Ditto.
6038 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6039 directly.
6040 * linux-tile-low.c (tile_arch_setup): Ditto.
6041 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6042 (update_debug_registers_callback): Update, "entry" parameter is a
6043 struct thread_info * now. Fetch pid from thread.
6044 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6045 Pass &all_threads to find_inferior, not &all_lwps.
6046 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6047 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6048 Pass &all_threads to find_inferior, not &all_lwps.
6049 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6050 (i386_dr_low_get_status): Ditto.
6051 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6052 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6053 (x86_linux_read_description): Ditto.
6054 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6055
3b8361aa
DE
60562014-02-20 Doug Evans <dje@google.com>
6057
6058 * inferiors.c (get_first_inferior): Fix buglet.
6059
f7667f0d
DE
60602014-02-19 Doug Evans <dje@google.com>
6061
6062 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6063 * inferiors.c (add_thread): Change result type to struct thread_info *.
6064 All callers updated.
6065 (add_lwp): Call add_thread here instead of in callers.
6066 All callers updated.
6067 * linux-low.h (get_lwp_thread): Rewrite.
6068 (struct lwp_info): New member "thread".
6069
b3312d80
DE
60702014-02-19 Doug Evans <dje@google.com>
6071
6072 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6073 All callers updated.
6074
ecc6f45c
DE
60752014-02-19 Doug Evans <dje@google.com>
6076
6077 * inferiors.c (add_thread): Fix whitespace.
6078
649ebbca
DE
60792014-02-19 Doug Evans <dje@google.com>
6080
6081 * dll.c (clear_dlls): Replace accessing list implemention details
6082 with API function.
6083 * gdbthread.h (get_first_thread): Declare.
6084 * inferiors.c (for_each_inferior_with_data): New function.
6085 (get_first_thread): New function.
6086 (find_thread_ptid): Simplify.
6087 (get_first_inferior): New function.
6088 (clear_list): Delete.
6089 (one_inferior_p): New function.
6090 (clear_inferior_list): New function.
6091 (clear_inferiors): Update.
6092 * inferiors.h (for_each_inferior_with_data): Declare.
6093 (clear_inferior_list): Declare.
6094 (one_inferior_p): Declare.
6095 (get_first_inferior): Declare.
6096 * linux-low.c (linux_wait_for_event): Replace accessing list
6097 implemention details with API function.
6098 * server.c (target_running): Ditto.
6099 (accumulate_file_name_length): New function.
6100 (emit_dll_description): New function.
6101 (handle_qxfer_libraries): Replace accessing list implemention
6102 details with API function.
6103 (handle_qxfer_threads_worker): New function.
6104 (handle_qxfer_threads_proper): Replace accessing list implemention
6105 details with API function.
6106 (handle_query): Ditto.
6107 (visit_actioned_threads_callback_ftype): New typedef.
6108 (visit_actioned_threads_data): New struct.
6109 (visit_actioned_threads): Rewrite to be find_inferior callback.
6110 (resume): Call find_inferior.
6111 (handle_status): Replace accessing list implemention
6112 details with API function.
6113 (process_serial_event): Replace accessing list implemention details
6114 with API function.
6115 * target.c (set_desired_inferior): Replace accessing list implemention
6116 details with API function.
6117 * tracepoint.c (same_process_p): New function.
6118 (gdb_agent_about_to_close): Replace accessing list implemention
6119 details with API function.
6120 * win32-low.c (child_delete_thread): Replace accessing list
6121 implemention details with API function.
6122 (match_dll_by_basename): New function.
6123 (dll_is_loaded_by_basename): New function.
6124 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6125 details call to dll_is_loaded_by_basename.
6126
80894984
DE
61272014-02-19 Doug Evans <dje@google.com>
6128
6129 * dll.h (struct dll_info): Add comment.
6130 * gdbthread.h (struct thread_info): Add comment.
6131 (current_ptid): Simplify.
6132 * inferiors.c (add_process): Update.
6133 (remove_process): Update.
6134 * inferiors.h (struct process_info): Rename member "head" to "entry".
6135 * linux-low.c (delete_lwp): Update.
6136 (add_lwp): Update.
6137 (last_thread_of_process_p): Update.
6138 (kill_one_lwp_callback, linux_kill): Update.
6139 (status_pending_p_callback): Update.
6140 (wait_for_sigstop): Update. Simplify read of ptid.
6141 (start_step_over): Update.
6142 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6143 (get_lwp_thread): Update.
6144 (struct lwp_info): Rename member "head" to "entry".
6145 * regcache.h (inferior_list_entry): Delete.
6146 * server.c (kill_inferior_callback): Update.
6147 (detach_or_kill_inferior_callback): Update.
6148 (print_started_pid): Update.
6149 (print_attached_pid): Update.
6150 (process_serial_event): Simplify read of ptid.
6151 * thread-db.c (thread_db_create_event): Update.
6152 (thread_db_get_tls_address): Update.
6153 * win32-low.c (current_inferior_ptid): Simplify.
6154
46917d26
TT
61552014-02-19 Tom Tromey <tromey@redhat.com>
6156
6157 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6158 argument.
6159 (target_supports_btrace): Update.
6160
0759a81e
YQ
61612014-02-14 Yao Qi <yao@codesourcery.com>
6162
6163 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6164 (rsp-low-ipa.o): New target.
6165
a7191e8b
TT
61662014-02-12 Tom Tromey <tromey@redhat.com>
6167
6168 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6169 convert_ascii_to_int.
6170 * regcache.c (registers_to_string): Likewise.
6171 * remote-utils.c (decode_M_packet): Likewise.
6172 * server.c (process_serial_event): Likewise.
6173
ff0e980e
TT
61742014-02-12 Tom Tromey <tromey@redhat.com>
6175
6176 * server.c (handle_query, handle_v_run): Use hex2bin, not
6177 unhexify.
6178 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6179
e9371aff
TT
61802014-02-12 Tom Tromey <tromey@redhat.com>
6181
6182 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6183 convert_int_to_ascii.
6184 * regcache.c (registers_to_string, collect_register_as_string):
6185 Likewise.
6186 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6187 Likewise.
6188 * server.c (process_serial_event): Likewise.
6189 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6190 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6191
971dc0b8
TT
61922014-02-12 Tom Tromey <tromey@redhat.com>
6193
6194 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6195 bin2hex, not hexify.
6196 * tracepoint.c (cmd_qtstatus): Likewise.
6197
0a822afb
TT
61982014-02-12 Tom Tromey <tromey@redhat.com>
6199
6200 * remote-utils.c (monitor_output): Pass explicit length to
6201 hexify.
6202
9c3d6531
TT
62032014-02-12 Tom Tromey <tromey@redhat.com>
6204
6205 * tracepoint.c: Include rsp-low.h.
6206 * server.c: Include rsp-low.h.
6207 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6208 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6209 declare.
6210 * remote-utils.c: Include rsp-low.h.
6211 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6212 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6213 (convert_int_to_ascii, convert_ascii_to_int): Move to
6214 common/rsp-low.c.
6215 * regcache.c: Include rsp-low.h.
6216 * ax.c: Include rsp-low.h.
6217 * Makefile.in (SFILES): Add common/rsp-low.c.
6218 (OBS): Add rsp-low.o.
6219 (rsp-low.o): New target.
6220
01fd3ea5
TT
62212014-02-12 Tom Tromey <tromey@redhat.com>
6222
6223 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6224 Include print-utils.h.
6225 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6226 (plongest, thirty_two, phex_nz): Remove.
6227 * Makefile.in (SFILES): Add common/print-utils.c.
6228 (OBS): Add print-utils.o.
6229 (print-utils-ipa.o): New target.
6230 (print-utils.o): New target.
6231 (IPA_OBJS): Add print-utils-ipa.o.
6232
e99dc820
TT
62332014-02-06 Tom Tromey <tromey@redhat.com>
6234
6235 * Makefile.in (SFILES): Fix indentation.
6236
ee1e2d4f
DE
62372014-02-05 Doug Evans <dje@google.com>
6238
6239 * linux-low.c (linux_wait_for_event): Improve comment.
6240 (linux_wait_1): Keep current_inferior in sync with event_child.
6241
f5a02773
DE
62422014-01-22 Doug Evans <dje@google.com>
6243
6244 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6245
87ce2a04
DE
62462014-01-22 Doug Evans <dje@google.com>
6247
6248 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6249 * configure: Regenerate.
6250 * config.in: Regenerate.
6251 * Makefile.in (SFILES): Add debug.c.
6252 (OBS): Add debug.o.
6253 * debug.c: New file.
6254 * debug.h: New file.
6255 * linux-aarch64-low.c (*): Update all debugging printfs to use
6256 debug_printf instead of fprintf.
6257 * linux-arm-low.c (*): Ditto.
6258 * linux-cris-low.c (*): Ditto.
6259 * linux-crisv32-low.c (*): Ditto.
6260 * linux-m32r-low.c (*): Ditto.
6261 * linux-sparc-low.c (*): Ditto.
6262 * linux-x86.c (*): Ditto.
6263 * linux-low.c (*): Ditto.
6264 (linux_wait_1): Add calls to debug_enter, debug_exit.
6265 (linux_wait): Remove redundant debugging printf.
6266 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6267 (linux_resume, unstop_all_lwps): Ditto.
6268 * mem-break.c (*): Update all debugging printfs to use
6269 debug_printf instead of fprintf.
6270 * remote-utils.c (*): Ditto.
6271 * thread-db.c (*): Ditto.
6272 * server.c #include <ctype.h>, "gdb_vecs.h".
6273 (debug_threads): Moved to debug.c.
6274 (*): Update all debugging printfs to use debug_printf instead of
6275 fprintf.
6276 (start_inferior): Replace call to fflush with call to debug_flush.
6277 (monitor_show_help): Mention set debug-format.
6278 (parse_debug_format_options): New function.
6279 (handle_monitor_command): Handle "monitor set debug-format".
6280 (gdbserver_usage): Mention --debug-format.
6281 (main): Parse --debug-format.
6282 * server.h (debug_threads): Declaration moved to debug.h.
6283 #include "debug.h".
6284 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6285 trace_debug_1 that uses debug_printf.
6286 (tracepoint_look_up_symbols): Update all debugging printfs to use
6287 debug_printf instead of fprintf.
6288
e671835b
BS
62892014-01-20 Baruch Siach <baruch@tkos.co.il>
6290
6291 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6292 sys/ptrace.h.
6293
b5737fa9
PA
62942014-01-17 Pedro Alves <palves@redhat.com>
6295
ea38d2a9 6296 PR build/16445
c7faa97a
PA
6297 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6298 defined after including gdb_proc_service.h.
b5737fa9 6299
40ed484e
DE
63002014-01-16 Doug Evans <dje@google.com>
6301
6302 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6303 (match_dll): Use it.
6304
969c39fb
MM
63052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6306
6307 * target.h (target_ops) <read_btrace>: Change parameters and
6308 return type to allow error reporting.
6309 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6310 trace reading errors on.
6311 * linux-low.c (linux_low_read_btrace): Pass trace reading
6312 errors on.
6313 (linux_low_disable_btrace): New.
6314
ab7f45ba
DE
63152014-01-15 Doug Evans <dje@google.com>
6316
6317 * inferiors.c (thread_id_to_gdb_id): Delete.
6318 * inferiors.h (thread_id_to_gdb_id): Delete.
6319
66af0f44
EZ
63202014-01-13 Eli Zaretskii <eliz@gnu.org>
6321
6322 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6323 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6324 versions.
6325
9939e131
PA
63262014-01-08 Pedro Alves <palves@redhat.com>
6327
6328 * server.c (handle_status): Don't discard previous queued stop
6329 replies or thread's pending status here.
6330 (main) <disconnection>: Do it here instead.
6331
b7ea362b
PA
63322014-01-08 Pedro Alves <palves@redhat.com>
6333
6334 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6335 * server.c (visit_actioned_threads, handle_pending_status): New
6336 function.
6337 (handle_v_cont): Factor out parts to ...
6338 (resume): ... this new function. If in all-stop, and a thread
6339 being resumed has a pending status, report it without actually
6340 resuming.
6341 (myresume): Adjust to use the new 'resume' function.
6342 (clear_pending_status_callback, set_pending_status_callback)
6343 (find_status_pending_thread_callback): New functions.
6344 (handle_status): Handle the case of multiple threads having
6345 interesting statuses to report. Report threads' real last signal
6346 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6347 with an interesting thread to report the status for, instead of
6348 always reporting the status of the first thread.
6349
28498c42
JB
63502014-01-01 Joel Brobecker <brobecker@adacore.com>
6351
6352 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6353 * gdbreplay.c (gdbreplay_version): Likewise.
6354
f45c82da
YZ
63552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6356
6357 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6358 iov.iov_len with the real length in use.
6359
379a5e2d
JB
63602013-12-13 Joel Brobecker <brobecker@adacore.com>
6361
6362 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6363 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6364 for all targets that use win32-low.c.
6365 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6366 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6367
4210d83e
PA
63682013-12-13 Pedro Alves <palves@redhat.com>
6369
6370 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6371 if equal to TARGET_WAITKIND_LOADED.
6372 * win32-low.c (cached_status): New static global.
6373 (win32_wait): Add declaration.
6374 (do_initial_child_stuff): Flush all initial pending debug events
6375 up to the initial breakpoint.
6376 (win32_wait): If CACHED_STATUS was set, return that instead
6377 of doing a real wait. Remove the code resuming the execution
6378 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6379 during the initial phase. Also remove the code changing
6380 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6381 TARGET_WAITKIND_STOPPED.
6382
e7f0d979
YQ
63832013-12-11 Yao Qi <yao@codesourcery.com>
6384
6385 * notif.c (handle_notif_ack): Return 0 if no notification
6386 matches.
6387
ebcf782c
DE
63882013-11-20 Doug Evans <dje@google.com>
6389
6390 * linux-low.c (linux_set_resume_request): Fix comment.
6391
20ad9378
DE
63922013-11-20 Doug Evans <dje@google.com>
6393
6394 * linux-low.c (resume_status_pending_p): Tweak comment.
6395
a196ebeb
WT
63962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6397
6398 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6399 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6400 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6401 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6402 (srv_amd64_regobj): Add amd64-mpx.o.
6403 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6404 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6405 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6406 * i387-fp.c (num_pl_bnd_register) Added constant.
6407 (num_pl_bnd_cfg_registers) Added constant.
6408 (struct i387_xsave) Added reserved area and MPX fields.
6409 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6410 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6411 function.
6412 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6413 (init_registers_amd64_mpx_linux): Declare new function.
6414 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6415 (x86_64_regmap): Add MPX registers.
6416 (x86_linux_read_description): Add MPX case.
6417 (initialize_low_arch): Initialize MPX targets.
6418
0080a2f6
TT
64192013-11-18 Tom Tromey <tromey@redhat.com>
6420
6421 * configure: Rebuild.
6422 * configure.ac: Don't check for stdlib.h.
6423 * gdbreplay.c: Unconditionally include stdlib.h.
6424
2978b111
TT
64252013-11-18 Tom Tromey <tromey@redhat.com>
6426
6427 * config.in: Rebuild.
6428 * configure: Rebuild.
6429 * configure.ac: Don't use AC_HEADER_DIRENT.
6430
a3d08894
TT
64312013-11-18 Tom Tromey <tromey@redhat.com>
6432
6433 * server.h: Don't check HAVE_STRING_H.
6434 * gdbreplay.c: Don't check HAVE_STRING_H.
6435 * configure: Rebuild.
6436
0a5dd17d
TT
64372013-11-18 Tom Tromey <tromey@redhat.com>
6438
6439 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6440 LIBGNU.
6441
1bd2f0ba
TT
64422013-11-08 Tom Tromey <tromey@redhat.com>
6443
6444 * configure, config.in: Rebuild.
6445 * configure.ac: Remove unused configury.
6446
3266f10b
TT
64472013-11-08 Tom Tromey <tromey@redhat.com>
6448
6449 * acinclude.m4: Include common.m4, codeset.m4.
6450 * configure, config.in: Rebuild.
6451 * configure.ac: Use GDB_AC_COMMON.
6452
6682d959
AA
64532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6454
6455 * linux-s390-low.c (HWCAP_S390_TE): New define.
6456 (s390_arch_setup): Consider the TE field in the HWCAP for
6457 determining 'have_regset_tdb'.
6458
fd0a4d76
SDJ
64592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6460
6461 PR gdb/16014
6462 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6463 call to sizeof.
6464
1a3d890b
PA
64652013-10-02 Pedro Alves <palves@redhat.com>
6466
6467 * server.c (process_serial_event): Don't output "GDBserver
6468 exiting" if GDB is connected through stdio.
6469 * target.c (mywait): Likewise, be silent if GDB is connected
6470 through stdio.
6471
97ad4581
JB
64722013-10-01 Joel Brobecker <brobecker@adacore.com>
6473
6474 * lynx-low.c (lynx_add_threads_after_attach): New function.
6475 (lynx_attach): Remove call to add_thread. Add call to
6476 lynx_add_threads_after_attach instead.
6477
5b4e221c
MF
64782013-09-28 Mike Frysinger <vapier@gentoo.org>
6479
6480 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6481 * config.in, configure: Regenerated.
6482
ee47b2f8
YQ
64832013-09-18 Yao Qi <yao@codesourcery.com>
6484
6485 PR server/15959
6486 * server.c (start_inferior): Clear 'resume_info'.
6487
d6707650 64882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6489
d6707650
JW
6490 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6491 for each register.
6492
9243dd0e 64932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6494
9243dd0e
JW
6495 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6496 linux-tile-low.o to srv_tgtobj.
6497
c623a6ef
WN
64982013-09-16 Will Newton <will.newton@linaro.org>
6499
6500 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6501 out regs.
6502
fb71d39e
PA
65032013-09-06 Pedro Alves <palves@redhat.com>
6504
6505 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6506 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6507 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6508 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6509 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6510 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6511
8e7e9910
PA
65122013-09-06 Pedro Alves <palves@redhat.com>
6513
6514 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6515 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6516
7c3a12ca
PA
65172013-09-06 Pedro Alves <palves@redhat.com>
6518
6519 * linux-amd64-ipa.c: Include tracepoint.h.
6520 * linux-i386-ipa.c: Include tracepoint.h.
6521
8eb3d7b6
RW
65222013-09-06 Ricard Wanderlof <ricardw@axis.com>
6523
6524 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6525 (ps_get_thread_area): New function.
6526
eddddb9d
RW
65272013-09-06 Ricard Wanderlof <ricardw@axis.com>
6528
6529 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6530 (initialize_low_arch): Call init_registers_crisv32 rather than
6531 init_register_crisv32.
6532
533b0600
PA
65332013-09-05 Pedro Alves <palves@redhat.com>
6534
6535 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6536 to ...
6537 * hostio.h: ... this new file.
6538 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6539 win32-low.c: Include hostio.h.
6540
0ce3d3b5
PA
65412013-09-05 Pedro Alves <palves@redhat.com>
6542
6543 * server.h (gdb_client_data, handler_func, callback_handler_func)
6544 (delete_file_handler, add_file_handler, append_callback_event)
6545 (delete_callback_event, start_event_loop, initialize_event_loop):
6546 Move to event-loop.h and include it.
6547 * event-loop.h: New file.
6548
799cdc37
PA
65492013-09-05 Pedro Alves <palves@redhat.com>
6550
6551 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6552 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6553 (loaded_dll, unloaded_dll): Move to ...
6554 * dll.h: ... this new file.
6555 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6556
6a6bbd9d
PA
65572013-09-05 Pedro Alves <palves@redhat.com>
6558
6559 * server.h (current_process, get_thread_process, all_processes)
6560 (add_inferior_to_list, for_each_inferior, current_inferior)
6561 (remove_inferior, add_process, remove_process, find_process_pid)
6562 (have_started_inferiors_p, have_attached_inferiors_p)
6563 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6564 (clear_inferiors, find_inferior, find_inferior_id)
6565 (inferior_target_data, set_inferior_target_data)
6566 (inferior_regcache_data, set_inferior_regcache_data): Move to
6567 inferiors.h, and include it.
6568 * inferiors.h: New file.
6569
f699aaba
PA
65702013-09-05 Pedro Alves <palves@redhat.com>
6571
6572 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6573 Move ...
72f4393d 6574 * ax.h: ... here.
f699aaba 6575
c144c7a0
PA
65762013-09-05 Pedro Alves <palves@redhat.com>
6577
6578 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6579 tracepoint.h.
6580 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6581 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6582 (handle_tracepoint_general_set, handle_tracepoint_query)
6583 (tracepoint_finished_step, tracepoint_was_hit)
6584 (release_while_stepping_state_list, current_traceframe)
6585 (in_readonly_region, traceframe_read_mem)
6586 (fetch_traceframe_registers, traceframe_read_sdata)
6587 (traceframe_read_info, struct fast_tpoint_collect_status)
6588 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6589 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6590 (supply_fast_tracepoint_registers)
6591 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6592 (ipa_tdesc, claim_trampoline_space)
6593 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6594 (agent_mem_read, agent_get_trace_state_variable_value)
6595 (agent_set_trace_state_variable_value, agent_tsv_read)
6596 (agent_mem_read_string, get_raw_reg_func_addr)
6597 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6598 * tracepoint.h: ... this new file.
6599
ff42e6ab
PA
66002013-09-05 Pedro Alves <palves@redhat.com>
6601
6602 * server.h (perror_with_name, error, fatal, warning, paddress)
6603 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6604 include it.
6605 * utils.h: New file.
6606
541af0f4
PA
66072013-09-05 Pedro Alves <palves@redhat.com>
6608
6609 * server.h (remote_debug, noack_mode, transport_is_reliable)
6610 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6611 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6612 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6613 (write_enn, initialize_async_io, enable_async_io)
6614 (disable_async_io, check_remote_input_interrupt_request)
6615 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6616 (dead_thread_notify, prepare_resume_reply)
6617 (decode_address_to_semicolon, decode_address, decode_m_packet)
6618 (decode_M_packet, decode_X_packet, decode_xfer_write)
6619 (decode_search_memory_packet, unhexify, hexify)
6620 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6621 (look_up_one_symbol, relocate_instruction)
6622 (monitor_output): Move to remote-utils.h, and include it.
6623 * remote-utils.h: New file.
6624
eebdf26b
PA
66252013-09-05 Pedro Alves <palves@redhat.com>
6626
6627 * server.h (_): Delete.
6628
3aafd2ff
PA
66292013-09-02 Pedro Alves <palves@redhat.com>
6630
6631 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6632 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6633 allocated.
6634 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6635
cee83bcb
PM
66362013-09-02 Pierre Muller <muller@sourceware.org>
6637
6638 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6639 or WriteProcessMemory complete successfully and handle
6640 ERROR_PARTIAL_COPY error.
6641
9a13b2fa
PA
66422013-09-02 Pedro Alves <palves@redhat.com>
6643
6644 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6645 error instead of EIO.
6646
602e3198
JK
66472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6648
6649 PR server/15604
6650 * linux-low.c: Include filestuff.h.
6651 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6652 * lynx-low.c: Include filestuff.h.
6653 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6654 * server.c: Include filestuff.h.
6655 (main): Call notice_open_fds.
6656 * spu-low.c: Include filestuff.h.
6657 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6658
96d7229d
LM
66592013-08-22 Luis Machado <lgustavo@codesourcery.com>
6660
6661 * Makefile.in: Explain why ../target and ../nat are not
6662 listed as include file search paths.
6663 (linux-waitpid.o): New object file rule.
6664 * configure.srv (srv_native_linux_obj): New variable.
6665 Replace all occurrences of linux native object files with
6666 $srv_native_linux_obj.
6667 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6668 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6669 (linux_enable_event_reporting): Remove declaration.
6670 (my_waitpid): Moved to common/linux-waitpid.c.
6671 (linux_wait_for_event): Pass ptid when calling
6672 linux_enable_event_reporting.
6673 (linux_supports_tracefork_flag): Remove.
6674 (linux_enable_event_reporting): Likewise.
6675 (linux_tracefork_grandchild): Remove.
6676 (STACK_SIZE): Moved to common/linux-ptrace.c.
6677 (linux_tracefork_child): Remove.
6678 (linux_test_for_tracefork): Remove.
6679 (linux_look_up_symbols): Call linux_supports_traceclone.
6680 (initialize_low): Remove call to linux_test_for_tracefork.
6681 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6682 common/linux-ptrace.h.
6683 (PTRACE_TYPE_ARG4): Likewise.
6684 Include linux-ptrace.h.
6685
32940073
PA
66862013-08-21 Pedro Alves <palves@redhat.com>
6687
6688 * config.in: Renegerate.
6689
33b60d58 66902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6691
33b60d58
LM
6692 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6693 (SFILES): Remove $(srcdir)/common/target-common.c and
6694 add $(srcdir)/target/waitstatus.c.
6695 (OBS): Remove target-common.o and add waitstatus.o.
6696 (server_h): Remove $(srcdir)/../common/target-common.h and
6697 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6698 and $(srcdir)/../target/waitstatus.h.
6699 (target-common.o): Remove.
6700 (waitstatus.o): New target object file.
6701 * target.h: Do not include target-common.h and
6702 include target/resume.h, target/wait.h and
6703 target/waitstatus.h.
6704
b8e1b30e
LM
67052013-08-13 Luis Machado <lgustavo@codesourcery.com>
6706
6707 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6708 to PTRACE_TYPE_ARG3.
6709 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6710 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6711 PTRACE_TYPE_ARG4.
6712 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6713 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6714
7a60ad40
YQ
67152013-07-27 Jie Zhang <jie@codesourcery.com>
6716 Daniel Jacobowitz <dan@codesourcery.com>
6717 Yao Qi <yao@codesourcery.com>
6718
6719 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6720 (mips-linux-watch.o): New rule.
6721 (mips_linux_watch_h): New variable.
6722 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6723 srv_tgtobj.
6724 * linux-mips-low.c: Include mips-linux-watch.h.
6725 (struct arch_process_info, struct arch_lwp_info): New.
6726 (update_watch_registers_callback): New function.
6727 (mips_linux_new_process, mips_linux_new_thread) New functions.
6728 (mips_linux_prepare_to_resume, mips_insert_point): New
6729 functions.
6730 (mips_remove_point, mips_stopped_by_watchpoint): New
6731 functions.
6732 (rsp_bp_type_to_target_hw_bp_type): New function.
6733 (mips_stopped_data_address): New function.
6734 (the_low_target): Add watchpoint support functions.
6735
de6f69ad
YQ
67362013-07-27 Yao Qi <yao@codesourcery.com>
6737
6738 * i386-low.c: Include break-common.h.
6739 (enum target_hw_bp_type): Remove.
6740
3360c0bf
LM
67412013-07-24 Luis Machado <lgustavo@codesourcery.com>
6742
6743 * Makefile.in (SFILES): /common/target-common.c.
6744 (OBS): Add target-common.o.
6745 (server_h): Add $(srcdir)/../common/target-common.h.
6746 (target-common.o): New target.
6747 * server.c (queue_stop_reply_callback): Free
6748 status string after use.
6749 * target.c (target_waitstatus_to_string): Remove.
6750 * target.h: Include target-common.h.
6751 (resume_kind): Likewise.
6752 (target_waitkind): Likewise.
6753 (target_waitstatus): Likewise.
6754 (TARGET_WNOHANG): Likewise.
6755
bd885420
YQ
67562013-07-04 Yao Qi <yao@codesourcery.com>
6757
6758 * Makefile.in (host_alias): Use @host_noncanonical@.
6759 (target_alias): Use @target_noncanonical@.
6760 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6761 ACX_NONCANONICAL_HOST.
6762 * configure: Regenerated.
6763
6764 Revert:
6765 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6766
6767 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6768 * configure: Rebuild.
6769 * Makefile.in (version_host, version_target): Get from configure.
6770 (version.c): Use $(version_host) and $(version_target).
6771
17ef446e
PA
67722013-07-03 Pedro Alves <palves@redhat.com>
6773
6774 * Makefile.in (config.status): Depend on development.sh.
6775 * acinclude.m4: Include libmcheck.m4.
6776 * configure: Regenerate.
6777
7a9a7487
MG
67782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6779
6780 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6781 attribute inside the parentheses.
6782 (winapi_DebugSetProcessKillOnExit): Ditto.
6783 (winapi_DebugBreakProcess): Ditto.
6784 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6785
49b64de6
MG
67862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6787
6788 * notif.h (notif_event): Add a dummy member to avoid compiler
6789 errors.
6790
d5749ee7
PA
67912013-07-01 Pedro Alves <palves@redhat.com>
6792
6793 * hostio.c (HOSTIO_PATH_MAX): Define.
6794 (require_filename, handle_open, handle_unlink, handle_readlink):
6795 Use it.
6796
d8d2a3ee
PA
67972013-07-01 Pedro Alves <palves@redhat.com>
6798
6799 * server.h: Include "pathmax.h".
6800 * linux-low.c: Don't include sys/param.h.
6801 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6802 MAXPATHLEN.
6803 * win32-low.c: Don't include sys/param.h.
6804 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6805
bc7dea8d
PA
68062013-07-01 Pedro Alves <palves@redhat.com>
6807
6808 * event-loop.c: Don't check HAVE_UNISTD_H before including
6809 <unistd.h>.
6810 * gdbreplay.c: Likewise.
6811 * remote-utils.c: Likewise.
6812 * server.c: Likewise.
6813 * configure.ac: Don't check for unistd.h.
6814 * configure: Regenerate.
6815
d6c2da54
TT
68162013-06-28 Tom Tromey <tromey@redhat.com>
6817
6818 * Makefile.in (version.c): Use version.in, not
6819 common/version.in.
6820
257b6bec
MG
68212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6822
6823 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6824 * configure: Rebuild.
6825 * Makefile.in (version_host, version_target): Get from configure.
6826 (version.c): Use $(version_host) and $(version_target).
6827
86ebe149
DK
68282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6829
6830 Fix trace-status to output user name without trailing colon.
6831 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6832
f30aa5af
DK
68332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6834
6835 Fix trace-status to output proper start-time and stop-time.
6836 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6837 output start time and stop time in hex as gdb expects.
6838
28a93511
YQ
68392013-06-26 Pedro Alves <pedro@codesourcery.com>
6840
6841 * tracepoint.c (build_traceframe_info_xml): Output trace state
6842 variables present in the trace buffer.
6843
01208463
TT
68442013-06-24 Tom Tromey <tromey@redhat.com>
6845
6846 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6847 create-version.sh.
6848 (version.o): Remove.
6849 * gdbreplay.c: Include version.h.
6850 (version, host_name): Don't declare.
6851 * server.h: Include version.h.
6852 (version, host_name): Don't declare.
6853
760256f9
PA
68542013-06-12 Pedro Alves <palves@redhat.com>
6855
6856 * linux-x86-low.c (linux_is_elf64): Delete global.
6857 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6858 with local linux_pid_exe_is_elf_64_file use.
6859
030031ee
PA
68602013-06-11 Pedro Alves <palves@redhat.com>
6861
6862 * linux-low.c (regset_disabled, disable_regset): New functions.
6863 (regsets_fetch_inferior_registers)
6864 (regsets_store_inferior_registers): Use them.
6865 (initialize_regsets_info); Don't allocate the disabled_regsets
6866 array here.
6867 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6868 comment.
6869
5da6eb0a
PA
68702013-06-11 Pedro Alves <palves@redhat.com>
6871
6872 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6873 xmalloc.
6874
7e5aaa09
PA
68752013-06-11 Pedro Alves <palves@redhat.com>
6876
6877 * linux-x86-low.c (initialize_low_arch): Call
6878 init_registers_x32_avx_linux.
6879
d878444c
JK
68802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6881
6882 Fix compatibility with Android Bionic.
6883 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6884 it is not empty.
6885
3aee8918
PA
68862013-06-07 Pedro Alves <palves@redhat.com>
6887
5f2b57b5 6888 PR server/14823
3aee8918
PA
6889 * Makefile.in (OBS): Add tdesc.o.
6890 (IPA_OBJS): Add tdesc-ipa.o.
6891 (tdesc-ipa.o): New rule.
6892 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6893 interface.
6894 * linux-low.c (new_inferior): Delete.
6895 (disabled_regsets, num_regsets): Delete.
6896 (linux_add_process): Adjust to set the new per-process
6897 new_inferior flag.
6898 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6899 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6900 was a stop. When calling arch_setup, switch the current inferior
6901 to the thread that got an event.
6902 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6903 (regsets_fetch_inferior_registers)
6904 (regsets_store_inferior_registers): New regsets_info parameter.
6905 Adjust to use it.
6906 (linux_register_in_regsets): New regs_info parameter. Adjust to
6907 use it.
6908 (register_addr, fetch_register, store_register): New usrregs_info
6909 parameter. Adjust to use it.
6910 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6911 parameter regs_info. Adjust to use it.
6912 (linux_fetch_registers): Get the current inferior's regs_info, and
6913 adjust to use it.
6914 (linux_store_registers): Ditto.
6915 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6916 (initialize_low): Don't initialize the target_regsets here. Call
6917 initialize_low_arch.
6918 * linux-low.h (target_regsets): Delete declaration.
6919 (struct regsets_info): New.
6920 (struct usrregs_info): New.
6921 (struct regs_info): New.
6922 (struct process_info_private) <new_inferior>: New field.
6923 (struct linux_target_ops): Delete the num_regs, regmap, and
6924 regset_bitmap fields. New field regs_info.
6925 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6926 * i387-fp.c (num_xmm_registers): Delete.
6927 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6928 calls to new interface.
6929 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6930 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6931 Infer the number of xmm registers from the regcache's target
6932 description.
6933 * i387-fp.h (num_xmm_registers): Delete.
6934 * inferiors.c (add_thread): Don't install the thread's regcache
6935 here.
6936 * proc-service.c (gregset_info): Fetch the current inferior's
6937 regs_info. Adjust to use it.
6938 * regcache.c: Include tdesc.h.
6939 (register_bytes, reg_defs, num_registers)
6940 (gdbserver_expedite_regs): Delete.
6941 (get_thread_regcache): If the thread doesn't have a regcache yet,
6942 create one, instead of aborting gdbserver.
6943 (regcache_invalidate_one): Rename to ...
6944 (regcache_invalidate_thread): ... this.
6945 (regcache_invalidate_one): New.
6946 (regcache_invalidate): Only invalidate registers of the current
6947 process.
6948 (init_register_cache): Add target_desc parameter, and use it.
6949 (new_register_cache): Ditto. Assert the target description has a
6950 non zero registers_size.
6951 (regcache_cpy): Add assertions. Adjust.
6952 (realloc_register_cache, set_register_cache): Delete.
6953 (registers_to_string, registers_from_string): Adjust.
6954 (find_register_by_name, find_regno, find_register_by_number)
6955 (register_cache_size): Add target_desc parameter, and use it.
6956 (free_register_cache_thread, free_register_cache_thread_one)
6957 (regcache_release, register_cache_size): New.
6958 (register_size): Add target_desc parameter, and use it.
6959 (register_data, supply_register, supply_register_zeroed)
6960 (supply_regblock, supply_register_by_name, collect_register)
6961 (collect_register_as_string, collect_register_by_name): Adjust.
6962 * regcache.h (struct target_desc): Forward declare.
6963 (struct regcache) <tdesc>: New field.
6964 (init_register_cache, new_register_cache): Add target_desc
6965 parameter.
6966 (regcache_invalidate_thread): Declare.
6967 (regcache_invalidate_one): Delete declaration.
6968 (regcache_release): Declare.
6969 (find_register_by_number, register_cache_size, register_size)
6970 (find_regno): Add target_desc parameter.
6971 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6972 declarations.
6973 * remote-utils.c: Include tdesc.h.
6974 (outreg, prepare_resume_reply): Adjust.
6975 * server.c: Include tdesc.h.
6976 (gdbserver_xmltarget): Delete declaration.
6977 (get_features_xml, process_serial_event): Adjust.
6978 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6979 declare.
6980 (struct process_info) <tdesc>: New field.
6981 (ipa_tdesc): Declare.
6982 * tdesc.c: New file.
6983 * tdesc.h: New file.
6984 * tracepoint.c: Include tdesc.h.
6985 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6986 (get_context_regcache): Adjust to pass ipa_tdesc down.
6987 (do_action_at_tracepoint): Adjust to get the register cache size
6988 from the context regcache's description.
6989 (traceframe_walk_blocks): Adjust to get the register cache size
6990 from the current trace frame's description.
6991 (traceframe_get_pc): Adjust to get current trace frame's
6992 description and pass it down.
6993 (gdb_collect): Adjust to get the register cache size from the
6994 IPA's description.
6995 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6996 (gdbserver_xmltarget): Delete.
6997 (initialize_low_tracepoint): Set the ipa's target description.
6998 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6999 (initialize_low_tracepoint): Set the ipa's target description.
7000 * linux-x86-low.c: Include tdesc.h.
7001 [__x86_64__] (is_64bit_tdesc): New.
7002 (ps_get_thread_area, x86_get_thread_area): Use it.
7003 (i386_cannot_store_register): Rename to ...
7004 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7005 (i386_cannot_fetch_register): Rename to ...
7006 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7007 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7008 to new interface.
7009 (target_regsets): Rename to ...
7010 (x86_regsets): ... this.
7011 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7012 interface.
7013 (x86_siginfo_fixup): Use is_64bit_tdesc.
7014 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7015 (tdesc_x32_avx_linux, tdesc_x32_linux)
7016 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7017 Declare.
7018 (x86_linux_update_xmltarget): Delete.
7019 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7020 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7021 (AMD64_LINUX_USER64_CS): New.
7022 (x86_linux_read_description): New, based on
7023 x86_linux_update_xmltarget.
7024 (same_process_callback): New.
7025 (x86_arch_setup_process_callback): New.
7026 (x86_linux_update_xmltarget): New.
7027 (x86_regsets_info): New.
7028 (amd64_linux_regs_info): New.
7029 (i386_linux_usrregs_info): New.
7030 (i386_linux_regs_info): New.
7031 (x86_linux_regs_info): New.
7032 (x86_arch_setup): Reimplement.
7033 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7034 (x86_emit_ops): Ditto.
7035 (the_low_target): Adjust. Install x86_linux_regs_info,
7036 x86_cannot_fetch_register, and x86_cannot_store_register.
7037 (initialize_low_arch): New.
7038 * linux-ia64-low.c (tdesc_ia64): Declare.
7039 (ia64_fetch_register): Adjust.
7040 (ia64_usrregs_info, regs_info): New globals.
7041 (ia64_regs_info): New function.
7042 (the_low_target): Adjust.
7043 (initialize_low_arch): New function.
7044 * linux-sparc-low.c (tdesc_sparc64): Declare.
7045 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7046 Adjust.
7047 (sparc_arch_setup): New function.
7048 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7049 (the_low_target): Adjust.
7050 (initialize_low_arch): New function.
7051 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7052 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7053 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7054 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7055 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7056 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7057 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7058 (tdesc_powerpc_isa205_vsx64l): Declare.
7059 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7060 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7061 (ppc_set_pc, ppc_get_hwcap): Adjust.
7062 (ppc_usrregs_info): Forward declare.
7063 (!__powerpc64__) ppc_regmap_adjusted: New global.
7064 (ppc_arch_setup): Adjust to the current process'es target
7065 description.
7066 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7067 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7068 (ppc_store_evrregset): Adjust.
7069 (target_regsets): Rename to ...
7070 (ppc_regsets): ... this, and make static.
7071 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7072 (ppc_regs_info): New function.
7073 (the_low_target): Adjust.
7074 (initialize_low_arch): New function.
7075 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7076 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7077 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7078 (tdesc_s390x_linux64v2): Declare.
7079 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7080 (s390_fill_gregset, s390_store_last_break): Adjust.
7081 (target_regsets): Rename to ...
7082 (s390_regsets): ... this, and make static.
7083 (s390_get_pc, s390_set_pc): Adjust.
7084 (s390_get_hwcap): New target_desc parameter, and use it.
7085 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7086 (s390_arch_setup): Adjust to set the current process'es target
7087 description. Don't adjust the regmap.
7088 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7089 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7090 (regs_info_3264): New globals.
7091 (s390_regs_info): New function.
7092 (the_low_target): Adjust.
7093 (initialize_low_arch): New function.
7094 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7095 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7096 [__mips64] (init_registers_mips_linux)
7097 (init_registers_mips_dsp_linux): Delete defines.
7098 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7099 (have_dsp): New global.
7100 (mips_read_description): New, based on mips_arch_setup.
7101 (mips_arch_setup): Reimplement.
7102 (get_usrregs_info): New function.
7103 (mips_cannot_fetch_register, mips_cannot_store_register)
7104 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7105 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7106 (target_regsets): Rename to ...
7107 (mips_regsets): ... this, and make static.
7108 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7109 (dsp_regs_info, regs_info): New globals.
7110 (mips_regs_info): New function.
7111 (the_low_target): Adjust.
7112 (initialize_low_arch): New function.
7113 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7114 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7115 Declare.
7116 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7117 (arm_read_description): New, with bits factored from
7118 arm_arch_setup.
7119 (arm_arch_setup): Reimplement.
7120 (target_regsets): Rename to ...
7121 (arm_regsets): ... this, and make static.
7122 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7123 (arm_regs_info): New function.
7124 (the_low_target): Adjust.
7125 (initialize_low_arch): New function.
7126 * linux-m68k-low.c (tdesc_m68k): Declare.
7127 (target_regsets): Rename to ...
7128 (m68k_regsets): ... this, and make static.
7129 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7130 (m68k_regs_info): New function.
7131 (m68k_arch_setup): New function.
7132 (the_low_target): Adjust.
7133 (initialize_low_arch): New function.
7134 * linux-sh-low.c (tdesc_sharch): Declare.
7135 (target_regsets): Rename to ...
7136 (sh_regsets): ... this, and make static.
7137 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7138 (sh_regs_info, sh_arch_setup): New functions.
7139 (the_low_target): Adjust.
7140 (initialize_low_arch): New function.
7141 * linux-bfin-low.c (tdesc_bfin): Declare.
7142 (bfin_arch_setup): New function.
7143 (bfin_usrregs_info, regs_info): New globals.
7144 (bfin_regs_info): New function.
7145 (the_low_target): Adjust.
7146 (initialize_low_arch): New function.
7147 * linux-cris-low.c (tdesc_cris): Declare.
7148 (cris_arch_setup): New function.
7149 (cris_usrregs_info, regs_info): New globals.
7150 (cris_regs_info): New function.
7151 (the_low_target): Adjust.
7152 (initialize_low_arch): New function.
7153 * linux-cris-low.c (tdesc_crisv32): Declare.
7154 (cris_arch_setup): New function.
7155 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7156 (cris_regs_info): New function.
7157 (the_low_target): Adjust.
7158 (initialize_low_arch): New function.
7159 * linux-m32r-low.c (tdesc_m32r): Declare.
7160 (m32r_arch_setup): New function.
7161 (m32r_usrregs_info, regs_info): New globals.
7162 (m32r_regs_info): Adjust.
7163 (initialize_low_arch): New function.
7164 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7165 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7166 (tic6x_usrregs_info): Forward declare.
7167 (tic6x_read_description): New function, based on ...
7168 (tic6x_arch_setup): ... this. Reimplement.
7169 (target_regsets): Rename to ...
7170 (tic6x_regsets): ... this, and make static.
7171 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7172 (tic6x_regs_info): New function.
7173 (the_low_target): Adjust.
7174 (initialize_low_arch): New function.
7175 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7176 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7177 (target_regsets): Rename to ...
7178 (xtensa_regsets): ... this, and make static.
7179 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7180 globals.
7181 (xtensa_arch_setup, xtensa_regs_info): New functions.
7182 (the_low_target): Adjust.
7183 (initialize_low_arch): New function.
7184 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7185 (nios2_arch_setup): Set the current process'es tdesc.
7186 (target_regsets): Rename to ...
7187 (nios2_regsets): ... this.
7188 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7189 (nios2_regs_info): New function.
7190 (the_low_target): Adjust.
7191 (initialize_low_arch): New function.
a261b8f5
PA
7192 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7193 (aarch64_arch_setup): Set the current process'es tdesc.
7194 (target_regsets): Rename to ...
7195 (aarch64_regsets): ... this.
7196 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7197 (aarch64_regs_info): New function.
7198 (the_low_target): Adjust.
7199 (initialize_low_arch): New function.
3aee8918
PA
7200 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7201 globals.
7202 (target_regsets): Rename to ...
7203 (tile_regsets): ... this.
7204 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7205 (tile_regs_info): New function.
7206 (tile_arch_setup): Set the current process'es tdesc.
7207 (the_low_target): Adjust.
7208 (initialize_low_arch): New function.
7209 * spu-low.c (tdesc_spu): Declare.
7210 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7211 * win32-arm-low.c (tdesc_arm): Declare.
7212 (arm_arch_setup): New function.
7213 (the_low_target): Install arm_arch_setup instead of
7214 init_registers_arm.
7215 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7216 (init_windows_x86): Rename to ...
7217 (i386_arch_setup): ... this. Set `win32_tdesc'.
7218 (the_low_target): Adjust.
7219 * win32-low.c (win32_tdesc): New global.
7220 (child_add_thread): Don't create the thread cache here.
7221 (do_initial_child_stuff): Set the new process'es tdesc.
7222 * win32-low.h (struct target_desc): Forward declare.
7223 (win32_tdesc): Declare.
7224 * lynx-i386-low.c (tdesc_i386): Declare global.
7225 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7226 * lynx-low.c (lynx_tdesc): New global.
7227 (lynx_add_process): Set the new process'es tdesc.
7228 * lynx-low.h (struct target_desc): Forward declare.
7229 (lynx_tdesc): Declare global.
7230 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7231 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7232 * nto-low.c (nto_tdesc): New global.
7233 (do_attach): Set the new process'es tdesc.
7234 * nto-low.h (struct target_desc): Forward declare.
7235 (nto_tdesc): Declare.
7236 * nto-x86-low.c (tdesc_i386): Declare.
7237 (nto_x86_arch_setup): Set `nto_tdesc'.
7238
b1fbec62
GB
72392013-06-04 Gary Benson <gbenson@redhat.com>
7240
7241 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7242 to qSupported response when appropriate.
7243 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7244 with nonzero-length annex.
7245 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7246 arguments supplied in annex.
7247
d1ec4ce7
DE
72482013-05-31 Doug Evans <dje@google.com>
7249
ac44adcb 7250 PR server/15594
d1ec4ce7
DE
7251 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7252 64 bits in 64-cross-32 environment.
7253
9b25f2d3
PA
72542013-05-28 Pedro Alves <palves@redhat.com>
7255
7256 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7257 (aarch64-without-fpu.c): Delete rule.
7258 * configure.srv (aarch64*-*-linux*): Remove references to
7259 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7260 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7261 declaration.
7262
6740dc9c
PA
72632013-05-24 Pedro Alves <palves@redhat.com>
7264
7265 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7266 instead of strchr/decode_address. Error if the range isn't split
7267 with a ','. Don't assume there's be a ':' in the action.
7268
c2d6af84
PA
72692013-05-23 Yao Qi <yao@codesourcery.com>
7270 Pedro Alves <palves@redhat.com>
7271
7272 * linux-low.c (lwp_in_step_range): New function.
7273 (linux_wait_1): If the thread was range stepping and stopped
7274 outside the stepping range, report the stop to GDB. Otherwise,
7275 continue stepping. Add range stepping debug output.
7276 (linux_set_resume_request): Copy the step range from the resume
7277 request to the lwp.
7278 (linux_supports_range_stepping): New.
7279 (linux_target_ops) <supports_range_stepping>: Set to
7280 linux_supports_range_stepping.
7281 * linux-low.h (struct linux_target_ops)
7282 <supports_range_stepping>: New field.
7283 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7284 * linux-x86-low.c (x86_supports_range_stepping): New.
7285 (the_low_target) <supports_range_stepping>: Set to
7286 x86_supports_range_stepping.
7287 * server.c (handle_v_cont): Handle 'r' action.
7288 (handle_v_requests): Append ";r" if the target supports range
7289 stepping.
7290 * target.h (struct thread_resume) <step_range_start,
7291 step_range_end>: New fields.
7292 (struct target_ops) <supports_range_stepping>:
7293 New field.
7294 (target_supports_range_stepping): New macro.
7295
58794e1a
JB
72962013-05-17 Joel Brobecker <brobecker@adacore.com>
7297
7298 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7299 confusion in comment.
7300
d631c5a7
JB
73012013-05-17 Joel Brobecker <brobecker@adacore.com>
7302
7303 * lynx-low.c (struct process_info_private): New type.
7304 (lynx_add_process): New function.
7305 (lynx_create_inferior, lynx_attach): Replace calls to
7306 add_process by calls to lynx_add_process.
7307 (lynx_resume): If PTID is null, then try using
7308 current_process()->private->last_wait_event_ptid.
7309 Add comments.
7310 (lynx_clear_inferiors): Delete. The contents of that function
7311 has been inlined in lynx_mourn;
7312 (lynx_wait_1): Save the ptid in the process's private data.
7313 (lynx_mourn): Free the process' private data. Replace call
7314 to lynx_clear_inferiors by call to clear_inferiors.
7315
96f7a20f
YQ
73162013-05-17 Yao Qi <yao@codesourcery.com>
7317
7318 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7319 the right place.
7320
db0dfaa0
LM
73212013-05-16 Luis Machado <lgustavo@codesourcery.com>
7322
7323 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7324 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7325 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7326 PT_TEXT_END_ADDR guards. Update comments.
7327 (linux_target_op) <read_offsets>: Conditionally define to
7328 linux_read_offsets if the target is UCLIBC and if it defines
7329 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7330
68f5f838
SL
73312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7332 Andrew Jenner <andrew@codesourcery.com>
7333
7334 * Makefile.in (SFILES): Add linux-nios2-low.c.
7335 (clean): Add action to delete nios2-linux.c.
7336 (nios2-linux.c): New rule.
7337 * configure.srv: Add nios2*-*-linux*.
7338 * linux-nios2-low.c: New.
7339
1ebff1fd
HAQ
73402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7341
7342 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7343
f6150862
HZ
73442013-04-25 Hui Zhu <hui@codesourcery.com>
7345
7346 PR gdb/15186
f6150862
HZ
7347 * ax.c (ax_printf): Add fflush.
7348
614c279d
TT
73492013-04-22 Tom Tromey <tromey@redhat.com>
7350
7351 * Makefile.in (SFILES): Add filestuff.c.
7352 (OBS): Add filestuff.o.
7353 (filestuff.o): New target.
7354 * config.in, configure: Rebuild.
7355 * configure.ac: Check for fdwalk, pipe2.
7356
7d4e5717
PA
73572013-04-17 Pedro Alves <palves@redhat.com>
7358
7359 * configure.ac (USE_THREAD_DB): Delete variable.
7360 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7361 Don't AC_SUBST USE_THREAD_DB.
7362 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7363 * config.in, configure: Regenerate.
7364
d5c93e41
PA
73652013-04-16 Pedro Alves <palves@redhat.com>
7366
7367 * linux-low.h (struct lwp_info) <thread_known>: Move under
7368 the USE_THREAD_DB #ifdef.
7369
04f5fe89
PA
73702013-04-16 Pedro Alves <palves@redhat.com>
7371
7372 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7373 (linux-low.o): Delete rule.
7374 * linux-low.h: Always include "gdb_thread_db.h" instead of
7375 conditionally including thread_db.h.
7376 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7377 HAVE_THREAD_DB_H.
7378
480b27bf
JK
73792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7380
7381 * Makefile.in (install-only): Fix make install regression.
7382
43662968
JK
73832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7384
7385 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7386 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7387 installation.
7388 * gdbserver.1: Remove.
7389
3e74e146
PA
73902013-03-22 Pedro Alves <palves@redhat.com>
7391
7392 * linux-low.c (handle_extended_wait): Don't call
7393 linux_enable_event_reporting.
7394
a8347a2a
TT
73952013-03-15 Tony Theodore <tonyt@logyst.com>
7396
7397 PR build/9098:
7398 * Makefile.in (SHELL): Use @SHELL@.
7399
eeb56fa7
SDJ
74002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7401
7402 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7403 compiler warning.
7404
4fa7e2ff
JB
74052013-03-13 Joel Brobecker <brobecker@adacore.com>
7406
7407 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7408 Remove extraneous NULL element.
7409
8ddb1965
YQ
74102013-03-13 Yao Qi <yao@codesourcery.com>
7411
7412 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7413 'V' block in trace frame.
7414
9accd112
MM
74152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7416
7417 * target.h (struct target_ops): Add btrace ops.
7418 (target_supports_btrace): New macro.
7419 (target_enable_btrace): New macro.
7420 (target_disable_btrace): New macro.
7421 (target_read_btrace): New macro.
7422 * gdbthread.h (struct thread_info): Add btrace field.
7423 * server.c: Include btrace-common.h.
7424 (handle_btrace_general_set): New function.
7425 (handle_btrace_enable): New function.
7426 (handle_btrace_disable): New function.
7427 (handle_general_set): Call handle_btrace_general_set.
7428 (handle_qxfer_btrace): New function.
7429 (struct qxfer qxfer_packets[]): Add btrace entry.
7430 * inferiors.c (remove_thread): Disable btrace.
7431 * linux-low: Include linux-btrace.h.
7432 (linux_low_enable_btrace): New function.
7433 (linux_low_read_btrace): New function.
7434 (linux_target_ops): Add btrace ops.
7435 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7436 Add srv_linux_btrace=yes.
7437 (x86_64-*-linux*): Add linux-btrace.o.
7438 Add srv_linux_btrace=yes.
7439 * configure.ac: Define HAVE_LINUX_BTRACE.
7440 * config.in: Regenerated.
7441 * configure: Regenerated.
7442
5cc22e4c
MM
74432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7444
7445 * server.c (handle_qxfer): Preserve error message if -3 is
7446 returned.
7447 (qxfer): Document the -3 return value.
7448
7c97f91e
MM
74492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7450
7451 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7452 (linux_btrace_h): New variable.
7453 (linux-btrace.o): New rule.
7454
be9a119c 74552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7456 Hafiz Abid Qadeer <abidh@codesourcery.com>
7457
7458 * tracepoint.c (trace_buffer_size): New global.
7459 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7460 (init_trace_buffer): Change to one-argument function. Allocate
7461 trace buffer memory.
7462 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7463 handle QTBuffer:size packet.
7464 (cmd_bigqtbuffer_size): New function.
7465 (initialize_tracepoint): Call init_trace_buffer with
7466 DEFAULT_TRACE_BUFFER_SIZE.
7467 * server.c (handle_query): Add QTBuffer:size in the
7468 supported packets.
7469
e64f7499
YQ
74702013-03-07 Yao Qi <yao@codesourcery.com>
7471
7472 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7473 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7474 of -1.
7475 (cmd_qtsp): Adjust condition. Do post increment.
7476 Set cur_action and cur_step_action back to 0.
7477
f0ae6fc3
PA
74782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7479
7480 PR server/15236
7481 * linux-low.c (linux_write_memory): Return early success if LEN is
7482 zero.
7483
b5b0b0af
CV
74842013-03-05 Corinna Vinschen <vinschen@redhat.de>
7485
334ad4a8 7486 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7487
589bc927
TT
74882013-02-28 Tom Tromey <tromey@redhat.com>
7489
7490 * configure.ac: Invoke AC_SYS_LARGEFILE.
7491 * configure, config.in: Rebuild.
7492
dfe07582
CV
74932013-02-28 Corinna Vinschen <vinschen@redhat.com>
7494
7495 * win32-low.c: Throughout, fix format strings and casts of
7496 printf-like functions to avoid type related warnings on all
7497 platforms.
7498 (get_child_debug_event): Print dwDebugEventCode as hex since
7499 that's how it's usually documented.
7500
736cd585
YQ
75012013-02-28 Yao Qi <yao@codesourcery.com>
7502
7503 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7504 pulongest.
7505
e1f58301
JW
75062013-02-27 Jiong Wang <jiwang@tilera.com>
7507
7508 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7509 (reg-tilegx32.c): New rule.
7510 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7511 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7512 different register info initializer according to elf class.
7513 (init_registers_tilgx32): New function. The tilegx32 register info
7514 initializer.
7515 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7516 (tile_store_gregset): Likewise.
7517
d171ca78
YQ
75182013-02-27 Yao Qi <yao@codesourcery.com>
7519
7520 * server.c (process_point_options): Print debug message when
7521 debug_threads is true.
7522
282bbdf3
YQ
75232013-02-26 Yao Qi <yao@codesourcery.com>
7524
7525 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7526
aca22551
PA
75272013-02-19 Pedro Alves <palves@redhat.com>
7528 Kai Tietz <ktietz@redhat.com>
7529
7530 PR gdb/15161
7531
7532 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7533 instead of strtoul to extract address from packet.
7534 (process_serial_event) <'z'>: Likewise.
7535
4f3cee1c
YQ
75362013-02-18 Yao Qi <yao@codesourcery.com>
7537
7538 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7539
8e1d55a3
PA
75402013-02-14 Pedro Alves <palves@redhat.com>
7541
7542 Plug memory leak.
7543
7544 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7545 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7546
458820da
PA
75472013-02-14 Pedro Alves <palves@redhat.com>
7548
7549 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7550
baea0dae
PA
75512013-02-14 Pedro Alves <palves@redhat.com>
7552
7553 * tracepoint.c (save_string): Delete.
7554 (add_tracepoint_action): Use savestring instead of save_string.
7555
0b1afbb3
PA
75562013-02-12 Pedro Alves <palves@redhat.com>
7557
7558 * linux-xtensa-low.c: Ditto.
7559 * xtensa-xtregs.c: Ditto.
7560
8a4ac37e
PA
75612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7562
7563 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7564 thread_db.
7565
148de6bb
MS
75662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7567
7568 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7569 aarch64_num_wp_regs and aarch64_num_bp_regs to
7570 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7571
55fac6e0
MS
75722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7573
7574 * linux-aarch64-low.c (ps_get_thread_area): Replace
7575 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7576
176eb98c
MS
75772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7578 Marcus Shawcroft <marcus.shawcroft@arm.com>
7579 Nigel Stephens <nigel.stephens@arm.com>
7580 Yufeng Zhang <yufeng.zhang@arm.com>
7581
7582 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7583 (aarch64.c, aarch64-without-fpu.c): New targets.
7584 * configure.srv (aarch64*-*-linux*): New.
7585 * linux-aarch64-low.c: New file.
7586
56f7af9c
MS
75872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7588
43aaf8b6 7589 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7590 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7591 (dequeue_one_deferred_signal, linux_resume_one_thread)
7592 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7593 (linux_tracefork_grandchild, linux_test_for_tracefork)
7594 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7595 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7596 where the argument is 0.
7597
60f662b0
YQ
75982013-01-25 Yao Qi <yao@codesourcery.com>
7599
7600 * event-loop.c: Include "queue.h".
7601 (gdb_event_p): New typedef.
7602 (struct gdb_event) <next_event>: Remove.
7603 (event_queue): Change to QUEUE(gdb_event_p).
7604 (async_queue_event): Remove.
7605 (gdb_event_xfree): New.
7606 (initialize_event_loop): New.
7607 (process_event): Use API from QUEUE.
7608 (wait_for_event): Likewise.
7609 * server.c (main): Call initialize_event_loop.
7610 * server.h (initialize_event_loop): Declare.
7611
5ae4861a
YQ
76122013-01-18 Yao Qi <yao@codesourcery.com>
7613
7614 * ax.h (struct eval_agent_expr_context): New.
7615 (gdb_eval_agent_expr): Update declaration.
7616 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7617 TFRAME. Add new argument CTX.
7618 * server.h (struct eval_agent_expr_context): Declare.
7619 (agent_mem_read, agent_tsv_read): Update declaration.
7620 (agent_mem_read_string): Likewise.
7621 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7622 (add_traceframe_block): Add new argument TPOINT.
7623 Increase TPOINT->traceframe_usage.
7624 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7625 eval_tracepoint_agent_expr.
7626 (condition_true_at_tracepoint): Likewise.
7627 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7628 (agent_mem_read_string, agent_tsv_read): Likewise.
7629
85e00e85
YQ
76302013-01-16 Yao Qi <yao@codesourcery.com>
7631
7632 * linux-low.c (linux_resume_one_lwp): Don't check
7633 'lwp->bp_reinsert != 0'.
7634
4039cf45
JB
76352013-01-07 Joel Brobecker <brobecker@adacore.com>
7636 Pedro Alves <palves@redhat.com>
7637
7638 * lynx-low.c (ptrace_request_to_str): Define a temporary
7639 macro and use it to simplify this function's implementation.
7640
9044dee2
JB
76412013-01-07 Joel Brobecker <brobecker@adacore.com>
7642
7643 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7644 sets errno.
7645
e6352c8f
JB
76462013-01-07 Joel Brobecker <brobecker@adacore.com>
7647
7648 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7649
50681a27
JB
76502013-01-07 Joel Brobecker <brobecker@adacore.com>
7651
7652 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7653
3f6e77ef
JB
76542013-01-07 Joel Brobecker <brobecker@adacore.com>
7655
7656 * lynx-low.c (lynx_resume): Use the resume_info parameter
7657 to determine the ptid for the lynx_ptrace call, unless
7658 it is equal to minus_one_ptid, in which case we use the
7659 ptid of the current_inferior.
7660 (lynx_wait_1): After having received a thread create/exit
7661 event, resume the inferior's execution using the signaling
7662 thread's ptid, rather than the old ptid.
7663
7fda33ae
JB
76642013-01-07 Joel Brobecker <brobecker@adacore.com>
7665
7666 * lynx-low.c (lynx_resume): Delete variable ret.
7667
b9786c74
JB
76682013-01-01 Joel Brobecker <brobecker@adacore.com>
7669
7670 * gdbreplay.c (gdbreplay_version): Update copyright year.
7671 * server.c (gdbserver_version): Likewise.
7672
8b93d60f
JB
76732012-12-17 Joel Brobecker <brobecker@adacore.com>
7674
7675 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7676 new thread.
7677
037335a7
JB
76782012-12-17 Joel Brobecker <brobecker@adacore.com>
7679
7680 * lynx-low.c (ptrace_request_to_str): Add handling for
7681 PTRACE_GETTRACESIG.
7682
52d4cbd8
JB
76832012-12-17 Joel Brobecker <brobecker@adacore.com>
7684
7685 * lynx-low.c (lynx_attach): Delete variable new_process.
7686
ab8f6ca9
JB
76872012-12-17 Joel Brobecker <brobecker@adacore.com>
7688
7689 * lynx-low.c (lynx_create_inferior): Delete variable
7690 new_process.
7691
78cbc024
JB
76922012-12-17 Joel Brobecker <brobecker@adacore.com>
7693
7694 * lynx-low.c (ptrace_request_to_str): Do not handle
7695 PTRACE_GETTHREADLIST if this macro does not exist.
7696
14a00470
YQ
76972012-12-15 Yao Qi <yao@codesourcery.com>
7698
7699 * Makefile.in (OBS): Add notif.o.
7700 * notif.c, notif.h: New.
7701 * server.c: Include "notif.h".
7702 (struct vstop_notif) <next>: Remove.
7703 <base>: New field.
7704 (queue_stop_reply): Update.
7705 (push_event, send_next_stop_reply): Remove.
7706 (discard_queued_stop_replies): Update.
7707 (notif_stop): New variable.
7708 (handle_v_stopped): Remove.
7709 (handle_v_requests): Don't call handle_v_stopped. Call
7710 handle_ack_notif instead.
7711 (queue_stop_reply_callback): Call notif_event_enque instead
7712 of queue_stop_reply.
7713 (handle_status): Don't call send_next_stop_reply, call
7714 notif_write_event instead.
7715 (kill_inferior_callback): Likewise.
7716 (detach_or_kill_inferior_callback): Likewise.
7717 (main): Call initialize_notif.
7718 (process_serial_event): Call QUEUE_is_empty.
7719 (handle_target_event): Call notif_push instead of push event.
7720 * server.h (push_event): Remove declaration.
7721
61c125b9
TT
77222012-12-10 Tom Tromey <tromey@redhat.com>
7723
7724 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7725 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7726 macros.
7727 (.c.o): Rewrite.
7728 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7729 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7730 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7731 (amd64-linux-ipa.o, ax.o): Rewrite.
7732 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7733 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7734 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7735 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7736 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7737 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7738 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7739 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7740 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7741 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7742 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7743 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7744 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7745 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7746 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7747 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7748 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7749 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7750 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7751 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7752 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7753 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7754 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7755 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7756 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7757 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7758 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7759 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7760 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7761 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7762 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7763 (reg-tilegx.o): Remove.
7764 (all_object_files): New macro.
7765 Include .deps files.
7766 * aclocal.m4, configure: Rebuild.
7767 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7768 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7769 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7770
e90e9ad9
TT
77712012-12-05 Tom Tromey <tromey@redhat.com>
7772
7773 PR gdb/14917:
7774 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7775
02d403bf 77762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7777
7778 * configure.ac: Check for linux/perf_event.h.
7779 * config.in: Regenerated.
7780 * configure: Regenerated.
7781
0270a750
PA
77822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7783
7784 * hostio.c (handle_readlink): Decrease buffer size
7785 parameter passed to readlink by one byte.
7786
8c29b58e
YQ
77872012-11-26 Yao Qi <yao@codesourcery.com>
7788
7789 * configure.ac (build_warnings): Append '-Wempty-body'.
7790 * configure: Regenerated.
7791 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7792 body.
7793
8bdce1ff
PM
77942012-11-15 Pierre Muller <muller@sourceware.org>
7795
7796 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7797 * config.in: Regenerate.
7798 * configure: Regenerate.
7799 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7800 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7801 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7802 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7803 header.
7804 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7805 instead of <sys/wait.h> header.
7806 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7807
02d403bf 78082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7809
7810 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7811 (various make rules): Remove -DGDBSERVER
7812
fbd5db48
YQ
78132012-11-09 Yao Qi <yao@codesourcery.com>
7814
7815 * spu-low.c (current_ptid): Move it to ..
7816 * gdbthread.h: ... here. New.
7817 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7818 * server.c (myresume, process_serial_event): Likewise.
7819 * thread-db.c (thread_db_find_new_threads): Likewise.
7820 * tracepoint.c (run_inferior_command): Likewise.
7821
b3dc46ff
AB
78222012-10-01 Andrew Burgess <aburgess@broadcom.com>
7823
7824 * server.c (handle_search_memory_1): Include access length in
7825 warning message.
7826
07c04788
HPN
78272012-09-05 Michael Brandt <michael.brandt@axis.com>
7828
7829 * linux-crisv32-low.c: Fix compile errors.
7830
918d227b
YQ
78312012-09-04 Yao Qi <yao@codesourcery.com>
7832
7833 * tracepoint.c (cmd_qtsv): Adjust debug message.
7834 Don't check CUR_TPOINT.
7835
18c1b81a
YQ
78362012-08-28 Yao Qi <yao@codesourcery.com>
7837
7838 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7839 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7840 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7841 Remove declarations of xmalloc, xreallloc, xstrdup and
7842 freeargv.
7843 * Makefile.in (libiberty_h): New.
7844 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7845 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7846
dc82f37b
YQ
78472012-08-23 Yao Qi <yao@codesourcery.com>
7848
7849 * server.h: Remove declaration of 'xsnprintf'.
7850
406b1477
KS
78512012-08-22 Keith Seitz <keiths@redhat.com>
7852
7853 * server.h: Include build-gnulib-gbserver/config.h.
7854 * gdbreplay.c: Likewise.
7855
e6712ff1
DE
78562012-08-08 Doug Evans <dje@google.com>
7857
7858 * Makefile.in (SFILES): Add gdb_vecs.c.
7859 (OBS): Add gdb_vecs.o.
7860 (gdb_vecs_h, host_defs_h): New variables.
7861 (thread-db.o): Add $(gdb_vecs_h) dependency.
7862 (gdb_vecs.o): New rule.
7863 * thread-db.c: #include "gdb_vecs.h".
7864 (thread_db_load_search): Use a vector to iterate over path elements.
7865 Handle text appearing after "$pdir".
7866
7867 * configure.ac: Add check for strstr.
7868 * config.in: Regenerate.
7869 * configure: Regenerate.
7870
7c3270ae
UW
78712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7872
7873 * hostio.c (handle_pread): If pread fails, fall back to attempting
7874 lseek/read.
7875 (handle_pwrite): Likewise for pwrite.
7876
b62e2b27
UW
78772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7878
7879 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7880 between unsupported TYPE and unimplementable ADDR/LEN combination.
7881 (arm_insert_point): Act on new return value.
7882
78a99e91
PA
78832012-07-31 Pedro Alves <palves@redhat.com>
7884
7885 * server.c (process_point_options): Only skip tokens if we find
7886 one that is unrecognized. Don't treat 'X' specially while
7887 skipping unrecognized tokens.
7888
fcf303ab
UW
78892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7890
7891 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7892 to 4-byte-align HW breakpoint addresses for Thumb.
7893
7255706c
YQ
78942012-07-27 Yao Qi <yao@codesourcery.com>
7895
7896 PR remote/14161.
7897
7898 * server.h: Declare gdb_agent_about_to_close.
7899 * target.c (kill_inferior): Include "agent.h".
7900 New. Send command 'kill'.
7901 * target.h (kill_inferior): Removed macro.
7902 * tracepoint.c (gdb_agent_about_to_close): New.
7903 (gdb_agent_helper_thread): Handle command 'close'.
7904 Wait endlessly until the inferior stops.
7905 Install gdb_agent_remove_socket to atexit hook.
7906 (agent_socket_name): New static variable.
7907 (gdb_agent_socket_init): Replace local variable 'name' with
7908 'agent_socket_name'.
7909 (gdb_agent_remove_socket): New.
7910
5a3f286f
YQ
79112012-07-27 Yao Qi <yao@codesourcery.com>
7912
7913 * server.c (process_point_options): Stop at 'X' when parsing.
7914
961bd387
ME
79152012-07-19 Michael Eager <eager@eagercon.com>
7916
a261b8f5 7917 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7918 to hw_execute.
7919 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7920 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7921 hardware breakpoint.
7922
aa7c7447
JK
79232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7924
7925 * gdbserver/linux-low.c (initialize_low): Call
7926 linux_ptrace_init_warnings.
7927
7f216e7c
DE
79282012-07-02 Doug Evans <dje@google.com>
7929
7930 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7931 pointer to int.
7932
d3ce09f5
SS
79332012-07-02 Stan Shebs <stan@codesourcery.com>
7934
7935 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7936 (ax.o): Add it to build rule.
7937 (ax-ipa.o): Ditto.
7938 (OBS): Add format.o.
7939 (IPA_OBS): Add format.o.
7940 * server.c (handle_query): Claim support for breakpoint commands.
7941 (process_point_options): Add command case.
7942 (process_serial_event): Leave running if there are printfs in
7943 effect.
7944 * mem-break.h (any_persistent_commands): Declare.
7945 (add_breakpoint_commands): Declare.
7946 (gdb_no_commands_at_breakpoint): Declare.
7947 (run_breakpoint_commands): Declare.
7948 * mem-break.c (struct point_command_list): New struct.
7949 (struct breakpoint): New field command_list.
7950 (any_persistent_commands): New function.
7951 (add_commands_to_breakpoint): New function.
7952 (add_breakpoint_commands): New function.
7953 (gdb_no_commands_at_breakpoint): New function.
7954 (run_breakpoint_commands): New function.
7955 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7956 locally.
7957 * ax.c: Include format.h.
7958 (ax_printf): New function.
7959 (gdb_eval_agent_expr): Add printf opcode.
7960
2f8f6aed
YQ
79612012-06-13 Yao Qi <yao@codesourcery.com>
7962
7963 * server.c (start_inferior): Remove duplicated writes to fields
7964 'last_resume_kind' and 'last_status' of 'current_inferior'.
7965
0c9070b3
YQ
79662012-06-12 Yao Qi <yao@codesourcery.com>
7967 Pedro Alves <palves@redhat.com>
7968
7969 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7970 comment.
7971 * server.c (handle_v_cont): Extend comment.
7972
c52daf70
YQ
79732012-06-11 Yao Qi <yao@codesourcery.com>
7974
7975 * linux-low.c (linux_attach): Add 'static'.
7976
d38bbb0a
YQ
79772012-06-06 Yao Qi <yao@codesourcery.com>
7978
7979 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7980
89dc0afd
JK
79812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7982
7983 Fix gcc -flto compilation warning.
7984 * server.c (main): Make variable multi_mode and attach volatile.
7985
75f62ce7
TJB
79862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7987
7988 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7989 if the platform doesn't know about it.
7990
65f479b6
PA
79912012-05-30 Jeff Kenton <jkenton@tilera.com>
7992
7993 * Makefile.in (SFILES): Add linux-tile-low.c.
7994 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7995 * configure.srv: Handle tilegx-*-linux*.
7996 * linux-tile-low.c: New file.
7997
0c5bf5a9
JK
79982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7999
8000 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8001
a493e3e2
PA
80022012-05-24 Pedro Alves <palves@redhat.com>
8003
8004 PR gdb/7205
8005
43aaf8b6 8006 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8007
2ea28649
PA
80082012-05-24 Pedro Alves <palves@redhat.com>
8009
8010 PR gdb/7205
8011
8012 Replace target_signal with gdb_signal throughout.
8013
8d409d16
MR
80142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8015
8016 * linux-low.c (linux_store_registers): Avoid the copying sequence
8017 when no data has been retrieved by ptrace.
8018
23512c01
MGD
80192012-05-22 Will Deacon <will.deacon@arm.com>
8020
8021 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8022 Include asm/ptrace.h.
8023 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8024 already defined.
8025
4934b29e
MR
80262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8027
8028 * linux-low.c (linux_store_registers): Don't re-retrieve data
8029 with ptrace that has already been obtained from /proc. Always
8030 copy any data retrieved with ptrace to the buffer supplied.
8031
bde24c0a
PA
80322012-05-11 Yao Qi <yao@codesourcery.com>
8033 Pedro Alves <palves@redhat.com>
8034
8035 * linux-low.c (enum stopping_threads_kind): New.
8036 (stopping_threads): Change type to `enum stopping_threads_kind'.
8037 (handle_extended_wait): If stopping and suspending threads, leave
8038 the new_lwp suspended too.
8039 (linux_wait_for_event): Adjust.
8040 (stop_all_lwps): Set `stopping_threads' to
8041 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8042 whether we're suspending threads or just stopping them. Assert no
8043 recursion happens.
8044
623b6bdf
YQ
80452012-04-29 Yao Qi <yao@codesourcery.com>
8046
8047 * server.h: Move some code to ...
8048 * gdbthread.h: ... here. New.
8049 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8050 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8051 (nto-low.o, win32-low.o): Likewise.
8052 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8053 * regcache.c, remote-utils.c, server.c: Likewise.
8054 * target.c, tracepoint.c, win32-low.c: Likewise.
8055
f15f9948
TJB
80562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8057
8058 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8059 (PTRACE_ARG4_TYPE): Likewise.
8060 (PTRACE_XFER_TYPE): Likewise.
8061 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8062 ptrace to PTRACE_ARG3_TYPE.
8063 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8064 (PTRACE_ARG4_TYPE): Likewise.
8065 (PTRACE_XFER_TYPE): Likewise.
8066 (linux_detach_one_lwp): Cast fourth argument of
8067 ptrace to long then PTRACE_ARG4_TYPE.
8068 (regsets_fetch_inferior_registers): Cast third argument of
8069 ptrace to long then PTRACE_ARG3_TYPE.
8070 (regsets_store_inferior_registers): Likewise.
8071
38ea300a
PA
80722012-04-20 Pedro Alves <palves@redhat.com>
8073
8074 * configure: Regenerate.
8075
c971b7fa
PA
80762012-04-19 Pedro Alves <palves@redhat.com>
8077
43aaf8b6 8078 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8079 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8080 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8081 (all, install-only, uninstall, clean-info, all-lib, clean): No
8082 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8083 (maintainer-clean realclean distclean): Use subdir_do.
8084 (subdir_do): New.
8085 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8086 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8087 * acinclude.m4: Include acx_configure_dir.m4.
8088 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8089 calls. Call AC_PROG_RANLIB. Configure gnulib using
8090 ACX_CONFIGURE_DIR.
8091 (GNULIB): New.
8092 (GNULIB_STDINT_H): Adjust.
8093 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8094 * gdbreplay.c: Include build-gnulib/config.h.
8095 * server.h: Likewise.
8096 * aclocal.m4: Regenerate.
8097 * config.in: Regenerate.
8098 * configure: Regenerate.
c971b7fa 8099
809277f8
PA
81002012-04-19 Pedro Alves <palves@redhat.com>
8101
8102 * Makefile.in (LIBGNU, INCGNU): Adjust.
8103 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8104 (all, install-only, uninstall, clean-info, all-lib, clean)
8105 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8106 * configure.ac: Adjust AC_OUTPUT output.
8107 * aclocal.m4: Regenerate.
8108 * configure: Regenerate.
8109
fd9bb8b8
PA
81102012-04-19 Pedro Alves <palves@redhat.com>
8111
8112 * Makefile.in (generated_files): New.
8113 (server_h): Remove the explicit dependency on config.h, and depend
8114 on $generated_files.
8115
1c298c66
PA
81162012-04-19 Pedro Alves <palves@redhat.com>
8117
8118 * Makefile.in (INCGNU): Add -Ignulib.
8119
57c4b50b
PA
81202012-04-19 Pedro Alves <palves@redhat.com>
8121
8122 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8123 (INCGNU): ... this, and spell out -I here.
8124 (GNULIB_LIB): Rename to ...
8125 (LIBGNU): ... this.
8126 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8127
1030e047
PA
81282012-04-19 Pedro Alves <palves@redhat.com>
8129
8130 * config.in: Regenerate.
8131
447d4319
PA
81322012-04-19 Pedro Alves <palves@redhat.com>
8133
8134 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8135 * server.h (memmem): Remove declaration.
8136 * config.in: Regenerate.
8137 * configure: Regenerate.
8138
aad9eab9
YQ
81392012-04-19 Yao Qi <yao@codesourcery.com>
8140
8141 * Makefile.in (SFILES): Add common/vec.c.
8142 (OBS): Add vec.o.
8143 (vec.o): New rule.
8144
3e10640f
YQ
81452012-04-19 Yao Qi <yao@codesourcery.com>
8146
8147 * remote-utils.c (prepare_resume_reply): Replace with macro
8148 target_core_of_thread.
8149 * server.c (handle_qxfer_threads_proper): Likewise.
8150 * target.h (traget_core_of_thread): New macro.
8151
71622373
PA
81522012-04-18 Pedro Alves <palves@redhat.com>
8153
8154 * aclocal.m4: Regenerate.
8155 * configure: Regenerate.
8156
80d26939
YQ
81572012-04-16 Yao Qi <yao@codesourcery.com>
8158
8159 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8160 duplicated on address.
8161
42476b70
YQ
81622012-04-16 Yao Qi <yao@codesourcery.com>
8163
8164 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8165 (struct tracepoint_action_ops) <send>: New field.
8166 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8167 (agent_expr_send, x_tracepoint_action_send): New.
8168 (l_tracepoint_action_send): New.
8169 (cmd_qtdp): Download and install tracepoint
8170 according to `use_agent'.
8171 (run_inferior_command): Add one more parameter `len'.
8172 Update callers.
8173 (tracepoint_send_agent): New.
8174 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8175
7bc83639
YQ
81762012-04-16 Yao Qi <yao@codesourcery.com>
8177
8178 * tracepoint.c (download_tracepoints): Moved to ...
8179 (cmd_qtstart): ... here.
8180
5f18041e
YQ
81812012-04-14 Yao Qi <yao@codesourcery.com>
8182
8183 * tracepoint.c: Include inttypes.h.
8184 (struct collect_memory_action): Use sized types.
8185 (struct tracepoint): Likewise.
8186 (cmd_qtdp, stop_tracing): Update print specifiers.
8187 (cmd_qtp, response_tracepoint): Likewise.
8188 (collect_data_at_tracepoint): Likewise.
8189 (collect_data_at_step): Likewise.
8190
55a8c076
YQ
81912012-04-14 Yao Qi <yao@codesourcery.com>
8192
8193 Import gnulib module inttypes.
8194 * aclocal.m4, config.in, configure: Regenerated.
8195
dc750257
YQ
81962012-04-14 Yao Qi <yao@codesourcery.com>
8197
8198 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8199 Makefile and config.status at last.
8200
0ab5faf9
YQ
82012012-04-13 Yao Qi <yao@codesourcery.com>
8202
8203 * tracepoint.c: Include stdint.h unconditionally.
8204
18f5fd81
TJB
82052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8206
8207 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8208 on BFD_HAVE_SYS_PROCFS_TYPE.
8209 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8210 * configure: Regenerate.
8211 * config.in: Likewise.
8212
4d47af5c
L
82132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8214
8215 * Makefile.in (clean): Also remove x32.c x32-linux.c
8216 x32-avx.c x32-avx-linux.c.
8217 (x32.o): New target.
8218 (x32.c): Likewise.
8219 (x32-linux.o): Likewise.
8220 (x32-linux.c): Likewise.
8221 (x32-avx.o): Likewise.
8222 (x32-avx.c): Likewise.
8223 (x32-avx-linux.o): Likewise.
8224 (x32-avx-linux.c): Likewise.
8225
8226 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8227 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8228 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8229 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8230 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8231 i386/x32-avx-linux.xml.
8232
8233 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8234 (init_registers_x32_avx_linux): Likwise.
8235 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8236 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8237
ecedbe58
PA
82382012-04-13 Pedro Alves <palves@redhat.com>
8239
8240 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8241 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8242 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8243 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8244 the sub-make.
8245
c92b5177
L
82462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8247
8248 * linux-x86-low.c (compat_x32_clock_t): New.
8249 (compat_x32_siginfo_t): Likewise.
8250 (compat_x32_siginfo_from_siginfo): Likewise.
8251 (siginfo_from_compat_x32_siginfo): Likewise.
8252 (linux_is_elf64): Likewise.
8253 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8254 and siginfo_from_compat_x32_siginfo for x32.
8255 (x86_arch_setup): Set linux_is_elf64.
8256
214d508e
L
82572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8258
8259 PR gdb/13969
8260 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8261 e_machine field.
8262 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8263 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8264 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8265 compatible with process.
8266
c9a1864a
YQ
82672012-04-12 Yao Qi <yao@codesourcery.com>
8268
8269 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8270 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8271 (install-only, install-info, clean): Handle sub dir gnulib.
8272 (all-lib, am--refresh): New targets.
8273 (memmem.o): Remove target.
8274 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8275 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8276 (AC_REPLACE_FUNCS): Remove memmem.
8277 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8278 (AC_OUTPUT): Generate Makefile in gnulib/.
8279 * aclocal.m4, config.in, configure: Regenerated.
8280
367ba2c2
MR
82812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8282
8283 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8284
9d236627
PA
82852012-04-05 Pedro Alves <palves@redhat.com>
8286
8287 -Werror=strict-aliasing
8288
8289 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8290 pointer.
8291
111217b3
PA
82922012-04-04 Pedro Alves <palves@redhat.com>
8293
8294 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8295 (sparc_store_gregset_from_stack, sparc_store_gregset)
8296 (sparc_breakpoint_at): Fix formatting.
8297
8365dcf5
TJB
82982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8299
8300 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8301 are available.
8302 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8303 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8304 * config.in: Regenerate.
8305 * configure: Likewise.
8306
689cc2ae
PA
83072012-03-29 Pedro Alves <palves@redhat.com>
8308
8309 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8310 Correct ptrace arguments.
8311
c14dfd32
PA
83122012-03-28 Pedro Alves <palves@redhat.com>
8313
8314 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8315 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8316 (IA64_FR1_REGNUM): New defines.
8317 (ia64_fetch_register): New.
8318 (the_low_target): Install it.
8319 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8320 field.
8321 * linux-low.c (linux_fetch_registers): Try the
8322 the_low_target.fetch_register hook first.
8323
8324 * linux-arm-low.c (the_low_target): Adjust.
8325 * linux-bfin-low.c (the_low_target): Adjust.
8326 * linux-cris-low.c (the_low_target): Adjust.
8327 * linux-crisv32-low.c (the_low_target): Adjust.
8328 * linux-m32r-low.c (the_low_target): Adjust.
8329 * linux-m68k-low.c (the_low_target): Adjust.
8330 * linux-mips-low.c (the_low_target): Adjust.
8331 * linux-ppc-low.c (the_low_target): Adjust.
8332 * linux-s390-low.c (the_low_target): Adjust.
8333 * linux-sh-low.c (the_low_target): Adjust.
8334 * linux-sparc-low.c (the_low_target): Adjust.
8335 * linux-tic6x-low.c (the_low_target): Adjust.
8336 * linux-x86-low.c (the_low_target): Adjust.
8337 * linux-xtensa-low.c (the_low_target): Adjust.
8338
63c88e13
PA
83392012-03-26 Pedro Alves <palves@redhat.com>
8340
8341 * server.c (handle_qxfer_libraries): Don't bail early if
8342 the_target->qxfer_libraries_svr4 is not NULL.
8343
fb723180
PA
83442012-03-26 Pedro Alves <palves@redhat.com>
8345
8346 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8347
0afae3cf
PA
83482012-03-23 Pedro Alves <palves@redhat.com>
8349
8350 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8351 "library-list-svr4" element's start tag when the the DSO list is
8352 empty.
8353
485f1ee4
PA
83542012-03-23 Pedro Alves <palves@redhat.com>
8355
8356 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8357 a variable whose type size is the same as the inferior's pointer
8358 size.
8359
a5362b9a
TS
83602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8361
8362 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8363 struct siginfo.
8364 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8365 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8366 * linux-low.h: Include <signal.h>.
8367 (struct siginfo): Remove forward declaration.
8368 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8369 struct siginfo.
8370
d226c142
MF
83712012-03-21 Mike Frysinger <vapier@gentoo.org>
8372
8373 * .gitignore: Ignore more files.
8374
122f36ef
PA
83752012-03-19 Pedro Alves <palves@redhat.com>
8376 Jan Kratochvil <jan.kratochvil@redhat.com>
8377
8378 * server.c (cont_thread, general_thread): Add describing comments.
8379 (start_inferior): Clear `cont_thread'.
8380 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8381 of a process.
8382
fc3e5175
YQ
83832012-03-15 Yao Qi <yao@codesourcery.com>
8384
8385 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8386 handling to ...
8387 (cmd_qtdp): ... here.
8388
8d0d92cd
YQ
83892012-03-15 Yao Qi <yao@codesourcery.com>
8390
8391 * tracepoint.c (struct tracepoint_action_ops): New.
8392 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8393 (m_tracepoint_action_download): New.
8394 (r_tracepoint_action_download): New.
8395 (x_tracepoint_action_download): New.
8396 (l_tracepoint_action_download): New.
8397 (add_tracepoint_action): Install `action->ops' according type.
8398 (download_tracepoint_1): Move code `download' function pointer
8399 of various tracepoint_action_ops.
8400
87b0bb13
JK
84012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8402
8403 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8404 linux_ptrace_attach_warnings.
8405
5f572dec
JK
84062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8407
8408 * Makefile.in (linux-ptrace.o): New.
8409 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8410 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8411 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8412 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8413 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8414 of these targets.
8415 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8416
f4647387
YQ
84172012-03-08 Yao Qi <yao@codesourcery.com>
8418 Pedro Alves <palves@redhat.com>
8419
8420 Fix PR server/13392.
8421 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8422 offset of JMP insn.
8423 * tracepoint.c (remove_tracepoint): New.
8424 (cmd_qtdp): Call remove_tracepoint when failed to install.
8425
9b224c5e
PA
84262012-03-07 Pedro Alves <palves@redhat.com>
8427
8428 * linux-low.c (get_detach_signal): New.
8429 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8430 Pass on pending signals to PTRACE_DETACH. Check the result of the
8431 ptrace call.
8432 * server.c (program_signals, program_signals_p): New.
8433 (handle_general_set): Handle QProgramSignals.
8434 * server.h (program_signals, program_signals_p): Declare.
8435
e237a7e2
JK
84362012-03-05 Pedro Alves <palves@redhat.com>
8437 Jan Kratochvil <jan.kratochvil@redhat.com>
8438
8439 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8440 New comment why.
8441
5808517f
YQ
84422012-03-03 Yao Qi <yao@codesourcery.com>
8443
8444 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8445 agent_look_up_symbols.
8446
58b4daa5
YQ
84472012-03-03 Yao Qi <yao@codesourcery.com>
8448
8449 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8450 (linux-x86-low.o): Likewise.
8451 * server.h: Remove in_process_agent_loaded.
8452 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8453 common/agent.c.
8454 Update callers.
8455
8ffcbaaf
YQ
84562012-03-03 Yao Qi <yao@codesourcery.com>
8457
8458 * tracepoint.c (gdb_agent_capability): New global.
8459 (in_process_agent_loaded_ust): Renamed to
8460 `in_process_agent_supports_ust'.
8461 Update callers.
8462 (in_process_agent_supports_ust): Call agent_capability_check.
8463 (clear_installed_tracepoints): Assert that agent supports
8464 agent.
8465
d1feda86
YQ
84662012-03-03 Yao Qi <yao@codesourcery.com>
8467
8468 * linux-low.c (linux_supports_agent): New.
8469 (linux_target_ops): Initialize field `supports_agent' with
8470 linux_supports_agent.
8471 * target.h (struct target_ops) <supports_agent>: New.
8472 (target_supports_agent): New macro.
8473 * server.c (handle_general_set): Handle packet 'QAgent'.
8474 (handle_query): Send `QAgent+'.
8475 * Makefile.in (server.o): Depends on agent.h.
8476
2fa291ac
YQ
84772012-03-03 Yao Qi <yao@codesourcery.com>
8478
8479 * Makefile.in (OBS): Add agent.o.
8480 Add new rule for agent.o.
8481 Track dependence of tracepoint.c on agent.h.
8482 * tracepoint.c (run_inferior_command_1):
8483 (run_inferior_command): Call agent_run_command.
8484 (gdb_ust_connect_sync_socket): Deleted. Move it to
8485 common/agent.c.
8486 (resume_thread, stop_thread): Likewise.
8487 (gdb_ust_socket_init): Renamed to ...
8488 (gdb_agent_socket_init): ... New.
8489 (gdb_ust_thread): Renamed to ...
8490 (gdb_agent_helper_thread): ... New.
8491 (gdb_ust_init): Move some code to ...
8492 (gdb_agent_init): ... here. New.
8493 [HAVE_UST]: Call gdb_ust_init.
8494 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8495 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8496 * config.in, configure: Regenerated.
8497
05044653
PA
84982012-03-02 Pedro Alves <palves@redhat.com>
8499
8500 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8501 * linux-low.c (struct simple_pid_list): New.
8502 (stopped_pids): New a struct simple_pid_list pointer.
8503 (add_to_pid_list, pull_pid_from_list): New.
8504 (handle_extended_wait): Don't assume the first signal new children
8505 report is SIGSTOP. Adjust call to pull_pid_from_list.
8506 (linux_wait_for_lwp): Adjust.
8507
8d00225b
YQ
85082012-03-02 Yao Qi <yao@codesourcery.com>
8509
8510 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8511 debug log.
8512
19560ba5
YQ
85132012-03-02 Yao Qi <yao@codesourcery.com>
8514
8515 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8516 `stop_pc' and `tpoint'. Update caller.
8517
1faeff08
MR
85182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8519
8520 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8521 * linux-low.c (use_linux_regsets): New macro.
8522 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8523 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8524 (linux_register_in_regsets): New function.
8525 (usr_fetch_inferior_registers): Skip registers covered by
8526 regsets.
8527 (usr_store_inferior_registers): Likewise.
8528 (usr_fetch_inferior_registers): New macro.
8529 (usr_store_inferior_registers): Likewise.
8530 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8531 (linux_store_registers): Likewise.
8532 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8533 prototype.
8534 (init_registers_mips64_dsp_linux): Likewise.
8535 (init_registers_mips_linux): New macro.
8536 (init_registers_mips_dsp_linux): Likewise.
8537 (mips_dsp_num_regs): Likewise.
8538 (DSP_BASE, DSP_CONTROL): New fallback macros.
8539 (mips_base_regs): New macro.
8540 (mips_regmap): Use it. Fix the size.
8541 (mips_dsp_regmap): New variable.
8542 (mips_dsp_regset_bitmap): Likewise.
8543 (mips_arch_setup): New function.
8544 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8545 than mips_regmap.
8546 (mips_cannot_store_register): Likewise.
8547 (the_low_target): Update .arch_setup, .num_regs and .regmap
8548 initializers. Add .regset_bitmap initializer.
8549 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8550 initializer.
8551 * linux-bfin-low.c (the_low_target): Likewise.
8552 * linux-cris-low.c (the_low_target): Likewise.
8553 * linux-crisv32-low.c (the_low_target): Likewise.
8554 * linux-ia64-low.c (the_low_target): Likewise.
8555 * linux-m32r-low.c (the_low_target): Likewise.
8556 * linux-m68k-low.c (the_low_target): Likewise.
8557 * linux-ppc-low.c (the_low_target): Likewise.
8558 * linux-s390-low.c (the_low_target): Likewise.
8559 * linux-sh-low.c (the_low_target): Likewise.
8560 * linux-sparc-low.c (the_low_target): Likewise.
8561 * linux-tic6x-low.c (the_low_target): Likewise.
8562 * linux-x86-low.c (the_low_target): Likewise.
8563 * linux-xtensa-low.c (the_low_target): Likewise.
8564 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8565 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8566 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8567 srv_xmlfiles.
8568 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8569 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8570
c03e6ccc
YQ
85712012-02-29 Yao Qi <yao@codesourcery.com>
8572 Pedro Alves <palves@redhat.com>
8573
8574 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8575 `step_over_finished' is true.
8576
644cebc9
PA
85772012-02-27 Pedro Alves <palves@redhat.com>
8578
8579 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8580 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8581
c14d7ab2
PA
85822012-02-27 Pedro Alves <palves@redhat.com>
8583
8584 PR server/9684
8585 * linux-low.c (pid_is_stopped): New.
8586 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8587
412c89dd
LM
85882012-02-25 Luis Machado <lgustavo@codesourcery.com>
8589
8590 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8591 of conditions.
8592
b745defe
MR
85932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8594
8595 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8596
9f3a5c85
LM
85972012-02-24 Luis Machado <lgustavo@codesourcery>
8598
8599 * server.c (handle_query): Advertise support for target-side
8600 breakpoint condition evaluation.
8601 (process_point_options): New function.
8602 (process_serial_event): When inserting a breakpoint, check for
8603 a target-side condition that should be evaluated.
8604
8605 * mem-break.c: Include regcache.h and ax.h.
8606 (point_cond_list_t): New data structure.
8607 (breakpoint) <cond_list>: New field.
8608 (find_gdb_breakpoint_at): Make non-static.
8609 (delete_gdb_breakpoint_at): Clear any target-side
8610 conditions.
8611 (clear_gdb_breakpoint_conditions): New function.
8612 (add_condition_to_breakpoint): Likewise.
8613 (add_breakpoint_condition): Likewise.
8614 (gdb_condition_true_at_breakpoint): Likewise.
8615 (gdb_breakpoint_here): Return result directly instead
8616 of going through a local variable.
8617
8618 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8619 (clear_gdb_breakpoint_conditions): Likewise.
8620 (add_breakpoint_condition): Likewise.
8621 (gdb_condition_true_at_breakpoint): Likewise.
8622
8623 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8624 (need_step_over_p): Take target-side breakpoint condition into
8625 consideration.
8626
5e1dc496
LM
86272012-02-24 Luis Machado <lgustavo@codesourcery>
8628
8629 * server.h: Include tracepoint.h.
8630 (agent_mem_read, agent_get_trace_state_variable_value,
8631 agent_set_trace_state_variable_value,
8632 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8633 get_set_tsv_func_addr): New prototypes.
8634
8635 * ax.h: New include file.
8636 * ax.c: New source file.
8637
8638 * tracepoint.c: Include ax.h.
8639 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8640 agent_expr, eval_result_type): Move to ax.h.
8641 (parse_agent_expr): Rename to ...
8642 (gdb_parse_agent_expr): ... this, make it non-static and move
8643 to ax.h.
8644 (unparse_agent_expr) Rename to ...
8645 (gdb_unparse_agent_expr): ... this, make it non-static and move
8646 to ax.h.
8647 (eval_agent_expr): Rename to ...
8648 (eval_tracepoint_agent_expr): ... this.
8649 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8650 forward declarations.
8651 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8652 (agent_get_trace_state_variable_value): New function.
8653 (agent_set_trace_state_variable_value): New function.
8654 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8655 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8656 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8657 (condition_true_at_tracepoint): Likewise.
8658 (parse_agent_expr): Rename to ...
8659 (gdb_parse_agent_expr): ... this and move to ax.c.
8660 (unparse_agent_expr): Rename to ...
8661 (gdb_unparse_agent_expr): ... this and move to ax.c.
8662 (gdb_agent_op_name): Move to ax.c.
8663 (eval_agent_expr): Rename to ...
8664 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8665 and move to ax.c.
8666 (eval_tracepoint_agent_expr): New function.
8667 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8668 non-static.
5e1dc496
LM
8669 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8670 ax.c.
8671 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8672 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8673 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8674 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8675 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8676 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8677 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8678 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8679 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8680 (compile_bytecodes): Remove forward declaration.
8681 (is_goto_target): Move to ax.c.
8682 (compile_bytecodes): Move to ax.c and call
8683 agent_get_trace_state_variable_value (...) and
8684 agent_set_trace_state_variable_value (...).
8685
8686 * Makefile.in: Update ax.c and IPA dependencies.
8687
277e4e52
PA
86882012-02-24 Pedro Alves <palves@redhat.com>
8689
8690 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8691 (cmd_bigqtbuffer_circular): ... this. Only handle
8692 'QTBuffer:circular:'.
8693 (handle_tracepoint_general_set): Adjust.
8694
bf4c19f7
YQ
86952012-02-16 Yao Qi <yao@codesourcery.com>
8696
8697 * inferiors.c: Move code to ...
8698 * dll.c: .... here. New.
8699 * server.h: Declare clear_dlls.
8700 * Makefile.in (SFILES): Add dll.c.
8701 (OBS): Add dll.o
8702 (dll.o): New rule.
8703
d73f2619
YQ
87042012-02-11 Yao Qi <yao@codesourcery.com>
8705
8706 * server.c: (handle_monitor_command): Add a new parameter
8707 `own_buf'.
8708 (handle_query): Update caller.
8709
f8255c2a
JB
87102012-02-09 Joel Brobecker <brobecker@adacore.com>
8711
8712 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8713 * configure, config.in: Regenerate.
8714 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8715 is not defined.
8716
da84f473
PA
87172012-02-02 Pedro Alves <palves@redhat.com>
8718
8719 Try SIGKILL first, then PTRACE_KILL.
8720 * linux-low.c (linux_kill_one_lwp): New.
8721 (linux_kill_one_lwp): Rename to ...
8722 (kill_one_lwp_callback): ... this. Use the new
8723 linux_kill_one_lwp.
8724
e886a173
PA
87252012-02-02 Pedro Alves <palves@redhat.com>
8726
8727 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8728 inferior.
8729
be07f1a2
PA
87302012-01-27 Pedro Alves <palves@redhat.com>
8731
8732 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8733 (elf_64_file_p): Make static.
8734 (linux_pid_exe_is_elf_64_file): New.
8735 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8736 Delete declarations.
8737 (linux_pid_exe_is_elf_64_file): Declare.
8738 * linux-x86-low.c (x86_arch_setup): Use
8739 linux_pid_exe_is_elf_64_file.
8740
d8301ad1
JK
87412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8742
8743 * linux-low.c (linux_wait_for_event_1): Rename to ...
8744 (linux_wait_for_event): ... here and merge it with former
8745 linux_wait_for_event - new variable wait_ptid, use it.
8746 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8747
01b17894
PA
87482012-01-23 Pedro Alves <palves@redhat.com>
8749
8750 * server.c (main): Avoid yet another case of infinite loop while
8751 detaching/killing after a longjmp.
8752
e825046f
JK
87532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8754
8755 Code cleanup.
8756 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8757
b9e7b9c3
UW
87582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8759
8760 * hostio.c (handle_readlink): New function.
8761 (handle_vFile): Call it to handle "vFile:readlink" packets.
8762
901f9912
UW
87632012-01-20 Pedro Alves <palves@redhat.com>
8764 Ulrich Weigand <ulrich.weigand@linaro.org>
8765
8766 * server.c (handle_v_requests): Only support vAttach and vRun to
8767 start multiple processes when in extended protocol mode.
8768
fc1ab1a0
PA
87692012-01-17 Pedro Alves <palves@redhat.com>
8770
8771 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8772 memalign plus mprotect to allocate the scratch buffer.
8773
7d5d4e98
PA
87742012-01-13 Pedro Alves <palves@redhat.com>
8775
8776 * server.c (attach_inferior): Clear `cont_thread'.
8777
f128d5e9
PA
87782012-01-13 Pedro Alves <palves@redhat.com>
8779
8780 * server.c (main): Avoid infinite loop while detaching/killing
8781 after a longjmp.
8782
06db92f0
DE
87832012-01-09 Doug Evans <dje@google.com>
8784
8785 * server.c (start_inferior): Set last_ptid in --wrapper case.
8786
32d92999
YQ
87872012-01-06 Yao Qi <yao@codesourcery.com>
8788
8789 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8790 defined.
8791 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8792
5e0a92a9
YQ
87932012-01-04 Yao Qi <yao@codesourcery.com>
8794
8795 * tracepoint.c (cmd_qtdp): Print debug message
8796 for static tracepoint.
8797
ae639e8c
YQ
87982012-01-04 Yao Qi <yao@codesourcery.com>
8799
8800 * tracepoint.c (trace_vdebug): Differentiate debug message
8801 between gdbserver and IPA.
8802
f72429c5
YQ
88032012-01-03 Yao Qi <yao@codesourcery.com>
8804
8805 * tracepoint.c (tracepoint_was_hit): Don't collect for
8806 static tracepoint.
8807
12c3e59c
JB
88082012-01-02 Joel Brobecker <brobecker@adacore.com>
8809
8810 * terminal.h: Reformat copyright header.
8811
67827812
JB
88122012-01-02 Joel Brobecker <brobecker@adacore.com>
8813
8814 * server.c (gdbserver_version): Update copyright year.
8815 * gdbreplay.c (gdbreplay_version): Likewise.
8816
3e52c33d
JK
88172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8818
8819 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8820
8821 Revert:
8822 2011-12-18 Hui Zhu <teawater@gmail.com>
8823 * linux-low.c (linux_create_inferior): Save return value to ret.
8824
66f1260e
HZ
88252011-12-18 Hui Zhu <teawater@gmail.com>
8826
8827 * linux-low.c (linux_create_inferior): Save return value to ret.
8828
e77616d7
DE
88292011-12-16 Doug Evans <dje@google.com>
8830
e7b06c57
DE
8831 * linux-low.c (linux_create_inferior): If stdio connection,
8832 redirect stdin from /dev/null, stdout to stderr.
8833 * remote-utils.c (remote_is_stdio): New static global.
8834 (remote_connection_is_stdio): New function.
8835 (remote_prepare): Handle stdio connection.
8836 (remote_open): Ditto.
8837 (remote_close): Don't close stdin for stdio connections.
8838 (read_prim,write_prim): New functions. Replace all calls to
8839 read/write to these.
8840 * server.c (main): Watch for "-" argument. Move call to
8841 remote_prepare before start_inferior.
8842 * server.h (STDIO_CONNECTION_NAME): New macro.
8843 (remote_connection_is_stdio): Declare.
8844
e77616d7
DE
8845 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8846 in debugging output.
8847
82067193
YQ
88482011-12-15 Yao Qi <yao@codesourcery.com>
8849
8850 * tracepoint.c: Include sys/syscall.h.
8851 (gdb_ust_thread): Remove preprocessor conditional.
8852
82bfbe7e
PA
88532011-12-14 Pedro Alves <pedro@codesourcery.com>
8854
8855 * linux-low.c (linux_detach_one_lwp): Call
8856 the_low_target.prepare_to_resume before detaching.
8857
712c6575
YQ
88582011-12-14 Yao Qi <yao@codesourcery.com>
8859
8860 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8861 of write.
8862
d54d1edf
YQ
88632011-12-14 Yao Qi <yao@codesourcery.com>
8864
8865 * i386-low.c (i386_low_stopped_data_address): Initialize local
8866 variable `control'.
8867
6210a125
PA
88682011-12-13 Pedro Alves <pedro@codesourcery.com>
8869
8870 PR remote/13492
8871
8872 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8873 DR_CONTROL unless necessary. Extend comments.
8874 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8875 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8876
2ece8244
YQ
88772011-12-13 Yao Qi <yao@codesourcery.com>
8878
8879 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8880 macros.
8881 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8882
784867a5
JK
88832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8884
8885 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8886 Print new debug message for such case.
8887
6bf36717
JK
88882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8889
8890 Fix overlapping memcpy.
8891 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8892 the read_inferior_memory transfer.
8893 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8894 write_inferior_memory transfer.
8895 (set_fast_tracepoint_jump): New variable buf. Use it for the
8896 read_inferior_memory and write_inferior_memory transfers.
8897 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8898 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8899 Use it for the write_inferior_memory transfer.
8900 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8901 buffers.
8902
50275556
MR
89032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8904
8905 * linux-low.c (fetch_register, store_register): Make code
8906 consistent, fix formatting.
8907
7325beb4
MR
89082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8909
8910 * linux-low.c (usr_store_inferior_registers): Factor out code
8911 to handle individual registers into...
8912 (store_register): ... this new function.
8913
c642a434
UW
89142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8915
8916 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8917 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8918 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8919 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8920 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8921 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8922 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8923 (srv_xmlfiles): Add new XML files.
8924
8925 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8926 and <sys/uio.h>.
8927 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8928 (init_registers_s390_linux32v1): Add prototype.
8929 (init_registers_s390_linux32v2): Likewise.
8930 (init_registers_s390_linux64v1): Likewise.
8931 (init_registers_s390_linux64v2): Likewise.
8932 (init_registers_s390x_linux64v1): Likewise.
8933 (init_registers_s390x_linux64v2): Likewise.
8934 (s390_num_regs): Increment to 52.
8935 (s390_regmap): Add orig_r2 register.
8936 (s390_num_regs_3264): Increment to 68.
8937 (s390_regmap_3264): Add orig_r2 register.
8938 (s390_collect_ptrace_register): Handle orig_r2 register.
8939 (s390_supply_ptrace_register): Likewise.
8940 (s390_fill_last_break): New function.
8941 (s390_store_last_break): Likewise.
8942 (s390_fill_system_call): New function.
8943 (s390_store_system_call): Likewise.
8944 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8945 register sets.
8946 (s390_check_regset): New function.
8947 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8948 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8949 Update target_regsets for available register sets.
8950
2268b414
JK
89512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8952 Jan Kratochvil <jan.kratochvil@redhat.com>
8953
8954 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8955 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8956 New.
8957 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8958 * linux-low.h (struct process_info_private): New member r_debug.
8959 * server.c (handle_qxfer_libraries): Call
8960 the_target->qxfer_libraries_svr4.
8961 (handle_qxfer_libraries_svr4): New function.
8962 (qxfer_packets): New entry "libraries-svr4".
8963 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8964 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8965 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8966 PACKET_qXfer_libraries_svr4.
8967
d6db1fab
UW
89682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8969
8970 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8971 PSW address/mask between 8-byte and 16-byte formats.
8972 (s390_supply_ptrace_register): Likewise.
8973 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8974 basic addressing mode bit.
8975
242f5f1c
SS
89762011-11-24 Stan Shebs <stan@codesourcery.com>
8977
8978 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8979
f196051f
SS
89802011-11-17 Stan Shebs <stan@codesourcery.com>
8981
8982 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8983 (tracing_start_time): New global.
8984 (tracing_stop_time): New global.
8985 (tracing_user_name): New global.
8986 (tracing_notes): New global.
8987 (tracing_stop_note): New global.
8988 (cmd_qtstart): Set traceframe_usage, start_time.
8989 (stop_tracing): Set stop_time.
8990 (cmd_qtstatus): Report additional status.
8991 (cmd_qtp): New function.
8992 (handle_tracepoint_query): Call it.
8993 (cmd_qtnotes): New function.
8994 (handle_tracepoint_general_set): Call it.
8995 (get_timestamp): Rename from tsv_get_timestamp.
8996
405f8e94
SS
89972011-11-14 Stan Shebs <stan@codesourcery.com>
8998 Kwok Cheung Yeung <kcy@codesourcery.com>
8999
9000 * linux-x86-low.c (small_jump_insn): New.
9001 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9002 trampoline and error message, build a trampoline and issue a small
9003 jump instruction to it.
9004 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9005 trampoline and error message.
9006 (x86_get_min_fast_tracepoint_insn_len): New.
9007 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9008 * linux-low.h (struct linux_target_ops): Add arguments to
9009 install_fast_tracepoint_jump_pad operation, add new operation.
9010 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9011 arguments.
9012 (linux_get_min_fast_tracepoint_insn_len): New function.
9013 (linux_target_op): Add new operation.
9014 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9015 (gdb_trampoline_buffer_end): Ditto.
9016 (gdb_trampoline_buffer_error): Ditto.
9017 (struct ipa_sym_addresses): Add fields for new IPA variables.
9018 (symbol_list): Add entries for new IPA variables.
9019 (struct tracepoint): Add fields to hold the address range of the
9020 trampoline used by the tracepoint.
9021 (trampoline_buffer_head): New static variable.
9022 (trampoline_buffer_tail): Ditto.
9023 (claim_trampoline_space): New function.
9024 (have_fast_tracepoint_trampoline_buffer): New function.
9025 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9026 structure.
9027 (install_fast_tracepoint): Ditto, also add error buffer argument.
9028 (cmd_qtminftpilen): New function.
9029 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9030 (fast_tracepoint_from_trampoline_address): New function.
9031 (fast_tracepoint_collecting): Handle trampoline as part of jump
9032 pad space.
9033 (set_trampoline_buffer_space): New function.
9034 (initialize_tracepoint): Initialize new IPA variables.
9035 * target.h (struct target_ops): Add arguments to
9036 install_fast_tracepoint_jump_pad operation, add new
9037 get_min_fast_tracepoint_insn_len operation.
9038 (target_get_min_fast_tracepoint_insn_len): New.
9039 (install_fast_tracepoint_jump_pad): Add arguments.
9040 * server.h (IPA_BUFSIZ): Define.
9041 * linux-i386-ipa.c: Include extra header files.
9042 (initialize_fast_tracepoint_trampoline_buffer): New function.
9043 (initialize_low_tracepoint): Call it.
9044 * server.h (set_trampoline_buffer_space): Declare.
9045 (claim_trampoline_space): Ditto.
9046 (have_fast_tracepoint_trampoline_buffer): Ditto.
9047
1e4d1764
YQ
90482011-11-14 Yao Qi <yao@codesourcery.com>
9049
9050 * server.c (handle_query): Handle InstallInTrace for qSupported.
9051 * tracepoint.c (add_tracepoint): Sort list.
9052 (install_tracepoint, download_tracepoint): New.
9053 (cmd_qtdp): Call them to install and download tracepoints.
9054 (sort_tracepoints): Removed.
9055 (cmd_qtstart): Update.
9056
5c73ff4e
YQ
90572011-11-14 Yao Qi <yao@codesourcery.com>
9058
9059 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9060 * mem-break.h: Declare.
9061 * tracepoint.c (cmd_qtstart): Move some code to ...
9062 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9063 New.
9064 (download_tracepoints): Move some code to ...
9065 (download_tracepoint_1): ... here. New.
9066
86a30030
YQ
90672011-11-08 Yao Qi <yao@codesourcery.com>
9068
9069 * remote-utils.c (relocate_instruction): A comment fix.
9070
8d26e50c
JB
90712011-11-07 Joel Brobecker <brobecker@adacore.com>
9072
9073 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9074 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9075 dr_status_mirror and dr_control_mirror from debug_reg_state.
9076 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9077 (i386_initial_stuff): Remove use of deleted globals.
9078 (i386_get_thread_context, i386_set_thread_context,
9079 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9080 from debug_reg_state.
9081
a59306a3
YQ
90822011-11-05 Yao Qi <yao@codesourcery.com>
9083
9084 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9085 address as TPOINT's.
9086
3065dfb6
SS
90872011-11-02 Stan Shebs <stan@codesourcery.com>
9088
9089 * tracepoint.c (agent_mem_read_string): New function.
9090 (eval_agent_expr): Call it for tracenz.
9091 * server.c (handle_query): Report support for tracenz.
9092
fd0d8c7c
YQ
90932011-11-02 Yao Qi <yao@codesourcery.com>
9094
9095 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9096
609086b1
YQ
90972011-11-02 Yao Qi <yao@codesourcery.com>
9098
9099 * target.h: Fix a typo in comment.
9100
b9fd1791
PA
91012011-10-31 Pedro Alves <pedro@codesourcery.com>
9102
9103 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9104 clobber the breakpoints' shadows with fast tracepoint jumps.
9105 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9106 * target.c (write_inferior_memory): Also pass MYADDR down to
9107 check_mem_write.
9108
03583c20
UW
91092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9110
9111 * configure.ac: Check support for personality routine.
9112 * configure: Regenerate.
9113 * config.in: Likewise.
9114 * linux-low.c: Include <sys/personality.h>.
9115 Define ADDR_NO_RANDOMIZE if necessary.
9116 (linux_create_inferior): Disable address space randomization when
9117 forking inferior, if requested.
9118 (linux_supports_disable_randomization): New function.
9119 (linux_target_ops): Install it.
9120 * server.h (disable_randomization): Declare.
9121 * server.c (disable_randomization): New global variable.
9122 (handle_general_set): Handle QDisableRandomization.
9123 (handle_query): Likewise for qSupported.
9124 (main): Support --disable-randomization and --no-disable-randomization
9125 command line arguments.
9126 * target.h (struct target_ops): Add supports_disable_randomization.
9127 (target_supports_disable_randomization): New macro.
9128
723b724b
MF
91292011-09-29 Mike Frysinger <vapier@gentoo.org>
9130
9131 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9132 ifdef check.
9133 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9134 [!PT_GETDSBT] (target_loadmap): New definition.
9135 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9136 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9137 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9138 and PT_GETDSBT to LINUX_LOADMAP.
9139 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9140 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9141
55329a5c 91422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9143
9144 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9145 (arm_linux_hwbp_cap): New static variable.
9146 (arm_linux_get_hwbp_cap): Replace by ...
9147 (arm_linux_init_hwbp_cap): ... this new function.
9148 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9149 (arm_linux_get_hw_watchpoint_count): Likewise.
9150 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9151 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9152 (arm_prepare_to_resume): Use perror_with_name instead of error.
9153
55329a5c 91542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9155
9156 * linux-arm-low.c: Include <signal.h>.
9157 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9158 (struct arm_linux_hwbp_cap): New data type.
9159 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9160 (struct arm_linux_hw_breakpoint): New data type.
9161 (MAX_BPTS, MAX_WPTS): Define.
9162 (struct arch_process_info, struct arch_lwp_info): New data types.
9163 (arm_linux_get_hwbp_cap): New function.
9164 (arm_linux_get_hw_breakpoint_count): Likewise.
9165 (arm_linux_get_hw_watchpoint_count): Likewise.
9166 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9167 (arm_hwbp_control_initialize): Likewise.
9168 (arm_hwbp_control_is_enabled): Likewise.
9169 (arm_hwbp_control_is_initialized): Likewise.
9170 (arm_hwbp_control_disable): Likewise.
9171 (arm_linux_hw_breakpoint_equal): Likewise.
9172 (arm_linux_hw_point_initialize): Likewise.
9173 (struct update_registers_data): New data structure.
9174 (update_registers_callback: New function.
9175 (arm_insert_point): Likewise.
9176 (arm_remove_point): Likewise.
9177 (arm_stopped_by_watchpoint): Likewise.
9178 (arm_stopped_data_address): Likewise.
9179 (arm_new_process): Likewise.
9180 (arm_new_thread): Likewise.
9181 (arm_prepare_to_resume): Likewise.
9182 (the_low_target): Register arm_insert_point, arm_remove_point,
9183 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9184 arm_new_thread, and arm_prepare_to_resume.
9185
6b9801d4
SS
91862011-09-15 Stan Shebs <stan@codesourcery.com>
9187
9188 * server.h (struct emit_ops): Add compare-goto fields.
9189 * tracepoint.c (gdb_agent_op_sizes): New table.
9190 (emit_eq_goto): New function.
9191 (emit_ne_goto): New function.
9192 (emit_lt_goto): New function.
9193 (emit_le_goto): New function.
9194 (emit_gt_goto): New function.
9195 (emit_ge_goto): New function.
9196 (is_goto_target): New function.
9197 (compile_bytecodes): Recognize special cases of compare-goto
9198 combinations and call specialized emitters for them.
9199 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9200 (amd64_emit_ne_goto): New function.
9201 (amd64_emit_lt_goto): New function.
9202 (amd64_emit_le_goto): New function.
9203 (amd64_emit_gt_goto): New function.
9204 (amd64_emit_ge_goto): New function.
9205 (amd64_emit_ops): Add the new functions.
9206 (i386_emit_eq_goto): New function.
9207 (i386_emit_ne_goto): New function.
9208 (i386_emit_lt_goto): New function.
9209 (i386_emit_le_goto): New function.
9210 (i386_emit_gt_goto): New function.
9211 (i386_emit_ge_goto): New function.
9212 (i386_emit_ops): Add the new functions.
9213
bf15cbda
SS
92142011-09-08 Stan Shebs <stan@codesourcery.com>
9215
9216 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9217 (i386_emit_epilogue): Restore %ebx.
9218
943ca1dd
JZ
92192011-08-31 Jie Zhang <jzhang918@gmail.com>
9220
9221 * server.c (step_thread): Remove definition.
9222 (process_serial_event): Don't handle Hs.
9223 * server.h (step_thread): Remove declaration.
9224 * target.c (set_desired_inferior): Remove use of step_thread.
9225
e3deef73
LM
92262011-08-24 Luis Machado <lgustavo@codesourcery.com>
9227
9228 * linux-low.c: Include linux-procfs.h.
9229 (linux_attach_lwp_1): Update comments.
9230 (linux_attach): Scan for existing threads when attaching to a
9231 process that is the tgid.
9232 * Makefile.in: Update dependencies.
9233
13da1c97
LM
92342011-08-24 Luis Machado <lgustavo@codesourcery.com>
9235
9236 * configure.srv: Add linux-procfs.o dependencies.
9237
881127c9
YQ
92382011-08-14 Yao Qi <yao@codesourcery.com>
9239
9240 * target.h (struct target_ops): Fix indent.
9241 * win32-low.c (win32_target_ops): Fix comment.
9242
58dbd541
YQ
92432011-08-14 Andrew Jenner <andrew@codesourcery.com>
9244 Yao Qi <yao@codesourcery.com>
9245
9246 * Makefile.in (clean): Remove tic6x-*.c files.
9247 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9248 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9249 (tic6x-c64xp-linux.c): Likewise.
9250 * configure.srv: Add support for tic6x-*-uclinux.
9251 * linux-tic6x-low.c: New.
9252 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9253
78d85199
YQ
92542011-08-14 Andrew Stubbs <ams@codesourcery.com>
9255 Yao Qi <yao@codesourcery.com>
9256
9257 * target.h (struct target_ops): Add read_loadmap.
9258 * linux-low.c (struct target_loadseg): New type.
9259 (struct target_loadmap): New type.
9260 (linux_read_loadmap): New function.
9261 (linux_target_ops): Add linux_read_loadmap.
9262 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9263 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9264 to NULL.
78d85199 9265
a959a88d
EZ
92662011-08-05 Eli Zaretskii <eliz@gnu.org>
9267
9268 * win32-low.c: Include <stdint.h>.
9269
1ced966e
PA
92702011-07-22 Pedro Alves <pedro@codesourcery.com>
9271
9272 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9273 to the inferior here.
9274 (i386_remove_aligned_watchpoint): Ditto.
9275 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9276 fit part of the watchpoint in the debug registers.
9277 (i386_update_inferior_debug_regs): New.
9278 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9279 registers, and only update the inferior on success.
9280 (i386_low_remove_watchpoint): Ditto.
9281
d26e3629
KY
92822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9283
9284 * linux-low.c (compare_ints, unique, list_threads, show_process,
9285 linux_core_of_thread): Delete.
9286 (linux_target_ops): Change linux_core_of_thread to
9287 linux_common_core_of_thread.
9288 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9289 * utils.c (malloc_failure): Change type of argument.
9290 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9291 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9292 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9293 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9294 (IPA_OBJS): Add common-utils-ipa.o.
9295 (ptid_h, linux_osdata_h): New macros.
9296 (server_h): Add common/common-utils.h, common/xml-utils.h,
9297 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9298 common/ptid.h.
9299 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9300 ptid.o, buffer.o): New rules.
9301 (linux-low.o): Add common/linux-osdata.h as a dependency.
9302 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9303 * configure.ac: Add AC_HEADER_DIRENT check.
9304 * config.in: Regenerate.
9305 * configure: Regenerate.
9306 * remote-utils.c (xml_escape_text): Delete.
9307 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9308 buffer_xml_printf): Move to common/buffer.c.
9309 * server.c (main): Remove call to initialize_inferiors.
9310 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9311 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9312 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9313 internal_error, gdb_assert, gdb_assert_fail): Delete.
9314 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9315 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9316 common/buffer.h.
9317 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9318 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9319 initialize_inferiors): Delete.
9320
2275a1a7
PA
93212011-07-20 Pedro Alves <pedro@codesourcery.com>
9322
9323 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9324 symbol error.
9325
0a5b1e09
PA
93262011-05-31 Pedro Alves <pedro@codesourcery.com>
9327
9328 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9329 assertion.
9330 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9331
6938fd34
YQ
93322011-05-26 Yao Qi <yao@codesourcery.com>
9333
9334 * Makefile.in (thread-db.o): Track dependence to
9335 common/gdb_thread_db.h.
9336 * thread-db.c: include gdb_thread_db.h from right place.
9337
b481f9e0
TT
93382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9339
9340 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9341 __FILE__ and __LINE__ to internal_error.
9342
98a5dd13
DE
93432011-05-13 Doug Evans <dje@google.com>
9344
9345 * thread-db.c (try_thread_db_load_from_sdir): New function.
9346 (try_thread_db_load_from_dir): New function.
9347 (thread_db_load_search): Handle $sdir, ignore $pdir.
9348 Remove trying of system directories if search of
9349 libthread-db-search-path fails, that is now done via $sdir.
9350
d248b706
KY
93512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9352
9353 * server.c (handle_query): Add EnableDisableTracepoints to the list
9354 of supported features.
43aaf8b6 9355 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9356 tracepoints.
43aaf8b6
PA
9357 (cmd_qtenable_disable): New.
9358 (cmd_qtstart): Install tracepoints even if disabled.
9359 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9360 receiving a QTEnable or QTDisable packet.
9361 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9362 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9363 tracepoints.
9364 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9365
84e578fb
DE
93662011-05-10 Doug Evans <dje@google.com>
9367
9368 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9369
71f55dd8
DE
93702011-05-04 Doug Evans <dje@google.com>
9371
9372 * linux-low.c (linux_join): Skip process lookup.
9373 * spu-low.c (spu_join): Ditto.
9374 * server.c (join_inferiors_callback): Delete.
9375 (process_serial_event): For 'D' packet (detach) call join_inferior
9376 directly.
9377
4d393d60
JM
93782011-05-04 Joseph Myers <joseph@codesourcery.com>
9379
9380 * README: Don't mention xscale*-*-linux*.
9381 * configure.srv (xscale*-*-linux*): Don't handle target.
9382
b00ad6ff
NF
93832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9384
9385 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9386 casting pointers.
9387 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9388 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9389 (i386_emit_void_call_2): Likewise.
9390
af96c192
YQ
93912011-04-26 Yao Qi <yao@codesourcery.com>
9392
43aaf8b6
PA
9393 * linux-low.c: Move common macros to linux-ptrace.h.
9394 Include linux-ptrace.h.
af96c192
YQ
9395 * Makefile.in (linux_ptrace_h): New.
9396 (linux-low.o): Depends on linux-ptrace.h.
9397
03f2bd59
JK
93982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9399
9400 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9401 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9402 (remote_prepare): New function with most of the TCP code from ...
9403 (remote_open): ... here. Detect PORT here unconditionally. Move also
9404 setting transport_is_reliable.
9405 * server.c (run_once): New variable.
9406 (gdbserver_usage): Document it.
9407 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9408 the first run if RUN_ONCE.
9409 * server.h (run_once, remote_prepare): New declarations.
9410
7a9dd1b2
TT
94112011-04-19 Tom Tromey <tromey@redhat.com>
9412
9413 * win32-low.c (handle_load_dll): Remove duplicate "the".
9414
81239425
PM
94152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9416
9417 Remove support for old Cygwin 1.5 versions.
9418 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9419 function to avoid warning.
9420 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9421 warning.
9422
9e0627f1
PM
94232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9424
9425 * gdbserver/server.h (Macro _): Define it if not available.
9426
588eebee
MS
94272011-03-14 Michael Snyder <msnyder@vmware.com>
9428
348af9f7 9429 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9430
43f70d4c
JB
94312011-03-10 Joel Brobecker <brobecker@adacore.com>
9432
9433 * Makefile.in (maintainer-clean realclean distclean): Remove
9434 "make ... subdir_do" command.
9435
348af9f7
MS
94362011-03-10 Michael Snyder <msnyder@vmware.com>
9437
9438 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9439
9440 * server.c (handle_v_run): Free alloced buffer on early return.
9441
e637a4f5
YQ
94422011-03-09 Yao Qi <yao@codesourcery.com>
9443
9444 Revert:
9445 2011-03-04 Yao Qi <yao@codesourcery.com>
9446
9447 * Makefile.in: Remove GNU make feature --directory.
9448
9449 2011-03-05 Yao Qi <yao@codesourcery.com>
9450
9451 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9452 (subdir_do): New make target. Copied from gdb/Makefile.
9453 (maintainer-clean, realclean, distclean, clean): Call corresponding
9454 make targets in common/Makefile.
9455
9456 2011-02-11 Yao Qi <yao@codesourcery.com>
9457
9458 * configure.ac: Call AC_PROG_RANLIB.
9459 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9460 * configure: Regenerate.
9461
e6edda56
JK
94622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9463
9464 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9465
e5141119
JB
94662011-03-06 Yao Qi <yao@codesourcery.com>
9467
9468 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9469
64794aa4
JB
94702011-03-05 Yao Qi <yao@codesourcery.com>
9471
9472 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9473 (subdir_do): New make target. Copied from gdb/Makefile.
9474 (maintainer-clean, realclean, distclean, clean): Call corresponding
9475 make targets in common/Makefile.
9476
7a762829
YQ
94772011-03-04 Yao Qi <yao@codesourcery.com>
9478
9479 * Makefile.in: Remove GNU make feature --directory.
9480
348af9f7
MS
94812011-03-04 Michael Snyder <msnyder@vmware.com>
9482
9483 * server.c (queue_stop_reply): Call xmalloc not malloc.
9484
94852011-03-02 Michael Snyder <msnyder@vmware.com>
9486
9487 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9488
9f72fee2
MS
94892011-02-28 Michael Snyder <msnyder@vmware.com>
9490
588eebee
MS
9491 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9492 (cmd_qtframe): Ditto.
9493 (cmd_qtbuffer): Ditto.
9494 (cmd_bigqtbuffer): Ditto.
9495
9f72fee2
MS
9496 * utils.c (decimal2str): Initialize 'width' to nine, then
9497 don't mess with it.
9498
8040bd49
UW
94992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9500
9501 * hostio.c (require_data): Free *data, not data.
9502
7e52cbd0
JK
95032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9504
9505 * hostio.c (require_data): Use free, not xfree.
9506
9130f83e
MS
95072011-02-27 Michael Snyder <msnyder@vmware.com>
9508
4b812f4e
MS
9509 * server.c (handle_query): Discard unused value.
9510
9130f83e
MS
9511 * hostio.c (require_data): Free malloc memory before returning
9512 error.
9513
69d37113
MS
95142011-02-26 Michael Snyder <msnyder@vmware.com>
9515
9516 * linux-low.c (list_threads): Call closedir for dirent.
9517
35f5825a
MS
95182011-02-27 Michael Snyder <msnyder@vmware.com>
9519
2a589cef
MS
9520 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9521 a case statement falls through.
9522
0adea5f7
MS
9523 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9524
35f5825a
MS
9525 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9526 in comparison.
9527
238f1c74
MS
95282011-02-26 Michael Snyder <msnyder@vmware.com>
9529
9530 * utils.c (decimal2str): Eliminate dead code and dead param.
9531 (pulongest): Drop dead param from call to decimal2str.
9532 (plongest): Ditto.
9533
633ff500
JB
95342011-02-24 Joel Brobecker <brobecker@adacore.com>
9535
9536 Revert the following patch (not approved yet):
9537 2011-02-21 Hui Zhu <teawater@gmail.com>
9538 * tracepoint.c (tp_printf): New function.
9539 (eval_agent_expr): Handle gdb_agent_op_printf.
9540
f9c6ff72
HZ
95412011-02-21 Hui Zhu <teawater@gmail.com>
9542
9543 * tracepoint.c (tp_printf): New function.
9544 (eval_agent_expr): Handle gdb_agent_op_printf.
9545
94d5e490
TT
95462011-02-18 Tom Tromey <tromey@redhat.com>
9547
9548 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9549 (tracepoint.o): Likewise.
9550 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9551 (gdb_agent_op_names): Likewise.
9552
c7f96d2b
TT
95532011-02-18 Tom Tromey <tromey@redhat.com>
9554
9555 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9556 gdb_agent_op_rot>: New constants.
9557 (gdb_agent_op_names): Add pick and roll.
9558 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9559 cases.
9560
0feedb2c
JK
95612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9562
9563 * aclocal.m4: Regenerated with aclocal-1.11.1.
9564
b3b9301e
PA
95652011-02-14 Pedro Alves <pedro@codesourcery.com>
9566
9567 * server.c (handle_qxfer_traceframe_info): New.
9568 (qxfer_packets): Register "traceframe-info".
9569 (handle_query): Report support for qXfer:traceframe-info:read+.
9570 * tracepoint.c (match_blocktype): New.
9571 (traceframe_find_block_type): Rename to ...
9572 (traceframe_walk_blocks): ... this. Add callback filter argument,
9573 and use it.
9574 (traceframe_find_block_type): New, reimplemented on top of
9575 traceframe_walk_blocks.
9576 (build_traceframe_info_xml): New.
9577 (traceframe_read_info): New.
9578 * server.h (traceframe_read_info): Declare.
9579
4f3e6fb7
YQ
95802011-02-11 Yao Qi <yao@codesourcery.com>
9581
9582 * configure.ac: Call AC_PROG_RANLIB.
9583 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9584 * configure: Regenerate.
9585
764880b7
PA
95862011-02-07 Pedro Alves <pedro@codesourcery.com>
9587
9588 * server.c (gdb_read_memory): Change return semantics to allow
9589 partial transfers.
9590 (handle_search_memory_1): Adjust.
9591 (process_serial_event) <'m' packet>: Handle partial transfers.
9592 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9593
1c79eb8a
PA
95942011-01-28 Pedro Alves <pedro@codesourcery.com>
9595
9596 * regcache.c (init_register_cache): Initialize
9597 regcache->register_status.
9598 (free_register_cache): Release regcache->register_status.
9599 (regcache_cpy): Copy register_status.
9600 (registers_to_string): Print 'x's for unavailable registers.
9601 (supply_register): Mark the register's status valid or
9602 unavailable, depending on whether a buffer was passed in or not.
9603 (supply_register_zeroed): New.
9604 (supply_regblock): Mark the registers' status valid or
9605 unavailable, depending on whether a buffer was passed in or not.
9606 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9607 (struct regcache): New `register_status' field.
9608 (supply_register_zeroed): Declare.
9609 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9610 supply_register_zeroed, rather than passing a NULL buffer to
9611 supply_register.
9612 * tracepoint.c (fetch_traceframe_registers): Update comment.
9613
85724a0e
PA
96142011-01-28 Pedro Alves <pedro@codesourcery.com>
9615
9616 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9617 buffer explicit.
9618
d08aafef
PA
96192011-01-25 Pedro Alves <pedro@codesourcery.com>
9620
9621 * server.h (decode_xfer_write): Change prototype.
9622 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9623 and don't extract the annex here.
9624 * server.c (decode_xfer_read): Remove `annex' parameter,
9625 and don't extract the annex here.
9626 (decode_xfer): New.
9627 (struct qxfer): New.
9628 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9629 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9630 (handle_qxfer_statictrace): New functions, abstracted out from
9631 handle_query, and made to use the struct qxfer interface.
9632 (handle_threads_qxfer_proper): Rename to ...
9633 (handle_qxfer_threads_proper): ... this.
9634 (handle_threads_qxfer): Rename to ...
9635 (handle_qxfer_threads): ... this. Adjust.
9636 (qxfer_packets): New array.
9637 (handle_qxfer): New function.
9638 (handle_query): Use handle_qxfer.
9639
493e2a69
MS
96402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9641
9642 * gdbreplay.c: Shorten lines of >= 80 columns.
9643 * linux-low.c: Ditto.
9644 * linux-ppc-low.c: Ditto.
9645 * linux-s390-low.c: Ditto.
9646 * linux-sparc-low.c: Ditto.
9647 * linux-x86-low.c: Ditto.
9648 * linux-xtensa-low.c: Ditto.
9649 * mem-break.c: Ditto.
9650 * nto-low.c: Ditto.
9651 * regcache.h: Ditto.
9652 * remote-utils.c: Ditto.
9653 * server.c: Ditto.
9654 * server.h: Ditto.
9655 * thread-db.c: Ditto.
9656 * tracepoint.c: Ditto.
9657 * utils.c: Ditto.
9658 * win32-low.h: Ditto.
9659
44944448
JB
96602011-01-05 Joel Brobecker <brobecker@adacore.com>
9661
9662 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9663 update.
9664
71ce852c
JB
96652011-01-01 Joel Brobecker <brobecker@adacore.com>
9666
9667 * server.c (gdbserver_version): Update copyright year in version
9668 output.
9669 * gdbreplay.c (gdbreplay_version): Ditto.
9670
eb826dc6
MF
96712010-12-29 Jie Zhang <jie.zhang@analog.com>
9672
9673 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9674 * linux-bfin-low.c: New file.
9675 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9676 PT_DATA_ADDR for BFIN targets.
9677 * Makefile.in (SFILES): Add linux-bfin-low.c.
9678 (clean): Remove reg-bfin.c.
9679 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9680 * README: Mention supported Blackfin targets.
9681
39ab222a
MF
96822010-12-23 Mike Frysinger <vapier@gentoo.org>
9683
9684 * .gitignore: New file.
9685
a1f2ce7d
MF
96862010-11-16 Mike Frysinger <vapier@gentoo.org>
9687
9688 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9689
f474844c
JZ
96902010-10-22 Jie Zhang <jie@codesourcery.com>
9691
9692 * Makefile.in: Add FLAGS_TO_PASS variable.
9693 (install): Remove dependency of install-only and recursively
9694 invoke make for install-only.
9695
f1048712
DE
96962010-10-04 Doug Evans <dje@google.com>
9697
9698 * Makefile.in (uninstall): Use $(DESTDIR).
9699
b53a1623
PA
97002010-09-24 Pedro Alves <pedro@codesourcery.com>
9701
e6ee044d
PA
9702 PR gdb/11842
9703
b53a1623
PA
9704 * linux-x86-low.c (compat_siginfo_from_siginfo)
9705 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9706 si_code is < 0. Check for si_code == SI_TIMER before checking for
9707 si_code < 0.
9708
fa1bd1e4
JB
97092010-09-13 Joel Brobecker <brobecker@adacore.com>
9710
9711 * lynx-i386-low.c: New file.
9712 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9713
47fac8f8
JB
97142010-09-13 Joel Brobecker <brobecker@adacore.com>
9715
9716 * lynx-low.c (ptrace_request_to_str): Remove handling for
9717 request values that have been removed in LynxOS 5.x.
9718
1adfc54d
JB
97192010-09-13 Joel Brobecker <brobecker@adacore.com>
9720
9721 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9722 <ptrace.h>
9723
c2a66c29
NS
97242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9725
9726 * configure.ac: Add --enable-inprocess-agent option.
9727 * configure: Rebuilt.
9728
32fcada3
YQ
97292010-09-06 Yao Qi <yao@codesourcery.com>
9730
9731 * linux-low.c (linux_kill): Remove unused variable.
9732 (linux_stabilize_threads): Likewise.
9733 * server.c (start_inferior): Likewise.
9734 (queue_stop_reply_callback): Likewise.
9735 * tracepoint.c (do_action_at_tracepoint): Likewise.
9736
0cccb683
YQ
97372010-09-06 Yao Qi <yao@codesourcery.com>
9738
9739 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9740 on return.
9741
423ec54c
JK
97422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9743
9744 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9745
12ac6819
PA
97462010-09-06 Pedro Alves <pedro@codesourcery.com>
9747
9748 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9749 "$(IPA_DEPFILES)".
9750
8ed54b31
JB
97512010-09-01 Joel Brobecker <brobecker@adacore.com>
9752
9753 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9754 gdbserver/lynx-ppc-low.c: New files.
9755 * Makefile.in (lynx_low_h): New variable.
9756 (lynx-low.o, lynx-ppc-low.o): New rules.
9757 * configure.ac: On LynxOS, link with -lnetinet.
9758 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9759 * configure: regenerate.
9760
bb0116a4
JB
97612010-09-01 Joel Brobecker <brobecker@adacore.com>
9762
9763 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9764 * configure.ac: Add check for vasprintf and vsnprintf.
9765 * configure, config.in: Regenerate.
9766 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9767
a778ab81 97682010-09-01 Joel Brobecker <brobecker@adacore.com>
9769
9770 * gdbreplay.c: Move include of alloca.h up, next to include of
9771 malloc.h.
9772 * server.h: Add include of malloc.h.
9773 * mem-break.c: Remove include of malloc.h.
9774 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9775
8b034a19 97762010-09-01 Joel Brobecker <brobecker@adacore.com>
9777
9778 * Makefile.in (memmem.o): Build with -Wno-error.
9779
97802010-09-01 Joel Brobecker <brobecker@adacore.com>
9781
9782 * utils.c (xsnprintf): Make non-static.
9783 * server.h: Add xsnprintf declaration.
9784 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9785 replace calls to snprintf by calls to xsnprintf throughout.
9786
97872010-09-01 Joel Brobecker <brobecker@adacore.com>
9788
9789 * configure.ac: Add configure check for alloca.
9790 * configure, config.in: Regenerate.
9791 * server.h: Include alloca.h if it exists.
9792 * gdbreplay.c: Include alloca.h if it exists.
9793
1a981360
PA
97942010-08-28 Pedro Alves <pedro@codesourcery.com>
9795
9796 * linux-low.c (__SIGRTMIN): Define if not already defined.
9797 (linux_create_inferior): Check for __ANDROID__ rather than
9798 __SIGRTMIN.
9799 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9800 are already deferred.
9801 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9802 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9803 stopped and already has a pending signal to report.
9804 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9805 a pending signal to report or is moving out of a jump pad.
9806 (linux_init_signals): Check for __ANDROID__ rather than
9807 __SIGRTMIN.
9808
b4d51a55
PA
98092010-08-28 Pedro Alves <pedro@codesourcery.com>
9810
9811 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9812 debug_threads check. Avoid a linear search when not doing debug
9813 output.
9814
ec48365d
PA
98152010-08-27 Pedro Alves <pedro@codesourcery.com>
9816
9817 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9818 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9819 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9820 (process_event): Change local fd's type to gdb_fildes_t.
9821 (create_file_handler): Adjust prototype.
9822 (delete_file_handler): Adjust prototype.
9823 (handle_file_event): Adjust prototype. Use pfildes.
9824 (create_file_event): Adjsut prototype.
9825 * remote-utils.c (remote_desc, listen_desc): Change type to
9826 gdb_fildes_t.
9827 * server.h: New gdb_fildes_t typedef.
9828 [USE_WIN32API]: Include winsock2.h.
9829 (delete_file_handler, add_file_handler): Adjust prototypes.
9830 (pfildes): Declare.
9831 * utils.c (pfildes): New.
9832
854d88f0
PA
98332010-08-27 Pedro Alves <pedro@codesourcery.com>
9834
9835 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9836 * configure: Regenerate.
9837
0146f85b
PA
98382010-08-27 Pedro Alves <pedro@codesourcery.com>
9839
9840 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9841 (linux_done_accessing_memory): ... this.
9842 (linux_target_ops): Adjust.
9843 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9844 * nto-low.c (nto_target_ops): Adjust comment.
9845 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9846 * spu-low.c (spu_target_ops): Adjust comment.
9847 * target.h (target_ops): Rename unprepare_to_access_memory field
9848 to done_accessing_memory.
9849 (unprepare_to_access_memory): Rename to ...
9850 (done_accessing_memory): ... this.
9851
90d74c30
PA
98522010-08-26 Pedro Alves <pedro@codesourcery.com>
9853
9854 * linux-low.c (linux_prepare_to_access_memory): New.
9855 (linux_unprepare_to_access_memory): New.
9856 (linux_target_ops): Install them.
9857 * server.c (read_memory): Rename to ...
9858 (gdb_read_memory): ... this. Use
9859 prepare_to_access_memory/prepare_to_access_memory.
9860 (write_memory): Rename to ...
9861 (gdb_write_memory): ... this. Use
9862 prepare_to_access_memory/prepare_to_access_memory.
9863 (handle_search_memory_1): Adjust.
9864 (process_serial_event): Adjust.
9865 * target.h (struct target_ops): New fields
9866 prepare_to_access_memory and unprepare_to_access_memory.
9867 (prepare_to_access_memory, unprepare_to_access_memory): New.
9868 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9869 prepare_to_access_memory/prepare_to_access_memory.
9870 * nto-low.c (nto_target_ops): Adjust.
9871 * spu-low.c (spu_target_ops): Adjust.
9872 * win32-low.c (win32_target_ops): Adjust.
9873
fd467969
PA
98742010-08-26 Pedro Alves <pedro@codesourcery.com>
9875
9876 * Makefile.in (WARN_CFLAGS): Get it from configure.
9877 (WERROR_CFLAGS): New.
9878 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9879 * configure.ac: Introduce --enable-werror, which adds -Werror to
9880 the compiler command line. Enabled by default. Disable with
9881 --disable-werror. Add -Wdeclaration-after-statement
9882 Wpointer-arith and -Wformat-nonliteral to warning flags.
9883 * configure: Regenerate.
9884
331e2f5f
PA
98852010-08-26 Pedro Alves <pedro@codesourcery.com>
9886
9887 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9888
e581f2b4
PA
98892010-08-26 Pedro Alves <pedro@codesourcery.com>
9890
9891 * gdbreplay.c (remote_error): New.
9892 (gdbchar): New.
9893 (expect): Use gdbchar. Check for error reading from GDB.
9894 Clarify sync error output.
9895 (play): Check for errors writing to GDB.
9896 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9897 * remote-utils.c (getpkt): Check for errors writing to the remote
9898 descriptor.
9899
3c11dd79
PA
99002010-08-25 Pedro Alves <pedro@codesourcery.com>
9901
9902 * linux-low.c (linux_wait_1): Move non-debugging code out of
9903 `debug_threads' control.
9904
d20a8ad9
PA
99052010-08-25 Pedro Alves <pedro@codesourcery.com>
9906
9907 * linux-low.c (linux_wait_1): Don't set last_status here.
9908 * server.c (push_event, queue_stop_reply_callback): Assert we're
9909 not pushing a TARGET_WAITKIND_IGNORE event.
9910 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9911 (myresume, handle_target_event): Set the thread's last_resume_kind
9912 and last_status from the target returned status.
9913
964e4306
PA
99142010-08-25 Pedro Alves <pedro@codesourcery.com>
9915
9916 PR threads/10729
9917
9918 * linux-x86-low.c (update_debug_registers_callback): New.
9919 (i386_dr_low_set_addr): Use it.
9920 (i386_dr_low_get_addr): New.
9921 (i386_dr_low_set_control): Use update_debug_registers_callback.
9922 (i386_dr_low_get_control): New.
9923 (i386_dr_low_get_status): Adjust.
9924 * linux-low.c (linux_stop_lwp): New.
9925 * linux-low.h (linux_stop_lwp): Declare.
9926
9927 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9928 argument instead of a i386_debug_reg_state.
9929 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9930 a i386_debug_reg_state.
9931 (i386_insert_aligned_watchpoint): Adjust.
9932 (i386_remove_aligned_watchpoint): Adjust.
9933 (i386_low_stopped_data_address): Read the debug registers from the
9934 inferior instead of from the mirrors.
9935 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9936 (i386_dr_low_get_addr): Declare.
9937 (i386_dr_low_get_control): Declare.
9938 (i386_dr_low_get_status): Change prototype.
9939
9940 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9941 (i386_dr_low_get_addr): New.
9942 (i386_dr_low_get_control): New.
9943 (i386_dr_low_get_status): Adjust prototype. Return
9944 dr_status_mirror.
9945 (i386_initial_stuff): Clear dr_status_mirror and
9946 dr_control_mirror.
9947 (i386_get_thread_context): Adjust.
9948 (i386_set_thread_context): Adjust.
9949 (i386_thread_added): Adjust.
9950
5f21a75b
PA
99512010-08-24 Pedro Alves <pedro@codesourcery.com>
9952
9953 * linux-low.h (linux_thread_area): Delete declaration.
9954
3e4c1235
TS
99552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9956
9957 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9958 after its termination.
9959
1971b033
PA
99602010-08-09 Pedro Alves <pedro@codesourcery.com>
9961
9962 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9963 (gdb_wants_all_stopped): Delete.
9964 (linux_wait_1): Don't call them.
9965 * server.c (handle_v_cont): Tag all threads as want-stopped.
9966 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9967 stopped as "client-wants-stopped".
9968
310444ac
PA
99692010-07-31 Pedro Alves <pedro@codesourcery.com>
9970
9971 * Makefile.in (signals_h): New.
9972 (server_h): Depend on it.
9973 (server.o): Don't depend on $(signals_def).
9974 (signals.o): Depend on $(signals_def).
9975
a19cae16
JK
99762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9977
9978 * Makefile.in (signals_def): New.
9979 (server_h): Append include/gdb/signals.h and signals_def.
9980 (server.o): Append signals_def.
9981
30d50328
JK
99822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9983
9984 * server.c (handle_target_event): Use target_signal_to_host for
9985 resume_info.sig initialization.
9986 * target.h (struct thread_resume) <sig>: New comment.
9987
5c3216e2
OS
99882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9989
c6f46ca0
OS
9990 * server.c (handle_query): strcpy() the returned string from paddress()
9991 instead of sprintf().
5c3216e2
OS
9992 * utils.c (paddress): Return phex_nz().
9993
6bd31874
JB
99942010-07-07 Joel Brobecker <brobecker@adacore.com>
9995
9996 * server.c (handle_v_cont): Call mourn_inferior if process
9997 just exited.
9998 (myresume): Likewise.
9999
0fb4aa4b
PA
100002010-07-01 Pedro Alves <pedro@codesourcery.com>
10001
10002 Static tracepoints, and integration with UST.
10003
10004 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10005 * mem-break.c (uninsert_all_breakpoints)
10006 (reinsert_all_breakpoints): New.
10007 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10008 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10009 (gdb_agent_ust_loaded, helper_thread_id)
10010 (gdb_agent_helper_thread_id): New macros.
10011 (struct ipa_sym_addresses): Add addr_ust_loaded,
10012 addr_helper_thread_id, addr_cmd_buf.
10013 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10014 (in_process_agent_loaded_ust): New.
10015 (write_e_ust_not_loaded): New.
10016 (maybe_write_ipa_ust_not_loaded): New.
10017 (struct collect_static_trace_data_action): New.
10018 (enum tracepoint_type) <static_tracepoint>: New.
10019 (struct tracepoint) <handle>: Mention static tracepoints.
10020 (struct static_tracepoint_ctx): New.
10021 (CMD_BUF_SIZE): New.
10022 (add_tracepoint_action): Handle static tracepoint actions.
10023 (unprobe_marker_at): New.
10024 (clear_installed_tracepoints): Handle static tracepoints.
10025 (cmd_qtdp): Handle static tracepoints.
10026 (probe_marker_at): New.
10027 (cmd_qtstart): Handle static tracepoints.
10028 (response_tracepoint): Handle static tracepoints.
10029 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10030 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10031 (get_context_regcache): Handle static tracepoints.
10032 (do_action_at_tracepoint): Handle static tracepoint actions.
10033 (traceframe_find_block_type): Handle static trace data blocks.
10034 (traceframe_read_sdata): New.
10035 (download_tracepoints): Download static tracepoint actions.
10036 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10037 (GDB_PROBE_NAME): New.
10038 (ust_ops): New.
10039 (GET_UST_SYM): New.
10040 (USTF): New.
10041 (dlsym_ust): New.
10042 (ust_marker_to_static_tracepoint): New.
10043 (gdb_probe): New.
10044 (collect_ust_data_at_tracepoint): New.
10045 (gdb_ust_probe): New.
10046 (UNIX_PATH_MAX, SOCK_DIR): New.
10047 (gdb_ust_connect_sync_socket): New.
10048 (resume_thread, stop_thread): New.
10049 (run_inferior_command): New.
10050 (init_named_socket): New.
10051 (gdb_ust_socket_init): New.
10052 (cstr_to_hexstr): New.
10053 (next_st): New.
10054 (first_marker, next_marker): New.
10055 (response_ust_marker): New.
10056 (cmd_qtfstm, cmd_qtsstm): New.
10057 (unprobe_marker_at, probe_marker_at): New.
10058 (cmd_qtstmat, gdb_ust_thread): New.
10059 (gdb_ust_init): New.
10060 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10061 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10062 (ST_REGENTRY): New.
10063 (x86_64_st_collect_regmap): New.
10064 (X86_64_NUM_ST_COLLECT_GREGS): New.
10065 (AMD64_RIP_REGNUM): New.
10066 (supply_static_tracepoint_registers): New.
10067 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10068 (ST_REGENTRY): New.
10069 (i386_st_collect_regmap): New.
10070 (i386_NUM_ST_COLLECT_GREGS): New.
10071 (supply_static_tracepoint_registers): New.
10072 * server.c (handle_query): Handle qXfer:statictrace:read.
10073 <qSupported>: Report support for StaticTracepoints, and
10074 qXfer:statictrace:read features.
10075 * server.h (traceframe_read_sdata)
10076 (supply_static_tracepoint_registers): Declare.
10077 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10078 (unpack_varlen_hex): Include in IPA build.
10079 * Makefile.in (ustlibs, ustinc): New.
10080 (IPA_OBJS): Add remote-utils-ipa.o.
10081 ($(IPA_LIB)): Link -ldl and -lpthread.
10082 (UST_CFLAGS): New.
10083 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10084 * config.in, configure: Regenerate.
10085
9e4344e5
PA
100862010-06-20 Ian Lance Taylor <iant@google.com>
10087 Pedro Alves <pedro@codesourcery.com>
10088
10089 * linux-x86-low.c (always_true): Delete.
10090 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10091 trying to fool the compiler with always_true.
10092
c6beb2cb
PA
100932010-06-20 Pedro Alves <pedro@codesourcery.com>
10094
10095 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10096 conditions in gdbserver.
10097
d2ed6730
UW
100982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10099
10100 * spu-low.c (spu_read_memory): Wrap around local store limit.
10101 (spu_write_memory): Likewise.
10102
4e29fb54
PA
101032010-06-15 Pedro Alves <pedro@codesourcery.com>
10104
10105 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10106 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10107 LONGEST uses.
10108 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10109 uses.
10110 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10111 uses with LONGEST uses.
10112
6a271cae
PA
101132010-06-14 Stan Shebs <stan@codesourcery.com>
10114 Pedro Alves <pedro@codesourcery.com>
10115
10116 Bytecode compiler.
10117
10118 * linux-x86-low.c: Include limits.h.
10119 (add_insns): New.
10120 (always_true): New.
10121 (EMIT_ASM): New.
10122 (EMIT_ASM32): New.
10123 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10124 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10125 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10126 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10127 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10128 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10129 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10130 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10131 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10132 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10133 (amd64_emit_void_call_2): New.
10134 (amd64_emit_ops): New.
10135 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10136 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10137 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10138 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10139 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10140 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10141 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10142 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10143 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10144 (i386_emit_stack_adjust, i386_emit_int_call_1)
10145 (i386_emit_void_call_2): New.
10146 (i386_emit_ops): New.
10147 (x86_emit_ops): New.
10148 (the_low_target): Install x86_emit_ops.
10149 * server.h (struct emit_ops): New.
10150 (get_raw_reg_func_addr): Declare.
10151 (current_insn_ptr, emit_error): Declare.
10152 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10153 (set_trace_state_variable_value): New defines.
10154 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10155 addr_get_trace_state_variable_value and
10156 addr_set_trace_state_variable_value.
10157 (symbol_list): New fields for get_raw_reg,
10158 get_trace_state_variable_value and set_trace_state_variable_value.
10159 (condfn): New typedef.
10160 (struct tracepoint): New field `compiled_cond'.
10161 (do_action_at_tracepoint): Clear compiled_cond.
10162 (get_trace_state_variable_value, set_trace_state_variable_value):
10163 Export in the IPA.
10164 (condition_true_at_tracepoint): If there's a compiled condition,
10165 run that.
10166 (current_insn_ptr, emit_error): New globals.
10167 (struct bytecode_address): New.
10168 (get_raw_reg_func_addr): New.
10169 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10170 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10171 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10172 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10173 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10174 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10175 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10176 (compile_tracepoint_condition, compile_bytecodes): New.
10177 * target.h (emit_ops): Forward declare.
10178 (struct target_ops): New field emit_ops.
10179 (target_emit_ops): New.
10180 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10181 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10182 * linux-low.c (linux_emit_ops): New.
10183 (linux_target_ops): Install it.
10184 * linux-low.h (struct linux_target_ops): New field emit_ops.
10185
92b72907
UW
101862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10187
10188 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10189 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10190
fa593d66
PA
101912010-06-01 Pedro Alves <pedro@codesourcery.com>
10192 Stan Shebs <stan@codesourcery.com>
10193
10194 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10195 (all): Depend on $(extra_libraries).
10196 (install-only): Install the IPA.
10197 (IPA_OBJS, IPA_LIB): New.
10198 (clean): Remove the IPA lib.
10199 (IPAGENT_CFLAGS): New.
10200 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10201 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10202 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10203 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10204 * configure.ac: Check for atomic builtins support in the compiler.
10205 (IPA_DEPFILES, extra_libraries): Define.
10206 * configure.srv (ipa_obj): Add description.
10207 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10208 (i[34567]86-*-linux*): Set ipa_obj.
10209 (x86_64-*-linux*): Set ipa_obj.
10210 * linux-low.c (stabilizing_threads): New.
10211 (supports_fast_tracepoints): New.
10212 (linux_detach): Stabilize threads before detaching.
10213 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10214 the lwp is either not stabilizing, or is moving out of a jump pad.
10215 (linux_fast_tracepoint_collecting): New.
10216 (maybe_move_out_of_jump_pad): New.
10217 (enqueue_one_deferred_signal): New.
10218 (dequeue_one_deferred_signal): New.
10219 (linux_wait_for_event_1): If moving out of a jump pad, defer
10220 pending signals to later.
10221 (linux_stabilize_threads): New.
10222 (linux_wait_1): Check if threads need moving out of jump pads, and
10223 do it if so.
10224 (stuck_in_jump_pad_callback): New.
10225 (move_out_of_jump_pad_callback): New.
10226 (lwp_running): New.
10227 (linux_resume_one_lwp): Handle moving out of jump pads.
10228 (linux_set_resume_request): Dequeue deferred signals.
10229 (need_step_over_p): Also step over fast tracepoint jumps.
10230 (start_step_over): Also uninsert fast tracepoint jumps.
10231 (finish_step_over): Also reinsert fast tracepoint jumps.
10232 (linux_install_fast_tracepoint_jump): New.
10233 (linux_target_ops): Install linux_stabilize_threads and
10234 linux_install_fast_tracepoint_jump_pad.
10235 * linux-low.h (linux_target_ops) <get_thread_area,
10236 install_fast_tracepoint_jump_pad>: New fields.
10237 (struct lwp_info) <collecting_fast_tracepoint,
10238 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10239 (linux_get_thread_area): Declare.
10240 * linux-x86-low.c (jump_insn): New.
10241 (x86_get_thread_area): New.
10242 (append_insns): New.
10243 (push_opcode): New.
10244 (amd64_install_fast_tracepoint_jump_pad): New.
10245 (i386_install_fast_tracepoint_jump_pad): New.
10246 (x86_install_fast_tracepoint_jump_pad): New.
10247 (the_low_target): Install x86_get_thread_area and
10248 x86_install_fast_tracepoint_jump_pad.
10249 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10250 (struct fast_tracepoint_jump): New.
10251 (fast_tracepoint_jump_insn): New.
10252 (fast_tracepoint_jump_shadow): New.
10253 (find_fast_tracepoint_jump_at): New.
10254 (fast_tracepoint_jump_here): New.
10255 (delete_fast_tracepoint_jump): New.
10256 (set_fast_tracepoint_jump): New.
10257 (uninsert_fast_tracepoint_jumps_at): New.
10258 (reinsert_fast_tracepoint_jumps_at): New.
10259 (set_breakpoint_at): Use write_inferior_memory.
10260 (uninsert_raw_breakpoint): Use write_inferior_memory.
10261 (check_mem_read): Mask out fast tracepoint jumps.
10262 (check_mem_write): Mask out fast tracepoint jumps.
10263 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10264 (set_fast_tracepoint_jump): Declare.
10265 (delete_fast_tracepoint_jump)
10266 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10267 (reinsert_fast_tracepoint_jumps_at): Declare.
10268 * regcache.c: Don't compile many functions when building the
10269 in-process agent library.
10270 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10271 the register buffer in the heap.
10272 (free_register_cache): If the register buffer isn't owned by the
10273 regcache, don't free it.
10274 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10275 pre-existing register caches.
10276 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10277 type.
10278 (convert_ascii_to_int): : Constify `from' parameter type.
10279 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10280 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10281 the needed buffer in-place.
10282 (relocate_instruction): New.
10283 * server.c (handle_query) <qSymbols>: If the target supports
10284 tracepoints, give it a chance of looking up symbols. Report
10285 support for fast tracepoints.
10286 (handle_status): Stabilize threads.
10287 (process_serial_event): Adjust.
10288 * server.h (struct fast_tracepoint_jump): Forward declare.
10289 (struct process_info) <fast_tracepoint_jumps>: New field.
10290 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10291 (decode_X_packet, decode_M_packet): Adjust.
10292 (relocate_instruction): Declare.
10293 (in_process_agent_loaded): Declare.
10294 (tracepoint_look_up_symbols): Declare.
10295 (struct fast_tpoint_collect_status): Declare.
10296 (fast_tracepoint_collecting): Declare.
10297 (force_unlock_trace_buffer): Declare.
10298 (handle_tracepoint_bkpts): Declare.
10299 (initialize_low_tracepoint)
10300 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10301 * target.h (struct target_ops) <stabilize_threads,
10302 install_fast_tracepoint_jump_pad>: New fields.
10303 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10304 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10305 [HAVE_STDINT_H]: Include stdint.h.
10306 (trace_debug_1): Rename to ...
10307 (trace_vdebug): ... this.
10308 (trace_debug): Rename to ...
10309 (trace_debug_1): ... this. Add `level' parameter.
10310 (trace_debug): New.
10311 (ATTR_USED, ATTR_NOINLINE): New.
10312 (IP_AGENT_EXPORT): New.
10313 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10314 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10315 (about_to_request_buffer_space, trace_buffer_is_full)
10316 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10317 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10318 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10319 (traceframe_write_count, traceframes_created)
10320 (trace_state_variables)
10321 New renaming defines.
10322 (struct ipa_sym_addresses): New.
10323 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10324 (symbol_list): New.
10325 (ipa_sym_addrs): New.
10326 (all_tracepoint_symbols_looked_up): New.
10327 (in_process_agent_loaded): New.
10328 (write_e_ipa_not_loaded): New.
10329 (maybe_write_ipa_not_loaded): New.
10330 (tracepoint_look_up_symbols): New.
10331 (debug_threads) [IN_PROCESS_AGENT]: New.
10332 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10333 (UNKNOWN_SIDE_EFFECTS): New.
10334 (stop_tracing): New.
10335 (flush_trace_buffer): New.
10336 (stop_tracing_bkpt): New.
10337 (flush_trace_buffer_bkpt): New.
10338 (read_inferior_integer): New.
10339 (read_inferior_uinteger): New.
10340 (read_inferior_data_pointer): New.
10341 (write_inferior_data_pointer): New.
10342 (write_inferior_integer): New.
10343 (write_inferior_uinteger): New.
10344 (struct collect_static_trace_data_action): Delete.
10345 (enum tracepoint_type): New.
10346 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10347 <actions_str, step_actions, step_actions_str>: Only include in
10348 GDBserver.
fa593d66
PA
10349 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10350 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10351 (tracepoints): Use IP_AGENT_EXPORT.
10352 (last_tracepoint): Don't include in the IPA.
10353 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10354 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10355 (alloced_trace_state_variables): New.
10356 (trace_state_variables): Use IP_AGENT_EXPORT.
10357 (traceframe_t): Delete unused variable.
10358 (circular_trace_buffer): Don't include in the IPA.
10359 (trace_buffer_start): Delete.
10360 (struct trace_buffer_control): New.
10361 (trace_buffer_free): Delete.
10362 (struct ipa_trace_buffer_control): New.
10363 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10364 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10365 New.
10366 (trace_buffer_ctrl): New.
10367 (TRACE_BUFFER_CTRL_CURR): New.
10368 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10369 Reimplement as macros.
10370 (trace_buffer_wrap): Delete.
10371 (traceframe_write_count, traceframe_read_count)
10372 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10373 (struct tracepoint_hit_ctx) <type>: New field.
10374 (struct fast_tracepoint_ctx): New.
10375 (memory_barrier): New.
10376 (cmpxchg): New.
10377 (record_tracepoint_error): Update atomically in the IPA.
10378 (clear_inferior_trace_buffer): New.
10379 (about_to_request_buffer_space): New.
10380 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10381 updating the same buffer.
10382 (add_tracepoint): Default the tracepoint's type to trap
10383 tracepoint, and orig_size to -1.
10384 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10385 internal variables.
10386 (create_trace_state_variable): New parameter `gdb'. Handle it.
10387 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10388 (cmd_qtdp): Handle fast tracepoints.
10389 (cmd_qtdv): Adjust.
10390 (max_jump_pad_size): New.
10391 (gdb_jump_pad_head): New.
10392 (get_jump_space_head): New.
10393 (claim_jump_space): New.
10394 (sort_tracepoints): New.
10395 (MAX_JUMP_SIZE): New.
10396 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10397 IPA.
10398 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10399 support. Upload fast traceframes, and delete internal IPA
10400 breakpoints.
10401 (stop_tracing_handler): New.
10402 (flush_trace_buffer_handler): New.
10403 (cmd_qtstop): Upload fast tracepoints.
10404 (response_tracepoint): Handle fast tracepoints.
10405 (tracepoint_finished_step): Upload fast traceframes. Set the
10406 tracepoint hit context's tracepoint type.
10407 (handle_tracepoint_bkpts): New.
10408 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10409 type. Add comment about fast tracepoints.
10410 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10411 non-existing action_str field.
10412 (get_context_regcache): Handle fast tracepoints.
10413 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10414 to the regcache.
10415 (fast_tracepoint_from_jump_pad_address): New.
10416 (fast_tracepoint_from_ipa_tpoint_address): New.
10417 (collecting_t): New.
10418 (force_unlock_trace_buffer): New.
10419 (fast_tracepoint_collecting): New.
10420 (collecting): New.
10421 (gdb_collect): New.
10422 (write_inferior_data_ptr): New.
10423 (target_tp_heap): New.
10424 (target_malloc): New.
10425 (download_agent_expr): New.
10426 (UALIGN): New.
10427 (download_tracepoints): New.
10428 (download_trace_state_variables): New.
10429 (upload_fast_traceframes): New.
10430 (IPA_FIRST_TRACEFRAME): New.
10431 (IPA_NEXT_TRACEFRAME_1): New.
10432 (IPA_NEXT_TRACEFRAME): New.
10433 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10434 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10435 (gdb_jump_pad_buffer_end): New.
10436 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10437 (initialize_tracepoint): Adjust.
10438 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10439 buffer. Initialize the low module.
10440 * utils.c (PREFIX, TOOLNAME): New.
10441 (malloc_failure): Use PREFIX.
10442 (error): In the IPA, an error causes an exit.
10443 (fatal, warning): Use PREFIX.
10444 (internal_error): Use TOOLNAME.
10445 (NUMCELLS): Increase to 10.
10446 * configure, config.in: Regenerate.
10447
d149dd1d
PA
104482010-06-01 Pedro Alves <pedro@codesourcery.com>
10449
10450 * server.c (handle_query) <qSupported>: Do two passes over the
10451 qSupported string to avoid nesting strtok.
10452
f6528abd
JK
104532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10454
10455 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10456 (CDEPS): New.
10457 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10458 -Wl,--dynamic-list.
10459 * configure: Regenerate.
10460 * proc-service.list: New.
10461
ca2a87a0
JK
104622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10463
10464 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10465 New comment.
10466
363a6e9f
OS
104672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10468
10469 * gdbreplay.c (remote_open): Check error return from socket() call by
10470 its equality to -1 not by it being negative.
10471 * remote-utils.c (remote_open): Likewise.
10472
d23b6cb1
PA
104732010-05-23 Pedro Alves <pedro@codesourcery.com>
10474
10475 * config.h: Regenerate.
10476
28d3cf85
MK
104772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10478
10479 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10480 doesn't provide PTRACE_GET_THREAD_AREA.
10481
fea36a59
MK
104822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10483
10484 * linux-m68k-low.c: Include <asm/ptrace.h>
10485 (ps_get_thread_area): Implement.
10486
24b066ba
DE
104872010-05-03 Doug Evans <dje@google.com>
10488
10489 * event-loop.c (struct callback_event): New struct.
10490 (callback_list): New global.
10491 (append_callback_event, delete_callback_event): New functions.
10492 (process_callback): New function.
10493 (start_event_loop): Call it.
10494 * remote-utils.c (NOT_SCHEDULED): Define.
10495 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10496 moved out of readchar.
10497 (readchar): Rewrite. Call reschedule before returning.
10498 (reset_readchar): New function.
10499 (remote_close): Call it.
10500 (process_remaining, reschedule): New functions.
10501 * server.h (callback_handler_func): New typedef.
10502 (append_callback_event, delete_callback_event): Declare.
10503
9836d6ea
PA
105042010-05-03 Pedro Alves <pedro@codesourcery.com>
10505
10506 * proc-service.c (ps_pglobal_lookup): Use
10507 thread_db_look_up_one_symbol.
10508 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10509 parameter. Use it instead of all_symbols_looked_up.
10510 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10511 field.
10512 (all_symbols_looked_up): Don't declare.
10513 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10514 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10515 field.
10516 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10517 Set all_symbols_looked_up here.
10518 (thread_db_look_up_one_symbol): New.
10519 (thread_db_get_tls_address): Adjust.
10520 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10521 thread_db object on the heap, and tentatively set it in the
10522 process structure.
10523 (thread_db_init): Don't set all_symbols_looked_up here.
10524 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10525
7984d532
PA
105262010-05-03 Pedro Alves <pedro@codesourcery.com>
10527
10528 * linux-low.c (linux_kill, linux_detach): Adjust.
10529 (status_pending_p_callback): Remove redundant statement. Check
10530 for !TARGET_WAITIKIND_IGNORE, instead of
10531 TARGET_WAITKIND_STOPPED.
10532 (handle_tracepoints): Make sure LWP is locked. Adjust.
10533 (linux_wait_for_event_1): Adjust.
10534 (linux_cancel_breakpoints): New.
10535 (unsuspend_one_lwp): New.
10536 (unsuspend_all_lwps): New.
10537 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10538 (send_sigstop_callback): Change return type to int, add new
10539 `except' parameter and handle it.
10540 (suspend_and_send_sigstop_callback): New.
10541 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10542 pass them down. If SUSPEND, also increment the lwp's suspend
10543 count.
10544 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10545 (need_step_over_p): Don't consider suspended LWPs.
10546 (start_step_over): Adjust.
10547 (proceed_one_lwp): Change return type to int, add new `except'
10548 parameter and handle it.
10549 (unsuspend_and_proceed_one_lwp): New.
10550 (proceed_all_lwps): Use find_inferior instead of
10551 for_each_inferior.
10552 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10553 also decrement the suspend count of LWPs. Pass `except' down,
10554 instead of hacking its suspend count.
10555 (linux_pause_all): Add `freeze' parameter. Adjust.
10556 (linux_unpause_all): New.
10557 (linux_target_ops): Install linux_unpause_all.
10558 * server.c (handle_status): Adjust.
10559 * target.h (struct target_ops): New fields `unpause_all' and
10560 `cancel_breakpoints'. Add new parameter to `pause_all'.
10561 (pause_all): Add new `freeze' parameter.
10562 (unpause_all): New.
10563 (cancel_breakpoints): New.
10564 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10565 cancel breakpoints.
10566 (cmd_qtstart): Pause threads.
10567 (stop_tracing): Pause threads, and cancel breakpoints.
10568 * win32-low.c (win32_target_ops): Adjust.
10569
e471f25b
PA
105702010-05-03 Pedro Alves <pedro@codesourcery.com>
10571
10572 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10573 the inferior right away from here...
10574 (linux_wait_1): ... to here, and adjust to check the thread's
10575 last_resume_kind instead of the lwp's step or stop_expected flags.
10576
1915ef4f
PA
105772010-05-02 Pedro Alves <pedro@codesourcery.com>
10578
10579 * README: Use consistent `GDB' and `GDBserver' spellings.
10580
f9e39928
PA
105812010-05-02 Pedro Alves <pedro@codesourcery.com>
10582
10583 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10584 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10585 (linux_detach_one_lwp): Assume the lwp is stopped.
10586 (any_thread_of): Delete.
10587 (linux_detach): Stop all lwps here. Don't blindly delete all
10588 breakpoints.
10589 (delete_lwp_callback): New.
10590 (linux_mourn): Delete all lwps of the process that is gone.
10591 (linux_wait_1): Don't delete the last lwp of the process here.
10592 * mem-break.h (mark_breakpoints_out): Declare.
10593 * mem-break.c (mark_breakpoints_out): New.
10594 (free_all_breakpoints): Use it.
10595 * server.c (handle_target_event): If the process is gone, mark
10596 breakpoints out.
10597 * thread-db.c (struct thread_db) <create_bp>: New field.
10598 (thread_db_enable_reporting): Fix prototype. Store a thread event
10599 breakpoint reference in the thread_db struct.
10600 (thread_db_load_search): Clear the thread_db object.
10601 (try_thread_db_load_1): Ditto.
10602 (switch_to_process): New.
10603 (disable_thread_event_reporting): Use it.
10604 (remove_thread_event_breakpoints): New.
10605 (thread_db_detach, thread_db_mourn): Use it.
10606
1e7fc18c
PA
106072010-05-01 Pedro Alves <pedro@codesourcery.com>
10608
10609 * linux-low.c (linux_enable_event_reporting): New.
10610 (linux_wait_for_event_1, handle_extended_wait): Use it.
10611
02fc4de7
PA
106122010-04-30 Pedro Alves <pedro@codesourcery.com>
10613
10614 * linux-low.c (linux_kill_one_lwp, linux_kill)
10615 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10616 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10617 SIGSTOP even if the LWP is stopped.
10618 (send_sigstop_callback): New.
10619 (stop_all_lwps): Use send_sigstop_callback instead.
10620 (linux_resume_one_thread): Adjust.
10621 (proceed_one_lwp): Still proceed an LWP that the client has
10622 requested to stop, if we haven't reported it as stopped yet. Make
10623 sure that LWPs the client want stopped, have a pending SIGSTOP.
10624
bc3b5632
DE
106252010-04-26 Doug Evans <dje@google.com>
10626
ae1ada35
DE
10627 * server.c (handle_general_set): Make static.
10628
bc3b5632
DE
10629 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10630 Print received char after testing for error/eof instead of before.
10631 (input_interrupt): Tweak comment.
10632
65730243
DE
106332010-04-23 Doug Evans <dje@google.com>
10634
10635 * server.c (start_inferior): Print inferior argv if --debug.
10636
a8ae7dc0
AR
106372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10638
10639 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10640 * nto-x86-low.c: Include server.h
10641
1c07cc19
PM
106422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10643
10644 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10645 be consistent with other sources of this directory.
10646 (init_registers_amd64): Correct name of source file of this function
10647 in the comment.
10648
e0a61e09
PM
106492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10650
10651 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10652 64-bit executables.
10653
54709339
PM
106542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10655
10656 * win32-i386-low.c: Add 64-bit support.
10657 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10658 (init_registers_amd64): Declare.
10659 (mappings): Add 64-bit version of array.
10660 (init_windows_x86): New function.
10661 (the_low_target): Change init_arch field to init_windows_x86.
10662
e8f0053d
PM
106632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10664
10665 * win32-low.c: Adapt to support also 64-bit architecture.
10666 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10667 (get_image_name): Use SIZE_T type for local variable `done'.
10668 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10669 (toolhelp_get_dll_name): Idem.
10670 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10671 Use uintptr_t typecast to avoid warning.
10672 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10673 (handle_exception): Use phex_nz to avoid warning.
10674 (win32_wait): Remove unused local variable `process'.
10675
c481e77e
PM
106762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10677
10678 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10679 `amd64-avx.o'.
10680
12ea4b69
PM
106812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10682
10683 * configure.ac: Use `ws2_32' library for srv_mingw.
10684 * configure: Regenerate.
10685 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10686 * remote-utils.c: Likewise.
10687
f6d1620c
L
106882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10689
10690 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10691 if __x86_64__ is defined.
10692
8e642873
PM
106932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10694
10695 * configure: Regenerate.
10696
711e434b
PM
106972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10698
10699 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10700 * target.h (target_ops): New get_tib_address field.
10701 * win32-low.h (win32_thread_info): Add thread_local_base field.
10702 * win32-low.c (child_add_thread): Add tlb argument.
10703 Set thread_local_base field to TLB.
10704 (get_child_debug_event): Adapt to child_add_thread change.
10705 (win32_get_tib_address): New function.
10706 (win32_target_ops): Set get_tib_address field to
10707 win32_get_tib_address.
10708 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10709
505106cd
PA
107102010-04-12 Pedro Alves <pedro@codesourcery.com>
10711
505106cd
PA
10712 * linux-low.c (linux_mourn): Also remove the process.
10713 * server.c (handle_target_event): Don't remove the process here.
10714 * nto-low.c (nto_mourn): New.
10715 (nto_target_ops): Install it.
10716 * spu-low.c (spu_mourn): New.
10717 (spu_target_ops): Install it.
10718 * win32-low.c (win32_mourn): New.
10719 (win32_target_ops): Install it.
10720
e8470a06
PA
107212010-04-12 Pedro Alves <pedro@codesourcery.com>
10722
10723 * server.h (buffer_xml_printf): Remove redundant `;'.
10724
45ba0d02
PA
107252010-04-12 Pedro Alves <pedro@codesourcery.com>
10726
10727 * regcache.c (set_register_cache): Invalidate regcaches before
10728 changing the register cache layout.
10729 (regcache_invalidate_one): Allow a NULL regcache.
10730 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10731 regcaches before changing the register cache layout or the target
10732 regsets.
10733
59e04013
L
107342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10735
10736 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10737 variable warning on Linux/x86-64.
10738
8336d594
PA
107392010-04-11 Pedro Alves <pedro@codesourcery.com>
10740
10741 GDBserver disconnected tracing support.
10742
10743 * linux-low.c (linux_remove_process): Delete.
10744 (add_lwp): Don't set last_resume_kind here.
10745 (linux_kill): Use `mourn'.
10746 (linux_detach): Use `thread_db_detach', and `mourn'.
10747 (linux_mourn): New.
10748 (linux_attach_lwp_1): Adjust comment.
10749 (linux_attach): last_resume_kind moved the thread_info; adjust.
10750 (status_pending_p_callback): Adjust.
10751 (linux_wait_for_event_1): Adjust.
10752 (count_events_callback, select_singlestep_lwp_callback)
10753 (select_event_lwp_callback, cancel_breakpoints_callback)
10754 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10755 (proceed_one_lwp): Adjust.
10756 (linux_async): Add debug output.
10757 (linux_thread_stopped): New.
10758 (linux_pause_all): New.
10759 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10760 linux_pause_all.
10761 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10762 (thread_db_free): Delete declaration.
10763 (thread_db_detach, thread_db_mourn): Declare.
10764 * thread-db.c (thread_db_init): Use thread_db_mourn.
10765 (thread_db_free): Delete, split in two.
10766 (disable_thread_event_reporting): New.
10767 (thread_db_detach): New.
10768 (thread_db_mourn): New.
10769
10770 * server.h (struct thread_info) <last_resume_kind>: New field.
10771 <attached>: Add comment.
10772 <gdb_detached>: New field.
10773 (handler_func): Change return type to int.
10774 (handle_serial_event, handle_target_event): Ditto.
10775 (gdb_connected): Declare.
10776 (tracing): Delete.
10777 (disconnected_tracing): Declare.
10778 (stop_tracing): Declare.
10779
10780 * server.c (handle_query) <qSupported>: Report support for
10781 disconnected tracing.
10782 (queue_stop_reply_callback): Account for running threads.
10783 (gdb_wants_thread_stopped): New.
10784 (gdb_wants_all_threads_stopped): New.
10785 (gdb_reattached_process): New.
10786 (handle_status): Clear the `gdb_detached' flag of all processes.
10787 In all-stop, stop all threads.
10788 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10789 (process_serial_event): If the remote connection breaks, or if an
10790 exit was forced with "monitor exit", force an event loop exit.
10791 Handle disconnected tracing on detach.
10792 (handle_serial_event): Adjust.
10793 (handle_target_event): If GDB isn't connected, forward events back
10794 to the inferior, unless the last process exited, in which case,
10795 exit gdbserver. Adjust interface.
10796
10797 * remote-utils.c (remote_open): Don't block in accept. Instead
10798 register an event loop source on the listen socket file
10799 descriptor. Refactor bits into ...
10800 (listen_desc): ... this new global.
10801 (gdb_connected): ... this new function.
10802 (enable_async_notification): ... this new function.
10803 (handle_accept_event): ... this new function.
10804 (remote_close): Clear remote_desc.
10805
10806 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10807
10808 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10809 New fields.
10810 (mourn_inferior): Define.
10811 (target_process_qsupported): Avoid the dangling else problem.
10812 (thread_stopped): Define.
10813 (pause_all): Define.
10814 (target_waitstatus_to_string): Declare.
10815 * target.c (target_waitstatus_to_string): New.
10816
10817 * tracepoint.c (tracing): Make extern.
10818 (disconnected_tracing): New.
10819 (stop_tracing): Make extern. Handle tracing stops due to GDB
10820 disconnecting.
10821 (cmd_qtdisconnected): New.
10822 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10823 (handle_tracepoint_general_set): Handle QTDisconnected.
10824
10825 * event-loop.c (event_handler_func): Change return type to int.
10826 (process_event): Bail out if the event handler wants the event
10827 loop to stop.
10828 (handle_file_event): Ditto.
10829 (start_event_loop): Bail out if the event handler wants the event
10830 loop to stop.
10831
10832 * nto-low.c (nto_target_ops): Adjust.
10833 * spu-low.c (spu_wait): Don't remove the process here.
10834 (spu_target_ops): Adjust.
10835 * win32-low.c (win32_wait): Don't remove the process here.
10836 (win32_target_ops): Adjust.
10837
5d267c4c
PA
108382010-04-11 Pedro Alves <pedro@codesourcery.com>
10839
10840 * regcache.c (realloc_register_cache): Invalidate inferior's
10841 regcache before recreating it.
10842
623ccd72
PA
108432010-04-09 Pedro Alves <pedro@codesourcery.com>
10844
10845 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10846
219f2f23
PA
108472010-04-09 Stan Shebs <stan@codesourcery.com>
10848 Pedro Alves <pedro@codesourcery.com>
10849
10850 * server.h (LONGEST): New.
10851 (struct thread_info) <while_stepping>: New field.
10852 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10853 Declare.
10854 (initialize_tracepoint, handle_tracepoint_general_set)
10855 (handle_tracepoint_query, tracepoint_finished_step)
10856 (tracepoint_was_hit, release_while_stepping_state_list):
10857 (current_traceframe): Declare.
10858 * server.c (handle_general_set): Handle tracepoint packets.
10859 (read_memory): New.
10860 (write_memory): New.
10861 (handle_search_memory_1): Use read_memory.
10862 (handle_query): Report support for conditional tracepoints, trace
10863 state variables, and tracepoint sources. Handle tracepoint
10864 queries.
10865 (main): Initialize the tracepoints module.
10866 (process_serial_event): Handle traceframe reads/writes.
10867
10868 * linux-low.c (handle_tracepoints): New.
10869 (linux_wait_1): Call it.
10870 (linux_resume_one_lwp): Handle while-stepping.
10871 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10872 (linux_target_ops): Install them.
10873 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10874 New field.
10875 * linux-x86-low.c (x86_supports_tracepoints): New.
10876 (the_low_target). Install it.
10877
10878 * mem-break.h (delete_breakpoint): Declare.
10879 * mem-break.c (delete_breakpoint): Make external.
10880
10881 * target.h (struct target_ops): Add `supports_tracepoints',
10882 `read_pc', and `write_pc' fields.
10883 (target_supports_tracepoints): Define.
10884 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10885 (phex_nz): New.
10886
10887 * regcache.h (struct regcache) <registers_owned>: New field.
10888 (init_register_cache, regcache_cpy): Declare.
10889 (regcache_read_pc, regcache_write_pc): Declare.
10890 (register_cache_size): Declare.
10891 (supply_regblock): Declare.
10892 * regcache.c (init_register_cache): New.
10893 (new_register_cache): Use it.
10894 (regcache_cpy): New.
10895 (register_cache_size): New.
10896 (supply_regblock): New.
10897 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10898
219f2f23
PA
10899 * tracepoint.c: New.
10900
10901 * Makefile.in (OBS): Add tracepoint.o.
10902 (tracepoint.o): New rule.
10903
3a13a53b
L
109042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10905
10906 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10907 (i386-mmx.o): New.
10908 (i386-mmx.c): Likewise.
10909 (i386-mmx-linux.o): Likewise.
10910 (i386-mmx-linux.c): Likewise.
10911
10912 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10913 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10914 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10915 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10916
10917 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10918 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10919 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10920
1570b33e
L
109212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10922
10923 * Makefile.in (clean): Updated.
10924 (i386-avx.o): New.
10925 (i386-avx.c): Likewise.
10926 (i386-avx-linux.o): Likewise.
10927 (i386-avx-linux.c): Likewise.
10928 (amd64-avx.o): Likewise.
10929 (amd64-avx.c): Likewise.
10930 (amd64-avx-linux.o): Likewise.
10931 (amd64-avx-linux.c): Likewise.
10932
10933 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10934 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10935 (srv_amd64_regobj): Add amd64-avx.o.
10936 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10937 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10938 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10939 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10940 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10941 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10942 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10943
10944 * i387-fp.c: Include "i386-xstate.h".
10945 (i387_xsave): New.
10946 (i387_cache_to_xsave): Likewise.
10947 (i387_xsave_to_cache): Likewise.
10948 (x86_xcr0): Likewise.
10949
10950 * i387-fp.h (i387_cache_to_xsave): Likewise.
10951 (i387_xsave_to_cache): Likewise.
10952 (x86_xcr0): Likewise.
10953
10954 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10955 * linux-crisv32-low.c (target_regsets): Likewise.
10956 * linux-m68k-low.c (target_regsets): Likewise.
10957 * linux-mips-low.c (target_regsets): Likewise.
10958 * linux-ppc-low.c (target_regsets): Likewise.
10959 * linux-s390-low.c (target_regsets): Likewise.
10960 * linux-sh-low.c (target_regsets): Likewise.
10961 * linux-sparc-low.c (target_regsets): Likewise.
10962 * linux-xtensa-low.c (target_regsets): Likewise.
10963
10964 * linux-low.c: Include <sys/uio.h>.
10965 (regsets_fetch_inferior_registers): Support nt_type.
10966 (regsets_store_inferior_registers): Likewise.
10967 (linux_process_qsupported): New.
10968 (linux_target_ops): Add linux_process_qsupported.
10969
10970 * linux-low.h (regset_info): Add nt_type.
10971 (linux_target_ops): Add process_qsupported.
10972
10973 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10974 and <sys/uio.h>.
10975 (init_registers_i386_avx_linux): New.
10976 (init_registers_amd64_avx_linux): Likewise.
10977 (xmltarget_i386_linux_no_xml): Likewise.
10978 (xmltarget_amd64_linux_no_xml): Likewise.
10979 (PTRACE_GETREGSET): Likewise.
10980 (PTRACE_SETREGSET): Likewise.
10981 (x86_fill_xstateregset): Likewise.
10982 (x86_store_xstateregset): Likewise.
10983 (use_xml): Likewise.
10984 (x86_linux_update_xmltarget): Likewise.
10985 (x86_linux_process_qsupported): Likewise.
10986 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10987 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10988 init_registers_i386_linux here. Call
10989 x86_linux_update_xmltarget.
10990 (the_low_target): Add x86_linux_process_qsupported.
10991
10992 * server.c (handle_query): Call target_process_qsupported.
10993
10994 * target.h (target_ops): Add process_qsupported.
10995 (target_process_qsupported): New.
10996
fc7238bb
PA
109972010-04-03 Pedro Alves <pedro@codesourcery.com>
10998
10999 * inferiors.c (add_thread): Set last_status kind to
11000 TARGET_WAITKIND_IGNORE.
11001 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11002 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11003 (linux_wait_1): Move `thread' local definition to block that uses
11004 it. Don't NULL initialize `event_child'.
11005 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11006 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11007 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11008
bdabb078
PA
110092010-04-01 Pedro Alves <pedro@codesourcery.com>
11010
11011 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11012 an extended waitstatus, or by a watchpoint.
11013 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11014 thread was stepping or has been stopped by a watchpoint.
11015
d3bbe7a0
PA
110162010-04-01 Pedro Alves <pedro@codesourcery.com>
11017
11018 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11019 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11020 of another, then delete the previous, and validate all
11021 breakpoints.
11022 (validate_inserted_breakpoint): New.
11023 (delete_disabled_breakpoints): New.
11024 (validate_breakpoints): New.
11025 (check_mem_read): Validate breakpoints before trusting their
11026 shadow. Delete disabled breakpoints.
11027 (check_mem_write): Validate breakpoints before trusting they
11028 should be inserted. Delete disabled breakpoints.
11029 * mem-break.h (validate_breakpoints):
11030 * server.c (handle_query): Validate breakpoints when we see a
11031 qSymbol query.
11032
8b07ae33
PA
110332010-04-01 Pedro Alves <pedro@codesourcery.com>
11034
11035 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11036 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11037 if we could tell there's a GDB breakpoint at stop_pc.
11038 (need_step_over_p): Don't do a step over if we find a GDB
11039 breakpoint at the resume PC.
11040
11041 * mem-break.c (struct raw_breakpoint): New.
11042 (enum bkpt_type): New type `gdb_breakpoint'.
11043 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11044 fields. New field `raw'.
11045 (find_raw_breakpoint_at): New.
11046 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11047 breakpoint instead.
11048 (set_breakpoint_at): Adjust.
11049 (delete_raw_breakpoint): New.
11050 (release_breakpoint): New.
11051 (delete_breakpoint): Rename to...
11052 (delete_breakpoint_1): ... this. Add proc parameter. Use
11053 release_breakpoint. Return ENOENT.
11054 (delete_breakpoint): Reimplement.
11055 (find_breakpoint_at): Delete.
11056 (find_gdb_breakpoint_at): New.
11057 (delete_breakpoint_at): Delete.
11058 (set_gdb_breakpoint_at): New.
11059 (delete_gdb_breakpoint_at): New.
11060 (gdb_breakpoint_here): New.
11061 (set_reinsert_breakpoint): Use release_breakpoint.
11062 (uninsert_breakpoint): Rename to ...
11063 (uninsert_raw_breakpoint): ... this.
11064 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11065 (reinsert_raw_breakpoint): Change parameter type to
11066 raw_breakpoint.
11067 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11068 instead.
11069 (check_breakpoints): Adjust. Use release_breakpoint.
11070 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11071 (breakpoint_inserted_here): Ditto.
11072 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11073 Don't trust the breakpoint's shadow if it is not inserted.
11074 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11075 (delete_all_breakpoints): Adjust.
11076 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11077 use delete_breakpoint_1.
11078
11079 * mem-break.h (breakpoints_supported): Delete declaration.
11080 (set_gdb_breakpoint_at): Declare.
11081 (gdb_breakpoint_here): Declare.
11082 (delete_breakpoint_at): Delete.
11083 (delete_gdb_breakpoint_at): Declare.
11084
11085 * server.h (struct raw_breakpoint): Forward declare.
11086 (struct process_info): New field `raw_breakpoints'.
11087
11088 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11089 breakpoints.
11090
6bf5e0ba
PA
110912010-03-24 Pedro Alves <pedro@codesourcery.com>
11092
11093 * linux-low.c (status_pending_p_callback): Fix comment.
11094 (linux_wait_for_event_1): Move most of the internal breakpoint
11095 handling from here...
11096 (linux_wait_1): ... to here.
11097 (count_events_callback): New.
11098 (select_singlestep_lwp_callback): New.
11099 (select_event_lwp_callback): New.
11100 (cancel_breakpoints_callback): New.
11101 (select_event_lwp): New.
11102 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11103 priority to all LWPs that have had events that should be reported
11104 to the client. Cancel breakpoints when about to reporting the
11105 event to the client, not while stopping lwps. No longer cancel
11106 finished single-steps here.
11107 (cancel_finished_single_step): Delete.
11108 (cancel_finished_single_steps): Delete.
11109
414a389f
PA
111102010-03-24 Pedro Alves <pedro@codesourcery.com>
11111
11112 * mem-break.c (enum bkpt_type): New.
11113 (struct breakpoint): New field `type'.
11114 (set_breakpoint_at): Change return type to struct breakpoint
11115 pointer. Set type to `other_breakpoint' by default.
11116 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11117 in the breakpoint list.
11118 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11119 (reinsert_breakpoint): Rename to ...
11120 (reinsert_raw_breakpoint): ... this.
11121 (reinsert_breakpoints_at): Adjust.
11122 * mem-break.h (struct breakpoint): Declare.
11123 (set_breakpoint_at): Change return type to struct breakpoint
11124 pointer.
11125
2280c721
PA
111262010-03-24 Pedro Alves <pedro@codesourcery.com>
11127
11128 * server.c (handle_query): Assign, not compare.
11129
d50171e4
PA
111302010-03-24 Pedro Alves <pedro@codesourcery.com>
11131
11132 Teach linux gdbserver to step-over-breakpoints.
11133
11134 * linux-low.c (can_hardware_single_step): New.
11135 (supports_breakpoints): New.
11136 (handle_extended_wait): If stopping threads, read the stop pc of
11137 the new cloned LWP.
11138 (get_pc): New.
11139 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11140 low target doesn't support retrieving the PC.
11141 (add_lwp): Set last_resume_kind to resume_continue.
11142 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11143 (linux_attach): Don't clear stop_expected. Set the lwp's
11144 last_resume_kind to resume_stop.
11145 (linux_detach_one_lwp): Don't check for removed breakpoints.
11146 (check_removed_breakpoint): Delete.
11147 (status_pending_p): Rename to ...
11148 (status_pending_p_callback): ... this. Don't check for removed
11149 breakpoints. Don't consider threads that are stopped from GDB's
11150 perspective.
11151 (linux_wait_for_lwp): Always read the stop_pc here.
11152 (cancel_breakpoint): New.
11153 (step_over_bkpt): New global.
11154 (linux_wait_for_event_1): Implement stepping over breakpoints.
11155 (gdb_wants_lwp_stopped): New.
11156 (gdb_wants_all_stopped): New.
11157 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11158 single-step traps here. Store the thread's last reported target
11159 wait status.
11160 (send_sigstop): Don't clear stop_expected. Always set it,
11161 instead.
11162 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11163 (cancel_finished_single_step): New.
11164 (cancel_finished_single_steps): New.
11165 (wait_for_sigstop): Don't cancel finished single-step traps here.
11166 (linux_resume_one_lwp): Don't check for removed breakpoints.
11167 Don't set `step' on non-hardware step archs.
11168 (linux_set_resume_request): Ignore resume_stop requests if already
11169 stopping or stopped. Set the lwp's last_resume_kind.
11170 (resume_status_pending_p): Don't check for removed breakpoints.
11171 (need_step_over_p): New.
11172 (start_step_over): New.
11173 (finish_step_over): New.
11174 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11175 requests. Clear the thread's last reported target waitstatus.
11176 Don't use the `suspended' flag. Don't consider pending breakpoints.
11177 (linux_resume): Start a step-over if necessary.
11178 (proceed_one_lwp): New.
11179 (proceed_all_lwps): New.
11180 (unstop_all_lwps): New.
11181 * linux-low.h (struct lwp_info): Rewrite comment for the
11182 `suspended' flag. Add the `stop_pc' field. Delete the
11183 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11184 Add `'last_resume_kind' and `need_step_over' fields.
11185 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11186 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11187 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11188 (set_raw_breakpoint_at): New.
11189 (set_breakpoint_at): Rewrite to use it.
11190 (reinsert_breakpoint_handler): Delete.
11191 (set_reinsert_breakpoint): New.
11192 (reinsert_breakpoint_by_bp): Delete.
11193 (delete_reinsert_breakpoints): New.
11194 (uninsert_breakpoint): Rewrite.
11195 (uninsert_breakpoints_at): New.
11196 (reinsert_breakpoint): Rewrite.
11197 (reinsert_breakpoints_at): New.
11198 (check_breakpoints): Rewrite.
11199 (breakpoint_here): New.
11200 (breakpoint_inserted_here): New.
11201 (check_mem_read): Adjust.
11202 * mem-break.h (breakpoints_supported, breakpoint_here)
11203 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11204 (reinsert_breakpoint_by_bp): Delete declaration.
11205 (delete_reinsert_breakpoints): Declare.
11206 (reinsert_breakpoint): Delete declaration.
11207 (reinsert_breakpoints_at): Declare.
11208 (uninsert_breakpoint): Delete declaration.
11209 (uninsert_breakpoints_at): Declare.
11210 (check_breakpoints): Adjust prototype.
11211 * server.h: Adjust include order.
11212 (struct thread_info): Declare here. Add a `last_status' field.
11213
30ba68cb
MS
112142010-03-23 Michael Snyder <msnyder@vmware.com>
11215
11216 * server.c (crc32): New function.
11217 (handle_query): Add handling for 'qCRC:' request.
11218
b9a881c2
PA
112192010-03-23 Pedro Alves <pedro@codesourcery.com>
11220
11221 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11222 lwp had been stopped by a watchpoint.
11223
e92d13d5
PA
112242010-03-16 Pedro Alves <pedro@codesourcery.com>
11225
11226 * server.h (internal_error): Declare.
11227 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11228 * utils.c (internal_error): New function.
11229
64daa791
AS
112302010-03-15 Andreas Schwab <schwab@redhat.com>
11231
11232 * configure.srv: Fix typo setting srv_regobj.
11233
f52cd8cd
PA
112342010-03-15 Pedro Alves <pedro@codesourcery.com>
11235
11236 * linux-low.c (fetch_register): Avoid passing a non string literal
11237 format to `error'.
11238 (usr_store_inferior_registers): Ditto.
11239
93ae6fdc
PA
112402010-03-14 Pedro Alves <pedro@codesourcery.com>
11241
11242 * linux-low.c (linux_write_memory): Bail out early if peeking
11243 memory failed.
11244
c3adc08c
PA
112452010-03-14 Pedro Alves <pedro@codesourcery.com>
11246
11247 * linux-low.h (struct lwp_info): New fields
11248 `stopped_by_watchpoint' and `stopped_data_address'.
11249 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11250 here, and cache them in the lwp object.
11251 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11252 directly.
11253 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11254 field.
11255 (linux_stopped_by_watchpoint): Rewrite.
11256 (linux_stopped_data_address): Rewrite.
11257
bce522a2
PA
112582010-03-06 Simo Melenius <simo.melenius@iki.fi>
11259
11260 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11261 switching the current inferior, not before.
11262
90884b2b
L
112632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11264
11265 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11266 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11267 i386-linux.c and amd64-linux.c.
11268 (reg-i386.o): Removed.
11269 (reg-i386.c): Likewise.
11270 (reg-i386-linux.o): Likewise.
11271 (reg-i386-linux.c): Likewise.
11272 (reg-x86-64.o): Likewise.
11273 (reg-x86-64.c): Likewise.
11274 (reg-x86-64-linux.o): Likewise.
11275 (reg-x86-64-linux.c): Likewise.
11276 (i386.o): New.
11277 (i386.c): Likewise.
11278 (i386-linux.o): Likewise.
11279 (i386-linux.c): Likewise.
11280 (amd64.o): Likewise.
11281 (amd64.c): Likewise.
11282 (amd64-linux.o): Likewise.
11283 (amd64-linux.c): Likewise.
11284
11285 * configure.srv (srv_i386_regobj): New.
11286 (srv_i386_linux_regobj): Likewise.
11287 (srv_amd64_regobj): Likewise.
11288 (srv_amd64_linux_regobj): Likewise.
11289 (srv_i386_32bit_xmlfiles): Likewise.
11290 (srv_i386_64bit_xmlfiles): Likewise.
11291 (srv_i386_xmlfiles): Likewise.
11292 (srv_amd64_xmlfiles): Likewise.
11293 (srv_i386_linux_xmlfiles): Likewise.
11294 (srv_amd64_linux_xmlfiles): Likewise.
11295 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11296 srv_xmlfiles to $srv_i386_xmlfiles.
11297 (i[34567]86-*-mingw32ce*): Likewise.
11298 (i[34567]86-*-mingw*): Likewise.
11299 (i[34567]86-*-nto*): Likewise.
11300 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11301 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11302 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11303 (x86_64-*-linux*): Likewise.
11304
11305 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11306 (init_registers_amd64_linux): New.
11307 (x86_arch_setup): Replace init_registers_x86_64_linux with
11308 init_registers_amd64_linux.
11309
193f13e6
MK
113102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11311
11312 * configure.ac: Check for libdl. If it is not available link against
11313 static libthread_db.
11314 * configure: Regenerate.
11315
85d721b8
PA
113162010-02-22 Pedro Alves <pedro@codesourcery.com>
11317
11318 PR9605
11319
11320 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11321 handing a read watchpoint.
11322 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11323
6076632b
DE
113242010-02-12 Doug Evans <dje@google.com>
11325
11326 * linux-low.c (linux_supports_tracefork_flag): Document.
11327 (linux_look_up_symbols): Add comment.
11328
3327ccf7
L
113292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11330
11331 * regcache.c (supply_register): Clear regcache if buf is NULL.
11332
0718675c 113332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11334 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11335
11336 * inferiors.c (find_inferior): Add function documentation.
11337 (unloaded_dll): Handle the case where the unloaded dll has not
11338 been previously registered in the dll list.
11339
177321bd
DJ
113402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11341
11342 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11343 (thumb2_breakpoint): New.
11344 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11345
2b009048
DJ
113462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11347
11348 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11349 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11350 breakpoints.
11351
3be029c7
PA
113522010-01-21 Pedro Alves <pedro@codesourcery.com>
11353
11354 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11355
18f5de3b
JK
113562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11357
11358 * linux-s390-low.c (s390_collect_ptrace_register)
11359 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11360
3743bb4f
DE
113612010-01-21 Doug Evans <dje@google.com>
11362
14ce3065
DE
11363 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11364 (PTRACE_ARG4_TYPE): New macro.
11365 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11366 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11367 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11368 (usr_store_inferior_registers): Ditto.
11369 (linux_read_memory, linux_write_memory): Ditto.
11370 (linux_test_for_tracefork): Ditto.
11371
3743bb4f
DE
11372 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11373 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11374
8b315be5
PA
113752010-01-21 Pedro Alves <pedro@codesourcery.com>
11376
11377 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11378 target.
11379
85492558
PA
113802010-01-21 Pedro Alves <pedro@codesourcery.com>
11381
11382 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11383 prototype to take a regcache. Adjust.
11384
442ea881
PA
113852010-01-20 Pedro Alves <pedro@codesourcery.com>
11386
11387 * regcache.h (struct thread_info): Forward declare.
11388 (struct regcache): New.
11389 (new_register_cache): Adjust prototype.
11390 (get_thread_regcache): Declare.
11391 (free_register_cache): Adjust prototype.
11392 (registers_to_string, registers_from_string): Ditto.
11393 (supply_register, supply_register_by_name, collect_register)
11394 (collect_register_as_string, collect_register_by_name): Ditto.
11395 * regcache.c (struct inferior_regcache_data): Delete.
11396 (get_regcache): Rename to ...
11397 (get_thread_regcache): ... this. Adjust. Switch inferior before
11398 fetching registers.
11399 (regcache_invalidate_one): Adjust.
11400 (regcache_invalidate): Fix prototype.
11401 (new_register_cache): Return the new register cache.
11402 (free_register_cache): Change prototype.
11403 (realloc_register_cache): Adjust.
11404 (registers_to_string): Change prototype to take a regcache. Adjust.
11405 (registers_from_string): Ditto.
11406 (register_data): Ditto.
11407 (supply_register): Ditto.
11408 (supply_register_by_name): Ditto.
11409 (collect_register): Ditto.
11410 (collect_register_as_string): Ditto.
11411 (collect_register_by_name): Ditto.
11412 * server.c (process_serial_event): Adjust.
11413 * linux-low.h (regset_fill_func, regset_store_func): Change
11414 prototype.
11415 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11416 Change prototype.
11417 * linux-low.c (get_stop_pc): Adjust.
11418 (check_removed_breakpoint): Adjust.
11419 (linux_wait_for_event): Adjust.
11420 (linux_resume_one_lwp): Adjust.
11421 (fetch_register): Add regcache parameter. Adjust.
11422 (usr_store_inferior_registers): Ditto.
11423 (regsets_fetch_inferior_registers): Ditto.
11424 (regsets_store_inferior_registers): Ditto.
11425 (linux_fetch_registers, linux_store_registers): Ditto.
11426 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11427 regcache. Adjust.
43aaf8b6
PA
11428 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11429 Ditto.
442ea881
PA
11430 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11431 prototype to take a regcache.
11432 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11433 * remote-utils.c (convert_ascii_to_int, outreg)
11434 (prepare_resume_reply): Change prototype to take a regcache.
11435 Adjust.
11436 * target.h (struct target_ops) <fetch_registers, store_registers>:
11437 Change prototype to take a regcache.
11438 (fetch_inferior_registers, store_inferior_registers): Change
11439 prototype to take a regcache. Adjust.
11440 * proc-service.c (ps_lgetregs): Adjust.
11441 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11442 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11443 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11444 take a regcache. Adjust.
11445 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11446 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11447 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11448 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11449 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11450 (cris_cannot_fetch_register):
11451 (cris_breakpoint_at): Change prototype to take a regcache.
11452 Adjust.
11453 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11454 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11455 to take a regcache. Adjust.
11456 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11457 Adjust.
11458 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11459 take a regcache. Adjust.
11460 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11461 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11462 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11463 * linux-mips-low.c (mips_get_pc):
11464 (mips_set_pc): Change prototype to take a regcache. Adjust.
11465 (mips_reinsert_addr): Adjust.
11466 (mips_collect_register): Change prototype to take a regcache.
11467 Adjust.
11468 (mips_supply_register):
11469 (mips_collect_register_32bit, mips_supply_register_32bit)
11470 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11471 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11472 * linux-ppc-low.c (ppc_supply_ptrace_register)
11473 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11474 (parse_spufs_run): Adjust.
11475 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11476 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11477 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11478 take a regcache. Adjust.
11479 * linux-s390-low.c (s390_collect_ptrace_register)
11480 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11481 (s390_set_pc): Change prototype to take a regcache. Adjust.
11482 (s390_arch_setup): Adjust.
11483 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11484 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11485 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11486 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11487 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11488 regcache. Adjust.
11489 (sparc_breakpoint_at): Adjust.
11490 * linux-xtensa-low.c (xtensa_fill_gregset):
11491 (xtensa_store_gregset):
11492 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11493 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11494 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11495 prototype to take a regcache. Adjust.
11496 * win32-arm-low.c (arm_fetch_inferior_register)
11497 (arm_store_inferior_register): Change prototype to take a
11498 regcache. Adjust.
11499 * win32-i386-low.c (i386_fetch_inferior_register)
11500 (i386_store_inferior_register): Change prototype to take a
11501 regcache. Adjust.
11502 * win32-low.c (child_fetch_inferior_registers)
11503 (child_store_inferior_registers): Change prototype to take a
11504 regcache. Adjust.
11505 (win32_wait): Adjust.
11506 (win32_fetch_inferior_registers): Change prototype to take a
11507 regcache. Adjust.
11508 (win32_store_inferior_registers): Adjust.
11509 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11510 store_inferior_register>: Change prototype to take a regcache.
11511
60c3d7b0
DE
115122010-01-20 Doug Evans <dje@google.com>
11513
11514 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11515 #ifdef.
11516 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11517 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11518
dc146f7c
VP
115192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11520
11521 * linux-low.c (linux_core_of_thread): New.
11522 (compare_ints, show_process, list_threads): New.
11523 (linux_qxfer_osdata): Report threads and cores.
11524 (linux_target_op): Register linux_core_of_thread.
11525 * remote-utils.c (prepare_resume_reply): Report the core.
11526 (buffer_xml_printf): Support %d specifier.
11527 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11528 New.
11529 (handle_query): Handle qXfer:threads. Announce availability
11530 thereof.
11531 * target.h (struct target_ops): New field core_of_thread.
11532
7803799a
UW
115332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11534
11535 * Makefile.in (clean): Remove new generated files.
11536 (reg-s390.o, reg-s390.c): Remove rules.
11537 (reg-s390x.o, reg-s390x.c): Likewise.
11538 (s390-linux32.o, s390-linux32.c): Add rules.
11539 (s390-linux64.o, s390-linux64.c): Likewise.
11540 (s390x-linux64.o, s390x-linux64.c): Likewise.
11541 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11542 * linux-s390-low.c: Include <elf.h>.
11543 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11544 (init_registers_s390): Remove prototype.
11545 (init_registers_s390x): Likewise.
11546 (init_registers_s390_linux32): Add prototype.
11547 (init_registers_s390_linux64): Likewise.
11548 (init_registers_s390x_linux64): Likewise.
11549 (s390_num_regs_3264): New define.
11550 (s390_regmap_3264): New global variable.
11551 (s390_cannot_fetch_register): Remove obsolete check.
11552 (s390_cannot_store_register): Likewise.
11553 (s390_collect_ptrace_register): Handle upper/lower register halves.
11554 (s390_supply_ptrace_register): Likewise.
11555 (s390_fill_gregset): Update to register number changes.
11556 (s390_get_hwcap): New routine.
11557 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11558 Install appropriate regmap and register set.
11559
6e7ffa39
JB
115602010-01-01 Joel Brobecker <brobecker@adacore.com>
11561
11562 * server.c (gdbserver_version): Update copyright year to 2010.
11563 * gdbreplay.c (gdbreplay_version): Likewise.
11564
957f3f49
DE
115652009-12-28 Doug Evans <dje@google.com>
11566
11567 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11568 elf/external.h. Include <elf.h> instead but only if necessary.
11569
ca5c370d
PA
115702009-12-28 Pedro Alves <pedro@codesourcery.com>
11571
11572 * linux-low.c (linux_remove_process): Remove `detaching'
11573 parameter. Don't release/detach from thread_db here.
11574 (linux_kill): Release/detach from thread_db here, ...
11575 (linux_detach): ... and here, before actually detaching.
11576 (linux_wait_1): ... and here, when a process exits.
11577 * thread-db.c (any_thread_of): New.
11578 (thread_db_free): Switch the current inferior to a thread of the
11579 passed in process.
11580
4ee62156
DE
115812009-12-21 Doug Evans <dje@google.com>
11582
d90e6a88
DE
11583 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11584
c5f62d5f
DE
11585 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11586 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11587 warning ifndef __NR_tkill. Move setting of errno there too.
11588 Delete unnecessary resetting of errno after syscall.
11589 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11590
10e86dd7
DE
11591 * configure.ac: Check for dladdr.
11592 * config.in: Regenerate.
11593 * configure: Regenerate.
11594 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11595 (try_thread_db_load): Update.
11596
4ee62156
DE
11597 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11598
00f515da
DE
115992009-12-18 Doug Evans <dje@google.com>
11600
e9464885
DE
11601 * event-loop.c: Include unistd.h if it exists.
11602
07d4f67e
DE
11603 * linux-low.c (my_waitpid): Move definition away from being in
11604 between linux_tracefork_child/linux_test_for_tracefork.
11605
00f515da
DE
11606 * gdb_proc_service.h (psaddr_t): Fix type.
11607 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11608 signature to match glibc.
11609
1de1badb
DE
116102009-12-16 Doug Evans <dje@google.com>
11611
11612 * linux-low.c (linux_read_memory): Fix argument to read.
11613
aeeb81d1
PA
116142009-11-26 Pedro Alves <pedro@codesourcery.com>
11615
11616 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11617 events, don't leave current_inferior pointing at null.
11618
10357975
PA
116192009-11-26 Pedro Alves <pedro@codesourcery.com>
11620
11621 * win32-low.c (LOG): Delete.
11622 (OUTMSG): Output to stderr.
11623 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11624 on compile time LOG macro.
11625 (win32_wait): Fix debug output.
11626
cf6e3471
PA
116272009-11-26 Pedro Alves <pedro@codesourcery.com>
11628
11629 * win32-low.c (win32_add_one_solib): If the dll name is
11630 "ntdll.dll", prepend the system directory to the dll path.
11631
0c85e18e
MK
116322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11633
11634 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11635
9ac544ce 116362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11637 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11638
11639 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11640 * configure.ac: Check for __mcoldfire__ and set
11641 gdb_cv_m68k_is_coldfire.
11642 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11643 reg-cf.o and reg-m68k.o.
11644 * configure: Regenerated.
11645
fd7dd3e6
PA
116462009-11-16 Pedro Alves <pedro@codesourcery.com>
11647
11648 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11649 Pass it to thread_db_free.
11650 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11651 proper `detaching' argument to linux_remove_process.
11652 * linux-low.h (thread_db_free): Add `detaching' parameter.
11653 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11654 to thread_db_free.
11655 (thread_db_free): Add `detaching' parameter. Only
11656 call td_ta_clear_event if detaching from process.
11657
75aa492e
MK
116582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11659
11660 * thread-db.c (thread_db_free): Fix typo.
11661
21e1bee4
PP
116622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11663
11664 PR gdb/10838
11665 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11666
8838b45e
NS
116672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11668
11669 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11670 with an i686 compiler.
11671 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11672 needed.
11673 * configure: Rebuilt.
11674
8a35fb51
SL
116752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11676
11677 PR gdb/10783
11678
11679 * server.c (handle_search_memory_1): Correct read_addr initialization
11680 in loop for searching subsequent chunks.
11681
96f15937
PP
116822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11683
11684 * configure.ac: New --with-libthread-db option.
11685 * thread-db.c: Allow direct dependence on libthread_db.
11686 (thread_db_free): Adjust.
11687 * config.in: Regenerate.
11688 * configure: Likewise.
889bf7c5 11689
5f7d1694
PP
116902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11691
11692 PR gdb/10757
11693 * thread-db.c (attach_thread): New function.
11694 (maybe_attach_thread): Return success/failure.
11695 (find_new_threads_callback): Adjust.
889bf7c5
PA
11696 (thread_db_find_new_threads): Loop until no new threads.
11697
88e3b899
PA
116982009-10-13 Pedro Alves <pedro@codesourcery.com>
11699
11700 * proc-service.c (ps_lgetregs): Formatting.
11701
cdbfd419
PP
117022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11703
11704 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11705 * configure.ac: Adjust.
11706 * linux-low.h (struct process_info_private): Move members to struct
11707 thread_db.
11708 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11709 * linux-low.c (linux_remove_process): Adjust.
11710 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11711 * server.c (handle_query): Move code ...
11712 (handle_monitor_command): ... here. New function.
11713 * target.h (struct target_ops): New member.
11714 * thread-db.c (struct thread_db): New.
11715 (libthread_db_search_path): New variable.
11716 (thread_db_create_event, thread_db_enable_reporting)
11717 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11718 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11719 (try_thread_db_load_1, dladdr_to_soname): New functions.
11720 (try_thread_db_load, thread_db_load_search): New functions.
11721 (thread_db_init): Search for libthread_db.
11722 (thread_db_free): New function.
11723 (thread_db_handle_monitor_command): Likewise.
11724 * config.in: Regenerate.
11725 * configure: Regenerate.
889bf7c5 11726
4168d2d6
UW
117272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11728
11729 * spu-low.c (spu_kill): Wait for inferior to terminate.
11730 Call clear_inferiors.
11731 (spu_detach): Call clear_inferiors.
11732
81ecdfbb
RW
117332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11734
11735 * aclocal.m4: Regenerate.
11736 * config.in: Likewise.
11737 * configure: Likewise.
11738
0b9ff2c0
UW
117392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11740
11741 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11742 (parse_spufs_run): New function.
11743 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11744 (ppc_breakpoint_at): Handle SPU breakpoints.
11745
efcbbd14
UW
117462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11747
11748 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11749 (SPUFS_MAGIC): Define.
11750 (spu_enumerate_spu_ids): New function.
11751 (linux_qxfer_spu): New function.
11752 (linux_target_ops): Install linux_qxfer_spu.
11753
f4d9bade
UW
117542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11755
11756 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11757 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11758 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11759 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11760 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11761 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11762 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11763 (init_registers_powerpc_cell32l): Add prototype.
11764 (init_registers_powerpc_cell64l): Likewise.
11765 (ppc_arch_setup): Detect Cell/B.E. architecture.
11766
96e946ca
RW
117672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11768
11769 * Makefile.in (datarootdir): New variable.
11770
58d6951d
DJ
117712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11772
11773 * linux-low.c (linux_write_memory): Update debugging output.
11774 * Makefile.in (clean): Add new descriptions.
11775 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11776 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11777 * configure.srv: Add new files for arm*-*-linux*.
11778 * linux-arm-low.c: Add new declarations.
11779 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11780 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11781 (HWCAP_VFPv3D16): New.
11782 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11783 instead of __IWMMXT__.
11784 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11785 (arm_arch_setup): New.
11786 (target_regsets): Remove #ifdef. Add VFP regset.
11787 (the_low_target): Use arm_arch_setup.
11788
12b42a12
DJ
117892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11790
11791 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11792 the main thread again.
11793
ac8c974e
AR
117942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11795
11796 Adding Neutrino gdbserver.
11797 * configure: Regenerated.
11798 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11799 * configure.srv (i[34567]86-*-nto*): New target.
11800 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11801 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11802 (nto_comctrl) [__QNX__]: New function.
11803 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11804
4424e0c3 118052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11806
11807 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11808 srv_tgtobj.
11809
912cf4ba
PA
118102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11811 Pedro Alves <pedro@codesourcery.com>
11812
11813 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11814 don't support CONTEXT_EXTENDED_REGISTERS.
11815 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11816 (the_low_target): Install them.
11817 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11818 failing with ERROR_PIPE_NOT_CONNECTED.
11819
aa5ca48f
DE
118202009-06-30 Doug Evans <dje@google.com>
11821 Pierre Muller <muller@ics.u-strasbg.fr>
11822
11823 Add h/w watchpoint support to x86-linux, win32-i386.
11824 * Makefile.in (SFILES): Add i386-low.c
11825 (i386_low_h): Define.
11826 (i386-low.o): Add dependencies.
11827 (linux-x86-low.o): Add i386-low.h dependency.
11828 (win32-i386-low.o): Ditto.
11829 * i386-low.c: New file.
11830 * i386-low.h: New file.
11831 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11832 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11833 * linux-low.c (linux_add_process): Initialize arch_private.
11834 (linux_remove_process): Free arch_private.
11835 (add_lwp): Initialize arch_private.
11836 (delete_lwp): Free arch_private.
11837 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11838 provided.
11839 * linux-low.h (process_info_private): New member arch_private.
11840 (lwp_info): New member arch_private.
11841 (linux_target_ops): New members new_process, new_thread,
11842 prepare_to_resume.
11843 (ptid_of): New macro.
11844 * linux-x86-low.c: Include stddef.h, i386-low.h.
11845 (arch_process_info): New struct.
11846 (arch_lwp_info): New struct.
11847 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11848 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11849 (i386_dr_low_get_status): New function.
11850 (x86_insert_point, x86_remove_point): New functions.
11851 (x86_stopped_by_watchpoint): New function.
11852 (x86_stopped_data_address): New function.
11853 (x86_linux_new_process, x86_linux_new_thread): New functions.
11854 (x86_linux_prepare_to_resume): New function.
11855 (the_low_target): Add entries for insert_point, remove_point,
11856 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11857 prepare_to_resume.
11858 * server.c (debug_hw_points): New global.
11859 (monitor_show_help): Document set debug-hw-points.
11860 (handle_query): Process "set debug-hw-points".
11861 * server.h (debug_hw_points): Declare.
11862 (paddress): Declare.
11863 * utils.c (NUMCELLS, CELLSIZE): New macros.
11864 (get_sell, xsnprintf, paddress): New functions.
11865 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11866 remove_point, stopped_by_watchpoint, stopped_data_address.
11867 * win32-i386-low.c: Include i386-low.h.
11868 (debug_reg_state): Replaces dr.
11869 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11870 (i386_dr_low_get_status): New function.
11871 (i386_insert_point, i386_remove_point): New functions.
11872 (i386_stopped_by_watchpoint): New function.
11873 (i386_stopped_data_address): New function.
11874 (i386_initial_stuff): Update.
11875 (get_thread_context,set_thread_context,i386_thread_added): Update.
11876 (the_low_target): Add entries for insert_point,
11877 remove_point, stopped_by_watchpoint, stopped_data_address.
11878 * win32-low.c (win32_insert_watchpoint): New function.
11879 (win32_remove_watchpoint): New function.
11880 (win32_stopped_by_watchpoint): New function.
11881 (win32_stopped_data_address): New function.
11882 (win32_target_ops): Add entries for insert_watchpoint,
11883 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11884 * win32-low.h (win32_target_ops): New members insert_point,
11885 remove_point, stopped_by_watchpoint, stopped_data_address.
11886
d993e290
PA
118872009-06-25 Pedro Alves <pedro@codesourcery.com>
11888
11889 * server.c (process_serial_event): Re-return unsupported, not
11890 error, if the type isn't recognized. Re-allow supporting only
11891 insert or remove packets. Also call require_running for
11892 breakpoints. Add missing break statement to default case. Tidy.
11893 * target.h (struct target_ops): Rename insert_watchpoint to
11894 insert_point, and remove_watchpoint to remove_point.
11895
11896 * linux-low.h (struct linux_target_ops): Likewise.
11897 * linux-low.c (linux_insert_watchpoint): Rename to ...
11898 (linux_insert_point): ... this. Adjust.
11899 (linux_remove_watchpoint): Rename to ...
11900 (linux_remove_point): ... this. Adjust.
11901 (linux_target_ops): Adjust.
11902 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11903 (cris_insert_point): ... this.
11904 (cris_remove_watchpoint): Rename to ...
11905 (cris_remove_point): ... this.
11906 (the_low_target): Adjust.
11907
0f54c268
PM
119082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11909
11910 * server.c (handle_v_kill): Pass signal_pid to
11911 kill_inferior if multi_process is zero.
11912
c6314022
AR
119132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11914
11915 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11916 * target.h (target_ops): Comment for *_watchpoint to make it clear
11917 the functions can get types '0' and '1'.
11918
4463ce24
AR
119192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11920
11921 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11922 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11923 * regcache.c (get_regcache): Likewise.
11924 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11925 * win32-low.c (child_fetch_inferior_registers): Remove check for
11926 regno 0.
11927
cf8fd78b
PA
119282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11929 Pedro Alves <pedro@codesourcery.com>
11930
11931 * target.h (struct target_ops) <supports_multi_process>: New
11932 callback.
11933 (target_supports_multi_process): New.
11934 * server.c (handle_query): Even if GDB reports support, only
11935 enable multi-process if the target also supports it. Report
11936 multi-process support only if the target backend supports it.
11937 * linux-low.c (linux_supports_multi_process): New function.
11938 (linux_target_ops): Install it as target_supports_multi_process
11939 callback.
11940
47c0c975
DE
119412009-05-24 Doug Evans <dje@google.com>
11942
e09875d4
DE
11943 Global renaming of find_thread_pid to find_thread_ptid.
11944 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11945 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11946 All callers updated.
11947
e27d73f6
DE
11948 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11949 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11950 directly.
11951
47c0c975
DE
11952 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11953 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11954 (linux_resume_one_lwp): Ditto.
11955
2acc282a
DE
119562009-05-23 Doug Evans <dje@google.com>
11957
11958 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11959 from struct inferior_list_entry * to struct lwp_info *.
11960 All callers updated.
11961
9f1036c1
DE
119622009-05-13 Doug Evans <dje@google.com>
11963
11964 * linux-x86-low.c: Don't include assert.h.
11965 (x86_siginfo_fixup): Use fatal, not assert.
11966 (x86_arch_setup): Fix comment.
11967
d0722149
DE
119682009-05-12 Doug Evans <dje@google.com>
11969
11970 Biarch support for i386/amd64 gdbserver.
11971 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11972 Add linux-x86-low.c.
11973 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11974 (linux-x86-low.o): Add.
11975 * linux-x86-64-low.c: Delete.
11976 * linux-i386-low.c: Delete.
11977 * linux-x86-low.c: New file.
11978 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11979 linux-x86-low.o.
11980 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11981 linux-x86-low.o.
11982 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11983 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11984 (linux_child_pid_to_exec_file): New function.
11985 (elf_64_header_p, elf_64_file_p): New functions.
11986 (siginfo_fixup): New function.
11987 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11988 give target a chance to convert layout.
11989 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11990 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11991
fdeb2a12
DE
119922009-05-07 Doug Evans <dje@google.com>
11993
11994 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11995 (regsets_store_inferior_registers): Ditto.
11996
a6dbe5df
PA
119972009-05-06 Pedro Alves <pedro@codesourcery.com>
11998
11999 PR server/10048
12000
12001 * linux-low.c (must_set_ptrace_flags): Delete.
12002 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12003 of the global.
12004 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12005 `lwp->must_set_ptrace_flags' instead.
ba42693b 12006 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12007 (linux_wait_1): ... not here.
12008
5091eb23
DE
120092009-04-30 Doug Evans <dje@google.com>
12010
9f767825
DE
12011 * inferiors.c (started_inferior_callback): New function.
12012 (attached_inferior_callback): New function.
12013 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12014 * server.c (print_started_pid, print_attached_pid): New functions.
12015 (detach_or_kill_for_exit): New function.
12016 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12017 * server.h (have_started_inferiors_p): Declare.
12018 (have_attached_inferiors_p): Declare.
12019
5091eb23
DE
12020 * inferiors.c (remove_process): Fix memory leak, free process.
12021 * linux-low.c (linux_remove_process): New function.
12022 (linux_kill): Call it instead of remove_process.
12023 (linux_detach, linux_wait_1): Ditto.
12024
155c8968
PA
120252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12026
12027 * configure.srv: Add x86 Windows CE target.
12028
7fe519cb
UW
120292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12030
12031 * inferiors.c (get_thread_process): Make global.
12032 * server.h (get_thread_process): Add prototype.
12033 * thread-db.c (find_one_thread): Use get_thread_process
12034 instead of current_process.
12035 (thread_db_get_tls_address): Do not crash if called when
12036 thread layer is not yet initialized.
12037
5472f405
UW
120382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12039
12040 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12041 * spu-low.c (current_tid): Rename to ...
12042 (current_ptid): ... this.
12043 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12044 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12045 ptid_get_lwp (current_ptid) instead of current_tid.
12046 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12047 instead of current_tid. Use find_process_pid to verify pid
12048 argument is valid. Pass proper argument to remove_process.
12049 (spu_thread_alive): Compare current_ptid instead of current_tid.
12050 (spu_resume): Likewise.
12051
55ac2b99
PA
120522009-04-02 Pedro Alves <pedro@codesourcery.com>
12053
12054 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12055 variable.
12056
95954743
PA
120572009-04-01 Pedro Alves <pedro@codesourcery.com>
12058
12059 Implement the multiprocess extensions, and add linux multiprocess
12060 support.
12061
12062 * server.h (ULONGEST): Declare.
12063 (struct ptid, ptid_t): New.
12064 (minus_one_ptid, null_ptid): Declare.
12065 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12066 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12067 (struct inferior_list_entry): Change `id' type from unsigned from
12068 to ptid_t.
12069 (struct sym_cache, struct breakpoint, struct
12070 process_info_private): Forward declare.
12071 (struct process_info): Declare.
12072 (current_process): Declare.
12073 (all_processes): Declare.
12074 (initialize_inferiors): Declare.
12075 (add_thread): Adjust to use ptid_t.
12076 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12077 (add_process, remove_process, find_thread_pid): Declare.
12078 (find_inferior_id): Adjust to use ptid_t.
12079 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12080 (multi_process): Declare.
12081 (push_event): Adjust to use ptid_t.
12082 (read_ptid, write_ptid): Declare.
12083 (prepare_resume_reply): Adjust to use ptid_t.
12084 (clear_symbol_cache): Declare.
12085 * inferiors.c (all_processes): New.
12086 (null_ptid, minus_one_ptid): New.
12087 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12088 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12089 (add_thread): Change unsigned long to ptid. Remove gdb_id
12090 parameter. Adjust.
12091 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12092 (gdb_id_to_thread): Rename to ...
12093 (find_thread_pid): ... this. Change unsigned long to ptid.
12094 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12095 (loaded_dll, pull_pid_from_list): Adjust.
12096 (add_process, remove_process, find_process_pid)
12097 (get_thread_process, current_process, initialize_inferiors): New.
12098 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12099 (struct target_waitstatus) <related_pid>: Ditto.
12100 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12101 return type to int.
12102 (struct target_ops) <join>: Add `pid' argument.
12103 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12104 (struct target_ops) <wait>: Add `ptid' field. Change return type
12105 to ptid.
12106 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12107 (mywait): Add `ptid' argument. Change return type to ptid_t.
12108 (target_pid_to_str): Declare.
12109 * target.c (set_desired_inferior): Adjust to use ptids.
12110 (mywait): Add new `ptid' argument. Adjust.
12111 (target_pid_to_str): New.
12112 * mem-break.h (free_all_breakpoints): Declare.
12113 * mem-break.c (breakpoints): Delelete.
12114 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12115 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12116 to use per-process breakpoint list.
12117 (free_all_breakpoints): New.
12118 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12119 (symbol_cache, all_symbols_looked_up): Delete.
12120 (hexchars): New.
12121 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12122 read_ptid): New.
12123 (prepare_resume_reply): Change ptid argument's type from unsigned
12124 long to ptid_t. Adjust. Implement W;process and X;process.
12125 (free_sym_cache, clear_symbol_cache): New.
12126 (look_up_one_symbol): Adjust to per-process symbol cache. *
12127 * server.c (cont_thread, general_thread, step_thread): Change type
12128 to ptid_t.
12129 (attached): Delete.
12130 (multi_process): New.
12131 (last_ptid): Change type to ptid_t.
12132 (struct vstop_notif) <ptid>: Change type to ptid_t.
12133 (queue_stop_reply, push_event): Change `ptid' argument's type to
12134 ptid_t.
12135 (discard_queued_stop_replies): Add `pid' argument.
12136 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12137 changes. Don't reference the `attached' global.
12138 (attach_inferior): Adjust to mywait interface changes.
12139 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12140 features. Handle and report "multiprocess+". Handle
12141 "qAttached:PID".
12142 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12143 changes.
12144 (handle_v_kill): New.
12145 (handle_v_stopped): Adjust to use target_pid_to_str.
12146 (handle_v_requests): Allow multiple attaches and runs when
12147 multiprocess extensions are in effect. Handle "vKill".
12148 (myresume): Adjust to use ptids.
12149 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12150 (handle_status): Adjust to discard_queued_stop_replies interface
12151 change.
12152 (first_thread_of, kill_inferior_callback)
12153 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12154 (main): Call initialize_inferiors. Adjust to use ptids, killing
12155 and detaching from all inferiors. Handle multiprocess packet
12156 variants.
12157 * linux-low.h: Include gdb_proc_service.h.
12158 (struct process_info_private): New.
12159 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12160 <lwpid_of>: Use ptid_get_lwp.
12161 (get_lwp_thread): Adjust.
12162 (struct lwp_info): Add `dead' member.
12163 (find_lwp_pid): Declare.
12164 * linux-low.c (thread_db_active): Delete.
12165 (new_inferior): Adjust comment.
12166 (inferior_pid): Delete.
12167 (linux_add_process): New.
12168 (handle_extended_wait): Adjust.
12169 (add_lwp): Change unsigned long to ptid.
12170 (linux_create_inferior): Add process to processes table. Adjust
12171 to use ptids. Don't set new_inferior here.
12172 (linux_attach_lwp): Rename to ...
12173 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12174 it. Adjust to use ptids.
12175 (linux_attach_lwp): New.
12176 (linux_attach): Add process to processes table. Don't set
12177 new_inferior here.
12178 (struct counter): New.
12179 (second_thread_of_pid_p, last_thread_of_process_p): New.
12180 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12181 multiple processes.
12182 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12183 processes. Remove process from process table.
12184 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12185 to multiple processes.
12186 (any_thread_of): New.
12187 (linux_detach): Add `pid' argument, and handle it. Remove process
12188 from processes table.
12189 (linux_join): Add `pid' argument. Handle it.
12190 (linux_thread_alive): Change unsighed long argument to ptid_t.
12191 Consider dead lwps as not being alive.
12192 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12193 threads we're not interested in.
12194 (same_lwp, find_lwp_pid): New.
12195 (linux_wait_for_lwp): Change `pid' argument's type from int to
12196 ptid_t. Adjust.
12197 (linux_wait_for_event): Rename to ...
12198 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12199 from int to ptid_t. Adjust.
12200 (linux_wait_for_event): New.
12201 (linux_wait_1): Add `ptid' argument. Change return type to
12202 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12203 that exit from the process table.
12204 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12205 Adjust.
12206 (mark_lwp_dead): New.
12207 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12208 stopping all threads, mark its main lwp as dead.
12209 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12210 ptids.
12211 (fetch_register, usr_store_inferior_registers)
12212 (regsets_fetch_inferior_registers)
12213 (regsets_store_inferior_registers, linux_read_memory)
12214 (linux_write_memory): Inline `inferior_pid'.
12215 (linux_look_up_symbols): Adjust to use per-process
12216 `thread_db_active'.
12217 (linux_request_interrupt): Adjust to use ptids.
12218 (linux_read_auxv): Inline `inferior_pid'.
12219 (initialize_low): Don't reference thread_db_active.
12220 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12221 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12222 (ps_getpid): Return the pid of the current inferior.
12223 * thread-db.c (proc_handle, thread_agent): Delete.
12224 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12225 per-process data.
12226 (find_one_thread): Change argument type to ptid_t. Adjust to
12227 per-process data.
12228 (maybe_attach_thread): Adjust to per-process data and ptids.
12229 (thread_db_find_new_threads): Ditto.
12230 (thread_db_init): Ditto.
12231 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12232 processes table. Adjust to use ptids.
12233 (spu_kill, spu_detach): Adjust interface. Remove process from
12234 processes table.
12235 (spu_join, spu_thread_alive): Adjust interface.
12236 (spu_wait): Adjust interface. Remove process from processes
12237 table. Adjust to use ptids.
12238 * win32-low.c (current_inferior_tid): Delete.
12239 (current_inferior_ptid): New.
12240 (debug_event_ptid): New.
12241 (thread_rec): Take a ptid. Adjust.
12242 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12243 (child_delete_thread): Ditto.
12244 (do_initial_child_stuff): Add `attached' argument. Add process to
12245 processes table.
12246 (child_fetch_inferior_registers, child_store_inferior_registers):
12247 Adjust.
12248 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12249 (win32_attach): Pass 1 to do_initial_child_stuff.
12250 (win32_kill): Adjust interface. Remove process from processes
12251 table.
12252 (win32_detach): Ditto.
12253 (win32_join): Adjust interface.
12254 (win32_thread_alive): Take a ptid.
12255 (win32_resume): Adjust to use ptids.
12256 (get_child_debug_event): Ditto.
12257 (win32_wait): Adjust interface. Remove exiting process from
12258 processes table.
12259
bd99dc85
PA
122602009-04-01 Pedro Alves <pedro@codesourcery.com>
12261
12262 Non-stop mode support.
12263
12264 * server.h (non_stop): Declare.
12265 (gdb_client_data, handler_func): Declare.
12266 (delete_file_handler, add_file_handler, start_event_loop):
12267 Declare.
12268 (handle_serial_event, handle_target_event, push_event)
12269 (putpkt_notif): Declare.
12270 * target.h (enum resume_kind): New.
12271 (struct thread_resume): Replace `step' field by `kind' field.
12272 (TARGET_WNOHANG): Define.
12273 (struct target_ops) <wait>: Add `options' argument.
12274 <supports_non_stop, async, start_non_stop>: New fields.
12275 (target_supports_non_stop, target_async): New.
12276 (start_non_stop): Declare.
12277 (mywait): Add `options' argument.
12278 * target.c (mywait): Add `options' argument. Print child exit
12279 notifications here.
12280 (start_non_stop): New.
12281 * server.c (non_stop, own_buf, mem_buf): New globals.
12282 (struct vstop_notif): New.
12283 (notif_queue): New global.
12284 (queue_stop_reply, push_event, discard_queued_stop_replies)
12285 (send_next_stop_reply): New.
12286 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12287 interface changes.
12288 (attach_inferior): In non-stop mode, don't wait for the target
12289 here.
12290 (handle_general_set): Handle QNonStop.
12291 (handle_query): When handling qC, return the current general
12292 thread, instead of the first thread of the list.
12293 (handle_query): If the backend supports non-stop mode, include
12294 QNonStop+ in the qSupported query response.
12295 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12296 and non-stop mode.
12297 (handle_v_attach, handle_v_run): Handle non-stop mode.
12298 (handle_v_stopped): New.
12299 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12300 (myresume): Adjust to use resume_kind. Handle non-stop.
12301 (queue_stop_reply_callback): New.
12302 (handle_status): Handle non-stop mode.
12303 (main): Clear non_stop flag on reconnection. Use the event-loop.
12304 Refactor serial protocol handling from here ...
12305 (process_serial_event): ... to this new function. When GDB
12306 selects any thread, select one here. In non-stop mode, wait until
12307 GDB acks all pending events before exiting.
12308 (handle_serial_event, handle_target_event): New.
12309 * remote-utils.c (remote_open): Install remote_desc in the event
12310 loop.
12311 (remote_close): Remove remote_desc from the event loop.
12312 (putpkt_binary): Rename to...
12313 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12314 (putpkt_binary): New as wrapper around putpkt_binary_1.
12315 (putpkt_notif): New.
12316 (prepare_resume_reply): In non-stop mode, don't change the
12317 general_thread.
12318 * event-loop.c: New.
12319 * Makefile.in (OBJ): Add event-loop.o.
12320 (event-loop.o): New rule.
12321
12322 * linux-low.h (pid_of): Moved here.
12323 (lwpid_of): New.
12324 (get_lwp_thread): Use lwpid_of.
12325 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12326 * linux-low.c (pid_of): Delete.
12327 (inferior_pid): Use lwpid_of.
12328 (linux_event_pipe): New.
12329 (target_is_async_p): New.
12330 (delete_lwp): New.
12331 (handle_extended_wait): Use lwpid_of.
12332 (add_lwp): Don't set lwpid field.
12333 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12334 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12335 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12336 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12337 first. Adjust to linux_wait_for_event interface changes. Use
12338 lwpid_of.
12339 (linux_detach): Don't delete the main lwp here.
12340 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12341 (status_pending_p): Don't consider explicitly suspended lwps.
12342 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12343 pointer. Add OPTIONS argument. Change return type to int. Use
12344 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12345 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12346 pointer. Add status pointer argument. Return a pid instead of a
12347 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12348 changes. In non-stop mode, don't switch to a random thread.
12349 (linux_wait): Rename to...
12350 (linux_wait_1): ... this. Add target_options argument, and handle
12351 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12352 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12353 clean exit and signal exit code. Don't stop all threads in
12354 non-stop mode. In all-stop mode, only stop all threads when
12355 reporting a stop to GDB. Handle explicit thread stop requests.
12356 (async_file_flush, async_file_mark): New.
12357 (linux_wait): New.
12358 (send_sigstop): Use lwpid_of.
12359 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12360 interface changes. In non-stop mode, don't switch to a random
12361 thread.
12362 (linux_resume_one_lwp): Use lwpid_of.
12363 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12364 (linux_resume_one_thread): ... this. Handle resume_stop. In
12365 non-stop mode, don't look for pending flag in all threads.
12366 (resume_status_pending_p): Don't consider explicitly suspended
12367 threads.
12368 (my_waitpid): Reimplement. Emulate __WALL.
12369 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12370 Use lwpid_of.
12371 (sigchld_handler, linux_supports_non_stop, linux_async)
12372 (linux_start_non_stop): New.
12373 (linux_target_ops): Register linux_supports_non_stop, linux_async
12374 and linux_start_non_stop.
12375 (initialize_low): Install SIGCHLD handler.
12376 * thread-db.c (thread_db_create_event, find_one_thread)
12377 (thread_db_get_tls_address): Use lwpid_of.
12378 * win32-low.c (win32_detach): Adjust to use resume_kind.
12379 (win32_wait): Add `options' argument.
12380 * spu-low.c (spu_resume): Adjust to use resume_kind.
12381 (spu_wait): Add `options' argument.
12382
5b1c542e
PA
123832009-04-01 Pedro Alves <pedro@codesourcery.com>
12384
12385 Decouple target code from remote protocol.
12386
12387 * target.h (enum target_waitkind): New.
12388 (struct target_waitstatus): New.
12389 (struct target_ops) <wait>: Return an unsigned long. Take a
12390 target_waitstatus pointer instead of a char pointer.
12391 (mywait): Likewise.
12392 * target.c (mywait): Change prototype to return an unsigned long.
12393 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12394 * server.h (thread_from_wait, old_thread_from_wait): Delete
12395 declarations.
12396 (prepare_resume_reply): Change prototype to take a
12397 target_waitstatus.
12398 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12399 (last_status, last_ptid): New.
12400 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12401 pid instead of a signal.
12402 (attach_inferior): Remove "status" and "signal" parameters.
12403 Adjust.
12404 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12405 not as an address.
12406 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12407 (handle_v_requests, myresume): Remove "status" and "signal"
12408 parameters. Adjust.
12409 (handle_status): New.
12410 (main): Delete local `status'. Adjust.
12411 * remote-utils.c: Include target.h.
12412 (prepare_resume_reply): Change prototype to take a
12413 target_waitstatus. Adjust.
12414
12415 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12416 interface.
12417 * spu-low.c (spu_wait): Adjust.
12418 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12419 Delete.
12420 (win32_wait): Adjust.
12421
2bd7c093
PA
124222009-04-01 Pedro Alves <pedro@codesourcery.com>
12423
12424 * target.h (struct thread_resume): Delete leave_stopped member.
12425 (struct target_ops): Add a `n' argument to the `resume' callback.
12426 * server.c (start_inferior): Adjust.
12427 (handle_v_cont, myresume): Adjust.
12428 * linux-low.c (check_removed_breakpoint): Adjust to resume
12429 interface change, and to removed leave_stopped field.
12430 (resume_ptr): Delete.
12431 (struct thread_resume_array): New.
12432 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12433 resume interface change.
12434 (linux_continue_one_thread, linux_queue_one_thread)
12435 (resume_status_pending_p): Check if the resume field is NULL
12436 instead of checking the leave_stopped member.
12437 (linux_resume): Adjust to the target resume interface change.
12438 * spu-low.c (spu_resume): Adjust to the target resume interface
12439 change.
12440 * win32-low.c (win32_detach, win32_resume): Ditto.
12441
c35fafde
PA
124422009-04-01 Pedro Alves <pedro@codesourcery.com>
12443
12444 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12445 flag.
12446 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12447 pending.
12448 (linux_continue_one_thread): Only preserve the stepping flag if
12449 there's a pending breakpoint.
12450
0a59d50b
PA
124512009-03-31 Pedro Alves <pedro@codesourcery.com>
12452
12453 * server.c (main): After the inferior having exited, call
12454 remote_close before exiting gdbserver.
12455
f04c6d38
TJB
124562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12457
12458 Fix size of FPSCR in Power 7 processors.
12459 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12460 (PPC_FEATURE_HAS_DFP): New #define.
12461 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12462 size of the FPSCR.
12463
78e5cee6
PA
124642009-03-23 Pedro Alves <pedro@codesourcery.com>
12465
12466 * server.c (handle_query) Whitespace and formatting.
12467
1b3f6016
PA
124682009-03-22 Pedro Alves <pedro@codesourcery.com>
12469
12470 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12471 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12472 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12473 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12474 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12475 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12476 Makefile.in, configure.ac: Fix whitespace throughout.
12477 * configure: Regenerate.
12478
a07b2135
PA
124792009-03-22 Pedro Alves <pedro@codesourcery.com>
12480
12481 * inferiors.c (find_inferior): Make it safe for the callback
12482 function to delete the currently iterated inferior.
12483
67cc2626
PA
124842009-03-22 Pedro Alves <pedro@codesourcery.com>
12485
12486 * Makefile.in (linuw_low_h): Move higher.
12487 (thread-db.o): Depend on $(linux_low_h).
12488
54a0b537
PA
124892009-03-17 Pedro Alves <pedro@codesourcery.com>
12490
12491 Rename "process" to "lwp" throughout.
12492
12493 * linux-low.c (all_processes): Rename to...
12494 (all_lwps): ... this.
12495 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12496 (add_process): Rename to ...
12497 (add_lwp): ... this. Adjust.
12498 (linux_create_inferior): Adjust.
12499 (linux_attach_lwp): Adjust.
12500 (linux_attach): Adjust.
12501 (linux_kill_one_process): Rename to ...
12502 (linux_kill_one_lwp): ... this. Adjust.
12503 (linux_kill): Adjust.
12504 (linux_detach_one_process): Rename to ...
12505 (linux_detach_one_lwp): ... this. Adjust.
12506 (linux_detach): Adjust.
12507 (check_removed_breakpoint): Adjust.
12508 (status_pending_p): Adjust.
12509 (linux_wait_for_process): Rename to ...
12510 (linux_wait_for_lwp): ... this. Adjust.
12511 (linux_wait_for_event): Adjust.
12512 (send_sigstop): Adjust.
12513 (wait_for_sigstop): Adjust.
12514 (stop_all_processes): Rename to ...
12515 (stop_all_lwps): ... this.
12516 (linux_resume_one_process): Rename to ...
12517 (linux_resume_one_lwp): ... this. Adjust.
12518 (linux_set_resume_request, linux_continue_one_thread)
12519 (linux_queue_one_thread, resume_status_pending_p)
12520 (usr_store_inferior_registers, regsets_store_inferior_registers)
12521 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12522 Adjust.
12523 * linux-low.h (get_process): Rename to ...
12524 (get_lwp): ... this. Adjust.
12525 (get_thread_process): Rename to ...
12526 (get_thread_lwp): ... this. Adjust.
12527 (get_process_thread): Rename to ...
12528 (get_lwp_thread): ... this. Adjust.
12529 (struct process_info): Rename to ...
12530 (struct lwp_info): ... this.
12531 (all_processes): Rename to ...
12532 (all_lwps): ... this.
12533 * proc-service.c (ps_lgetregs): Adjust.
12534 * thread-db.c (thread_db_create_event, find_one_thread)
12535 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12536
0b16c5cf
PA
125372009-03-14 Pedro Alves <pedro@codesourcery.com>
12538
12539 * server.c (handle_query): Handle "qAttached".
12540
32de4b9d
NS
125412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12542
12543 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12544 GPLv3, update license URL.
12545
2aecd87f
DE
125462009-03-01 Doug Evans <dje@google.com>
12547
93efd302 12548 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12549 (server_h): Add gdb_signals.h.
12550 (signals.o): Update.
12551 * server.h (target_signal_from_host,target_signal_to_host_p)
12552 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12553
86b1f9c5
PM
125542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12555
12556 * remote-utils.c (getpkt): Also generate remote-debug
12557 information if noack_mode is set.
12558
4aa995e1
PA
125592009-02-06 Pedro Alves <pedro@codesourcery.com>
12560
12561 * server.c (handle_query): Report qXfer:siginfo:read and
12562 qXfer:siginfo:write as supported and handle them.
12563 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12564 * linux-low.c (linux_xfer_siginfo): New.
12565 (linux_target_ops): Set it.
12566
62709adf
PA
125672009-01-26 Pedro Alves <pedro@codesourcery.com>
12568
12569 * server.c (gdbserver_usage): Mention --remote-debug.
12570 (main): Accept '--remote-debug' switch.
12571
aef93bd7
DE
125722009-01-18 Doug Evans <dje@google.com>
12573
12574 * regcache.c (new_register_cache): No need to check result of xcalloc.
12575 * server.c (handle_search_memory): Back out calls to xmalloc,
12576 result is checked and error is returned to user upon failure.
12577 (handle_query): Ditto. Add more checks for result of malloc.
12578 (handle_v_cont): Check result of malloc, report error back to
12579 user upon failure.
12580 (handle_v_run): Ditto. Call freeargv.
12581 * server.h (freeargv): Declare.
12582 * utils.c (freeargv): New fn.
12583
54363045
DE
125842009-01-15 Doug Evans <dje@google.com>
12585
f626972c
DE
12586 * gdbreplay.c (perror_with_name): Make arg const char *.
12587 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12588 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12589 * utils.c (perror_with_name): Make arg const char *.
54363045 12590
18aae699
PA
125912009-01-14 Pedro Alves <pedro@codesourcery.com>
12592
12593 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12594 when handling a EXIT_PROCESS_DEBUG_EVENT.
12595
ff703abe
JB
125962009-01-06 Joel Brobecker <brobecker@adacore.com>
12597
12598 * gdbreplay.c (gdbreplay_version): Update copyright year.
12599 * server.c (gdbserver_version): Likewise.
12600
f21cc1a2 126012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12602
12603 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12604 (handle_extended_wait): Improve comment.
0e21c1ec 12605
bca929d3
DE
126062008-12-13 Doug Evans <dje@google.com>
12607
12608 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12609 * server.h (ATTR_MALLOC): New macro.
12610 (xmalloc,xcalloc,xstrdup): Declare.
12611 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12612 * inferiors.c: Ditto.
12613 * linux-low.c: Ditto.
12614 * mem-break.c: Ditto.
12615 * regcache.c: Ditto.
12616 * remote-utils.c: Ditto.
12617 * server.c: Ditto.
12618 * target.c: Ditto.
12619 * win32-low.c: Ditto.
12620
97438e3f
DE
126212008-12-12 Doug Evans <dje@google.com>
12622
896c7fbb
DE
12623 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12624 in debugging printf.
12625
97438e3f
DE
12626 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12627
e3b886f8
DE
126282008-12-09 Doug Evans <dje@google.com>
12629
12630 * linux-low.h (struct process_info): Delete member tid, unused.
12631 * thread-db.c (find_one_thread): Update.
12632 (maybe_attach_thread): Update.
12633
07e059b5
VP
126342008-12-02 Pedro Alves <pedro@codesourcery.com>
12635
889bf7c5
PA
12636 * target.h (struct target_ops): Add qxfer_osdata member.
12637 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12638 and dirent.h.
12639 (linux_qxfer_osdata): New functions.
12640 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12641 callback.
12642 * server.c (handle_query): Handle "qXfer:osdata:read:".
12643 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12644 (buffer_xml_printf): New functions.
12645 * server.h (struct buffer): New.
12646 (buffer_grow_str, buffer_grow_str0): New macros.
12647 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12648 (buffer_xml_printf): Declare.
07e059b5 12649
4cab47ab
DE
126502008-11-24 Doug Evans <dje@google.com>
12651
12652 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12653
f142445f
DJ
126542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12655
12656 * server.c (handle_v_run): Always use the supplied argument list.
12657
d0107bb6 126582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12659
d0107bb6
BW
12660 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12661 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12662
2c4ad781
TJB
126632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12664
12665 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12666 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12667 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12668 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12669 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12670 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12671 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12672 XML target descriptions.
12673 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12674 when inferior is running on an ISA 2.05 or later processor. Add
12675 special case to return offset for full 64-bit slot of FPSCR when
12676 in 32-bits.
12677
dfb64f85
DJ
126782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12679
12680 * Makefile.in (SFILES, clean): Added sparc64 files.
12681 (reg-sparc64.o, reg-sparc64.c): New.
12682 * configure.srv (sparc*-*-linux*): New configuration.
12683 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12684 syscall arguments for SPARC.
12685 (regsets_store_inferior_registers): Likewise.
12686 * linux-sparc-low.c: New file.
12687
66b6e1dd
DE
126882008-10-21 Doug Evans <dje@google.com>
12689
12690 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12691 (READLINE_DIR,READLINE_DEP): Delete.
12692 (INTERNAL_CFLAGS): Update.
12693 (LINTFLAGS): Update.
12694
9b710a42
PA
126952008-10-10 Pedro Alves <pedro@codesourcery.com>
12696
12697 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12698 whole argv from the last run, not just argv[0].
12699
5822d809
PA
127002008-09-08 Pedro Alves <pedro@codesourcery.com>
12701
12702 * regcache.c (new_register_cache): Return NULL if the register
12703 cache size isn't known yet.
12704 (free_register_cache): Avoid dereferencing a NULL regcache.
12705
74aac56f
DJ
127062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12707
12708 * configure.srv: Merge MIPS and MIPS64.
12709
400b20f5
MR
127102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12711
12712 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12713
677c5bb1
LM
127142008-08-18 Luis Machado <luisgpm@br.ibm.com>
12715
12716 * Makefile.in: Add required vsx dependencies.
12717
12718 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12719 Declare init_registers_powerpc_vsx32l.
12720 Declare init_registers_powerpc_vsx64l.
12721 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12722 (ppc_arch_setup): Check for VSX in hwcap.
12723 (ppc_fill_vsxregset): New function.
12724 (ppc_store_vsxregset): New function.
12725 Add new VSX entry in regset_info target_regsets.
12726
12727 * configure.srv: Add new VSX dependencies.
12728
a6f3e723
SL
127292008-08-12 Pedro Alves <pedro@codesourcery.com>
12730
12731 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12732 (remote_open): Set or clear transport_is_reliable.
12733 (putpkt_binary): Don't expect acks in noack mode.
12734 (getpkt): Don't send ack/nac in noack mode.
12735 * server.c (handle_general_set): Handle QStartNoAckMode.
12736 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12737 qSupported.
12738 (main): Reset noack_mode on every connection.
12739 * server.h (noack_mode): Declare.
12740
a417dc56
RW
127412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12742
12743 * Makefile.in (GDBREPLAY_OBS): New variable.
12744 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12745
3221518c
UW
127462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12747 Daniel Jacobowitz <dan@codesourcery.com>
12748
12749 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12750 (usr_store_inferior_registers): Likewise.
12751 (regsets_store_inferior_registers): Likewise.
12752
ec56be1b
PA
127532008-07-31 Rolf Jansen <rj@surtec.com>
12754 Pedro Alves <pedro@codesourcery.com>
12755
12756 * configure.ac: Check for memmem declaration.
12757 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12758 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12759 (disable_packet_qfThreadInfo): Unconditionally compile.
12760 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12761 * configure, config.in: Regenerate.
12762
2fe5e3ff
DE
127632008-07-28 Doug Kwan <dougkwan@google.com>
12764
12765 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12766 (linux_write_memory): Remove declaration of errno.
12767
836acd6d
UW
127682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12769
12770 * linux-low.c (handle_extended_wait): Do not use "status"
12771 variable uninitialized.
12772
aeba519e
PA
127732008-07-07 Pedro Alves <pedro@codesourcery.com>
12774
12775 * server.c (handle_v_attach): Inhibit reporting dll changes.
12776
db42f210
PA
127772008-06-27 Pedro Alves <pedro@codesourcery.com>
12778
12779 * remote-utils.c (prepare_resume_reply): If requested, don't
12780 output "thread:TID" in the T stop reply.
12781
12782 * server.c (disable_packet_vCont, disable_packet_Tthread)
12783 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12784 (handle_query): If requested, disable support for qC, qfThreadInfo
12785 and qsThreadInfo.
12786 (handle_v_requests): If requested, disable support for vCont.
12787 (gdbserver_show_disableable): New.
12788 (main): Handle --disable-packet and --disable-packet=LIST.
12789
12790 * server.h (disable_packet_vCont, disable_packet_Tthread)
12791 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12792
8e4c5421
CD
127932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12794
12795 * server.c (gdbserver_usage): Mention --version.
12796
6e23a804
DJ
127972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12798
12799 * Makefile.in (gdbreplay.o): New rule.
12800
90aa6a40
JM
128012008-06-06 Joseph Myers <joseph@codesourcery.com>
12802
12803 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12804 message, not gdbserver.
12805
c16158bc 128062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12807 Nathan Sidwell <nathan@codesourcery.com>
12808 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12809
12810 * acinclude.m4: Include ../../config/acx.m4.
12811 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12812 * configure, config.in: Regenerate.
12813 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12814 * server.c (gdbserver_version): Print PKGVERSION.
12815 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12816 (main): Adjust gdbserver_usage calls.
12817 * gdbreplay.c (version, host_name): Add declarations.
12818 (gdbreplay_version, gdbreplay_usage): New.
12819 (main): Accept --version and --help options.
12820
aeb75bf5
DJ
128212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12822
12823 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12824 (arm_breakpoint_at): Handle Thumb.
12825 (the_low_target): Add comment.
12826
76b233dd
UW
128272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12828
12829 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12830
08388c79
DE
128312008-05-09 Doug Evans <dje@google.com>
12832
a3c83fae
DE
12833 * server.h (decode_search_memory_packet): Declare.
12834 * remote-utils.c (decode_search_memory_packet): New fn.
12835 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12836 (handle_search_memory): New fn.
12837 (handle_query): Process qSearch:memory packets.
12838
bb9c3d36
UW
128392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12840
12841 * regcache.c (registers_length): Remove.
12842 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12843 full register packet.
12844 * regcache.h (registers_length): Remove prototype.
12845 * server.h (PBUFSIZ): Define to 16384.
12846
7284e1be
UW
128472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12848
12849 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12850 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12851 powerpc-64l.o, and powerpc-altivec64l.o.
12852 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12853 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12854 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12855 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12856 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12857 to srv_xmlfiles.
12858
12859 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12860 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12861 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12862 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12863 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12864 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12865 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12866 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12867 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12868 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12869 (clean): Update.
12870
12871 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12872 (init_registers_powerpc_32l): ... this new prototype.
12873 (init_registers_powerpc_32): Remove, replace by ...
12874 (init_registers_powerpc_altivec32l): ... this new prototype.
12875 (init_registers_powerpc_e500): Remove, replace by ...
12876 (init_registers_powerpc_e500l): ... this new prototype.
12877 (init_registers_ppc64): Remove, replace by ...
12878 (init_registers_powerpc_64l): ... this new prototype.
12879 (init_registers_powerpc_64): Remove, replace by ...
12880 (init_registers_powerpc_altivec64l): ... this new prototype.
12881 (ppc_num_regs): Set to 73.
12882 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12883 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12884 (ppc_cannot_store_register): Handle orig_r3 and trap.
12885 (ppc_arch_setup): Update init_registers_... calls.
12886 (ppc_fill_gregset): Handle orig_r3 and trap.
12887
12888 * inferiors.c (clear_inferiors): Reset current_inferior.
12889
fdc59709
PB
128902008-04-23 Paolo Bonzini <bonzini@gnu.org>
12891
889bf7c5
PA
12892 * acinclude.m4: Add override.m4.
12893 * configure: Regenerate.
fdc59709 12894
c9b2f845
UW
128952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12896
12897 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12898 initial call to init_register_ppc64.
12899
550512b8
UW
129002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12901
43aaf8b6
PA
12902 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12903 single powerpc*-*-linux* case.
550512b8
UW
12904 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12905
b6430ec3
UW
129062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12907
12908 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12909 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12910 from reg_xmlfiles.
12911 * linux-ppc-low.c: Include <elf.h>.
12912 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12913 (ppc_hwcap): New global variable.
12914 (ppc_regmap): Remove __SPE__ #ifdef sections.
12915 (ppc_regmap_e500): New global variable.
12916 (ppc_cannot_store_register): Update __SPE__ special case.
12917 (ppc_get_hwcap): New function.
12918 (ppc_arch_setup): Use it to determine whether inferior supports
12919 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12920 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12921 Do not access registers if target does not support AltiVec.
12922 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12923 Do not access registers if target does not support SPE.
12924 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12925
52fa2412
UW
129262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12927
12928 * linux-low.c (disabled_regsets, num_regsets): New.
12929 (use_regsets_p): Delete.
12930 (linux_wait_for_process): Clear disabled_regsets.
12931 (regsets_fetch_inferior_registers): Check and set it.
12932 (regsets_store_inferior_registers): Likewise.
12933 (linux_fetch_registers, linux_store_registers): Do not use
12934 use_regsets_p.
12935 (initialize_low): Allocate disabled_regsets.
12936
e28b3332
DJ
129372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12938
12939 * Makefile.in (LIBOBJS): New.
12940 (OBS): Use LIBOBJS.
12941 (memmem.o): New rule.
12942 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12943 * configure: Regenerated.
12944
4536995d
UW
129452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12946
12947 * server.c (handle_query): Never return "unsupported" for
12948 qXfer:features:read queries.
12949
221c031f
UW
129502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12951
12952 * server.c (get_features_xml): Fix inverted condition.
12953 (handle_query): Always support qXfer:feature:read.
12954
ccd213ac
DJ
129552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12956
12957 * server.c (wrapper_argv): New.
12958 (start_inferior): Handle wrapper_argv. If set, expect an extra
12959 trap.
12960 (gdbserver_usage): Document --wrapper.
12961 (main): Parse --wrapper.
12962
6fe305f7
UW
129632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12964
12965 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12966 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12967 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12968 (ppc_set_pc): Likewise.
12969 (ppc_arch_setup): New function.
12970 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12971 of collect_register.
889bf7c5 12972 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12973
5b0a002e
UW
129742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12975
12976 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12977 instead of linux-ppc64-low.o.
12978 * linux-ppc64-low.c: Remove file.
12979 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12980 (linux-ppc64-low.o): Remove rule.
12981
12982 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12983 (init_registers_powerpc_64): Likewise.
12984 (ppc_regmap): Conditionally define depending on __powerpc64__.
12985 (ppc_cannot_store_register): Do not special-case "fpscr" when
12986 compiled on __powerpc64__.
12987 (ppc_collect_ptrace_register): New function.
12988 (ppc_supply_ptrace_register): New function.
12989 (ppc_breakpoint): Change type to "unsigned int".
12990 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12991 (the_low_target): Conditionally provide initializers for the
889bf7c5 12992 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12993 collect_ptrace_register and supply_ptrace_register members.
12994
9b4b61c8
UW
129952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12996
12997 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12998 * server.c (gdbserver_xmltarget): Define.
12999 (get_features_xml): Use it to replace "target.xml" and arch_string.
13000
13001 * configure.srv: Remove srv_xmltarget. Add XML files that were
13002 mentioned there to srv_xmlfiles instead. Remove conditional tests
13003 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13004 srv_xmlfiles and srv_regobj to include all possible choices.
13005 * configure.ac (srv_xmltarget): Remove.
13006 (srv_xmlfiles): Do not add "target.xml".
13007 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13008 checks for supplementary target information.
13009 * configure: Regenerate.
13010 * Makefile.in (XML_TARGET): Remove.
13011 (target.xml): Remove rule.
13012 (clean): Do not clean up target.xml.
13013 (.PRECIOUS): Do not mention target.xml.
13014
13015 * target.h (struct target_ops): Remove arch_string member.
13016 * linux-low.c (linux_arch_string): Remove.
13017 (linux_target_ops): Remove arch_string initializer.
13018 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13019 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13020 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13021 * spu-low.c (spu_arch_string): Remove.
13022 (spu_target_ops): Remove arch_string initializer.
13023 * win32-low.c (win32_arch_string): Remove.
13024 (win32_target_ops): Remove arch_string initializer.
13025 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13026 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13027 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13028
ee1a7ae4
UW
130292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13030
13031 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13032 by collect_ptrace_register and supply_ptrace_register hooks.
13033 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13034 instead of checking for the_low_target.left_pad_xfer.
13035 (usr_store_inferior_registers): Use collect_ptrace_register callback
13036 instead of checking for the_low_target.left_pad_xfer.
13037
13038 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13039 (s390_supply_ptrace_register): Likewise.
13040 (s390_fill_gregset): Call s390_collect_ptrace_register.
13041 (the_low_target): Update.
13042
13043 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13044 (ppc_supply_ptrace_register): Likewise.
13045 (the_low_target): Update.
13046
13047 * linux-i386-low.c (the_low_target): Update.
13048 * linux-x86-64-low.c (the_low_target): Update.
13049
d61ddec4
UW
130502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13051
13052 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13053 reg-s390.o and reg-s390x.o.
13054
13055 * linux-low.c (new_inferior): New global variable.
13056 (linux_create_inferior, linux_attach): Set it.
13057 (linux_wait_for_process): Call the_low_target.arch_setup after the
13058 target has stopped for the first time.
13059 (initialize_low): Do not call the_low_target.arch_setup.
13060
13061 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13062 (s390_set_pc): Likewise.
13063 (s390_arch_setup): New function.
13064 (the_low_target): Use s390_arch_setup as arch_setup routine.
13065
13066 * regcache.c (realloc_register_cache): New function.
13067 (set_register_cache): Call it for each existing regcache.
13068
d05b4ac3
UW
130692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13070
13071 * server.h (init_registers): Remove prototype.
13072
13073 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13074 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13075 instead of init_registers ().
13076 * linux-arm-low.c (init_registers_arm): Add prototype.
13077 (init_registers_arm_with_iwmmxt): Likewise.
13078 (the_low_target): Add initializer for arch_setup field.
13079 * linux-cris-low.c (init_registers_cris): Add prototype.
13080 (the_low_target): Add initializer for arch_setup field.
13081 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13082 (the_low_target): Add initializer for arch_setup field.
13083 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13084 (the_low_target): Add initializer for arch_setup field.
13085 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13086 (the_low_target): Add initializer for arch_setup field.
13087 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13088 (the_low_target): Add initializer for arch_setup field.
13089 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13090 (the_low_target): Add initializer for arch_setup field.
13091 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13092 (init_registers_mips64_linux): Likewise.
13093 (the_low_target): Add initializer for arch_setup field.
13094 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13095 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13096 (the_low_target): Add initializer for arch_setup field.
13097 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13098 (init_registers_powerpc_64): Likewise.
13099 (the_low_target): Add initializer for arch_setup field.
13100 * linux-s390-low.c (init_registers_s390): Add prototype.
13101 (init_registers_s390x): Likewise.
13102 (the_low_target): Add initializer for arch_setup field.
13103 * linux-sh-low.c (init_registers_sh): Add prototype.
13104 (the_low_target): Add initializer for arch_setup field.
13105 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13106 (the_low_target): Add initializer for arch_setup field.
13107 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13108 (the_low_target): Add initializer for arch_setup field.
13109
13110 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13111 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13112 instead of init_registers ().
13113 * win32-arm-low.c (init_registers_arm): Add prototype.
13114 (the_low_target): Add initializer for arch_setup field.
13115 * win32-i386-low.c (init_registers_i386): Add prototype.
13116 (the_low_target): Add initializer for arch_setup field.
13117
13118 * spu-low.c (init_registers_spu): Add prototype.
13119 (initialize_low): Call initialie_registers_spu () instead of
13120 initialize_registers ().
13121
fd96d250
PA
131222008-02-19 Pedro Alves <pedro@codesourcery.com>
13123
13124 * server.c (handle_v_requests): When handling the vRun and vAttach
13125 packets, if already debugging a process, don't kill it. Return an
13126 error instead.
13127
d41b6bb4
DJ
131282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13129
13130 * server.c (handle_query): Correct length check.
13131
5ac588cf
PA
131322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13133
13134 * win32-low.c (do_initial_child_stuff): Add process handle
13135 parameter. Set current_process_handle and current_process_id from the
13136 parameters. Clear globals.
13137 (win32_create_inferior): Don't set current_process_handle and
13138 current_process_id here. Instead pass them on the call to
13139 do_initial_child_stuff.
13140 (win32_attach): Likewise.
13141 (win32_clear_inferiors): New.
13142 (win32_kill): Don't close the current process handle or the
13143 current thread handle here. Instead call win32_clear_inferiors.
13144 (win32_detach): Don't open a new handle to the process. Call
13145 win32_clear_inferiors.
13146 (win32_join): Don't rely on current_process_handle; open a new
13147 handle using the process id.
13148 (win32_wait): Call win32_clear_inferiors when the inferior process
13149 has exited.
13150
ecd7ecbc
DJ
131512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13152
13153 * server.c (monitor_show_help): Add "exit".
13154
1525d545
MG
131552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13156
ecd7ecbc 13157 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13158 (clean): Add reg-xtensa.c.
13159 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13160 * configure.srv (xtensa*-*-linux*) New target.
13161 * linux-xtensa-low.c: New.
13162 * xtensa-xtregs.c: New.
1525d545 13163
59a016f0
PA
131642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13165
13166 * hostio.c: Don't include errno.h.
13167 (errno_to_fileio_errno): Move to hostio-errno.
13168 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13169 error number outputting to the target->hostio_last_error callback.
13170 (hostio_packet_error): Use FILEIO_EINVAL directly.
13171 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13172 calls to hostio_error.
13173 * hostio-errno.c: New.
13174 * server.h (hostio_last_error_from_errno): Declare.
13175 * target.h (target_ops): Add hostio_last_error member.
13176 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13177 as hostio_last_error handler.
889bf7c5 13178 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13179 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13180 (wince_hostio_last_error): New functions.
13181 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13182 as hostio_last_error handler.
13183 (win32_target_ops) [!_WIN32_WCE]: Register
13184 hostio_last_error_from_errno as hostio_last_error handler.
13185 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13186 (hostio-errno.o): New rule.
13187 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13188 * configure.srv (srv_hostio_err_objs): New variable. Default to
13189 hostio-errno.o.
13190 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13191 * configure: Regenerate.
13192
2d717e4f
DJ
131932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13194
13195 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13196 (linux_kill, linux_detach): Clean up the process list.
13197 * remote-utils.c (remote_open): Improve port number parsing.
13198 (putpkt_binary, input_interrupt): Only send interrupts if the target
13199 is running.
13200 * server.c (extended_protocol): Make static.
13201 (attached): Define earlier.
13202 (exit_requested, response_needed, program_argv): New variables.
13203 (target_running): New.
13204 (start_inferior): Clear attached here.
13205 (attach_inferior): Set attached here.
13206 (require_running): Define.
13207 (handle_query): Use require_running and target_running. Implement
13208 "monitor exit".
13209 (handle_v_attach, handle_v_run): New.
13210 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13211 (gdbserver_usage): Update.
13212 (main): Redo argument parsing. Handle --debug and --multi. Handle
13213 --attach along with other options or after the port. Save
13214 program_argv. Support no initial program. Resynchronize
13215 communication with GDB after an error. Handle "monitor exit".
13216 Use require_running and target_running. Always allow the extended
13217 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13218 restart in extended mode.
13219 * README: Refer to the GDB manual. Update --attach usage.
13220
7407e2de
AS
132212007-12-20 Andreas Schwab <schwab@suse.de>
13222
13223 * linux-low.c (STACK_SIZE): Define.
13224 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13225 (linux_test_for_tracefork): Likewise.
13226
b65d95c5
DJ
132272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13228
13229 * linux-low.c (linux_wait_for_event): Update messages. Do not
13230 reinsert auto-delete breakpoints.
13231 * mem-break.c (struct breakpoint): Change return type of handler to
13232 int.
13233 (set_breakpoint_at): Update handler type.
13234 (reinsert_breakpoint_handler): Return 1 instead of calling
13235 delete_breakpoint.
13236 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13237 setting a new one.
13238 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13239 * mem-break.h (set_breakpoint_at): Update handler type.
13240 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13241 * win32-low.c (auto_delete_breakpoint): New.
13242 (get_child_debug_event): Use it.
13243
4e799345
DJ
132442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13245
13246 * configure.ac: Check for pread and pwrite.
13247 * hostio.c (handle_pread): Fall back to lseek and read.
13248 (handle_pwrite): Fall back to lseek and write.
13249 * config.in, configure: Regenerated.
13250
27524b67
DJ
132512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13252
13253 * server.c (myresume): Add own_buf argument.
13254 (main): Update calls.
13255
a20d5e98
DJ
132562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13259 * remote-utils.c (remote_open): Do not call disable_async_io.
13260 (block_async_io): Delete.
13261 (unblock_async_io): Make static.
13262 (initialize_async_io): New.
13263 * server.c (handle_v_cont): Handle async I/O here.
13264 (myresume): Likewise. Move other common resume tasks here...
13265 (main): ... from here. Call initialize_async_io. Disable async
13266 I/O before the main loop.
13267 * server.h (initialize_async_io): Declare.
13268 (block_async_io, unblock_async_io): Delete prototypes.
13269 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13270
b79d787e
DJ
132712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13272
13273 * remote-utils.c (readchar): Allow binary data in received messages.
13274
d97903b2
PA
132752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13276
13277 * win32-low.c (attaching): New global.
13278 (win32_create_inferior): Clear the `attaching' global.
13279 (win32_attach): Set the `attaching' global.
13280 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13281 attaching. Only set a breakpoint at the entry point if not
13282 attaching.
13283
311de423
PA
132842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13285
13286 * server.c (main): Don't report dll events on the initial
13287 connection on attaches.
13288
6c2d16d2
PA
132892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13290
13291 * server.c (main): Relax numerical bases supported for the pid of
13292 the --attach command line argument.
13293
5ca906e6
PA
132942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13295
13296 * win32-low.c (win32_attach): Call OpenProcess before
13297 DebugActiveProcess, not after. Add last error output to error
13298 call.
13299
9c6c8194
PA
133002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13301
13302 * win32-low.c (win32_get_thread_context)
13303 (win32_set_thread_context): New functions.
13304 (thread_rec): Use win32_get_thread_context.
13305 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13306 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13307 field.
13308
4d5d1aaa
PA
133092007-12-03 Leo Zayas
13310 Pedro Alves <pedro_alves@portugalmail.pt>
13311
13312 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13313 global variables.
13314 (child_add_thread): Minor cleanup.
13315 (child_continue): Resume artificially suspended threads before
13316 calling ContinueDebugEvent.
13317 (suspend_one_thread): New.
13318 (fake_breakpoint_event): New.
13319 (get_child_debug_event): Change return type to int. Check here if
13320 gdb sent an interrupt request. If a soft interrupt was requested,
13321 fake a breakpoint event. Return 0 if there is no event to handle,
13322 and 1 otherwise.
13323 (win32_wait): Don't check here if gdb sent an interrupt request.
13324 Ensure there is a valid event to handle.
13325 (win32_request_interrupt): Add soft interruption method as last
13326 resort.
13327
c436e841
PA
133282007-12-03 Leo Zayas
13329 Pedro Alves <pedro_alves@portugalmail.pt>
13330
13331 * win32-low.h (win32_thread_info): Add descriptions to the
13332 structure members. Replace `suspend_count' counter by a
13333 `suspended' flag.
13334 * win32-low.c (thread_rec): Update condition of when to get the
13335 context from the inferior. Rely on ContextFlags being set if it
13336 has already been retrieved. Only suspend the inferior thread if
13337 we haven't already. Warn if that fails.
13338 (continue_one_thread): s/suspend_count/suspended/. Only call
13339 ResumeThread once. Warn if that fails.
13340
e7b5fa67
PA
133412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13342
13343 * win32-low.c (win32_wait): Don't read from the inferior when it
13344 has already exited.
13345
a385171d
PA
133462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13347
13348 * Makefile.in (win32_low_h): New variable.
13349 (win32-low.o): Add dependency on $(win32_low_h).
13350 (win32-arm-low.o, win32-i386-low.o): New rules.
13351
f80c84b3
DJ
133522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13353
13354 * hostio.c: Correct copyright year.
13355
a6b151f1
DJ
133562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13357
13358 * Makefile.in (OBS): Add hostio.o.
13359 (hostio.o): New rule.
13360 * server.h (handle_vFile): Declare.
13361 * hostio.c: New file.
13362 * server.c (handle_v_requests): Take packet_len and new_packet_len
13363 for binary packets. Call handle_vFile.
13364 (main): Update call to handle_v_requests.
13365
f9387fc3
DJ
133662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13367
13368 * linux-low.c: Include <sched.h>.
13369
51c2684e
DJ
133702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13371
13372 * linux-low.c (linux_tracefork_grandchild): New.
13373 (linux_tracefork_child): Use clone.
13374 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13375
75f83163
JB
133762007-10-31 Joel Brobecker <brobecker@adacore.com>
13377
13378 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13379
da5898ce
DJ
133802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13383
24a09b5f
DJ
133842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13385
13386 * inferiors.c (change_inferior_id): Delete.
13387 (add_pid_to_list, pull_pid_from_list): New.
13388 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13389 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13390 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13391 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13392 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13393 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13394 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13395 (using_threads): Always set to 1.
13396 (handle_extended_wait): New.
13397 (add_process): Do not set TID.
13398 (linux_create_inferior): Set must_set_ptrace_flags.
13399 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13400 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13401 (linux_thread_alive): Rename TID argument to LWPID.
13402 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13403 (linux_wait_for_event): Do not use TID or check using_threads. Update
13404 call to dead_thread_notify. Call handle_extended_wait.
13405 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13406 (send_sigstop): Delete sigstop_sent.
13407 (wait_for_sigstop): Avoid TID.
13408 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13409 (linux_test_for_tracefork): New.
13410 (linux_lookup_signals): Use thread_db_active and
13411 linux_supports_tracefork_flag.
13412 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13413 * linux-low.h (get_process_thread): Avoid TID.
13414 (struct process_ifo): Move thread_known and tid to the end. Remove
13415 sigstop_sent.
13416 (linux_attach_lwp, thread_db_init): Update prototypes.
13417 * server.h (change_inferior_id): Delete prototype.
13418 (add_pid_to_list, pull_pid_from_list): New prototypes.
13419 * thread-db.c (thread_db_use_events): New.
13420 (find_first_thread): Rename to...
13421 (find_one_thread): ...this. Update callers and messages. Do not
13422 call fatal. Check thread_db_use_events. Do not call
13423 change_inferior_id or new_thread_notify.
13424 (maybe_attach_thread): Update. Do not call new_thread_notify.
13425 (thread_db_init): Set thread_db_use_events. Check use_events.
13426 * utils.c (fatal, warning): Correct message prefix.
13427
30ed0a8f
DJ
134282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13429
13430 * Makefile.in (clean): Remove new files.
13431 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13432 (powerpc-64.o, powerpc-64.c): New rules.
13433 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13434 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13435 with SPE.
13436 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13437 SPE targets.
13438 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13439 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13440 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13441 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13442 (target_regsets): Add AltiVec and SPE register sets.
13443 * configure.ac: Check for AltiVec and SPE.
13444 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13445 (ppc_fill_vrregset, ppc_store_vrregset): New.
13446 (target_regsets): Add AltiVec register set.
13447 * configure: Regenerated.
13448
fd462a61
DJ
134492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13450
13451 * linux-low.c (O_LARGEFILE): Define.
13452 (linux_read_memory): Use /proc/PID/mem.
13453 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13454 * configure, config.in: Regenerated.
13455
69f223ed
DJ
134562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * linux-low.c (linux_wait_for_event): Do not pass signals while
13459 single-stepping.
13460
aec18585
PA
134612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13462
13463 * win32-low.c (create_process): New.
13464 (win32_create_inferior): Use create_process instead of
13465 CreateProcess. If create_process failed retry appending an ".exe"
13466 suffix. Store the GetLastError result immediatelly after
13467 create_process calls and use it on the call to error.
13468
34d86ddd
PA
134692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13472
5a0e3bd0
JB
134732007-08-23 Joel Brobecker <brobecker@adacore.com>
13474
13475 * configure.ac: Switch license to GPLv3.
13476
f88c79e6
MS
134772007-08-01 Michael Snyder <msnyder@access-company.com>
13478
13479 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13480
6b3d9b83
PA
134812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13482
13483 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13484 typedef.
13485 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13486 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13487 CloseToolhelp32Snapshot.
13488 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13489 CloseToolhelp32Snapshot.
13490
c588c53c
MS
134912007-07-27 Michael Snyder <michael.snyder@access-company.com>
13492
13493 * server.c (main): Check for inferior exit before main loop.
13494
aa0403d9
PA
134952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13496
13497 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13498 instead of on tmp_desc.
13499
255e7678
DJ
135002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13501 Daniel Jacobowitz <dan@codesourcery.com>
13502
13503 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13504 (add_thread): Minor cleanups.
13505 (clear_inferiors): Move lower in the file. Clear the DLL
13506 list.
13507 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13508 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13509 (xml_escape_text): New.
13510 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13511 for qSupported.
13512 (handle_v_cont): Report errors.
13513 (gdbserver_version): Update.
13514 (main): Correct size of own_buf. Do not report initial DLL events.
13515 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13516 (unloaded_dll, xml_escape_text): New.
13517 * win32-low.c (enum target_waitkind): Update comments.
13518 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13519 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13520 (win32_EnumProcessModules, win32_GetModuleInformation)
13521 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13522 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13523 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13524 (win32_Module32First, win32_Module32Next, load_toolhelp)
13525 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13526 (get_child_debug_event): Handle DLL events.
13527 (win32_wait): Likewise.
13528
0d37add9
DJ
135292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13530
13531 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13532 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13533
45e2715e
PA
135342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13535
13536 * win32-low.c (handle_output_debug_string): Ignore event if not
13537 waiting.
13538
c5674cf1
PA
135392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13540
13541 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13542
2bbe3cc1
DJ
135432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13544
13545 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13546
ae13219e
DJ
135472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13548
13549 * inferiors.c (change_inferior_id): Add comment.
13550 * linux-low.c (check_removed_breakpoint): Add an early
13551 prototype. Improve debug output.
13552 (linux_attach): Doc update.
13553 (linux_detach_one_process, linux_detach): Clean up before releasing
13554 each process.
13555 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13556 * linux-low.h (struct process_info): Doc improvement.
13557 * mem-break.c (delete_all_breakpoints): New.
13558 * mem-break.h (delete_all_breakpoints): New prototype.
13559 * thread-db.c (find_first_thread): New.
13560 (thread_db_create_event): Call it instead of
13561 thread_db_find_new_threads. Clean up unused variables.
13562 (maybe_attach_thread): Remove first thread handling.
13563 (thread_db_find_new_threads): Use find_first_thread.
13564 (thread_db_get_tls_address): Likewise.
13565
4105de34
DJ
135662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13567
13568 * thread-db.c (thread_db_find_new_threads): Add prototype.
13569 (thread_db_create_event): Check for the main thread before adding
13570 a new thread.
13571 (maybe_attach_thread): Only enable event reporting if TID == 0.
13572 (thread_db_get_tls_address): Check for new threads.
13573
2b876972
DJ
135742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * linux-low.c (linux_create_inferior): Try execv before execvp.
13577 * spu-low.c (spu_create_inferior): Likewise.
13578
7a245884
DJ
135792007-06-13 Mike Frysinger <vapier@gentoo.org>
13580
13581 * linux-low.c (linux_create_inferior): Change execv to execvp.
13582 * spu-low.c (spu_create_inferior): Likewies.
13583
117ce543
DJ
135842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * Makefile.in (clean): Clean new files instead of deleted ones.
13587 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13588 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13589 rules.
13590 * configure.srv: Specify XML files and new regformats for MIPS and
13591 MIPS64 GNU/Linux.
13592 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13593 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13594 an entry for the restart register.
13595 (mips_cannot_fetch_register, mips_cannot_store_register)
13596 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13597 register names to match the XML descriptions.
13598 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13599 restart register instead of $0.
13600
0e7f50da
UW
136012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13602 Markus Deuling <deuling@de.ibm.com>
13603
13604 * remote-utils.c (decode_xfer_write): New function.
13605 * server.h (decode_xfer_write): Add prototype.
13606 * server.c (handle_query): Add PACKET_LEN argument. Support
13607 qXfer:spu:read and qXfer:spu:write packets.
13608 (main): Pass packet_len to handle_query.
13609 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13610 * target.h (target_ops): Add qxfer_spu.
13611
374c1d38
UW
136122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13613
13614 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13615 accessing non-seekable spufs files.
13616
bb63802a
UW
136172007-05-16 Markus Deuling <deuling@de.ibm.com>
13618
889bf7c5 13619 * server.c (handle_query): Add reply for qC packet.
bb63802a 13620
7390519e
PA
136212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13622 Leo Zayas <lerele@champenstudios@com>
13623
13624 * server.h (check_remote_input_interrupt_request): New function.
13625 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13626 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13627 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13628 (check_remote_input_interrupt_request): New function.
13629 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13630 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13631 winapi_GenerateConsoleCtrlEvent): New typedefs.
13632 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13633 to 250 ms.
13634 (win32_wait): Check for remote interrupt request
13635 with check_remote_input_interrupt_request.
13636 (win32_request_interrupt): New function.
13637 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13638
34b34921
PA
136392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13640
13641 * win32-low.c (debug_registers_changed,
13642 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13643 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13644 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13645 (thread_rec): Get context using the low target.
13646 (child_add_thread): Call thread_added on the low target,
13647 which does the same thing.
13648 (regptr): Delete.
13649 (do_initial_child_stuff): Remove debug registers references.
13650 Set context using the low target. Resume threads after
13651 setting the contexts.
13652 (child_continue): Remove dead variable. Remove debug
13653 registers references.
13654 (child_fetch_inferior_registers): Go through the low target.
13655 (do_child_store_inferior_registers): Remove.
13656 (child_store_inferior_registers): Go through the low target.
13657 (win32_resume): Remove debug registers references.
13658 Set context using the low target.
13659 (handle_exception): Change return type to void. Don't record
13660 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13661 first chance exception.
889bf7c5 13662 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13663 goto loop. Always return after waiting for debug event.
13664 (win32_wait): Convert to switch statement. Handle spurious
13665 events.
13666
13667 * win32-i386-low.c (debug_registers_changed,
13668 debug_registers_used): New.
13669 (initial_stuff): Rename to ...
13670 (i386_initial_stuff): ... this. Clear debug registers
13671 state variables.
13672 (store_debug_registers): Delete.
13673 (i386_get_thread_context): New.
13674 (load_debug_registers): Delete.
13675 (i386_set_thread_context): New.
13676 (i386_thread_added): New.
13677 (single_step): Rename to ...
13678 (i386_single_step): ... this.
13679 (do_fetch_inferior_registers): Rename to ...
13680 (i386_fetch_inferior_register): ... this.
13681 (i386_store_inferior_register): New.
13682 (the_low_target): Adapt to new interface.
13683
13684 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13685 (arm_get_thread_context): New.
13686 (arm_set_thread_context): New.
13687 (regptr): New.
13688 (do_fetch_inferior_registers): Rename to ...
13689 (arm_fetch_inferior_register): ... this.
13690 (arm_store_inferior_register): New.
13691 (arm_wince_breakpoint): Reimplement as unsigned long.
13692 (arm_wince_breakpoint_len): Define.
13693 (the_low_target): Adapt to new interface.
13694
13695 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13696 load_debug_registers. Add get_thread_context, set_thread_context,
13697 thread_added and store_inferior_register. Rename
13698 fetch_inferior_registers to fetch_inferior_register.
13699 (regptr): Remove declaration.
13700
dd6953e1
PA
137012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13702
13703 * linux-low.c (linux_detach): Change return type to int. Return 0.
13704 * spu-low.c (spu_detach): Likewise.
13705
444d6139
PA
137062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13707
13708 * target.h (target_ops): Change return type of detach to int.
13709 Add join.
13710 (join_inferior): New.
13711 * server.c (main): Don't skip detach support on mingw32.
13712 If the inferior doesn't support detaching return error.
13713 Call join_inferior instead of using waitpid.
13714 * linux-low.c (linux_join): New.
13715 (linux_target_op): Add linux_join.
13716 * spu-low.c (spu_join): New.
13717 (spu_target_ops): Add spu_join.
13718 * win32-low.c (win32_detach): Adapt to new interface.
13719 Reopen current_process_handle before detaching. Issue a child
13720 resume before detaching.
13721 (win32_join): New.
13722 (win32_target_op): Add win32_join.
13723
1d5315fe
PA
137242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13725
13726 * win32-low.c (win32-attach): Fix return value.
13727 * target.h (target_ops): Describe ATTACH return values.
13728
bf914831
PA
137292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13730
13731 * win32-low.c (GETPROCADDRESS): Define.
13732 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13733 (winapi_DebugSetProcessKillOnExit): Likewise.
13734 (win32_create_inferior): Force usage of ansi CreateProcessA.
13735 (win32_attach): Use GETPROCADDRESS.
13736 (win32_detach): Likewise.
13737
f72f3e60
PA
137382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13739
13740 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13741
ed50f18f
PA
137422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13743
13744 * win32-low.c: Commit leftover changes from 2007-03-29.
13745
0c2ead7e
DJ
137462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13749 fields short instead of int. Add explicit padding.
13750 (i387_cache_to_fsave): Remove unnecessary casts.
13751 (i387_fsave_to_cache): Doc fix.
13752 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13753
73725ff3
DJ
137542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13755
13756 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13757 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13758
d99f33d8
PA
137592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13760
13761 * configure.srv (arm*-*-mingw32ce*): Move near the other
13762 arm targets.
13763
68070c10
PA
137642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13765
2482afc6 13766 * configure.ac: Add errno checking.
68070c10
PA
13767 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13768 sys/file.h and malloc.h.
13769 (AC_CHECK_DECLS): Add perror.
13770 (srv_mingwce): Handle.
2482afc6 13771 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13772 win32-i386-low.o to srv_tgtobj.
13773 (i[34567]86-*-mingw*): Likewise.
13774 (arm*-*-mingw32ce*): Add case.
13775 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13776 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13777 [__MINGW32CE__] (strerror): New function.
13778 [__MINGW32CE__] (errno): Define to GetLastError.
13779 [__MINGW32CE__] (COUNTOF): New macro.
13780 (remote_open): Remove extra close call.
13781 * mem-break.c (delete_breakpoint_at): New function.
13782 * mem-break.h (delete_breakpoint_at): Declare.
13783 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13784 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13785 [USE_WIN32API] (read, write): Add char* casts.
13786 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13787 * server.h: Include wincecompat.h on Windows CE.
13788 [HAVE_ERRNO_H]: Check.
13789 (perror): Declare if not declared.
13790 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13791 (perror_with_name): Remove errno declaration.
13792 * wincecompat.h: New.
13793 * wincecompat.c: New.
13794 * win32-low.h: New.
13795 * win32-arm-low.c: New.
13796 * win32-i386-low.c: New.
13797 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13798 (OUTMSG2): Make it safe.
13799 (_T): New macro.
13800 (COUNTOF): New macro.
13801 (NUM_REGS): Get it from the low target.
13802 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13803 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13804 (thread_rec): Let low target handle debug registers.
13805 (child_add_thread): Likewise.
13806 (child_init_thread_list): Likewise.
13807 (continue_one_thread): Likewise.
13808 (regptr): New.
13809 (do_child_fetch_inferior_registers): Move to ...
13810 * win32-i386-low.c: ... here, and rename to ...
13811 (do_fetch_inferior_registers): ... this.
889bf7c5 13812 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13813 Go through the low target.
13814 (do_child_store_inferior_registers): Use regptr.
13815 (strwinerror): New function.
13816 (win32_create_inferior): Handle Windows CE.
13817 Use strwinerror instead of strerror on Windows error
13818 codes. Add program to the error output.
13819 Don't close the main thread handle on Windows CE.
13820 (win32_attach): Use coredll.dll on Windows CE.
13821 (win32_kill): Close current process and current
13822 thread handles.
13823 (win32_detach): Use coredll.dll on Windows CE.
13824 (win32_resume): Let low target handle debug registers, and
13825 step request.
13826 (handle_exception): Add/Remove initial breakpoint. Avoid
13827 non-existant WSTOPSIG on Windows CE.
13828 (win32_read_inferior_memory): Cast to remove warning.
13829 (win32_arch_string): Go through the low target.
13830 (initialize_low): Call set_breakpoint_data with the low
13831 target's breakpoint.
13832 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13833 FOP_REGNUM, mappings): Move to ...
13834 * win32-i386-low.c: ... here.
13835 * win32-low.c (win32_thread_info): Move to ...
13836 * win32-low.h: ... here.
13837 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13838 win32-arm-low.c and wincecompat.c.
13839 (all:): Add $EXEEXT.
13840 (install-only:): Likewise.
13841 (gdbserver:): Likewise.
13842 (gdbreplay:): Likewise.
13843 * config.in: Regenerate.
13844 * configure: Regenerate.
13845
41093d81
PA
138462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13847
13848 * win32-low.c: Rename typedef thread_info to
13849 win32_thread_info throughout.
13850
544afa54
PA
138512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13852
13853 * win32-i386-low.c: Rename to ...
13854 * win32-low.c: ... this.
13855 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13856 * Makefile.in: Likewise.
13857
bce7165d
PA
138582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13859
13860 * remote-utils.c (monitor_output): Constify msg parameter.
13861 * server.h (monitor_output): Likewise.
13862 * win32-i386-low.c (handle_output_debug_string): New.
13863 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13864 handle_output_debug_string.
13865 (get_child_debug_event): Likewise.
13866
506c7aa0
DJ
138672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13868
13869 * server.c (main): Correct strtoul check.
13870
42c81e2a
DJ
138712007-03-27 Jon Ringle <jon@ringle.org>
13872
13873 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13874
9453113a
DJ
138752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13876
13877 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13878
64a69107
DJ
138792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13880
13881 * terminal.h: Check HAVE_SGTTY_H.
13882
138832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13884
13885 * remote-utils.c (remote_open): Print out the assigned port number.
13886
c74d0ad8
DJ
138872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13888
13889 * remote-utils.c (monitor_output): New function.
13890 * server.c (debug_threads): Define here.
13891 (monitor_show_help): New function.
13892 (handle_query): Handle qRcmd.
13893 (main): Do not handle 'd' packet.
13894 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13895 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13896 of debug_threads.
13897
de7c3b4a
PA
138982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13899
13900 * Makefile.in (EXEEXT): New.
13901 (clean): Use $(EXEEXT).
13902
ef57601b
PA
139032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13904
13905 * target.h (target_ops): Rename send_signal to request_interrupt,
13906 and remove enum target_signal parameter.
13907 * linux-low.c (linux_request_interrupt): Rename from
13908 linux_send_signal, and always send SIGINT.
13909 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13910 and always send SIGINT.
13911 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13912 of send_signal.
13913 (input_interrupt): Likewise.
13914
820f2bda
PA
139152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13916
13917 * server.c (get_features_xml): Check if target implemented
13918 arch_string.
13919 * win32-i386-low.c (win32_arch_string): New.
13920 (win32_target_ops): Add win32_arch_string as arch_string member.
13921
ab39bf24
UW
139222007-02-22 Markus Deuling <deuling@de.ibm.com>
13923
13924 * spu-low.c (spu_arch_string): New.
13925 (spu_target_ops): Add spu_arch_string.
13926
61ff6e04
DJ
139272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13930 * configure.ac: Do not check for terminal.h.
13931 * configure, config.in: Regenerated.
13932
fb1e4ffc
DJ
139332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13934
13935 * Makefile.in (OBS): Add $(XML_BUILTIN).
13936 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13937 (clean): Update.
13938 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13939 (arm-with-iwmmxt.c): New.
13940 * config.in, configure: Regenerate.
13941 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13942 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13943 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13944 (arm*-*-linux*): Add iWMMXt and regset support.
13945 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13946 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13947 (arm_store_wmmxregset, target_regsets): New.
13948 * server.c (get_features_xml): Take annex argument. Check builtin
13949 XML documents.
13950 (handle_query): Handle multiple annexes.
13951
0f48aa01
DJ
139522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13953
13954 * remote-utils.c [USE_WIN32API] (read, write): Define.
13955 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13956 write.
13957
23181151
DJ
139582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13959
13960 * linux-i386-low.c (the_low_target): Set arch_string.
13961 * linux-x86-64-low.c (the_low_target): Likewise.
13962 * linux-low.c (linux_arch_string): New.
13963 (linux_target_ops): Add it.
13964 * linux-low.h (struct linux_target_ops): Add arch_string.
13965 * server.c (write_qxfer_response): Use const void * for DATA.
13966 (get_features_xml): New.
13967 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13968 * target.h (struct target_ops): Add arch_string method.
13969
9d606399
DJ
139702007-01-03 Denis Pilat <denis.pilat@st.com>
13971 Daniel Jacobowitz <dan@codesourcery.com>
13972
13973 * linux-low.c (linux_kill): Handle being called with no threads.
13974 * win32-i386-low.c (win32_kill): Likewise.
13975 (get_child_debug_event): Clear current_process_handle.
13976
139772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13978 Daniel Jacobowitz <dan@codesourcery.com>
13979
13980 * remote-utils.c (remote_open): Check the type of specified
13981 serial port devices before opening them.
13982 * server.c (main): Kill the inferior if an error occurs during
13983 the first remote_open.
13984
a5e13d24
DJ
139852006-12-05 Markus Deuling <deuling@de.ibm.com>
13986
13987 * README: Update supported targets.
13988
186947f7
DJ
139892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13990
13991 * Makefile.in (clean): Remove reg-mips64.c.
13992 (reg-mips64.c, reg-mips64.o): New rules.
13993 * configure.srv: Handle mips64. Include regset support for mips.
13994 * linux-mips-low.c (union mips_register): New.
13995 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13996 (mips_breakpoint, mips_breakpoint_at): Use int.
13997 (mips_collect_register, mips_supply_register)
13998 (mips_collect_register_32bit, mips_supply_register_32bit)
13999 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14000 (mips_store_fpregset, target_regsets): New.
14001 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14002
a13e2c95
UW
140032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14004
14005 * configure.srv: Add target "spu*-*-*".
14006 * Makefile.in (clean): Remove reg-spu.c.
14007 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14008 * spu-low.c: New file.
14009
cb7283db
DJ
140102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14011
14012 * configure.ac: Correct td_thr_tls_get_addr test.
14013 * configure: Regenerated.
14014
89be2091
DJ
140152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14016
14017 * linux-low.c (linux_wait_for_event): Reformat. Use the
14018 pass_signals array.
14019 * remote-utils.c (decode_address_to_semicolon): New.
14020 * server.c (pass_signals, handle_general_set): New.
14021 (handle_query): Mention QPassSignals for qSupported.
14022 (main): Call handle_general_set.
14023 * server.h (pass_signals, decode_address_to_semicolon): New.
14024
000ef4f0
DJ
140252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14026
14027 * server.c (handle_query): Correct error handling for read_auxv.
14028
b7149293
UW
140292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14030
14031 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14032 and srv_linux_thread_db to yes.
14033 * linux-s390-low.c (s390_fill_gregset): New function.
14034 (target_regsets): Define data structure.
14035
dae5f5cf
DJ
140362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14037
14038 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14039 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14040 * config.in, configure: Regenerated.
14041 * inferiors.c (gdb_id_to_thread): New function.
14042 (gdb_id_to_thread_id): Use it.
14043 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14044 * linux-low.h (struct process_info): Add th member.
14045 (thread_db_get_tls_address): New prototype.
14046 * remote-utils.c (decode_address): Make non-static.
14047 * server.c (handle_query): Handle qGetTLSAddr.
14048 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14049 * target.h (struct target_ops): Add get_tls_address.
14050 * thread-db.c (maybe_attach_thread): Save the thread handle.
14051 (thread_db_get_tls_address): New.
14052
32ca6d61
DJ
140532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14056 (linux_resume_one_process): Take a siginfo_t *. Update all
14057 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14058 (struct pending_signals): Add a siginfo_t.
14059 (linux_wait_for_process): Always set last_status.
14060 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14061 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14062 * linux-low.h (struct process_info): Add last_status.
14063
5ffff7c1
DJ
140642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14065
14066 * remote-utils.c (try_rle): New function.
14067 (putpkt_binary): Use it.
14068
8695c747
DJ
140692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14070
14071 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14072 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14073 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14074 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14075 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14076 point registers.
14077
290fadea
RS
140782006-08-08 Richard Sandiford <richard@codesourcery.com>
14079
14080 * server.c (terminal_fd): New variable.
14081 (old_foreground_pgrp): Likewise.
14082 (restore_old_foreground_pgrp): New function.
14083 (start_inferior): Record the terminal file descriptor in terminal_fd
14084 and its original foreground group in old_foreground_pgrp. Register
14085 restore_old_foreground_pgrp with atexit().
14086
9f2e1e63
DJ
140872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * server.c (handle_query): Correct qPart to qXfer.
14090
b80864fb
DJ
140912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14092
14093 * configure.ac: Check for more headers which are missing on
14094 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14095 * configure.srv: Add Cygwin and mingw32.
14096 * remote-utils.c: Don't include headers unconditionally which
14097 are missing on mingw32. Include <winsock.h> for mingw32.
14098 (remote_open): Adjust for mingw32 support. Flush
14099 standard error after writing to it.
14100 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14101 (unblock_async_io, enable_async_io, disable_async_io)
14102 (readchar, getpkt): Update for Winsock support.
14103 (prepare_resume_reply): Expect a protocol signal number.
14104 * server.c: Disable <sys/wait.h> on mingw32.
14105 (start_inferior): Adjust for mingw32 support. Flush
14106 standard error after writing to it.
14107 (attach_inferior): Likewise. Use protocol signal
14108 numbers.
14109 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14110 and names.
14111 * win32-i386-low.c: New file.
14112 * Makefile.in (XM_CLIBS): Set.
14113 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14114 (win32-i386-low.o): New dependency rule.
14115 * linux-low.c (linux_wait): Use target signal numbers.
14116 * target.h (struct target_ops): Doc fix.
14117 * server.h (target_signal_to_name): New prototype.
14118 * gdbreplay.c: Don't include headers unconditionally which
14119 are missing on mingw32. Include <winsock.h> for mingw32.
14120 (remote_close, remote_open): Adjust for Winsock support.
14121 * configure, config.in: Regenerated.
14122
0876f84a
DJ
141232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * server.c (decode_xfer_read, write_qxfer_response): New.
14126 (handle_query): Take a packet length argument. Handle
14127 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14128 the qSupported response.
14129 (main): Update call to handle_query.
14130
01f9e8fa
DJ
141312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14132
14133 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14134 (putpkt_binary): Renamed from putpkt and adjusted for binary
14135 data.
14136 (putpkt): New wrapper for putpkt_binary.
14137 (readchar): Don't mask off the high bit.
14138 (decode_X_packet): New function.
14139 * server.c (main): Call putpkt_binary if a handler sets the packet
14140 length. Save the length of the incoming packet. Handle 'X'.
14141 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14142
be2a5f71
DJ
141432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * server.c (handle_query): Handle qSupported.
14146
ea025f5f
DJ
141472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * remote-utils.c (all_symbols_looked_up): New variable.
14150 (look_up_one_symbol): Check it.
14151 * server.h (look_up_one_symbol): New declaration.
14152 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14153
9308fc88
DJ
141542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14155
14156 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14157 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14158 (PTRACE_GET_THREAD_AREA): Define.
14159 (ps_get_thread_area): New function.
14160
52fb6437
NS
141612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14162
14163 * configure.srv (m68k*-*-uclinux*): New target.
14164 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14165 (linux_resume_one_process): Remove extraneous cast.
14166 (linux_read_offsets): New.
14167 (linux_target_op): Add linux_read_offsets on mmuless systems.
14168 * server.c (handle_query): Add qOffsets logic.
14169 * target.h (struct target_ops): Add read_offsets.
14170
21b0f40c
DJ
141712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14174 (PTRACE_GET_THREAD_AREA): Define.
14175 (ps_get_thread_area): New function.
14176 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14177 (linux-x86-64-low.o): Update.
14178
0050a760
DJ
141792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14180
14181 * configure.ac: Remove checks for prfpregset_t.
14182 * gdb_proc_service.h: New file.
14183 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14184 new "gdb_proc_service.h".
14185 * proc-service.c: Likewise.
14186 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14187 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14188 * Makefile.in (gdb_proc_service_h): Updated.
14189 * configure, config.in: Regenerated.
14190
b92a518e
DJ
141912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * remote-utils.c (prepare_resume_reply): Move declaration
14194 of gdb_id_from_wait to the top of the block.
14195
545587ee
DJ
141962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14197
14198 * linux-low.c (regsets_store_inferior_registers): Read the regset
14199 from the target before filling it.
14200
9db87ebd
DJ
142012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14202
14203 * server.c (attach_inferior): Return SIGTRAP for a successful
14204 attach.
14205
dd24457d
DJ
142062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14207
14208 * Makefile.in (OBS): Add version.o.
14209 (STAGESTUFF): Delete.
14210 (version.o): Add dependencies.
14211 (version.c): Replace rule.
14212 (clean): Remove version.c.
14213 * server.c (gdbserver_version): New.
14214 (gdbserver_usage): Use printf.
14215 (main): Handle --version and --help.
14216 * server.h (version, host_name): Add declarations.
14217
6f0f660e
EZ
142182005-12-23 Eli Zaretskii <eliz@gnu.org>
14219
889bf7c5
PA
14220 * linux-arm-low.c:
14221 * linux-arm-low.c:
14222 * inferiors.c:
14223 * i387-fp.h:
14224 * i387-fp.c:
14225 * gdbreplay.c:
14226 * regcache.c:
14227 * proc-service.c:
14228 * mem-break.h:
14229 * mem-break.c:
14230 * linux-x86-64-low.c:
14231 * linux-sh-low.c:
14232 * linux-s390-low.c:
14233 * linux-ppc64-low.c:
14234 * linux-ppc-low.c:
14235 * linux-mips-low.c:
14236 * linux-m68k-low.c:
14237 * linux-m32r-low.c:
14238 * linux-low.h:
14239 * linux-low.c:
14240 * linux-ia64-low.c:
14241 * linux-i386-low.c:
14242 * linux-crisv32-low.c:
14243 * thread-db.c:
14244 * terminal.h:
14245 * target.h:
14246 * target.c:
14247 * server.h:
14248 * server.c:
14249 * remote-utils.c:
14250 * regcache.h:
14251 * utils.c:
14252 * Makefile.in:
14253 * configure.ac:
6f0f660e
EZ
14254 * gdbserver.1: Add (C) after Copyright. Update the FSF
14255 address.
14256
9d1fb177
DJ
142572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14258
14259 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14260 (arm_breakpoint_at): Recognize both breakpoints.
14261 (the_low_target): Use the correct breakpoint instruction.
14262
011a70c2
DJ
142632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14264
14265 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14266 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14267 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14268 (the_low_target): Update.
14269
7fb85e41
AS
142702005-10-25 Andreas Schwab <schwab@suse.de>
14271
14272 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14273
14274 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14275 (ia64_num_regs): Reduce to 462.
14276
3db0444b
DJ
142772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14278
14279 * acinclude.m4: Correct quoting.
14280 * aclocal.m4: Regenerated.
14281
14282 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14283 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14284 (thread_db_init): Call thread_db_err_str.
14285 * configure.ac: Check for TD_VERSION.
14286 * config.in, configure: Regenerated.
14287
bee0189a
DJ
142882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14289
14290 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14291
e9d25b98
DJ
142922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14293
14294 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14295 is not available. Define HAVE_PTRACE_GETREGS if it is.
14296 * config.in, configure: Regenerated.
14297 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14298 * linux-i386-low.c, linux-m68k-low.c: Update to use
14299 HAVE_PTRACE_GETREGS.
14300 * linux-low.c (regsets_fetch_inferior_registers)
14301 (regsets_store_inferior_registers): Only return 0 if we processed
14302 GENERAL_REGS.
14303 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14304 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14305
a06660f7
DJ
143062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * inferiors.c (struct thread_info): Add gdb_id.
14309 (add_thread): Add gdb_id argument.
14310 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14311 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14312 calls to add_thread.
14313 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14314 * server.c (handle_query): Use thread_to_gdb_id.
14315 (handle_v_cont, main): Use gdb_id_to_thread_id.
14316 * server.h (add_thread): Update prototype.
14317 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14318 prototypes.
14319
5a1f5858
DJ
143202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14321
14322 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14323 left-padded registers.
14324 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14325 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14326
e122f1f5
SE
143272005-07-01 Steve Ellcey <sje@cup.hp.com>
14328
14329 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14330 * configure: Regenerate.
14331 * config.in: Regenerate.
14332 * server.h (NEED_DECLARATION_STRERROR):
14333 Replace with !HAVE_DECL_STRERROR.
14334
d592fa2f
DJ
143352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14336
14337 * linux-low.c (linux_wait, linux_send_signal): Don't test
14338 an unsigned long variable for > 0 if it could be MAX_ULONG.
14339 * server.c (myresume): Likewise.
14340 * target.c (set_desired_inferior): Likewise.
14341
ccbd4912
MK
143422005-06-13 Mark Kettenis <kettenis@gnu.org>
14343
14344 * configure.ac: Simplify and improve check for socklen_t.
14345 * configure, config.in: Regenerate.
14346
f450004a
DJ
143472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * acconfig.h: Remove.
14350 * configure.ac: Add a test for socklen_t. Use three-argument
14351 AC_DEFINE throughout.
14352 * config.in: Regenerated using autoheader 2.59.
14353 * configure: Regenerated.
14354
14355 * gdbreplay.c (socklen_t): Provide a default.
14356 (remote_open): Use socklen_t.
14357 * remote-utils.c (socklen_t): Provide a default.
14358 (remote_open): Use socklen_t.
14359 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14360 unsigned char.
14361
14362 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14363 char for buffers.
14364 * linux-low.c (linux_read_memory, linux_write_memory)
14365 (linux_read_auxv): Likewise.
14366 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14367 (check_mem_write): Likewise.
14368 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14369 Likewise.
14370 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14371 (registers_from_string, register_data): Likewise.
14372 * server.c (handle_query, main): Likewise.
14373 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14374 (decode_M_packet): Likewise.
14375 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14376 * target.h (struct target_ops): Update read_memory, write_memory,
14377 and read_auxv.
14378 (read_inferior_memory, write_inferior_memory): Update.
14379 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14380 to unsigned char *.
14381 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14382 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14383 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14384 linux-s390-low.c, linux-sh-low.c: Update for changes in
14385 read_inferior_memory and the_low_target->breakpoint.
14386
eee84df1
DJ
143872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14390 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14391 * configure.srv: Add powerpc64-*-linux*.
14392 * linux-ppc64-low.c: New file.
14393
45b134e5
OF
143942005-05-23 Orjan Friberg <orjanf@axis.com>
14395
14396 * linux-cris-low.c: New file with support for CRIS.
14397 * linux-crisv32-low.c: Ditto for CRISv32.
14398 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14399 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14400 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14401 reg-crisv32.o, and reg-crisv32.c to make rules.
14402 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14403 recognized targets.
14404
48d93c75
UW
144052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14406
14407 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14408 of sizeof (PTRACE_XFER_TYPE).
14409 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14410
e013ee27
OF
144112005-05-12 Orjan Friberg <orjanf@axis.com>
14412
889bf7c5 14413 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14414 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14415 pointers for hardware watchpoint support.
14416 * linux-low.h (struct linux_target_ops): Ditto.
14417 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14418 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14419 to linux_target_ops.
14420 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14421 reply packet.
14422 * server.c (main): Recognize 'Z' and 'z' packets.
14423
b0ded00b
UW
144242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14425
14426 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14427 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14428 (the_low_target): Add new members.
14429
8643e2ad
DJ
144302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14431
14432 * proc-service.c (ps_lgetregs): Search all_processes instead of
14433 all_threads.
14434
fc620387
DJ
144352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14436
14437 * server.c (start_inferior): Change return type to int.
14438 (attach_inferior): Change sigptr to int *.
14439 (handle_v_cont, handle_v_requests): Change signal to int *.
14440 (main): Change signal to int.
14441
144422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14443
14444 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14445 * configure.srv: Add m32r*-*-linux*.
14446 * linux-m32r-low.c: New file.
14447
e0e76420
DJ
144482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14449
14450 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14451
a1928bad
DJ
144522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14453
14454 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14455 Take unsigned long arguments for PIDs.
14456 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14457 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14458 (wait_for_sigstop, linux_resume_one_process)
14459 (regsets_fetch_inferior_registers, linux_send_signal)
14460 (linux_read_auxv): Likewise. Update the types of variables holding
14461 PIDs. Update format string specifiers.
14462 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14463 * remote-utils.c (prepare_resume_reply): Likewise.
14464 * server.c (cont_thread, general_thread, step_thread)
14465 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14466 unsigned long.
14467 (handle_query): Update format specifiers.
14468 (handle_v_cont, main): Use strtoul for thread IDs.
14469 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14470 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14471 (general_thread, step_thread, thread_from_wait)
14472 (old_thread_from_wait): Update.
14473 * target.h (struct thread_resume): Use unsigned long for THREAD.
14474 (struct target_ops): Use unsigned long for arguments to attach and
14475 thread_alive.
14476
dcdb98d2
DJ
144772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14478
14479 * acinclude.m4: Include bfd/bfd.m4 directly.
14480 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14481 <agriffis@toolchain.org>.
14482 * aclocal.m4, configure: Regenerated.
14483
bec39cab
AC
144842005-01-07 Andrew Cagney <cagney@gnu.org>
14485
14486 * configure.ac: Rename configure.in, require autoconf 2.59.
14487 * configure: Re-generate.
14488
434c4c77
DJ
144892004-12-08 Daniel Jacobowitz <dan@debian.org>
14490
14491 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14492 LIBS when finished.
14493 * aclocal.m4: Regenerated.
14494 * configure: Regenerated.
14495
db1d3e1b
AS
144962004-11-21 Andreas Schwab <schwab@suse.de>
14497
14498 * linux-m68k-low.c (m68k_num_gregs): Define.
14499 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14500 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14501 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14502 (m68k_breakpoint_at): New. Add to the_low_target.
14503
14504 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14505 srv_linux_thread_db to yes.
14506
43360365
JB
145072004-10-20 Joel Brobecker <brobecker@gnat.com>
14508
14509 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14510 (ARCH_SET_FS): Likewise.
14511 (ARCH_GET_FS): Likewise.
14512 (ARCH_GET_GS): Likewise.
14513
fd500816
DJ
145142004-10-16 Daniel Jacobowitz <dan@debian.org>
14515
14516 * linux-i386-low.c (ps_get_thread_area): New.
14517 * linux-x86-64-low.c (ps_get_thread_area): New.
14518 * linux-low.c: Include <sys/syscall.h>.
14519 (linux_kill_one_process): Don't kill the first thread here.
14520 (linux_kill): Kill the first thread here.
14521 (kill_lwp): New function.
14522 (send_sigstop, linux_send_signal): Use it.
14523 * proc-service.c: Clean up #ifdefs.
14524 (fpregset_info): Delete.
14525 (ps_lgetregs): Update and enable implementation.
14526 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14527 implementations.
14528 * remote-utils.c (struct sym_cache, symbol_cache): New.
14529 (input_interrupt): Print a clearer message.
14530 (async_io_enabled): New variable.
14531 (enable_async_io, disable_async_io): Use it. Update comments.
14532 (look_up_one_symbol): Use the symbol cache.
14533 * thread-db.c (thread_db_look_up_symbols): New function.
14534 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14535
f6de3c42
DJ
145362004-10-16 Daniel Jacobowitz <dan@debian.org>
14537
14538 * configure.in: Test for -rdynamic.
14539 * configure: Regenerated.
14540 * Makefile (INTERNAL_LDFLAGS): New.
14541 (gdbserver, gdbreplay): Use it.
14542
2c0fc042
AC
145432004-09-02 Andrew Cagney <cagney@gnu.org>
14544
14545 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14546
075b3282
DJ
145472004-03-23 Daniel Jacobowitz <drow@mvista.com>
14548
14549 * linux-low.c (linux_wait): Clear all_processes list also.
14550
fa6a77dc
DJ
145512004-03-12 Daniel Jacobowitz <drow@mvista.com>
14552
14553 * linux-low.c: Include <errno.h>. Remove extern declaration of
14554 errno.
14555
6d782a97
DJ
145562004-03-12 Daniel Jacobowitz <drow@mvista.com>
14557
14558 * gdbreplay.c, server.h, utils.c: Update copyright years.
14559
3a7fb99b
DJ
145602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14561
14562 * server.c (main): Print child status or termination signal from
14563 variable 'signal', not 'sig'.
14564
c3e735a6
DJ
145652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14566
14567 * linux-low.c (linux_read_memory): Change return type to
14568 int. Check for and return error from ptrace().
14569 * target.c (read_inferior_memory): Change return type to int. Pass
14570 back return status from the_target->read_memory().
14571 * target.h (struct target_ops): Adapt *read_memory() prototype.
14572 Update comment.
14573 (read_inferior_memory): Adapt prototype.
14574 * server.c (main): Return an error packet if
14575 read_inferior_memory() returns an error.
14576
a59d1c82
DJ
145772004-03-04 Daniel Jacobowitz <drow@mvista.com>
14578
14579 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14580 Unify with other clean targets.
14581
dc3f8883
DJ
145822004-02-29 Daniel Jacobowitz <drow@mvista.com>
14583
14584 * server.c (handle_v_cont): Call set_desired_inferior.
14585
89a208da
DJ
145862004-02-29 Daniel Jacobowitz <drow@mvista.com>
14587
14588 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14589
62ea82f5
DJ
145902004-02-29 Daniel Jacobowitz <drow@mvista.com>
14591
14592 * linux-low.c (linux_wait): Unblock async I/O.
14593 (linux_resume): Block and enable async I/O.
14594 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14595 * server.h (block_async_io, unblock_async_io): Add prototypes.
14596
6910d122
DJ
145972004-02-29 Daniel Jacobowitz <drow@mvista.com>
14598
14599 * remote-utils.c (remote_open): Print a status notice after
14600 opening a TCP port.
14601 * server.c (attach_inferior): Print a status notice after
14602 attaching.
14603
146042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14605
14606 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14607
c89dc5d4
DJ
146082004-02-26 Daniel Jacobowitz <drow@mvista.com>
14609
14610 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14611 error packet.
14612 * server.c, target.h: Update copyright years.
14613
4b8dad4a
RM
146142004-02-25 Roland McGrath <roland@redhat.com>
14615
14616 * target.h (struct target_ops): New member `read_auxv'.
14617 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14618 * linux-low.c (linux_read_auxv): New function.
14619 (linux_target_ops): Initialize `read_auxv' member to that.
14620
d7446758
JB
146212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14622
14623 Committed by Jim Blandy <jimb@redhat.com>.
14624
14625 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14626 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14627 instead of GPR_SIZE to distiguish s390 and s390x targets.
14628
5544ad89
DJ
146292004-01-31 Daniel Jacobowitz <drow@mvista.com>
14630
14631 * linux-low.c: Update copyright year.
14632 (check_removed_breakpoint): Clear pending_is_breakpoint.
14633 (linux_set_resume_request, linux_queue_one_thread)
14634 (resume_status_pending_p): New functions.
14635 (linux_continue_one_thread): Use process->resume.
14636 (linux_resume): Only resume threads if there are no pending events.
14637 * linux-low.h (struct process_info): Add resume request
14638 pointer.
14639
2a68b70e
DJ
146402004-01-30 Daniel Jacobowitz <drow@mvista.com>
14641
14642 * regcache.c (new_register_cache): Clear the allocated register
14643 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14644
64386c31
DJ
146452003-10-13 Daniel Jacobowitz <drow@mvista.com>
14646
14647 * linux-low.c (linux_resume): Take a struct thread_resume *
14648 argument.
14649 (linux_wait): Update call.
14650 (resume_ptr): New static variable.
14651 (linux_continue_one_thread): Renamed from
14652 linux_continue_one_process. Use resume_ptr.
14653 (linux_resume): Use linux_continue_one_thread.
14654 * server.c (handle_v_cont, handle_v_requests): New functions.
14655 (myresume): New function.
14656 (main): Handle 'v' case.
14657 * target.h (struct thread_resume): New type.
14658 (struct target_ops): Change argument of "resume" to struct
14659 thread_resume *.
14660 (myresume): Delete macro.
14661
c938e9b0
L
146622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14663
14664 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14665 (uninstall): Support DESTDIR.
14666
7f313d07
BC
14667Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14668
14669 * configure.srv: Add xscale*linux copy of arm*linux entry.
14670
3b2fc2ea
DJ
146712003-07-24 Daniel Jacobowitz <drow@mvista.com>
14672
14673 * linux-arm-low.c (arm_reinsert_addr): New function.
14674 (the_low_target): Add arm_reinsert_addr.
14675
1c0a559e
MK
146762003-07-08 Mark Kettenis <kettenis@gnu.org>
14677
14678 * mem-break.c: Remove whitespace at end of file.
14679
43d5792c
DJ
146802003-06-28 Daniel Jacobowitz <drow@mvista.com>
14681
14682 * configure.in: Check whether we need to prototype strerror.
14683 * server.h: Optionally prototype strerror.
14684 * gdbreplay.c (perror_with_name): Use strerror.
14685 * linux-low.c (linux_attach_lwp): Use strerror.
14686 * utils.c (perror_with_name): Use strerror.
14687 * config.in, configure: Regenerated.
14688
c8a86edf
DJ
146892003-06-28 Daniel Jacobowitz <drow@mvista.com>
14690
14691 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14692 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14693
73d37363
DJ
146942003-06-20 Daniel Jacobowitz <drow@mvista.com>
14695
14696 * Makefile.in (SFILES): Update.
14697 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14698 low-sun3.c: Remove files.
14699
6ad8ae5c
DJ
147002003-06-17 Daniel Jacobowitz <drow@mvista.com>
14701
14702 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14703 (linux_detach_one_process, linux_detach): New functions.
14704 (linux_target_ops): Add linux_detach.
14705 * server.c (main): Handle 'D' packet.
14706 * target.h (struct target_ops): Add "detach" member.
14707 (detach_inferior): Define.
14708
1581182a
MK
147092003-06-13 Mark Kettenis <kettenis@gnu.org>
14710
14711 From Kelley Cook <kelleycook@wideopenwest.com>:
14712 * configure.srv: Accept i[34567]86 variants.
14713
e5379b03
DJ
147142003-06-05 Daniel Jacobowitz <drow@mvista.com>
14715
14716 * linux-low.c (linux_wait_for_event): Correct comment typos.
14717 (linux_resume_one_process): Call check_removed_breakpoint.
14718 (linux_send_signal): New function.
14719 (linux_target_ops): Add linux_send_signal.
14720 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14721 of kill.
14722 * target.h (struct target_ops): Add send_signal.
14723
2ff29de4
JB
147242003-05-29 Jim Blandy <jimb@redhat.com>
14725
14726 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14727 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14728 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14729 away part of the register's value.
14730
254787d4
DJ
147312003-03-26 Daniel Jacobowitz <drow@mvista.com>
14732
14733 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14734 (linux_wait_for_event, linux_init_signals): Likewise.
14735
94e10508
DJ
147362003-03-17 Daniel Jacobowitz <drow@mvista.com>
14737
14738 * configure.in: Check for stdlib.h.
14739 * configure: Regenerated.
14740 * config.in: Regenerated.
14741
4c0711e0
DJ
147422003-01-04 Andreas Schwab <schwab@suse.de>
14743
14744 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14745
ef66e766
AC
147462003-01-02 Andrew Cagney <ac131313@redhat.com>
14747
14748 * Makefile.in: Remove obsolete code.
14749
a1358604
DJ
147502002-11-20 Daniel Jacobowitz <drow@mvista.com>
14751
14752 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14753 defined(PT_FPR0_HI).
14754
23ce3b1c
DJ
147552002-11-17 Stuart Hughes <seh@zee2.com>
14756
14757 * linux-arm-low.c (arm_num_regs): Increase.
14758 (arm_regmap): Include status register.
14759
147602002-11-17 Daniel Jacobowitz <drow@mvista.com>
14761
14762 * linux-low.c (register_addr): Remove incorrect -1 check.
14763
a9fa9f7d
DJ
147642002-08-29 Daniel Jacobowitz <drow@mvista.com>
14765
14766 * linux-low.c (linux_create_inferior): Call setpgid. Return
14767 the new PID.
14768 (unstopped_p, linux_signal_pid): Remove.
14769 (linux_target_ops): Remove linux_signal_pid.
14770 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14771 global instead of target method.
14772 * target.h (struct target_ops): Remove signal_pid. Update comment
14773 for create_inferior.
14774 * server.c (signal_pid): New variable.
14775 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14776 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14777 (attach_inferior): Set signal_pid.
14778
17574093
DJ
147792002-08-23 Daniel Jacobowitz <drow@mvista.com>
14780
14781 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14782
147832002-08-20 Jim Blandy <jimb@redhat.com>
14784
14785 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14786 default for this.
14787
147882002-08-01 Andrew Cagney <cagney@redhat.com>
14789
14790 * Makefile.in: Make chill references obsolete.
14791
147922002-07-24 Kevin Buettner <kevinb@redhat.com>
14793
14794 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14795 * configure: Regenerate.
14796 * config.in: Regenerate.
14797
147982002-07-09 David O'Brien <obrien@FreeBSD.org>
14799
14800 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14801 (perror_with_name, remote_close, remote_open, expect, play): Static.
14802
148032002-07-04 Michal Ludvig <mludvig@suse.cz>
14804
4b8dad4a 14805 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14806 byte offsets instead of an array of indexes.
14807 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14808
148092002-06-13 Daniel Jacobowitz <drow@mvista.com>
14810
14811 * regcache.c: Add comment.
14812
148132002-06-11 Daniel Jacobowitz <drow@mvista.com>
14814
14815 * thread-db.c: New file.
14816 * proc-service.c: New file.
14817 * acinclude.m4: New file.
14818 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14819 proc-service.o, and thread-db.o.
14820 (linux-low.o): Add USE_THREAD_DB.
14821 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14822 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14823 * aclocal.m4: Regenerated.
14824 * config.in: Regenerated.
14825 * configure: Regenerated.
14826 * configure.in: Check for proc_service.h, sys/procfs.h,
14827 thread_db.h, and linux/elf.h headrs.
14828 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14829 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14830 Check for -lthread_db and thread support.
14831 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14832 PowerPC, and SuperH.
14833 * i387-fp.c: Constify arguments.
14834 * i387-fp.h: Likewise.
14835 * inferiors.c: (struct thread_info): Renamed from
14836 `struct inferior_info'. Remove PID member. Use generic inferior
14837 list header. All uses updated.
14838 (inferiors, signal_pid): Removed.
14839 (all_threads): New variable.
14840 (get_thread): Define.
14841 (add_inferior_to_list): New function.
14842 (for_each_inferior): New function.
14843 (change_inferior_id): New function.
14844 (add_inferior): Removed.
14845 (remove_inferior): New function.
14846 (add_thread): New function.
14847 (free_one_thread): New function.
14848 (remove_thread): New function.
14849 (clear_inferiors): Use for_each_inferior and free_one_thread.
14850 (find_inferior): New function.
14851 (find_inferior_id): New function.
14852 (inferior_target_data): Update argument type.
14853 (set_inferior_target_data): Likewise.
14854 (inferior_regcache_data): Likewise.
14855 (set_inferior_regcache_data): Likewise.
14856 * linux-low.c (linux_bp_reinsert): Remove.
14857 (all_processes, stopping_threads, using_thrads)
14858 (struct pending_signals, debug_threads, pid_of): New.
14859 (inferior_pid): Replace with macro.
14860 (struct inferior_linux_data): Remove.
14861 (get_stop_pc, add_process): New functions.
14862 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14863 Use add_process and add_thread.
14864 (linux_attach_lwp): New function, based on old linux_attach. Use
14865 add_process and add_thread. Set stop_expected for new threads.
14866 (linux_attach): New function.
14867 (linux_kill_one_process): New function.
14868 (linux_kill): Kill all LWPs.
14869 (linux_thread_alive): Use find_inferior_id.
14870 (check_removed_breakpoints, status_pending_p): New functions.
14871 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14872 Update. Use WNOHANG. Wait for cloned processes also. Update process
14873 struct for the found process.
14874 (linux_wait_for_event): New function.
14875 (linux_wait): Use it. Support LWPs.
14876 (send_sigstop, wait_for_sigstop, stop_all_processes)
14877 (linux_resume_one_process, linux_continue_one_process): New functions.
14878 (linux_resume): Support LWPs.
14879 (REGISTER_RAW_SIZE): Remove.
14880 (fetch_register): Use register_size instead. Call supply_register.
14881 (usr_store_inferior_registers): Likewise. Call collect_register.
14882 Fix recursive case.
14883 (regsets_fetch_inferior_registers): Improve error message.
14884 (regsets_store_inferior_registers): Add debugging.
14885 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14886 (unstopped_p, linux_signal_pid): New functions.
14887 (linux_target_ops): Add linux_signal_pid.
14888 (linux_init_signals): New function.
14889 (initialize_low): Call it. Initialize using_threads.
14890 * regcache.c (inferior_regcache_data): Add valid
14891 flag.
14892 (get_regcache): Fetch registers lazily. Add fetch argument
14893 and update all callers.
14894 (regcache_invalidate_one, regcache_invalidate): New
14895 functions.
14896 (new_register_cache): Renamed from create_register_cache.
14897 Return the new regcache.
14898 (free_register_cache): Change argument to a void *.
14899 (registers_to_string, registers_from_string): Call get_regcache
14900 with fetch flag set.
14901 (register_data): Make static. Pass fetch flag to get_regcache.
14902 (supply_register): Call get_regcache with fetch flag clear.
14903 (collect_register): Call get_regcache with fetch flag set.
14904 (collect_register_as_string): New function.
14905 * regcache.h: Update.
14906 * remote-utils.c (putpkt): Flush after debug output and use
14907 stderr.
14908 Handle input interrupts while waiting for an ACK.
14909 (input_interrupt): Use signal_pid method.
14910 (getpkt): Flush after debug output and use stderr.
14911 (outreg): Use collect_register_as_string.
14912 (new_thread_notify, dead_thread_notify): New functions.
14913 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14914 and general_thread.
14915 (look_up_one_symbol): Flush after debug output.
14916 * server.c (step_thread, server_waiting): New variables.
14917 (start_inferior): Don't use signal_pid. Update call to mywait.
14918 (attach_inferior): Update call to mywait.
14919 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14920 (main): Don't fetch/store registers explicitly. Use
14921 set_desired_inferior. Support proposed ``Hs'' packet. Update
14922 calls to mywait.
14923 * server.h: Update.
14924 (struct inferior_list, struct_inferior_list_entry): New.
14925 * target.c (set_desired_inferior): New.
14926 (write_inferior_memory): Constify.
14927 (mywait): New function.
14928 * target.h: Update.
14929 (struct target_ops): New signal_pid method.
14930 (mywait): Removed macro, added prototype.
14931
14932 * linux-low.h (regset_func): Removed.
14933 (regset_fill_func, regset_store_func): New.
14934 (enum regset_type): New.
14935 (struct regset_info): Add type field. Use new operation types.
14936 (struct linux_target_ops): stop_pc renamed to get_pc.
14937 Add decr_pc_after_break and breakpoint_at.
14938 (get_process, get_thread_proess, get_process_thread)
14939 (strut process_info, all_processes, linux_attach_lwp)
14940 (thread_db_init): New.
14941
14942 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14943 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14944 (the_low_target): Add new members.
14945 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14946 (i386_store_fpxregset): Constify.
14947 (target_regsets): Add new kind identifier.
14948 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14949 (i386_set_pc): Add debugging.
14950 (i386_breakpoint_at): New function.
14951 (the_low_target): Add new members.
14952 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14953 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14954 (mips_breakpoint_at): New.
14955 (the_low_target): Add new members.
14956 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14957 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14958 (the_low_target): Add new members.
14959 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14960 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14961 (the_low_target): Add new members.
14962 * linux-x86-64-low.c (target_regsets): Add new kind
14963 identifier.
14964
149652002-05-15 Daniel Jacobowitz <drow@mvista.com>
14966
14967 From Martin Pool <mbp@samba.org>:
14968 * server.c (gdbserver_usage): New function.
14969 (main): Call it.
14970
149712002-05-14 Daniel Jacobowitz <drow@mvista.com>
14972
14973 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14974 stop_at -> stop_pc.
14975
149762002-05-04 Andrew Cagney <ac131313@redhat.com>
14977
14978 * Makefile.in: Remove obsolete code.
14979
149802002-04-24 Michal Ludvig <mludvig@suse.cz>
14981
14982 * linux-low.c (regsets_fetch_inferior_registers),
14983 (regsets_store_inferior_registers): Removed cast to int from
14984 ptrace() calls.
14985 * regcache.h: Added declaration of struct inferior_info.
14986
149872002-04-20 Daniel Jacobowitz <drow@mvista.com>
14988
14989 * inferiors.c (struct inferior_info): Add regcache_data.
14990 (add_inferior): Call create_register_cache.
14991 (clear_inferiors): Call free_register_cache.
14992 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14993 * regcache.c (struct inferior_regcache_data): New.
14994 (registers): Remove.
14995 (get_regcache): New function.
14996 (create_register_cache, free_register_cache): New functions.
14997 (set_register_cache): Don't initialize the register cache here.
14998 (registers_to_string, registers_from_string, register_data): Call
14999 get_regcache.
15000 * regcache.h: Add prototypes.
15001 * server.h: Likewise.
15002
150032002-04-20 Daniel Jacobowitz <drow@mvista.com>
15004
15005 * mem-break.c: New file.
15006 * mem-break.h: New file.
15007 * Makefile.in: Add mem-break.o rule; update server.h
15008 dependencies.
15009 * inferiors.c (struct inferior_info): Add target_data
15010 member.
15011 (clear_inferiors): Free target_data member if set.
15012 (inferior_target_data, set_inferior_target_data): New functions.
15013 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15014 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15015 * linux-low.c (linux_bp_reinsert): New variable.
15016 (struct inferior_linux_data): New.
15017 (linux_create_inferior): Use set_inferior_target_data.
15018 (linux_attach): Likewise. Call add_inferior.
15019 (linux_wait_for_one_inferior): New function.
15020 (linux_wait): Call it.
15021 (linux_write_memory): Add const.
15022 (initialize_low): Call set_breakpoint_data.
15023 * linux-low.h (struct linux_target_ops): Add breakpoint
15024 handling members.
15025 * server.c (attach_inferior): Remove extra add_inferior
15026 call.
15027 * server.h: Include mem-break.h. Update inferior.c
15028 prototypes.
15029 * target.c (read_inferior_memory)
15030 (write_inferior_memory): New functions.
15031 * target.h (read_inferior_memory)
15032 (write_inferior_memory): Change macros to prototypes.
15033 (struct target_ops): Update comments. Add const to write_memory
15034 definition.
15035
150362002-04-11 Daniel Jacobowitz <drow@mvista.com>
15037
15038 * linux-low.c (usr_store_inferior_registers): Support
15039 registers which are allowed to fail to store.
15040 * linux-low.h (linux_target_ops): Likewise.
15041 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15042 (ppc_cannot_store_register): FPSCR may not be storable.
15043
150442002-04-09 Daniel Jacobowitz <drow@mvista.com>
15045
15046 * server.h: Include <string.h> if HAVE_STRING_H.
15047 * ChangeLog: Correct paths in last ChangeLog entry.
15048
150492002-04-09 Daniel Jacobowitz <drow@mvista.com>
15050
15051 * linux-low.h: Remove obsolete prototypes.
15052 (struct linux_target_ops): New.
15053 (extern the_low_target): New.
15054 * linux-low.c (num_regs, regmap): Remove declarations.
15055 (register_addr): Use the_low_target explicitly.
15056 (fetch_register): Likewise.
15057 (usr_fetch_inferior_registers): Likewise.
15058 (usr_store_inferior_registers): Likewise.
15059 * linux-arm-low.c (num_regs): Remove.
15060 (arm_num_regs): Define.
15061 (arm_regmap): Renamed from regmap, made static.
15062 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15063 made static.
15064 (arm_cannot_store_register): Renamed from cannot_store_register,
15065 made static.
15066 (the_low_target): New.
15067 * linux-i386-low.c (num_regs): Remove.
15068 (i386_num_regs): Define.
15069 (i386_regmap): Renamed from regmap, made static.
15070 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15071 made static.
15072 (i386_cannot_store_register): Renamed from cannot_store_register,
15073 made static.
15074 (the_low_target): New.
15075 * linux-ia64-low.c (num_regs): Remove.
15076 (ia64_num_regs): Define.
15077 (ia64_regmap): Renamed from regmap, made static.
15078 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15079 made static.
15080 (ia64_cannot_store_register): Renamed from cannot_store_register,
15081 made static.
15082 (the_low_target): New.
15083 * linux-m68k-low.c (num_regs): Remove.
15084 (m68k_num_regs): Define.
15085 (m68k_regmap): Renamed from regmap, made static.
15086 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15087 made static.
15088 (m68k_cannot_store_register): Renamed from cannot_store_register,
15089 made static.
15090 (the_low_target): New.
15091 * linux-mips-low.c (num_regs): Remove.
15092 (mips_num_regs): Define.
15093 (mips_regmap): Renamed from regmap, made static.
15094 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15095 made static.
15096 (mips_cannot_store_register): Renamed from cannot_store_register,
15097 made static.
15098 (the_low_target): New.
15099 * linux-ppc-low.c (num_regs): Remove.
15100 (ppc_num_regs): Define.
15101 (ppc_regmap): Renamed from regmap, made static.
15102 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15103 made static.
15104 (ppc_cannot_store_register): Renamed from cannot_store_register,
15105 made static.
15106 (the_low_target): New.
15107 * linux-s390-low.c (num_regs): Remove.
15108 (s390_num_regs): Define.
15109 (s390_regmap): Renamed from regmap, made static.
15110 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15111 made static.
15112 (s390_cannot_store_register): Renamed from cannot_store_register,
15113 made static.
15114 (the_low_target): New.
15115 * linux-sh-low.c (num_regs): Remove.
15116 (sh_num_regs): Define.
15117 (sh_regmap): Renamed from regmap, made static.
15118 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15119 made static.
15120 (sh_cannot_store_register): Renamed from cannot_store_register,
15121 made static.
15122 (the_low_target): New.
15123 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15124 (the_low_target): New.
15125
151262002-04-09 Daniel Jacobowitz <drow@mvista.com>
15127
15128 * Makefile.in: Add stamp-h target.
15129 * configure.in: Create stamp-h.
15130 * configure: Regenerated.
15131
151322002-04-09 Daniel Jacobowitz <drow@mvista.com>
15133
15134 * inferiors.c: New file.
15135 * target.c: New file.
15136 * target.h: New file.
15137 * Makefile.in: Add target.o and inferiors.o. Update
15138 dependencies.
15139 * linux-low.c (inferior_pid): New static variable,
15140 moved from server.c.
15141 (linux_create_inferior): Renamed from create_inferior.
15142 Call add_inferior. Return 0 on success instead of a PID.
15143 (linux_attach): Renamed from myattach.
15144 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15145 (linux_thread_alive): Renamed from mythread_alive.
15146 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15147 child dies.
15148 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15149 (regsets_store_inferior_registers): Correct error message.
15150 Add missing ``return 0''.
15151 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15152 (linux_store_registers): Renamed from store_inferior_registers.
15153 (linux_read_memory): Renamed from read_inferior_memory.
15154 (linux_write_memory): Renamed from write_inferior_memory.
15155 (linux_target_ops): New structure.
15156 (initialize_low): Call set_target_ops ().
15157 * remote-utils.c (unhexify): New function.
15158 (hexify): New function.
15159 (input_interrupt): Send signals to ``signal_pid''.
15160 * server.c (inferior_pid): Remove.
15161 (start_inferior): Update create_inferior call.
15162 (attach_inferior): Call add_inferior.
15163 (handle_query): New function.
15164 (main): Call handle_query for `q' packets.
15165 * server.h: Include "target.h". Remove obsolete prototypes.
15166 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15167
151682002-04-09 Daniel Jacobowitz <drow@mvista.com>
15169
15170 * Makefile.in: Add WARN_CFLAGS. Update configury
15171 dependencies.
15172 * configure.in: Check for <string.h>
15173 * configure: Regenerate.
15174 * config.in: Regenerate.
15175 * gdbreplay.c: Include needed system headers.
15176 (remote_open): Remove strchr prototype.
15177 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15178 * regcache.c (supply_register): Change buf argument to const void *.
15179 (supply_register_by_name): Likewise.
15180 (collect_register): Change buf argument to void *.
15181 (collect_register_by_name): Likewise.
15182 * regcache.h: Add missing prototypes.
15183 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15184 * server.c (handle_query): New function.
15185 (attached): New static variable, moved out of main.
15186 (main): Quiet longjmp clobber warnings.
15187 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15188 * utils.c (error): Remove NORETURN.
15189 (fatal): Likewise.