Remove some GDB specific stuff from selftest.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f5a29eb0
YQ
12017-08-09 Yao Qi <yao.qi@linaro.org>
2
3 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
5 i386-avx-mpx.o and i386-mmx.o.
6 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
8 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
9 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
10 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
11 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
12 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
13 i386/amd64-avx-mpx.xml.
14
57757c2f
YQ
152017-08-09 Yao Qi <yao.qi@linaro.org>
16
17 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
18 and x32-avx-avx512.o.
19 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
20 i386/x32-avx-avx512.xml.
21
229d26fc
SM
222017-07-26 Simon Marchi <simon.marchi@ericsson.com>
23
24 * tracepoint.h (enum class fast_tpoint_collect_result): New
25 enumeration.
26 (fast_tracepoint_collecting): Change return type to
27 fast_tpoint_collect_result.
28 * tracepoint.c (fast_tracepoint_collecting): Likewise.
29 * linux-low.h: Include tracepoint.h.
30 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
31 fast_tpoint_collect_result.
32 * linux-low.c (handle_tracepoints): Adjust.
33 (linux_fast_tracepoint_collecting): Change return type to
34 fast_tpoint_collect_result.
35 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
36 linux_wait_1, stuck_in_jump_pad_callback,
37 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
38 proceed_one_lwp): Adjust to type change.
39
2e1e43e1
YQ
402017-07-10 Yao Qi <yao.qi@linaro.org>
41
42 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
43
adc764e7
YQ
442017-06-29 Yao Qi <yao.qi@linaro.org>
45
46 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
47 Remove.
48 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
49
a206891a
SM
502017-06-20 Simon Marchi <simon.marchi@ericsson.com>
51
52 * Makefile.in (IPA_OBJS): Sort and format one item per line.
53
9a6c7d9c
SDJ
542017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
55
56 * linux-low.c (linux_create_inferior): Adjust code to access the
57 environment information via 'gdb_environ' class.
58 * lynx-low.c (lynx_create_inferior): Likewise.
59 * server.c (our_environ): Make it an instance of 'gdb_environ'.
60 (get_environ): Return a pointer to 'our_environ'.
61 (captured_main): Initialize 'our_environ'.
62 * server.h (get_environ): Adjust prototype.
63 * spu-low.c (spu_create_inferior): Adjust code to access the
64 environment information via 'gdb_environ' class.
65
ae3e2ccf
SM
662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
67
68 * linux-low.c (linux_read_memory, linux_write_memory): Remove
69 usage of "register" keyword.
70
3e019bdc
SM
712017-06-17 Simon Marchi <simon.marchi@ericsson.com>
72
73 * configure: Re-generate.
74
8465943a
SM
752017-06-17 Simon Marchi <simon.marchi@ericsson.com>
76
77 * configure: Re-generate.
78
cf0dd6f0
SM
792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
80
81 * Makefile.in (COMPILE.pre): Add "-x c++".
82
9845682b
SDJ
832017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
84
85 * fork-child.c: Conditionally include <signal.h>.
86
aefd8b33
SDJ
872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
88
89 * server.c (handle_general_set): Handle new packet
90 "QStartupWithShell".
91 (handle_query): Add "QStartupWithShell" to the list of supported
92 packets.
93 (gdbserver_usage): Add help text explaining the
94 new "--startup-with-shell" and "--no-startup-with-shell" CLI
95 options.
96 (captured_main): Recognize and act upon the presence of the new
97 CLI options.
98
2090129c
SDJ
992017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
100 Pedro Alves <palves@redhat.com>
101
102 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
103 * configure: Regenerate.
104 * configure.srv (srv_linux_obj): Add "fork-child.o" and
105 "fork-inferior.o".
106 (i[34567]86-*-lynxos*): Likewise.
107 (spu*-*-*): Likewise.
108 * fork-child.c: New file.
109 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
110 and "environ.h".
111 (linux_ptrace_fun): New function.
112 (linux_create_inferior): Adjust function prototype to reflect
113 change on "target.h". Adjust function code to use
114 "fork_inferior".
115 (linux_request_interrupt): Delete "signal_pid".
116 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
117 (lynx_ptrace_fun): New function.
118 (lynx_create_inferior): Adjust function prototype to reflect
119 change on "target.h". Adjust function code to use
120 "fork_inferior".
121 * nto-low.c (nto_create_inferior): Adjust function prototype and
122 code to reflect change on "target.h". Update comments.
123 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
124 "common-terminal.h" and "environ.h".
125 (terminal_fd): Moved to fork-child.c.
126 (old_foreground_pgrp): Likewise.
127 (restore_old_foreground_pgrp): Likewise.
128 (last_status): Make it global.
129 (last_ptid): Likewise.
130 (our_environ): New variable.
131 (startup_with_shell): Likewise.
132 (program_name): Likewise.
133 (program_argv): Rename to...
134 (program_args): ...this.
135 (wrapper_argv): New variable.
136 (start_inferior): Delete function.
137 (get_exec_wrapper): New function.
138 (get_exec_file): Likewise.
139 (get_environ): Likewise.
140 (prefork_hook): Likewise.
141 (post_fork_inferior): Likewise.
142 (postfork_hook): Likewise.
143 (postfork_child_hook): Likewise.
144 (handle_v_run): Update code to deal with arguments coming from the
145 remote host. Update calls from "start_inferior" to
146 "create_inferior".
147 (captured_main): Likewise. Initialize environment variable. Call
148 "have_job_control".
149 * server.h (post_fork_inferior): New prototype.
150 (get_environ): Likewise.
151 (last_status): Declare.
152 (last_ptid): Likewise.
153 (signal_pid): Likewise.
154 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
155 (spu_ptrace_fun): New function.
156 (spu_create_inferior): Adjust function prototype to reflect change
157 on "target.h". Adjust function code to use "fork_inferior".
158 * target.c (target_terminal_init): New function.
159 (target_terminal_inferior): Likewise.
160 (target_terminal_ours): Likewise.
161 * target.h: Include <vector>.
162 (struct target_ops) <create_inferior>: Update prototype.
163 (create_inferior): Update macro.
164 * utils.c (gdb_flush_out_err): New function.
165 * win32-low.c (win32_create_inferior): Adjust function prototype
166 and code to reflect change on "target.h".
167
043a4934
SDJ
1682017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
169
170 * inferiors.c (switch_to_thread): New function.
171
15652511
SDJ
1722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
173
174 * Makefile.in (SFILE): Add "common/job-control.c".
175 (OBS): Add "job-control.o".
176
21ea5acd
SDJ
1772017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
178
179 * Makefile: Remove "@host_makefile_frag@".
180
e13cb306
PA
1812017-05-05 Pedro Alves <palves@redhat.com>
182
183 * configure: Regenerate.
184
c94fee56
SDJ
1852017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
186
187 * configure: Regenerate.
188
a0ff9e1a
SM
1892017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
192 software_single_step change of return type to
193 std::vector<CORE_ADDR>.
194 * linux-low.c (install_software_single_step_breakpoints):
195 Likewise.
196 * linux-low.h (install_software_single_step_breakpoints):
197 Likewise.
198
be628ab8
SDJ
1992017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
200
201 * remote-utils.c: Include "gdb_termios.h" instead of
202 "terminal.h".
203 * terminal.h: Delete file.
204
7c5ded6a
SDJ
2052017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
206
207 * server.c: Include <vector>.
208 <program_argv, wrapper_argv>: Convert to std::vector.
209 (start_inferior): Rewrite function to use C++.
210 (handle_v_run): Likewise. Update code that calculates the argv
211 based on the vRun packet; use C++.
212 (captured_main): Likewise.
213
436252de
SM
2142017-04-06 Simon Marchi <simon.marchi@ericsson.com>
215
216 * server.c (handle_v_cont): Initialize thread_resume::thread
217 with null_ptid.
218
9bf2a700
PA
2192017-04-05 Pedro Alves <palves@redhat.com>
220
221 * configure: Regenerate.
222
a121b7c1
PA
2232017-04-05 Pedro Alves <palves@redhat.com>
224
225 * gdbreplay.c (sync_error): Constify.
226 * linux-x86-low.c (push_opcode): Constify.
227
21c8a587
PA
2282017-04-05 Pedro Alves <palves@redhat.com>
229
230 * win32-low.c (get_child_debug_event)
231 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
232 Report TARGET_WAITKIND_SPURIOUS instead.
233
fb32b4f7
PA
2342017-04-05 Pedro Alves <palves@redhat.com>
235
236 * remote-utils.c (remote_prepare, remote_open): Constify.
237 * remote-utils.h (remote_prepare, remote_open): Constify.
238 * server.c (captured_main): Constify 'port' handling.
239
65dd1e59
SM
2402017-04-04 Simon Marchi <simon.marchi@ericsson.com>
241
242 * Makefile.in (clean): Clear .deps.
243
8fa5b777
SM
2442017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
245
246 * .gitignore: Remove generated files, replace with wildcard.
247 * (clean): Replace removal of generated files with wildcard.
248 (version.c): Replace with...
249 (version-generated.c): ...this.
250 (xml-builtin.c): Replace with...
251 (xml-builtin-generated.c): ...this.
252 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
253 (%.c: *regformats*): Replace with...
254 (%-generated.c: *regformats*): ...this.
255
a12e714b
MF
2562017-03-27 Max Filippov <jcmvbkbc@gmail.com>
257
258 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
259 (xtensa_fill_gregset): Call collect_register_by_name for
260 threadptr register.
261 (xtensa_store_gregset): Call supply_register_by_name for
262 threadptr register.
263
1a09b50a
MF
2642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
265
266 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
267 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
268 (xtensa_store_gregset): Call supply_register for all registers in
269 a0_regnum..a0_regnum + C0_NREGS range.
270
1a01e7c6
SM
2712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
274 (ax-ipa.o: ax.c): Remove.
275 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
276 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
277 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
278 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
279 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
280
36bc18a8
SM
2812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
282
283 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
284 (print-utils-ipa.o: ../common/print-utils.c): Remove.
285 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
286 (errors-ipa.o: ../common/errors.c): Remove.
287 (format-ipa.o: ../common/format.c): Remove.
288 (common-utils-ipa.o: ../common/common-utils.c): Remove.
289
a8ebe3d5
SM
2902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
291
292 * Makefile.in (%-ipa.o: %.c): New rule.
293 (tracepoint-ipa.o: tracepoint.c): Remove.
294 (utils-ipa.o: utils.c): Remove.
295 (remote-utils-ipa.o: remote-utils.c): Remove.
296 (regcache-ipa.o: regcache.c): Remove.
297 (i386-linux-ipa.o: i386-linux.c): Remove.
298 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
299 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
300 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
301 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
302 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
303 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
304 (amd64-linux-ipa.o: amd64-linux.c): Remove.
305 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
306 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
307 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
308 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
309 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
310 (aarch64-ipa.o: aarch64.c): Remove.
311 (s390-linux32-ipa.o: s390-linux32.c): Remove.
312 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
313 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
314 (s390-linux64-ipa.o: s390-linux64.c): Remove.
315 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
316 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
317 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
318 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
319 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
320 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
321 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
322 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
323 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
324 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
325 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
326 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
327 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
328 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
329 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
330 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
331 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
332 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
333 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
334 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
335 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
336 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
337 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
338 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
339 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
340 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
341 (tdesc-ipa.o: tdesc.c): Remove.
342 (x32-linux-ipa.o: x32-linux.c): Remove.
343 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
344 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
345
50cfacb7
SM
3462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * Makefile.in (%.o: ../arch/%.c): New rule.
349 (arm.o: ../arch/arm.c): Remove.
350 (arm-linux.o: ../arch/arm-linux.c): Remove.
351 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
352 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
353
c5a22423
SM
3542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
355
356 * Makefile.in (%.o: ../nat/%.c): New rule.
357 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
358 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
359 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
360 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
361 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
362 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
363 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
364 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
365 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
366 (linux-personality.o: ../nat/linux-personality.c): Remove.
367 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
368 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
369 (x86-linux.o: ../nat/x86-linux.c): Remove.
370 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
371 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
372
6bda016b
SM
3732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
374
375 * Makefile.in (%.o: ../common/%.c): New rule.
376 (signals.o: ../common/signals.c): Remove.
377 (print-utils.o: ../common/print-utils.c): Remove.
378 (rsp-low.o: ../common/rsp-low.c): Remove.
379 (common-utils.o: ../common/common-utils.c): Remove.
380 (posix-strerror.o: ../common/posix-strerror.c): Remove.
381 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
382 (vec.o: ../common/vec.c): Remove.
383 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
384 (xml-utils.o: ../common/xml-utils.c): Remove.
385 (ptid.o: ../common/ptid.c): Remove.
386 (buffer.o: ../common/buffer.c): Remove.
387 (format.o: ../common/format.c): Remove.
388 (filestuff.o: ../common/filestuff.c): Remove.
389 (agent.o: ../common/agent.c): Remove.
390 (errors.o: ../common/errors.c): Remove.
391 (environ.o: ../common/environ.c): Remove.
392 (common-debug.o: ../common/common-debug.c): Remove.
393 (cleanups.o: ../common/cleanups.c): Remove.
394 (common-exceptions.o: ../common/common-exceptions.c): Remove.
395 (fileio.o: ../common/fileio.c): Remove.
396 (common-regcache.o: ../common/common-regcache.c): Remove.
397 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
398 (new-op.o: ../common/new-op.c): Remove.
399 (btrace-common.o: ../common/btrace-common.c): Remove.
400
21122961
SM
4012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
402
403 * Makefile.in (%.o: ../target/%.c): New rule.
404 (waitstatus.o: ../target/waitstatus.c): Remove.
405
c362e621
SM
4062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
407
408 * Makefile.in
409 (%.c: ../regformats/%.dat,
410 (%.c: ../regformats/arm/%.dat,
411 (%.c: ../regformats/i386/%.dat,
412 (%.c: ../regformats/rs6000/%.dat): New rules.
413 (aarch64.c): Remove.
414 (reg-arm.c): Remove.
415 (arm-with-iwmmxt.c): Remove.
416 (arm-with-vfpv2.c): Remove.
417 (arm-with-vfpv3.c): Remove.
418 (arm-with-neon.c): Remove.
419 (reg-bfin.c): Remove.
420 (reg-cris.c): Remove.
421 (reg-crisv32.c): Remove.
422 (i386.c): Remove.
423 (i386-linux.c): Remove.
424 (i386-avx.c): Remove.
425 (i386-avx-linux.c): Remove.
426 (i386-avx-avx512.c): Remove.
427 (i386-avx-avx512-linux.c): Remove.
428 (i386-mpx.c): Remove.
429 (i386-mpx-linux.c): Remove.
430 (i386-avx-mpx-avx512-pku.c): Remove.
431 (i386-avx-mpx-avx512-pku-linux.c): Remove.
432 (i386-avx-mpx.c): Remove.
433 (i386-avx-mpx-linux.c): Remove.
434 (i386-mmx.c): Remove.
435 (i386-mmx-linux.c): Remove.
436 (reg-ia64.c): Remove.
437 (reg-m32r.c): Remove.
438 (reg-m68k.c): Remove.
439 (reg-cf.c): Remove.
440 (mips-linux.c): Remove.
441 (mips-dsp-linux.c): Remove.
442 (mips64-linux.c): Remove.
443 (mips64-dsp-linux.c): Remove.
444 (nios2-linux.c): Remove.
445 (powerpc-32.c): Remove.
446 (powerpc-32l.c): Remove.
447 (powerpc-altivec32l.c): Remove.
448 (powerpc-cell32l.c): Remove.
449 (powerpc-vsx32l.c): Remove.
450 (powerpc-isa205-32l.c): Remove.
451 (powerpc-isa205-altivec32l.c): Remove.
452 (powerpc-isa205-vsx32l.c): Remove.
453 (powerpc-e500l.c): Remove.
454 (powerpc-64l.c): Remove.
455 (powerpc-altivec64l.c): Remove.
456 (powerpc-cell64l.c): Remove.
457 (powerpc-vsx64l.c): Remove.
458 (powerpc-isa205-64l.c): Remove.
459 (powerpc-isa205-altivec64l.c): Remove.
460 (powerpc-isa205-vsx64l.c): Remove.
461 (s390-linux32.c): Remove.
462 (s390-linux32v1.c): Remove.
463 (s390-linux32v2.c): Remove.
464 (s390-linux64.c): Remove.
465 (s390-linux64v1.c): Remove.
466 (s390-linux64v2.c): Remove.
467 (s390-te-linux64.c): Remove.
468 (s390-vx-linux64.c): Remove.
469 (s390-tevx-linux64.c): Remove.
470 (s390x-linux64.c): Remove.
471 (s390x-linux64v1.c): Remove.
472 (s390x-linux64v2.c): Remove.
473 (s390x-te-linux64.c): Remove.
474 (s390x-vx-linux64.c): Remove.
475 (s390x-tevx-linux64.c): Remove.
476 (tic6x-c64xp-linux.c): Remove.
477 (tic6x-c64x-linux.c): Remove.
478 (tic6x-c62x-linux.c): Remove.
479 (reg-sh.c): Remove.
480 (reg-sparc64.c): Remove.
481 (reg-spu.c): Remove.
482 (amd64.c): Remove.
483 (amd64-linux.c): Remove.
484 (amd64-avx.c): Remove.
485 (amd64-avx-linux.c): Remove.
486 (amd64-avx-avx512.c): Remove.
487 (amd64-avx-avx512-linux.c): Remove.
488 (amd64-mpx.c): Remove.
489 (amd64-mpx-linux.c): Remove.
490 (amd64-avx-mpx-avx512-pku.c): Remove.
491 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
492 (amd64-avx-mpx.c): Remove.
493 (amd64-avx-mpx-linux.c): Remove.
494 (x32.c): Remove.
495 (x32-linux.c): Remove.
496 (x32-avx.c): Remove.
497 (x32-avx-linux.c): Remove.
498 (x32-avx-avx512.c): Remove.
499 (x32-avx-avx512-linux.c): Remove.
500 (reg-xtensa.c): Remove.
501 (reg-tilegx.c): Remove.
502 (reg-tilegx32.c): Remove.
503
1672e0d9
SDJ
5042017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
505
506 * Makefile.in (SFILES): Add "common/environ.c".
507 (OBJS): Add "common/environ.h".
508
239b6d10
WT
5092017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
510
511 * configure.ac: Check if the fs_base and gs_base members of
512 `struct user_regs_struct' exist.
513 * config.in: Regenerated.
514 * configure: Likewise.
515
694b382c
AT
5162017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
517
518 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
519 target_read_memory.
520 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
521 (get_next_pcs_syscall_next_pc): Likewise.
522
7dc53023
LM
5232016-12-23 Luis Machado <lgustavo@codesourcery.com>
524
525 * win32-i386-low.c: Fix incorrect reference to a couple source files.
526 * nto-x86-low.c: Likewise.
527
ad02e4fe
SM
5282016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
529
530 * Makefile.in: Include disable-implicit-rules.mk.
531
dcb07cfa
PA
5322016-11-23 Pedro Alves <palves@redhat.com>
533
534 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
535 (debug_vprintf): Use std::chrono::steady_clock instead of
536 gettimeofday. Use '.' instead of ':'.
537 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
538 (get_timestamp): Use std::chrono::steady_clock instead of
539 gettimeofday.
540
8629c02c
SM
5412016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * Makefile.in: Fix whitespace formatting.
544
b593ecca
SM
5452016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
546
547 * Makefile.in (SFILES, OBS): Flatten list and order
548 alphabetically.
549
9986ba08
PA
5502016-11-23 Pedro Alves <palves@redhat.com>
551
552 * event-loop.c (handle_file_event): Use warning.
553 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
554 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
555 Use warning.
556
4eefa7bc
PA
5572016-11-23 Pedro Alves <palves@redhat.com>
558
559 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
560 output.
561 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
562 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
563 debug_printf and debug_flush for debug output.
564 * server.c (handle_general_set): Likewise.
565 * thread-db.c (try_thread_db_load): Use debug_printf for debug
566 output.
567
5443506e
SM
5682016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * Makefile.in (.c.o): Replace rule with ...
571 (%.o: %.c): ... this one.
572
3b165252
SM
5732016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
574
575 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
576 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
577 make.
578 * configure.ac: Remove checks for the make program.
579 * configure: Re-generate.
580
0bcda685
PA
5812016-10-28 Pedro Alves <palves@redhat.com>
582
583 * Makefile.in (CXX_DIALECT): Get from configure.
584 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
585 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
586 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
587 * config.in: Regenerate.
588 * configure: Regenerate.
589
c3805894
YQ
5902016-10-27 Yao Qi <yao.qi@linaro.org>
591
592 * linux-low.c (linux_supports_range_stepping): Return true if
593 can_software_single_step return true.
594
89342618
YQ
5952016-10-27 Yao Qi <yao.qi@linaro.org>
596
597 * inferiors.c (find_inferior_in_random): New function.
598 * inferiors.h (find_inferior_in_random): Declare.
599 * linux-low.c (linux_wait_for_event_filtered): Call
600 find_inferior_in_random instead of find_inferior.
601
e3652c84
YQ
6022016-10-27 Yao Qi <yao.qi@linaro.org>
603
604 * linux-low.c (linux_wait_1): If single-step breakpoints are
605 inserted, remove them.
606
5a04c4cf
PA
6072016-10-26 Pedro Alves <palves@redhat.com>
608
609 * linux-low.c (handle_extended_wait): Link parent/child fork
610 threads.
611 (linux_wait_1): Unlink them.
612 (linux_set_resume_request): Ignore resume requests for
613 already-resumed and unhandled fork child threads.
614 * linux-low.h (struct lwp_info) <fork_relative>: New field.
615 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
616 New functions.
617 (handle_v_requests) <vCont>: Don't call require_running.
618 * server.h (in_queued_stop_replies): New declaration.
619
cb93dc7f
YQ
6202016-10-24 Yao Qi <yao.qi@linaro.org>
621
622 PR server/20733
623 * linux-aarch64-low.c (append_insns): Cast the return value to
624 'uint32_t *'.
625
a1078bea
YQ
6262016-10-10 Yao Qi <yao.qi@linaro.org>
627
628 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
629
1fb77080
SDJ
6302016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
631
632 * target.c (target_supports_multi_process): New function, moved
633 from...
634 * target.h (target_supports_multi_process): ... here. Remove
635 macro.
636
39b5a3b9
TT
6372016-10-05 Tom Tromey <tom@tromey.com>
638
639 PR remote/20655:
640 * tracepoint.c (handle_tracepoint_bkpts): Check
641 ipa_error_tracepoint, not ipa_stopping_tracepoint.
642
c1d0b70a
YQ
6432016-10-05 Yao Qi <yao.qi@linaro.org>
644
645 * configure.srv: Update the path of arm-*.xml files.
646
0a69eedb
YQ
6472016-10-05 Terry Guo <terry.guo@arm.com>
648 Yao Qi <yao.qi@linaro.org>
649
650 * Makefile.in: Adjust the path of rules.
651 * configure.srv: Update the path of xml files.
652 * regformats/arm-with-iwmmxt.dat: Regenerated.
653 * regformats/arm-with-neon.dat: Likewise.
654 * regformats/arm-with-vfpv2.dat: Likewise.
655 * regformats/arm-with-vfpv3.dat Likewise.
656
17e16485
YQ
6572016-09-30 Yao Qi <yao.qi@linaro.org>
658
659 PR gdbserver/20627
660 * target.c (target_stop_and_wait): Don't call
661 target_continue_no_signal, use resume_stop instead.
662
edeeb602
YQ
6632016-09-26 Yao Qi <yao.qi@linaro.org>
664
665 * linux-low.c (linux_wait_1): Call debug_exit.
666
503b1c39
PA
6672016-09-23 Pedro Alves <palves@redhat.com>
668
669 * Makefile.in (SFILES): Add common/new-op.c.
670 (OBS): Add common/new-op.o.
671 (new-op.o): New rule.
672
74172ecf
SM
6732016-09-21 Simon Marchi <simon.marchi@ericsson.com>
674
675 * .gitinore: Ignore more files.
676
fc6cda2e
YQ
6772016-09-21 Yao Qi <yao.qi@linaro.org>
678
679 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
680 23.
681
bc1e6c81
SDJ
6822016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
683
684 * server.c (start_inferior): Call target_mourn_inferior instead of
685 mourn_inferior; pass ptid_t argument to it.
686 (resume): Likewise.
687 (handle_target_event): Likewise.
688 * target.c (target_mourn_inferior): New function.
689 * target.h (mourn_inferior): Delete macro.
690
0e00e962
AA
6912016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
692
693 * linux-low.c (lwp_is_stepping): New function.
694
1d8cb77d
CL
6952016-09-06 Carl Love <cel@us.ibm.com>
696
697 * server.c (start_inferior): Fixed comment, requested comment change
698 didn't get updated correctly. Removed reference to ptrace () call as
699 it is only true on Linux systems.
700
7313bced
CL
7012016-09-06 Carl Love <cel@us.ibm.com>
702
703 * server.c (start_inferior): Do not call
704 function target_post_create_inferior () if the
705 inferior process has already exited.
706
cf6de44d
PA
7072016-09-05 Pedro Alves <palves@redhat.com>
708
709 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
710 (COMPILE.pre, CC_LD): Use CXX directly.
711 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
712 * acinclude.m4: Don't include build-with-cxx.m4.
713 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
714 * configure: Regenerate.
715
c1da6748
AT
7162016-09-02 Akash Trehan <akash.trehan123@gmail.com>
717
718 PR gdb/19495
719 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
720 call writing data to own_buf.
721
f2b9e3df
SDJ
7222016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
723
724 * target.c (mywait): Call target_wait instead of
725 the_target->wait.
726 (target_wait): New function.
727
049a8570
SDJ
7282016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
729
730 * server.c (start_inferior): New variable 'ptid'. Replace calls
731 to the_target->resume by target_continue{,_no_signal}, depending
732 on the case.
733 * target.c (target_stop_and_wait): Call target_continue_no_signal
734 instead of the_target->resume.
735 (target_continue): New function.
736
3aa5cfa0
AT
7372016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
738
739 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
740
754653a7
AZ
7412016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
742
743 PR server/20491
744 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
745 ps_prochandle.
746 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
747 * linux-arm-low.c (ps_get_thread_area): Likewise.
748 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
749 * linux-m68k-low.c (ps_get_thread_area): Likewise.
750 * linux-mips-low.c (ps_get_thread_area): Likewise.
751 * linux-nios2-low.c (ps_get_thread_area): Likewise.
752 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
753 * linux-x86-low.c (ps_get_thread_area): Likewise.
754 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
755
ed036b40
PA
7562016-08-19 Pedro Alves <palves@redhat.com>
757
758 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
759
c8ef42ee
PA
7602016-08-19 Pedro Alves <palves@redhat.com>
761
762 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
763 comment. Use memcpy instead of casting through unsigned long.
764
9c235a72
PA
7652016-08-19 Pedro Alves <palves@redhat.com>
766
767 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
768 allocating around 0x80000000.
769
201506da
PA
7702016-08-19 Pedro Alves <palves@redhat.com>
771
772 PR gdb/20415
773 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
774 (x32-avx512-linux-ipa.o): New rules.
775 * configure.ac (x86_64-*-linux*): New x32 check.
776 * configure.srv (ipa_x32_linux_regobj): New.
777 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
778 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
779 descriptions.
780 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
781 descriptions.
782 * configure: Regenerate.
783
f348d89a
PA
7842016-08-09 Pedro Alves <palves@redhat.com>
785
786 PR gdb/18653
787 * Makefile.in (OBS): Add signals-state-save-restore.o.
788 (signals-state-save-restore.o): New rule.
789 * config.in: Regenerate.
790 * configure: Regenerate.
791 * linux-low.c: Include "signals-state-save-restore.h".
792 (linux_create_inferior): Call
793 restore_original_signals_state.
794 * server.c: Include "dispositions-save-restore.h".
795 (captured_main): Call save_original_signals_state.
796
1baf5149
PA
7972016-08-05 Pedro Alves <palves@redhat.com>
798
799 * configure: Regenerate.
800
fcd4a73d
YQ
8012016-08-04 Yao Qi <yao.qi@linaro.org>
802
803 * linux-low.c (regsets_fetch_inferior_registers): Check
804 errno is ESRCH or not.
805
979659d0
YQ
8062016-08-02 Yao Qi <yao.qi@linaro.org>
807
808 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
809 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
810 (thread_db_load_search): Update.
811 (try_thread_db_load_1): Don't look for td_ta_event_addr,
812 td_ta_set_event and td_ta_event_getmsg.
813
6598661d
PA
8142016-07-26 Pedro Alves <palves@redhat.com>
815
816 PR server/20414
817 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
818 of unsigned long for 64-bit registers and use uint32_t instead of
819 unsigned int for 32-bit registers.
820
9cf12d57
PA
8212016-07-26 Pedro Alves <palves@redhat.com>
822
823 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
824 to 'ptrace'.
825
305450ed
TT
8262016-07-21 Tom Tromey <tom@tromey.com>
827
828 * configure: Rebuild.
829
2583da7c
YQ
8302016-07-21 Yao Qi <yao.qi@linaro.org>
831
832 * mem-break.c (find_gdb_breakpoint): Cast bp to
833 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
834
21536b36
YQ
8352016-07-21 Yao Qi <yao.qi@linaro.org>
836
837 * server.c (handle_v_requests): Support s and S actions
838 if target_supports_software_single_step return true.
839
8901d193
YQ
8402016-07-21 Yao Qi <yao.qi@linaro.org>
841
842 * linux-low.c (resume_stopped_resumed_lwps): If resume request
843 is resume_step, call maybe_hw_step.
844 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
845 and unstop them.
846 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
847 breakpoints or not.
848 (proceed_one_lwp): If resume request is resume_step, install
849 reinsert breakpoints and call maybe_hw_step.
850
0e9a339e
YQ
8512016-07-21 Yao Qi <yao.qi@linaro.org>
852
853 * linux-low.c (proceed_one_lwp): Declare.
854 (linux_resume_one_thread): Remove local variable 'step'.
855 Lift code enqueue signal. Call proceed_one_lwp instead of
856 linux_resume_one_lwp.
857
4281b351
YQ
8582016-07-21 Yao Qi <yao.qi@linaro.org>
859
860 * linux-low.c (linux_resume_one_thread): Call
861 enqueue_pending_signal.
862
984a2c04
YQ
8632016-07-21 Yao Qi <yao.qi@linaro.org>
864
865 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
866 * inferiors.c (do_restore_current_thread_cleanup): New function.
867 (make_cleanup_restore_current_thread): Likewise.
868 * linux-low.c (install_software_single_step_breakpoints): Call
869 make_cleanup_restore_current_thread. Switch current_thread to
870 thread.
871
bec903c9
YQ
8722016-07-21 Yao Qi <yao.qi@linaro.org>
873
874 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
875 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
876 (clone_one_breakpoint): Likewise.
877 (delete_reinsert_breakpoints): Change parameter to thread.
878 Callers updated.
879 (has_reinsert_breakpoints): Likewise.
880 (uninsert_reinsert_breakpoints): Likewise.
881 (reinsert_reinsert_breakpoints): Likewise.
882 * mem-break.h (set_reinsert_breakpoint): Update declaration.
883 (delete_reinsert_breakpoints): Likewise.
884 (reinsert_reinsert_breakpoints): Likewise.
885 (uninsert_reinsert_breakpoints): Likewise.
886 (has_reinsert_breakpoints): Likewise.
887
63c40ec7
YQ
8882016-07-21 Yao Qi <yao.qi@linaro.org>
889
890 * inferiors.c (get_thread_process): Make parameter const.
891 * inferiors.h (get_thread_process): Update declaration.
892 * mem-break.c (clone_all_breakpoints): Remove all parameters.
893 Add new parameters child_thread and parent_thread. Callers
894 updated.
895 * mem-break.h (clone_all_breakpoints): Update declaration.
896
9aa76cd0
YQ
8972016-07-21 Yao Qi <yao.qi@linaro.org>
898
899 * mem-break.c (struct breakpoint) <cond_list>: Remove.
900 <command_list, handler>: Remove.
901 (struct gdb_breakpoint): New.
902 (struct other_breakpoint): New.
903 (struct reinsert_breakpoint): New.
904 (is_gdb_breakpoint): New function.
905 (any_persistent_commands): Update command_list if
906 is_gdb_breakpoint returns true.
907 (set_breakpoint): Create breakpoints according to their types.
908 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
909 (set_gdb_breakpoint_1): Likewise.
910 (set_gdb_breakpoint): Likewise.
911 (clear_breakpoint_conditions): Change parameter type to
912 'struct gdb_breakpoint *'.
913 (clear_breakpoint_commands): Likewise.
914 (clear_breakpoint_conditions_and_commands): Likewise.
915 (add_condition_to_breakpoint): Likewise.
916 (add_breakpoint_condition): Likewise.
917 (add_commands_to_breakpoint): Likewise.
918 (check_breakpoints): Check other_breakpoint.
919 (clone_one_breakpoint): Clone breakpopint according to its type.
920 * mem-break.h (struct gdb_breakpoint): Declare.
921 (set_gdb_breakpoint): Update declaration.
922 (clear_breakpoint_conditions_and_commands): Likewise.
923 (add_breakpoint_condition): Likewise.
924 (add_breakpoint_commands): Likewise.
925 * server.c (process_point_options): Change parameter type to
926 'struct gdb_breakpoint *'.
927
811f8301
YQ
9282016-07-21 Yao Qi <yao.qi@linaro.org>
929
930 * mem-break.c (set_breakpoint_at): Rename it to ...
931 (set_breakpoint_type_at): ... it.
932 (set_breakpoint_at): Call set_breakpoint_type_at.
933 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
934 * mem-break.h (set_breakpoint_at): Update comments.
935
b1c51e36
CLT
9362016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
937
938 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
939 to buf parameter.
940 (nios2_store_gregset): Likewise.
941
ced2dffb
PA
9422016-07-01 Pedro Alves <palves@redhat.com>
943 Antoine Tremblay <antoine.tremblay@ericsson.com>
944
945 * linux-low.c: Change interface to take the target lwp_info
946 pointer directly and return void. Handle detaching from a zombie
947 thread.
948 (linux_detach_lwp_callback): New function.
949 (linux_detach): Detach from the leader thread after detaching from
950 the clone threads.
951
2ac09a5b
YQ
9522016-06-28 Yao Qi <yao.qi@linaro.org>
953
954 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
955 for variable new_offset.
956 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
957 (aarch64_ftrace_insn_reloc_cb): Likewise.
958 (aarch64_ftrace_insn_reloc_tb): Likewise.
959 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
960 PRIx64 instead of PRIx32.
961
79e7fd4f
YQ
9622016-06-28 Yao Qi <yao.qi@linaro.org>
963
964 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
965 (the_low_target): Install arm_get_syscall_trapinfo.
966
061fc021
YQ
9672016-06-28 Yao Qi <yao.qi@linaro.org>
968
969 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
970 function.
971 (the_low_target): Install aarch64_get_syscall_trapinfo.
972
4cc32bec
YQ
9732016-06-28 Yao Qi <yao.qi@linaro.org>
974
975 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
976 Callers updated.
977 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
978 Remove parameter sysno.
979 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
980 sysret.
981
782c1122
AA
9822016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
983
984 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
985 (s390_emit_ne_goto): Likewise.
986 (s390_emit_lt_goto): Likewise.
987 (s390_emit_le_goto): Likewise.
988 (s390_emit_gt_goto): Likewise.
989 (s390_emit_ge_goto): Likewise.
990 (s390x_emit_eq_goto): Likewise.
991 (s390x_emit_ne_goto): Likewise.
992 (s390x_emit_lt_goto): Likewise.
993 (s390x_emit_le_goto): Likewise.
994 (s390x_emit_gt_goto): Likewise.
995 (s390x_emit_ge_goto): Likewise.
996 (s390_emit_ops_impl): Mark variable static.
997 (s390x_emit_ops): Likewise.
998
2e7b624b
YQ
9992016-06-17 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-low.c (handle_extended_wait): Call
1002 uninsert_reinsert_breakpoints for the parent process. Remove
1003 reinsert breakpoints from the child process. Reinsert them to
1004 the parent process when vfork is done.
1005 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1006 (reinsert_reinsert_breakpoints): New function.
1007 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1008 (reinsert_reinsert_breakpoints): Declare.
1009
8a81c5d7
YQ
10102016-06-17 Yao Qi <yao.qi@linaro.org>
1011
1012 * linux-low.c (handle_extended_wait): If the parent is doing
1013 step-over, remove the reinsert breakpoints from the forked child.
1014
f50bf8e5
YQ
10152016-06-17 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-low.c (unsuspend_all_lwps): Declare.
1018 (linux_low_filter_event): If thread exited, call finish_step_over.
1019 If step-over is finished, unsuspend other threads.
1020
8376a3cb
YQ
10212016-06-17 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-low.c (linux_resume_one_lwp_throw): Assert
1024 has_reinsert_breakpoints returns false.
1025 * mem-break.c (delete_disabled_breakpoints): Assert
1026 bp type isn't reinsert_breakpoint.
1027
f79b145d
YQ
10282016-06-17 Yao Qi <yao.qi@linaro.org>
1029
1030 * linux-low.c (maybe_hw_step): New function.
1031 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1032 (finish_step_over): Switch current_thread to lwp temporarily,
1033 and assert has_reinsert_breakpoints returns true.
1034 (proceed_one_lwp): Call maybe_hw_step.
1035 * mem-break.c (has_reinsert_breakpoints): New function.
1036 * mem-break.h (has_reinsert_breakpoints): Declare.
1037
0ae534d2
JT
10382016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1039
1040 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1041
fcdad592
YQ
10422016-05-17 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1045 instead of find_inferior.
1046
9e784964
YQ
10472016-05-05 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1050 Initialize res to zero.
1051
cf2ebb6e
YQ
10522016-05-05 Yao Qi <yao.qi@linaro.org>
1053
1054 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1055 to uint32_t.
1056
c1aebf87
UW
10572016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1058
1059 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1060 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1061 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1062
35fd2deb 10632016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1064 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1065
1066 * tracepoint.c (write_inferior_int8): New function.
1067 (cmd_qtenable_disable): Write enable flag using
1068 write_inferior_int8.
1069
484b3c32
YQ
10702016-04-25 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1073 (need_step_over_p): Return zero if the LWP has pending signals
1074 can be delivered on software single step target.
1075
85ba7d86
YQ
10762016-04-25 Yao Qi <yao.qi@linaro.org>
1077
1078 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1079 return instead of error.
1080
3539aa13
YQ
10812016-04-22 Yao Qi <yao.qi@linaro.org>
1082
1083 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1084 to 23.
1085
5b061e98
YQ
10862016-04-22 Yao Qi <yao.qi@linaro.org>
1087
1088 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1089 signal when stepping over breakpoint with software single
1090 step.
1091
3451269c
PA
10922016-04-21 Pedro Alves <palves@redhat.com>
1093
1094 * linux-s390-low.c (s390_collect_ptrace_register)
1095 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1096 add casts.
1097 (s390_check_regset): Use void * instead of gdb_byte *.
1098
a2358508
PA
10992016-04-20 Pedro Alves <palves@redhat.com>
1100
1101 * configure: Renegerate.
1102
6885166d
YQ
11032016-04-20 Yao Qi <yao.qi@linaro.org>
1104
1105 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1106 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1107 number 16.
1108 (arm_store_gregset): Likewise.
1109
2b863f51
WT
11102016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1111
1112 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1113 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1114 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1115 (amd64-avx-mpx-linux.c): New rules.
1116 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1117 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1118 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1119 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1120 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1121 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1122 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1123 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1124 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1125 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1126 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1127 * linux-x86-low.c (x86_linux_read_description): Add case for
1128 X86_XSTATE_AVX_MPX_MASK.
1129 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1130 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1131 init_registers_i386_avx_mpx_linux.
1132 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1133 (initialize_low_tracepoint): Call
1134 init_registers_i386_avx_mpx_linux.
1135 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1136 (initialize_low_tracepoint): Call
1137 init_registers_amd64_avx_mpx_linux.
1138 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1139 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1140 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1141 declarations.
1142
9b30624b
PA
11432016-04-18 Pedro Alves <palves@redhat.com>
1144
1145 * configure: Regenerate.
1146
45e3745e
AT
11472016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1148
1149 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1150 (aarch64_emit_sub): Likewise.
1151
2afc13ff
PA
11522016-04-12 Pedro Alves <palves@redhat.com>
1153
1154 * utils.c (prepare_to_throw_exception): Delete.
1155
6e774b13
SM
11562016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1157
1158 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1159
4dca19f8
MK
11602016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1161
1162 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1163
d0a9981f
MK
11642016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1165
1166 * linux-aarch64-ipa.c: Add <elf.h> include.
1167 * linux-ppc-ipa.c: Add <elf.h> include.
1168 * linux-s390-ipa.c: Add <elf.h> include.
1169
252db07e
MK
11702016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1171
1172 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1173 (get_raw_reg_ptr): Likewise.
1174 (get_trace_state_variable_value_ptr): Likewise.
1175 (set_trace_state_variable_value_ptr): Likewise.
1176 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1177 char *.
1178
14e2b6d9
MK
11792016-03-31 Wei-cheng Wang <cole945@gmail.com>
1180 Marcin Kościelnicki <koriakin@0x04.net>
1181
1182 PR/17221
1183 * linux-ppc-low.c (emit_insns): New function.
1184 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1185 (ppc_emit_prologue): New function.
1186 (ppc_emit_epilogue): New function.
1187 (ppc_emit_add): New function.
1188 (ppc_emit_sub): New function.
1189 (ppc_emit_mul): New function.
1190 (ppc_emit_lsh): New function.
1191 (ppc_emit_rsh_signed): New function.
1192 (ppc_emit_rsh_unsigned): New function.
1193 (ppc_emit_ext): New function.
1194 (ppc_emit_zero_ext): New function.
1195 (ppc_emit_log_not): New function.
1196 (ppc_emit_bit_and): New function.
1197 (ppc_emit_bit_or): New function.
1198 (ppc_emit_bit_xor): New function.
1199 (ppc_emit_bit_not): New function.
1200 (ppc_emit_equal): New function.
1201 (ppc_emit_less_signed): New function.
1202 (ppc_emit_less_unsigned): New function.
1203 (ppc_emit_ref): New function.
1204 (ppc_emit_const): New function.
1205 (ppc_emit_reg): New function.
1206 (ppc_emit_pop): New function.
1207 (ppc_emit_stack_flush): New function.
1208 (ppc_emit_swap): New function.
1209 (ppc_emit_stack_adjust): New function.
1210 (ppc_emit_call): New function.
1211 (ppc_emit_int_call_1): New function.
1212 (ppc_emit_void_call_2): New function.
1213 (ppc_emit_if_goto): New function.
1214 (ppc_emit_goto): New function.
1215 (ppc_emit_eq_goto): New function.
1216 (ppc_emit_ne_goto): New function.
1217 (ppc_emit_lt_goto): New function.
1218 (ppc_emit_le_goto): New function.
1219 (ppc_emit_gt_goto): New function.
1220 (ppc_emit_ge_goto): New function.
1221 (ppc_write_goto_address): New function.
1222 (ppc_emit_ops_impl): New static variable.
1223 (ppc64v1_emit_prologue): New function.
1224 (ppc64v2_emit_prologue): New function.
1225 (ppc64_emit_epilogue): New function.
1226 (ppc64_emit_add): New function.
1227 (ppc64_emit_sub): New function.
1228 (ppc64_emit_mul): New function.
1229 (ppc64_emit_lsh): New function.
1230 (ppc64_emit_rsh_signed): New function.
1231 (ppc64_emit_rsh_unsigned): New function.
1232 (ppc64_emit_ext): New function.
1233 (ppc64_emit_zero_ext): New function.
1234 (ppc64_emit_log_not): New function.
1235 (ppc64_emit_bit_and): New function.
1236 (ppc64_emit_bit_or): New function.
1237 (ppc64_emit_bit_xor): New function.
1238 (ppc64_emit_bit_not): New function.
1239 (ppc64_emit_equal): New function.
1240 (ppc64_emit_less_signed): New function.
1241 (ppc64_emit_less_unsigned): New function.
1242 (ppc64_emit_ref): New function.
1243 (ppc64_emit_const): New function.
1244 (ppc64v1_emit_reg): New function.
1245 (ppc64v2_emit_reg): New function.
1246 (ppc64_emit_pop): New function.
1247 (ppc64_emit_stack_flush): New function.
1248 (ppc64_emit_swap): New function.
1249 (ppc64v1_emit_call): New function.
1250 (ppc64v2_emit_call): New function.
1251 (ppc64v1_emit_int_call_1): New function.
1252 (ppc64v2_emit_int_call_1): New function.
1253 (ppc64v1_emit_void_call_2): New function.
1254 (ppc64v2_emit_void_call_2): New function.
1255 (ppc64_emit_if_goto): New function.
1256 (ppc64_emit_eq_goto): New function.
1257 (ppc64_emit_ne_goto): New function.
1258 (ppc64_emit_lt_goto): New function.
1259 (ppc64_emit_le_goto): New function.
1260 (ppc64_emit_gt_goto): New function.
1261 (ppc64_emit_ge_goto): New function.
1262 (ppc64v1_emit_ops_impl): New static variable.
1263 (ppc64v2_emit_ops_impl): New static variable.
1264 (ppc_emit_ops): New function.
1265 (linux_low_target): Wire in ppc_emit_ops.
1266
a2174ba4
MK
12672016-03-31 Wei-cheng Wang <cole945@gmail.com>
1268 Marcin Kościelnicki <koriakin@0x04.net>
1269
1270 PR/17221
1271 * Makefile.in: Add powerpc-*-ipa.o
1272 * configure.srv: Add ipa_obj for powerpc*-linux.
1273 * linux-ppc-ipa.c: New file.
1274 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1275 includes.
1276 (PPC_FIELD): New macro.
1277 (PPC_SEXT): New macro.
1278 (PPC_OP6): New macro.
1279 (PPC_BO): New macro.
1280 (PPC_LI): New macro.
1281 (PPC_BD): New macro.
1282 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1283 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1284 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1285 (ppc_get_thread_area): New function.
1286 (is_elfv2_inferior): New function.
1287 (gen_ds_form): New function.
1288 (GEN_STD): New macro.
1289 (GEN_STDU): New macro.
1290 (GEN_LD): New macro.
1291 (GEN_LDU): New macro.
1292 (gen_d_form): New function.
1293 (GEN_ADDI): New macro.
1294 (GEN_ADDIS): New macro.
1295 (GEN_LI): New macro.
1296 (GEN_LIS): New macro.
1297 (GEN_ORI): New macro.
1298 (GEN_ORIS): New macro.
1299 (GEN_LWZ): New macro.
1300 (GEN_STW): New macro.
1301 (GEN_STWU): New macro.
1302 (gen_xfx_form): New function.
1303 (GEN_MFSPR): New macro.
1304 (GEN_MTSPR): New macro.
1305 (GEN_MFCR): New macro.
1306 (GEN_MTCR): New macro.
1307 (GEN_SYNC): New macro.
1308 (GEN_LWSYNC): New macro.
1309 (gen_x_form): New function.
1310 (GEN_OR): New macro.
1311 (GEN_MR): New macro.
1312 (GEN_LWARX): New macro.
1313 (GEN_STWCX): New macro.
1314 (GEN_CMPW): New macro.
1315 (gen_md_form): New function.
1316 (GEN_RLDICL): New macro.
1317 (GEN_RLDICR): New macro.
1318 (gen_i_form): New function.
1319 (GEN_B): New macro.
1320 (GEN_BL): New macro.
1321 (gen_b_form): New function.
1322 (GEN_BNE): New macro.
1323 (GEN_LOAD): New macro.
1324 (GEN_STORE): New macro.
1325 (gen_limm): New function.
1326 (gen_atomic_xchg): New function.
1327 (gen_call): New function.
1328 (ppc_relocate_instruction): New function.
1329 (ppc_install_fast_tracepoint_jump_pad): New function.
1330 (ppc_get_min_fast_tracepoint_insn_len): New function.
1331 (ppc_get_ipa_tdesc_idx): New function.
1332 (the_low_target): Wire in the new functions.
1333 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1334 tdescs.
1335 * linux-ppc-tdesc.h: New file.
1336
a13c4696
MK
13372016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1338
1339 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1340 (alloc_jump_pad_buffer): New function.
1341 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1342 (alloc_jump_pad_buffer): New function.
1343 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1344 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1345 (alloc_jump_pad_buffer): New function.
1346 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1347 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1348 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1349 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1350
1cda1512
MK
13512016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1352
1353 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1354 * linux-amd64-ipa.c: Likewise.
1355 * linux-i386-ipa.c: Likewise.
1356 * linux-s390-ipa.c: Likewise.
1357 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1358 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1359 set_trace_state_variable_value_ptr.
1360 (struct ipa_sym_addresses): Likewise.
1361 (symbol_list): Likewise.
1362 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1363 accessing gdb_collect directly.
1364 (gdb_collect_ptr_type): New typedef.
1365 (get_raw_reg_ptr_type): New typedef.
1366 (get_trace_state_variable_value_ptr_type): New typedef.
1367 (set_trace_state_variable_value_ptr_type): New typedef.
1368 (gdb_collect_ptr): New global.
1369 (get_raw_reg_ptr): New global.
1370 (get_trace_state_variable_value_ptr): New global.
1371 (set_trace_state_variable_value_ptr): New global.
1372 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1373 accessing get_raw_reg directly.
1374 (get_get_tsv_func_addr): Likewise for
1375 get_trace_state_variable_value_ptr.
1376 (get_set_tsv_func_addr): Likewise for
1377 set_trace_state_variable_value_ptr.
1378 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1379
72fb5488
SM
13802016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1381
1382 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1383
28170b88
MK
13842016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1385
1386 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1387 packets.
1388 (relocate_instruction): Remove own_buf.
1389 * server.c (own_buf): Make global.
1390 (handle_v_requests): Make global.
1391 * server.h (own_buf): New declaration.
1392 (handle_v_requests): New prototype.
1393
f39e8743
MK
13942016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1395
1396 PR 18377
1397 * linux-s390-low.c (add_insns): New function.
1398 (s390_emit_prologue): New function.
1399 (s390_emit_epilogue): New function.
1400 (s390_emit_add): New function.
1401 (s390_emit_sub): New function.
1402 (s390_emit_mul): New function.
1403 (s390_emit_lsh): New function.
1404 (s390_emit_rsh_signed): New function.
1405 (s390_emit_rsh_unsigned): New function.
1406 (s390_emit_ext): New function.
1407 (s390_emit_log_not): New function.
1408 (s390_emit_bit_and): New function.
1409 (s390_emit_bit_or): New function.
1410 (s390_emit_bit_xor): New function.
1411 (s390_emit_bit_not): New function.
1412 (s390_emit_equal): New function.
1413 (s390_emit_less_signed): New function.
1414 (s390_emit_less_unsigned): New function.
1415 (s390_emit_ref): New function.
1416 (s390_emit_if_goto): New function.
1417 (s390_emit_goto): New function.
1418 (s390_write_goto_address): New function.
1419 (s390_emit_litpool): New function.
1420 (s390_emit_const): New function.
1421 (s390_emit_call): New function.
1422 (s390_emit_reg): New function.
1423 (s390_emit_pop): New function.
1424 (s390_emit_stack_flush): New function.
1425 (s390_emit_zero_ext): New function.
1426 (s390_emit_swap): New function.
1427 (s390_emit_stack_adjust): New function.
1428 (s390_emit_set_r2): New function.
1429 (s390_emit_int_call_1): New function.
1430 (s390_emit_void_call_2): New function.
1431 (s390_emit_eq_goto): New function.
1432 (s390_emit_ne_goto): New function.
1433 (s390_emit_lt_goto): New function.
1434 (s390_emit_le_goto): New function.
1435 (s390_emit_gt_goto): New function.
1436 (s390_emit_ge_goto): New function.
1437 (s390x_emit_prologue): New function.
1438 (s390x_emit_epilogue): New function.
1439 (s390x_emit_add): New function.
1440 (s390x_emit_sub): New function.
1441 (s390x_emit_mul): New function.
1442 (s390x_emit_lsh): New function.
1443 (s390x_emit_rsh_signed): New function.
1444 (s390x_emit_rsh_unsigned): New function.
1445 (s390x_emit_ext): New function.
1446 (s390x_emit_log_not): New function.
1447 (s390x_emit_bit_and): New function.
1448 (s390x_emit_bit_or): New function.
1449 (s390x_emit_bit_xor): New function.
1450 (s390x_emit_bit_not): New function.
1451 (s390x_emit_equal): New function.
1452 (s390x_emit_less_signed): New function.
1453 (s390x_emit_less_unsigned): New function.
1454 (s390x_emit_ref): New function.
1455 (s390x_emit_if_goto): New function.
1456 (s390x_emit_const): New function.
1457 (s390x_emit_call): New function.
1458 (s390x_emit_reg): New function.
1459 (s390x_emit_pop): New function.
1460 (s390x_emit_stack_flush): New function.
1461 (s390x_emit_zero_ext): New function.
1462 (s390x_emit_swap): New function.
1463 (s390x_emit_stack_adjust): New function.
1464 (s390x_emit_int_call_1): New function.
1465 (s390x_emit_void_call_2): New function.
1466 (s390x_emit_eq_goto): New function.
1467 (s390x_emit_ne_goto): New function.
1468 (s390x_emit_lt_goto): New function.
1469 (s390x_emit_le_goto): New function.
1470 (s390x_emit_gt_goto): New function.
1471 (s390x_emit_ge_goto): New function.
1472 (s390_emit_ops): New function.
1473 (struct linux_target_ops): Fill in emit_ops hook.
1474
abd9baf9
MK
14752016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1476
1477 PR 18377
1478 * Makefile.in: Add s390 IPA files.
1479 * configure.srv: Build IPA for s390.
1480 * linux-s390-ipa.c: New file.
1481 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1482 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1483 (tdesc_s390_linux32): Likewise.
1484 (init_registers_s390_linux32v1): Likewise.
1485 (tdesc_s390_linux32v1): Likewise.
1486 (init_registers_s390_linux32v2): Likewise.
1487 (tdesc_s390_linux32v2): Likewise.
1488 (init_registers_s390_linux64): Likewise.
1489 (tdesc_s390_linux64): Likewise.
1490 (init_registers_s390_linux64v1): Likewise.
1491 (tdesc_s390_linux64v1): Likewise.
1492 (init_registers_s390_linux64v2): Likewise.
1493 (tdesc_s390_linux64v2): Likewise.
1494 (init_registers_s390_te_linux64): Likewise.
1495 (tdesc_s390_te_linux64): Likewise.
1496 (init_registers_s390_vx_linux64): Likewise.
1497 (tdesc_s390_vx_linux64): Likewise.
1498 (init_registers_s390_tevx_linux64): Likewise.
1499 (tdesc_s390_tevx_linux64): Likewise.
1500 (init_registers_s390x_linux64): Likewise.
1501 (tdesc_s390x_linux64): Likewise.
1502 (init_registers_s390x_linux64v1): Likewise.
1503 (tdesc_s390x_linux64v1): Likewise.
1504 (init_registers_s390x_linux64v2): Likewise.
1505 (tdesc_s390x_linux64v2): Likewise.
1506 (init_registers_s390x_te_linux64): Likewise.
1507 (tdesc_s390x_te_linux64): Likewise.
1508 (init_registers_s390x_vx_linux64): Likewise.
1509 (tdesc_s390x_vx_linux64): Likewise.
1510 (init_registers_s390x_tevx_linux64): Likewise.
1511 (tdesc_s390x_tevx_linux64): Likewise.
1512 (have_hwcap_s390_vx): New static variable.
1513 (s390_arch_setup): Fill have_hwcap_s390_vx.
1514 (s390_get_thread_area): New function.
1515 (s390_ft_entry_gpr_esa): New const.
1516 (s390_ft_entry_gpr_zarch): New const.
1517 (s390_ft_entry_misc): New const.
1518 (s390_ft_entry_fr): New const.
1519 (s390_ft_entry_vr): New const.
1520 (s390_ft_main_31): New const.
1521 (s390_ft_main_64): New const.
1522 (s390_ft_exit_fr): New const.
1523 (s390_ft_exit_vr): New const.
1524 (s390_ft_exit_misc): New const.
1525 (s390_ft_exit_gpr_esa): New const.
1526 (s390_ft_exit_gpr_zarch): New const.
1527 (append_insns): New function.
1528 (s390_relocate_instruction): New function.
1529 (s390_install_fast_tracepoint_jump_pad): New function.
1530 (s390_get_min_fast_tracepoint_insn_len): New function.
1531 (s390_get_ipa_tdesc_idx): New function.
1532 (struct linux_target_ops): Wire in the above functions.
1533 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1534 * linux-s390-tdesc.h: New file.
1535
a4105d04
MK
15362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1537
1538 * linux-s390-low.c (s390_supports_tracepoints): New function.
1539 (struct linux_target_ops): Fill supports_tracepoints hook.
1540
35ac8b3e
YQ
15412016-03-18 Yao Qi <yao.qi@linaro.org>
1542
1543 * linux-low.c (lwp_signal_can_be_delivered): New function.
1544 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1545
94610ec4
YQ
15462016-03-18 Yao Qi <yao.qi@linaro.org>
1547
1548 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1549 0 if signal is enqueued. Remove 'signal' from one debugging
1550 message. Move one debugging message to some lines below.
1551 Remove code setting 'signal' to 0.
1552
80aea927
YQ
15532016-03-18 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-low.c (linux_low_filter_event): Remove redundant
1556 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1557
b04fd3be
MK
15582016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1559
1560 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1561 (struct linux_target_ops): Wire in the above.
1562
c40c8d4b
YQ
15632016-03-03 Yao Qi <yao.qi@linaro.org>
1564
1565 * linux-low.c: Update comments to start_step_over.
1566
0f8288ae
YQ
15672016-03-03 Yao Qi <yao.qi@linaro.org>
1568
1569 PR server/19736
1570 * linux-low.c (handle_extended_wait): Set child suspended
1571 if event_lwp->bp_reinsert isn't zero.
1572
fdbd04a8
YQ
15732016-03-02 Yao Qi <yao.qi@linaro.org>
1574
1575 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1576 enqueue_pending_signal.
1577
6896a8fa
MK
15782016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1579
1580 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1581 is actually loaded.
1582
ab503087
MK
15832016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1584
1585 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1586 (s390_regmap_3264) [!__s390x__]: New global.
1587 (s390_collect_ptrace_register): Skip map entries containing -1.
1588 (s390_supply_ptrace_register): Ditto.
1589 (s390_fill_gprs_high): New function.
1590 (s390_store_gprs_high): New function.
1591 (s390_regsets): Add NT_S390_HIGH_GPRS.
1592 (s390_get_hwcap): Enable on 31-bit.
1593 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1594 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1595 Detect NT_S390_HIGH_GPRS.
1596 (s390_usrregs_info_3264): Enable on 31-bit.
1597 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1598 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1599
ae91f625
MK
16002016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1601
1602 PR gdb/13808
1603 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1604 * configure.srv: Ditto.
1605 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1606 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1607 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1608 (init_registers_amd64_linux): Remove prototype.
1609 (tdesc_amd64_linux): Remove declaration.
1610 (get_ipa_tdesc): New function.
1611 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1612 initialize remaining tdescs.
1613 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1614 (init_registers_i386_linux): Remove prototype.
1615 (tdesc_i386_linux): Remove declaration.
1616 (get_ipa_tdesc): New function.
1617 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1618 initialize remaining tdescs.
1619 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1620 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1621 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1622 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1623 (x86_get_ipa_tdesc_idx): New function.
1624 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1625 * linux-x86-tdesc.h: New file.
1626 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1627 (target_get_ipa_tdesc_idx): New macro.
1628 * tracepoint.c (ipa_tdesc_idx): New macro.
1629 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1630 (symbol_list): Add ipa_tdesc_idx.
1631 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1632 (ipa_tdesc): Remove.
1633 (ipa_tdesc_idx): New variable.
1634 (get_context_regcache): Use get_ipa_tdesc.
1635 (gdb_collect): Ditto.
1636 (gdb_probe): Ditto.
1637 * tracepoint.h (get_ipa_tdesc): New prototype.
1638 (ipa_tdesc): Remove.
1639
e7ad2f14
PA
16402016-02-24 Pedro Alves <palves@redhat.com>
1641
1642 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1643 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1644 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1645 Factor out common code between the USE_SIGTRAP_SIGINFO and
1646 !USE_SIGTRAP_SIGINFO blocks.
1647 (linux_low_filter_event): Call save_stop_reason instead of
1648 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1649 Update comments.
1650 (linux_wait_1): Update comments.
1651
657f9cde
WW
16522016-02-24 Wei-cheng Wang <cole945@gmail.com>
1653
1654 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1655 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1656 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1657 ppc_insert_point, ppc_remove_point.
1658
b00b61e1
MK
16592016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1660
1661 * linux-s390-low.c (s390_supports_z_point_type): New function.
1662 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1663
553cb527
YQ
16642016-02-16 Yao Qi <yao.qi@linaro.org>
1665
1666 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1667 PC. Get pc from regcache_read_pc.
1668
a5652c21
YQ
16692016-02-12 Yao Qi <yao.qi@linaro.org>
1670
1671 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1672 or linux_get_pc_32bit.
1673 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1674
ed443b61
YQ
16752016-02-12 Yao Qi <yao.qi@linaro.org>
1676
1677 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1678 arm_linux_get_next_pcs_fixup.
1679
020ecd38
MK
16802016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1681
1682 * tracepoint.c (x_tracepoint_action_download): Change
1683 write_inferior_data_ptr to write_inferior_data_pointer.
1684 (cmd_qtstart): Likewise.
1685 (write_inferior_data_ptr): Remove.
1686 (download_agent_expr): Change write_inferior_data_ptr to
1687 write_inferior_data_pointer.
1688 (download_tracepoint_1): Likewise.
1689 (download_tracepoint): Likewise.
1690 (download_trace_state_variables): Likewise.
1691
7cae9051
WW
16922016-02-11 Wei-cheng Wang <cole945@gmail.com>
1693 Marcin Kościelnicki <koriakin@0x04.net>
1694
1695 * tracepoint.c (struct tracepoint_action_ops): Remove.
1696 (struct tracepoint_action): Remove ops.
1697 (m_tracepoint_action_download, r_tracepoint_action_download)
1698 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1699 size and offset accordingly.
1700 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1701 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1702 (tracepoint_action_send, tracepoint_action_download): New functions.
1703 Helpers for trace action handlers.
1704 (add_tracepoint_action): Remove setup actions ops.
1705 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1706
9f6a71b4
YQ
17072016-02-10 Yao Qi <yao.qi@linaro.org>
1708
1709 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1710
1e94266c
SM
17112016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1714 to AC_OUTPUT.
1715 * configure: Regenerate.
1716
8adce034
SM
17172016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1718
1719 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1720 void * to gdb_byte *.
1721 * linux-low.c (siginfo_fixup): Likewise.
1722 (linux_xfer_siginfo): Likewise.
1723 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1724 Likewise.
1725 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1726
93813b37
WT
17272016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1728
1729 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1730 to srv_tgtobj.
1731 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1732 to srv_tgtobj.
1733 * linux-x86-low.c [__x86_64__]: Include
1734 "nat/amd64-linux-siginfo.h".
1735 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1736 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1737 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1738 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1739 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1740 (cpt_si_fd, si_timerid, si_overrun): Move from
1741 nat/amd64-linux-siginfo.c.
1742 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1743
8424cc97
SM
17442016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1745
1746 * server.c (skip_to_semicolon): Remove.
1747 (process_point_options): Use strchrnul instead of
1748 skip_to_semicolon.
1749
4d18591b
YQ
17502016-01-26 Yao Qi <yao.qi@linaro.org>
1751
1752 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1753 * linux-low.c (install_software_single_step_breakpoints): Don't
1754 call regcache_read_pc.
1755 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1756 argument pc.
1757
d8020970
YQ
17582016-01-26 Yao Qi <yao.qi@linaro.org>
1759
1760 * linux-low.c (install_software_single_step_breakpoints): Call
1761 regcache_read_pc instead of get_pc.
1762
8b207339
YQ
17632016-01-26 Yao Qi <yao.qi@linaro.org>
1764
1765 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1766 (unblock_async_io): Rename to ...
1767 (block_unblock_async_io): ... it. New function.
1768 (enable_async_io): Don't install SIGIO handler. Unblock it
1769 instead.
1770 (disable_async_io): Don't ignore SIGIO. Block it instead.
1771 (initialize_async_io): Install SIGIO handler. Don't call
1772 unblock_async_io.
1773
18879fef
YQ
17742016-01-26 Yao Qi <yao.qi@linaro.org>
1775
1776 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1777 first character is '\003', call *the_target->request_interrupt.
1778
a0f8e08a
YQ
17792016-01-25 Yao Qi <yao.qi@linaro.org>
1780
1781 * remote-utils.c (new_thread_notify): Remove.
1782 (dead_thread_notify): Likewise.
1783 * remote-utils.h (new_thread_notify): Remove declaration.
1784 (dead_thread_notify): Likewise.
1785
cc5fd9ab
MK
17862016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1787
1788 * gdb.trace/pending.exp: Fix expected message on continue.
1789
99e8eb11
MK
17902016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1791
1792 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1793 it works properly on big-endian machines where sizeof (CORE_ADDR)
1794 != sizeof (void *).
1795
a994041d
PA
17962016-01-21 Pedro Alves <palves@redhat.com>
1797
1798 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1799 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1800 * configure: Regenerate.
1801
f7a6a40d
YQ
18022016-01-21 Yao Qi <yao.qi@linaro.org>
1803
1804 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1805 is_thumb and set it according to CPSR saved on the stack.
1806 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1807 arm_sigreturn_next_pc.
1808
6f69e520
YQ
18092016-01-18 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-low.c (linux_set_pc_64bit): New function.
1812 (linux_get_pc_64bit): New function.
1813 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1814 Declare.
1815 * linux-sparc-low.c (debug_threads): Remove declaration.
1816 (sparc_get_pc): Remove.
1817 (the_low_target): Use linux_get_pc_64bit instead of
1818 sparc_get_pc.
1819 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1820 (the_low_target): Use linux_get_pc_64bit and
1821 linux_set_pc_64bit.
1822
276d4552
YQ
18232016-01-18 Yao Qi <yao.qi@linaro.org>
1824
1825 * linux-arm-low.c (debug_threads): Remove declaration.
1826 (arm_get_pc, arm_set_pc): Remove.
1827 (the_low_target): Use linux_get_pc_32bit and
1828 linux_set_pc_32bit.
1829 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1830 (the_low_target): Use linux_get_pc_32bit and
1831 linux_set_pc_32bit.
1832 * linux-cris-low.c (debug_threads): Remove declaration.
1833 (cris_get_pc, cris_set_pc,): Remove.
1834 (the_low_target): Use linux_get_pc_32bit and
1835 linux_set_pc_32bit.
1836 * linux-crisv32-low.c (debug_threads): Remove declaration.
1837 (cris_get_pc, cris_set_pc): Remove.
1838 (the_low_target): Use linux_get_pc_32bit and
1839 linux_set_pc_32bit.
1840 * linux-low.c: Include inttypes.h.
1841 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1842 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1843 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1844 (the_low_target): Use linux_get_pc_32bit and
1845 linux_set_pc_32bit.
1846 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1847 (the_low_target): Use linux_get_pc_32bit and
1848 linux_set_pc_32bit.
1849 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1850 (the_low_target): Use linux_get_pc_32bit and
1851 linux_set_pc_32bit.
1852 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1853 (the_low_target): Use linux_get_pc_32bit and
1854 linux_set_pc_32bit.
1855 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1856 (the_low_target): Use linux_get_pc_32bit and
1857 linux_set_pc_32bit.
1858
eb0edac8
GB
18592016-01-18 Gary Benson <gbenson@redhat.com>
1860
1861 * configure.ac (AC_FUNC_FORK): New check.
1862 * config.in: Regenerate.
1863 * configure: Likewise.
1864
1b451dda
YQ
18652016-01-14 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1868 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1869 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1870 arm_get_next_pcs_ctor.
1871
82075af2
JS
18722016-01-12 Josh Stone <jistone@redhat.com>
1873 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1874
1875 * inferiors.h: Include "gdb_vecs.h".
1876 (struct process_info): Add syscalls_to_catch.
1877 * inferiors.c (remove_process): Free syscalls_to_catch.
1878 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1879 syscall_return stops.
1880 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1881 * server.c (handle_general_set): Handle QCatchSyscalls.
1882 (handle_query): Report support for QCatchSyscalls.
1883 * target.h (struct target_ops): Add supports_catch_syscall.
1884 (target_supports_catch_syscall): New macro.
1885 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1886 (struct lwp_info): Add syscall_state.
1887 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1888 Maintain syscall_state and syscalls_to_catch across exec.
1889 (get_syscall_trapinfo): New function, proxy to the_low_target.
1890 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1891 (linux_low_filter_event): Toggle syscall_state entry/return for
1892 syscall traps, and set it ignored for all others.
1893 (gdb_catching_syscalls_p): New function.
1894 (gdb_catch_this_syscall_p): New function.
1895 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1896 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1897 (linux_supports_catch_syscall): New function.
1898 (linux_target_ops): Install it.
1899 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1900 (the_low_target): Install it.
1901
8f13a3ce
MF
19022016-01-12 Mike Frysinger <vapier@gentoo.org>
1903
1904 * acinclude.m4: Include new ../warning.m4 file.
1905 * configure: Regenerated.
1906 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1907
5b3da067
MF
19082016-01-12 Mike Frysinger <vapier@gentoo.org>
1909
1910 * ax.c (is_goto_target): Mark static.
1911 * linux-low.c (register_addr): Likewise.
1912 (linux_fetch_registers, linux_store_registers): Likewise.
1913 * mem-break.c (any_persistent_commands): Fix old prototype.
1914 (add_commands_to_breakpoint): Mark static.
1915 * regcache.c (find_register_by_name): Delete unused func.
1916 * remote-utils.c (hex_or_minus_one): Mark static.
1917 * server.c (monitor_show_help): Mark static.
1918 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1919 handle_v_requests): Likewise.
1920
bc504a31
PA
19212016-01-12 Pedro Alves <palves@redhat.com>
1922
1923 Remove use of the registered trademark symbol throughout.
1924
5a0dd67a
YQ
19252016-01-08 Yao Qi <yao.qi@linaro.org>
1926
1927 * remote-utils.c (getpkt): If c is '\003', call target hook
1928 request_interrupt.
1929
b2ca446f
YQ
19302016-01-06 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1933 linux-aarch32-low.c.
1934 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1935 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1936 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1937 (thumb2_breakpoint): Declare.
1938 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1939 linux-aarch32-low.h.
1940 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1941 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1942 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1943
edd88788
JB
19442016-01-01 Joel Brobecker <brobecker@adacore.com>
1945
1946 * gdbreplay.c (gdbreplay_version): Change copyright year in
1947 version message.
1948 * server.c (gdbserver_version): Likewise.
1949
65da7f14
PP
19502015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1951
1952 * server.c (crc32_table): Delete.
1953 (crc32): Use libiberty's xcrc32 function.
1954
4abd5ed2
JB
19552015-12-22 Joel Brobecker <brobecker@adacore.com>
1956
1957 * lynx-low.c (lynx_delete_thread_callback): New function.
1958 (lynx_mourn): Properly delete our process and all of its
1959 threads. Remove call to clear_inferiors.
1960
0e50fe5c
JB
19612015-12-22 Joel Brobecker <brobecker@adacore.com>
1962
1963 * target.c (thread_search_callback): Add check that
1964 the thread_stopped target callback is not NULL before
1965 calling it.
1966
35adc03f
YQ
19672015-12-21 Yao Qi <yao.qi@linaro.org>
1968
1969 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1970 arm breakpoint.
1971
bd2b2909
AT
19722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1973
1974 * server.c (handle_query): Call target_supports_software_single_step.
1975
7fe5e27e
AT
19762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1977
1978 * linux-low.c (single_step): New function.
1979 (linux_resume_one_lwp_throw): Call single_step.
1980 (start_step_over): Likewise.
1981
d9311bfa
AT
19822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1983
1984 * Makefile.in (SFILES): Append arch/arm-linux.c,
1985 arch/arm-get-next-pcs.c.
1986 (arm-linux.o): New rule.
1987 (arm-get-next-pcs.o): New rule.
1988 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1989 arm-linux.o.
1990 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1991 to linux-aarch32-low.c.
1992 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1993 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1994 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1995 (thumb2_breakpoint_len): Likewise.
1996 (arm_is_thumb_mode): Make non-static.
1997 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1998 from linux-aarch32-low.c.
1999 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2000 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2001 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2002 (thumb2_breakpoint_len): Likewise.
2003 (arm_is_thumb_mode): New declaration.
2004 * linux-arm-low.c: Include arch/arm-linux.h
2005 aarch/arm-get-next-pcs.h, sys/syscall.h.
2006 (get_next_pcs_ops): New struct.
2007 (get_next_pcs_addr_bits_remove): New function.
2008 (get_next_pcs_is_thumb): New function.
2009 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2010 (arm_sigreturn_next_pc): Likewise.
2011 (get_next_pcs_syscall_next_pc): Likewise.
2012 (arm_gdbserver_get_next_pcs): Likewise.
2013 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2014 Initialize.
2015 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2016 * server.h: Include gdb_vecs.h.
2017
68ce2059
AT
20182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2019
2020 * Makefile.in (SFILES): Append common/common-regcache.c.
2021 (OBS): Append common-regcache.o.
2022 (common-regcache.o): New rule.
2023 * regcache.c (init_register_cache): Initialize cache to
2024 REG_UNAVAILABLE.
2025 (regcache_raw_read_unsigned): New function.
2026 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2027 register_status enum.
2028
fa5308bd
AT
20292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2030
2031 * linux-aarch64-low.c (the_low_targets): Rename
2032 breakpoint_reinsert_addr to get_next_pcs.
2033 * linux-arm-low.c (the_low_targets): Likewise.
2034 * linux-bfin-low.c (the_low_targets): Likewise.
2035 * linux-cris-low.c (the_low_targets): Likewise.
2036 * linux-crisv32-low.c (the_low_targets): Likewise.
2037 * linux-low.c (can_software_single_step): Likewise.
2038 (install_software_single_step_breakpoints): New function.
2039 (start_step_over): Use install_software_single_step_breakpoints.
2040 * linux-low.h: New CORE_ADDR vector.
2041 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2042 get_next_pcs.
2043 * linux-mips-low.c (the_low_targets): Likewise.
2044 * linux-nios2-low.c (the_low_targets): Likewise.
2045 * linux-sparc-low.c (the_low_targets): Likewise.
2046
4a6ed09b
PA
20472015-12-17 Pedro Alves <palves@redhat.com>
2048
2049 * linux-low.c (linux_kill_one_lwp): Remove references to
2050 LinuxThreads.
2051 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2052 to 'kill'.
2053 (linux_init_signals): Delete.
2054 (initialize_low): Adjust.
2055 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2056
7544db95
PA
20572015-12-16 Pedro Alves <palves@redhat.com>
2058
2059 * configure.ac (compiler warning flags): When testing a
2060 -Wno-foo option, check whether -Wfoo works instead.
2061 * configure: Regenerate.
2062
8020350c
DB
20632015-12-11 Don Breazeal <donb@codesourcery.com>
2064
2065 * server.c (process_serial_event): Don't exit from gdbserver
2066 in remote mode if there are still active inferiors.
2067
db91f502
YQ
20682015-12-11 Yao Qi <yao.qi@linaro.org>
2069
2070 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2071 arm_breakpoint_at if the process is 32-bit.
2072
b37a6290
YQ
20732015-12-11 Yao Qi <yao.qi@linaro.org>
2074
2075 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2076 arm breakpoint.
2077
17b1509a
YQ
20782015-12-07 Yao Qi <yao.qi@linaro.org>
2079
2080 * configure.srv: Append arm.o to srv_tgtobj for
2081 aarch64*-*-linux* target.
2082 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2083 from linux-arm-low.c.
2084 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2085 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2086 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2087 (thumb2_breakpoint_len): Likewise.
2088 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2089 (arm_breakpoint_kinds): Likewise.
2090 (arm_breakpoint_kind_from_pc): Likewise.
2091 (arm_sw_breakpoint_from_kind): Likewise.
2092 (arm_breakpoint_kind_from_current_state): Likewise.
2093 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2094 (arm_sw_breakpoint_from_kind): Declare.
2095 (arm_breakpoint_kind_from_current_state): Declare.
2096 (arm_breakpoint_at): Declare.
2097 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2098 arm_sw_breakpoint_from_kind if process is 32-bit.
2099 (aarch64_breakpoint_kind_from_pc): New function.
2100 (aarch64_breakpoint_kind_from_current_state): New function.
2101 (the_low_target): Initialize fields breakpoint_kind_from_pc
2102 and breakpoint_kind_from_current_state.
2103 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2104 linux-aarch32-low.c.
2105 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2106 (arm_breakpoint, arm_breakpoint_len): Likewise.
2107 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2108 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2109 (arm_is_thumb_mode): Likewise.
2110 (arm_breakpoint_at): Likewise.
2111 (arm_breakpoint_kind_from_pc): Likewise.
2112 (arm_sw_breakpoint_from_kind): Likewise.
2113 (arm_breakpoint_kind_from_current_state): Likewise.
2114
2115 Revert:
2116 2015-08-04 Yao Qi <yao.qi@linaro.org>
2117
2118 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2119 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2120 * server.c (extended_protocol): Remove "static".
2121 * server.h (extended_protocol): Declare it.
2122
ece66d65
JS
21232015-12-04 Josh Stone <jistone@redhat.com>
2124
2125 * target.h (struct target_ops) <arch_setup>: Rename to ...
2126 (struct target_ops) <post_create_inferior>: ... this.
2127 (target_arch_setup): Rename to ...
2128 (target_post_create_inferior): ... this, calling post_create_inferior.
2129 * server.c (start_inferior): Update target_arch_setup calls to
2130 target_post_create_inferior.
2131 * linux-low.c (linux_low_ptrace_options): Forward declare.
2132 (linux_arch_setup): Update its comment for general use.
2133 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2134 (struct linux_target_ops): Use linux_post_create_inferior.
2135 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2136 to post_create_inferior.
2137 * nto-low.c (struct nto_target_ops): Likewise.
2138 * spu-low.c (struct spu_target_ops): Likewise.
2139 * win32-low.c (struct win32_target_ops): Likewise.
2140
e58c48b4
AT
21412015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2142
2143 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2144
fbec8956
AT
21452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2146
2147 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2148 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2149 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2150 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2151 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2152 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2153 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2154 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2155 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2156 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2157 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2158 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2159
9b4c5f87
AT
21602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2161
2162 * linux-low.c (linux_look_up_symbols): Don't call
2163 linux_supports_traceclone.
2164 * linux-low.h (thread_db_init): Remove use_events argument.
2165 * thread-db.c (thread_db_use_event): Remove global variable.
2166 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2167 (struct thread_db) <td_create_bp>: Remove field.
2168 (thread_db_create_event): Remove function.
2169 (thread_db_enable_reporting): Likewise.
2170 (find_one_thread): Don't check for thread_db_use_events.
2171 (attach_thread): Likewise.
2172 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2173 (try_thread_db_load_1): Don't check for thread_db_use_events.
2174 (thread_db_init): Remove use_events argument and thread events
2175 handling.
2176 (remove_thread_event_breakpoints): Remove function.
2177 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2178
7d00775e
AT
21792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2180
2181 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2182 New function.
2183 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2184 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2185 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2186 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2187 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2188 Initialize.
2189 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2190 New function.
2191 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2192 * linux-low.c (can_hardware_single_step): Use
2193 supports_hardware_single_step.
2194 (can_software_single_step): New function.
2195 (start_step_over): Call can_software_single_step.
2196 (linux_supports_hardware_single_step): New function.
2197 (struct target_ops) <supports_software_single_step>: Initialize.
2198 * linux-low.h (struct linux_target_ops)
2199 <supports_hardware_single_step>: Initialize.
2200 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2201 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2202 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2203 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2204 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2205 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2206 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2207 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2208 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2209 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2210 Initialize.
2211 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2212 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2213 Initialize.
2214 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2215 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2216 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2217 New function.
2218 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2219 * target.h (struct target_ops): <supports_software_single_step>:
2220 New field.
2221 (target_supports_software_single_step): New macro.
2222
2d97cd35
AT
22232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2224
2225 * linux-low.c (linux_wait_1): Fix pc advance condition.
2226 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2227 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2228
769ef81f
AT
22292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2230
2231 * linux-arm-low.c (arm_is_thumb_mode): New function.
2232 (arm_breakpoint_at): Use arm_is_thumb_mode.
2233 (arm_breakpoint_kind_from_current_state): New function.
2234 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2235 Initialize.
2236 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2237 (linux_breakpoint_kind_from_current_state): New function.
2238 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2239 * linux-low.h (struct linux_target_ops)
2240 <breakpoint_kind_from_current_state>: New field.
2241 * target.h (struct target_ops): Likewise.
2242 (target_breakpoint_kind_from_current_state): New macro.
2243
1bebeeca
PA
22442015-11-30 Pedro Alves <palves@redhat.com>
2245
2246 * linux-low.c (linux_resume): Wake up the event loop before
2247 returning.
2248
a67a9fae
PA
22492015-11-30 Pedro Alves <palves@redhat.com>
2250
2251 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2252 check.
2253 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2254 to -1.
2255 * target.c (struct thread_search): New structure.
2256 (thread_search_callback): New function.
2257 (prev_general_thread): New global.
2258 (prepare_to_access_memory, done_accessing_memory): New functions.
2259 * target.h (prepare_to_access_memory, done_accessing_memory):
2260 Replace macros with function declarations.
2261
f2faf941
PA
22622015-11-30 Pedro Alves <palves@redhat.com>
2263
2264 PR 14618
2265 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2266 report TARGET_WAITKIND_NO_RESUMED.
2267 * remote-utils.c (prepare_resume_reply): Handle
2268 TARGET_WAITKIND_NO_RESUMED.
2269 * server.c (report_no_resumed): New global.
2270 (handle_query) <qSupported>: Handle "no-resumed+". Report
2271 "no-resumed+" support.
2272 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2273 return error if the client doesn't support no-resumed events.
2274 (push_stop_notification): New function.
2275 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2276 events if the client supports them.
2277
a681f9c9
PA
22782015-11-30 Pedro Alves <palves@redhat.com>
2279
2280 * linux-low.c (thread_still_has_status_pending_p): Don't check
2281 vCont;t here.
2282 (lwp_resumed): New function.
2283 (status_pending_p_callback): Return early if the LWP is not
2284 supposed to be resumed.
2285
65706a29
PA
22862015-11-30 Pedro Alves <palves@redhat.com>
2287
2288 * linux-low.c (handle_extended_wait): Assert that the LWP's
2289 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2290 thread create events, leave the new child's status pending.
2291 (linux_low_filter_event): If GDB wants to hear about thread exit
2292 events, leave the LWP marked dead and don't delete it.
2293 (linux_wait_for_event_filtered): Don't check for thread exit.
2294 (filter_exit_event): New function.
2295 (linux_wait_1): Use it, when returning an exit event.
2296 (linux_resume_one_lwp_throw): Assert that the LWP's
2297 waitstatus is TARGET_WAITKIND_IGNORE.
2298 * remote-utils.c (prepare_resume_reply): Handle
2299 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2300 * server.c (report_thread_events): New global.
2301 (handle_general_set): Handle QThreadEvents.
2302 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2303 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2304 TARGET_WAITKIND_THREAD_EXITED.
2305 * server.h (report_thread_events): Declare.
2306
56cf4bed
PA
23072015-11-30 Pedro Alves <palves@redhat.com>
2308
2309 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2310 the thread's last_resume_kind was resume_stop.
2311
500c1d85
PA
23122015-11-30 Pedro Alves <palves@redhat.com>
2313
2314 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2315 before returning.
2316
de979965
PA
23172015-11-30 Pedro Alves <palves@redhat.com>
2318
2319 * server.c (handle_v_requests): Handle vCtrlC.
2320
34c65914
PA
23212015-11-30 Pedro Alves <palves@redhat.com>
2322
2323 * gdbthread.h (find_any_thread_of_pid): Declare.
2324 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2325 functions.
2326 * server.c (handle_query): If current_thread is NULL, look for
2327 another thread of the selected process.
2328
79efa585 23292015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2330 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2331
2332 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2333 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2334 name in reply.
2335 * target.h (struct target_ops) <thread_name>: New field.
2336 (target_thread_name): New macro.
2337
80d82c19
JB
23382015-11-23 Joel Brobecker <brobecker@adacore.com>
2339
2340 * regcache.h (regcache_invalidate_pid): Add declaration.
2341 * regcache.c (regcache_invalidate_pid): New function, extracted
2342 from regcache_invalidate.
2343 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2344 Add trivial documentation comment.
2345 * lynx-low.c: Use regcache_invalidate_pid instead of
2346 regcache_invalidate.
2347
64da5dd5
JB
23482015-11-23 Joel Brobecker <brobecker@adacore.com>
2349
2350 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2351 and Elf64_auxv_t if the target is Android.
2352
37ce4055
DE
23532015-11-22 Doug Evans <xdje42@gmail.com>
2354
2355 * target.h: #include <sys/types.h>.
2356
06e03fff
PA
23572015-11-19 Pedro Alves <palves@redhat.com>
2358
2359 * linux-low.c (linux_process_qsupported): Change prototype.
2360 Adjust.
2361 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2362 Change prototype.
2363 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2364 and adjust to loop over all features.
2365 * server.c (handle_query) <qSupported>: Adjust to call
2366 target_process_qsupported once, passing it a vector of unprocessed
2367 features.
2368 * target.h (struct target_ops) <process_qsupported>: Change
2369 prototype.
2370 (target_process_qsupported): Adjust.
2371
9a084706
PA
23722015-11-19 Pedro Alves <palves@redhat.com>
2373
2374 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2375 mode.
2376 * configure: Regenerate.
2377
dad44a1f
PA
23782015-11-19 Pedro Alves <palves@redhat.com>
2379
2380 * configure: Regenerate.
2381
231c0592
YQ
23822015-11-19 Yao Qi <yao.qi@linaro.org>
2383
2384 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2385 type to uint32_t.
2386
6c1c9a8b
YQ
23872015-11-19 Yao Qi <yao.qi@linaro.org>
2388
2389 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2390 (struct aarch64_operand): Move enum out.
2391
9caa3311
YQ
23922015-11-19 Yao Qi <yao.qi@linaro.org>
2393
2394 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2395 struct user_fpsimd_state *.
2396 (aarch64_store_fpregset): Likewise.
2397
6a69a054
YQ
23982015-11-19 Yao Qi <yao.qi@linaro.org>
2399
2400 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2401 struct user_pt_regs *.
2402 (aarch64_store_gregset): Likewise.
2403
1798301e
PA
24042015-11-18 Pedro Alves <palves@redhat.com>
2405
2406 * Makefile.in (all_object_files): Add $IPA_OBJS.
2407
ce7715e2
PA
24082015-11-17 Pedro Alves <palves@redhat.com>
2409
2410 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2411 GDB_SIGNAL_0 and gdb_signal_to_string.
2412
c0879059
PA
24132015-11-17 Pedro Alves <palves@redhat.com>
2414
2415 * win32-low.c (handle_output_debug_string): Remove parameter.
2416 (win32_kill): Remove our_status local and adjust call to
2417 handle_output_debug_string.
2418 (get_child_debug_event): Adjust call to
2419 handle_output_debug_string.
2420
1996e237
SM
24212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2422
2423 * linux-mips-low.c (mips_fill_gregset): Add cast.
2424 (mips_store_gregset): Likewise.
2425 (mips_fill_fpregset): Likewise.
2426 (mips_store_fpregset): Likewise.
2427
cbec665b
SM
24282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2429
2430 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2431 priv.
2432
eb3e3c67
SM
24332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2434
2435 * linux-mips-low.c (mips_linux_new_thread): Change type of
2436 watch_type to enum target_hw_bp_type.
2437
171de4b8
SM
24382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2439
2440 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2441 Change return type to arm_hwbp_type.
2442
04248ead
SM
24432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2444
2445 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2446 (arm_store_gregset): Likewise.
2447 * linux-arm-low.c (arm_get_hwcap): Likewise.
2448 (arm_read_description): Likewise.
2449
04b3479c
SM
24502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2451
2452 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2453
2bc84e8a
SM
24542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2455
2456 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2457 (ppc_fill_vsxregset): Likewise.
2458 (ppc_store_vsxregset): Likewise.
2459 (ppc_fill_vrregset): Likewise.
2460 (ppc_store_vrregset): Likewise.
2461 (ppc_fill_evrregset): Likewise.
2462 (ppc_store_evrregset): Likewise.
2463
e6c5bb05
SM
24642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2465
2466 * linux-ppc-low.c (ppc_usrregs_info): Remove
2467 forward-declaration.
2468 (ppc_arch_setup): Move lower in file.
2469
7ea45d72
SM
24702015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2471
2472 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2473 (ps_pdwrite): Likewise.
2474
69291610
HW
24752015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2476
2477 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2478 to after assert checks.
2479
b42945fd
SM
24802015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2481
2482 * proc-service.c (ps_pdread): Add/adjust casts.
2483 (ps_pdwrite): Add/adjust casts.
2484
d6f85c84
SM
24852015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2486
2487 * server.c (handle_search_memory_1): Cast return value of
2488 memmem.
2489
f98cd059
SM
24902015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2491
2492 * server.c (write_qxfer_response): Change type of data to
2493 gdb_byte *.
2494
d2412fa5
PA
24952015-10-29 Pedro Alves <palves@redhat.com>
2496
2497 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2498
c17414a2
PA
24992015-10-29 Pedro Alves <palves@redhat.com>
2500
2501 * tracepoint.c (clear_installed_tracepoints): Add casts.
2502
e053fbc4
PA
25032015-10-29 Pedro Alves <palves@redhat.com>
2504
2505 * server.c (handle_v_cont, process_serial_event): Add enum
2506 gdb_signal casts to signal parsing code.
2507
add67df8
PA
25082015-10-29 Pedro Alves <palves@redhat.com>
2509
2510 * linux-low.h (NULL_REGSET): Define.
2511 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2512 * linux-arm-low.c (arm_regsets): Likewise.
2513 * linux-crisv32-low.c (cris_regsets): Likewise.
2514 * linux-m68k-low.c (m68k_regsets): Likewise.
2515 * linux-mips-low.c (mips_regsets): Likewise.
2516 * linux-nios2-low.c (nios2_regsets): Likewise.
2517 * linux-ppc-low.c (ppc_regsets): Likewise.
2518 * linux-s390-low.c (s390_regsets): Likewise.
2519 * linux-sh-low.c (sh_regsets): Likewise.
2520 * linux-sparc-low.c (sparc_regsets): Likewise.
2521 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2522 * linux-tile-low.c (tile_regsets): Likewise.
2523 * linux-x86-low.c (x86_regsets): Likewise.
2524 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2525
50bc912a
PA
25262015-10-29 Pedro Alves <palves@redhat.com>
2527
2528 * linux-low.h (NULL_REGSET): Define.
2529 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2530 * linux-arm-low.c (arm_regsets): Likewise.
2531 * linux-crisv32-low.c (cris_regsets): Likewise.
2532 * linux-m68k-low.c (m68k_regsets): Likewise.
2533 * linux-mips-low.c (mips_regsets): Likewise.
2534 * linux-nios2-low.c (nios2_regsets): Likewise.
2535 * linux-ppc-low.c (ppc_regsets): Likewise.
2536 * linux-s390-low.c (s390_regsets): Likewise.
2537 * linux-sh-low.c (sh_regsets): Likewise.
2538 * linux-sparc-low.c (sparc_regsets): Likewise.
2539 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2540 * linux-tile-low.c (tile_regsets): Likewise.
2541 * linux-x86-low.c (x86_regsets): Likewise.
2542 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2543
682b2546
DE
25442015-10-26 Doug Evans <dje@google.com>
2545
2546 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2547
963843d4
DE
25482015-10-26 Doug Evans <dje@google.com>
2549
2550 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2551
d41401ac
DE
25522015-10-26 Doug Evans <dje@google.com>
2553
2554 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2555 for debug_printf.
2556 (attach_thread, find_new_threads_callback): Ditto.
2557
3db28855
AT
25582015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2559
2560 * mem-break.h (set_breakpoint_data): Remove.
2561
fb78e89c
AT
25622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2563
2564 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2565 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2566 (initialize_low): Remove set_breakpoint_data call.
2567 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2568 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2569 (initialize_low): Remove set_breakpoint_data call.
2570 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2571 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2572 (initialize_low): Remove set_breakpoint_data call.
2573
2e6ee069
AT
25742015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2575
2576 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2577 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2578 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2579 * target.h (target_breakpoint_kind_from_pc): New macro.
2580
1652a986
AT
25812015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2582
2583 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2584 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2585 the default breakpoint kind.
2586
abeead09
AT
25872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2588
2589 * linux-arm-low.c (arm_supports_z_point_type): Add software
2590 breakpoint support.
2591
b0b4b501
AT
25922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2593
2594 * linux-arm-low.c: Refactor breakpoint definitions.
2595 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2596 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2597
8689682c
AT
25982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2599
2600 * Makefile.in: Add arm.c/o.
2601 * configure.srv: Likewise.
2602 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2603 (arm_breakpoint_kind_from_pc): New function.
2604 (arm_sw_breakpoint_from_kind): Return proper kind.
2605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2606
27165294
AT
26072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2608
2609 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2610 removal.
2611 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2612 (struct raw_breakpoint) <size>: Remove.
2613 (struct raw_breakpoint) <kind>: Add.
2614 (bp_size): New function.
2615 (bp_opcode): Likewise.
2616 (find_raw_breakpoint_at): Adjust for kind.
2617 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2618 (remove_memory_breakpoint): Adjust for kind call bp_size.
2619 (set_raw_breakpoint_at): Adjust for kind.
2620 (set_breakpoint): Likewise.
2621 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2622 (delete_raw_breakpoint): Adjust for kind.
2623 (delete_breakpoint): Likewise.
2624 (find_gdb_breakpoint): Likewise.
2625 (set_gdb_breakpoint_1): Likewise.
2626 (set_gdb_breakpoint): Likewise.
2627 (delete_gdb_breakpoint_1): Likewise.
2628 (delete_gdb_breakpoint): Likewise.
2629 (uninsert_raw_breakpoint): Likewise.
2630 (reinsert_raw_breakpoint): Likewise.
2631 (set_breakpoint_data): Remove.
2632 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2633 (check_mem_read): Adjust for kind call bp_size.
2634 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2635 (clone_one_breakpoint): Adjust for kind.
2636 * mem-break.h (set_gdb_breakpoint): Likewise.
2637 (delete_gdb_breakpoint): Likewise.
2638 * server.c (process_serial_event): Likewise.
2639
dd373349
AT
26402015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2641
2642 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2643 (struct linux_target_ops) <breakpoint>: Remove.
2644 (struct linux_target_ops) <breakpoint_len>: Remove.
2645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2647 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2648 (arm_sw_breakpoint_from_kind): New function.
2649 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2650 (struct linux_target_ops) <breakpoint>: Remove.
2651 (struct linux_target_ops) <breakpoint_len>: Remove.
2652 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2653 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2654 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2655 (struct linux_target_ops) <breakpoint>: Remove.
2656 (struct linux_target_ops) <breakpoint_len>: Remove.
2657 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2658 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2659 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2660 (struct linux_target_ops) <breakpoint>: Remove.
2661 (struct linux_target_ops) <breakpoint_len>: Remove.
2662 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2663 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2664 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2665 and sw_breakpoint_from_kind to increment the pc.
2666 (linux_breakpoint_kind_from_pc): New function.
2667 (linux_sw_breakpoint_from_kind): New function.
2668 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2669 (initialize_low): Call breakpoint_kind_from_pc and
2670 sw_breakpoint_from_kind to replace breakpoint_data/len.
2671 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2672 New field.
2673 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2674 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2675 (struct linux_target_ops) <breakpoint>: Remove.
2676 (struct linux_target_ops) <breakpoint_len>: Remove.
2677 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2678 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2679 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2680 (struct linux_target_ops) <breakpoint>: Remove.
2681 (struct linux_target_ops) <breakpoint_len>: Remove.
2682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2684 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2685 (struct linux_target_ops) <breakpoint>: Remove.
2686 (struct linux_target_ops) <breakpoint_len>: Remove.
2687 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2688 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2689 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2690 (struct linux_target_ops) <breakpoint>: Remove.
2691 (struct linux_target_ops) <breakpoint_len>: Remove.
2692 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2693 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2694 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2695 (struct linux_target_ops) <breakpoint>: Remove.
2696 (struct linux_target_ops) <breakpoint_len>: Remove.
2697 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2698 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2699 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2700 (struct linux_target_ops) <breakpoint>: Remove.
2701 (struct linux_target_ops) <breakpoint_len>: Remove.
2702 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2703 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2704 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2705 (struct linux_target_ops) <breakpoint>: Remove.
2706 (struct linux_target_ops) <breakpoint_len>: Remove.
2707 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2708 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2709 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2710 (struct linux_target_ops) <breakpoint>: Remove.
2711 (struct linux_target_ops) <breakpoint_len>: Remove.
2712 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2713 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2714 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2715 (struct linux_target_ops) <breakpoint>: Remove.
2716 (struct linux_target_ops) <breakpoint_len>: Remove.
2717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2719 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2720 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2721 (struct linux_target_ops) <breakpoint>: Remove.
2722 (struct linux_target_ops) <breakpoint_len>: Remove.
2723 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2725 * linux-xtensa-low.c (xtensa_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
4cd98a19
AT
27312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2732
2733 * linux-cris-low.c (cris_get_pc): Remove void arg.
2734
774ee6d2
AR
27352015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2736
2737 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2738 variable name.
2739
833dcd29
AR
27402015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2741
2742 * inferiors.c (thread_pid_matches_callback): New function.
2743 (find_thread_process): New function.
2744 (remove_thread): Reset current_thread.
2745 (remove_process): Assert threads have been removed first.
2746
8d689ee5
YQ
27472015-10-15 Yao Qi <yao.qi@linaro.org>
2748
2749 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2750 if it is 3.
2751 (aarch64_remove_point): Likewise.
2752 * regcache.c (regcache_register_size): New function.
2753
1c2e1515
YQ
27542015-10-12 Yao Qi <yao.qi@linaro.org>
2755
2756 * linux-aarch64-low.c: Update all callers as emit_load_store
2757 is renamed to aarch64_emit_load_store.
2758
e1c587c3
YQ
27592015-10-12 Yao Qi <yao.qi@linaro.org>
2760
2761 * linux-aarch64-low.c: Update all callers of function renaming
2762 from emit_insn to aarch64_emit_insn.
2763
b6542f81
YQ
27642015-10-12 Yao Qi <yao.qi@linaro.org>
2765
2766 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2767 arch/aarch64-insn.h.
2768 (struct aarch64_memory_operand): Likewise.
2769 (ENCODE): Likewise.
2770 (emit_insn): Move to arch/aarch64-insn.c.
2771 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2772 (emit_load_store): Move to arch/aarch64-insn.c.
2773 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2774 (can_encode_int32): Remove.
2775
246994ce
YQ
27762015-10-12 Yao Qi <yao.qi@linaro.org>
2777
2778 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2779 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2780 (aarch64_relocate_instruction): Likewise.
2781 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2782 (struct aarch64_insn_visitor): Likewise.
2783
0badd99f
YQ
27842015-10-12 Yao Qi <yao.qi@linaro.org>
2785
2786 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2787 (struct aarch64_insn_visitor): New.
2788 (struct aarch64_insn_relocation_data): New.
2789 (aarch64_ftrace_insn_reloc_b): New function.
2790 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2791 (aarch64_ftrace_insn_reloc_cb): Likewise.
2792 (aarch64_ftrace_insn_reloc_tb): Likewise.
2793 (aarch64_ftrace_insn_reloc_adr): Likewise.
2794 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2795 (aarch64_ftrace_insn_reloc_others): Likewise.
2796 (visitor): New.
2797 (aarch64_relocate_instruction): Use visitor.
2798
dfaffe9d
YQ
27992015-10-12 Yao Qi <yao.qi@linaro.org>
2800
2801 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2802 int. Add argument buf.
2803 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2804 aarch64_relocate_instruction.
2805
70b439f0
YQ
28062015-10-12 Yao Qi <yao.qi@linaro.org>
2807
2808 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2809 argument insn. Remove local variable insn. Don't call
2810 target_read_uint32.
2811 (aarch64_install_fast_tracepoint_jump_pad): Call
2812 target_read_uint32.
2813
7781c06f
YQ
28142015-09-30 Yao Qi <yao.qi@linaro.org>
2815
2816 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2817 (emit_load_store_pair): Likewise.
2818
9a3c8263
SM
28192015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2820
2821 * dll.c (match_dll): Add cast(s).
2822 (unloaded_dll): Likewise.
2823 * linux-low.c (second_thread_of_pid_p): Likewise.
2824 (delete_lwp_callback): Likewise.
2825 (count_events_callback): Likewise.
2826 (select_event_lwp_callback): Likewise.
2827 (linux_set_resume_request): Likewise.
2828 * server.c (accumulate_file_name_length): Likewise.
2829 (emit_dll_description): Likewise.
2830 (handle_qxfer_threads_worker): Likewise.
2831 (visit_actioned_threads): Likewise.
2832 * thread-db.c (any_thread_of): Likewise.
2833 * tracepoint.c (same_process_p): Likewise.
2834 (match_blocktype): Likewise.
2835 (build_traceframe_info_xml): Likewise.
2836
224c3ddb
SM
28372015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2838
2839 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2840 assignment.
2841 (gdb_unparse_agent_expr): Likewise.
2842 * hostio.c (require_data): Likewise.
2843 (handle_pread): Likewise.
2844 * linux-low.c (disable_regset): Likewise.
2845 (fetch_register): Likewise.
2846 (store_register): Likewise.
2847 (get_dynamic): Likewise.
2848 (linux_qxfer_libraries_svr4): Likewise.
2849 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2850 (set_fast_tracepoint_jump): Likewise.
2851 (uninsert_fast_tracepoint_jumps_at): Likewise.
2852 (reinsert_fast_tracepoint_jumps_at): Likewise.
2853 (validate_inserted_breakpoint): Likewise.
2854 (clone_agent_expr): Likewise.
2855 * regcache.c (init_register_cache): Likewise.
2856 * remote-utils.c (putpkt_binary_1): Likewise.
2857 (decode_M_packet): Likewise.
2858 (decode_X_packet): Likewise.
2859 (look_up_one_symbol): Likewise.
2860 (relocate_instruction): Likewise.
2861 (monitor_output): Likewise.
2862 * server.c (handle_search_memory): Likewise.
2863 (handle_qxfer_exec_file): Likewise.
2864 (handle_qxfer_libraries): Likewise.
2865 (handle_qxfer): Likewise.
2866 (handle_query): Likewise.
2867 (handle_v_cont): Likewise.
2868 (handle_v_run): Likewise.
2869 (captured_main): Likewise.
2870 * target.c (write_inferior_memory): Likewise.
2871 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2872 * tracepoint.c (init_trace_buffer): Likewise.
2873 (add_tracepoint_action): Likewise.
2874 (add_traceframe): Likewise.
2875 (add_traceframe_block): Likewise.
2876 (cmd_qtdpsrc): Likewise.
2877 (cmd_qtdv): Likewise.
2878 (cmd_qtstatus): Likewise.
2879 (response_source): Likewise.
2880 (response_tsv): Likewise.
2881 (cmd_qtnotes): Likewise.
2882 (gdb_collect): Likewise.
2883 (initialize_tracepoint): Likewise.
2884
afbe19f8
PL
28852015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2886
2887 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2888 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2889 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2890 <NOP>: New.
2891 (enum aarch64_condition_codes): New enum.
2892 (w0): New static global.
2893 (fp): Likewise.
2894 (lr): Likewise.
2895 (struct aarch64_memory_operand) <type>: New
2896 MEMORY_OPERAND_POSTINDEX type.
2897 (postindex_memory_operand): New helper function.
2898 (emit_ret): New function.
2899 (emit_load_store_pair): New function, factored out of emit_stp
2900 with support for MEMORY_OPERAND_POSTINDEX.
2901 (emit_stp): Rewrite using emit_load_store_pair.
2902 (emit_ldp): New function.
2903 (emit_load_store): Likewise.
2904 (emit_ldr): Mention post-index instruction in comment.
2905 (emit_ldrh): New function.
2906 (emit_ldrb): New function.
2907 (emit_ldrsw): Mention post-index instruction in comment.
2908 (emit_str): Likewise.
2909 (emit_subs): New function.
2910 (emit_cmp): Likewise.
2911 (emit_and): Likewise.
2912 (emit_orr): Likewise.
2913 (emit_orn): Likewise.
2914 (emit_eor): Likewise.
2915 (emit_mvn): Likewise.
2916 (emit_lslv): Likewise.
2917 (emit_lsrv): Likewise.
2918 (emit_asrv): Likewise.
2919 (emit_mul): Likewise.
2920 (emit_sbfm): Likewise.
2921 (emit_sbfx): Likewise.
2922 (emit_ubfm): Likewise.
2923 (emit_ubfx): Likewise.
2924 (emit_csinc): Likewise.
2925 (emit_cset): Likewise.
2926 (emit_nop): Likewise.
2927 (emit_ops_insns): New helper function.
2928 (emit_pop): Likewise.
2929 (emit_push): Likewise.
2930 (aarch64_emit_prologue): New function.
2931 (aarch64_emit_epilogue): Likewise.
2932 (aarch64_emit_add): Likewise.
2933 (aarch64_emit_sub): Likewise.
2934 (aarch64_emit_mul): Likewise.
2935 (aarch64_emit_lsh): Likewise.
2936 (aarch64_emit_rsh_signed): Likewise.
2937 (aarch64_emit_rsh_unsigned): Likewise.
2938 (aarch64_emit_ext): Likewise.
2939 (aarch64_emit_log_not): Likewise.
2940 (aarch64_emit_bit_and): Likewise.
2941 (aarch64_emit_bit_or): Likewise.
2942 (aarch64_emit_bit_xor): Likewise.
2943 (aarch64_emit_bit_not): Likewise.
2944 (aarch64_emit_equal): Likewise.
2945 (aarch64_emit_less_signed): Likewise.
2946 (aarch64_emit_less_unsigned): Likewise.
2947 (aarch64_emit_ref): Likewise.
2948 (aarch64_emit_if_goto): Likewise.
2949 (aarch64_emit_goto): Likewise.
2950 (aarch64_write_goto_address): Likewise.
2951 (aarch64_emit_const): Likewise.
2952 (aarch64_emit_call): Likewise.
2953 (aarch64_emit_reg): Likewise.
2954 (aarch64_emit_pop): Likewise.
2955 (aarch64_emit_stack_flush): Likewise.
2956 (aarch64_emit_zero_ext): Likewise.
2957 (aarch64_emit_swap): Likewise.
2958 (aarch64_emit_stack_adjust): Likewise.
2959 (aarch64_emit_int_call_1): Likewise.
2960 (aarch64_emit_void_call_2): Likewise.
2961 (aarch64_emit_eq_goto): Likewise.
2962 (aarch64_emit_ne_goto): Likewise.
2963 (aarch64_emit_lt_goto): Likewise.
2964 (aarch64_emit_le_goto): Likewise.
2965 (aarch64_emit_gt_goto): Likewise.
2966 (aarch64_emit_ge_got): Likewise.
2967 (aarch64_emit_ops_impl): New static global variable.
2968 (aarch64_emit_ops): New target function, return
2969 &aarch64_emit_ops_impl.
2970 (struct linux_target_ops): Install it.
2971
bb903df0
PL
29722015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2973
2974 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2975 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2976 aarch64-ipa.o.
2977 * linux-aarch64-ipa.c: New file.
2978 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2979 and endian.h.
2980 (aarch64_get_thread_area): New target method.
2981 (extract_signed_bitfield): New helper function.
2982 (aarch64_decode_ldr_literal): New function.
2983 (enum aarch64_opcodes): New enum.
2984 (struct aarch64_register): New struct.
2985 (struct aarch64_operand): New struct.
2986 (x0): New static global.
2987 (x1): Likewise.
2988 (x2): Likewise.
2989 (x3): Likewise.
2990 (x4): Likewise.
2991 (w2): Likewise.
2992 (ip0): Likewise.
2993 (sp): Likewise.
2994 (xzr): Likewise.
2995 (aarch64_register): New helper function.
2996 (register_operand): Likewise.
2997 (immediate_operand): Likewise.
2998 (struct aarch64_memory_operand): New struct.
2999 (offset_memory_operand): New helper function.
3000 (preindex_memory_operand): Likewise.
3001 (enum aarch64_system_control_registers): New enum.
3002 (ENCODE): New macro.
3003 (emit_insn): New helper function.
3004 (emit_b): New function.
3005 (emit_bcond): Likewise.
3006 (emit_cb): Likewise.
3007 (emit_tb): Likewise.
3008 (emit_blr): Likewise.
3009 (emit_stp): Likewise.
3010 (emit_ldp_q_offset): Likewise.
3011 (emit_stp_q_offset): Likewise.
3012 (emit_load_store): Likewise.
3013 (emit_ldr): Likewise.
3014 (emit_ldrsw): Likewise.
3015 (emit_str): Likewise.
3016 (emit_ldaxr): Likewise.
3017 (emit_stxr): Likewise.
3018 (emit_stlr): Likewise.
3019 (emit_data_processing_reg): Likewise.
3020 (emit_data_processing): Likewise.
3021 (emit_add): Likewise.
3022 (emit_sub): Likewise.
3023 (emit_mov): Likewise.
3024 (emit_movk): Likewise.
3025 (emit_mov_addr): Likewise.
3026 (emit_mrs): Likewise.
3027 (emit_msr): Likewise.
3028 (emit_sevl): Likewise.
3029 (emit_wfe): Likewise.
3030 (append_insns): Likewise.
3031 (can_encode_int32_in): New helper function.
3032 (aarch64_relocate_instruction): New function.
3033 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3034 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3035 (struct linux_target_ops): Install aarch64_get_thread_area,
3036 aarch64_install_fast_tracepoint_jump_pad and
3037 aarch64_get_min_fast_tracepoint_insn_len.
3038
787749ea
PL
30392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3040
3041 * Makefile.in (aarch64-insn.o): New rule.
3042 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3043
9812b2e6
YQ
30442015-09-21 Yao Qi <yao.qi@linaro.org>
3045
3046 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3047
18fe412b
YQ
30482015-09-21 Yao Qi <yao.qi@linaro.org>
3049
3050 * tracepoint.c (max_jump_pad_size): Remove.
3051
a0cc84cd
YQ
30522015-09-18 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-aarch64-low.c: Don't include sys/uio.h.
3055 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3056
d78908cf
WW
30572015-09-16 Wei-cheng Wang <cole945@gmail.com>
3058
3059 * tracepoint.c (eval_result_type): Change prototype.
3060 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3061
d57e0d50
PA
30622015-09-15 Pedro Alves <palves@redhat.com>
3063
3064 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3065 Check whether to report exec events instead of checking whether
3066 multiprocess is enabled.
3067
5a676acc
PA
30682015-09-15 Pedro Alves <palves@redhat.com>
3069
3070 PR remote/18965
3071 * remote-utils.c (prepare_resume_reply): Merge
3072 TARGET_WAITKIND_VFORK_DONE switch case with the
3073 TARGET_WAITKIND_FORKED case.
3074
7c5d0fad
YQ
30752015-09-15 Yao Qi <yao.qi@linaro.org>
3076
3077 * server.c (handle_query): Check string comparison using
3078 "else if" instead of "if".
3079
750ce8d1
YQ
30802015-09-15 Yao Qi <yao.qi@linaro.org>
3081
3082 * server.c (vCont_supported): New global variable.
3083 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3084 matches. Append ";vContSupported+" to own_buf.
3085 (handle_v_requests): Append ";s;S" to own_buf if target supports
3086 hardware single step or vCont_supported is false.
3087 (capture_main): Set vCont_supported to zero.
3088
70b90b91
YQ
30892015-09-15 Yao Qi <yao.qi@linaro.org>
3090
3091 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3092 it to ...
3093 (linux_supports_hardware_single_step): ... New function.
3094 (linux_target_ops): Update.
3095 * lynx-low.c (lynx_target_ops): Set field
3096 supports_hardware_single_step to target_can_do_hardware_single_step.
3097 * nto-low.c (nto_target_ops): Likewise.
3098 * spu-low.c (spu_target_ops): Likewise.
3099 * win32-low.c (win32_target_ops): Likewise.
3100 * target.c (target_can_do_hardware_single_step): New function.
3101 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3102 Remove. <supports_hardware_single_step>: New field.
3103 (target_supports_conditional_breakpoints): Remove.
3104 (target_supports_hardware_single_step): New macro.
3105 (target_can_do_hardware_single_step): Declare.
3106 * server.c (handle_query): Use target_supports_hardware_single_step
3107 instead of target_supports_conditional_breakpoints.
3108
ade90bde
YQ
31092015-09-15 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3112 function.
3113 (struct linux_target_ops the_low_target): Install
3114 aarch64_linux_siginfo_fixup.
3115
94585166
DB
31162015-09-11 Don Breazeal <donb@codesourcery.com>
3117 Luis Machado <lgustavo@codesourcery.com>
3118
3119 * linux-low.c (linux_mourn): Static declaration.
3120 (linux_arch_setup): Move in front of
3121 handle_extended_wait.
3122 (linux_arch_setup_thread): New function.
3123 (handle_extended_wait): Handle exec events. Call
3124 linux_arch_setup_thread. Make event_lwp argument a
3125 pointer-to-a-pointer.
3126 (check_zombie_leaders): Do not check stopped threads.
3127 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3128 (linux_low_filter_event): Add lwp and thread for exec'ing
3129 non-leader thread if leader thread has been deleted.
3130 Refactor code into linux_arch_setup_thread and call it.
3131 Pass child lwp pointer by reference to handle_extended_wait.
3132 (linux_wait_for_event_filtered): Update comment.
3133 (linux_wait_1): Prevent clobbering exec event status.
3134 (linux_supports_exec_events): New function.
3135 (linux_target_ops) <supports_exec_events>: Initialize new member.
3136 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3137 new member.
3138 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3139 * server.c (report_exec_events): New global variable.
3140 (handle_query): Handle qSupported query for exec-events feature.
3141 (captured_main): Initialize report_exec_events.
3142 * server.h (report_exec_events): Declare new global variable.
3143 * target.h (struct target_ops) <supports_exec_events>: New
3144 member.
3145 (target_supports_exec_events): New macro.
3146 * win32-low.c (win32_target_ops) <supports_exec_events>:
3147 Initialize new member.
3148
0568462b
MM
31492015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3150
3151 * linux-low.c (linux_low_enable_btrace): Remove.
3152 (linux_target_ops): Replace linux_low_enable_btrace with
3153 linux_enable_btrace.
3154
39edd165
YQ
31552015-09-03 Yao Qi <yao.qi@linaro.org>
3156
3157 * linux-aarch64-low.c (aarch64_insert_point): Call
3158 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3159 returns true.
3160
1db33b5a
UW
31612015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3162
3163 * linux-low.c (check_stopped_by_breakpoint): Use
3164 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3165
ab290430
PA
31662015-08-27 Pedro Alves <palves@redhat.com>
3167
3168 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3169
8d749320
SM
31702015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3171
6711b7f8
SM
3172 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3173 the XNEW-family equivalent.
8d749320
SM
3174 (compile_bytecodes): Likewise.
3175 * dll.c (loaded_dll): Likewise.
3176 * event-loop.c (append_callback_event): Likewise.
3177 (create_file_handler): Likewise.
3178 (create_file_event): Likewise.
3179 * hostio.c (handle_open): Likewise.
3180 * inferiors.c (add_thread): Likewise.
3181 (add_process): Likewise.
3182 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3183 * linux-arm-low.c (arm_new_process): Likewise.
3184 (arm_new_thread): Likewise.
3185 * linux-low.c (add_to_pid_list): Likewise.
3186 (linux_add_process): Likewise.
3187 (handle_extended_wait): Likewise.
3188 (add_lwp): Likewise.
3189 (enqueue_one_deferred_signal): Likewise.
3190 (enqueue_pending_signal): Likewise.
3191 (linux_resume_one_lwp_throw): Likewise.
3192 (linux_resume_one_thread): Likewise.
3193 (linux_read_memory): Likewise.
3194 (linux_write_memory): Likewise.
3195 * linux-mips-low.c (mips_linux_new_process): Likewise.
3196 (mips_linux_new_thread): Likewise.
3197 (mips_add_watchpoint): Likewise.
3198 * linux-x86-low.c (initialize_low_arch): Likewise.
3199 * lynx-low.c (lynx_add_process): Likewise.
3200 * mem-break.c (set_raw_breakpoint_at): Likewise.
3201 (set_breakpoint): Likewise.
3202 (add_condition_to_breakpoint): Likewise.
3203 (add_commands_to_breakpoint): Likewise.
3204 (clone_agent_expr): Likewise.
3205 (clone_one_breakpoint): Likewise.
3206 * regcache.c (new_register_cache): Likewise.
3207 * remote-utils.c (look_up_one_symbol): Likewise.
3208 * server.c (queue_stop_reply): Likewise.
3209 (start_inferior): Likewise.
3210 (queue_stop_reply_callback): Likewise.
3211 (handle_target_event): Likewise.
3212 * spu-low.c (fetch_ppc_memory): Likewise.
3213 (store_ppc_memory): Likewise.
3214 * target.c (set_target_ops): Likewise.
3215 * thread-db.c (thread_db_load_search): Likewise.
3216 (try_thread_db_load_1): Likewise.
3217 * tracepoint.c (add_tracepoint): Likewise.
3218 (add_tracepoint_action): Likewise.
3219 (create_trace_state_variable): Likewise.
3220 (cmd_qtdpsrc): Likewise.
3221 (cmd_qtro): Likewise.
3222 (add_while_stepping_state): Likewise.
3223 * win32-low.c (child_add_thread): Likewise.
3224 (get_image_name): Likewise.
3225
ed8b7b42
YQ
32262015-08-25 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3229
db3cb7cb
YQ
32302015-08-25 Yao Qi <yao.qi@linaro.org>
3231
3232 * Makefile.in (aarch64-linux.o): New rule.
3233 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3234 srv_tgtobj.
3235 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3236 (aarch64_init_debug_reg_state): Make it extern.
3237 (aarch64_linux_prepare_to_resume): Remove.
3238
f6011a1c
YQ
32392015-08-25 Yao Qi <yao.qi@linaro.org>
3240
3241 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3242 lwp_arch_private_info and ptid_of_lwp.
3243
88e2cf7e
YQ
32442015-08-25 Yao Qi <yao.qi@linaro.org>
3245
3246 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3247 Find proc_info by find_process_pid. All callers updated.
3248
5e35436e
YQ
32492015-08-25 Yao Qi <yao.qi@linaro.org>
3250
3251 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3252 Remove.
3253 (debug_reg_change_callback): Remove.
3254 (aarch64_notify_debug_reg_change): Remove.
3255
4a8a7965
YQ
32562015-08-25 Yao Qi <yao.qi@linaro.org>
3257
3258 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3259 Call current_lwp_ptid.
3260
32a271ee
YQ
32612015-08-25 Yao Qi <yao.qi@linaro.org>
3262
3263 * linux-aarch64-low.c (debug_reg_change_callback): Use
3264 debug_printf.
3265
0d51c8d7
YQ
32662015-08-25 Yao Qi <yao.qi@linaro.org>
3267
3268 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3269
31a43dd5
YQ
32702015-08-25 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3273
8ee52567
YQ
32742015-08-25 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3277 the code.
3278
ff3f0f45
YQ
32792015-08-25 Yao Qi <yao.qi@linaro.org>
3280
3281 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3282 Remove.
3283 (debug_reg_change_callback): Remove argument entry and add argument
3284 lwp. Remove local variable thread. Don't print thread id in the
3285 debugging output. Don't check whether pid of thread equals to pid.
3286 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3287 iterate_over_lwps instead find_inferior.
3288
3d40fbb5
PA
32892015-08-24 Pedro Alves <palves@redhat.com>
3290
3291 * inferiors.c (get_first_process): New function.
3292 * inferiors.h (get_first_process): New declaration.
3293 * remote-utils.c (read_ptid): Default to the first process in the
3294 list, instead of to the current thread's process.
3295
438e1e42
PA
32962015-08-24 Pedro Alves <palves@redhat.com>
3297
3298 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3299 * event-loop.c: Likewise.
3300 * remote-utils.c: Likewise.
3301 * tracepoint.c: Likewise.
3302
a8c6d4fc
PA
33032015-08-24 Pedro Alves <palves@redhat.com>
3304
3305 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3306 ptid_get_lwp.
3307
99b0bb12
PA
33082015-08-21 Pedro Alves <palves@redhat.com>
3309
3310 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3311 instead of literal 1.
3312
f8904751
PA
33132015-08-21 Pedro Alves <palves@redhat.com>
3314
3315 * tdesc.c (default_description): Explicitly zero-initialize.
3316
465a859e
PA
33172015-08-21 Pedro Alves <palves@redhat.com>
3318
3319 PR gdb/18749
3320 * inferiors.c (remove_thread): Discard any pending stop reply for
3321 this thread.
3322 * server.c (remove_all_on_match_pid): Rename to ...
3323 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3324 instead of a pid.
3325 (discard_queued_stop_replies): Change parameter to a ptid. Now
3326 extern.
3327 (handle_v_kill, kill_inferior_callback, captured_main)
3328 (process_serial_event): Adjust.
3329 * server.h (discard_queued_stop_replies): Declare.
3330
f0db101d
PA
33312015-08-21 Pedro Alves <palves@redhat.com>
3332
3333 * linux-low.c (wait_for_sigstop): Always switch to no thread
3334 selected if the previously current thread dies.
3335 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3336 process instead of the current thread's.
3337 * remote-utils.c (input_interrupt): Don't check if there's no
3338 current thread.
3339 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3340 current thread to the general thread fails, error out.
3341 (handle_qxfer_auxv, handle_qxfer_libraries)
3342 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3343 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3344 (handle_query): Check if there's a thread selected instead of
3345 checking whether there's any thread in the thread list.
3346 (handle_qxfer_threads, handle_qxfer_btrace)
3347 (handle_qxfer_btrace_conf): Don't error out early if there's no
3348 thread in the thread list.
3349 (handle_v_cont, myresume): Don't set the current thread to the
3350 continue thread.
3351 (process_serial_event) <Hg handling>: Also set thread_id if the
3352 previous general thread is still alive.
3353 (process_serial_event) <g/G handling>: If setting the current
3354 thread to the general thread fails, error out.
3355 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3356 thread's lwp instead of the current thread's.
3357 * target.c (set_desired_thread): If the desired thread was not
3358 found, leave the current thread pointing to NULL. Return an int
3359 (boolean) indicating success.
3360 * target.h (set_desired_thread): Change return type to int.
3361
40045d91
MF
33622015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3363
3364 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3365 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3366 #includes.
3367 (ps_get_thread_area): New function.
3368
45face3b
GB
33692015-08-19 Gary Benson <gbenson@redhat.com>
3370
3371 * hostio.c (handle_pread): Do not attempt to read more data
3372 than hostio_reply_with_data can fit in a packet.
3373
16d5f642
JB
33742015-08-18 Joel Brobecker <brobecker@adacore.com>
3375
3376 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3377
a738da3a
MF
33782015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3379
3380 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3381
33ebda9d
PA
33822015-08-06 Pedro Alves <palves@redhat.com>
3383
3384 * tracepoint.c (expr_eval_result): Now an int.
3385
a44892be
PA
33862015-08-06 Pedro Alves <palves@redhat.com>
3387
3388 * gdbthread.h (struct regcache): Forward declare.
3389 (struct thread_info) <regcache_data>: Now a struct regcache
3390 pointer.
3391 * inferiors.c (inferior_regcache_data)
3392 (set_inferior_regcache_data): Now work with struct regcache
3393 pointers.
3394 * inferiors.h (struct regcache): Forward declare.
3395 (inferior_regcache_data, set_inferior_regcache_data): Now work
3396 with struct regcache pointers.
3397 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3398 (free_register_cache_thread): Remove struct regcache pointer
3399 casts.
3400
608a1e46
PA
34012015-08-06 Pedro Alves <palves@redhat.com>
3402
3403 * server.c (captured_main): On error, print the exception message
3404 to stderr, and if run_once is set, throw a quit.
3405
f0ce0d3a
PA
34062015-08-06 Pedro Alves <palves@redhat.com>
3407
3408 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3409 the current thread.
3410
bf47e248
PA
34112015-08-06 Pedro Alves <palves@redhat.com>
3412
3413 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3414 reading beyond the passed in buffer length.
3415
b6b9ffcc
PL
34162015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3417
3418 * tracepoint.c (symbol_list) <required>: Remove.
3419
863d01bd
PA
34202015-08-06 Pedro Alves <palves@redhat.com>
3421
3422 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3423 count if stopping and suspending threads.
3424 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3425 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3426 (linux_detach): Complete an ongoing step-over.
3427 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3428 throughout.
3429 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3430 (linux_wait_1): If passing a signal to the inferior after
3431 finishing a step-over, unsuspend and re-resume all lwps. If we
3432 see a single-step event but the thread should be continuing, don't
3433 pass the trap to gdb.
3434 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3435 internal_error instead of gdb_assert.
3436 (enqueue_pending_signal): New function.
3437 (check_ptrace_stopped_lwp_gone): Add debug output.
3438 (start_step_over): Use internal_error instead of gdb_assert.
3439 (complete_ongoing_step_over): New function.
3440 (linux_resume_one_thread): Don't resume a suspended thread.
3441 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3442 it stepping.
3443
00db26fa
PA
34442015-08-06 Pedro Alves <palves@redhat.com>
3445
3446 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3447 (linux_thread_alive): Use lwp_is_marked_dead.
3448 (extended_event_reported): Delete.
3449 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3450 instead of extended_event_reported.
3451 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3452 as well.
3453 (lwp_is_marked_dead): New function.
3454 (lwp_running): Use lwp_is_marked_dead.
3455 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3456 comment.
3457
ad071a30
PA
34582015-08-06 Pedro Alves <palves@redhat.com>
3459
3460 * linux-low.c (linux_wait_1): Move fork event output out of the
3461 !report_to_gdb check. Pass event_child->waitstatus to
3462 target_waitstatus_to_string instead of ourstatus.
3463
524b57e6
YQ
34642015-08-04 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3467 if current_thread is 32 bit.
3468
6085d6f6
YQ
34692015-08-04 Yao Qi <yao.qi@linaro.org>
3470
3471 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3472 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3473 * server.c (extended_protocol): Remove "static".
3474 * server.h (extended_protocol): Declare it.
3475
8a7e4587
YQ
34762015-08-04 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3479 both aarch64 and aarch32.
3480 (aarch64_set_pc): Likewise.
3481
3b53ae99
YQ
34822015-08-04 Yao Qi <yao.qi@linaro.org>
3483
3484 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3485 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3486 arm-with-neon.xml to srv_xmlfiles.
3487 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3488 (is_64bit_tdesc): New function.
3489 (aarch64_linux_read_description): New function.
3490 (aarch64_arch_setup): Call aarch64_linux_read_description.
3491 (regs_info): Rename to regs_info_aarch64.
3492 (aarch64_regs_info): Return right regs_info.
3493 (initialize_low_arch): Call initialize_low_arch_aarch32.
3494
bd9e6534
YQ
34952015-08-04 Yao Qi <yao.qi@linaro.org>
3496
3497 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3498 * linux-aarch32-low.c: New file.
3499 * linux-aarch32-low.h: New file.
3500 * linux-arm-low.c (arm_fill_gregset): Move it to
3501 linux-aarch32-low.c.
3502 (arm_store_gregset): Likewise.
3503 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3504 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3505 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3506 (regs_info): Rename to regs_info_arm.
3507 (arm_regs_info): Return regs_info_aarch32 if
3508 have_ptrace_getregset is 1 and target description is
3509 arm_with_neon or arm_with_vfpv3.
3510 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3511 Call initialize_low_arch_aarch32 instead.
3512
ded48a5e
YQ
35132015-08-04 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3516 * linux-low.c: ... here.
3517 * linux-low.h (have_ptrace_getregset): Declare it.
3518
96e9210f
PA
35192015-08-04 Pedro Alves <palves@redhat.com>
3520
3521 * thread-db.c (struct thread_db): Use new typedefs.
3522 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3523 CHK calls.
3524 (disable_thread_event_reporting): Cast result of dlsym to
3525 destination function pointer type.
3526 (thread_db_mourn): Use td_ta_delete_ftype.
3527
af60a1ef
SL
35282015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3529
3530 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3531 arch variant.
3532 (CDX_BREAKPOINT): Define for R2.
3533 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3534 (the_low_target): Add comments.
3535
e8b41681
YQ
35362015-07-30 Yao Qi <yao.qi@linaro.org>
3537
3538 * linux-arm-low.c (arm_hwcap): Remove it.
3539 (arm_read_description): New local variable arm_hwcap. Don't
3540 set arm_hwcap to zero.
3541
89abb039
YQ
35422015-07-30 Yao Qi <yao.qi@linaro.org>
3543
3544 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3545 Use regcache->tdesc instead.
3546 (arm_store_wmmxregset): Likewise.
3547 (arm_fill_vfpregset): Likewise.
3548 (arm_store_vfpregset): Likewise.
3549
deca266c
YQ
35502015-07-30 Yao Qi <yao.qi@linaro.org>
3551
3552 * linux-arm-low.c: Include arch/arm.h.
3553 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3554 (arm_store_gregset): Likewise.
3555
aa58a496
SM
35562015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3557
3558 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3559 ptrace's 4th parameter.
3560
50904b25
YQ
35612015-07-27 Yao Qi <yao.qi@linaro.org>
3562
3563 * configure.srv (case aarch64*-*-linux*): Don't set
3564 srv_linux_usrregs.
3565
5826e159
PA
35662015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3567
3568 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3569 sys/ptrace.h.
3570 * linux-arm-low.c: Likewise.
3571 * linux-cris-low.c: Likewise.
3572 * linux-crisv32-low.c: Likewise.
3573 * linux-low.c: Likewise.
3574 * linux-m68k-low.c: Likewise.
3575 * linux-mips-low.c: Likewise.
3576 * linux-nios2-low.c: Likewise.
3577 * linux-s390-low.c: Likewise.
3578 * linux-sparc-low.c: Likewise.
3579 * linux-tic6x-low.c: Likewise.
3580 * linux-tile-low.c: Likewise.
3581 * linux-x86-low.c: Likewise.
3582
54019719
PA
35832015-07-24 Pedro Alves <palves@redhat.com>
3584
3585 * config.in: Regenerate.
3586 * configure: Regenerate.
3587
eb7aa561
PA
35882015-07-24 Pedro Alves <palves@redhat.com>
3589
3590 * acinclude.m4: Include ../ptrace.m4.
3591 * configure.ac: Call GDB_AC_PTRACE.
3592 * config.in, configure: Regenerate.
3593
55d7b841
YQ
35942015-07-24 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-low.c (linux_create_inferior): Remove setting to
3597 proc->priv->new_inferior.
3598 (linux_attach): Likewise.
3599 (linux_low_filter_event): Likewise.
3600 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3601
c06cbd92
YQ
36022015-07-24 Yao Qi <yao.qi@linaro.org>
3603
3604 * linux-low.c (linux_arch_setup): New function.
3605 (linux_low_filter_event): If proc->tdesc is NULL and
3606 proc->attached is true, call the_low_target.arch_setup.
3607 Otherwise, keep status pending, and return.
3608 (linux_resume_one_lwp_throw): Don't call get_pc if
3609 thread->while_stepping isn't NULL. Don't call
3610 get_thread_regcache if proc->tdesc is NULL.
3611 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3612 (linux_target_ops): Install arch_setup.
3613 * server.c (start_inferior): Call the_target->arch_setup.
3614 * target.h (struct target_ops) <arch_setup>: New field.
3615 (target_arch_setup): New marco.
3616 * lynx-low.c (lynx_target_ops): Update.
3617 * nto-low.c (nto_target_ops): Update.
3618 * spu-low.c (spu_target_ops): Update.
3619 * win32-low.c (win32_target_ops): Update.
3620
5ae3ebba
YQ
36212015-07-24 Yao Qi <yao.qi@linaro.org>
3622
3623 * linux-low.c (linux_add_process): Don't set
3624 proc->priv->new_inferior.
3625 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3626 (linux_attach): Likewise.
3627
eb97750b
YQ
36282015-07-24 Yao Qi <yao.qi@linaro.org>
3629
3630 * server.c (start_inferior): Code refactor.
3631
51aee833
YQ
36322015-07-24 Yao Qi <yao.qi@linaro.org>
3633
3634 * server.c (process_serial_event): Set general_thread.
3635
af1b22f3
YQ
36362015-07-21 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3639 aarch64_linux_get_debug_reg_capacity.
3640
554717a3
YQ
36412015-07-17 Yao Qi <yao.qi@linaro.org>
3642
3643 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3644 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3645 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3646 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3647 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3648 (AARCH64_HWP_ALIGNMENT): Likewise.
3649 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3650 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3651 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3652 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3653 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3654 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3655 (struct aarch64_debug_reg_state): Likewise.
3656 (struct arch_lwp_info): Likewise.
3657 (aarch64_align_watchpoint): Likewise.
3658 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3659 (aarch64_watchpoint_length): Likewise.
3660 (aarch64_point_encode_ctrl_reg): Likewise
3661 (aarch64_point_is_aligned): Likewise.
3662 (aarch64_align_watchpoint): Likewise.
3663 (aarch64_linux_set_debug_regs):
3664 (aarch64_dr_state_insert_one_point): Likewise.
3665 (aarch64_dr_state_remove_one_point): Likewise.
3666 (aarch64_handle_breakpoint): Likewise.
3667 (aarch64_handle_aligned_watchpoint): Likewise.
3668 (aarch64_handle_unaligned_watchpoint): Likewise.
3669 (aarch64_handle_watchpoint): Likewise.
3670
c67ca4de
YQ
36712015-07-17 Yao Qi <yao.qi@linaro.org>
3672
3673 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3674 and don't aarch64_get_debug_reg_state. All callers update.
3675 (aarch64_handle_aligned_watchpoint): Likewise.
3676 (aarch64_handle_unaligned_watchpoint): Likewise.
3677 (aarch64_handle_watchpoint): Likewise.
3678 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3679 (aarch64_remove_point): Likewise.
3680
25abf979
YQ
36812015-07-17 Yao Qi <yao.qi@linaro.org>
3682
3683 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3684 debug_printf.
3685 (aarch64_handle_unaligned_watchpoint): Likewise.
3686
db1ff28b
JK
36872015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3688
3689 Revert the previous 3 commits:
3690 Move gdb_regex* to common/
3691 Move linux_find_memory_regions_full & co.
3692 gdbserver build-id attribute generator
3693
700ca40f
JK
36942015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3695 Jan Kratochvil <jan.kratochvil@redhat.com>
3696
3697 gdbserver build-id attribute generator.
3698 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3699 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3700 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3701 (find_phdr): New.
3702 (get_dynamic): Use find_pdhr to traverse program headers.
3703 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3704 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3705 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3706 (get_hex_build_id): New.
3707 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3708 to reply XML document.
3709
9904185c
JK
37102015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3711 Jan Kratochvil <jan.kratochvil@redhat.com>
3712
3713 * target.c: Include target/target-utils.h and fcntl.h.
3714 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3715 (target_fileio_read_stralloc): New functions.
3716
6e5b4429
JK
37172015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3718
3719 * Makefile.in (OBS): Add gdb_regex.o.
3720 (gdb_regex.o): New.
3721 * config.in: Rebuilt.
3722 * configure: Rebuilt.
3723
ddc98fbf
JK
37242015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3725 Jan Kratochvil <jan.kratochvil@redhat.com>
3726
3727 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3728 * Makefile.in (OBS): Add target-utils.o.
3729 (linux-maps.o, target-utils.o): New.
3730 * configure.srv (srv_linux_obj): Add linux-maps.o.
3731
e57bb7a0
PL
37322015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3733
3734 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3735 function, return 1.
3736 (the_low_target): Install it.
3737
586b02a9
PA
37382015-07-14 Pedro Alves <palves@redhat.com>
3739
3740 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3741 Instead, ignore ECHILD, and throw an error for other errnos.
3742
58c1b36c
PA
37432015-07-10 Pedro Alves <palves@redhat.com>
3744
3745 * event-loop.c (struct callback_event) <data>: Change type to
3746 gdb_client_data instance instead of gdb_client_data pointer.
3747 (append_callback_event): Adjust.
3748
421530db
PL
37492015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3750
3751 * linux-aarch64-low.c: Add comments for each linux_target_ops
3752 method. Remove comments already covered in target_ops and
3753 linux_target_ops definitions.
3754 (the_low_target): Add comments for each unimplemented method.
3755
c2d65f38
YQ
37562015-07-09 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-aarch64-low.c (aarch64_regmap): Remove.
3759 (aarch64_usrregs_info): Remove.
3760 (regs_info): Set field usrregs to NULL.
3761
b20a6524
MM
37622015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3763
3764 * linux-low.c: Include "rsp-low.h"
3765 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3766 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3767 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3768 (handle_btrace_enable_pt): New.
3769 (handle_btrace_general_set): Support "pt".
3770 (handle_btrace_conf_general_set): Support "pt:size".
3771
96c97461
PL
37722015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3773
3774 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3775 Z_PACKET_SW_BP.
3776
37d66942
PL
37772015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3778
3779 * linux-aarch64-low.c: Remove comment about endianness.
3780 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3781 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3782 memcmp.
3783
dc06243f
GB
37842015-06-24 Gary Benson <gbenson@redhat.com>
3785
3786 * linux-i386-ipa.c (stdint.h): Do not include.
3787 * lynx-i386-low.c (stdint.h): Likewise.
3788 * lynx-ppc-low.c (stdint.h): Likewise.
3789 * mem-break.c (stdint.h): Likewise.
3790 * thread-db.c (stdint.h): Likewise.
3791 * tracepoint.c (stdint.h): Likewise.
3792 * win32-low.c (stdint.h): Likewise.
3793
124e13d9
SM
37942015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3795
3796 * server.c (write_qxfer_response): Update call to
3797 remote_escape_output.
3798
909c2cda
JK
37992015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3800 Jan Kratochvil <jan.kratochvil@redhat.com>
3801
3802 Merge multiple hex conversions.
3803 * gdbreplay.c (tohex): Rename to 'fromhex'.
3804 (logchar): Use fromhex.
3805
24c05f46
JK
38062015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3807
3808 * server.c (handle_qxfer_libraries): Set `version' attribute for
3809 <library-list>.
3810
14d2069a
GB
38112015-06-10 Gary Benson <gbenson@redhat.com>
3812
3813 * target.h (struct target_ops) <multifs_open>: New field.
3814 <multifs_unlink>: Likewise.
3815 <multifs_readlink>: Likewise.
3816 * linux-low.c (nat/linux-namespaces.h): New include.
3817 (linux_target_ops): Initialize the_target->multifs_open,
3818 the_target->multifs_unlink and the_target->multifs_readlink.
3819 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3820 * hostio.c (hostio_fs_pid): New static variable.
3821 (hostio_handle_new_gdb_connection): New function.
3822 (handle_setfs): Likewise.
3823 (handle_open): Use the_target->multifs_open as appropriate.
3824 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3825 (handle_readlink): Use the_target->multifs_readlink as
3826 appropriate.
3827 (handle_vFile): Handle vFile:setfs packets.
3828 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3829 after target_handle_new_gdb_connection.
3830
4b8b5e72
GB
38312015-06-10 Gary Benson <gbenson@redhat.com>
3832
3833 * configure.ac (AC_CHECK_FUNCS): Add setns.
3834 * config.in: Regenerate.
3835 * configure: Likewise.
3836 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3837 (linux-namespaces.o): New rule.
3838 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3839
3ac2e371
GB
38402015-06-09 Gary Benson <gbenson@redhat.com>
3841
3842 * hostio.c (handle_open): Process mode argument with
3843 fileio_to_host_mode.
3844
ca9b78ce
YQ
38452015-06-01 Yao Qi <yao.qi@linaro.org>
3846
3847 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3848 * linux-x86-low.c: Likewise.
3849
bfacd19d
DB
38502015-05-28 Don Breazeal <donb@codesourcery.com>
3851
3852 * linux-low.c (handle_extended_wait): Initialize
3853 thread_info.last_resume_kind for new fork children.
3854
452003ef
PA
38552015-05-15 Pedro Alves <palves@redhat.com>
3856
3857 * target.h (target_handle_new_gdb_connection): Rewrite using if
3858 wrapped in do/while.
3859
1041a03c
JB
38602015-05-14 Joel Brobecker <brobecker@adacore.com>
3861
3862 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3863 * configure, config.in: Regenerate.
3864 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3865 Declare typedef.
3866
c269dbdb
DB
38672015-05-12 Don Breazeal <donb@codesourcery.com>
3868
3869 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3870 PTRACE_EVENT_VFORK_DONE.
3871 (linux_low_ptrace_options, extended_event_reported): Add vfork
3872 events.
3873 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3874 and "vforkdone" for RSP 'T' Stop Reply Packet.
3875 * server.h (report_vfork_events): Declare
3876 global variable.
3877
3a8a0396
DB
38782015-05-12 Don Breazeal <donb@codesourcery.com>
3879
3880 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3881 (the_low_target) <new_fork>: Initialize new member.
3882 * linux-arm-low.c (arm_new_fork): New function.
3883 (the_low_target) <new_fork>: Initialize new member.
3884 * linux-low.c (handle_extended_wait): Call new target function
3885 new_fork.
3886 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3887 * linux-mips-low.c (mips_add_watchpoint): New function
3888 extracted from mips_insert_point.
3889 (the_low_target) <new_fork>: Initialize new member.
3890 (mips_linux_new_fork): New function.
3891 (mips_insert_point): Call mips_add_watchpoint.
3892 * linux-x86-low.c (x86_linux_new_fork): New function.
3893 (the_low_target) <new_fork>: Initialize new member.
3894
de0d863e
DB
38952015-05-12 Don Breazeal <donb@codesourcery.com>
3896
3897 * linux-low.c (handle_extended_wait): Implement return value,
3898 rename argument 'event_child' to 'event_lwp', handle
3899 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3900 (linux_low_ptrace_options): New function.
3901 (linux_low_filter_event): Call linux_low_ptrace_options,
3902 use different argument fo linux_enable_event_reporting,
3903 use return value from handle_extended_wait.
3904 (extended_event_reported): New function.
3905 (linux_wait_1): Call extended_event_reported and set
3906 status to report fork events.
3907 (linux_write_memory): Add pid to debug message.
3908 (reset_lwp_ptrace_options_callback): New function.
3909 (linux_handle_new_gdb_connection): New function.
3910 (linux_target_ops): Initialize new structure member.
3911 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3912 * lynx-low.c: Initialize new structure member.
3913 * remote-utils.c (prepare_resume_reply): Implement stop reason
3914 "fork" for "T" stop message.
3915 * server.c (handle_query): Call handle_new_gdb_connection.
3916 * server.h (report_fork_events): Declare global flag.
3917 * target.h (struct target_ops) <handle_new_gdb_connection>:
3918 New member.
3919 (target_handle_new_gdb_connection): New macro.
3920 * win32-low.c: Initialize new structure member.
3921
ddcbc397
DB
39222015-05-12 Don Breazeal <donb@codesourcery.com>
3923
3924 * mem-break.c (APPEND_TO_LIST): Define macro.
3925 (clone_agent_expr): New function.
3926 (clone_one_breakpoint): New function.
3927 (clone_all_breakpoints): New function.
3928 * mem-break.h: Declare new functions.
3929
89245bc0
DB
39302015-05-12 Don Breazeal <donb@codesourcery.com>
3931
3932 * linux-low.c (linux_supports_fork_events): New function.
3933 (linux_supports_vfork_events): New function.
3934 (linux_target_ops): Initialize new structure members.
3935 (initialize_low): Call linux_check_ptrace_features.
3936 * lynx-low.c (lynx_target_ops): Initialize new structure
3937 members.
3938 * server.c (report_fork_events, report_vfork_events):
3939 New global flags.
3940 (handle_query): Add new features to qSupported packet and
3941 response.
3942 (captured_main): Initialize new global variables.
3943 * target.h (struct target_ops) <supports_fork_events>:
3944 New member.
3945 <supports_vfork_events>: New member.
3946 (target_supports_fork_events): New macro.
3947 (target_supports_vfork_events): New macro.
3948 * win32-low.c (win32_target_ops): Initialize new structure
3949 members.
3950
835205d0
GB
39512015-05-12 Gary Benson <gbenson@redhat.com>
3952
3953 * server.c (handle_qxfer_exec_file): Use current process
3954 if annex is empty.
3955
21e94bd9
SL
39562015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3957
3958 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3959 Remove HAVE_PTRACE_GETREGS conditionals.
3960 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3961 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3962
45614f15
YQ
39632015-05-08 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-low.c (linux_supports_conditional_breakpoints): New
3966 function.
3967 (linux_target_ops): Install new target method.
3968 * lynx-low.c (lynx_target_ops): Install NULL hook for
3969 supports_conditional_breakpoints.
3970 * nto-low.c (nto_target_ops): Likewise.
3971 * spu-low.c (spu_target_ops): Likewise.
3972 * win32-low.c (win32_target_ops): Likewise.
3973 * server.c (handle_query): Check
3974 target_supports_conditional_breakpoints.
3975 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3976 New field.
3977 (target_supports_conditional_breakpoints): New macro.
3978
80ad801e
PA
39792015-05-06 Pedro Alves <palves@redhat.com>
3980
3981 PR server/18081
3982 * server.c (start_inferior): If the process exits, mourn it.
3983
819843c7
GB
39842015-04-21 Gary Benson <gbenson@redhat.com>
3985
3986 * hostio.c (fileio_open_flags_to_host): Factored out to
3987 fileio_to_host_openflags in common/fileio.c. Single use
3988 updated.
3989
a2d5a9d7
MF
39902015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3991
3992 * linux-xtensa-low.c (xtensa_fill_gregset)
3993 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3994 XCHAL_HAVE_LOOP.
3995
deb44829
MF
39962015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3997
3998 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3999 (regs_info): Replace usrregs pointer with NULL.
4000
e57f1de3
GB
40012015-04-17 Gary Benson <gbenson@redhat.com>
4002
4003 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4004 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4005 * server.c (handle_qxfer_exec_file): New function.
4006 (qxfer_packets): Add exec-file entry.
4007 (handle_query): Report qXfer:exec-file:read as supported packet.
4008
62828379
RN
40092015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4010
4011 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4012
b88bb450
GB
40132015-04-09 Gary Benson <gbenson@redhat.com>
4014
4015 * hostio-errno.c (errno_to_fileio_error): Remove function.
4016 Update caller to use remote_fileio_to_fio_error.
4017
c8f4bfdd
YQ
40182015-04-09 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-low.c (linux_insert_point): Call
4021 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4022 (linux_remove_point): Call remove_memory_breakpoint if type is
4023 raw_bkpt_type_sw.
4024 * linux-x86-low.c (x86_insert_point): Don't call
4025 insert_memory_breakpoint.
4026 (x86_remove_point): Don't call remove_memory_breakpoint.
4027
41f98f02
PA
40282015-04-01 Pedro Alves <palves@redhat.com>
4029 Cleber Rosa <crosa@redhat.com>
4030
4031 * server.c (gdbserver_usage): Reorganize and extend the usage
4032 message.
4033
2bf6fb9d
PA
40342015-03-24 Pedro Alves <palves@redhat.com>
4035
4036 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4037 output. Also dump TRAP_TRACE.
4038 (linux_low_filter_event): In debug output, distinguish a
4039 resume_stop SIGSTOP from a delayed SIGSTOP.
4040
369f6daa
GB
40412015-03-24 Gary Benson <gbenson@redhat.com>
4042
4043 * linux-x86-low.c (x86_linux_new_thread): Moved to
4044 nat/x86-linux.c.
4045 (x86_linux_prepare_to_resume): Likewise.
4046
8e5d4070
GB
40472015-03-24 Gary Benson <gbenson@redhat.com>
4048
4049 * Makefile.in (x86-linux-dregs.o): New rule.
4050 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4051 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4052 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4053 (x86_linux_dr_get): Likewise.
4054 (x86_linux_dr_set): Likewise.
4055 (update_debug_registers_callback): Likewise.
4056 (x86_linux_dr_set_addr): Likewise.
4057 (x86_linux_dr_get_addr): Likewise.
4058 (x86_linux_dr_set_control): Likewise.
4059 (x86_linux_dr_get_control): Likewise.
4060 (x86_linux_dr_get_status): Likewise.
4061 (x86_linux_update_debug_registers): Likewise.
4062
2b95d440
GB
40632015-03-24 Gary Benson <gbenson@redhat.com>
4064
4065 * linux-x86-low.c (x86_linux_update_debug_registers):
4066 New function, factored out from...
4067 (x86_linux_prepare_to_resume): ...this.
4068
14b0bc68
GB
40692015-03-24 Gary Benson <gbenson@redhat.com>
4070
4071 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4072 (x86_linux_dr_set): Likewise.
4073 (update_debug_registers_callback): Likewise.
4074 (x86_linux_dr_set_addr): Likewise.
4075 (x86_linux_dr_get_addr): Likewise.
4076 (x86_linux_dr_set_control): Likewise.
4077 (x86_linux_dr_get_control): Likewise.
4078 (x86_linux_dr_get_status): Likewise.
4079 (x86_linux_prepare_to_resume): Likewise.
4080
5dfe6ca8
GB
40812015-03-24 Gary Benson <gbenson@redhat.com>
4082
4083 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4084 Use perror_with_name. Pass string through gettext.
4085 (x86_linux_dr_set): Likewise.
4086
d33472ad
GB
40872015-03-24 Gary Benson <gbenson@redhat.com>
4088
4089 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4090 (x86_linux_dr_set_addr): ...this.
4091 (x86_dr_low_get_addr): Rename to...
4092 (x86_linux_dr_get_addr): ...this.
4093 (x86_dr_low_set_control): Rename to...
4094 (x86_linux_dr_set_control): ...this.
4095 (x86_dr_low_get_control): Rename to...
4096 (x86_linux_dr_get_control): ...this.
4097 (x86_dr_low_get_status): Rename to...
4098 (x86_linux_dr_get_status): ...this.
4099 (x86_dr_low): Update with new function names.
4100
4b134ca1
GB
41012015-03-24 Gary Benson <gbenson@redhat.com>
4102
4103 * Makefile.in (x86-linux.o): New rule.
4104 * configure.srv: Add x86-linux.o to relevant targets.
4105 * linux-low.c (lwp_set_arch_private_info): New function.
4106 (lwp_arch_private_info): Likewise.
4107 * linux-x86-low.c: Include nat/x86-linux.h.
4108 (arch_lwp_info): Removed structure.
4109 (update_debug_registers_callback):
4110 Use lwp_set_debug_registers_changed.
4111 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4112 and lwp_set_debug_registers_changed.
4113 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4114
34c703da
GB
41152015-03-24 Gary Benson <gbenson@redhat.com>
4116
4117 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4118 * linux-arm-low.c (arm_new_thread): Likewise.
4119 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4120 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4121 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4122 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4123
cff068da
GB
41242015-03-24 Gary Benson <gbenson@redhat.com>
4125
4126 * linux-low.c (ptid_of_lwp): New function.
4127 (lwp_is_stopped): Likewise.
4128 (lwp_stop_reason): Likewise.
4129 * linux-x86-low.c (update_debug_registers_callback):
4130 Use lwp_is_stopped.
4131 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4132 lwp_stop_reason.
4133
b2f7c7e8
GB
41342015-03-24 Gary Benson <gbenson@redhat.com>
4135
4136 * linux-low.h (linux_stop_lwp): Remove declaration.
4137
6d4ee8c6
GB
41382015-03-24 Gary Benson <gbenson@redhat.com>
4139
4140 * linux-low.h: Include nat/linux-nat.h.
4141 * linux-low.c (iterate_over_lwps_args): New structure.
4142 (iterate_over_lwps_filter): New function.
4143 (iterate_over_lwps): Likewise.
4144 * linux-x86-low.c (update_debug_registers_callback):
4145 Update signature to what iterate_over_lwps expects.
4146 Remove PID check that iterate_over_lwps now performs.
4147 (x86_dr_low_set_addr): Use iterate_over_lwps.
4148 (x86_dr_low_set_control): Likewise.
4149
70a0bb6b
GB
41502015-03-24 Gary Benson <gbenson@redhat.com>
4151
4152 * linux-x86-low.c (x86_debug_reg_state): New function.
4153 (x86_linux_prepare_to_resume): Use the above.
4154
7b669087
GB
41552015-03-24 Gary Benson <gbenson@redhat.com>
4156
4157 * linux-low.c (current_lwp_ptid): New function.
4158 * linux-x86-low.c: Include nat/linux-nat.h.
4159 (x86_dr_low_get_addr): Use current_lwp_ptid.
4160 (x86_dr_low_get_control): Likewise.
4161 (x86_dr_low_get_status): Likewise.
4162
eef49a3d
PA
41632015-03-20 Pedro Alves <palves@redhat.com>
4164
4165 * tracepoint.c (cmd_qtstatus): Make "str" const.
4166
b2333d22
PA
41672015-03-20 Pedro Alves <palves@redhat.com>
4168
4169 * server.c (handle_general_set): Make "req_str" const.
4170
23f238d3
PA
41712015-03-19 Pedro Alves <palves@redhat.com>
4172
4173 * linux-low.c (linux_resume_one_lwp): Rename to ...
4174 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4175 instead call perror_with_name.
4176 (check_ptrace_stopped_lwp_gone): New function.
4177 (linux_resume_one_lwp): Reimplement as wrapper around
4178 linux_resume_one_lwp_throw that swallows errors if the LWP is
4179 gone.
4180
91baf43f
PA
41812015-03-19 Pedro Alves <palves@redhat.com>
4182
4183 * linux-low.c (count_events_callback, select_event_lwp_callback):
4184 No longer check whether the thread has resume_stop as last resume
4185 kind.
4186
8bf3b159
PA
41872015-03-19 Pedro Alves <palves@redhat.com>
4188
4189 * linux-low.c (count_events_callback, select_event_lwp_callback):
4190 Use the lwp's status_pending_p field, not the thread's.
4191
b90fc188
PA
41922015-03-19 Pedro Alves <palves@redhat.com>
4193
4194 * linux-low.c (select_event_lwp_callback): Update comments to
4195 no longer mention SIGTRAP.
4196
464b0089
GB
41972015-03-18 Gary Benson <gbenson@redhat.com>
4198
4199 * server.c (handle_query): Do not report vFile:fstat as supported.
4200
aa9e327f
GB
42012015-03-11 Gary Benson <gbenson@redhat.com>
4202
4203 * hostio.c (sys/types.h): New include.
4204 (sys/stat.h): Likewise.
4205 (common-remote-fileio.h): Likewise.
4206 (handle_fstat): New function.
4207 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4208
791c0056
GB
42092015-03-11 Gary Benson <gbenson@redhat.com>
4210
4211 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4212 struct stat.st_blocks and struct stat.st_blksize.
4213 * configure: Regenerate.
4214 * config.in: Likewise.
4215 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4216 (OBS): Add common-remote-fileio.o.
4217 (common-remote-fileio.o): New rule.
4218
9a9df970
PA
42192015-03-09 Pedro Alves <palves@redhat.com>
4220
4221 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4222 'struct sockaddr' pointer in 'accept' call.
4223
9eb1356e
PA
42242015-03-09 Pedro Alves <palves@redhat.com>
4225
4226 Revert:
4227 2015-03-07 Pedro Alves <palves@redhat.com>
4228 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4229 or <winsock2.h> here. Instead include "gdb_socket.h".
4230 (remote_open): Use union gdb_sockaddr_u.
4231 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4232 or <winsock2.h> here. Instead include "gdb_socket.h".
4233 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4234 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4235 or <sys/un.h>.
4236 (init_named_socket, gdb_agent_helper_thread): Use union
4237 gdb_sockaddr_u.
4238
aac331e4
PA
42392015-03-07 Pedro Alves <palves@redhat.com>
4240
4241 * configure.ac (build_warnings): Move
4242 -Wdeclaration-after-statement to the C-specific set.
4243 * configure: Regenerate.
4244
366c75fc
PA
42452015-03-07 Pedro Alves <palves@redhat.com>
4246
4247 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4248 or <winsock2.h> here. Instead include "gdb_socket.h".
4249 (remote_open): Use union gdb_sockaddr_u.
4250 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4251 or <winsock2.h> here. Instead include "gdb_socket.h".
4252 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4253 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4254 or <sys/un.h>.
4255 (init_named_socket, gdb_agent_helper_thread): Use union
4256 gdb_sockaddr_u.
4257
492d29ea
PA
42582015-03-07 Pedro Alves <palves@redhat.com>
4259
4260 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4261 instead.
4262
60a191ed
YQ
42632015-03-06 Yao Qi <yao.qi@linaro.org>
4264
4265 * linux-aarch64-low.c (aarch64_insert_point): Use
4266 show_debug_regs as a boolean.
4267 (aarch64_remove_point): Likewise.
4268
f5771b1d
PA
42692015-03-05 Pedro Alves <palves@redhat.com>
4270
4271 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4272 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4273 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4274 * nto-low.c (nto_target_ops): Likewise.
4275 * spu-low.c (spu_target_ops): Likewise.
4276 * win32-low.c (win32_target_ops): Likewise.
4277
3e572f71
PA
42782015-03-04 Pedro Alves <palves@redhat.com>
4279
72f4393d 4280 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4281 Decide whether a breakpoint triggered based on the SIGTRAP's
4282 siginfo.si_code.
72f4393d
L
4283 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4284 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4285 (linux_low_filter_event): Check for breakpoints before checking
4286 watchpoints.
4287 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4288 siginfo.si_code.
72f4393d
L
4289 (linux_stopped_by_sw_breakpoint)
4290 (linux_supports_stopped_by_sw_breakpoint)
4291 (linux_stopped_by_hw_breakpoint)
4292 (linux_supports_stopped_by_hw_breakpoint): New functions.
4293 (linux_target_ops): Install new target methods.
3e572f71 4294
1ec68e26
PA
42952015-03-04 Pedro Alves <palves@redhat.com>
4296
4297 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4298 * server.c (swbreak_feature, hwbreak_feature): New globals.
4299 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4300 (captured_main): Clear swbreak_feature and hwbreak_feature.
4301 * server.h (swbreak_feature, hwbreak_feature): Declare.
4302 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4303 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4304 supports_stopped_by_hw_breakpoint>: New fields.
4305 (target_supports_stopped_by_sw_breakpoint)
4306 (target_stopped_by_sw_breakpoint)
4307 (target_supports_stopped_by_hw_breakpoint)
4308 (target_stopped_by_hw_breakpoint): Declare.
4309
15c66dd6
PA
43102015-03-04 Pedro Alves <palves@redhat.com>
4311
4312 enum lwp_stop_reason -> enum target_stop_reason
4313 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4314 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4315 (linux_wait_1, stuck_in_jump_pad_callback)
4316 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4317 (linux_stopped_by_watchpoint):
4318 * linux-low.h (enum lwp_stop_reason): Delete.
4319 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4320 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4321
98fc70d6
YQ
43222015-03-04 Yao Qi <yao.qi@linaro.org>
4323
4324 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4325
dd2ac174
GB
43262015-03-03 Gary Benson <gbenson@redhat.com>
4327
4328 * hostio.c (handle_vFile): Fix prefix lengths.
4329
d68e53f4
MM
43302015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4331
4332 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4333 ptr_bits.
4334
bf2d68ab
AA
43352015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4336
4337 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4338 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4339 (clean): Add "rm -f" for above C files.
4340 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4341 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4342 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4343 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4344 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4345 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4346 (init_registers_s390x_vx_linux64)
4347 (init_registers_s390x_tevx_linux64)
4348 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4349 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4350 declarations.
4351 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4352 (s390_store_vxrs_high): New functions.
4353 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4354 NT_S390_VXRS_HIGH.
4355 (s390_arch_setup): Add logic for selecting one of the new target
4356 descriptions. Activate the new vector regsets if applicable.
4357 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4358 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4359 and init_registers_s390x_tevx_linux64.
4360
c966a859
PA
43612015-03-01 Pedro Alves <palves@redhat.com>
4362
4363 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4364 parameter.
4365
4180215b
PA
43662015-02-27 Pedro Alves <palves@redhat.com>
4367
4368 * linux-x86-low.c (u_debugreg_offset): New function.
4369 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4370
749bab01
PA
43712015-02-27 Pedro Alves <palves@redhat.com>
4372
4373 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4374 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4375 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4376 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4377 (ps_lsetfpregs, ps_getpid)
4378 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4379 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4380 (ps_lsetxregs, ps_plog): Declare.
4381
3c14e5a3
PA
43822015-02-27 Pedro Alves <palves@redhat.com>
4383
4384 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4385 IP_AGENT_EXPORT_FUNC.
4386 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4387 IP_AGENT_EXPORT_FUNC.
4388 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4389 (IP_AGENT_EXPORT): Delete.
4390 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4391 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4392 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4393 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4394 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4395 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4396 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4397 (traceframe_read_count, traceframe_write_count)
4398 (traceframes_created, trace_state_variables, get_raw_reg)
4399 (get_trace_state_variable_value, set_trace_state_variable_value)
4400 (ust_loaded, helper_thread_id, cmd_buf): Use
4401 IPA_SYM_EXPORTED_NAME.
4402 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4403 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4404 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4405 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4406 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4407 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4408 EXTERN_C_PUSH/EXTERN_C_POP.
4409 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4410 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4411 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4412 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4413 (traceframe_write_count, traceframe_read_count)
4414 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4415 (about_to_request_buffer_space, get_trace_state_variable_value)
4416 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4417 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4418 EXTERN_C_PUSH/EXTERN_C_POP.
4419 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4420 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4421 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4422 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4423 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4424 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4425 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4426 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4427 Define.
4428 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4429 (IP_AGENT_EXPORT_VAR_DECL): Define.
4430 (tracing): Declare.
4431 (gdb_agent_get_raw_reg): Declare.
4432
fe978cb0
PA
44332015-02-27 Tom Tromey <tromey@redhat.com>
4434 Pedro Alves <palves@redhat.com>
4435
4436 Rename symbols whose names are reserved C++ keywords throughout.
4437
3bc3d82a
PA
44382015-02-27 Pedro Alves <palves@redhat.com>
4439
4440 * Makefile.in (COMPILER): New, get it from autoconf.
4441 (CXX): Get from autoconf instead.
4442 (COMPILE.pre): Use COMPILER.
4443 (CC-LD): Rename to ...
4444 (CC_LD): ... this. Use COMPILER.
4445 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4446 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4447 * acinclude.m4: Include build-with-cxx.m4.
4448 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4449 Disable -Werror by default if building in C++ mode.
4450 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4451 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4452 the C++ compiler. Save/restore CXXFLAGS too.
4453 * configure: Regenerate.
4454
07697489
PA
44552015-02-27 Pedro Alves <palves@redhat.com>
4456
4457 * acinclude.m4: Include libiberty.m4.
4458 * configure.ac: Call libiberty_INIT.
4459 * config.in, configure: Regenerate.
4460
9beb7c4e
PA
44612015-02-26 Pedro Alves <palves@redhat.com>
4462
4463 * linux-low.c (linux_wait_1): When incrementing the PC past a
4464 program breakpoint always use the_low_target.breakpoint_len as
4465 increment, rather than the maximum between that and
4466 the_low_target.decr_pc_after_break.
4467
8090aef2
PA
44682015-02-23 Pedro Alves <palves@redhat.com>
4469
4470 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4471 thread was doing a step-over; always adjust the PC if
4472 we stepped over a permanent breakpoint.
4473 (linux_wait_1): If we stepped over breakpoint that was on top of a
4474 permanent breakpoint, manually advance the PC past it.
4475
bc9540e8
PA
44762015-02-23 Pedro Alves <palves@redhat.com>
4477
4478 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4479 modes.
4480 (x86_fill_gregset, x86_store_gregset): Use it when handling
4481 $orig_eax.
4482
2db9a427
PA
44832015-02-20 Pedro Alves <palves@redhat.com>
4484
4485 * thread-db.c: Include "nat/linux-procfs.h".
4486 (thread_db_init): Skip listing new threads if the kernel supports
4487 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4488
afa8d396
PA
44892015-02-20 Pedro Alves <palves@redhat.com>
4490
4491 * linux-low.c (status_pending_p_callback): Use ptid_match.
4492
c9587f88
AT
44932015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4494
4495 PR breakpoints/16812
4496 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4497 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4498 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4499
b05ec7a5
AT
45002015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4501
4502 PR breakpoints/15956
4503 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4504
d33501a5
MM
45052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4506
4507 * linux-low.c (linux_low_btrace_conf): Print size.
4508 * server.c (handle_btrace_conf_general_set): New.
4509 (hanle_general_set): Call handle_btrace_conf_general_set.
4510 (handle_query): Report Qbtrace-conf:bts:size as supported.
4511
f4abbc16
MM
45122015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4513
4514 * linux-low.c (linux_low_enable_btrace): Update parameters.
4515 (linux_low_btrace_conf): New.
4516 (linux_target_ops)<to_btrace_conf>: Initialize.
4517 * server.c (current_btrace_conf): New.
4518 (handle_btrace_enable): Rename to ...
4519 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4520 to target_enable_btrace. Update comment. Update users.
4521 (handle_qxfer_btrace_conf): New.
4522 (qxfer_packets): Add btrace-conf entry.
4523 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4524 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4525 (target_ops)<read_btrace_conf>: New.
4526 (target_enable_btrace): Update parameters.
4527 (target_read_btrace_conf): New.
4528
043c3577
MM
45292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4530
4531 * server.c (handle_btrace_general_set): Remove call to
4532 target_supports_btrace.
4533 (supported_btrace_packets): New.
4534 (handle_query): Call supported_btrace_packets.
4535 * target.h: include btrace-common.h.
4536 (btrace_target_info): Removed.
4537 (supports_btrace, target_supports_btrace): Update parameters.
4538
734b0e4b
MM
45392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4540
4541 * Makefile.in (SFILES): Add common/btrace-common.c.
4542 (OBS): Add common/btrace-common.o.
4543 (btrace-common.o): Add build rules.
4544 * linux-low: Include btrace-common.h.
4545 (linux_low_read_btrace): Use struct btrace_data. Call
4546 btrace_data_init and btrace_data_fini.
4547
d6c146e9
PA
45482015-02-06 Pedro Alves <palves@redhat.com>
4549
4550 * thread-db.c (find_new_threads_callback): Add debug output.
4551
20ba1ce6
PA
45522015-02-04 Pedro Alves <palves@redhat.com>
4553
4554 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4555 (resume_stopped_resumed_lwps): New function.
4556 (linux_wait_for_event_filtered): Use it.
4557
8cc73a39
SDJ
45582015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4559
4560 * Makefile.in (SFILES): Add linux-personality.c.
4561 (linux-personality.o): New rule.
4562 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4563 list of objects to be built.
4564 * linux-low.c: Include nat/linux-personality.h.
4565 (linux_create_inferior): Remove code to disable address space
4566 randomization (moved to ../nat/linux-personality.c). Create
4567 cleanup to disable address space randomization.
4568
fb23d554
SDJ
45692015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4570
4571 * Makefile.in (posix-strerror.o): New rule.
4572 (mingw-strerror.o): Likewise.
4573 * configure: Regenerated.
4574 * configure.ac: Source file ../common/common.host. Initialize new
4575 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4576
cdf43629
YQ
45772015-01-14 Yao Qi <yao@codesourcery.com>
4578
4579 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4580 (ppc-linux.o): New rule.
4581 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4582 * configure.ac: AC_CHECK_FUNCS(getauxval).
4583 * config.in: Re-generated.
4584 * configure: Re-generated.
4585 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4586 ppc64_64bit_inferior_p
4587
514c5338
YQ
45882015-01-14 Yao Qi <yao@codesourcery.com>
4589
4590 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4591 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4592 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4593 (PT_ORIG_R3, PT_TRAP): Likewise.
4594 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4595 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4596 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4597
3368c1e5
JB
45982015-01-10 Joel Brobecker <brobecker@adacore.com>
4599
4600 * i387-fp.c (i387_cache_to_xsave): In look over
4601 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4602 zmmh_low_space field by use of zmmh_high_space.
4603
582511be
PA
46042015-01-09 Pedro Alves <palves@redhat.com>
4605
4606 * linux-low.c (step_over_bkpt): Move higher up in the file.
4607 (handle_extended_wait): Don't store the stop_pc here.
4608 (get_stop_pc): Adjust comments and rename to ...
4609 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4610 stopped for a software breakpoint or hardware breakpoint.
4611 (thread_still_has_status_pending_p): New function.
4612 (status_pending_p_callback): Use
4613 thread_still_has_status_pending_p. If the event is no longer
4614 interesting, resume the LWP.
4615 (handle_tracepoints): Add assert.
4616 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4617 (wstatus_maybe_breakpoint): New function.
4618 (cancel_breakpoint): Delete function.
4619 (check_stopped_by_watchpoint): New function, factored out from
4620 linux_low_filter_event.
4621 (lp_status_maybe_breakpoint): Delete function.
4622 (linux_low_filter_event): Remove filter_ptid argument.
4623 Leave thread group exits pending here. Store the LWP's stop PC.
4624 Always leave events pending.
4625 (linux_wait_for_event_filtered): Pull all events out of the
4626 kernel, and leave them all pending.
4627 (count_events_callback, select_event_lwp_callback): Consider all
4628 events.
4629 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4630 (select_event_lwp): Only give preference to the stepping LWP in
4631 all-stop mode. Adjust comments.
4632 (ignore_event): New function.
4633 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4634 references to cancel_breakpoints. Adjust to renames. Also give
4635 equal priority to all LWPs that have had events in non-stop mode.
4636 If reporting a software breakpoint event, unadjust the LWP's PC.
4637 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4638 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4639 Adjust.
4640 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4641 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4642 (linux_stopped_by_watchpoint): Adjust.
4643 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4644 * linux-low.h (enum lwp_stop_reason): New.
4645 (struct lwp_info) <stop_pc>: Adjust comment.
4646 <stopped_by_watchpoint>: Delete field.
4647 <stop_reason>: New field.
4648 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4649 * mem-break.c (software_breakpoint_inserted_here)
4650 (hardware_breakpoint_inserted_here): New function.
4651 * mem-break.h (software_breakpoint_inserted_here)
4652 (hardware_breakpoint_inserted_here): Declare.
4653 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4654 (cancel_breakpoints): Delete.
4655 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4656 (upload_fast_traceframes): Remove references to
4657 cancel_breakpoints.
4658
a33e3959
PA
46592015-01-09 Pedro Alves <palves@redhat.com>
4660
4661 * thread-db.c (find_new_threads_callback): Ignore thread if the
4662 kernel thread ID is -1.
4663
8784d563
PA
46642015-01-09 Pedro Alves <palves@redhat.com>
4665
4666 * linux-low.c (linux_attach_fail_reason_string): Move to
4667 nat/linux-ptrace.c, and rename.
4668 (linux_attach_lwp): Update comment.
4669 (attach_proc_task_lwp_callback): New function.
4670 (linux_attach): Adjust to rename and use
4671 linux_proc_attach_tgid_threads.
4672 (linux_attach_fail_reason_string): Delete declaration.
4673
76f2b779
JB
46742015-01-01 Joel Brobecker <brobecker@adacore.com>
4675
4676 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4677 * server.c (gdbserver_version): Likewise.
4678
fafcc06a
SDJ
46792014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4680
4681 * remote-utils.c: Include ctype.h.
4682 (input_interrupt): Explicitly handle the case when the char
4683 received is the NUL byte. Improve the printing of non-ASCII
4684 characters.
4685
beed38b8
JB
46862014-12-16 Joel Brobecker <brobecker@adacore.com>
4687
4688 * linux-low.c (linux_low_filter_event): Update call to
4689 linux_enable_event_reporting following the addition of
4690 a new parameter to that function.
4691
bf330350
CU
46922014-12-16 Catalin Udma <catalin.udma@freescale.com>
4693
4694 PR server/17457
4695 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4696 (AARCH64_FPCR_REGNO): Likewise.
4697 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4698 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4699 (aarch64_store_fpregset): Likewise.
4700
5227d625
JB
47012014-12-15 Joel Brobecker <brobecker@adacore.com>
4702
4703 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4704 Remove FIXME comment about assumption about N.
4705
f93b65a0
JB
47062014-12-13 Joel Brobecker <brobecker@adacore.com>
4707
4708 * configure.ac: If large-file support is disabled in GDBserver,
4709 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4710 * configure: Regenerate.
4711
e5a9158d
AA
47122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4713
4714 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4715 warning upon ENODATA from ptrace.
4716 * linux-s390-low.c (s390_store_tdb): New.
4717 (s390_regsets): Add regset for NT_S390_TDB.
4718
feea5f36
AA
47192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4720
4721 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4722 without a fill_function.
4723 * linux-s390-low.c (s390_fill_last_break): Remove.
4724 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4725 (s390_arch_setup): Use regset's size instead of fill_function for
4726 loop end condition.
4727
098dbe61
AA
47282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4729
4730 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4731 the regset's store function when ptrace returned an error.
4732 * regcache.c (get_thread_regcache): Invalidate register cache
4733 before fetching inferior's registers.
4734
28eef672
AA
47352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4736
4737 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4738 while-loop as for-loop.
4739 (regsets_store_inferior_registers): Likewise.
4740
bdca27a2
YQ
47412014-11-28 Yao Qi <yao@codesourcery.com>
4742
4743 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4744 * config.in, configure: Re-generate.
4745 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4746 is defined.
4747
9c232dda
YQ
47482014-11-21 Yao Qi <yao@codesourcery.com>
4749
4750 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4751 (AC_CHECK_HEADERS): Remove malloc.h.
4752 * configure: Re-generated.
4753 * config.in: Re-generated.
4754 * server.h: Don't include alloca.h and malloc.h.
4755 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4756 Don't include malloc.h.
4757
43968415
JB
47582014-11-17 Joel Brobecker <brobecker@adacore.com>
4759
4760 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4761 corresponding ERRNO check in same block.
4762
40e91bc7
PA
47632014-11-12 Pedro Alves <palves@redhat.com>
4764
4765 * server.c (cont_thread): Update comment.
4766 (start_inferior, attach_inferior): No longer clear cont_thread.
4767 (handle_v_cont): No longer set cont_thread.
4768 (captured_main): Clear cont_thread each time a GDB connects.
4769
c2c118cf
PA
47702014-11-12 Pedro Alves <palves@redhat.com>
4771
4772 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4773 thread, and don't resume all threads if the Hc thread has exited.
4774
78708b7c
PA
47752014-11-12 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4778 the process group instead of to a specific LWP.
4779
a2abc7de
PA
47802014-10-15 Pedro Alves <palves@redhat.com>
4781
4782 PR server/17487
4783 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4784 parameter.
4785 (arm_set_thread_context): Delete.
4786 (the_low_target): Adjust.
4787 * win32-i386-low.c (debug_registers_changed)
4788 (debug_registers_used): Delete.
4789 (update_debug_registers_callback): New function.
4790 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4791 needing to update their debug registers.
4792 (win32_get_current_dr): New function.
4793 (x86_dr_low_get_addr, x86_dr_low_get_control)
4794 (x86_dr_low_get_status): Fetch the debug register from the thread
4795 record's context.
4796 (i386_initial_stuff): Adjust.
4797 (i386_get_thread_context): Remove current_event parameter. Don't
4798 clear debug_registers_changed nor copy DR values to
4799 debug_reg_state.
4800 (i386_set_thread_context): Delete.
4801 (i386_prepare_to_resume): New function.
4802 (i386_thread_added): Mark the thread as needing to update irs
4803 debug registers.
4804 (the_low_target): Remove i386_set_thread_context and install
4805 i386_prepare_to_resume.
4806 * win32-low.c (win32_get_thread_context): Adjust.
4807 (win32_set_thread_context): Use SetThreadContext
4808 directly.
4809 (win32_prepare_to_resume): New function.
4810 (win32_require_context): New function, factored out from ...
4811 (thread_rec): ... this.
4812 (continue_one_thread): Call win32_prepare_to_resume on each thread
4813 we're about to continue.
4814 (win32_resume): Call win32_prepare_to_resume on the event thread.
4815 * win32-low.h (struct win32_thread_info)
4816 <debug_registers_changed>: New field.
4817 (struct win32_target_ops): Change prototype of set_thread_context,
4818 delete set_thread_context and add prepare_to_resume.
4819 (win32_require_context): New declaration.
4820
a442d071
GB
48212014-10-08 Gary Benson <gbenson@redhat.com>
4822
4823 * server.h: Do not include common-exceptions.h.
4824
6f1947e8
GB
48252014-10-08 Gary Benson <gbenson@redhat.com>
4826
4827 * server.h: Do not include cleanups.h.
4828
63b434a4
JH
48292014-09-30 James Hogan <james.hogan@imgtec.com>
4830
4831 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4832 mips64-dsp-linux.c.
4833
c4d9ceb6
YQ
48342014-09-23 Yao Qi <yao@codesourcery.com>
4835
4836 * linux-low.c (lp_status_maybe_breakpoint): New function.
4837 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4838 (count_events_callback): Likewise.
4839 (select_event_lwp_callback): Likewise.
4840 (cancel_breakpoints_callback): Likewise.
4841
89a5711c
DB
48422014-09-19 Don Breazeal <donb@codesourcery.com>
4843
4844 * linux-low.c (handle_extended_wait): Call
4845 linux_ptrace_get_extended_event.
4846 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4847 linux_is_extended_waitstatus.
4848
bffc0964
JB
48492014-09-16 Joel Brobecker <brobecker@adacore.com>
4850
4851 * Makefile.in (CPPFLAGS): Define.
4852 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4853 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4854
0bfdf32f
GB
48552014-09-16 Gary Benson <gbenson@redhat.com>
4856
4857 * inferiors.h (current_inferior): Renamed as...
4858 (current_thread): New variable. All uses updated.
4859 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4860 (maybe_move_out_of_jump_pad): Likewise.
4861 (cancel_breakpoint): Likewise.
4862 (linux_low_filter_event): Likewise.
4863 (wait_for_sigstop): Likewise.
4864 (linux_resume_one_lwp): Likewise.
4865 (need_step_over_p): Likewise.
4866 (start_step_over): Likewise.
4867 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4868 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4869 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4870 and save_inferior as saved_thread.
4871 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4872 saved_thread.
4873 (regcache_invalidate_thread): Likewise.
4874 * remote-utils.c (prepare_resume_reply): Likewise.
4875 * thread-db.c (thread_db_get_tls_address): Likewise.
4876 (disable_thread_event_reporting): Likewise.
4877 (remove_thread_event_breakpoints): Likewise.
4878 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4879 as saved_thread.
4880 * target.h (set_desired_inferior): Renamed as...
4881 (set_desired_thread): New declaration. All uses updated.
4882 * server.c (myresume): Updated comment to reference thread instead
4883 of inferior.
4884 (handle_serial_event): Likewise.
4885 (handle_target_event): Likewise.
4886
361c8ade
GB
48872014-09-12 Tom Tromey <tromey@redhat.com>
4888 Gary Benson <gbenson@redhat.com>
4889
4890 * regcache.h: Include common-regcache.h.
4891 (regcache_read_pc): Don't declare.
4892 * regcache.c (get_thread_regcache_for_ptid): New function.
4893
bd9269f7
GB
48942014-09-11 Tom Tromey <tromey@redhat.com>
4895 Gary Benson <gbenson@redhat.com>
4896
4897 * symbol.c: New file.
4898 * Makefile.in (SFILES): Add symbol.c.
4899 (OBS): Add symbol.o.
4900
f8c1d06b
GB
49012014-09-11 Gary Benson <gbenson@redhat.com>
4902
4903 * target.c (target_stop_ptid, target_continue_ptid): New
4904 functions.
4905
721ec300
GB
49062014-09-11 Tom Tromey <tromey@redhat.com>
4907 Gary Benson <gbenson@redhat.com>
4908
4909 * target.h: Include target/target.h.
4910 * target.c (target_read_memory, target_read_uint32)
4911 (target_write_memory): New functions.
4912
c5e92cca
GB
49132014-09-11 Gary Benson <gbenson@redhat.com>
4914
4915 * server.h (debug_hw_points): Don't declare.
4916 * server.c (debug_hw_points): Don't define. Replace all uses
4917 with show_debug_regs.
4918 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4919 all uses with show_debug_regs.
4920
2e4bb98a
EBM
49212014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4922
4923 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4924 endianness into account.
4925 (ppc_supply_ptrace_register): Likewise.
4926
ac740bc7
JH
49272014-09-03 James Hogan <james.hogan@imgtec.com>
4928
4929 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4930 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4931
97ea6506
GB
49322014-09-03 Gary Benson <gbenson@redhat.com>
4933
4934 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4935 ALL_DEBUG_ADDRESS_REGISTERS.
4936
df7e5265
GB
49372014-09-02 Gary Benson <gbenson@redhat.com>
4938
4939 * i386-low.h: Renamed as...
4940 * x86-low.h: New file. All type, function and variable name
4941 prefixes changed from "i386_" to "x86_". All references updated.
4942 * i386-low.c: Renamed as...
4943 * x86-low.c: New file. All type, function and variable name
4944 prefixes changed from "i386_" to "x86_". All references updated.
4945
ed859da7
GB
49462014-09-02 Gary Benson <gbenson@redhat.com>
4947
4948 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4949 (x86_linux_new_thread): Likewise.
4950
860789c7
GB
49512014-08-29 Gary Benson <gbenson@redhat.com>
4952
4953 * server.h (setjmp.h): Do not include.
4954 (toplevel): Do not declare.
4955 (common-exceptions.h): Include.
4956 (cleanups.h): Likewise.
4957 * server.c (toplevel): Do not define.
4958 (exit_code): New static global.
4959 (detach_or_kill_for_exit_cleanup): New function.
4960 (main): New function. Original main renamed to...
4961 (captured_main): New function.
4962 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4963
ff55e1b5
GB
49642014-08-29 Gary Benson <gbenson@redhat.com>
4965
4966 * Makefile.in (SFILES): Add common/common-exceptions.c.
4967 (OBS): Add common-exceptions.o.
4968 (common-exceptions.o): New rule.
4969 * utils.c (prepare_to_throw_exception): New function.
4970
e9bcb658
GB
49712014-08-29 Gary Benson <gbenson@redhat.com>
4972
4973 * config.in: Regenerate.
4974 * configure: Likewise.
4975
e3180625
GB
49762014-08-29 Gary Benson <gbenson@redhat.com>
4977
4978 * Makefile.in (SFILES): Add common/cleanups.c.
4979 (OBS): cleanups.o.
4980 (cleanups.o): New rule.
4981
e3d6ba5d
GB
49822014-08-29 Gary Benson <gbenson@redhat.com>
4983
4984 * utils.c (internal_vwarning): New function.
4985
7096e886
GB
49862014-08-28 Gary Benson <gbenson@redhat.com>
4987
4988 * utils.h (fatal): Remove declaration.
4989 * utils.c (fatal): Remove function.
4990
14ce3192
GB
49912014-08-28 Gary Benson <gbenson@redhat.com>
4992
4993 * tracepoint.c (gdb_agent_init): Replace fatal with
4994 perror_with_name.
4995 (initialize_tracepoint): Likewise.
4996
50278d59
GB
49972014-08-28 Gary Benson <gbenson@redhat.com>
4998
4999 * remote-utils.c (remote_prepare): Replace fatal with error.
5000
aa96c426
GB
50012014-08-28 Gary Benson <gbenson@redhat.com>
5002
5003 * linux-low.c (linux_async): Replace fatal with warning.
5004 Tidy up and return.
5005 (linux_start_non_stop): Return -1 if linux_async failed.
5006
f7160e97
GB
50072014-08-28 Gary Benson <gbenson@redhat.com>
5008
5009 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5010 gdb_assert.
5011 (i386_dr_low_get_addr): Remove vague comment.
5012 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5013 gdb_assert.
5014
38e08fca
GB
50152014-08-28 Gary Benson <gbenson@redhat.com>
5016
5017 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5018 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5019 internal_error.
5020 (linux_resume_one_lwp): Likewise.
5021 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5022 gdb_assert.
5023 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5024 with internal_error.
5025 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5026 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5027 (find_register_by_name): Replace fatal with internal_error.
5028 (find_regno): Likewise.
5029 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5030 * thread-db.c (thread_db_create_event): Likewise.
5031 (thread_db_load_search): Likewise.
5032 (try_thread_db_load_1): Likewise.
5033 * tracepoint.c (get_jump_space_head): Replace fatal with
5034 internal_error.
5035 (claim_trampoline_space): Likewise.
5036 (have_fast_tracepoint_trampoline_buffer): Likewise.
5037 (cmd_qtstart): Likewise.
5038 (stop_tracing): Likewise.
5039 (fast_tracepoint_collecting): Likewise.
5040 (target_malloc): Likewise.
5041 (download_tracepoint): Likewise.
5042 (download_trace_state_variables): Replace check with gdb_assert.
5043 (upload_fast_traceframes): Replace fatal with internal_error.
5044
34abf635
GB
50452014-08-19 Tom Tromey <tromey@redhat.com>
5046 Gary Benson <gbenson@redhat.com>
5047
5048 * Makefile.in (SFILES): Add common/common-debug.c.
5049 (OBS): Add common-debug.o.
5050 (common-debug.o): New rule.
5051 * debug.h (debug_printf): Don't declare.
5052 * debug.c (debug_printf): Renamed and rewritten as...
5053 (debug_vprintf): New function.
5054
f6e94d78
GB
50552014-08-19 Gary Benson <gbenson@redhat.com>
5056
5057 * utils.h: Do not include print-utils.h.
5058
9239eeab
GB
50592014-08-19 Tom Tromey <tromey@redhat.com>
5060 Gary Benson <gbenson@redhat.com>
5061
5062 * server.h: Add static assertion.
5063 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5064
ef87c8bb
GB
50652014-08-19 Tom Tromey <tromey@redhat.com>
5066 Gary Benson <gbenson@redhat.com>
5067
5068 * Makefile.in (SFILES): Add common/errors.c.
5069 (OBS): Add errors.o.
5070 (IPA_OBS): Add errors-ipa.o.
5071 (errors.o): New rule.
5072 (errors-ipa.o): Likewise.
5073 * utils.h (perror_with_name, error, warning): Don't declare.
5074 * utils.c (warning): Renamed and rewritten as...
5075 (vwarning): New function.
5076 (error): Renamed and rewritten as...
5077 (verror): New function.
5078 (internal_error): Renamed and rewritten as...
5079 (internal_verror): New function.
5080
bb974a24
GB
50812014-08-07 Gary Benson <gbenson@redhat.com>
5082
5083 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5084 * configure: Regenerate.
5085 * config.in: Likewise.
5086 * server.h: Do not include errno.h.
5087 * event-loop.c: Likewise.
5088 * hostio-errno.c: Likewise.
5089 * linux-low.c: Likewise.
5090 * remote-utils.c: Likewise.
5091 * spu-low.c: Likewise.
5092 * utils.c: Likewise.
5093 * gdbreplay.c: Unconditionally include errno.h.
5094
6d3d12eb
GB
50952014-08-07 Gary Benson <gbenson@redhat.com>
5096
5097 * server.h: Do not include string.h.
5098 * event-loop.c: Likewise.
5099 * linux-low.c: Likewise.
5100 * regcache.c: Likewise.
5101 * remote-utils.c: Likewise.
5102 * spu-low.c: Likewise.
5103 * utils.c: Likewise.
5104
dccbb609
GB
51052014-08-07 Gary Benson <gbenson@redhat.com>
5106
5107 * server.h: Do not include gdb_assert.h.
5108
e76df0d0
GB
51092014-08-07 Gary Benson <gbenson@redhat.com>
5110
5111 * server.h: Do not include common-utils.h.
5112
4cb9c816
GB
51132014-08-07 Gary Benson <gbenson@redhat.com>
5114
5115 * server.h: Do not include ptid.h.
5116 * notif.h: Likewise.
5117
3995eeee
GB
51182014-08-07 Gary Benson <gbenson@redhat.com>
5119
5120 * server.h: Do not include gdb_locale.h.
5121
cb9f1a9b
GB
51222014-08-07 Gary Benson <gbenson@redhat.com>
5123
5124 * server.h: Do not include gdb/signals.h.
5125 * win32-low.c: Likewise.
5126
a5fceff8
GB
51272014-08-07 Gary Benson <gbenson@redhat.com>
5128
5129 * server.h: Do not include pathmax.h.
5130
b9391142
GB
51312014-08-07 Gary Benson <gbenson@redhat.com>
5132
5133 * server.h: Do not include libiberty.h.
5134 * linux-bfin-low.c: Likewise.
5135
0e443c87
GB
51362014-08-07 Gary Benson <gbenson@redhat.com>
5137
5138 * server.h: Do not include ansidecl.h.
5139
8ebb3f56
GB
51402014-08-07 Gary Benson <gbenson@redhat.com>
5141
5142 * linux-x86-low.c: Do not include stddef.h.
5143 * lynx-ppc-low.c: Likewise.
5144 * tracepoint.c: Likewise.
5145
8980bdf6
GB
51462014-08-07 Gary Benson <gbenson@redhat.com>
5147
5148 * server.h: Do not include stdarg.h.
5149 * nto-low.c: Likewise.
5150
d7096f71
GB
51512014-08-07 Gary Benson <gbenson@redhat.com>
5152
5153 * server.h: Do not include stdlib.h.
5154 * inferiors.c: Likewise.
5155 * linux-low.c: Likewise.
5156 * regcache.c: Likewise.
5157 * spu-low.c: Likewise.
5158 * tracepoint.c: Likewise.
5159 * utils.c: Likewise.
5160
d02f550d
GB
51612014-08-07 Gary Benson <gbenson@redhat.com>
5162
5163 * server.h: Do not include stdio.h.
5164 * linux-low.c: Likewise.
5165 * remote-utils.c: Likewise.
5166 * spu-low.c: Likewise.
5167 * utils.c: Likewise.
5168 * wincecompat.c: Likewise.
5169
87f6c4e3
GB
51702014-08-06 Gary Benson <gbenson@redhat.com>
5171
5172 * regcache.c (init_register_cache): Move conditionals inside if.
5173
7089dca4
GB
51742014-08-06 Gary Benson <gbenson@redhat.com>
5175
5176 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5177
462f517e
GB
51782014-07-31 Gary Benson <gbenson@redhat.com>
5179
5180 * ax.h: Do not include server.h.
5181 * gdbthread.h: Likewise.
5182 * lynx-low.h: Likewise.
5183 * notif.h: Likewise.
5184
976411d6
GB
51852014-07-30 Gary Benson <gbenson@redhat.com>
5186
5187 * server.h: Include common-defs.h.
5188 Do not include config.h or build-gnulib-gdbserver/config.h.
5189
d41f6d8e
GB
51902014-07-30 Gary Benson <gbenson@redhat.com>
5191
5192 * hostio-errno.c: Move server.h to top of includes list.
5193 * inferiors.c: Likewise.
5194 * linux-x86-low.c: Likewise.
5195 * notif.c: Include server.h.
5196
314c6a35
TT
51972014-07-24 Tom Tromey <tromey@redhat.com>
5198 Gary Benson <gbenson@redhat.com>
5199
5200 * server.h (CORE_ADDR): Now unsigned.
5201
69ff6be5
PA
52022014-07-16 Pedro Alves <palves@redhat.com>
5203
5204 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5205
ce9e3fe7
PA
52062014-07-15 Pedro Alves <palves@redhat.com>
5207
5208 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5209 copy.
5210
e76126e8
PA
52112014-07-11 Pedro Alves <palves@redhat.com>
5212
5213 * linux-low.c (kill_wait_lwp): New function, based on
5214 kill_one_lwp_callback, but use my_waitpid directly.
5215 (kill_one_lwp_callback, linux_kill): Use it.
5216
8e9db26e
PA
52172014-06-23 Pedro Alves <palves@redhat.com>
5218
5219 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5220 before setting DR0..DR3.
5221
698b3e08
GB
52222014-06-20 Gary Benson <gbenson@redhat.com>
5223
5224 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5225 * configure: Regenerated.
5226 * config.in: Likewise.
5227
125f8a3d
GB
52282014-06-20 Gary Benson <gbenson@redhat.com>
5229
5230 * Makefile.in (SFILES): Update locations for files moved
5231 from common to nat.
5232 (object file files): Reordered.
5233
42995dbd
GB
52342014-06-20 Gary Benson <gbenson@redhat.com>
5235
5236 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5237 (i386_dr_low_set_addr): Likewise.
5238 (i386_dr_low_get_addr): Likewise.
5239 (i386_dr_low_can_set_control): Likewise.
5240 (i386_dr_low_set_control): Likewise.
5241 (i386_dr_low_get_control): Likewise.
5242 (i386_dr_low_get_status): Likewise.
5243 (i386_get_debug_register_length): Likewise.
5244 * linux-x86-low.c (i386_dr_low_set_addr):
5245 Changed signature. Made static.
5246 (i386_dr_low_get_addr): Likewise.
5247 (i386_dr_low_set_control): Likewise.
5248 (i386_dr_low_get_control): Likewise.
5249 (i386_dr_low_get_status): Likewise.
5250 (i386_dr_low): New global variable.
5251 * win32-i386-low.c (i386_dr_low_set_addr):
5252 Changed signature. Made static.
5253 (i386_dr_low_get_addr): Likewise.
5254 (i386_dr_low_set_control): Likewise.
5255 (i386_dr_low_get_control): Likewise.
5256 (i386_dr_low_get_status): Likewise.
5257 (i386_dr_low): New global variable.
5258
e1d2394b
MS
52592014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5260
5261 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5262 * Makefile.in (AR, AR_FLAGS): Define.
5263 * configure: Regenerate.
5264
3a8ee006
GB
52652014-06-19 Gary Benson <gbenson@redhat.com>
5266
5267 * Makefile.in (i386-dregs.o): New rule.
5268 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5269 * i386-low.c (target.h): Remove include.
5270 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5271 (DR_CONTROL_SHIFT): Likewise.
5272 (DR_CONTROL_SIZE): Likewise.
5273 (DR_RW_EXECUTE): Likewise.
5274 (DR_RW_WRITE): Likewise.
5275 (DR_RW_READ): Likewise.
5276 (DR_RW_IORW): Likewise.
5277 (DR_LEN_1): Likewise.
5278 (DR_LEN_2): Likewise.
5279 (DR_LEN_4): Likewise.
5280 (DR_LEN_8): Likewise.
5281 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5282 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5283 (DR_ENABLE_SIZE): Likewise.
5284 (DR_LOCAL_SLOWDOWN): Likewise.
5285 (DR_GLOBAL_SLOWDOWN): Likewise.
5286 (DR_CONTROL_RESERVED): Likewise.
5287 (I386_DR_CONTROL_MASK): Likewise.
5288 (I386_DR_VACANT): Likewise.
5289 (I386_DR_LOCAL_ENABLE): Likewise.
5290 (I386_DR_GLOBAL_ENABLE): Likewise.
5291 (I386_DR_DISABLE): Likewise.
5292 (I386_DR_SET_RW_LEN): Likewise.
5293 (I386_DR_GET_RW_LEN): Likewise.
5294 (I386_DR_WATCH_HIT): Likewise.
5295 (i386_wp_op_t): Likewise.
5296 (i386_show_dr): Likewise.
5297 (i386_length_and_rw_bits): Likewise.
5298 (i386_insert_aligned_watchpoint): Likewise.
5299 (i386_remove_aligned_watchpoint): Likewise.
5300 (i386_handle_nonaligned_watchpoint): Likewise.
5301 i386_update_inferior_debug_regs(): Likewise.
5302 (i386_dr_insert_watchpoint): Likewise.
5303 (i386_dr_remove_watchpoint): Likewise.
5304 (i386_dr_region_ok_for_watchpoint): Likewise.
5305 (i386_dr_stopped_data_address): Likewise.
5306 (i386_dr_stopped_by_watchpoint): Likewise.
5307
8f26655c
GB
53082014-06-19 Gary Benson <gbenson@redhat.com>
5309
5310 * i386-low.c (i386_dr_show): Renamed to
5311 i386_show_dr and made static. All uses updated.
5312 (i386_dr_length_and_rw_bits): Renamed to
5313 i386_length_and_rw_bits and made static.
5314 All uses updated.
5315 (i386_dr_insert_aligned_watchpoint): Renamed to
5316 i386_insert_aligned_watchpoint and made static.
5317 All uses updated.
5318 (i386_dr_remove_aligned_watchpoint): Renamed to
5319 i386_remove_aligned_watchpoint and made static.
5320 All uses updated.
5321 (i386_dr_update_inferior_debug_regs): Renamed to
5322 i386_update_inferior_debug_regs and made static.
5323 All uses updated.
5324
b9228891
GB
53252014-06-18 Gary Benson <gbenson@redhat.com>
5326
5171def3
GB
5327 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5328 (i386_dr_low_can_set_control): Likewise.
5329 (i386_get_debug_register_length): Likewise.
5330 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5331 (i386_dr_low_can_set_control): Likewise.
5332 (i386_get_debug_register_length): Likewise.
5333
53342014-06-17 Gary Benson <gbenson@redhat.com>
5335
b9228891
GB
5336 * i386-low.h (i386-dregs.h): New include.
5337 (DR_FIRSTADDR): Now in i386-dregs.h.
5338 (DR_LASTADDR): Likewise.
5339 (DR_NADDR): Likewise.
5340 (DR_STATUS): Likewise.
5341 (DR_CONTROL): Likewise.
5342 (i386_debug_reg_state): Likewise.
5343 (i386_dr_insert_watchpoint): Likewise.
5344 (i386_dr_remove_watchpoint): Likewise.
5345 (i386_dr_region_ok_for_watchpoint): Likewise.
5346 (i386_dr_stopped_data_address): Likewise.
5347 (i386_dr_stopped_by_watchpoint): Likewise.
5348 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5349
4be83cc2
GB
53502014-06-18 Gary Benson <gbenson@redhat.com>
5351
5352 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5353 i386_dr_insert_watchpoint.
5354 (i386_low_remove_watchpoint): Renamed to
5355 i386_dr_remove_watchpoint.
5356 (i386_low_region_ok_for_watchpoint): Renamed to
5357 i386_dr_region_ok_for_watchpoint.
5358 (i386_low_stopped_data_address): Renamed to
5359 i386_dr_stopped_data_address.
5360 (i386_low_stopped_by_watchpoint): Renamed to
5361 i386_dr_stopped_by_watchpoint.
5362 * i386-low.c (i386_show_dr): Renamed to
5363 i386_dr_show and made nonstatic. All uses updated.
5364 (i386_length_and_rw_bits): Renamed to
5365 i386_dr_length_and_rw_bits and made nonstatic.
5366 All uses updated.
5367 (i386_insert_aligned_watchpoint): Renamed to
5368 i386_dr_insert_aligned_watchpoint and made nonstatic.
5369 All uses updated.
5370 (i386_remove_aligned_watchpoint): Renamed to
5371 i386_dr_remove_aligned_watchpoint and made nonstatic.
5372 All uses updated.
5373 (i386_update_inferior_debug_regs): Renamed to
5374 i386_dr_update_inferior_debug_regs and made nonstatic.
5375 All uses updated.
5376 (i386_low_insert_watchpoint): Renamed to
5377 i386_dr_insert_watchpoint. All uses updated.
5378 (i386_low_remove_watchpoint): Renamed to
5379 i386_dr_remove_watchpoint. All uses updated.
5380 (i386_low_region_ok_for_watchpoint): Renamed to
5381 i386_dr_region_ok_for_watchpoint. All uses updated.
5382 (i386_low_stopped_data_address): Renamed to
5383 i386_dr_stopped_data_address. All uses updated.
5384 (i386_low_stopped_by_watchpoint): Renamed to
5385 i386_dr_stopped_by_watchpoint. All uses updated.
5386
131aa0d4
GB
53872014-06-18 Gary Benson <gbenson@redhat.com>
5388
5389 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5390 (i386_dr_low_can_set_control): Likewise.
5391 (i386_insert_aligned_watchpoint): New check.
5392
d9305f7f
GB
53932014-06-18 Gary Benson <gbenson@redhat.com>
5394
5395 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5396 Renamed to state.
5397
e927c9fc
GB
53982014-06-18 Gary Benson <gbenson@redhat.com>
5399
5400 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5401 instead of fatal and error.
5402 (i386_handle_nonaligned_watchpoint): Likewise.
5403
1b6d4134
GB
54042014-06-18 Gary Benson <gbenson@redhat.com>
5405
5406 * i386-low.c (i386_get_debug_register_length): New macro.
5407 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5408 (i386_show_dr): Use debug_printf instead of fprintf. Use
5409 phex to format values.
5410
6e62758f
GB
54112014-06-18 Gary Benson <gbenson@redhat.com>
5412
5413 * i386-low.h: Comment changes.
5414 * i386-low.c: Likewise.
5415
fc6e2f03
GB
54162014-06-18 Gary Benson <gbenson@redhat.com>
5417
5418 * i386-low.c: Whitespace changes.
5419
f9d1eeed
TT
54202014-06-12 Tom Tromey <tromey@redhat.com>
5421
5422 * utils.c (freeargv): Remove.
5423
0b04e523
TT
54242014-06-12 Tom Tromey <tromey@redhat.com>
5425
5426 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5427 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5428 (parse_debug_format_options): Likewise.
5429 (gdbserver_usage): Likewise.
5430 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5431 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5432 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5433 against libiberty.
5434 ($(LIBGNU)): Depend on libiberty.
5435 (all-lib): Recurse into all subdirs.
5436 (install-only): Invoke "install" target in subdirs.
5437 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5438 targets.
5439 * configure: Rebuild.
5440 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5441 for vasprintf, vsnprintf, or gettimeofday.
5442 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5443 srv_tgtobj.
5444
270c9937
JB
54452014-06-05 Joel Brobecker <brobecker@adacore.com>
5446
5447 * development.sh: Delete.
5448 * Makefile.in (config.status): Adjust dependency on development.sh.
5449 * configure.ac: Adjust development.sh source call.
5450 * configure: Regenerate.
5451
0a261ed8
PA
54522014-06-02 Pedro Alves <palves@redhat.com>
5453
5454 * ax.c (gdb_free_agent_expr): New function.
5455 * ax.h (gdb_free_agent_expr): New declaration.
5456 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5457 list.
5458 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5459 static.
5460 (clear_breakpoint_conditions_and_commands): New function.
5461 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5462 (clear_breakpoint_conditions_and_commands): New declaration.
5463
e9dae05e
RR
54642014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5465
5466 * linux-aarch64-low.c (asm/ptrace.h): Include.
5467
5876f503
JK
54682014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5469
5470 Fix TLS access for -static -pthread.
5471 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5472 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5473 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5474
802e8e6d
PA
54752014-05-20 Pedro Alves <palves@redhat.com>
5476
5477 * linux-aarch64-low.c (aarch64_insert_point)
5478 (aarch64_remove_point): No longer check whether the type is
5479 supported here. Adjust to new interface.
5480 (the_low_target): Install aarch64_supports_z_point_type as
5481 supports_z_point_type method.
5482 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5483 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5484 instead of a Z packet char. Adjust.
5485 (arm_supports_z_point_type): New function.
5486 (arm_insert_point, arm_remove_point): Adjust to new interface.
5487 (the_low_target): Install arm_supports_z_point_type.
5488 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5489 (cris_insert_point, cris_remove_point): Adjust to new interface.
5490 Don't check whether the type is supported here.
5491 (the_low_target): Install cris_supports_z_point_type.
5492 * linux-low.c (linux_supports_z_point_type): New function.
5493 (linux_insert_point, linux_remove_point): Adjust to new interface.
5494 * linux-low.h (struct linux_target_ops) <insert_point,
5495 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5496 raw_breakpoint pointer parameter.
5497 <supports_z_point_type>: New method.
5498 * linux-mips-low.c (mips_supports_z_point_type): New function.
5499 (mips_insert_point, mips_remove_point): Adjust to new interface.
5500 Use mips_supports_z_point_type.
5501 (the_low_target): Install mips_supports_z_point_type.
5502 * linux-ppc-low.c (the_low_target): Install NULL as
5503 supports_z_point_type method.
5504 * linux-s390-low.c (the_low_target): Install NULL as
5505 supports_z_point_type method.
5506 * linux-sparc-low.c (the_low_target): Install NULL as
5507 supports_z_point_type method.
5508 * linux-x86-low.c (x86_supports_z_point_type): New function.
5509 (x86_insert_point): Adjust to new insert_point interface. Use
5510 insert_memory_breakpoint. Adjust to new
5511 i386_low_insert_watchpoint interface.
5512 (x86_remove_point): Adjust to remove_point interface. Use
5513 remove_memory_breakpoint. Adjust to new
5514 i386_low_remove_watchpoint interface.
5515 (the_low_target): Install x86_supports_z_point_type.
5516 * lynx-low.c (lynx_target_ops): Install NULL as
5517 supports_z_point_type callback.
5518 * nto-low.c (nto_supports_z_point_type): New.
5519 (nto_insert_point, nto_remove_point): Adjust to new interface.
5520 (nto_target_ops): Install nto_supports_z_point_type.
5521 * mem-break.c: Adjust intro comment.
5522 (struct raw_breakpoint) <raw_type, size>: New fields.
5523 <inserted>: Update comment.
5524 <shlib_disabled>: Delete field.
5525 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5526 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5527 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5528 (raw_bkpt_type_to_target_hw_bp_type): New function.
5529 (find_enabled_raw_code_breakpoint_at): New function.
5530 (find_raw_breakpoint_at): New type and size parameters. Use them.
5531 (insert_memory_breakpoint): New function, based off
5532 set_raw_breakpoint_at.
5533 (remove_memory_breakpoint): New function.
5534 (set_raw_breakpoint_at): Reimplement.
5535 (set_breakpoint): New, based on set_breakpoint_at.
5536 (set_breakpoint_at): Reimplement.
5537 (delete_raw_breakpoint): Go through the_target->remove_point
5538 instead of assuming memory breakpoints.
5539 (find_gdb_breakpoint_at): Delete.
5540 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5541 (find_gdb_breakpoint): New function.
5542 (set_gdb_breakpoint_at): Delete.
5543 (z_type_supported): New function.
5544 (set_gdb_breakpoint_1): New function, loosely based off
5545 set_gdb_breakpoint_at.
5546 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5547 (delete_gdb_breakpoint_at): Delete.
5548 (delete_gdb_breakpoint_1): New function, loosely based off
5549 delete_gdb_breakpoint_at.
5550 (delete_gdb_breakpoint): New function.
5551 (clear_gdb_breakpoint_conditions): Rename to ...
5552 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5553 breakpoint.
5554 (add_condition_to_breakpoint): Make static.
5555 (add_breakpoint_condition): Take a struct breakpoint pointer
5556 instead of an address. Adjust.
5557 (gdb_condition_true_at_breakpoint): Rename to ...
5558 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5559 z_type parameter.
5560 (gdb_condition_true_at_breakpoint): Reimplement.
5561 (add_breakpoint_commands): Take a struct breakpoint pointer
5562 instead of an address. Adjust.
5563 (gdb_no_commands_at_breakpoint): Rename to ...
5564 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5565 parameter. Return true if no breakpoint was found. Change debug
5566 output.
5567 (gdb_no_commands_at_breakpoint): Reimplement.
5568 (run_breakpoint_commands): Rename to ...
5569 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5570 and change return type to boolean.
5571 (run_breakpoint_commands): New function.
5572 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5573 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5574 breakpoint. Go through the_target->remove_point instead of
5575 assuming memory breakpoint.
5576 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5577 software and hardware breakpoints.
5578 (reinsert_raw_breakpoint): Go through the_target->insert_point
5579 instead of assuming memory breakpoint.
5580 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5581 software and hardware breakpoints.
5582 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5583 Check both software and hardware breakpoints.
5584 (validate_inserted_breakpoint): Assert the breakpoint is a
5585 software breakpoint. Set the inserted flag to -1 instead of
5586 setting shlib_disabled.
5587 (delete_disabled_breakpoints): Adjust.
5588 (validate_breakpoints): Only validate software breakpoints.
5589 Adjust to inserted flag change.
5590 (check_mem_read, check_mem_write): Skip breakpoint types other
5591 than software breakpoints. Adjust to inserted flag change.
5592 * mem-break.h (enum raw_bkpt_type): New enum.
5593 (raw_breakpoint, struct process_info): Forward declare.
5594 (Z_packet_to_target_hw_bp_type): Delete declaration.
5595 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5596 (set_gdb_breakpoint, delete_gdb_breakpoint)
5597 (clear_breakpoint_conditions): New declarations.
5598 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5599 (breakpoint_inserted_here): Update comment.
5600 (add_breakpoint_condition, add_breakpoint_commands): Replace
5601 address parameter with a breakpoint pointer parameter.
5602 (gdb_breakpoint_here): Update comment.
5603 (delete_gdb_breakpoint_at): Delete.
5604 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5605 * server.c (process_point_options): Take a struct breakpoint
5606 pointer instead of an address. Adjust.
5607 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5608 delete_gdb_breakpoint.
5609 * spu-low.c (spu_target_ops): Install NULL as
5610 supports_z_point_type method.
5611 * target.h: Include mem-break.h.
5612 (struct target_ops) <prepare_to_access_memory>: Update comment.
5613 <supports_z_point_type>: New field.
5614 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5615 instead of a char. Also take a raw breakpoint pointer.
5616 * win32-arm-low.c (the_low_target): Install NULL as
5617 supports_z_point_type.
5618 * win32-i386-low.c (i386_supports_z_point_type): New function.
5619 (i386_insert_point, i386_remove_point): Adjust to new interface.
5620 (the_low_target): Install i386_supports_z_point_type.
5621 * win32-low.c (win32_supports_z_point_type): New function.
5622 (win32_insert_point, win32_remove_point): Adjust to new interface.
5623 (win32_target_ops): Install win32_supports_z_point_type.
5624 * win32-low.h (struct win32_target_ops):
5625 <supports_z_point_type>: New method.
5626 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5627 instead of a char. Also take a raw breakpoint pointer.
5628
932539e3
PA
56292014-05-20 Pedro Alves <palves@redhat.com>
5630
5631 * mem-break.h: Include break-common.h.
5632 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5633 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5634 (Z_packet_to_target_hw_bp_type): New declaration.
5635 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5636 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5637 (Z_PACKET_ACCESS_WP): Delete macros.
5638 (Z_packet_to_hw_type): Delete function.
5639 * i386-low.h: Don't include break-common.h here.
5640 (Z_packet_to_hw_type): Delete declaration.
5641 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5642 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5643 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5644 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5645 * linux-aarch64-low.c: Don't include break-common.h here.
5646 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5647 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5648 (Z_packet_to_target_hw_bp_type): Delete function.
5649 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5650 function.
5651 (mips_insert_point, mips_remove_point): Use
5652 Z_packet_to_target_hw_bp_type.
5653
4ff0d3d8
PA
56542014-05-20 Pedro Alves <palves@redhat.com>
5655
5656 * linux-aarch64-low.c: Include break-common.h.
5657 (enum target_point_type): Delete.
5658 (Z_packet_to_point_type): Rename to ...
5659 (Z_packet_to_target_hw_bp_type): ... this, and return a
5660 target_hw_bp_type instead.
5661 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5662 instead of an enum target_point_type.
5663 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5664 breakpoint type.
5665 (aarch64_dr_state_insert_one_point)
5666 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5667 (aarch64_handle_aligned_watchpoint)
5668 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5669 Take an enum target_hw_bp_type instead of an enum
5670 target_point_type.
5671 (aarch64_supports_z_point_type): New function.
5672 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5673 use Z_packet_to_target_hw_bp_type.
5674
786dc519
JB
56752014-05-20 Joel Brobecker <brobecker@adacore.com>
5676
5677 * configure.ac: Only use -Werror by default when DEVELOPMENT
5678 is true.
5679 * configure: Regenerate.
5680
9e0aa64f
JK
56812014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5682
5683 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5684 * linux-x86-low.c (X86_64_USER_REGS): New.
5685 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5686
2b577b92
YQ
56872014-04-28 Yao Qi <yao@codesourcery.com>
5688
5689 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5690 name.
5691
94611da2
PA
56922014-04-25 Pedro Alves <palves@redhat.com>
5693
5694 PR server/16255
5695 * linux-low.c (linux_attach_fail_reason_string): New function.
5696 (linux_attach_lwp): Delete.
5697 (linux_attach_lwp_1): Rename to ...
5698 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5699 argument. Remove "initial" parameter. Return int instead of
5700 void. Don't error or warn here.
5701 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5702 failure to attach to the tgid. Call warning when failing to
5703 attach to an lwp.
5704 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5705 argument. Remove "initial" parameter. Return int instead of
5706 void. Don't error or warn here.
5707 (linux_attach_fail_reason_string): New declaration.
5708 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5709 interface change. Use linux_attach_fail_reason_string.
5710
01f9f808
MS
57112014-04-24 Michael Sturm <michael.sturm@mintel.com>
5712 Walfred Tedeschi <walfred.tedeschi@intel.com>
5713
5714 * Makefile.in: Added rules to handle new files
5715 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5716 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5717 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5718 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5719 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5720 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5721 x32-avx512-linux.o.
5722 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5723 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5724 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5725 i386/x32-avx512.xml.
5726 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5727 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5728 i386/x32-avx512-linux.xml.
5729 * i387-fp.c (num_avx512_k_registers): New constant for number
5730 of K registers.
5731 (num_avx512_zmmh_low_registers): New constant for number of
5732 lower ZMM registers (0-15).
5733 (num_avx512_zmmh_high_registers): New constant for number of
5734 higher ZMM registers (16-31).
5735 (num_avx512_ymmh_registers): New contant for number of higher
5736 YMM registers (ymm16-31 added by avx521 on x86_64).
5737 (num_avx512_xmm_registers): New constant for number of higher
5738 XMM registers (xmm16-31 added by AVX512 on x86_64).
5739 (struct i387_xsave): Add space for AVX512 registers.
5740 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5741 Add code to handle AVX512 registers.
5742 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5743 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5744 prototypei from generated file.
5745 (tdesc_amd64_avx512_linux): Likewise.
5746 (init_registers_x32_avx512_linux): Likewise.
5747 (tdesc_x32_avx512_linux): Likewise.
5748 (init_registers_i386_avx512_linux): Likewise.
5749 (tdesc_i386_avx512_linux): Likewise.
5750 (x86_64_regmap): Add AVX512 registers.
5751 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5752 mask.
5753 (initialize_low_arch): Add code to initialize AVX512 registers.
5754
51aa91f9
PA
57552014-04-23 Pedro Alves <palves@redhat.com>
5756
5757 * mem-break.c (find_gdb_breakpoint_at): Make static.
5758 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5759
a4165e94
PA
57602014-04-23 Pedro Alves <palves@redhat.com>
5761
5762 * i386-low.c: Don't include break-common.h here.
5763 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5764 prototype to take target_hw_bp_type as argument instead of a Z
5765 packet char.
5766 * i386-low.h: Include break-common.h here.
5767 (Z_packet_to_hw_type): Declare.
5768 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5769 prototypes.
5770 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5771 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5772 (x86_remove_point): Convert the packet number to a
5773 target_hw_bp_type before calling i386_low_remove_watchpoint.
5774 * win32-i386-low.c (i386_insert_point): Convert the packet number
5775 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5776 (i386_remove_point): Convert the packet number to a
5777 target_hw_bp_type before calling i386_low_remove_watchpoint.
5778
b8acf843
PA
57792014-04-23 Pedro Alves <palves@redhat.com>
5780
5781 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5782
d708bcd1
PA
57832014-04-10 Pedro Alves <palves@redhat.com>
5784
5785 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5786 Check if the condition or command is NULL before checking if the
5787 breakpoint is known. On success, return true.
5788 * mem-break.h (add_breakpoint_condition): Document return.
5789 (add_breakpoint_commands): Add describing comment.
5790 * server.c (skip_to_semicolon): New function.
5791 (process_point_options): Use it.
5792
2eec7d5b
PA
57932014-04-09 Pedro Alves <palves@redhat.com>
5794
5795 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5796 to lwpid_of.
5797
fa96cb38
PA
57982014-02-27 Pedro Alves <palves@redhat.com>
5799
5800 PR 12702
5801 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5802 macros.
5803 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5804 output.
5805 (last_thread_of_process_p): Take a PID argument instead of a
5806 thread pointer.
5807 (linux_wait_for_lwp): Delete.
5808 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5809 functions.
5810 (linux_low_filter_event): New function, party factored out from
5811 linux_wait_for_event.
5812 (linux_wait_for_event): Rename to ...
5813 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5814 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5815 sigsuspend. Check for zombie leaders.
5816 (linux_wait_for_event): Reimplement as wrapper around
5817 linux_wait_for_event_filtered.
5818 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5819 a normal or signal exit is seen, it's the whole process exiting.
5820 (wait_for_sigstop): No longer a for_each_inferior callback.
5821 Rewrite on top of linux_wait_for_event_filtered.
5822 (stop_all_lwps): Call wait_for_sigstop directly.
5823 * server.c (resume, handle_target_event): Handle
5824 TARGET_WAITKIND_NO_RESUMED.
5825
d763de10
JB
58262014-02-26 Joel Brobecker <brobecker@adacore.com>
5827
5828 * win32-low.c (psapi_get_dll_name,
5829 * win32_CreateToolhelp32Snapshot): Delete.
5830 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5831 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5832 Delete.
5833 (handle_load_dll): Add function description.
5834 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5835
850a0f76
JB
58362014-02-26 Joel Brobecker <brobecker@adacore.com>
5837
5838 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5839 Add comment.
5840 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5841 base address when calling win32_add_one_solib.
5842 (handle_load_dll): Delete local variable load_addr.
5843 Remove 0x1000 offset applied to DLL base address when calling
5844 win32_add_one_solib.
5845 (handle_unload_dll): Add comment.
5846
f25b3fc3
JB
58472014-02-26 Joel Brobecker <brobecker@adacore.com>
5848
5849 * win32-low.c (win32_add_all_dlls): Renames
5850 win32_ensure_ntdll_loaded. Rewrite function documentation.
5851 Adjust implementation to always load all DLLs.
5852 Add 0x1000 offset to DLL base address when calling
5853 win32_add_one_solib.
5854 (child_initialization_done): New static global.
5855 (do_initial_child_stuff): Set child_initialization_done to
5856 zero during child initialization, and 1 after. Replace call
5857 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5858 Add comment.
5859 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5860 (handle_unload_dll): Add function documentation.
5861 (get_child_debug_event): Ignore load and unload DLL events
5862 during child initialization.
5863
d86d4aaf
DE
58642014-02-20 Doug Evans <dje@google.com>
5865
3bc32da3 5866 Remove global all_lwps.
d86d4aaf
DE
5867 * inferiors.h (ptid_of): Move here from linux-low.h.
5868 (pid_of, lwpid_of): Ditto.
5869 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5870 parameter is a struct thread_info * now.
5871 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5872 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5873 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5874 directly.
5875 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5876 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5877 * linux-arm-low.c (update_registers_callback): Update, "entry"
5878 parameter is a struct thread_info * now.
5879 Fetch lwpid from current_inferior directly.
5880 (arm_insert_point): Pass &all_threads to find_inferior instead of
5881 &all_lwps.
5882 (arm_remove_point): Ditto.
5883 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5884 (arm_prepare_to_resume): Fetch pid from thread.
5885 (arm_read_description): Fetch lwpid from current_inferior directly.
5886 * linux-low.c (all_lwps): Delete.
5887 (delete_lwp): Delete call to remove_inferior.
5888 (handle_extended_wait): Fetch lwpid from thread.
5889 (add_lwp): Don't set lwp->entry.id. Remove call to
5890 add_inferior_to_list.
5891 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5892 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5893 (kill_one_lwp_callback): Ditto.
5894 (linux_kill): Don't dereference NULL pointer.
5895 Fetch ptid,lwpid from thread.
5896 (get_detach_signal): Fetch ptid from thread.
5897 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5898 Simplify call to regcache_invalidate_thread.
5899 (delete_lwp_callback): Update, "entry" parameter is a
5900 struct thread_info * now. Fetch pid from thread.
5901 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5902 (status_pending_p_callback): Update, "entry" parameter is a
5903 struct thread_info * now. Fetch ptid from thread.
5904 (find_lwp_pid): Update, "entry" parameter is a
5905 struct thread_info * now.
5906 (linux_wait_for_lwp): Fetch pid from thread.
5907 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5908 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5909 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5910 (dequeue_one_deferred_signal): Ditto.
5911 (cancel_breakpoint): Fetch ptid from current_inferior.
5912 (linux_wait_for_event): Pass &all_threads to find_inferior,
5913 not &all_lwps. Fetch ptid, lwpid from thread.
5914 (count_events_callback): Update, "entry" parameter is a
5915 struct thread_info * now.
5916 (select_singlestep_lwp_callback): Ditto.
5917 (select_event_lwp_callback): Ditto.
5918 (cancel_breakpoints_callback): Ditto.
5919 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5920 not &all_lwps.
5921 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5922 (unsuspend_one_lwp): Update, "entry" parameter is a
5923 struct thread_info * now.
5924 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5925 not &all_lwps.
5926 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5927 Fetch lwpid from thread, not lwp.
5928 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5929 Pass &all_threads to find_inferior, not &all_lwps.
5930 (send_sigstop): Fetch lwpid from thread, not lwp.
5931 (send_sigstop_callback): Update, "entry" parameter is a
5932 struct thread_info * now.
5933 (suspend_and_send_sigstop_callback): Ditto.
5934 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5935 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5936 struct thread_info * now.
5937 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5938 from thread, lwp.
5939 (lwp_running): Update, "entry" parameter is a
5940 struct thread_info * now.
5941 (stop_all_lwps): Fetch ptid from thread.
5942 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5943 (linux_resume_one_lwp): Fetch lwpid from thread.
5944 (linux_set_resume_request): Update, "entry" parameter is a
5945 struct thread_info * now. Fetch pid, lwpid from thread.
5946 (resume_status_pending_p): Update, "entry" parameter is a
5947 struct thread_info * now.
5948 (need_step_over_p): Ditto. Fetch lwpid from thread.
5949 (start_step_over): Fetch lwpid from thread.
5950 (linux_resume_one_thread): Update, "entry" parameter is a
5951 struct thread_info * now. Fetch lwpid from thread.
5952 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5953 (proceed_one_lwp): Update, "entry" parameter is a
5954 struct thread_info * now. Fetch lwpid from thread.
5955 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5956 struct thread_info * now.
5957 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5958 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5959 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5960 directly.
5961 (regsets_store_inferior_registers): Ditto.
5962 (fetch_register, store_register): Ditto.
5963 (linux_read_memory, linux_write_memory): Ditto.
5964 (linux_request_interrupt): Ditto.
5965 (linux_read_auxv): Ditto.
5966 (linux_xfer_siginfo): Ditto.
5967 (linux_qxfer_spu): Ditto.
5968 (linux_qxfer_libraries_svr4): Ditto.
5969 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5970 moved to inferiors.h.
5971 (get_lwp): Delete.
5972 (get_thread_lwp): Update.
5973 (struct lwp_info): Delete member "entry". Simplify comment for
5974 member "thread".
5975 (all_lwps): Delete.
5976 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5977 current_inferior directly.
5978 (update_watch_registers_callback): Update, "entry" parameter is a
5979 struct thread_info * now. Fetch pid from thread.
5980 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5981 (mips_insert_point): Fetch lwpid from current_inferior.
5982 Pass &all_threads to find_inferior, not &all_lwps.
5983 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5984 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5985 directly.
5986 (mips_stopped_data_address): Ditto.
5987 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5988 directly.
5989 * linux-tile-low.c (tile_arch_setup): Ditto.
5990 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5991 (update_debug_registers_callback): Update, "entry" parameter is a
5992 struct thread_info * now. Fetch pid from thread.
5993 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5994 Pass &all_threads to find_inferior, not &all_lwps.
5995 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5996 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5997 Pass &all_threads to find_inferior, not &all_lwps.
5998 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5999 (i386_dr_low_get_status): Ditto.
6000 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6001 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6002 (x86_linux_read_description): Ditto.
6003 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6004
3b8361aa
DE
60052014-02-20 Doug Evans <dje@google.com>
6006
6007 * inferiors.c (get_first_inferior): Fix buglet.
6008
f7667f0d
DE
60092014-02-19 Doug Evans <dje@google.com>
6010
6011 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6012 * inferiors.c (add_thread): Change result type to struct thread_info *.
6013 All callers updated.
6014 (add_lwp): Call add_thread here instead of in callers.
6015 All callers updated.
6016 * linux-low.h (get_lwp_thread): Rewrite.
6017 (struct lwp_info): New member "thread".
6018
b3312d80
DE
60192014-02-19 Doug Evans <dje@google.com>
6020
6021 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6022 All callers updated.
6023
ecc6f45c
DE
60242014-02-19 Doug Evans <dje@google.com>
6025
6026 * inferiors.c (add_thread): Fix whitespace.
6027
649ebbca
DE
60282014-02-19 Doug Evans <dje@google.com>
6029
6030 * dll.c (clear_dlls): Replace accessing list implemention details
6031 with API function.
6032 * gdbthread.h (get_first_thread): Declare.
6033 * inferiors.c (for_each_inferior_with_data): New function.
6034 (get_first_thread): New function.
6035 (find_thread_ptid): Simplify.
6036 (get_first_inferior): New function.
6037 (clear_list): Delete.
6038 (one_inferior_p): New function.
6039 (clear_inferior_list): New function.
6040 (clear_inferiors): Update.
6041 * inferiors.h (for_each_inferior_with_data): Declare.
6042 (clear_inferior_list): Declare.
6043 (one_inferior_p): Declare.
6044 (get_first_inferior): Declare.
6045 * linux-low.c (linux_wait_for_event): Replace accessing list
6046 implemention details with API function.
6047 * server.c (target_running): Ditto.
6048 (accumulate_file_name_length): New function.
6049 (emit_dll_description): New function.
6050 (handle_qxfer_libraries): Replace accessing list implemention
6051 details with API function.
6052 (handle_qxfer_threads_worker): New function.
6053 (handle_qxfer_threads_proper): Replace accessing list implemention
6054 details with API function.
6055 (handle_query): Ditto.
6056 (visit_actioned_threads_callback_ftype): New typedef.
6057 (visit_actioned_threads_data): New struct.
6058 (visit_actioned_threads): Rewrite to be find_inferior callback.
6059 (resume): Call find_inferior.
6060 (handle_status): Replace accessing list implemention
6061 details with API function.
6062 (process_serial_event): Replace accessing list implemention details
6063 with API function.
6064 * target.c (set_desired_inferior): Replace accessing list implemention
6065 details with API function.
6066 * tracepoint.c (same_process_p): New function.
6067 (gdb_agent_about_to_close): Replace accessing list implemention
6068 details with API function.
6069 * win32-low.c (child_delete_thread): Replace accessing list
6070 implemention details with API function.
6071 (match_dll_by_basename): New function.
6072 (dll_is_loaded_by_basename): New function.
6073 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6074 details call to dll_is_loaded_by_basename.
6075
80894984
DE
60762014-02-19 Doug Evans <dje@google.com>
6077
6078 * dll.h (struct dll_info): Add comment.
6079 * gdbthread.h (struct thread_info): Add comment.
6080 (current_ptid): Simplify.
6081 * inferiors.c (add_process): Update.
6082 (remove_process): Update.
6083 * inferiors.h (struct process_info): Rename member "head" to "entry".
6084 * linux-low.c (delete_lwp): Update.
6085 (add_lwp): Update.
6086 (last_thread_of_process_p): Update.
6087 (kill_one_lwp_callback, linux_kill): Update.
6088 (status_pending_p_callback): Update.
6089 (wait_for_sigstop): Update. Simplify read of ptid.
6090 (start_step_over): Update.
6091 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6092 (get_lwp_thread): Update.
6093 (struct lwp_info): Rename member "head" to "entry".
6094 * regcache.h (inferior_list_entry): Delete.
6095 * server.c (kill_inferior_callback): Update.
6096 (detach_or_kill_inferior_callback): Update.
6097 (print_started_pid): Update.
6098 (print_attached_pid): Update.
6099 (process_serial_event): Simplify read of ptid.
6100 * thread-db.c (thread_db_create_event): Update.
6101 (thread_db_get_tls_address): Update.
6102 * win32-low.c (current_inferior_ptid): Simplify.
6103
46917d26
TT
61042014-02-19 Tom Tromey <tromey@redhat.com>
6105
6106 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6107 argument.
6108 (target_supports_btrace): Update.
6109
0759a81e
YQ
61102014-02-14 Yao Qi <yao@codesourcery.com>
6111
6112 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6113 (rsp-low-ipa.o): New target.
6114
a7191e8b
TT
61152014-02-12 Tom Tromey <tromey@redhat.com>
6116
6117 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6118 convert_ascii_to_int.
6119 * regcache.c (registers_to_string): Likewise.
6120 * remote-utils.c (decode_M_packet): Likewise.
6121 * server.c (process_serial_event): Likewise.
6122
ff0e980e
TT
61232014-02-12 Tom Tromey <tromey@redhat.com>
6124
6125 * server.c (handle_query, handle_v_run): Use hex2bin, not
6126 unhexify.
6127 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6128
e9371aff
TT
61292014-02-12 Tom Tromey <tromey@redhat.com>
6130
6131 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6132 convert_int_to_ascii.
6133 * regcache.c (registers_to_string, collect_register_as_string):
6134 Likewise.
6135 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6136 Likewise.
6137 * server.c (process_serial_event): Likewise.
6138 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6139 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6140
971dc0b8
TT
61412014-02-12 Tom Tromey <tromey@redhat.com>
6142
6143 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6144 bin2hex, not hexify.
6145 * tracepoint.c (cmd_qtstatus): Likewise.
6146
0a822afb
TT
61472014-02-12 Tom Tromey <tromey@redhat.com>
6148
6149 * remote-utils.c (monitor_output): Pass explicit length to
6150 hexify.
6151
9c3d6531
TT
61522014-02-12 Tom Tromey <tromey@redhat.com>
6153
6154 * tracepoint.c: Include rsp-low.h.
6155 * server.c: Include rsp-low.h.
6156 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6157 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6158 declare.
6159 * remote-utils.c: Include rsp-low.h.
6160 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6161 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6162 (convert_int_to_ascii, convert_ascii_to_int): Move to
6163 common/rsp-low.c.
6164 * regcache.c: Include rsp-low.h.
6165 * ax.c: Include rsp-low.h.
6166 * Makefile.in (SFILES): Add common/rsp-low.c.
6167 (OBS): Add rsp-low.o.
6168 (rsp-low.o): New target.
6169
01fd3ea5
TT
61702014-02-12 Tom Tromey <tromey@redhat.com>
6171
6172 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6173 Include print-utils.h.
6174 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6175 (plongest, thirty_two, phex_nz): Remove.
6176 * Makefile.in (SFILES): Add common/print-utils.c.
6177 (OBS): Add print-utils.o.
6178 (print-utils-ipa.o): New target.
6179 (print-utils.o): New target.
6180 (IPA_OBJS): Add print-utils-ipa.o.
6181
e99dc820
TT
61822014-02-06 Tom Tromey <tromey@redhat.com>
6183
6184 * Makefile.in (SFILES): Fix indentation.
6185
ee1e2d4f
DE
61862014-02-05 Doug Evans <dje@google.com>
6187
6188 * linux-low.c (linux_wait_for_event): Improve comment.
6189 (linux_wait_1): Keep current_inferior in sync with event_child.
6190
f5a02773
DE
61912014-01-22 Doug Evans <dje@google.com>
6192
6193 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6194
87ce2a04
DE
61952014-01-22 Doug Evans <dje@google.com>
6196
6197 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6198 * configure: Regenerate.
6199 * config.in: Regenerate.
6200 * Makefile.in (SFILES): Add debug.c.
6201 (OBS): Add debug.o.
6202 * debug.c: New file.
6203 * debug.h: New file.
6204 * linux-aarch64-low.c (*): Update all debugging printfs to use
6205 debug_printf instead of fprintf.
6206 * linux-arm-low.c (*): Ditto.
6207 * linux-cris-low.c (*): Ditto.
6208 * linux-crisv32-low.c (*): Ditto.
6209 * linux-m32r-low.c (*): Ditto.
6210 * linux-sparc-low.c (*): Ditto.
6211 * linux-x86.c (*): Ditto.
6212 * linux-low.c (*): Ditto.
6213 (linux_wait_1): Add calls to debug_enter, debug_exit.
6214 (linux_wait): Remove redundant debugging printf.
6215 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6216 (linux_resume, unstop_all_lwps): Ditto.
6217 * mem-break.c (*): Update all debugging printfs to use
6218 debug_printf instead of fprintf.
6219 * remote-utils.c (*): Ditto.
6220 * thread-db.c (*): Ditto.
6221 * server.c #include <ctype.h>, "gdb_vecs.h".
6222 (debug_threads): Moved to debug.c.
6223 (*): Update all debugging printfs to use debug_printf instead of
6224 fprintf.
6225 (start_inferior): Replace call to fflush with call to debug_flush.
6226 (monitor_show_help): Mention set debug-format.
6227 (parse_debug_format_options): New function.
6228 (handle_monitor_command): Handle "monitor set debug-format".
6229 (gdbserver_usage): Mention --debug-format.
6230 (main): Parse --debug-format.
6231 * server.h (debug_threads): Declaration moved to debug.h.
6232 #include "debug.h".
6233 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6234 trace_debug_1 that uses debug_printf.
6235 (tracepoint_look_up_symbols): Update all debugging printfs to use
6236 debug_printf instead of fprintf.
6237
e671835b
BS
62382014-01-20 Baruch Siach <baruch@tkos.co.il>
6239
6240 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6241 sys/ptrace.h.
6242
b5737fa9
PA
62432014-01-17 Pedro Alves <palves@redhat.com>
6244
ea38d2a9 6245 PR build/16445
c7faa97a
PA
6246 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6247 defined after including gdb_proc_service.h.
b5737fa9 6248
40ed484e
DE
62492014-01-16 Doug Evans <dje@google.com>
6250
6251 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6252 (match_dll): Use it.
6253
969c39fb
MM
62542014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6255
6256 * target.h (target_ops) <read_btrace>: Change parameters and
6257 return type to allow error reporting.
6258 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6259 trace reading errors on.
6260 * linux-low.c (linux_low_read_btrace): Pass trace reading
6261 errors on.
6262 (linux_low_disable_btrace): New.
6263
ab7f45ba
DE
62642014-01-15 Doug Evans <dje@google.com>
6265
6266 * inferiors.c (thread_id_to_gdb_id): Delete.
6267 * inferiors.h (thread_id_to_gdb_id): Delete.
6268
66af0f44
EZ
62692014-01-13 Eli Zaretskii <eliz@gnu.org>
6270
6271 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6272 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6273 versions.
6274
9939e131
PA
62752014-01-08 Pedro Alves <palves@redhat.com>
6276
6277 * server.c (handle_status): Don't discard previous queued stop
6278 replies or thread's pending status here.
6279 (main) <disconnection>: Do it here instead.
6280
b7ea362b
PA
62812014-01-08 Pedro Alves <palves@redhat.com>
6282
6283 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6284 * server.c (visit_actioned_threads, handle_pending_status): New
6285 function.
6286 (handle_v_cont): Factor out parts to ...
6287 (resume): ... this new function. If in all-stop, and a thread
6288 being resumed has a pending status, report it without actually
6289 resuming.
6290 (myresume): Adjust to use the new 'resume' function.
6291 (clear_pending_status_callback, set_pending_status_callback)
6292 (find_status_pending_thread_callback): New functions.
6293 (handle_status): Handle the case of multiple threads having
6294 interesting statuses to report. Report threads' real last signal
6295 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6296 with an interesting thread to report the status for, instead of
6297 always reporting the status of the first thread.
6298
28498c42
JB
62992014-01-01 Joel Brobecker <brobecker@adacore.com>
6300
6301 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6302 * gdbreplay.c (gdbreplay_version): Likewise.
6303
f45c82da
YZ
63042013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6305
6306 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6307 iov.iov_len with the real length in use.
6308
379a5e2d
JB
63092013-12-13 Joel Brobecker <brobecker@adacore.com>
6310
6311 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6312 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6313 for all targets that use win32-low.c.
6314 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6315 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6316
4210d83e
PA
63172013-12-13 Pedro Alves <palves@redhat.com>
6318
6319 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6320 if equal to TARGET_WAITKIND_LOADED.
6321 * win32-low.c (cached_status): New static global.
6322 (win32_wait): Add declaration.
6323 (do_initial_child_stuff): Flush all initial pending debug events
6324 up to the initial breakpoint.
6325 (win32_wait): If CACHED_STATUS was set, return that instead
6326 of doing a real wait. Remove the code resuming the execution
6327 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6328 during the initial phase. Also remove the code changing
6329 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6330 TARGET_WAITKIND_STOPPED.
6331
e7f0d979
YQ
63322013-12-11 Yao Qi <yao@codesourcery.com>
6333
6334 * notif.c (handle_notif_ack): Return 0 if no notification
6335 matches.
6336
ebcf782c
DE
63372013-11-20 Doug Evans <dje@google.com>
6338
6339 * linux-low.c (linux_set_resume_request): Fix comment.
6340
20ad9378
DE
63412013-11-20 Doug Evans <dje@google.com>
6342
6343 * linux-low.c (resume_status_pending_p): Tweak comment.
6344
a196ebeb
WT
63452013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6346
6347 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6348 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6349 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6350 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6351 (srv_amd64_regobj): Add amd64-mpx.o.
6352 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6353 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6354 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6355 * i387-fp.c (num_pl_bnd_register) Added constant.
6356 (num_pl_bnd_cfg_registers) Added constant.
6357 (struct i387_xsave) Added reserved area and MPX fields.
6358 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6359 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6360 function.
6361 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6362 (init_registers_amd64_mpx_linux): Declare new function.
6363 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6364 (x86_64_regmap): Add MPX registers.
6365 (x86_linux_read_description): Add MPX case.
6366 (initialize_low_arch): Initialize MPX targets.
6367
0080a2f6
TT
63682013-11-18 Tom Tromey <tromey@redhat.com>
6369
6370 * configure: Rebuild.
6371 * configure.ac: Don't check for stdlib.h.
6372 * gdbreplay.c: Unconditionally include stdlib.h.
6373
2978b111
TT
63742013-11-18 Tom Tromey <tromey@redhat.com>
6375
6376 * config.in: Rebuild.
6377 * configure: Rebuild.
6378 * configure.ac: Don't use AC_HEADER_DIRENT.
6379
a3d08894
TT
63802013-11-18 Tom Tromey <tromey@redhat.com>
6381
6382 * server.h: Don't check HAVE_STRING_H.
6383 * gdbreplay.c: Don't check HAVE_STRING_H.
6384 * configure: Rebuild.
6385
0a5dd17d
TT
63862013-11-18 Tom Tromey <tromey@redhat.com>
6387
6388 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6389 LIBGNU.
6390
1bd2f0ba
TT
63912013-11-08 Tom Tromey <tromey@redhat.com>
6392
6393 * configure, config.in: Rebuild.
6394 * configure.ac: Remove unused configury.
6395
3266f10b
TT
63962013-11-08 Tom Tromey <tromey@redhat.com>
6397
6398 * acinclude.m4: Include common.m4, codeset.m4.
6399 * configure, config.in: Rebuild.
6400 * configure.ac: Use GDB_AC_COMMON.
6401
6682d959
AA
64022013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6403
6404 * linux-s390-low.c (HWCAP_S390_TE): New define.
6405 (s390_arch_setup): Consider the TE field in the HWCAP for
6406 determining 'have_regset_tdb'.
6407
fd0a4d76
SDJ
64082013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6409
6410 PR gdb/16014
6411 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6412 call to sizeof.
6413
1a3d890b
PA
64142013-10-02 Pedro Alves <palves@redhat.com>
6415
6416 * server.c (process_serial_event): Don't output "GDBserver
6417 exiting" if GDB is connected through stdio.
6418 * target.c (mywait): Likewise, be silent if GDB is connected
6419 through stdio.
6420
97ad4581
JB
64212013-10-01 Joel Brobecker <brobecker@adacore.com>
6422
6423 * lynx-low.c (lynx_add_threads_after_attach): New function.
6424 (lynx_attach): Remove call to add_thread. Add call to
6425 lynx_add_threads_after_attach instead.
6426
5b4e221c
MF
64272013-09-28 Mike Frysinger <vapier@gentoo.org>
6428
6429 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6430 * config.in, configure: Regenerated.
6431
ee47b2f8
YQ
64322013-09-18 Yao Qi <yao@codesourcery.com>
6433
6434 PR server/15959
6435 * server.c (start_inferior): Clear 'resume_info'.
6436
d6707650 64372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6438
d6707650
JW
6439 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6440 for each register.
6441
9243dd0e 64422013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6443
9243dd0e
JW
6444 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6445 linux-tile-low.o to srv_tgtobj.
6446
c623a6ef
WN
64472013-09-16 Will Newton <will.newton@linaro.org>
6448
6449 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6450 out regs.
6451
fb71d39e
PA
64522013-09-06 Pedro Alves <palves@redhat.com>
6453
6454 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6455 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6456 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6457 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6458 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6459 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6460
8e7e9910
PA
64612013-09-06 Pedro Alves <palves@redhat.com>
6462
6463 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6464 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6465
7c3a12ca
PA
64662013-09-06 Pedro Alves <palves@redhat.com>
6467
6468 * linux-amd64-ipa.c: Include tracepoint.h.
6469 * linux-i386-ipa.c: Include tracepoint.h.
6470
8eb3d7b6
RW
64712013-09-06 Ricard Wanderlof <ricardw@axis.com>
6472
6473 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6474 (ps_get_thread_area): New function.
6475
eddddb9d
RW
64762013-09-06 Ricard Wanderlof <ricardw@axis.com>
6477
6478 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6479 (initialize_low_arch): Call init_registers_crisv32 rather than
6480 init_register_crisv32.
6481
533b0600
PA
64822013-09-05 Pedro Alves <palves@redhat.com>
6483
6484 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6485 to ...
6486 * hostio.h: ... this new file.
6487 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6488 win32-low.c: Include hostio.h.
6489
0ce3d3b5
PA
64902013-09-05 Pedro Alves <palves@redhat.com>
6491
6492 * server.h (gdb_client_data, handler_func, callback_handler_func)
6493 (delete_file_handler, add_file_handler, append_callback_event)
6494 (delete_callback_event, start_event_loop, initialize_event_loop):
6495 Move to event-loop.h and include it.
6496 * event-loop.h: New file.
6497
799cdc37
PA
64982013-09-05 Pedro Alves <palves@redhat.com>
6499
6500 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6501 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6502 (loaded_dll, unloaded_dll): Move to ...
6503 * dll.h: ... this new file.
6504 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6505
6a6bbd9d
PA
65062013-09-05 Pedro Alves <palves@redhat.com>
6507
6508 * server.h (current_process, get_thread_process, all_processes)
6509 (add_inferior_to_list, for_each_inferior, current_inferior)
6510 (remove_inferior, add_process, remove_process, find_process_pid)
6511 (have_started_inferiors_p, have_attached_inferiors_p)
6512 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6513 (clear_inferiors, find_inferior, find_inferior_id)
6514 (inferior_target_data, set_inferior_target_data)
6515 (inferior_regcache_data, set_inferior_regcache_data): Move to
6516 inferiors.h, and include it.
6517 * inferiors.h: New file.
6518
f699aaba
PA
65192013-09-05 Pedro Alves <palves@redhat.com>
6520
6521 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6522 Move ...
72f4393d 6523 * ax.h: ... here.
f699aaba 6524
c144c7a0
PA
65252013-09-05 Pedro Alves <palves@redhat.com>
6526
6527 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6528 tracepoint.h.
6529 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6530 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6531 (handle_tracepoint_general_set, handle_tracepoint_query)
6532 (tracepoint_finished_step, tracepoint_was_hit)
6533 (release_while_stepping_state_list, current_traceframe)
6534 (in_readonly_region, traceframe_read_mem)
6535 (fetch_traceframe_registers, traceframe_read_sdata)
6536 (traceframe_read_info, struct fast_tpoint_collect_status)
6537 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6538 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6539 (supply_fast_tracepoint_registers)
6540 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6541 (ipa_tdesc, claim_trampoline_space)
6542 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6543 (agent_mem_read, agent_get_trace_state_variable_value)
6544 (agent_set_trace_state_variable_value, agent_tsv_read)
6545 (agent_mem_read_string, get_raw_reg_func_addr)
6546 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6547 * tracepoint.h: ... this new file.
6548
ff42e6ab
PA
65492013-09-05 Pedro Alves <palves@redhat.com>
6550
6551 * server.h (perror_with_name, error, fatal, warning, paddress)
6552 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6553 include it.
6554 * utils.h: New file.
6555
541af0f4
PA
65562013-09-05 Pedro Alves <palves@redhat.com>
6557
6558 * server.h (remote_debug, noack_mode, transport_is_reliable)
6559 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6560 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6561 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6562 (write_enn, initialize_async_io, enable_async_io)
6563 (disable_async_io, check_remote_input_interrupt_request)
6564 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6565 (dead_thread_notify, prepare_resume_reply)
6566 (decode_address_to_semicolon, decode_address, decode_m_packet)
6567 (decode_M_packet, decode_X_packet, decode_xfer_write)
6568 (decode_search_memory_packet, unhexify, hexify)
6569 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6570 (look_up_one_symbol, relocate_instruction)
6571 (monitor_output): Move to remote-utils.h, and include it.
6572 * remote-utils.h: New file.
6573
eebdf26b
PA
65742013-09-05 Pedro Alves <palves@redhat.com>
6575
6576 * server.h (_): Delete.
6577
3aafd2ff
PA
65782013-09-02 Pedro Alves <palves@redhat.com>
6579
6580 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6581 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6582 allocated.
6583 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6584
cee83bcb
PM
65852013-09-02 Pierre Muller <muller@sourceware.org>
6586
6587 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6588 or WriteProcessMemory complete successfully and handle
6589 ERROR_PARTIAL_COPY error.
6590
9a13b2fa
PA
65912013-09-02 Pedro Alves <palves@redhat.com>
6592
6593 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6594 error instead of EIO.
6595
602e3198
JK
65962013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6597
6598 PR server/15604
6599 * linux-low.c: Include filestuff.h.
6600 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6601 * lynx-low.c: Include filestuff.h.
6602 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6603 * server.c: Include filestuff.h.
6604 (main): Call notice_open_fds.
6605 * spu-low.c: Include filestuff.h.
6606 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6607
96d7229d
LM
66082013-08-22 Luis Machado <lgustavo@codesourcery.com>
6609
6610 * Makefile.in: Explain why ../target and ../nat are not
6611 listed as include file search paths.
6612 (linux-waitpid.o): New object file rule.
6613 * configure.srv (srv_native_linux_obj): New variable.
6614 Replace all occurrences of linux native object files with
6615 $srv_native_linux_obj.
6616 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6617 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6618 (linux_enable_event_reporting): Remove declaration.
6619 (my_waitpid): Moved to common/linux-waitpid.c.
6620 (linux_wait_for_event): Pass ptid when calling
6621 linux_enable_event_reporting.
6622 (linux_supports_tracefork_flag): Remove.
6623 (linux_enable_event_reporting): Likewise.
6624 (linux_tracefork_grandchild): Remove.
6625 (STACK_SIZE): Moved to common/linux-ptrace.c.
6626 (linux_tracefork_child): Remove.
6627 (linux_test_for_tracefork): Remove.
6628 (linux_look_up_symbols): Call linux_supports_traceclone.
6629 (initialize_low): Remove call to linux_test_for_tracefork.
6630 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6631 common/linux-ptrace.h.
6632 (PTRACE_TYPE_ARG4): Likewise.
6633 Include linux-ptrace.h.
6634
32940073
PA
66352013-08-21 Pedro Alves <palves@redhat.com>
6636
6637 * config.in: Renegerate.
6638
33b60d58 66392013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6640
33b60d58
LM
6641 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6642 (SFILES): Remove $(srcdir)/common/target-common.c and
6643 add $(srcdir)/target/waitstatus.c.
6644 (OBS): Remove target-common.o and add waitstatus.o.
6645 (server_h): Remove $(srcdir)/../common/target-common.h and
6646 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6647 and $(srcdir)/../target/waitstatus.h.
6648 (target-common.o): Remove.
6649 (waitstatus.o): New target object file.
6650 * target.h: Do not include target-common.h and
6651 include target/resume.h, target/wait.h and
6652 target/waitstatus.h.
6653
b8e1b30e
LM
66542013-08-13 Luis Machado <lgustavo@codesourcery.com>
6655
6656 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6657 to PTRACE_TYPE_ARG3.
6658 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6659 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6660 PTRACE_TYPE_ARG4.
6661 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6662 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6663
7a60ad40
YQ
66642013-07-27 Jie Zhang <jie@codesourcery.com>
6665 Daniel Jacobowitz <dan@codesourcery.com>
6666 Yao Qi <yao@codesourcery.com>
6667
6668 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6669 (mips-linux-watch.o): New rule.
6670 (mips_linux_watch_h): New variable.
6671 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6672 srv_tgtobj.
6673 * linux-mips-low.c: Include mips-linux-watch.h.
6674 (struct arch_process_info, struct arch_lwp_info): New.
6675 (update_watch_registers_callback): New function.
6676 (mips_linux_new_process, mips_linux_new_thread) New functions.
6677 (mips_linux_prepare_to_resume, mips_insert_point): New
6678 functions.
6679 (mips_remove_point, mips_stopped_by_watchpoint): New
6680 functions.
6681 (rsp_bp_type_to_target_hw_bp_type): New function.
6682 (mips_stopped_data_address): New function.
6683 (the_low_target): Add watchpoint support functions.
6684
de6f69ad
YQ
66852013-07-27 Yao Qi <yao@codesourcery.com>
6686
6687 * i386-low.c: Include break-common.h.
6688 (enum target_hw_bp_type): Remove.
6689
3360c0bf
LM
66902013-07-24 Luis Machado <lgustavo@codesourcery.com>
6691
6692 * Makefile.in (SFILES): /common/target-common.c.
6693 (OBS): Add target-common.o.
6694 (server_h): Add $(srcdir)/../common/target-common.h.
6695 (target-common.o): New target.
6696 * server.c (queue_stop_reply_callback): Free
6697 status string after use.
6698 * target.c (target_waitstatus_to_string): Remove.
6699 * target.h: Include target-common.h.
6700 (resume_kind): Likewise.
6701 (target_waitkind): Likewise.
6702 (target_waitstatus): Likewise.
6703 (TARGET_WNOHANG): Likewise.
6704
bd885420
YQ
67052013-07-04 Yao Qi <yao@codesourcery.com>
6706
6707 * Makefile.in (host_alias): Use @host_noncanonical@.
6708 (target_alias): Use @target_noncanonical@.
6709 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6710 ACX_NONCANONICAL_HOST.
6711 * configure: Regenerated.
6712
6713 Revert:
6714 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6715
6716 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6717 * configure: Rebuild.
6718 * Makefile.in (version_host, version_target): Get from configure.
6719 (version.c): Use $(version_host) and $(version_target).
6720
17ef446e
PA
67212013-07-03 Pedro Alves <palves@redhat.com>
6722
6723 * Makefile.in (config.status): Depend on development.sh.
6724 * acinclude.m4: Include libmcheck.m4.
6725 * configure: Regenerate.
6726
7a9a7487
MG
67272013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6728
6729 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6730 attribute inside the parentheses.
6731 (winapi_DebugSetProcessKillOnExit): Ditto.
6732 (winapi_DebugBreakProcess): Ditto.
6733 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6734
49b64de6
MG
67352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6736
6737 * notif.h (notif_event): Add a dummy member to avoid compiler
6738 errors.
6739
d5749ee7
PA
67402013-07-01 Pedro Alves <palves@redhat.com>
6741
6742 * hostio.c (HOSTIO_PATH_MAX): Define.
6743 (require_filename, handle_open, handle_unlink, handle_readlink):
6744 Use it.
6745
d8d2a3ee
PA
67462013-07-01 Pedro Alves <palves@redhat.com>
6747
6748 * server.h: Include "pathmax.h".
6749 * linux-low.c: Don't include sys/param.h.
6750 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6751 MAXPATHLEN.
6752 * win32-low.c: Don't include sys/param.h.
6753 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6754
bc7dea8d
PA
67552013-07-01 Pedro Alves <palves@redhat.com>
6756
6757 * event-loop.c: Don't check HAVE_UNISTD_H before including
6758 <unistd.h>.
6759 * gdbreplay.c: Likewise.
6760 * remote-utils.c: Likewise.
6761 * server.c: Likewise.
6762 * configure.ac: Don't check for unistd.h.
6763 * configure: Regenerate.
6764
d6c2da54
TT
67652013-06-28 Tom Tromey <tromey@redhat.com>
6766
6767 * Makefile.in (version.c): Use version.in, not
6768 common/version.in.
6769
257b6bec
MG
67702013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6771
6772 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6773 * configure: Rebuild.
6774 * Makefile.in (version_host, version_target): Get from configure.
6775 (version.c): Use $(version_host) and $(version_target).
6776
86ebe149
DK
67772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6778
6779 Fix trace-status to output user name without trailing colon.
6780 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6781
f30aa5af
DK
67822013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6783
6784 Fix trace-status to output proper start-time and stop-time.
6785 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6786 output start time and stop time in hex as gdb expects.
6787
28a93511
YQ
67882013-06-26 Pedro Alves <pedro@codesourcery.com>
6789
6790 * tracepoint.c (build_traceframe_info_xml): Output trace state
6791 variables present in the trace buffer.
6792
01208463
TT
67932013-06-24 Tom Tromey <tromey@redhat.com>
6794
6795 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6796 create-version.sh.
6797 (version.o): Remove.
6798 * gdbreplay.c: Include version.h.
6799 (version, host_name): Don't declare.
6800 * server.h: Include version.h.
6801 (version, host_name): Don't declare.
6802
760256f9
PA
68032013-06-12 Pedro Alves <palves@redhat.com>
6804
6805 * linux-x86-low.c (linux_is_elf64): Delete global.
6806 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6807 with local linux_pid_exe_is_elf_64_file use.
6808
030031ee
PA
68092013-06-11 Pedro Alves <palves@redhat.com>
6810
6811 * linux-low.c (regset_disabled, disable_regset): New functions.
6812 (regsets_fetch_inferior_registers)
6813 (regsets_store_inferior_registers): Use them.
6814 (initialize_regsets_info); Don't allocate the disabled_regsets
6815 array here.
6816 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6817 comment.
6818
5da6eb0a
PA
68192013-06-11 Pedro Alves <palves@redhat.com>
6820
6821 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6822 xmalloc.
6823
7e5aaa09
PA
68242013-06-11 Pedro Alves <palves@redhat.com>
6825
6826 * linux-x86-low.c (initialize_low_arch): Call
6827 init_registers_x32_avx_linux.
6828
d878444c
JK
68292013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6830
6831 Fix compatibility with Android Bionic.
6832 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6833 it is not empty.
6834
3aee8918
PA
68352013-06-07 Pedro Alves <palves@redhat.com>
6836
5f2b57b5 6837 PR server/14823
3aee8918
PA
6838 * Makefile.in (OBS): Add tdesc.o.
6839 (IPA_OBJS): Add tdesc-ipa.o.
6840 (tdesc-ipa.o): New rule.
6841 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6842 interface.
6843 * linux-low.c (new_inferior): Delete.
6844 (disabled_regsets, num_regsets): Delete.
6845 (linux_add_process): Adjust to set the new per-process
6846 new_inferior flag.
6847 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6848 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6849 was a stop. When calling arch_setup, switch the current inferior
6850 to the thread that got an event.
6851 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6852 (regsets_fetch_inferior_registers)
6853 (regsets_store_inferior_registers): New regsets_info parameter.
6854 Adjust to use it.
6855 (linux_register_in_regsets): New regs_info parameter. Adjust to
6856 use it.
6857 (register_addr, fetch_register, store_register): New usrregs_info
6858 parameter. Adjust to use it.
6859 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6860 parameter regs_info. Adjust to use it.
6861 (linux_fetch_registers): Get the current inferior's regs_info, and
6862 adjust to use it.
6863 (linux_store_registers): Ditto.
6864 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6865 (initialize_low): Don't initialize the target_regsets here. Call
6866 initialize_low_arch.
6867 * linux-low.h (target_regsets): Delete declaration.
6868 (struct regsets_info): New.
6869 (struct usrregs_info): New.
6870 (struct regs_info): New.
6871 (struct process_info_private) <new_inferior>: New field.
6872 (struct linux_target_ops): Delete the num_regs, regmap, and
6873 regset_bitmap fields. New field regs_info.
6874 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6875 * i387-fp.c (num_xmm_registers): Delete.
6876 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6877 calls to new interface.
6878 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6879 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6880 Infer the number of xmm registers from the regcache's target
6881 description.
6882 * i387-fp.h (num_xmm_registers): Delete.
6883 * inferiors.c (add_thread): Don't install the thread's regcache
6884 here.
6885 * proc-service.c (gregset_info): Fetch the current inferior's
6886 regs_info. Adjust to use it.
6887 * regcache.c: Include tdesc.h.
6888 (register_bytes, reg_defs, num_registers)
6889 (gdbserver_expedite_regs): Delete.
6890 (get_thread_regcache): If the thread doesn't have a regcache yet,
6891 create one, instead of aborting gdbserver.
6892 (regcache_invalidate_one): Rename to ...
6893 (regcache_invalidate_thread): ... this.
6894 (regcache_invalidate_one): New.
6895 (regcache_invalidate): Only invalidate registers of the current
6896 process.
6897 (init_register_cache): Add target_desc parameter, and use it.
6898 (new_register_cache): Ditto. Assert the target description has a
6899 non zero registers_size.
6900 (regcache_cpy): Add assertions. Adjust.
6901 (realloc_register_cache, set_register_cache): Delete.
6902 (registers_to_string, registers_from_string): Adjust.
6903 (find_register_by_name, find_regno, find_register_by_number)
6904 (register_cache_size): Add target_desc parameter, and use it.
6905 (free_register_cache_thread, free_register_cache_thread_one)
6906 (regcache_release, register_cache_size): New.
6907 (register_size): Add target_desc parameter, and use it.
6908 (register_data, supply_register, supply_register_zeroed)
6909 (supply_regblock, supply_register_by_name, collect_register)
6910 (collect_register_as_string, collect_register_by_name): Adjust.
6911 * regcache.h (struct target_desc): Forward declare.
6912 (struct regcache) <tdesc>: New field.
6913 (init_register_cache, new_register_cache): Add target_desc
6914 parameter.
6915 (regcache_invalidate_thread): Declare.
6916 (regcache_invalidate_one): Delete declaration.
6917 (regcache_release): Declare.
6918 (find_register_by_number, register_cache_size, register_size)
6919 (find_regno): Add target_desc parameter.
6920 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6921 declarations.
6922 * remote-utils.c: Include tdesc.h.
6923 (outreg, prepare_resume_reply): Adjust.
6924 * server.c: Include tdesc.h.
6925 (gdbserver_xmltarget): Delete declaration.
6926 (get_features_xml, process_serial_event): Adjust.
6927 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6928 declare.
6929 (struct process_info) <tdesc>: New field.
6930 (ipa_tdesc): Declare.
6931 * tdesc.c: New file.
6932 * tdesc.h: New file.
6933 * tracepoint.c: Include tdesc.h.
6934 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6935 (get_context_regcache): Adjust to pass ipa_tdesc down.
6936 (do_action_at_tracepoint): Adjust to get the register cache size
6937 from the context regcache's description.
6938 (traceframe_walk_blocks): Adjust to get the register cache size
6939 from the current trace frame's description.
6940 (traceframe_get_pc): Adjust to get current trace frame's
6941 description and pass it down.
6942 (gdb_collect): Adjust to get the register cache size from the
6943 IPA's description.
6944 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6945 (gdbserver_xmltarget): Delete.
6946 (initialize_low_tracepoint): Set the ipa's target description.
6947 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6948 (initialize_low_tracepoint): Set the ipa's target description.
6949 * linux-x86-low.c: Include tdesc.h.
6950 [__x86_64__] (is_64bit_tdesc): New.
6951 (ps_get_thread_area, x86_get_thread_area): Use it.
6952 (i386_cannot_store_register): Rename to ...
6953 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6954 (i386_cannot_fetch_register): Rename to ...
6955 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6956 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6957 to new interface.
6958 (target_regsets): Rename to ...
6959 (x86_regsets): ... this.
6960 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6961 interface.
6962 (x86_siginfo_fixup): Use is_64bit_tdesc.
6963 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6964 (tdesc_x32_avx_linux, tdesc_x32_linux)
6965 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6966 Declare.
6967 (x86_linux_update_xmltarget): Delete.
6968 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6969 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6970 (AMD64_LINUX_USER64_CS): New.
6971 (x86_linux_read_description): New, based on
6972 x86_linux_update_xmltarget.
6973 (same_process_callback): New.
6974 (x86_arch_setup_process_callback): New.
6975 (x86_linux_update_xmltarget): New.
6976 (x86_regsets_info): New.
6977 (amd64_linux_regs_info): New.
6978 (i386_linux_usrregs_info): New.
6979 (i386_linux_regs_info): New.
6980 (x86_linux_regs_info): New.
6981 (x86_arch_setup): Reimplement.
6982 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6983 (x86_emit_ops): Ditto.
6984 (the_low_target): Adjust. Install x86_linux_regs_info,
6985 x86_cannot_fetch_register, and x86_cannot_store_register.
6986 (initialize_low_arch): New.
6987 * linux-ia64-low.c (tdesc_ia64): Declare.
6988 (ia64_fetch_register): Adjust.
6989 (ia64_usrregs_info, regs_info): New globals.
6990 (ia64_regs_info): New function.
6991 (the_low_target): Adjust.
6992 (initialize_low_arch): New function.
6993 * linux-sparc-low.c (tdesc_sparc64): Declare.
6994 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6995 Adjust.
6996 (sparc_arch_setup): New function.
6997 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6998 (the_low_target): Adjust.
6999 (initialize_low_arch): New function.
7000 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7001 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7002 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7003 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7004 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7005 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7006 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7007 (tdesc_powerpc_isa205_vsx64l): Declare.
7008 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7009 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7010 (ppc_set_pc, ppc_get_hwcap): Adjust.
7011 (ppc_usrregs_info): Forward declare.
7012 (!__powerpc64__) ppc_regmap_adjusted: New global.
7013 (ppc_arch_setup): Adjust to the current process'es target
7014 description.
7015 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7016 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7017 (ppc_store_evrregset): Adjust.
7018 (target_regsets): Rename to ...
7019 (ppc_regsets): ... this, and make static.
7020 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7021 (ppc_regs_info): New function.
7022 (the_low_target): Adjust.
7023 (initialize_low_arch): New function.
7024 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7025 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7026 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7027 (tdesc_s390x_linux64v2): Declare.
7028 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7029 (s390_fill_gregset, s390_store_last_break): Adjust.
7030 (target_regsets): Rename to ...
7031 (s390_regsets): ... this, and make static.
7032 (s390_get_pc, s390_set_pc): Adjust.
7033 (s390_get_hwcap): New target_desc parameter, and use it.
7034 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7035 (s390_arch_setup): Adjust to set the current process'es target
7036 description. Don't adjust the regmap.
7037 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7038 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7039 (regs_info_3264): New globals.
7040 (s390_regs_info): New function.
7041 (the_low_target): Adjust.
7042 (initialize_low_arch): New function.
7043 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7044 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7045 [__mips64] (init_registers_mips_linux)
7046 (init_registers_mips_dsp_linux): Delete defines.
7047 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7048 (have_dsp): New global.
7049 (mips_read_description): New, based on mips_arch_setup.
7050 (mips_arch_setup): Reimplement.
7051 (get_usrregs_info): New function.
7052 (mips_cannot_fetch_register, mips_cannot_store_register)
7053 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7054 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7055 (target_regsets): Rename to ...
7056 (mips_regsets): ... this, and make static.
7057 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7058 (dsp_regs_info, regs_info): New globals.
7059 (mips_regs_info): New function.
7060 (the_low_target): Adjust.
7061 (initialize_low_arch): New function.
7062 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7063 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7064 Declare.
7065 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7066 (arm_read_description): New, with bits factored from
7067 arm_arch_setup.
7068 (arm_arch_setup): Reimplement.
7069 (target_regsets): Rename to ...
7070 (arm_regsets): ... this, and make static.
7071 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7072 (arm_regs_info): New function.
7073 (the_low_target): Adjust.
7074 (initialize_low_arch): New function.
7075 * linux-m68k-low.c (tdesc_m68k): Declare.
7076 (target_regsets): Rename to ...
7077 (m68k_regsets): ... this, and make static.
7078 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7079 (m68k_regs_info): New function.
7080 (m68k_arch_setup): New function.
7081 (the_low_target): Adjust.
7082 (initialize_low_arch): New function.
7083 * linux-sh-low.c (tdesc_sharch): Declare.
7084 (target_regsets): Rename to ...
7085 (sh_regsets): ... this, and make static.
7086 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7087 (sh_regs_info, sh_arch_setup): New functions.
7088 (the_low_target): Adjust.
7089 (initialize_low_arch): New function.
7090 * linux-bfin-low.c (tdesc_bfin): Declare.
7091 (bfin_arch_setup): New function.
7092 (bfin_usrregs_info, regs_info): New globals.
7093 (bfin_regs_info): New function.
7094 (the_low_target): Adjust.
7095 (initialize_low_arch): New function.
7096 * linux-cris-low.c (tdesc_cris): Declare.
7097 (cris_arch_setup): New function.
7098 (cris_usrregs_info, regs_info): New globals.
7099 (cris_regs_info): New function.
7100 (the_low_target): Adjust.
7101 (initialize_low_arch): New function.
7102 * linux-cris-low.c (tdesc_crisv32): Declare.
7103 (cris_arch_setup): New function.
7104 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7105 (cris_regs_info): New function.
7106 (the_low_target): Adjust.
7107 (initialize_low_arch): New function.
7108 * linux-m32r-low.c (tdesc_m32r): Declare.
7109 (m32r_arch_setup): New function.
7110 (m32r_usrregs_info, regs_info): New globals.
7111 (m32r_regs_info): Adjust.
7112 (initialize_low_arch): New function.
7113 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7114 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7115 (tic6x_usrregs_info): Forward declare.
7116 (tic6x_read_description): New function, based on ...
7117 (tic6x_arch_setup): ... this. Reimplement.
7118 (target_regsets): Rename to ...
7119 (tic6x_regsets): ... this, and make static.
7120 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7121 (tic6x_regs_info): New function.
7122 (the_low_target): Adjust.
7123 (initialize_low_arch): New function.
7124 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7125 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7126 (target_regsets): Rename to ...
7127 (xtensa_regsets): ... this, and make static.
7128 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7129 globals.
7130 (xtensa_arch_setup, xtensa_regs_info): New functions.
7131 (the_low_target): Adjust.
7132 (initialize_low_arch): New function.
7133 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7134 (nios2_arch_setup): Set the current process'es tdesc.
7135 (target_regsets): Rename to ...
7136 (nios2_regsets): ... this.
7137 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7138 (nios2_regs_info): New function.
7139 (the_low_target): Adjust.
7140 (initialize_low_arch): New function.
a261b8f5
PA
7141 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7142 (aarch64_arch_setup): Set the current process'es tdesc.
7143 (target_regsets): Rename to ...
7144 (aarch64_regsets): ... this.
7145 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7146 (aarch64_regs_info): New function.
7147 (the_low_target): Adjust.
7148 (initialize_low_arch): New function.
3aee8918
PA
7149 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7150 globals.
7151 (target_regsets): Rename to ...
7152 (tile_regsets): ... this.
7153 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7154 (tile_regs_info): New function.
7155 (tile_arch_setup): Set the current process'es tdesc.
7156 (the_low_target): Adjust.
7157 (initialize_low_arch): New function.
7158 * spu-low.c (tdesc_spu): Declare.
7159 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7160 * win32-arm-low.c (tdesc_arm): Declare.
7161 (arm_arch_setup): New function.
7162 (the_low_target): Install arm_arch_setup instead of
7163 init_registers_arm.
7164 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7165 (init_windows_x86): Rename to ...
7166 (i386_arch_setup): ... this. Set `win32_tdesc'.
7167 (the_low_target): Adjust.
7168 * win32-low.c (win32_tdesc): New global.
7169 (child_add_thread): Don't create the thread cache here.
7170 (do_initial_child_stuff): Set the new process'es tdesc.
7171 * win32-low.h (struct target_desc): Forward declare.
7172 (win32_tdesc): Declare.
7173 * lynx-i386-low.c (tdesc_i386): Declare global.
7174 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7175 * lynx-low.c (lynx_tdesc): New global.
7176 (lynx_add_process): Set the new process'es tdesc.
7177 * lynx-low.h (struct target_desc): Forward declare.
7178 (lynx_tdesc): Declare global.
7179 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7180 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7181 * nto-low.c (nto_tdesc): New global.
7182 (do_attach): Set the new process'es tdesc.
7183 * nto-low.h (struct target_desc): Forward declare.
7184 (nto_tdesc): Declare.
7185 * nto-x86-low.c (tdesc_i386): Declare.
7186 (nto_x86_arch_setup): Set `nto_tdesc'.
7187
b1fbec62
GB
71882013-06-04 Gary Benson <gbenson@redhat.com>
7189
7190 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7191 to qSupported response when appropriate.
7192 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7193 with nonzero-length annex.
7194 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7195 arguments supplied in annex.
7196
d1ec4ce7
DE
71972013-05-31 Doug Evans <dje@google.com>
7198
ac44adcb 7199 PR server/15594
d1ec4ce7
DE
7200 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7201 64 bits in 64-cross-32 environment.
7202
9b25f2d3
PA
72032013-05-28 Pedro Alves <palves@redhat.com>
7204
7205 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7206 (aarch64-without-fpu.c): Delete rule.
7207 * configure.srv (aarch64*-*-linux*): Remove references to
7208 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7209 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7210 declaration.
7211
6740dc9c
PA
72122013-05-24 Pedro Alves <palves@redhat.com>
7213
7214 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7215 instead of strchr/decode_address. Error if the range isn't split
7216 with a ','. Don't assume there's be a ':' in the action.
7217
c2d6af84
PA
72182013-05-23 Yao Qi <yao@codesourcery.com>
7219 Pedro Alves <palves@redhat.com>
7220
7221 * linux-low.c (lwp_in_step_range): New function.
7222 (linux_wait_1): If the thread was range stepping and stopped
7223 outside the stepping range, report the stop to GDB. Otherwise,
7224 continue stepping. Add range stepping debug output.
7225 (linux_set_resume_request): Copy the step range from the resume
7226 request to the lwp.
7227 (linux_supports_range_stepping): New.
7228 (linux_target_ops) <supports_range_stepping>: Set to
7229 linux_supports_range_stepping.
7230 * linux-low.h (struct linux_target_ops)
7231 <supports_range_stepping>: New field.
7232 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7233 * linux-x86-low.c (x86_supports_range_stepping): New.
7234 (the_low_target) <supports_range_stepping>: Set to
7235 x86_supports_range_stepping.
7236 * server.c (handle_v_cont): Handle 'r' action.
7237 (handle_v_requests): Append ";r" if the target supports range
7238 stepping.
7239 * target.h (struct thread_resume) <step_range_start,
7240 step_range_end>: New fields.
7241 (struct target_ops) <supports_range_stepping>:
7242 New field.
7243 (target_supports_range_stepping): New macro.
7244
58794e1a
JB
72452013-05-17 Joel Brobecker <brobecker@adacore.com>
7246
7247 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7248 confusion in comment.
7249
d631c5a7
JB
72502013-05-17 Joel Brobecker <brobecker@adacore.com>
7251
7252 * lynx-low.c (struct process_info_private): New type.
7253 (lynx_add_process): New function.
7254 (lynx_create_inferior, lynx_attach): Replace calls to
7255 add_process by calls to lynx_add_process.
7256 (lynx_resume): If PTID is null, then try using
7257 current_process()->private->last_wait_event_ptid.
7258 Add comments.
7259 (lynx_clear_inferiors): Delete. The contents of that function
7260 has been inlined in lynx_mourn;
7261 (lynx_wait_1): Save the ptid in the process's private data.
7262 (lynx_mourn): Free the process' private data. Replace call
7263 to lynx_clear_inferiors by call to clear_inferiors.
7264
96f7a20f
YQ
72652013-05-17 Yao Qi <yao@codesourcery.com>
7266
7267 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7268 the right place.
7269
db0dfaa0
LM
72702013-05-16 Luis Machado <lgustavo@codesourcery.com>
7271
7272 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7273 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7274 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7275 PT_TEXT_END_ADDR guards. Update comments.
7276 (linux_target_op) <read_offsets>: Conditionally define to
7277 linux_read_offsets if the target is UCLIBC and if it defines
7278 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7279
68f5f838
SL
72802013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7281 Andrew Jenner <andrew@codesourcery.com>
7282
7283 * Makefile.in (SFILES): Add linux-nios2-low.c.
7284 (clean): Add action to delete nios2-linux.c.
7285 (nios2-linux.c): New rule.
7286 * configure.srv: Add nios2*-*-linux*.
7287 * linux-nios2-low.c: New.
7288
1ebff1fd
HAQ
72892013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7290
7291 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7292
f6150862
HZ
72932013-04-25 Hui Zhu <hui@codesourcery.com>
7294
7295 PR gdb/15186
f6150862
HZ
7296 * ax.c (ax_printf): Add fflush.
7297
614c279d
TT
72982013-04-22 Tom Tromey <tromey@redhat.com>
7299
7300 * Makefile.in (SFILES): Add filestuff.c.
7301 (OBS): Add filestuff.o.
7302 (filestuff.o): New target.
7303 * config.in, configure: Rebuild.
7304 * configure.ac: Check for fdwalk, pipe2.
7305
7d4e5717
PA
73062013-04-17 Pedro Alves <palves@redhat.com>
7307
7308 * configure.ac (USE_THREAD_DB): Delete variable.
7309 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7310 Don't AC_SUBST USE_THREAD_DB.
7311 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7312 * config.in, configure: Regenerate.
7313
d5c93e41
PA
73142013-04-16 Pedro Alves <palves@redhat.com>
7315
7316 * linux-low.h (struct lwp_info) <thread_known>: Move under
7317 the USE_THREAD_DB #ifdef.
7318
04f5fe89
PA
73192013-04-16 Pedro Alves <palves@redhat.com>
7320
7321 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7322 (linux-low.o): Delete rule.
7323 * linux-low.h: Always include "gdb_thread_db.h" instead of
7324 conditionally including thread_db.h.
7325 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7326 HAVE_THREAD_DB_H.
7327
480b27bf
JK
73282013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7329
7330 * Makefile.in (install-only): Fix make install regression.
7331
43662968
JK
73322013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7333
7334 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7335 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7336 installation.
7337 * gdbserver.1: Remove.
7338
3e74e146
PA
73392013-03-22 Pedro Alves <palves@redhat.com>
7340
7341 * linux-low.c (handle_extended_wait): Don't call
7342 linux_enable_event_reporting.
7343
a8347a2a
TT
73442013-03-15 Tony Theodore <tonyt@logyst.com>
7345
7346 PR build/9098:
7347 * Makefile.in (SHELL): Use @SHELL@.
7348
eeb56fa7
SDJ
73492013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7350
7351 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7352 compiler warning.
7353
4fa7e2ff
JB
73542013-03-13 Joel Brobecker <brobecker@adacore.com>
7355
7356 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7357 Remove extraneous NULL element.
7358
8ddb1965
YQ
73592013-03-13 Yao Qi <yao@codesourcery.com>
7360
7361 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7362 'V' block in trace frame.
7363
9accd112
MM
73642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7365
7366 * target.h (struct target_ops): Add btrace ops.
7367 (target_supports_btrace): New macro.
7368 (target_enable_btrace): New macro.
7369 (target_disable_btrace): New macro.
7370 (target_read_btrace): New macro.
7371 * gdbthread.h (struct thread_info): Add btrace field.
7372 * server.c: Include btrace-common.h.
7373 (handle_btrace_general_set): New function.
7374 (handle_btrace_enable): New function.
7375 (handle_btrace_disable): New function.
7376 (handle_general_set): Call handle_btrace_general_set.
7377 (handle_qxfer_btrace): New function.
7378 (struct qxfer qxfer_packets[]): Add btrace entry.
7379 * inferiors.c (remove_thread): Disable btrace.
7380 * linux-low: Include linux-btrace.h.
7381 (linux_low_enable_btrace): New function.
7382 (linux_low_read_btrace): New function.
7383 (linux_target_ops): Add btrace ops.
7384 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7385 Add srv_linux_btrace=yes.
7386 (x86_64-*-linux*): Add linux-btrace.o.
7387 Add srv_linux_btrace=yes.
7388 * configure.ac: Define HAVE_LINUX_BTRACE.
7389 * config.in: Regenerated.
7390 * configure: Regenerated.
7391
5cc22e4c
MM
73922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7393
7394 * server.c (handle_qxfer): Preserve error message if -3 is
7395 returned.
7396 (qxfer): Document the -3 return value.
7397
7c97f91e
MM
73982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7399
7400 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7401 (linux_btrace_h): New variable.
7402 (linux-btrace.o): New rule.
7403
be9a119c 74042013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7405 Hafiz Abid Qadeer <abidh@codesourcery.com>
7406
7407 * tracepoint.c (trace_buffer_size): New global.
7408 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7409 (init_trace_buffer): Change to one-argument function. Allocate
7410 trace buffer memory.
7411 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7412 handle QTBuffer:size packet.
7413 (cmd_bigqtbuffer_size): New function.
7414 (initialize_tracepoint): Call init_trace_buffer with
7415 DEFAULT_TRACE_BUFFER_SIZE.
7416 * server.c (handle_query): Add QTBuffer:size in the
7417 supported packets.
7418
e64f7499
YQ
74192013-03-07 Yao Qi <yao@codesourcery.com>
7420
7421 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7422 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7423 of -1.
7424 (cmd_qtsp): Adjust condition. Do post increment.
7425 Set cur_action and cur_step_action back to 0.
7426
f0ae6fc3
PA
74272013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7428
7429 PR server/15236
7430 * linux-low.c (linux_write_memory): Return early success if LEN is
7431 zero.
7432
b5b0b0af
CV
74332013-03-05 Corinna Vinschen <vinschen@redhat.de>
7434
334ad4a8 7435 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7436
589bc927
TT
74372013-02-28 Tom Tromey <tromey@redhat.com>
7438
7439 * configure.ac: Invoke AC_SYS_LARGEFILE.
7440 * configure, config.in: Rebuild.
7441
dfe07582
CV
74422013-02-28 Corinna Vinschen <vinschen@redhat.com>
7443
7444 * win32-low.c: Throughout, fix format strings and casts of
7445 printf-like functions to avoid type related warnings on all
7446 platforms.
7447 (get_child_debug_event): Print dwDebugEventCode as hex since
7448 that's how it's usually documented.
7449
736cd585
YQ
74502013-02-28 Yao Qi <yao@codesourcery.com>
7451
7452 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7453 pulongest.
7454
e1f58301
JW
74552013-02-27 Jiong Wang <jiwang@tilera.com>
7456
7457 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7458 (reg-tilegx32.c): New rule.
7459 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7460 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7461 different register info initializer according to elf class.
7462 (init_registers_tilgx32): New function. The tilegx32 register info
7463 initializer.
7464 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7465 (tile_store_gregset): Likewise.
7466
d171ca78
YQ
74672013-02-27 Yao Qi <yao@codesourcery.com>
7468
7469 * server.c (process_point_options): Print debug message when
7470 debug_threads is true.
7471
282bbdf3
YQ
74722013-02-26 Yao Qi <yao@codesourcery.com>
7473
7474 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7475
aca22551
PA
74762013-02-19 Pedro Alves <palves@redhat.com>
7477 Kai Tietz <ktietz@redhat.com>
7478
7479 PR gdb/15161
7480
7481 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7482 instead of strtoul to extract address from packet.
7483 (process_serial_event) <'z'>: Likewise.
7484
4f3cee1c
YQ
74852013-02-18 Yao Qi <yao@codesourcery.com>
7486
7487 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7488
8e1d55a3
PA
74892013-02-14 Pedro Alves <palves@redhat.com>
7490
7491 Plug memory leak.
7492
7493 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7494 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7495
458820da
PA
74962013-02-14 Pedro Alves <palves@redhat.com>
7497
7498 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7499
baea0dae
PA
75002013-02-14 Pedro Alves <palves@redhat.com>
7501
7502 * tracepoint.c (save_string): Delete.
7503 (add_tracepoint_action): Use savestring instead of save_string.
7504
0b1afbb3
PA
75052013-02-12 Pedro Alves <palves@redhat.com>
7506
7507 * linux-xtensa-low.c: Ditto.
7508 * xtensa-xtregs.c: Ditto.
7509
8a4ac37e
PA
75102013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7511
7512 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7513 thread_db.
7514
148de6bb
MS
75152013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7516
7517 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7518 aarch64_num_wp_regs and aarch64_num_bp_regs to
7519 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7520
55fac6e0
MS
75212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7522
7523 * linux-aarch64-low.c (ps_get_thread_area): Replace
7524 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7525
176eb98c
MS
75262013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7527 Marcus Shawcroft <marcus.shawcroft@arm.com>
7528 Nigel Stephens <nigel.stephens@arm.com>
7529 Yufeng Zhang <yufeng.zhang@arm.com>
7530
7531 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7532 (aarch64.c, aarch64-without-fpu.c): New targets.
7533 * configure.srv (aarch64*-*-linux*): New.
7534 * linux-aarch64-low.c: New file.
7535
56f7af9c
MS
75362013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7537
43aaf8b6 7538 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7539 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7540 (dequeue_one_deferred_signal, linux_resume_one_thread)
7541 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7542 (linux_tracefork_grandchild, linux_test_for_tracefork)
7543 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7544 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7545 where the argument is 0.
7546
60f662b0
YQ
75472013-01-25 Yao Qi <yao@codesourcery.com>
7548
7549 * event-loop.c: Include "queue.h".
7550 (gdb_event_p): New typedef.
7551 (struct gdb_event) <next_event>: Remove.
7552 (event_queue): Change to QUEUE(gdb_event_p).
7553 (async_queue_event): Remove.
7554 (gdb_event_xfree): New.
7555 (initialize_event_loop): New.
7556 (process_event): Use API from QUEUE.
7557 (wait_for_event): Likewise.
7558 * server.c (main): Call initialize_event_loop.
7559 * server.h (initialize_event_loop): Declare.
7560
5ae4861a
YQ
75612013-01-18 Yao Qi <yao@codesourcery.com>
7562
7563 * ax.h (struct eval_agent_expr_context): New.
7564 (gdb_eval_agent_expr): Update declaration.
7565 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7566 TFRAME. Add new argument CTX.
7567 * server.h (struct eval_agent_expr_context): Declare.
7568 (agent_mem_read, agent_tsv_read): Update declaration.
7569 (agent_mem_read_string): Likewise.
7570 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7571 (add_traceframe_block): Add new argument TPOINT.
7572 Increase TPOINT->traceframe_usage.
7573 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7574 eval_tracepoint_agent_expr.
7575 (condition_true_at_tracepoint): Likewise.
7576 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7577 (agent_mem_read_string, agent_tsv_read): Likewise.
7578
85e00e85
YQ
75792013-01-16 Yao Qi <yao@codesourcery.com>
7580
7581 * linux-low.c (linux_resume_one_lwp): Don't check
7582 'lwp->bp_reinsert != 0'.
7583
4039cf45
JB
75842013-01-07 Joel Brobecker <brobecker@adacore.com>
7585 Pedro Alves <palves@redhat.com>
7586
7587 * lynx-low.c (ptrace_request_to_str): Define a temporary
7588 macro and use it to simplify this function's implementation.
7589
9044dee2
JB
75902013-01-07 Joel Brobecker <brobecker@adacore.com>
7591
7592 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7593 sets errno.
7594
e6352c8f
JB
75952013-01-07 Joel Brobecker <brobecker@adacore.com>
7596
7597 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7598
50681a27
JB
75992013-01-07 Joel Brobecker <brobecker@adacore.com>
7600
7601 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7602
3f6e77ef
JB
76032013-01-07 Joel Brobecker <brobecker@adacore.com>
7604
7605 * lynx-low.c (lynx_resume): Use the resume_info parameter
7606 to determine the ptid for the lynx_ptrace call, unless
7607 it is equal to minus_one_ptid, in which case we use the
7608 ptid of the current_inferior.
7609 (lynx_wait_1): After having received a thread create/exit
7610 event, resume the inferior's execution using the signaling
7611 thread's ptid, rather than the old ptid.
7612
7fda33ae
JB
76132013-01-07 Joel Brobecker <brobecker@adacore.com>
7614
7615 * lynx-low.c (lynx_resume): Delete variable ret.
7616
b9786c74
JB
76172013-01-01 Joel Brobecker <brobecker@adacore.com>
7618
7619 * gdbreplay.c (gdbreplay_version): Update copyright year.
7620 * server.c (gdbserver_version): Likewise.
7621
8b93d60f
JB
76222012-12-17 Joel Brobecker <brobecker@adacore.com>
7623
7624 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7625 new thread.
7626
037335a7
JB
76272012-12-17 Joel Brobecker <brobecker@adacore.com>
7628
7629 * lynx-low.c (ptrace_request_to_str): Add handling for
7630 PTRACE_GETTRACESIG.
7631
52d4cbd8
JB
76322012-12-17 Joel Brobecker <brobecker@adacore.com>
7633
7634 * lynx-low.c (lynx_attach): Delete variable new_process.
7635
ab8f6ca9
JB
76362012-12-17 Joel Brobecker <brobecker@adacore.com>
7637
7638 * lynx-low.c (lynx_create_inferior): Delete variable
7639 new_process.
7640
78cbc024
JB
76412012-12-17 Joel Brobecker <brobecker@adacore.com>
7642
7643 * lynx-low.c (ptrace_request_to_str): Do not handle
7644 PTRACE_GETTHREADLIST if this macro does not exist.
7645
14a00470
YQ
76462012-12-15 Yao Qi <yao@codesourcery.com>
7647
7648 * Makefile.in (OBS): Add notif.o.
7649 * notif.c, notif.h: New.
7650 * server.c: Include "notif.h".
7651 (struct vstop_notif) <next>: Remove.
7652 <base>: New field.
7653 (queue_stop_reply): Update.
7654 (push_event, send_next_stop_reply): Remove.
7655 (discard_queued_stop_replies): Update.
7656 (notif_stop): New variable.
7657 (handle_v_stopped): Remove.
7658 (handle_v_requests): Don't call handle_v_stopped. Call
7659 handle_ack_notif instead.
7660 (queue_stop_reply_callback): Call notif_event_enque instead
7661 of queue_stop_reply.
7662 (handle_status): Don't call send_next_stop_reply, call
7663 notif_write_event instead.
7664 (kill_inferior_callback): Likewise.
7665 (detach_or_kill_inferior_callback): Likewise.
7666 (main): Call initialize_notif.
7667 (process_serial_event): Call QUEUE_is_empty.
7668 (handle_target_event): Call notif_push instead of push event.
7669 * server.h (push_event): Remove declaration.
7670
61c125b9
TT
76712012-12-10 Tom Tromey <tromey@redhat.com>
7672
7673 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7674 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7675 macros.
7676 (.c.o): Rewrite.
7677 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7678 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7679 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7680 (amd64-linux-ipa.o, ax.o): Rewrite.
7681 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7682 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7683 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7684 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7685 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7686 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7687 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7688 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7689 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7690 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7691 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7692 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7693 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7694 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7695 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7696 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7697 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7698 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7699 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7700 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7701 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7702 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7703 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7704 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7705 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7706 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7707 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7708 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7709 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7710 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7711 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7712 (reg-tilegx.o): Remove.
7713 (all_object_files): New macro.
7714 Include .deps files.
7715 * aclocal.m4, configure: Rebuild.
7716 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7717 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7718 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7719
e90e9ad9
TT
77202012-12-05 Tom Tromey <tromey@redhat.com>
7721
7722 PR gdb/14917:
7723 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7724
02d403bf 77252012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7726
7727 * configure.ac: Check for linux/perf_event.h.
7728 * config.in: Regenerated.
7729 * configure: Regenerated.
7730
0270a750
PA
77312012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7732
7733 * hostio.c (handle_readlink): Decrease buffer size
7734 parameter passed to readlink by one byte.
7735
8c29b58e
YQ
77362012-11-26 Yao Qi <yao@codesourcery.com>
7737
7738 * configure.ac (build_warnings): Append '-Wempty-body'.
7739 * configure: Regenerated.
7740 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7741 body.
7742
8bdce1ff
PM
77432012-11-15 Pierre Muller <muller@sourceware.org>
7744
7745 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7746 * config.in: Regenerate.
7747 * configure: Regenerate.
7748 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7749 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7750 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7751 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7752 header.
7753 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7754 instead of <sys/wait.h> header.
7755 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7756
02d403bf 77572012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7758
7759 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7760 (various make rules): Remove -DGDBSERVER
7761
fbd5db48
YQ
77622012-11-09 Yao Qi <yao@codesourcery.com>
7763
7764 * spu-low.c (current_ptid): Move it to ..
7765 * gdbthread.h: ... here. New.
7766 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7767 * server.c (myresume, process_serial_event): Likewise.
7768 * thread-db.c (thread_db_find_new_threads): Likewise.
7769 * tracepoint.c (run_inferior_command): Likewise.
7770
b3dc46ff
AB
77712012-10-01 Andrew Burgess <aburgess@broadcom.com>
7772
7773 * server.c (handle_search_memory_1): Include access length in
7774 warning message.
7775
07c04788
HPN
77762012-09-05 Michael Brandt <michael.brandt@axis.com>
7777
7778 * linux-crisv32-low.c: Fix compile errors.
7779
918d227b
YQ
77802012-09-04 Yao Qi <yao@codesourcery.com>
7781
7782 * tracepoint.c (cmd_qtsv): Adjust debug message.
7783 Don't check CUR_TPOINT.
7784
18c1b81a
YQ
77852012-08-28 Yao Qi <yao@codesourcery.com>
7786
7787 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7788 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7789 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7790 Remove declarations of xmalloc, xreallloc, xstrdup and
7791 freeargv.
7792 * Makefile.in (libiberty_h): New.
7793 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7794 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7795
dc82f37b
YQ
77962012-08-23 Yao Qi <yao@codesourcery.com>
7797
7798 * server.h: Remove declaration of 'xsnprintf'.
7799
406b1477
KS
78002012-08-22 Keith Seitz <keiths@redhat.com>
7801
7802 * server.h: Include build-gnulib-gbserver/config.h.
7803 * gdbreplay.c: Likewise.
7804
e6712ff1
DE
78052012-08-08 Doug Evans <dje@google.com>
7806
7807 * Makefile.in (SFILES): Add gdb_vecs.c.
7808 (OBS): Add gdb_vecs.o.
7809 (gdb_vecs_h, host_defs_h): New variables.
7810 (thread-db.o): Add $(gdb_vecs_h) dependency.
7811 (gdb_vecs.o): New rule.
7812 * thread-db.c: #include "gdb_vecs.h".
7813 (thread_db_load_search): Use a vector to iterate over path elements.
7814 Handle text appearing after "$pdir".
7815
7816 * configure.ac: Add check for strstr.
7817 * config.in: Regenerate.
7818 * configure: Regenerate.
7819
7c3270ae
UW
78202012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7821
7822 * hostio.c (handle_pread): If pread fails, fall back to attempting
7823 lseek/read.
7824 (handle_pwrite): Likewise for pwrite.
7825
b62e2b27
UW
78262012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7827
7828 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7829 between unsupported TYPE and unimplementable ADDR/LEN combination.
7830 (arm_insert_point): Act on new return value.
7831
78a99e91
PA
78322012-07-31 Pedro Alves <palves@redhat.com>
7833
7834 * server.c (process_point_options): Only skip tokens if we find
7835 one that is unrecognized. Don't treat 'X' specially while
7836 skipping unrecognized tokens.
7837
fcf303ab
UW
78382012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7839
7840 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7841 to 4-byte-align HW breakpoint addresses for Thumb.
7842
7255706c
YQ
78432012-07-27 Yao Qi <yao@codesourcery.com>
7844
7845 PR remote/14161.
7846
7847 * server.h: Declare gdb_agent_about_to_close.
7848 * target.c (kill_inferior): Include "agent.h".
7849 New. Send command 'kill'.
7850 * target.h (kill_inferior): Removed macro.
7851 * tracepoint.c (gdb_agent_about_to_close): New.
7852 (gdb_agent_helper_thread): Handle command 'close'.
7853 Wait endlessly until the inferior stops.
7854 Install gdb_agent_remove_socket to atexit hook.
7855 (agent_socket_name): New static variable.
7856 (gdb_agent_socket_init): Replace local variable 'name' with
7857 'agent_socket_name'.
7858 (gdb_agent_remove_socket): New.
7859
5a3f286f
YQ
78602012-07-27 Yao Qi <yao@codesourcery.com>
7861
7862 * server.c (process_point_options): Stop at 'X' when parsing.
7863
961bd387
ME
78642012-07-19 Michael Eager <eager@eagercon.com>
7865
a261b8f5 7866 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7867 to hw_execute.
7868 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7869 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7870 hardware breakpoint.
7871
aa7c7447
JK
78722012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7873
7874 * gdbserver/linux-low.c (initialize_low): Call
7875 linux_ptrace_init_warnings.
7876
7f216e7c
DE
78772012-07-02 Doug Evans <dje@google.com>
7878
7879 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7880 pointer to int.
7881
d3ce09f5
SS
78822012-07-02 Stan Shebs <stan@codesourcery.com>
7883
7884 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7885 (ax.o): Add it to build rule.
7886 (ax-ipa.o): Ditto.
7887 (OBS): Add format.o.
7888 (IPA_OBS): Add format.o.
7889 * server.c (handle_query): Claim support for breakpoint commands.
7890 (process_point_options): Add command case.
7891 (process_serial_event): Leave running if there are printfs in
7892 effect.
7893 * mem-break.h (any_persistent_commands): Declare.
7894 (add_breakpoint_commands): Declare.
7895 (gdb_no_commands_at_breakpoint): Declare.
7896 (run_breakpoint_commands): Declare.
7897 * mem-break.c (struct point_command_list): New struct.
7898 (struct breakpoint): New field command_list.
7899 (any_persistent_commands): New function.
7900 (add_commands_to_breakpoint): New function.
7901 (add_breakpoint_commands): New function.
7902 (gdb_no_commands_at_breakpoint): New function.
7903 (run_breakpoint_commands): New function.
7904 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7905 locally.
7906 * ax.c: Include format.h.
7907 (ax_printf): New function.
7908 (gdb_eval_agent_expr): Add printf opcode.
7909
2f8f6aed
YQ
79102012-06-13 Yao Qi <yao@codesourcery.com>
7911
7912 * server.c (start_inferior): Remove duplicated writes to fields
7913 'last_resume_kind' and 'last_status' of 'current_inferior'.
7914
0c9070b3
YQ
79152012-06-12 Yao Qi <yao@codesourcery.com>
7916 Pedro Alves <palves@redhat.com>
7917
7918 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7919 comment.
7920 * server.c (handle_v_cont): Extend comment.
7921
c52daf70
YQ
79222012-06-11 Yao Qi <yao@codesourcery.com>
7923
7924 * linux-low.c (linux_attach): Add 'static'.
7925
d38bbb0a
YQ
79262012-06-06 Yao Qi <yao@codesourcery.com>
7927
7928 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7929
89dc0afd
JK
79302012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7931
7932 Fix gcc -flto compilation warning.
7933 * server.c (main): Make variable multi_mode and attach volatile.
7934
75f62ce7
TJB
79352012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7936
7937 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7938 if the platform doesn't know about it.
7939
65f479b6
PA
79402012-05-30 Jeff Kenton <jkenton@tilera.com>
7941
7942 * Makefile.in (SFILES): Add linux-tile-low.c.
7943 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7944 * configure.srv: Handle tilegx-*-linux*.
7945 * linux-tile-low.c: New file.
7946
0c5bf5a9
JK
79472012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7948
7949 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7950
a493e3e2
PA
79512012-05-24 Pedro Alves <palves@redhat.com>
7952
7953 PR gdb/7205
7954
43aaf8b6 7955 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7956
2ea28649
PA
79572012-05-24 Pedro Alves <palves@redhat.com>
7958
7959 PR gdb/7205
7960
7961 Replace target_signal with gdb_signal throughout.
7962
8d409d16
MR
79632012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7964
7965 * linux-low.c (linux_store_registers): Avoid the copying sequence
7966 when no data has been retrieved by ptrace.
7967
23512c01
MGD
79682012-05-22 Will Deacon <will.deacon@arm.com>
7969
7970 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7971 Include asm/ptrace.h.
7972 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7973 already defined.
7974
4934b29e
MR
79752012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7976
7977 * linux-low.c (linux_store_registers): Don't re-retrieve data
7978 with ptrace that has already been obtained from /proc. Always
7979 copy any data retrieved with ptrace to the buffer supplied.
7980
bde24c0a
PA
79812012-05-11 Yao Qi <yao@codesourcery.com>
7982 Pedro Alves <palves@redhat.com>
7983
7984 * linux-low.c (enum stopping_threads_kind): New.
7985 (stopping_threads): Change type to `enum stopping_threads_kind'.
7986 (handle_extended_wait): If stopping and suspending threads, leave
7987 the new_lwp suspended too.
7988 (linux_wait_for_event): Adjust.
7989 (stop_all_lwps): Set `stopping_threads' to
7990 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7991 whether we're suspending threads or just stopping them. Assert no
7992 recursion happens.
7993
623b6bdf
YQ
79942012-04-29 Yao Qi <yao@codesourcery.com>
7995
7996 * server.h: Move some code to ...
7997 * gdbthread.h: ... here. New.
7998 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7999 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8000 (nto-low.o, win32-low.o): Likewise.
8001 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8002 * regcache.c, remote-utils.c, server.c: Likewise.
8003 * target.c, tracepoint.c, win32-low.c: Likewise.
8004
f15f9948
TJB
80052012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8006
8007 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8008 (PTRACE_ARG4_TYPE): Likewise.
8009 (PTRACE_XFER_TYPE): Likewise.
8010 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8011 ptrace to PTRACE_ARG3_TYPE.
8012 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8013 (PTRACE_ARG4_TYPE): Likewise.
8014 (PTRACE_XFER_TYPE): Likewise.
8015 (linux_detach_one_lwp): Cast fourth argument of
8016 ptrace to long then PTRACE_ARG4_TYPE.
8017 (regsets_fetch_inferior_registers): Cast third argument of
8018 ptrace to long then PTRACE_ARG3_TYPE.
8019 (regsets_store_inferior_registers): Likewise.
8020
38ea300a
PA
80212012-04-20 Pedro Alves <palves@redhat.com>
8022
8023 * configure: Regenerate.
8024
c971b7fa
PA
80252012-04-19 Pedro Alves <palves@redhat.com>
8026
43aaf8b6 8027 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8028 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8029 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8030 (all, install-only, uninstall, clean-info, all-lib, clean): No
8031 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8032 (maintainer-clean realclean distclean): Use subdir_do.
8033 (subdir_do): New.
8034 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8035 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8036 * acinclude.m4: Include acx_configure_dir.m4.
8037 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8038 calls. Call AC_PROG_RANLIB. Configure gnulib using
8039 ACX_CONFIGURE_DIR.
8040 (GNULIB): New.
8041 (GNULIB_STDINT_H): Adjust.
8042 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8043 * gdbreplay.c: Include build-gnulib/config.h.
8044 * server.h: Likewise.
8045 * aclocal.m4: Regenerate.
8046 * config.in: Regenerate.
8047 * configure: Regenerate.
c971b7fa 8048
809277f8
PA
80492012-04-19 Pedro Alves <palves@redhat.com>
8050
8051 * Makefile.in (LIBGNU, INCGNU): Adjust.
8052 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8053 (all, install-only, uninstall, clean-info, all-lib, clean)
8054 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8055 * configure.ac: Adjust AC_OUTPUT output.
8056 * aclocal.m4: Regenerate.
8057 * configure: Regenerate.
8058
fd9bb8b8
PA
80592012-04-19 Pedro Alves <palves@redhat.com>
8060
8061 * Makefile.in (generated_files): New.
8062 (server_h): Remove the explicit dependency on config.h, and depend
8063 on $generated_files.
8064
1c298c66
PA
80652012-04-19 Pedro Alves <palves@redhat.com>
8066
8067 * Makefile.in (INCGNU): Add -Ignulib.
8068
57c4b50b
PA
80692012-04-19 Pedro Alves <palves@redhat.com>
8070
8071 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8072 (INCGNU): ... this, and spell out -I here.
8073 (GNULIB_LIB): Rename to ...
8074 (LIBGNU): ... this.
8075 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8076
1030e047
PA
80772012-04-19 Pedro Alves <palves@redhat.com>
8078
8079 * config.in: Regenerate.
8080
447d4319
PA
80812012-04-19 Pedro Alves <palves@redhat.com>
8082
8083 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8084 * server.h (memmem): Remove declaration.
8085 * config.in: Regenerate.
8086 * configure: Regenerate.
8087
aad9eab9
YQ
80882012-04-19 Yao Qi <yao@codesourcery.com>
8089
8090 * Makefile.in (SFILES): Add common/vec.c.
8091 (OBS): Add vec.o.
8092 (vec.o): New rule.
8093
3e10640f
YQ
80942012-04-19 Yao Qi <yao@codesourcery.com>
8095
8096 * remote-utils.c (prepare_resume_reply): Replace with macro
8097 target_core_of_thread.
8098 * server.c (handle_qxfer_threads_proper): Likewise.
8099 * target.h (traget_core_of_thread): New macro.
8100
71622373
PA
81012012-04-18 Pedro Alves <palves@redhat.com>
8102
8103 * aclocal.m4: Regenerate.
8104 * configure: Regenerate.
8105
80d26939
YQ
81062012-04-16 Yao Qi <yao@codesourcery.com>
8107
8108 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8109 duplicated on address.
8110
42476b70
YQ
81112012-04-16 Yao Qi <yao@codesourcery.com>
8112
8113 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8114 (struct tracepoint_action_ops) <send>: New field.
8115 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8116 (agent_expr_send, x_tracepoint_action_send): New.
8117 (l_tracepoint_action_send): New.
8118 (cmd_qtdp): Download and install tracepoint
8119 according to `use_agent'.
8120 (run_inferior_command): Add one more parameter `len'.
8121 Update callers.
8122 (tracepoint_send_agent): New.
8123 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8124
7bc83639
YQ
81252012-04-16 Yao Qi <yao@codesourcery.com>
8126
8127 * tracepoint.c (download_tracepoints): Moved to ...
8128 (cmd_qtstart): ... here.
8129
5f18041e
YQ
81302012-04-14 Yao Qi <yao@codesourcery.com>
8131
8132 * tracepoint.c: Include inttypes.h.
8133 (struct collect_memory_action): Use sized types.
8134 (struct tracepoint): Likewise.
8135 (cmd_qtdp, stop_tracing): Update print specifiers.
8136 (cmd_qtp, response_tracepoint): Likewise.
8137 (collect_data_at_tracepoint): Likewise.
8138 (collect_data_at_step): Likewise.
8139
55a8c076
YQ
81402012-04-14 Yao Qi <yao@codesourcery.com>
8141
8142 Import gnulib module inttypes.
8143 * aclocal.m4, config.in, configure: Regenerated.
8144
dc750257
YQ
81452012-04-14 Yao Qi <yao@codesourcery.com>
8146
8147 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8148 Makefile and config.status at last.
8149
0ab5faf9
YQ
81502012-04-13 Yao Qi <yao@codesourcery.com>
8151
8152 * tracepoint.c: Include stdint.h unconditionally.
8153
18f5fd81
TJB
81542012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8155
8156 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8157 on BFD_HAVE_SYS_PROCFS_TYPE.
8158 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8159 * configure: Regenerate.
8160 * config.in: Likewise.
8161
4d47af5c
L
81622012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8163
8164 * Makefile.in (clean): Also remove x32.c x32-linux.c
8165 x32-avx.c x32-avx-linux.c.
8166 (x32.o): New target.
8167 (x32.c): Likewise.
8168 (x32-linux.o): Likewise.
8169 (x32-linux.c): Likewise.
8170 (x32-avx.o): Likewise.
8171 (x32-avx.c): Likewise.
8172 (x32-avx-linux.o): Likewise.
8173 (x32-avx-linux.c): Likewise.
8174
8175 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8176 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8177 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8178 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8179 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8180 i386/x32-avx-linux.xml.
8181
8182 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8183 (init_registers_x32_avx_linux): Likwise.
8184 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8185 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8186
ecedbe58
PA
81872012-04-13 Pedro Alves <palves@redhat.com>
8188
8189 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8190 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8191 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8192 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8193 the sub-make.
8194
c92b5177
L
81952012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8196
8197 * linux-x86-low.c (compat_x32_clock_t): New.
8198 (compat_x32_siginfo_t): Likewise.
8199 (compat_x32_siginfo_from_siginfo): Likewise.
8200 (siginfo_from_compat_x32_siginfo): Likewise.
8201 (linux_is_elf64): Likewise.
8202 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8203 and siginfo_from_compat_x32_siginfo for x32.
8204 (x86_arch_setup): Set linux_is_elf64.
8205
214d508e
L
82062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8207
8208 PR gdb/13969
8209 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8210 e_machine field.
8211 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8212 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8213 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8214 compatible with process.
8215
c9a1864a
YQ
82162012-04-12 Yao Qi <yao@codesourcery.com>
8217
8218 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8219 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8220 (install-only, install-info, clean): Handle sub dir gnulib.
8221 (all-lib, am--refresh): New targets.
8222 (memmem.o): Remove target.
8223 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8224 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8225 (AC_REPLACE_FUNCS): Remove memmem.
8226 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8227 (AC_OUTPUT): Generate Makefile in gnulib/.
8228 * aclocal.m4, config.in, configure: Regenerated.
8229
367ba2c2
MR
82302012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8231
8232 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8233
9d236627
PA
82342012-04-05 Pedro Alves <palves@redhat.com>
8235
8236 -Werror=strict-aliasing
8237
8238 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8239 pointer.
8240
111217b3
PA
82412012-04-04 Pedro Alves <palves@redhat.com>
8242
8243 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8244 (sparc_store_gregset_from_stack, sparc_store_gregset)
8245 (sparc_breakpoint_at): Fix formatting.
8246
8365dcf5
TJB
82472012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8248
8249 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8250 are available.
8251 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8252 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8253 * config.in: Regenerate.
8254 * configure: Likewise.
8255
689cc2ae
PA
82562012-03-29 Pedro Alves <palves@redhat.com>
8257
8258 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8259 Correct ptrace arguments.
8260
c14dfd32
PA
82612012-03-28 Pedro Alves <palves@redhat.com>
8262
8263 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8264 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8265 (IA64_FR1_REGNUM): New defines.
8266 (ia64_fetch_register): New.
8267 (the_low_target): Install it.
8268 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8269 field.
8270 * linux-low.c (linux_fetch_registers): Try the
8271 the_low_target.fetch_register hook first.
8272
8273 * linux-arm-low.c (the_low_target): Adjust.
8274 * linux-bfin-low.c (the_low_target): Adjust.
8275 * linux-cris-low.c (the_low_target): Adjust.
8276 * linux-crisv32-low.c (the_low_target): Adjust.
8277 * linux-m32r-low.c (the_low_target): Adjust.
8278 * linux-m68k-low.c (the_low_target): Adjust.
8279 * linux-mips-low.c (the_low_target): Adjust.
8280 * linux-ppc-low.c (the_low_target): Adjust.
8281 * linux-s390-low.c (the_low_target): Adjust.
8282 * linux-sh-low.c (the_low_target): Adjust.
8283 * linux-sparc-low.c (the_low_target): Adjust.
8284 * linux-tic6x-low.c (the_low_target): Adjust.
8285 * linux-x86-low.c (the_low_target): Adjust.
8286 * linux-xtensa-low.c (the_low_target): Adjust.
8287
63c88e13
PA
82882012-03-26 Pedro Alves <palves@redhat.com>
8289
8290 * server.c (handle_qxfer_libraries): Don't bail early if
8291 the_target->qxfer_libraries_svr4 is not NULL.
8292
fb723180
PA
82932012-03-26 Pedro Alves <palves@redhat.com>
8294
8295 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8296
0afae3cf
PA
82972012-03-23 Pedro Alves <palves@redhat.com>
8298
8299 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8300 "library-list-svr4" element's start tag when the the DSO list is
8301 empty.
8302
485f1ee4
PA
83032012-03-23 Pedro Alves <palves@redhat.com>
8304
8305 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8306 a variable whose type size is the same as the inferior's pointer
8307 size.
8308
a5362b9a
TS
83092012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8310
8311 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8312 struct siginfo.
8313 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8314 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8315 * linux-low.h: Include <signal.h>.
8316 (struct siginfo): Remove forward declaration.
8317 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8318 struct siginfo.
8319
d226c142
MF
83202012-03-21 Mike Frysinger <vapier@gentoo.org>
8321
8322 * .gitignore: Ignore more files.
8323
122f36ef
PA
83242012-03-19 Pedro Alves <palves@redhat.com>
8325 Jan Kratochvil <jan.kratochvil@redhat.com>
8326
8327 * server.c (cont_thread, general_thread): Add describing comments.
8328 (start_inferior): Clear `cont_thread'.
8329 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8330 of a process.
8331
fc3e5175
YQ
83322012-03-15 Yao Qi <yao@codesourcery.com>
8333
8334 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8335 handling to ...
8336 (cmd_qtdp): ... here.
8337
8d0d92cd
YQ
83382012-03-15 Yao Qi <yao@codesourcery.com>
8339
8340 * tracepoint.c (struct tracepoint_action_ops): New.
8341 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8342 (m_tracepoint_action_download): New.
8343 (r_tracepoint_action_download): New.
8344 (x_tracepoint_action_download): New.
8345 (l_tracepoint_action_download): New.
8346 (add_tracepoint_action): Install `action->ops' according type.
8347 (download_tracepoint_1): Move code `download' function pointer
8348 of various tracepoint_action_ops.
8349
87b0bb13
JK
83502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8351
8352 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8353 linux_ptrace_attach_warnings.
8354
5f572dec
JK
83552012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8356
8357 * Makefile.in (linux-ptrace.o): New.
8358 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8359 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8360 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8361 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8362 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8363 of these targets.
8364 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8365
f4647387
YQ
83662012-03-08 Yao Qi <yao@codesourcery.com>
8367 Pedro Alves <palves@redhat.com>
8368
8369 Fix PR server/13392.
8370 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8371 offset of JMP insn.
8372 * tracepoint.c (remove_tracepoint): New.
8373 (cmd_qtdp): Call remove_tracepoint when failed to install.
8374
9b224c5e
PA
83752012-03-07 Pedro Alves <palves@redhat.com>
8376
8377 * linux-low.c (get_detach_signal): New.
8378 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8379 Pass on pending signals to PTRACE_DETACH. Check the result of the
8380 ptrace call.
8381 * server.c (program_signals, program_signals_p): New.
8382 (handle_general_set): Handle QProgramSignals.
8383 * server.h (program_signals, program_signals_p): Declare.
8384
e237a7e2
JK
83852012-03-05 Pedro Alves <palves@redhat.com>
8386 Jan Kratochvil <jan.kratochvil@redhat.com>
8387
8388 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8389 New comment why.
8390
5808517f
YQ
83912012-03-03 Yao Qi <yao@codesourcery.com>
8392
8393 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8394 agent_look_up_symbols.
8395
58b4daa5
YQ
83962012-03-03 Yao Qi <yao@codesourcery.com>
8397
8398 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8399 (linux-x86-low.o): Likewise.
8400 * server.h: Remove in_process_agent_loaded.
8401 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8402 common/agent.c.
8403 Update callers.
8404
8ffcbaaf
YQ
84052012-03-03 Yao Qi <yao@codesourcery.com>
8406
8407 * tracepoint.c (gdb_agent_capability): New global.
8408 (in_process_agent_loaded_ust): Renamed to
8409 `in_process_agent_supports_ust'.
8410 Update callers.
8411 (in_process_agent_supports_ust): Call agent_capability_check.
8412 (clear_installed_tracepoints): Assert that agent supports
8413 agent.
8414
d1feda86
YQ
84152012-03-03 Yao Qi <yao@codesourcery.com>
8416
8417 * linux-low.c (linux_supports_agent): New.
8418 (linux_target_ops): Initialize field `supports_agent' with
8419 linux_supports_agent.
8420 * target.h (struct target_ops) <supports_agent>: New.
8421 (target_supports_agent): New macro.
8422 * server.c (handle_general_set): Handle packet 'QAgent'.
8423 (handle_query): Send `QAgent+'.
8424 * Makefile.in (server.o): Depends on agent.h.
8425
2fa291ac
YQ
84262012-03-03 Yao Qi <yao@codesourcery.com>
8427
8428 * Makefile.in (OBS): Add agent.o.
8429 Add new rule for agent.o.
8430 Track dependence of tracepoint.c on agent.h.
8431 * tracepoint.c (run_inferior_command_1):
8432 (run_inferior_command): Call agent_run_command.
8433 (gdb_ust_connect_sync_socket): Deleted. Move it to
8434 common/agent.c.
8435 (resume_thread, stop_thread): Likewise.
8436 (gdb_ust_socket_init): Renamed to ...
8437 (gdb_agent_socket_init): ... New.
8438 (gdb_ust_thread): Renamed to ...
8439 (gdb_agent_helper_thread): ... New.
8440 (gdb_ust_init): Move some code to ...
8441 (gdb_agent_init): ... here. New.
8442 [HAVE_UST]: Call gdb_ust_init.
8443 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8444 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8445 * config.in, configure: Regenerated.
8446
05044653
PA
84472012-03-02 Pedro Alves <palves@redhat.com>
8448
8449 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8450 * linux-low.c (struct simple_pid_list): New.
8451 (stopped_pids): New a struct simple_pid_list pointer.
8452 (add_to_pid_list, pull_pid_from_list): New.
8453 (handle_extended_wait): Don't assume the first signal new children
8454 report is SIGSTOP. Adjust call to pull_pid_from_list.
8455 (linux_wait_for_lwp): Adjust.
8456
8d00225b
YQ
84572012-03-02 Yao Qi <yao@codesourcery.com>
8458
8459 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8460 debug log.
8461
19560ba5
YQ
84622012-03-02 Yao Qi <yao@codesourcery.com>
8463
8464 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8465 `stop_pc' and `tpoint'. Update caller.
8466
1faeff08
MR
84672012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8468
8469 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8470 * linux-low.c (use_linux_regsets): New macro.
8471 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8472 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8473 (linux_register_in_regsets): New function.
8474 (usr_fetch_inferior_registers): Skip registers covered by
8475 regsets.
8476 (usr_store_inferior_registers): Likewise.
8477 (usr_fetch_inferior_registers): New macro.
8478 (usr_store_inferior_registers): Likewise.
8479 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8480 (linux_store_registers): Likewise.
8481 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8482 prototype.
8483 (init_registers_mips64_dsp_linux): Likewise.
8484 (init_registers_mips_linux): New macro.
8485 (init_registers_mips_dsp_linux): Likewise.
8486 (mips_dsp_num_regs): Likewise.
8487 (DSP_BASE, DSP_CONTROL): New fallback macros.
8488 (mips_base_regs): New macro.
8489 (mips_regmap): Use it. Fix the size.
8490 (mips_dsp_regmap): New variable.
8491 (mips_dsp_regset_bitmap): Likewise.
8492 (mips_arch_setup): New function.
8493 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8494 than mips_regmap.
8495 (mips_cannot_store_register): Likewise.
8496 (the_low_target): Update .arch_setup, .num_regs and .regmap
8497 initializers. Add .regset_bitmap initializer.
8498 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8499 initializer.
8500 * linux-bfin-low.c (the_low_target): Likewise.
8501 * linux-cris-low.c (the_low_target): Likewise.
8502 * linux-crisv32-low.c (the_low_target): Likewise.
8503 * linux-ia64-low.c (the_low_target): Likewise.
8504 * linux-m32r-low.c (the_low_target): Likewise.
8505 * linux-m68k-low.c (the_low_target): Likewise.
8506 * linux-ppc-low.c (the_low_target): Likewise.
8507 * linux-s390-low.c (the_low_target): Likewise.
8508 * linux-sh-low.c (the_low_target): Likewise.
8509 * linux-sparc-low.c (the_low_target): Likewise.
8510 * linux-tic6x-low.c (the_low_target): Likewise.
8511 * linux-x86-low.c (the_low_target): Likewise.
8512 * linux-xtensa-low.c (the_low_target): Likewise.
8513 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8514 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8515 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8516 srv_xmlfiles.
8517 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8518 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8519
c03e6ccc
YQ
85202012-02-29 Yao Qi <yao@codesourcery.com>
8521 Pedro Alves <palves@redhat.com>
8522
8523 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8524 `step_over_finished' is true.
8525
644cebc9
PA
85262012-02-27 Pedro Alves <palves@redhat.com>
8527
8528 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8529 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8530
c14d7ab2
PA
85312012-02-27 Pedro Alves <palves@redhat.com>
8532
8533 PR server/9684
8534 * linux-low.c (pid_is_stopped): New.
8535 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8536
412c89dd
LM
85372012-02-25 Luis Machado <lgustavo@codesourcery.com>
8538
8539 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8540 of conditions.
8541
b745defe
MR
85422012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8543
8544 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8545
9f3a5c85
LM
85462012-02-24 Luis Machado <lgustavo@codesourcery>
8547
8548 * server.c (handle_query): Advertise support for target-side
8549 breakpoint condition evaluation.
8550 (process_point_options): New function.
8551 (process_serial_event): When inserting a breakpoint, check for
8552 a target-side condition that should be evaluated.
8553
8554 * mem-break.c: Include regcache.h and ax.h.
8555 (point_cond_list_t): New data structure.
8556 (breakpoint) <cond_list>: New field.
8557 (find_gdb_breakpoint_at): Make non-static.
8558 (delete_gdb_breakpoint_at): Clear any target-side
8559 conditions.
8560 (clear_gdb_breakpoint_conditions): New function.
8561 (add_condition_to_breakpoint): Likewise.
8562 (add_breakpoint_condition): Likewise.
8563 (gdb_condition_true_at_breakpoint): Likewise.
8564 (gdb_breakpoint_here): Return result directly instead
8565 of going through a local variable.
8566
8567 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8568 (clear_gdb_breakpoint_conditions): Likewise.
8569 (add_breakpoint_condition): Likewise.
8570 (gdb_condition_true_at_breakpoint): Likewise.
8571
8572 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8573 (need_step_over_p): Take target-side breakpoint condition into
8574 consideration.
8575
5e1dc496
LM
85762012-02-24 Luis Machado <lgustavo@codesourcery>
8577
8578 * server.h: Include tracepoint.h.
8579 (agent_mem_read, agent_get_trace_state_variable_value,
8580 agent_set_trace_state_variable_value,
8581 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8582 get_set_tsv_func_addr): New prototypes.
8583
8584 * ax.h: New include file.
8585 * ax.c: New source file.
8586
8587 * tracepoint.c: Include ax.h.
8588 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8589 agent_expr, eval_result_type): Move to ax.h.
8590 (parse_agent_expr): Rename to ...
8591 (gdb_parse_agent_expr): ... this, make it non-static and move
8592 to ax.h.
8593 (unparse_agent_expr) Rename to ...
8594 (gdb_unparse_agent_expr): ... this, make it non-static and move
8595 to ax.h.
8596 (eval_agent_expr): Rename to ...
8597 (eval_tracepoint_agent_expr): ... this.
8598 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8599 forward declarations.
8600 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8601 (agent_get_trace_state_variable_value): New function.
8602 (agent_set_trace_state_variable_value): New function.
8603 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8604 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8605 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8606 (condition_true_at_tracepoint): Likewise.
8607 (parse_agent_expr): Rename to ...
8608 (gdb_parse_agent_expr): ... this and move to ax.c.
8609 (unparse_agent_expr): Rename to ...
8610 (gdb_unparse_agent_expr): ... this and move to ax.c.
8611 (gdb_agent_op_name): Move to ax.c.
8612 (eval_agent_expr): Rename to ...
8613 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8614 and move to ax.c.
8615 (eval_tracepoint_agent_expr): New function.
8616 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8617 non-static.
5e1dc496
LM
8618 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8619 ax.c.
8620 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8621 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8622 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8623 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8624 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8625 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8626 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8627 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8628 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8629 (compile_bytecodes): Remove forward declaration.
8630 (is_goto_target): Move to ax.c.
8631 (compile_bytecodes): Move to ax.c and call
8632 agent_get_trace_state_variable_value (...) and
8633 agent_set_trace_state_variable_value (...).
8634
8635 * Makefile.in: Update ax.c and IPA dependencies.
8636
277e4e52
PA
86372012-02-24 Pedro Alves <palves@redhat.com>
8638
8639 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8640 (cmd_bigqtbuffer_circular): ... this. Only handle
8641 'QTBuffer:circular:'.
8642 (handle_tracepoint_general_set): Adjust.
8643
bf4c19f7
YQ
86442012-02-16 Yao Qi <yao@codesourcery.com>
8645
8646 * inferiors.c: Move code to ...
8647 * dll.c: .... here. New.
8648 * server.h: Declare clear_dlls.
8649 * Makefile.in (SFILES): Add dll.c.
8650 (OBS): Add dll.o
8651 (dll.o): New rule.
8652
d73f2619
YQ
86532012-02-11 Yao Qi <yao@codesourcery.com>
8654
8655 * server.c: (handle_monitor_command): Add a new parameter
8656 `own_buf'.
8657 (handle_query): Update caller.
8658
f8255c2a
JB
86592012-02-09 Joel Brobecker <brobecker@adacore.com>
8660
8661 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8662 * configure, config.in: Regenerate.
8663 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8664 is not defined.
8665
da84f473
PA
86662012-02-02 Pedro Alves <palves@redhat.com>
8667
8668 Try SIGKILL first, then PTRACE_KILL.
8669 * linux-low.c (linux_kill_one_lwp): New.
8670 (linux_kill_one_lwp): Rename to ...
8671 (kill_one_lwp_callback): ... this. Use the new
8672 linux_kill_one_lwp.
8673
e886a173
PA
86742012-02-02 Pedro Alves <palves@redhat.com>
8675
8676 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8677 inferior.
8678
be07f1a2
PA
86792012-01-27 Pedro Alves <palves@redhat.com>
8680
8681 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8682 (elf_64_file_p): Make static.
8683 (linux_pid_exe_is_elf_64_file): New.
8684 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8685 Delete declarations.
8686 (linux_pid_exe_is_elf_64_file): Declare.
8687 * linux-x86-low.c (x86_arch_setup): Use
8688 linux_pid_exe_is_elf_64_file.
8689
d8301ad1
JK
86902012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8691
8692 * linux-low.c (linux_wait_for_event_1): Rename to ...
8693 (linux_wait_for_event): ... here and merge it with former
8694 linux_wait_for_event - new variable wait_ptid, use it.
8695 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8696
01b17894
PA
86972012-01-23 Pedro Alves <palves@redhat.com>
8698
8699 * server.c (main): Avoid yet another case of infinite loop while
8700 detaching/killing after a longjmp.
8701
e825046f
JK
87022012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8703
8704 Code cleanup.
8705 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8706
b9e7b9c3
UW
87072012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8708
8709 * hostio.c (handle_readlink): New function.
8710 (handle_vFile): Call it to handle "vFile:readlink" packets.
8711
901f9912
UW
87122012-01-20 Pedro Alves <palves@redhat.com>
8713 Ulrich Weigand <ulrich.weigand@linaro.org>
8714
8715 * server.c (handle_v_requests): Only support vAttach and vRun to
8716 start multiple processes when in extended protocol mode.
8717
fc1ab1a0
PA
87182012-01-17 Pedro Alves <palves@redhat.com>
8719
8720 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8721 memalign plus mprotect to allocate the scratch buffer.
8722
7d5d4e98
PA
87232012-01-13 Pedro Alves <palves@redhat.com>
8724
8725 * server.c (attach_inferior): Clear `cont_thread'.
8726
f128d5e9
PA
87272012-01-13 Pedro Alves <palves@redhat.com>
8728
8729 * server.c (main): Avoid infinite loop while detaching/killing
8730 after a longjmp.
8731
06db92f0
DE
87322012-01-09 Doug Evans <dje@google.com>
8733
8734 * server.c (start_inferior): Set last_ptid in --wrapper case.
8735
32d92999
YQ
87362012-01-06 Yao Qi <yao@codesourcery.com>
8737
8738 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8739 defined.
8740 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8741
5e0a92a9
YQ
87422012-01-04 Yao Qi <yao@codesourcery.com>
8743
8744 * tracepoint.c (cmd_qtdp): Print debug message
8745 for static tracepoint.
8746
ae639e8c
YQ
87472012-01-04 Yao Qi <yao@codesourcery.com>
8748
8749 * tracepoint.c (trace_vdebug): Differentiate debug message
8750 between gdbserver and IPA.
8751
f72429c5
YQ
87522012-01-03 Yao Qi <yao@codesourcery.com>
8753
8754 * tracepoint.c (tracepoint_was_hit): Don't collect for
8755 static tracepoint.
8756
12c3e59c
JB
87572012-01-02 Joel Brobecker <brobecker@adacore.com>
8758
8759 * terminal.h: Reformat copyright header.
8760
67827812
JB
87612012-01-02 Joel Brobecker <brobecker@adacore.com>
8762
8763 * server.c (gdbserver_version): Update copyright year.
8764 * gdbreplay.c (gdbreplay_version): Likewise.
8765
3e52c33d
JK
87662011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8767
8768 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8769
8770 Revert:
8771 2011-12-18 Hui Zhu <teawater@gmail.com>
8772 * linux-low.c (linux_create_inferior): Save return value to ret.
8773
66f1260e
HZ
87742011-12-18 Hui Zhu <teawater@gmail.com>
8775
8776 * linux-low.c (linux_create_inferior): Save return value to ret.
8777
e77616d7
DE
87782011-12-16 Doug Evans <dje@google.com>
8779
e7b06c57
DE
8780 * linux-low.c (linux_create_inferior): If stdio connection,
8781 redirect stdin from /dev/null, stdout to stderr.
8782 * remote-utils.c (remote_is_stdio): New static global.
8783 (remote_connection_is_stdio): New function.
8784 (remote_prepare): Handle stdio connection.
8785 (remote_open): Ditto.
8786 (remote_close): Don't close stdin for stdio connections.
8787 (read_prim,write_prim): New functions. Replace all calls to
8788 read/write to these.
8789 * server.c (main): Watch for "-" argument. Move call to
8790 remote_prepare before start_inferior.
8791 * server.h (STDIO_CONNECTION_NAME): New macro.
8792 (remote_connection_is_stdio): Declare.
8793
e77616d7
DE
8794 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8795 in debugging output.
8796
82067193
YQ
87972011-12-15 Yao Qi <yao@codesourcery.com>
8798
8799 * tracepoint.c: Include sys/syscall.h.
8800 (gdb_ust_thread): Remove preprocessor conditional.
8801
82bfbe7e
PA
88022011-12-14 Pedro Alves <pedro@codesourcery.com>
8803
8804 * linux-low.c (linux_detach_one_lwp): Call
8805 the_low_target.prepare_to_resume before detaching.
8806
712c6575
YQ
88072011-12-14 Yao Qi <yao@codesourcery.com>
8808
8809 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8810 of write.
8811
d54d1edf
YQ
88122011-12-14 Yao Qi <yao@codesourcery.com>
8813
8814 * i386-low.c (i386_low_stopped_data_address): Initialize local
8815 variable `control'.
8816
6210a125
PA
88172011-12-13 Pedro Alves <pedro@codesourcery.com>
8818
8819 PR remote/13492
8820
8821 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8822 DR_CONTROL unless necessary. Extend comments.
8823 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8824 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8825
2ece8244
YQ
88262011-12-13 Yao Qi <yao@codesourcery.com>
8827
8828 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8829 macros.
8830 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8831
784867a5
JK
88322011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8833
8834 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8835 Print new debug message for such case.
8836
6bf36717
JK
88372011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8838
8839 Fix overlapping memcpy.
8840 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8841 the read_inferior_memory transfer.
8842 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8843 write_inferior_memory transfer.
8844 (set_fast_tracepoint_jump): New variable buf. Use it for the
8845 read_inferior_memory and write_inferior_memory transfers.
8846 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8847 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8848 Use it for the write_inferior_memory transfer.
8849 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8850 buffers.
8851
50275556
MR
88522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8853
8854 * linux-low.c (fetch_register, store_register): Make code
8855 consistent, fix formatting.
8856
7325beb4
MR
88572011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8858
8859 * linux-low.c (usr_store_inferior_registers): Factor out code
8860 to handle individual registers into...
8861 (store_register): ... this new function.
8862
c642a434
UW
88632011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8864
8865 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8866 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8867 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8868 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8869 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8870 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8871 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8872 (srv_xmlfiles): Add new XML files.
8873
8874 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8875 and <sys/uio.h>.
8876 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8877 (init_registers_s390_linux32v1): Add prototype.
8878 (init_registers_s390_linux32v2): Likewise.
8879 (init_registers_s390_linux64v1): Likewise.
8880 (init_registers_s390_linux64v2): Likewise.
8881 (init_registers_s390x_linux64v1): Likewise.
8882 (init_registers_s390x_linux64v2): Likewise.
8883 (s390_num_regs): Increment to 52.
8884 (s390_regmap): Add orig_r2 register.
8885 (s390_num_regs_3264): Increment to 68.
8886 (s390_regmap_3264): Add orig_r2 register.
8887 (s390_collect_ptrace_register): Handle orig_r2 register.
8888 (s390_supply_ptrace_register): Likewise.
8889 (s390_fill_last_break): New function.
8890 (s390_store_last_break): Likewise.
8891 (s390_fill_system_call): New function.
8892 (s390_store_system_call): Likewise.
8893 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8894 register sets.
8895 (s390_check_regset): New function.
8896 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8897 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8898 Update target_regsets for available register sets.
8899
2268b414
JK
89002011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8901 Jan Kratochvil <jan.kratochvil@redhat.com>
8902
8903 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8904 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8905 New.
8906 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8907 * linux-low.h (struct process_info_private): New member r_debug.
8908 * server.c (handle_qxfer_libraries): Call
8909 the_target->qxfer_libraries_svr4.
8910 (handle_qxfer_libraries_svr4): New function.
8911 (qxfer_packets): New entry "libraries-svr4".
8912 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8913 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8914 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8915 PACKET_qXfer_libraries_svr4.
8916
d6db1fab
UW
89172011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8918
8919 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8920 PSW address/mask between 8-byte and 16-byte formats.
8921 (s390_supply_ptrace_register): Likewise.
8922 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8923 basic addressing mode bit.
8924
242f5f1c
SS
89252011-11-24 Stan Shebs <stan@codesourcery.com>
8926
8927 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8928
f196051f
SS
89292011-11-17 Stan Shebs <stan@codesourcery.com>
8930
8931 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8932 (tracing_start_time): New global.
8933 (tracing_stop_time): New global.
8934 (tracing_user_name): New global.
8935 (tracing_notes): New global.
8936 (tracing_stop_note): New global.
8937 (cmd_qtstart): Set traceframe_usage, start_time.
8938 (stop_tracing): Set stop_time.
8939 (cmd_qtstatus): Report additional status.
8940 (cmd_qtp): New function.
8941 (handle_tracepoint_query): Call it.
8942 (cmd_qtnotes): New function.
8943 (handle_tracepoint_general_set): Call it.
8944 (get_timestamp): Rename from tsv_get_timestamp.
8945
405f8e94
SS
89462011-11-14 Stan Shebs <stan@codesourcery.com>
8947 Kwok Cheung Yeung <kcy@codesourcery.com>
8948
8949 * linux-x86-low.c (small_jump_insn): New.
8950 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8951 trampoline and error message, build a trampoline and issue a small
8952 jump instruction to it.
8953 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8954 trampoline and error message.
8955 (x86_get_min_fast_tracepoint_insn_len): New.
8956 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8957 * linux-low.h (struct linux_target_ops): Add arguments to
8958 install_fast_tracepoint_jump_pad operation, add new operation.
8959 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8960 arguments.
8961 (linux_get_min_fast_tracepoint_insn_len): New function.
8962 (linux_target_op): Add new operation.
8963 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8964 (gdb_trampoline_buffer_end): Ditto.
8965 (gdb_trampoline_buffer_error): Ditto.
8966 (struct ipa_sym_addresses): Add fields for new IPA variables.
8967 (symbol_list): Add entries for new IPA variables.
8968 (struct tracepoint): Add fields to hold the address range of the
8969 trampoline used by the tracepoint.
8970 (trampoline_buffer_head): New static variable.
8971 (trampoline_buffer_tail): Ditto.
8972 (claim_trampoline_space): New function.
8973 (have_fast_tracepoint_trampoline_buffer): New function.
8974 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8975 structure.
8976 (install_fast_tracepoint): Ditto, also add error buffer argument.
8977 (cmd_qtminftpilen): New function.
8978 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8979 (fast_tracepoint_from_trampoline_address): New function.
8980 (fast_tracepoint_collecting): Handle trampoline as part of jump
8981 pad space.
8982 (set_trampoline_buffer_space): New function.
8983 (initialize_tracepoint): Initialize new IPA variables.
8984 * target.h (struct target_ops): Add arguments to
8985 install_fast_tracepoint_jump_pad operation, add new
8986 get_min_fast_tracepoint_insn_len operation.
8987 (target_get_min_fast_tracepoint_insn_len): New.
8988 (install_fast_tracepoint_jump_pad): Add arguments.
8989 * server.h (IPA_BUFSIZ): Define.
8990 * linux-i386-ipa.c: Include extra header files.
8991 (initialize_fast_tracepoint_trampoline_buffer): New function.
8992 (initialize_low_tracepoint): Call it.
8993 * server.h (set_trampoline_buffer_space): Declare.
8994 (claim_trampoline_space): Ditto.
8995 (have_fast_tracepoint_trampoline_buffer): Ditto.
8996
1e4d1764
YQ
89972011-11-14 Yao Qi <yao@codesourcery.com>
8998
8999 * server.c (handle_query): Handle InstallInTrace for qSupported.
9000 * tracepoint.c (add_tracepoint): Sort list.
9001 (install_tracepoint, download_tracepoint): New.
9002 (cmd_qtdp): Call them to install and download tracepoints.
9003 (sort_tracepoints): Removed.
9004 (cmd_qtstart): Update.
9005
5c73ff4e
YQ
90062011-11-14 Yao Qi <yao@codesourcery.com>
9007
9008 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9009 * mem-break.h: Declare.
9010 * tracepoint.c (cmd_qtstart): Move some code to ...
9011 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9012 New.
9013 (download_tracepoints): Move some code to ...
9014 (download_tracepoint_1): ... here. New.
9015
86a30030
YQ
90162011-11-08 Yao Qi <yao@codesourcery.com>
9017
9018 * remote-utils.c (relocate_instruction): A comment fix.
9019
8d26e50c
JB
90202011-11-07 Joel Brobecker <brobecker@adacore.com>
9021
9022 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9023 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9024 dr_status_mirror and dr_control_mirror from debug_reg_state.
9025 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9026 (i386_initial_stuff): Remove use of deleted globals.
9027 (i386_get_thread_context, i386_set_thread_context,
9028 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9029 from debug_reg_state.
9030
a59306a3
YQ
90312011-11-05 Yao Qi <yao@codesourcery.com>
9032
9033 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9034 address as TPOINT's.
9035
3065dfb6
SS
90362011-11-02 Stan Shebs <stan@codesourcery.com>
9037
9038 * tracepoint.c (agent_mem_read_string): New function.
9039 (eval_agent_expr): Call it for tracenz.
9040 * server.c (handle_query): Report support for tracenz.
9041
fd0d8c7c
YQ
90422011-11-02 Yao Qi <yao@codesourcery.com>
9043
9044 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9045
609086b1
YQ
90462011-11-02 Yao Qi <yao@codesourcery.com>
9047
9048 * target.h: Fix a typo in comment.
9049
b9fd1791
PA
90502011-10-31 Pedro Alves <pedro@codesourcery.com>
9051
9052 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9053 clobber the breakpoints' shadows with fast tracepoint jumps.
9054 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9055 * target.c (write_inferior_memory): Also pass MYADDR down to
9056 check_mem_write.
9057
03583c20
UW
90582011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9059
9060 * configure.ac: Check support for personality routine.
9061 * configure: Regenerate.
9062 * config.in: Likewise.
9063 * linux-low.c: Include <sys/personality.h>.
9064 Define ADDR_NO_RANDOMIZE if necessary.
9065 (linux_create_inferior): Disable address space randomization when
9066 forking inferior, if requested.
9067 (linux_supports_disable_randomization): New function.
9068 (linux_target_ops): Install it.
9069 * server.h (disable_randomization): Declare.
9070 * server.c (disable_randomization): New global variable.
9071 (handle_general_set): Handle QDisableRandomization.
9072 (handle_query): Likewise for qSupported.
9073 (main): Support --disable-randomization and --no-disable-randomization
9074 command line arguments.
9075 * target.h (struct target_ops): Add supports_disable_randomization.
9076 (target_supports_disable_randomization): New macro.
9077
723b724b
MF
90782011-09-29 Mike Frysinger <vapier@gentoo.org>
9079
9080 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9081 ifdef check.
9082 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9083 [!PT_GETDSBT] (target_loadmap): New definition.
9084 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9085 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9086 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9087 and PT_GETDSBT to LINUX_LOADMAP.
9088 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9089 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9090
55329a5c 90912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9092
9093 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9094 (arm_linux_hwbp_cap): New static variable.
9095 (arm_linux_get_hwbp_cap): Replace by ...
9096 (arm_linux_init_hwbp_cap): ... this new function.
9097 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9098 (arm_linux_get_hw_watchpoint_count): Likewise.
9099 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9100 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9101 (arm_prepare_to_resume): Use perror_with_name instead of error.
9102
55329a5c 91032011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9104
9105 * linux-arm-low.c: Include <signal.h>.
9106 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9107 (struct arm_linux_hwbp_cap): New data type.
9108 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9109 (struct arm_linux_hw_breakpoint): New data type.
9110 (MAX_BPTS, MAX_WPTS): Define.
9111 (struct arch_process_info, struct arch_lwp_info): New data types.
9112 (arm_linux_get_hwbp_cap): New function.
9113 (arm_linux_get_hw_breakpoint_count): Likewise.
9114 (arm_linux_get_hw_watchpoint_count): Likewise.
9115 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9116 (arm_hwbp_control_initialize): Likewise.
9117 (arm_hwbp_control_is_enabled): Likewise.
9118 (arm_hwbp_control_is_initialized): Likewise.
9119 (arm_hwbp_control_disable): Likewise.
9120 (arm_linux_hw_breakpoint_equal): Likewise.
9121 (arm_linux_hw_point_initialize): Likewise.
9122 (struct update_registers_data): New data structure.
9123 (update_registers_callback: New function.
9124 (arm_insert_point): Likewise.
9125 (arm_remove_point): Likewise.
9126 (arm_stopped_by_watchpoint): Likewise.
9127 (arm_stopped_data_address): Likewise.
9128 (arm_new_process): Likewise.
9129 (arm_new_thread): Likewise.
9130 (arm_prepare_to_resume): Likewise.
9131 (the_low_target): Register arm_insert_point, arm_remove_point,
9132 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9133 arm_new_thread, and arm_prepare_to_resume.
9134
6b9801d4
SS
91352011-09-15 Stan Shebs <stan@codesourcery.com>
9136
9137 * server.h (struct emit_ops): Add compare-goto fields.
9138 * tracepoint.c (gdb_agent_op_sizes): New table.
9139 (emit_eq_goto): New function.
9140 (emit_ne_goto): New function.
9141 (emit_lt_goto): New function.
9142 (emit_le_goto): New function.
9143 (emit_gt_goto): New function.
9144 (emit_ge_goto): New function.
9145 (is_goto_target): New function.
9146 (compile_bytecodes): Recognize special cases of compare-goto
9147 combinations and call specialized emitters for them.
9148 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9149 (amd64_emit_ne_goto): New function.
9150 (amd64_emit_lt_goto): New function.
9151 (amd64_emit_le_goto): New function.
9152 (amd64_emit_gt_goto): New function.
9153 (amd64_emit_ge_goto): New function.
9154 (amd64_emit_ops): Add the new functions.
9155 (i386_emit_eq_goto): New function.
9156 (i386_emit_ne_goto): New function.
9157 (i386_emit_lt_goto): New function.
9158 (i386_emit_le_goto): New function.
9159 (i386_emit_gt_goto): New function.
9160 (i386_emit_ge_goto): New function.
9161 (i386_emit_ops): Add the new functions.
9162
bf15cbda
SS
91632011-09-08 Stan Shebs <stan@codesourcery.com>
9164
9165 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9166 (i386_emit_epilogue): Restore %ebx.
9167
943ca1dd
JZ
91682011-08-31 Jie Zhang <jzhang918@gmail.com>
9169
9170 * server.c (step_thread): Remove definition.
9171 (process_serial_event): Don't handle Hs.
9172 * server.h (step_thread): Remove declaration.
9173 * target.c (set_desired_inferior): Remove use of step_thread.
9174
e3deef73
LM
91752011-08-24 Luis Machado <lgustavo@codesourcery.com>
9176
9177 * linux-low.c: Include linux-procfs.h.
9178 (linux_attach_lwp_1): Update comments.
9179 (linux_attach): Scan for existing threads when attaching to a
9180 process that is the tgid.
9181 * Makefile.in: Update dependencies.
9182
13da1c97
LM
91832011-08-24 Luis Machado <lgustavo@codesourcery.com>
9184
9185 * configure.srv: Add linux-procfs.o dependencies.
9186
881127c9
YQ
91872011-08-14 Yao Qi <yao@codesourcery.com>
9188
9189 * target.h (struct target_ops): Fix indent.
9190 * win32-low.c (win32_target_ops): Fix comment.
9191
58dbd541
YQ
91922011-08-14 Andrew Jenner <andrew@codesourcery.com>
9193 Yao Qi <yao@codesourcery.com>
9194
9195 * Makefile.in (clean): Remove tic6x-*.c files.
9196 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9197 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9198 (tic6x-c64xp-linux.c): Likewise.
9199 * configure.srv: Add support for tic6x-*-uclinux.
9200 * linux-tic6x-low.c: New.
9201 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9202
78d85199
YQ
92032011-08-14 Andrew Stubbs <ams@codesourcery.com>
9204 Yao Qi <yao@codesourcery.com>
9205
9206 * target.h (struct target_ops): Add read_loadmap.
9207 * linux-low.c (struct target_loadseg): New type.
9208 (struct target_loadmap): New type.
9209 (linux_read_loadmap): New function.
9210 (linux_target_ops): Add linux_read_loadmap.
9211 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9212 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9213 to NULL.
78d85199 9214
a959a88d
EZ
92152011-08-05 Eli Zaretskii <eliz@gnu.org>
9216
9217 * win32-low.c: Include <stdint.h>.
9218
1ced966e
PA
92192011-07-22 Pedro Alves <pedro@codesourcery.com>
9220
9221 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9222 to the inferior here.
9223 (i386_remove_aligned_watchpoint): Ditto.
9224 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9225 fit part of the watchpoint in the debug registers.
9226 (i386_update_inferior_debug_regs): New.
9227 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9228 registers, and only update the inferior on success.
9229 (i386_low_remove_watchpoint): Ditto.
9230
d26e3629
KY
92312011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9232
9233 * linux-low.c (compare_ints, unique, list_threads, show_process,
9234 linux_core_of_thread): Delete.
9235 (linux_target_ops): Change linux_core_of_thread to
9236 linux_common_core_of_thread.
9237 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9238 * utils.c (malloc_failure): Change type of argument.
9239 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9240 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9241 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9242 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9243 (IPA_OBJS): Add common-utils-ipa.o.
9244 (ptid_h, linux_osdata_h): New macros.
9245 (server_h): Add common/common-utils.h, common/xml-utils.h,
9246 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9247 common/ptid.h.
9248 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9249 ptid.o, buffer.o): New rules.
9250 (linux-low.o): Add common/linux-osdata.h as a dependency.
9251 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9252 * configure.ac: Add AC_HEADER_DIRENT check.
9253 * config.in: Regenerate.
9254 * configure: Regenerate.
9255 * remote-utils.c (xml_escape_text): Delete.
9256 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9257 buffer_xml_printf): Move to common/buffer.c.
9258 * server.c (main): Remove call to initialize_inferiors.
9259 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9260 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9261 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9262 internal_error, gdb_assert, gdb_assert_fail): Delete.
9263 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9264 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9265 common/buffer.h.
9266 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9267 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9268 initialize_inferiors): Delete.
9269
2275a1a7
PA
92702011-07-20 Pedro Alves <pedro@codesourcery.com>
9271
9272 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9273 symbol error.
9274
0a5b1e09
PA
92752011-05-31 Pedro Alves <pedro@codesourcery.com>
9276
9277 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9278 assertion.
9279 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9280
6938fd34
YQ
92812011-05-26 Yao Qi <yao@codesourcery.com>
9282
9283 * Makefile.in (thread-db.o): Track dependence to
9284 common/gdb_thread_db.h.
9285 * thread-db.c: include gdb_thread_db.h from right place.
9286
b481f9e0
TT
92872011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9288
9289 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9290 __FILE__ and __LINE__ to internal_error.
9291
98a5dd13
DE
92922011-05-13 Doug Evans <dje@google.com>
9293
9294 * thread-db.c (try_thread_db_load_from_sdir): New function.
9295 (try_thread_db_load_from_dir): New function.
9296 (thread_db_load_search): Handle $sdir, ignore $pdir.
9297 Remove trying of system directories if search of
9298 libthread-db-search-path fails, that is now done via $sdir.
9299
d248b706
KY
93002011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9301
9302 * server.c (handle_query): Add EnableDisableTracepoints to the list
9303 of supported features.
43aaf8b6 9304 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9305 tracepoints.
43aaf8b6
PA
9306 (cmd_qtenable_disable): New.
9307 (cmd_qtstart): Install tracepoints even if disabled.
9308 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9309 receiving a QTEnable or QTDisable packet.
9310 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9311 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9312 tracepoints.
9313 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9314
84e578fb
DE
93152011-05-10 Doug Evans <dje@google.com>
9316
9317 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9318
71f55dd8
DE
93192011-05-04 Doug Evans <dje@google.com>
9320
9321 * linux-low.c (linux_join): Skip process lookup.
9322 * spu-low.c (spu_join): Ditto.
9323 * server.c (join_inferiors_callback): Delete.
9324 (process_serial_event): For 'D' packet (detach) call join_inferior
9325 directly.
9326
4d393d60
JM
93272011-05-04 Joseph Myers <joseph@codesourcery.com>
9328
9329 * README: Don't mention xscale*-*-linux*.
9330 * configure.srv (xscale*-*-linux*): Don't handle target.
9331
b00ad6ff
NF
93322011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9333
9334 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9335 casting pointers.
9336 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9337 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9338 (i386_emit_void_call_2): Likewise.
9339
af96c192
YQ
93402011-04-26 Yao Qi <yao@codesourcery.com>
9341
43aaf8b6
PA
9342 * linux-low.c: Move common macros to linux-ptrace.h.
9343 Include linux-ptrace.h.
af96c192
YQ
9344 * Makefile.in (linux_ptrace_h): New.
9345 (linux-low.o): Depends on linux-ptrace.h.
9346
03f2bd59
JK
93472011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9348
9349 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9350 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9351 (remote_prepare): New function with most of the TCP code from ...
9352 (remote_open): ... here. Detect PORT here unconditionally. Move also
9353 setting transport_is_reliable.
9354 * server.c (run_once): New variable.
9355 (gdbserver_usage): Document it.
9356 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9357 the first run if RUN_ONCE.
9358 * server.h (run_once, remote_prepare): New declarations.
9359
7a9dd1b2
TT
93602011-04-19 Tom Tromey <tromey@redhat.com>
9361
9362 * win32-low.c (handle_load_dll): Remove duplicate "the".
9363
81239425
PM
93642011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9365
9366 Remove support for old Cygwin 1.5 versions.
9367 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9368 function to avoid warning.
9369 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9370 warning.
9371
9e0627f1
PM
93722011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9373
9374 * gdbserver/server.h (Macro _): Define it if not available.
9375
588eebee
MS
93762011-03-14 Michael Snyder <msnyder@vmware.com>
9377
348af9f7 9378 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9379
43f70d4c
JB
93802011-03-10 Joel Brobecker <brobecker@adacore.com>
9381
9382 * Makefile.in (maintainer-clean realclean distclean): Remove
9383 "make ... subdir_do" command.
9384
348af9f7
MS
93852011-03-10 Michael Snyder <msnyder@vmware.com>
9386
9387 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9388
9389 * server.c (handle_v_run): Free alloced buffer on early return.
9390
e637a4f5
YQ
93912011-03-09 Yao Qi <yao@codesourcery.com>
9392
9393 Revert:
9394 2011-03-04 Yao Qi <yao@codesourcery.com>
9395
9396 * Makefile.in: Remove GNU make feature --directory.
9397
9398 2011-03-05 Yao Qi <yao@codesourcery.com>
9399
9400 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9401 (subdir_do): New make target. Copied from gdb/Makefile.
9402 (maintainer-clean, realclean, distclean, clean): Call corresponding
9403 make targets in common/Makefile.
9404
9405 2011-02-11 Yao Qi <yao@codesourcery.com>
9406
9407 * configure.ac: Call AC_PROG_RANLIB.
9408 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9409 * configure: Regenerate.
9410
e6edda56
JK
94112011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9412
9413 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9414
e5141119
JB
94152011-03-06 Yao Qi <yao@codesourcery.com>
9416
9417 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9418
64794aa4
JB
94192011-03-05 Yao Qi <yao@codesourcery.com>
9420
9421 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9422 (subdir_do): New make target. Copied from gdb/Makefile.
9423 (maintainer-clean, realclean, distclean, clean): Call corresponding
9424 make targets in common/Makefile.
9425
7a762829
YQ
94262011-03-04 Yao Qi <yao@codesourcery.com>
9427
9428 * Makefile.in: Remove GNU make feature --directory.
9429
348af9f7
MS
94302011-03-04 Michael Snyder <msnyder@vmware.com>
9431
9432 * server.c (queue_stop_reply): Call xmalloc not malloc.
9433
94342011-03-02 Michael Snyder <msnyder@vmware.com>
9435
9436 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9437
9f72fee2
MS
94382011-02-28 Michael Snyder <msnyder@vmware.com>
9439
588eebee
MS
9440 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9441 (cmd_qtframe): Ditto.
9442 (cmd_qtbuffer): Ditto.
9443 (cmd_bigqtbuffer): Ditto.
9444
9f72fee2
MS
9445 * utils.c (decimal2str): Initialize 'width' to nine, then
9446 don't mess with it.
9447
8040bd49
UW
94482011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9449
9450 * hostio.c (require_data): Free *data, not data.
9451
7e52cbd0
JK
94522011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9453
9454 * hostio.c (require_data): Use free, not xfree.
9455
9130f83e
MS
94562011-02-27 Michael Snyder <msnyder@vmware.com>
9457
4b812f4e
MS
9458 * server.c (handle_query): Discard unused value.
9459
9130f83e
MS
9460 * hostio.c (require_data): Free malloc memory before returning
9461 error.
9462
69d37113
MS
94632011-02-26 Michael Snyder <msnyder@vmware.com>
9464
9465 * linux-low.c (list_threads): Call closedir for dirent.
9466
35f5825a
MS
94672011-02-27 Michael Snyder <msnyder@vmware.com>
9468
2a589cef
MS
9469 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9470 a case statement falls through.
9471
0adea5f7
MS
9472 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9473
35f5825a
MS
9474 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9475 in comparison.
9476
238f1c74
MS
94772011-02-26 Michael Snyder <msnyder@vmware.com>
9478
9479 * utils.c (decimal2str): Eliminate dead code and dead param.
9480 (pulongest): Drop dead param from call to decimal2str.
9481 (plongest): Ditto.
9482
633ff500
JB
94832011-02-24 Joel Brobecker <brobecker@adacore.com>
9484
9485 Revert the following patch (not approved yet):
9486 2011-02-21 Hui Zhu <teawater@gmail.com>
9487 * tracepoint.c (tp_printf): New function.
9488 (eval_agent_expr): Handle gdb_agent_op_printf.
9489
f9c6ff72
HZ
94902011-02-21 Hui Zhu <teawater@gmail.com>
9491
9492 * tracepoint.c (tp_printf): New function.
9493 (eval_agent_expr): Handle gdb_agent_op_printf.
9494
94d5e490
TT
94952011-02-18 Tom Tromey <tromey@redhat.com>
9496
9497 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9498 (tracepoint.o): Likewise.
9499 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9500 (gdb_agent_op_names): Likewise.
9501
c7f96d2b
TT
95022011-02-18 Tom Tromey <tromey@redhat.com>
9503
9504 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9505 gdb_agent_op_rot>: New constants.
9506 (gdb_agent_op_names): Add pick and roll.
9507 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9508 cases.
9509
0feedb2c
JK
95102011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9511
9512 * aclocal.m4: Regenerated with aclocal-1.11.1.
9513
b3b9301e
PA
95142011-02-14 Pedro Alves <pedro@codesourcery.com>
9515
9516 * server.c (handle_qxfer_traceframe_info): New.
9517 (qxfer_packets): Register "traceframe-info".
9518 (handle_query): Report support for qXfer:traceframe-info:read+.
9519 * tracepoint.c (match_blocktype): New.
9520 (traceframe_find_block_type): Rename to ...
9521 (traceframe_walk_blocks): ... this. Add callback filter argument,
9522 and use it.
9523 (traceframe_find_block_type): New, reimplemented on top of
9524 traceframe_walk_blocks.
9525 (build_traceframe_info_xml): New.
9526 (traceframe_read_info): New.
9527 * server.h (traceframe_read_info): Declare.
9528
4f3e6fb7
YQ
95292011-02-11 Yao Qi <yao@codesourcery.com>
9530
9531 * configure.ac: Call AC_PROG_RANLIB.
9532 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9533 * configure: Regenerate.
9534
764880b7
PA
95352011-02-07 Pedro Alves <pedro@codesourcery.com>
9536
9537 * server.c (gdb_read_memory): Change return semantics to allow
9538 partial transfers.
9539 (handle_search_memory_1): Adjust.
9540 (process_serial_event) <'m' packet>: Handle partial transfers.
9541 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9542
1c79eb8a
PA
95432011-01-28 Pedro Alves <pedro@codesourcery.com>
9544
9545 * regcache.c (init_register_cache): Initialize
9546 regcache->register_status.
9547 (free_register_cache): Release regcache->register_status.
9548 (regcache_cpy): Copy register_status.
9549 (registers_to_string): Print 'x's for unavailable registers.
9550 (supply_register): Mark the register's status valid or
9551 unavailable, depending on whether a buffer was passed in or not.
9552 (supply_register_zeroed): New.
9553 (supply_regblock): Mark the registers' status valid or
9554 unavailable, depending on whether a buffer was passed in or not.
9555 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9556 (struct regcache): New `register_status' field.
9557 (supply_register_zeroed): Declare.
9558 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9559 supply_register_zeroed, rather than passing a NULL buffer to
9560 supply_register.
9561 * tracepoint.c (fetch_traceframe_registers): Update comment.
9562
85724a0e
PA
95632011-01-28 Pedro Alves <pedro@codesourcery.com>
9564
9565 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9566 buffer explicit.
9567
d08aafef
PA
95682011-01-25 Pedro Alves <pedro@codesourcery.com>
9569
9570 * server.h (decode_xfer_write): Change prototype.
9571 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9572 and don't extract the annex here.
9573 * server.c (decode_xfer_read): Remove `annex' parameter,
9574 and don't extract the annex here.
9575 (decode_xfer): New.
9576 (struct qxfer): New.
9577 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9578 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9579 (handle_qxfer_statictrace): New functions, abstracted out from
9580 handle_query, and made to use the struct qxfer interface.
9581 (handle_threads_qxfer_proper): Rename to ...
9582 (handle_qxfer_threads_proper): ... this.
9583 (handle_threads_qxfer): Rename to ...
9584 (handle_qxfer_threads): ... this. Adjust.
9585 (qxfer_packets): New array.
9586 (handle_qxfer): New function.
9587 (handle_query): Use handle_qxfer.
9588
493e2a69
MS
95892011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9590
9591 * gdbreplay.c: Shorten lines of >= 80 columns.
9592 * linux-low.c: Ditto.
9593 * linux-ppc-low.c: Ditto.
9594 * linux-s390-low.c: Ditto.
9595 * linux-sparc-low.c: Ditto.
9596 * linux-x86-low.c: Ditto.
9597 * linux-xtensa-low.c: Ditto.
9598 * mem-break.c: Ditto.
9599 * nto-low.c: Ditto.
9600 * regcache.h: Ditto.
9601 * remote-utils.c: Ditto.
9602 * server.c: Ditto.
9603 * server.h: Ditto.
9604 * thread-db.c: Ditto.
9605 * tracepoint.c: Ditto.
9606 * utils.c: Ditto.
9607 * win32-low.h: Ditto.
9608
44944448
JB
96092011-01-05 Joel Brobecker <brobecker@adacore.com>
9610
9611 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9612 update.
9613
71ce852c
JB
96142011-01-01 Joel Brobecker <brobecker@adacore.com>
9615
9616 * server.c (gdbserver_version): Update copyright year in version
9617 output.
9618 * gdbreplay.c (gdbreplay_version): Ditto.
9619
eb826dc6
MF
96202010-12-29 Jie Zhang <jie.zhang@analog.com>
9621
9622 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9623 * linux-bfin-low.c: New file.
9624 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9625 PT_DATA_ADDR for BFIN targets.
9626 * Makefile.in (SFILES): Add linux-bfin-low.c.
9627 (clean): Remove reg-bfin.c.
9628 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9629 * README: Mention supported Blackfin targets.
9630
39ab222a
MF
96312010-12-23 Mike Frysinger <vapier@gentoo.org>
9632
9633 * .gitignore: New file.
9634
a1f2ce7d
MF
96352010-11-16 Mike Frysinger <vapier@gentoo.org>
9636
9637 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9638
f474844c
JZ
96392010-10-22 Jie Zhang <jie@codesourcery.com>
9640
9641 * Makefile.in: Add FLAGS_TO_PASS variable.
9642 (install): Remove dependency of install-only and recursively
9643 invoke make for install-only.
9644
f1048712
DE
96452010-10-04 Doug Evans <dje@google.com>
9646
9647 * Makefile.in (uninstall): Use $(DESTDIR).
9648
b53a1623
PA
96492010-09-24 Pedro Alves <pedro@codesourcery.com>
9650
e6ee044d
PA
9651 PR gdb/11842
9652
b53a1623
PA
9653 * linux-x86-low.c (compat_siginfo_from_siginfo)
9654 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9655 si_code is < 0. Check for si_code == SI_TIMER before checking for
9656 si_code < 0.
9657
fa1bd1e4
JB
96582010-09-13 Joel Brobecker <brobecker@adacore.com>
9659
9660 * lynx-i386-low.c: New file.
9661 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9662
47fac8f8
JB
96632010-09-13 Joel Brobecker <brobecker@adacore.com>
9664
9665 * lynx-low.c (ptrace_request_to_str): Remove handling for
9666 request values that have been removed in LynxOS 5.x.
9667
1adfc54d
JB
96682010-09-13 Joel Brobecker <brobecker@adacore.com>
9669
9670 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9671 <ptrace.h>
9672
c2a66c29
NS
96732010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9674
9675 * configure.ac: Add --enable-inprocess-agent option.
9676 * configure: Rebuilt.
9677
32fcada3
YQ
96782010-09-06 Yao Qi <yao@codesourcery.com>
9679
9680 * linux-low.c (linux_kill): Remove unused variable.
9681 (linux_stabilize_threads): Likewise.
9682 * server.c (start_inferior): Likewise.
9683 (queue_stop_reply_callback): Likewise.
9684 * tracepoint.c (do_action_at_tracepoint): Likewise.
9685
0cccb683
YQ
96862010-09-06 Yao Qi <yao@codesourcery.com>
9687
9688 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9689 on return.
9690
423ec54c
JK
96912010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9692
9693 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9694
12ac6819
PA
96952010-09-06 Pedro Alves <pedro@codesourcery.com>
9696
9697 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9698 "$(IPA_DEPFILES)".
9699
8ed54b31
JB
97002010-09-01 Joel Brobecker <brobecker@adacore.com>
9701
9702 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9703 gdbserver/lynx-ppc-low.c: New files.
9704 * Makefile.in (lynx_low_h): New variable.
9705 (lynx-low.o, lynx-ppc-low.o): New rules.
9706 * configure.ac: On LynxOS, link with -lnetinet.
9707 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9708 * configure: regenerate.
9709
bb0116a4
JB
97102010-09-01 Joel Brobecker <brobecker@adacore.com>
9711
9712 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9713 * configure.ac: Add check for vasprintf and vsnprintf.
9714 * configure, config.in: Regenerate.
9715 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9716
a778ab81 97172010-09-01 Joel Brobecker <brobecker@adacore.com>
9718
9719 * gdbreplay.c: Move include of alloca.h up, next to include of
9720 malloc.h.
9721 * server.h: Add include of malloc.h.
9722 * mem-break.c: Remove include of malloc.h.
9723 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9724
8b034a19 97252010-09-01 Joel Brobecker <brobecker@adacore.com>
9726
9727 * Makefile.in (memmem.o): Build with -Wno-error.
9728
97292010-09-01 Joel Brobecker <brobecker@adacore.com>
9730
9731 * utils.c (xsnprintf): Make non-static.
9732 * server.h: Add xsnprintf declaration.
9733 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9734 replace calls to snprintf by calls to xsnprintf throughout.
9735
97362010-09-01 Joel Brobecker <brobecker@adacore.com>
9737
9738 * configure.ac: Add configure check for alloca.
9739 * configure, config.in: Regenerate.
9740 * server.h: Include alloca.h if it exists.
9741 * gdbreplay.c: Include alloca.h if it exists.
9742
1a981360
PA
97432010-08-28 Pedro Alves <pedro@codesourcery.com>
9744
9745 * linux-low.c (__SIGRTMIN): Define if not already defined.
9746 (linux_create_inferior): Check for __ANDROID__ rather than
9747 __SIGRTMIN.
9748 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9749 are already deferred.
9750 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9751 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9752 stopped and already has a pending signal to report.
9753 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9754 a pending signal to report or is moving out of a jump pad.
9755 (linux_init_signals): Check for __ANDROID__ rather than
9756 __SIGRTMIN.
9757
b4d51a55
PA
97582010-08-28 Pedro Alves <pedro@codesourcery.com>
9759
9760 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9761 debug_threads check. Avoid a linear search when not doing debug
9762 output.
9763
ec48365d
PA
97642010-08-27 Pedro Alves <pedro@codesourcery.com>
9765
9766 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9767 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9768 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9769 (process_event): Change local fd's type to gdb_fildes_t.
9770 (create_file_handler): Adjust prototype.
9771 (delete_file_handler): Adjust prototype.
9772 (handle_file_event): Adjust prototype. Use pfildes.
9773 (create_file_event): Adjsut prototype.
9774 * remote-utils.c (remote_desc, listen_desc): Change type to
9775 gdb_fildes_t.
9776 * server.h: New gdb_fildes_t typedef.
9777 [USE_WIN32API]: Include winsock2.h.
9778 (delete_file_handler, add_file_handler): Adjust prototypes.
9779 (pfildes): Declare.
9780 * utils.c (pfildes): New.
9781
854d88f0
PA
97822010-08-27 Pedro Alves <pedro@codesourcery.com>
9783
9784 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9785 * configure: Regenerate.
9786
0146f85b
PA
97872010-08-27 Pedro Alves <pedro@codesourcery.com>
9788
9789 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9790 (linux_done_accessing_memory): ... this.
9791 (linux_target_ops): Adjust.
9792 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9793 * nto-low.c (nto_target_ops): Adjust comment.
9794 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9795 * spu-low.c (spu_target_ops): Adjust comment.
9796 * target.h (target_ops): Rename unprepare_to_access_memory field
9797 to done_accessing_memory.
9798 (unprepare_to_access_memory): Rename to ...
9799 (done_accessing_memory): ... this.
9800
90d74c30
PA
98012010-08-26 Pedro Alves <pedro@codesourcery.com>
9802
9803 * linux-low.c (linux_prepare_to_access_memory): New.
9804 (linux_unprepare_to_access_memory): New.
9805 (linux_target_ops): Install them.
9806 * server.c (read_memory): Rename to ...
9807 (gdb_read_memory): ... this. Use
9808 prepare_to_access_memory/prepare_to_access_memory.
9809 (write_memory): Rename to ...
9810 (gdb_write_memory): ... this. Use
9811 prepare_to_access_memory/prepare_to_access_memory.
9812 (handle_search_memory_1): Adjust.
9813 (process_serial_event): Adjust.
9814 * target.h (struct target_ops): New fields
9815 prepare_to_access_memory and unprepare_to_access_memory.
9816 (prepare_to_access_memory, unprepare_to_access_memory): New.
9817 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9818 prepare_to_access_memory/prepare_to_access_memory.
9819 * nto-low.c (nto_target_ops): Adjust.
9820 * spu-low.c (spu_target_ops): Adjust.
9821 * win32-low.c (win32_target_ops): Adjust.
9822
fd467969
PA
98232010-08-26 Pedro Alves <pedro@codesourcery.com>
9824
9825 * Makefile.in (WARN_CFLAGS): Get it from configure.
9826 (WERROR_CFLAGS): New.
9827 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9828 * configure.ac: Introduce --enable-werror, which adds -Werror to
9829 the compiler command line. Enabled by default. Disable with
9830 --disable-werror. Add -Wdeclaration-after-statement
9831 Wpointer-arith and -Wformat-nonliteral to warning flags.
9832 * configure: Regenerate.
9833
331e2f5f
PA
98342010-08-26 Pedro Alves <pedro@codesourcery.com>
9835
9836 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9837
e581f2b4
PA
98382010-08-26 Pedro Alves <pedro@codesourcery.com>
9839
9840 * gdbreplay.c (remote_error): New.
9841 (gdbchar): New.
9842 (expect): Use gdbchar. Check for error reading from GDB.
9843 Clarify sync error output.
9844 (play): Check for errors writing to GDB.
9845 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9846 * remote-utils.c (getpkt): Check for errors writing to the remote
9847 descriptor.
9848
3c11dd79
PA
98492010-08-25 Pedro Alves <pedro@codesourcery.com>
9850
9851 * linux-low.c (linux_wait_1): Move non-debugging code out of
9852 `debug_threads' control.
9853
d20a8ad9
PA
98542010-08-25 Pedro Alves <pedro@codesourcery.com>
9855
9856 * linux-low.c (linux_wait_1): Don't set last_status here.
9857 * server.c (push_event, queue_stop_reply_callback): Assert we're
9858 not pushing a TARGET_WAITKIND_IGNORE event.
9859 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9860 (myresume, handle_target_event): Set the thread's last_resume_kind
9861 and last_status from the target returned status.
9862
964e4306
PA
98632010-08-25 Pedro Alves <pedro@codesourcery.com>
9864
9865 PR threads/10729
9866
9867 * linux-x86-low.c (update_debug_registers_callback): New.
9868 (i386_dr_low_set_addr): Use it.
9869 (i386_dr_low_get_addr): New.
9870 (i386_dr_low_set_control): Use update_debug_registers_callback.
9871 (i386_dr_low_get_control): New.
9872 (i386_dr_low_get_status): Adjust.
9873 * linux-low.c (linux_stop_lwp): New.
9874 * linux-low.h (linux_stop_lwp): Declare.
9875
9876 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9877 argument instead of a i386_debug_reg_state.
9878 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9879 a i386_debug_reg_state.
9880 (i386_insert_aligned_watchpoint): Adjust.
9881 (i386_remove_aligned_watchpoint): Adjust.
9882 (i386_low_stopped_data_address): Read the debug registers from the
9883 inferior instead of from the mirrors.
9884 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9885 (i386_dr_low_get_addr): Declare.
9886 (i386_dr_low_get_control): Declare.
9887 (i386_dr_low_get_status): Change prototype.
9888
9889 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9890 (i386_dr_low_get_addr): New.
9891 (i386_dr_low_get_control): New.
9892 (i386_dr_low_get_status): Adjust prototype. Return
9893 dr_status_mirror.
9894 (i386_initial_stuff): Clear dr_status_mirror and
9895 dr_control_mirror.
9896 (i386_get_thread_context): Adjust.
9897 (i386_set_thread_context): Adjust.
9898 (i386_thread_added): Adjust.
9899
5f21a75b
PA
99002010-08-24 Pedro Alves <pedro@codesourcery.com>
9901
9902 * linux-low.h (linux_thread_area): Delete declaration.
9903
3e4c1235
TS
99042010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9905
9906 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9907 after its termination.
9908
1971b033
PA
99092010-08-09 Pedro Alves <pedro@codesourcery.com>
9910
9911 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9912 (gdb_wants_all_stopped): Delete.
9913 (linux_wait_1): Don't call them.
9914 * server.c (handle_v_cont): Tag all threads as want-stopped.
9915 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9916 stopped as "client-wants-stopped".
9917
310444ac
PA
99182010-07-31 Pedro Alves <pedro@codesourcery.com>
9919
9920 * Makefile.in (signals_h): New.
9921 (server_h): Depend on it.
9922 (server.o): Don't depend on $(signals_def).
9923 (signals.o): Depend on $(signals_def).
9924
a19cae16
JK
99252010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9926
9927 * Makefile.in (signals_def): New.
9928 (server_h): Append include/gdb/signals.h and signals_def.
9929 (server.o): Append signals_def.
9930
30d50328
JK
99312010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9932
9933 * server.c (handle_target_event): Use target_signal_to_host for
9934 resume_info.sig initialization.
9935 * target.h (struct thread_resume) <sig>: New comment.
9936
5c3216e2
OS
99372010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9938
c6f46ca0
OS
9939 * server.c (handle_query): strcpy() the returned string from paddress()
9940 instead of sprintf().
5c3216e2
OS
9941 * utils.c (paddress): Return phex_nz().
9942
6bd31874
JB
99432010-07-07 Joel Brobecker <brobecker@adacore.com>
9944
9945 * server.c (handle_v_cont): Call mourn_inferior if process
9946 just exited.
9947 (myresume): Likewise.
9948
0fb4aa4b
PA
99492010-07-01 Pedro Alves <pedro@codesourcery.com>
9950
9951 Static tracepoints, and integration with UST.
9952
9953 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9954 * mem-break.c (uninsert_all_breakpoints)
9955 (reinsert_all_breakpoints): New.
9956 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9957 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9958 (gdb_agent_ust_loaded, helper_thread_id)
9959 (gdb_agent_helper_thread_id): New macros.
9960 (struct ipa_sym_addresses): Add addr_ust_loaded,
9961 addr_helper_thread_id, addr_cmd_buf.
9962 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9963 (in_process_agent_loaded_ust): New.
9964 (write_e_ust_not_loaded): New.
9965 (maybe_write_ipa_ust_not_loaded): New.
9966 (struct collect_static_trace_data_action): New.
9967 (enum tracepoint_type) <static_tracepoint>: New.
9968 (struct tracepoint) <handle>: Mention static tracepoints.
9969 (struct static_tracepoint_ctx): New.
9970 (CMD_BUF_SIZE): New.
9971 (add_tracepoint_action): Handle static tracepoint actions.
9972 (unprobe_marker_at): New.
9973 (clear_installed_tracepoints): Handle static tracepoints.
9974 (cmd_qtdp): Handle static tracepoints.
9975 (probe_marker_at): New.
9976 (cmd_qtstart): Handle static tracepoints.
9977 (response_tracepoint): Handle static tracepoints.
9978 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9979 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9980 (get_context_regcache): Handle static tracepoints.
9981 (do_action_at_tracepoint): Handle static tracepoint actions.
9982 (traceframe_find_block_type): Handle static trace data blocks.
9983 (traceframe_read_sdata): New.
9984 (download_tracepoints): Download static tracepoint actions.
9985 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9986 (GDB_PROBE_NAME): New.
9987 (ust_ops): New.
9988 (GET_UST_SYM): New.
9989 (USTF): New.
9990 (dlsym_ust): New.
9991 (ust_marker_to_static_tracepoint): New.
9992 (gdb_probe): New.
9993 (collect_ust_data_at_tracepoint): New.
9994 (gdb_ust_probe): New.
9995 (UNIX_PATH_MAX, SOCK_DIR): New.
9996 (gdb_ust_connect_sync_socket): New.
9997 (resume_thread, stop_thread): New.
9998 (run_inferior_command): New.
9999 (init_named_socket): New.
10000 (gdb_ust_socket_init): New.
10001 (cstr_to_hexstr): New.
10002 (next_st): New.
10003 (first_marker, next_marker): New.
10004 (response_ust_marker): New.
10005 (cmd_qtfstm, cmd_qtsstm): New.
10006 (unprobe_marker_at, probe_marker_at): New.
10007 (cmd_qtstmat, gdb_ust_thread): New.
10008 (gdb_ust_init): New.
10009 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10010 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10011 (ST_REGENTRY): New.
10012 (x86_64_st_collect_regmap): New.
10013 (X86_64_NUM_ST_COLLECT_GREGS): New.
10014 (AMD64_RIP_REGNUM): New.
10015 (supply_static_tracepoint_registers): New.
10016 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10017 (ST_REGENTRY): New.
10018 (i386_st_collect_regmap): New.
10019 (i386_NUM_ST_COLLECT_GREGS): New.
10020 (supply_static_tracepoint_registers): New.
10021 * server.c (handle_query): Handle qXfer:statictrace:read.
10022 <qSupported>: Report support for StaticTracepoints, and
10023 qXfer:statictrace:read features.
10024 * server.h (traceframe_read_sdata)
10025 (supply_static_tracepoint_registers): Declare.
10026 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10027 (unpack_varlen_hex): Include in IPA build.
10028 * Makefile.in (ustlibs, ustinc): New.
10029 (IPA_OBJS): Add remote-utils-ipa.o.
10030 ($(IPA_LIB)): Link -ldl and -lpthread.
10031 (UST_CFLAGS): New.
10032 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10033 * config.in, configure: Regenerate.
10034
9e4344e5
PA
100352010-06-20 Ian Lance Taylor <iant@google.com>
10036 Pedro Alves <pedro@codesourcery.com>
10037
10038 * linux-x86-low.c (always_true): Delete.
10039 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10040 trying to fool the compiler with always_true.
10041
c6beb2cb
PA
100422010-06-20 Pedro Alves <pedro@codesourcery.com>
10043
10044 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10045 conditions in gdbserver.
10046
d2ed6730
UW
100472010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10048
10049 * spu-low.c (spu_read_memory): Wrap around local store limit.
10050 (spu_write_memory): Likewise.
10051
4e29fb54
PA
100522010-06-15 Pedro Alves <pedro@codesourcery.com>
10053
10054 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10055 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10056 LONGEST uses.
10057 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10058 uses.
10059 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10060 uses with LONGEST uses.
10061
6a271cae
PA
100622010-06-14 Stan Shebs <stan@codesourcery.com>
10063 Pedro Alves <pedro@codesourcery.com>
10064
10065 Bytecode compiler.
10066
10067 * linux-x86-low.c: Include limits.h.
10068 (add_insns): New.
10069 (always_true): New.
10070 (EMIT_ASM): New.
10071 (EMIT_ASM32): New.
10072 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10073 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10074 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10075 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10076 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10077 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10078 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10079 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10080 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10081 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10082 (amd64_emit_void_call_2): New.
10083 (amd64_emit_ops): New.
10084 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10085 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10086 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10087 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10088 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10089 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10090 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10091 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10092 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10093 (i386_emit_stack_adjust, i386_emit_int_call_1)
10094 (i386_emit_void_call_2): New.
10095 (i386_emit_ops): New.
10096 (x86_emit_ops): New.
10097 (the_low_target): Install x86_emit_ops.
10098 * server.h (struct emit_ops): New.
10099 (get_raw_reg_func_addr): Declare.
10100 (current_insn_ptr, emit_error): Declare.
10101 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10102 (set_trace_state_variable_value): New defines.
10103 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10104 addr_get_trace_state_variable_value and
10105 addr_set_trace_state_variable_value.
10106 (symbol_list): New fields for get_raw_reg,
10107 get_trace_state_variable_value and set_trace_state_variable_value.
10108 (condfn): New typedef.
10109 (struct tracepoint): New field `compiled_cond'.
10110 (do_action_at_tracepoint): Clear compiled_cond.
10111 (get_trace_state_variable_value, set_trace_state_variable_value):
10112 Export in the IPA.
10113 (condition_true_at_tracepoint): If there's a compiled condition,
10114 run that.
10115 (current_insn_ptr, emit_error): New globals.
10116 (struct bytecode_address): New.
10117 (get_raw_reg_func_addr): New.
10118 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10119 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10120 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10121 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10122 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10123 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10124 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10125 (compile_tracepoint_condition, compile_bytecodes): New.
10126 * target.h (emit_ops): Forward declare.
10127 (struct target_ops): New field emit_ops.
10128 (target_emit_ops): New.
10129 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10130 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10131 * linux-low.c (linux_emit_ops): New.
10132 (linux_target_ops): Install it.
10133 * linux-low.h (struct linux_target_ops): New field emit_ops.
10134
92b72907
UW
101352010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10136
10137 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10138 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10139
fa593d66
PA
101402010-06-01 Pedro Alves <pedro@codesourcery.com>
10141 Stan Shebs <stan@codesourcery.com>
10142
10143 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10144 (all): Depend on $(extra_libraries).
10145 (install-only): Install the IPA.
10146 (IPA_OBJS, IPA_LIB): New.
10147 (clean): Remove the IPA lib.
10148 (IPAGENT_CFLAGS): New.
10149 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10150 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10151 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10152 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10153 * configure.ac: Check for atomic builtins support in the compiler.
10154 (IPA_DEPFILES, extra_libraries): Define.
10155 * configure.srv (ipa_obj): Add description.
10156 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10157 (i[34567]86-*-linux*): Set ipa_obj.
10158 (x86_64-*-linux*): Set ipa_obj.
10159 * linux-low.c (stabilizing_threads): New.
10160 (supports_fast_tracepoints): New.
10161 (linux_detach): Stabilize threads before detaching.
10162 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10163 the lwp is either not stabilizing, or is moving out of a jump pad.
10164 (linux_fast_tracepoint_collecting): New.
10165 (maybe_move_out_of_jump_pad): New.
10166 (enqueue_one_deferred_signal): New.
10167 (dequeue_one_deferred_signal): New.
10168 (linux_wait_for_event_1): If moving out of a jump pad, defer
10169 pending signals to later.
10170 (linux_stabilize_threads): New.
10171 (linux_wait_1): Check if threads need moving out of jump pads, and
10172 do it if so.
10173 (stuck_in_jump_pad_callback): New.
10174 (move_out_of_jump_pad_callback): New.
10175 (lwp_running): New.
10176 (linux_resume_one_lwp): Handle moving out of jump pads.
10177 (linux_set_resume_request): Dequeue deferred signals.
10178 (need_step_over_p): Also step over fast tracepoint jumps.
10179 (start_step_over): Also uninsert fast tracepoint jumps.
10180 (finish_step_over): Also reinsert fast tracepoint jumps.
10181 (linux_install_fast_tracepoint_jump): New.
10182 (linux_target_ops): Install linux_stabilize_threads and
10183 linux_install_fast_tracepoint_jump_pad.
10184 * linux-low.h (linux_target_ops) <get_thread_area,
10185 install_fast_tracepoint_jump_pad>: New fields.
10186 (struct lwp_info) <collecting_fast_tracepoint,
10187 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10188 (linux_get_thread_area): Declare.
10189 * linux-x86-low.c (jump_insn): New.
10190 (x86_get_thread_area): New.
10191 (append_insns): New.
10192 (push_opcode): New.
10193 (amd64_install_fast_tracepoint_jump_pad): New.
10194 (i386_install_fast_tracepoint_jump_pad): New.
10195 (x86_install_fast_tracepoint_jump_pad): New.
10196 (the_low_target): Install x86_get_thread_area and
10197 x86_install_fast_tracepoint_jump_pad.
10198 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10199 (struct fast_tracepoint_jump): New.
10200 (fast_tracepoint_jump_insn): New.
10201 (fast_tracepoint_jump_shadow): New.
10202 (find_fast_tracepoint_jump_at): New.
10203 (fast_tracepoint_jump_here): New.
10204 (delete_fast_tracepoint_jump): New.
10205 (set_fast_tracepoint_jump): New.
10206 (uninsert_fast_tracepoint_jumps_at): New.
10207 (reinsert_fast_tracepoint_jumps_at): New.
10208 (set_breakpoint_at): Use write_inferior_memory.
10209 (uninsert_raw_breakpoint): Use write_inferior_memory.
10210 (check_mem_read): Mask out fast tracepoint jumps.
10211 (check_mem_write): Mask out fast tracepoint jumps.
10212 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10213 (set_fast_tracepoint_jump): Declare.
10214 (delete_fast_tracepoint_jump)
10215 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10216 (reinsert_fast_tracepoint_jumps_at): Declare.
10217 * regcache.c: Don't compile many functions when building the
10218 in-process agent library.
10219 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10220 the register buffer in the heap.
10221 (free_register_cache): If the register buffer isn't owned by the
10222 regcache, don't free it.
10223 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10224 pre-existing register caches.
10225 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10226 type.
10227 (convert_ascii_to_int): : Constify `from' parameter type.
10228 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10229 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10230 the needed buffer in-place.
10231 (relocate_instruction): New.
10232 * server.c (handle_query) <qSymbols>: If the target supports
10233 tracepoints, give it a chance of looking up symbols. Report
10234 support for fast tracepoints.
10235 (handle_status): Stabilize threads.
10236 (process_serial_event): Adjust.
10237 * server.h (struct fast_tracepoint_jump): Forward declare.
10238 (struct process_info) <fast_tracepoint_jumps>: New field.
10239 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10240 (decode_X_packet, decode_M_packet): Adjust.
10241 (relocate_instruction): Declare.
10242 (in_process_agent_loaded): Declare.
10243 (tracepoint_look_up_symbols): Declare.
10244 (struct fast_tpoint_collect_status): Declare.
10245 (fast_tracepoint_collecting): Declare.
10246 (force_unlock_trace_buffer): Declare.
10247 (handle_tracepoint_bkpts): Declare.
10248 (initialize_low_tracepoint)
10249 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10250 * target.h (struct target_ops) <stabilize_threads,
10251 install_fast_tracepoint_jump_pad>: New fields.
10252 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10253 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10254 [HAVE_STDINT_H]: Include stdint.h.
10255 (trace_debug_1): Rename to ...
10256 (trace_vdebug): ... this.
10257 (trace_debug): Rename to ...
10258 (trace_debug_1): ... this. Add `level' parameter.
10259 (trace_debug): New.
10260 (ATTR_USED, ATTR_NOINLINE): New.
10261 (IP_AGENT_EXPORT): New.
10262 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10263 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10264 (about_to_request_buffer_space, trace_buffer_is_full)
10265 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10266 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10267 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10268 (traceframe_write_count, traceframes_created)
10269 (trace_state_variables)
10270 New renaming defines.
10271 (struct ipa_sym_addresses): New.
10272 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10273 (symbol_list): New.
10274 (ipa_sym_addrs): New.
10275 (all_tracepoint_symbols_looked_up): New.
10276 (in_process_agent_loaded): New.
10277 (write_e_ipa_not_loaded): New.
10278 (maybe_write_ipa_not_loaded): New.
10279 (tracepoint_look_up_symbols): New.
10280 (debug_threads) [IN_PROCESS_AGENT]: New.
10281 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10282 (UNKNOWN_SIDE_EFFECTS): New.
10283 (stop_tracing): New.
10284 (flush_trace_buffer): New.
10285 (stop_tracing_bkpt): New.
10286 (flush_trace_buffer_bkpt): New.
10287 (read_inferior_integer): New.
10288 (read_inferior_uinteger): New.
10289 (read_inferior_data_pointer): New.
10290 (write_inferior_data_pointer): New.
10291 (write_inferior_integer): New.
10292 (write_inferior_uinteger): New.
10293 (struct collect_static_trace_data_action): Delete.
10294 (enum tracepoint_type): New.
10295 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10296 <actions_str, step_actions, step_actions_str>: Only include in
10297 GDBserver.
fa593d66
PA
10298 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10299 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10300 (tracepoints): Use IP_AGENT_EXPORT.
10301 (last_tracepoint): Don't include in the IPA.
10302 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10303 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10304 (alloced_trace_state_variables): New.
10305 (trace_state_variables): Use IP_AGENT_EXPORT.
10306 (traceframe_t): Delete unused variable.
10307 (circular_trace_buffer): Don't include in the IPA.
10308 (trace_buffer_start): Delete.
10309 (struct trace_buffer_control): New.
10310 (trace_buffer_free): Delete.
10311 (struct ipa_trace_buffer_control): New.
10312 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10313 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10314 New.
10315 (trace_buffer_ctrl): New.
10316 (TRACE_BUFFER_CTRL_CURR): New.
10317 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10318 Reimplement as macros.
10319 (trace_buffer_wrap): Delete.
10320 (traceframe_write_count, traceframe_read_count)
10321 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10322 (struct tracepoint_hit_ctx) <type>: New field.
10323 (struct fast_tracepoint_ctx): New.
10324 (memory_barrier): New.
10325 (cmpxchg): New.
10326 (record_tracepoint_error): Update atomically in the IPA.
10327 (clear_inferior_trace_buffer): New.
10328 (about_to_request_buffer_space): New.
10329 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10330 updating the same buffer.
10331 (add_tracepoint): Default the tracepoint's type to trap
10332 tracepoint, and orig_size to -1.
10333 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10334 internal variables.
10335 (create_trace_state_variable): New parameter `gdb'. Handle it.
10336 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10337 (cmd_qtdp): Handle fast tracepoints.
10338 (cmd_qtdv): Adjust.
10339 (max_jump_pad_size): New.
10340 (gdb_jump_pad_head): New.
10341 (get_jump_space_head): New.
10342 (claim_jump_space): New.
10343 (sort_tracepoints): New.
10344 (MAX_JUMP_SIZE): New.
10345 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10346 IPA.
10347 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10348 support. Upload fast traceframes, and delete internal IPA
10349 breakpoints.
10350 (stop_tracing_handler): New.
10351 (flush_trace_buffer_handler): New.
10352 (cmd_qtstop): Upload fast tracepoints.
10353 (response_tracepoint): Handle fast tracepoints.
10354 (tracepoint_finished_step): Upload fast traceframes. Set the
10355 tracepoint hit context's tracepoint type.
10356 (handle_tracepoint_bkpts): New.
10357 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10358 type. Add comment about fast tracepoints.
10359 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10360 non-existing action_str field.
10361 (get_context_regcache): Handle fast tracepoints.
10362 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10363 to the regcache.
10364 (fast_tracepoint_from_jump_pad_address): New.
10365 (fast_tracepoint_from_ipa_tpoint_address): New.
10366 (collecting_t): New.
10367 (force_unlock_trace_buffer): New.
10368 (fast_tracepoint_collecting): New.
10369 (collecting): New.
10370 (gdb_collect): New.
10371 (write_inferior_data_ptr): New.
10372 (target_tp_heap): New.
10373 (target_malloc): New.
10374 (download_agent_expr): New.
10375 (UALIGN): New.
10376 (download_tracepoints): New.
10377 (download_trace_state_variables): New.
10378 (upload_fast_traceframes): New.
10379 (IPA_FIRST_TRACEFRAME): New.
10380 (IPA_NEXT_TRACEFRAME_1): New.
10381 (IPA_NEXT_TRACEFRAME): New.
10382 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10383 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10384 (gdb_jump_pad_buffer_end): New.
10385 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10386 (initialize_tracepoint): Adjust.
10387 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10388 buffer. Initialize the low module.
10389 * utils.c (PREFIX, TOOLNAME): New.
10390 (malloc_failure): Use PREFIX.
10391 (error): In the IPA, an error causes an exit.
10392 (fatal, warning): Use PREFIX.
10393 (internal_error): Use TOOLNAME.
10394 (NUMCELLS): Increase to 10.
10395 * configure, config.in: Regenerate.
10396
d149dd1d
PA
103972010-06-01 Pedro Alves <pedro@codesourcery.com>
10398
10399 * server.c (handle_query) <qSupported>: Do two passes over the
10400 qSupported string to avoid nesting strtok.
10401
f6528abd
JK
104022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10403
10404 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10405 (CDEPS): New.
10406 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10407 -Wl,--dynamic-list.
10408 * configure: Regenerate.
10409 * proc-service.list: New.
10410
ca2a87a0
JK
104112010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10412
10413 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10414 New comment.
10415
363a6e9f
OS
104162010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10417
10418 * gdbreplay.c (remote_open): Check error return from socket() call by
10419 its equality to -1 not by it being negative.
10420 * remote-utils.c (remote_open): Likewise.
10421
d23b6cb1
PA
104222010-05-23 Pedro Alves <pedro@codesourcery.com>
10423
10424 * config.h: Regenerate.
10425
28d3cf85
MK
104262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10427
10428 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10429 doesn't provide PTRACE_GET_THREAD_AREA.
10430
fea36a59
MK
104312010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10432
10433 * linux-m68k-low.c: Include <asm/ptrace.h>
10434 (ps_get_thread_area): Implement.
10435
24b066ba
DE
104362010-05-03 Doug Evans <dje@google.com>
10437
10438 * event-loop.c (struct callback_event): New struct.
10439 (callback_list): New global.
10440 (append_callback_event, delete_callback_event): New functions.
10441 (process_callback): New function.
10442 (start_event_loop): Call it.
10443 * remote-utils.c (NOT_SCHEDULED): Define.
10444 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10445 moved out of readchar.
10446 (readchar): Rewrite. Call reschedule before returning.
10447 (reset_readchar): New function.
10448 (remote_close): Call it.
10449 (process_remaining, reschedule): New functions.
10450 * server.h (callback_handler_func): New typedef.
10451 (append_callback_event, delete_callback_event): Declare.
10452
9836d6ea
PA
104532010-05-03 Pedro Alves <pedro@codesourcery.com>
10454
10455 * proc-service.c (ps_pglobal_lookup): Use
10456 thread_db_look_up_one_symbol.
10457 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10458 parameter. Use it instead of all_symbols_looked_up.
10459 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10460 field.
10461 (all_symbols_looked_up): Don't declare.
10462 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10463 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10464 field.
10465 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10466 Set all_symbols_looked_up here.
10467 (thread_db_look_up_one_symbol): New.
10468 (thread_db_get_tls_address): Adjust.
10469 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10470 thread_db object on the heap, and tentatively set it in the
10471 process structure.
10472 (thread_db_init): Don't set all_symbols_looked_up here.
10473 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10474
7984d532
PA
104752010-05-03 Pedro Alves <pedro@codesourcery.com>
10476
10477 * linux-low.c (linux_kill, linux_detach): Adjust.
10478 (status_pending_p_callback): Remove redundant statement. Check
10479 for !TARGET_WAITIKIND_IGNORE, instead of
10480 TARGET_WAITKIND_STOPPED.
10481 (handle_tracepoints): Make sure LWP is locked. Adjust.
10482 (linux_wait_for_event_1): Adjust.
10483 (linux_cancel_breakpoints): New.
10484 (unsuspend_one_lwp): New.
10485 (unsuspend_all_lwps): New.
10486 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10487 (send_sigstop_callback): Change return type to int, add new
10488 `except' parameter and handle it.
10489 (suspend_and_send_sigstop_callback): New.
10490 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10491 pass them down. If SUSPEND, also increment the lwp's suspend
10492 count.
10493 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10494 (need_step_over_p): Don't consider suspended LWPs.
10495 (start_step_over): Adjust.
10496 (proceed_one_lwp): Change return type to int, add new `except'
10497 parameter and handle it.
10498 (unsuspend_and_proceed_one_lwp): New.
10499 (proceed_all_lwps): Use find_inferior instead of
10500 for_each_inferior.
10501 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10502 also decrement the suspend count of LWPs. Pass `except' down,
10503 instead of hacking its suspend count.
10504 (linux_pause_all): Add `freeze' parameter. Adjust.
10505 (linux_unpause_all): New.
10506 (linux_target_ops): Install linux_unpause_all.
10507 * server.c (handle_status): Adjust.
10508 * target.h (struct target_ops): New fields `unpause_all' and
10509 `cancel_breakpoints'. Add new parameter to `pause_all'.
10510 (pause_all): Add new `freeze' parameter.
10511 (unpause_all): New.
10512 (cancel_breakpoints): New.
10513 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10514 cancel breakpoints.
10515 (cmd_qtstart): Pause threads.
10516 (stop_tracing): Pause threads, and cancel breakpoints.
10517 * win32-low.c (win32_target_ops): Adjust.
10518
e471f25b
PA
105192010-05-03 Pedro Alves <pedro@codesourcery.com>
10520
10521 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10522 the inferior right away from here...
10523 (linux_wait_1): ... to here, and adjust to check the thread's
10524 last_resume_kind instead of the lwp's step or stop_expected flags.
10525
1915ef4f
PA
105262010-05-02 Pedro Alves <pedro@codesourcery.com>
10527
10528 * README: Use consistent `GDB' and `GDBserver' spellings.
10529
f9e39928
PA
105302010-05-02 Pedro Alves <pedro@codesourcery.com>
10531
10532 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10533 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10534 (linux_detach_one_lwp): Assume the lwp is stopped.
10535 (any_thread_of): Delete.
10536 (linux_detach): Stop all lwps here. Don't blindly delete all
10537 breakpoints.
10538 (delete_lwp_callback): New.
10539 (linux_mourn): Delete all lwps of the process that is gone.
10540 (linux_wait_1): Don't delete the last lwp of the process here.
10541 * mem-break.h (mark_breakpoints_out): Declare.
10542 * mem-break.c (mark_breakpoints_out): New.
10543 (free_all_breakpoints): Use it.
10544 * server.c (handle_target_event): If the process is gone, mark
10545 breakpoints out.
10546 * thread-db.c (struct thread_db) <create_bp>: New field.
10547 (thread_db_enable_reporting): Fix prototype. Store a thread event
10548 breakpoint reference in the thread_db struct.
10549 (thread_db_load_search): Clear the thread_db object.
10550 (try_thread_db_load_1): Ditto.
10551 (switch_to_process): New.
10552 (disable_thread_event_reporting): Use it.
10553 (remove_thread_event_breakpoints): New.
10554 (thread_db_detach, thread_db_mourn): Use it.
10555
1e7fc18c
PA
105562010-05-01 Pedro Alves <pedro@codesourcery.com>
10557
10558 * linux-low.c (linux_enable_event_reporting): New.
10559 (linux_wait_for_event_1, handle_extended_wait): Use it.
10560
02fc4de7
PA
105612010-04-30 Pedro Alves <pedro@codesourcery.com>
10562
10563 * linux-low.c (linux_kill_one_lwp, linux_kill)
10564 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10565 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10566 SIGSTOP even if the LWP is stopped.
10567 (send_sigstop_callback): New.
10568 (stop_all_lwps): Use send_sigstop_callback instead.
10569 (linux_resume_one_thread): Adjust.
10570 (proceed_one_lwp): Still proceed an LWP that the client has
10571 requested to stop, if we haven't reported it as stopped yet. Make
10572 sure that LWPs the client want stopped, have a pending SIGSTOP.
10573
bc3b5632
DE
105742010-04-26 Doug Evans <dje@google.com>
10575
ae1ada35
DE
10576 * server.c (handle_general_set): Make static.
10577
bc3b5632
DE
10578 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10579 Print received char after testing for error/eof instead of before.
10580 (input_interrupt): Tweak comment.
10581
65730243
DE
105822010-04-23 Doug Evans <dje@google.com>
10583
10584 * server.c (start_inferior): Print inferior argv if --debug.
10585
a8ae7dc0
AR
105862010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10587
10588 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10589 * nto-x86-low.c: Include server.h
10590
1c07cc19
PM
105912010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10592
10593 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10594 be consistent with other sources of this directory.
10595 (init_registers_amd64): Correct name of source file of this function
10596 in the comment.
10597
e0a61e09
PM
105982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10599
10600 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10601 64-bit executables.
10602
54709339
PM
106032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10604
10605 * win32-i386-low.c: Add 64-bit support.
10606 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10607 (init_registers_amd64): Declare.
10608 (mappings): Add 64-bit version of array.
10609 (init_windows_x86): New function.
10610 (the_low_target): Change init_arch field to init_windows_x86.
10611
e8f0053d
PM
106122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10613
10614 * win32-low.c: Adapt to support also 64-bit architecture.
10615 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10616 (get_image_name): Use SIZE_T type for local variable `done'.
10617 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10618 (toolhelp_get_dll_name): Idem.
10619 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10620 Use uintptr_t typecast to avoid warning.
10621 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10622 (handle_exception): Use phex_nz to avoid warning.
10623 (win32_wait): Remove unused local variable `process'.
10624
c481e77e
PM
106252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10626
10627 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10628 `amd64-avx.o'.
10629
12ea4b69
PM
106302010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10631
10632 * configure.ac: Use `ws2_32' library for srv_mingw.
10633 * configure: Regenerate.
10634 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10635 * remote-utils.c: Likewise.
10636
f6d1620c
L
106372010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10638
10639 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10640 if __x86_64__ is defined.
10641
8e642873
PM
106422010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10643
10644 * configure: Regenerate.
10645
711e434b
PM
106462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10647
10648 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10649 * target.h (target_ops): New get_tib_address field.
10650 * win32-low.h (win32_thread_info): Add thread_local_base field.
10651 * win32-low.c (child_add_thread): Add tlb argument.
10652 Set thread_local_base field to TLB.
10653 (get_child_debug_event): Adapt to child_add_thread change.
10654 (win32_get_tib_address): New function.
10655 (win32_target_ops): Set get_tib_address field to
10656 win32_get_tib_address.
10657 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10658
505106cd
PA
106592010-04-12 Pedro Alves <pedro@codesourcery.com>
10660
505106cd
PA
10661 * linux-low.c (linux_mourn): Also remove the process.
10662 * server.c (handle_target_event): Don't remove the process here.
10663 * nto-low.c (nto_mourn): New.
10664 (nto_target_ops): Install it.
10665 * spu-low.c (spu_mourn): New.
10666 (spu_target_ops): Install it.
10667 * win32-low.c (win32_mourn): New.
10668 (win32_target_ops): Install it.
10669
e8470a06
PA
106702010-04-12 Pedro Alves <pedro@codesourcery.com>
10671
10672 * server.h (buffer_xml_printf): Remove redundant `;'.
10673
45ba0d02
PA
106742010-04-12 Pedro Alves <pedro@codesourcery.com>
10675
10676 * regcache.c (set_register_cache): Invalidate regcaches before
10677 changing the register cache layout.
10678 (regcache_invalidate_one): Allow a NULL regcache.
10679 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10680 regcaches before changing the register cache layout or the target
10681 regsets.
10682
59e04013
L
106832010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10684
10685 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10686 variable warning on Linux/x86-64.
10687
8336d594
PA
106882010-04-11 Pedro Alves <pedro@codesourcery.com>
10689
10690 GDBserver disconnected tracing support.
10691
10692 * linux-low.c (linux_remove_process): Delete.
10693 (add_lwp): Don't set last_resume_kind here.
10694 (linux_kill): Use `mourn'.
10695 (linux_detach): Use `thread_db_detach', and `mourn'.
10696 (linux_mourn): New.
10697 (linux_attach_lwp_1): Adjust comment.
10698 (linux_attach): last_resume_kind moved the thread_info; adjust.
10699 (status_pending_p_callback): Adjust.
10700 (linux_wait_for_event_1): Adjust.
10701 (count_events_callback, select_singlestep_lwp_callback)
10702 (select_event_lwp_callback, cancel_breakpoints_callback)
10703 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10704 (proceed_one_lwp): Adjust.
10705 (linux_async): Add debug output.
10706 (linux_thread_stopped): New.
10707 (linux_pause_all): New.
10708 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10709 linux_pause_all.
10710 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10711 (thread_db_free): Delete declaration.
10712 (thread_db_detach, thread_db_mourn): Declare.
10713 * thread-db.c (thread_db_init): Use thread_db_mourn.
10714 (thread_db_free): Delete, split in two.
10715 (disable_thread_event_reporting): New.
10716 (thread_db_detach): New.
10717 (thread_db_mourn): New.
10718
10719 * server.h (struct thread_info) <last_resume_kind>: New field.
10720 <attached>: Add comment.
10721 <gdb_detached>: New field.
10722 (handler_func): Change return type to int.
10723 (handle_serial_event, handle_target_event): Ditto.
10724 (gdb_connected): Declare.
10725 (tracing): Delete.
10726 (disconnected_tracing): Declare.
10727 (stop_tracing): Declare.
10728
10729 * server.c (handle_query) <qSupported>: Report support for
10730 disconnected tracing.
10731 (queue_stop_reply_callback): Account for running threads.
10732 (gdb_wants_thread_stopped): New.
10733 (gdb_wants_all_threads_stopped): New.
10734 (gdb_reattached_process): New.
10735 (handle_status): Clear the `gdb_detached' flag of all processes.
10736 In all-stop, stop all threads.
10737 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10738 (process_serial_event): If the remote connection breaks, or if an
10739 exit was forced with "monitor exit", force an event loop exit.
10740 Handle disconnected tracing on detach.
10741 (handle_serial_event): Adjust.
10742 (handle_target_event): If GDB isn't connected, forward events back
10743 to the inferior, unless the last process exited, in which case,
10744 exit gdbserver. Adjust interface.
10745
10746 * remote-utils.c (remote_open): Don't block in accept. Instead
10747 register an event loop source on the listen socket file
10748 descriptor. Refactor bits into ...
10749 (listen_desc): ... this new global.
10750 (gdb_connected): ... this new function.
10751 (enable_async_notification): ... this new function.
10752 (handle_accept_event): ... this new function.
10753 (remote_close): Clear remote_desc.
10754
10755 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10756
10757 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10758 New fields.
10759 (mourn_inferior): Define.
10760 (target_process_qsupported): Avoid the dangling else problem.
10761 (thread_stopped): Define.
10762 (pause_all): Define.
10763 (target_waitstatus_to_string): Declare.
10764 * target.c (target_waitstatus_to_string): New.
10765
10766 * tracepoint.c (tracing): Make extern.
10767 (disconnected_tracing): New.
10768 (stop_tracing): Make extern. Handle tracing stops due to GDB
10769 disconnecting.
10770 (cmd_qtdisconnected): New.
10771 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10772 (handle_tracepoint_general_set): Handle QTDisconnected.
10773
10774 * event-loop.c (event_handler_func): Change return type to int.
10775 (process_event): Bail out if the event handler wants the event
10776 loop to stop.
10777 (handle_file_event): Ditto.
10778 (start_event_loop): Bail out if the event handler wants the event
10779 loop to stop.
10780
10781 * nto-low.c (nto_target_ops): Adjust.
10782 * spu-low.c (spu_wait): Don't remove the process here.
10783 (spu_target_ops): Adjust.
10784 * win32-low.c (win32_wait): Don't remove the process here.
10785 (win32_target_ops): Adjust.
10786
5d267c4c
PA
107872010-04-11 Pedro Alves <pedro@codesourcery.com>
10788
10789 * regcache.c (realloc_register_cache): Invalidate inferior's
10790 regcache before recreating it.
10791
623ccd72
PA
107922010-04-09 Pedro Alves <pedro@codesourcery.com>
10793
10794 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10795
219f2f23
PA
107962010-04-09 Stan Shebs <stan@codesourcery.com>
10797 Pedro Alves <pedro@codesourcery.com>
10798
10799 * server.h (LONGEST): New.
10800 (struct thread_info) <while_stepping>: New field.
10801 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10802 Declare.
10803 (initialize_tracepoint, handle_tracepoint_general_set)
10804 (handle_tracepoint_query, tracepoint_finished_step)
10805 (tracepoint_was_hit, release_while_stepping_state_list):
10806 (current_traceframe): Declare.
10807 * server.c (handle_general_set): Handle tracepoint packets.
10808 (read_memory): New.
10809 (write_memory): New.
10810 (handle_search_memory_1): Use read_memory.
10811 (handle_query): Report support for conditional tracepoints, trace
10812 state variables, and tracepoint sources. Handle tracepoint
10813 queries.
10814 (main): Initialize the tracepoints module.
10815 (process_serial_event): Handle traceframe reads/writes.
10816
10817 * linux-low.c (handle_tracepoints): New.
10818 (linux_wait_1): Call it.
10819 (linux_resume_one_lwp): Handle while-stepping.
10820 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10821 (linux_target_ops): Install them.
10822 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10823 New field.
10824 * linux-x86-low.c (x86_supports_tracepoints): New.
10825 (the_low_target). Install it.
10826
10827 * mem-break.h (delete_breakpoint): Declare.
10828 * mem-break.c (delete_breakpoint): Make external.
10829
10830 * target.h (struct target_ops): Add `supports_tracepoints',
10831 `read_pc', and `write_pc' fields.
10832 (target_supports_tracepoints): Define.
10833 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10834 (phex_nz): New.
10835
10836 * regcache.h (struct regcache) <registers_owned>: New field.
10837 (init_register_cache, regcache_cpy): Declare.
10838 (regcache_read_pc, regcache_write_pc): Declare.
10839 (register_cache_size): Declare.
10840 (supply_regblock): Declare.
10841 * regcache.c (init_register_cache): New.
10842 (new_register_cache): Use it.
10843 (regcache_cpy): New.
10844 (register_cache_size): New.
10845 (supply_regblock): New.
10846 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10847
219f2f23
PA
10848 * tracepoint.c: New.
10849
10850 * Makefile.in (OBS): Add tracepoint.o.
10851 (tracepoint.o): New rule.
10852
3a13a53b
L
108532010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10854
10855 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10856 (i386-mmx.o): New.
10857 (i386-mmx.c): Likewise.
10858 (i386-mmx-linux.o): Likewise.
10859 (i386-mmx-linux.c): Likewise.
10860
10861 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10862 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10863 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10864 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10865
10866 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10867 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10868 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10869
1570b33e
L
108702010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10871
10872 * Makefile.in (clean): Updated.
10873 (i386-avx.o): New.
10874 (i386-avx.c): Likewise.
10875 (i386-avx-linux.o): Likewise.
10876 (i386-avx-linux.c): Likewise.
10877 (amd64-avx.o): Likewise.
10878 (amd64-avx.c): Likewise.
10879 (amd64-avx-linux.o): Likewise.
10880 (amd64-avx-linux.c): Likewise.
10881
10882 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10883 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10884 (srv_amd64_regobj): Add amd64-avx.o.
10885 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10886 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10887 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10888 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10889 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10890 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10891 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10892
10893 * i387-fp.c: Include "i386-xstate.h".
10894 (i387_xsave): New.
10895 (i387_cache_to_xsave): Likewise.
10896 (i387_xsave_to_cache): Likewise.
10897 (x86_xcr0): Likewise.
10898
10899 * i387-fp.h (i387_cache_to_xsave): Likewise.
10900 (i387_xsave_to_cache): Likewise.
10901 (x86_xcr0): Likewise.
10902
10903 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10904 * linux-crisv32-low.c (target_regsets): Likewise.
10905 * linux-m68k-low.c (target_regsets): Likewise.
10906 * linux-mips-low.c (target_regsets): Likewise.
10907 * linux-ppc-low.c (target_regsets): Likewise.
10908 * linux-s390-low.c (target_regsets): Likewise.
10909 * linux-sh-low.c (target_regsets): Likewise.
10910 * linux-sparc-low.c (target_regsets): Likewise.
10911 * linux-xtensa-low.c (target_regsets): Likewise.
10912
10913 * linux-low.c: Include <sys/uio.h>.
10914 (regsets_fetch_inferior_registers): Support nt_type.
10915 (regsets_store_inferior_registers): Likewise.
10916 (linux_process_qsupported): New.
10917 (linux_target_ops): Add linux_process_qsupported.
10918
10919 * linux-low.h (regset_info): Add nt_type.
10920 (linux_target_ops): Add process_qsupported.
10921
10922 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10923 and <sys/uio.h>.
10924 (init_registers_i386_avx_linux): New.
10925 (init_registers_amd64_avx_linux): Likewise.
10926 (xmltarget_i386_linux_no_xml): Likewise.
10927 (xmltarget_amd64_linux_no_xml): Likewise.
10928 (PTRACE_GETREGSET): Likewise.
10929 (PTRACE_SETREGSET): Likewise.
10930 (x86_fill_xstateregset): Likewise.
10931 (x86_store_xstateregset): Likewise.
10932 (use_xml): Likewise.
10933 (x86_linux_update_xmltarget): Likewise.
10934 (x86_linux_process_qsupported): Likewise.
10935 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10936 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10937 init_registers_i386_linux here. Call
10938 x86_linux_update_xmltarget.
10939 (the_low_target): Add x86_linux_process_qsupported.
10940
10941 * server.c (handle_query): Call target_process_qsupported.
10942
10943 * target.h (target_ops): Add process_qsupported.
10944 (target_process_qsupported): New.
10945
fc7238bb
PA
109462010-04-03 Pedro Alves <pedro@codesourcery.com>
10947
10948 * inferiors.c (add_thread): Set last_status kind to
10949 TARGET_WAITKIND_IGNORE.
10950 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10951 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10952 (linux_wait_1): Move `thread' local definition to block that uses
10953 it. Don't NULL initialize `event_child'.
10954 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10955 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10956 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10957
bdabb078
PA
109582010-04-01 Pedro Alves <pedro@codesourcery.com>
10959
10960 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10961 an extended waitstatus, or by a watchpoint.
10962 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10963 thread was stepping or has been stopped by a watchpoint.
10964
d3bbe7a0
PA
109652010-04-01 Pedro Alves <pedro@codesourcery.com>
10966
10967 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10968 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10969 of another, then delete the previous, and validate all
10970 breakpoints.
10971 (validate_inserted_breakpoint): New.
10972 (delete_disabled_breakpoints): New.
10973 (validate_breakpoints): New.
10974 (check_mem_read): Validate breakpoints before trusting their
10975 shadow. Delete disabled breakpoints.
10976 (check_mem_write): Validate breakpoints before trusting they
10977 should be inserted. Delete disabled breakpoints.
10978 * mem-break.h (validate_breakpoints):
10979 * server.c (handle_query): Validate breakpoints when we see a
10980 qSymbol query.
10981
8b07ae33
PA
109822010-04-01 Pedro Alves <pedro@codesourcery.com>
10983
10984 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10985 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10986 if we could tell there's a GDB breakpoint at stop_pc.
10987 (need_step_over_p): Don't do a step over if we find a GDB
10988 breakpoint at the resume PC.
10989
10990 * mem-break.c (struct raw_breakpoint): New.
10991 (enum bkpt_type): New type `gdb_breakpoint'.
10992 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10993 fields. New field `raw'.
10994 (find_raw_breakpoint_at): New.
10995 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10996 breakpoint instead.
10997 (set_breakpoint_at): Adjust.
10998 (delete_raw_breakpoint): New.
10999 (release_breakpoint): New.
11000 (delete_breakpoint): Rename to...
11001 (delete_breakpoint_1): ... this. Add proc parameter. Use
11002 release_breakpoint. Return ENOENT.
11003 (delete_breakpoint): Reimplement.
11004 (find_breakpoint_at): Delete.
11005 (find_gdb_breakpoint_at): New.
11006 (delete_breakpoint_at): Delete.
11007 (set_gdb_breakpoint_at): New.
11008 (delete_gdb_breakpoint_at): New.
11009 (gdb_breakpoint_here): New.
11010 (set_reinsert_breakpoint): Use release_breakpoint.
11011 (uninsert_breakpoint): Rename to ...
11012 (uninsert_raw_breakpoint): ... this.
11013 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11014 (reinsert_raw_breakpoint): Change parameter type to
11015 raw_breakpoint.
11016 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11017 instead.
11018 (check_breakpoints): Adjust. Use release_breakpoint.
11019 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11020 (breakpoint_inserted_here): Ditto.
11021 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11022 Don't trust the breakpoint's shadow if it is not inserted.
11023 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11024 (delete_all_breakpoints): Adjust.
11025 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11026 use delete_breakpoint_1.
11027
11028 * mem-break.h (breakpoints_supported): Delete declaration.
11029 (set_gdb_breakpoint_at): Declare.
11030 (gdb_breakpoint_here): Declare.
11031 (delete_breakpoint_at): Delete.
11032 (delete_gdb_breakpoint_at): Declare.
11033
11034 * server.h (struct raw_breakpoint): Forward declare.
11035 (struct process_info): New field `raw_breakpoints'.
11036
11037 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11038 breakpoints.
11039
6bf5e0ba
PA
110402010-03-24 Pedro Alves <pedro@codesourcery.com>
11041
11042 * linux-low.c (status_pending_p_callback): Fix comment.
11043 (linux_wait_for_event_1): Move most of the internal breakpoint
11044 handling from here...
11045 (linux_wait_1): ... to here.
11046 (count_events_callback): New.
11047 (select_singlestep_lwp_callback): New.
11048 (select_event_lwp_callback): New.
11049 (cancel_breakpoints_callback): New.
11050 (select_event_lwp): New.
11051 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11052 priority to all LWPs that have had events that should be reported
11053 to the client. Cancel breakpoints when about to reporting the
11054 event to the client, not while stopping lwps. No longer cancel
11055 finished single-steps here.
11056 (cancel_finished_single_step): Delete.
11057 (cancel_finished_single_steps): Delete.
11058
414a389f
PA
110592010-03-24 Pedro Alves <pedro@codesourcery.com>
11060
11061 * mem-break.c (enum bkpt_type): New.
11062 (struct breakpoint): New field `type'.
11063 (set_breakpoint_at): Change return type to struct breakpoint
11064 pointer. Set type to `other_breakpoint' by default.
11065 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11066 in the breakpoint list.
11067 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11068 (reinsert_breakpoint): Rename to ...
11069 (reinsert_raw_breakpoint): ... this.
11070 (reinsert_breakpoints_at): Adjust.
11071 * mem-break.h (struct breakpoint): Declare.
11072 (set_breakpoint_at): Change return type to struct breakpoint
11073 pointer.
11074
2280c721
PA
110752010-03-24 Pedro Alves <pedro@codesourcery.com>
11076
11077 * server.c (handle_query): Assign, not compare.
11078
d50171e4
PA
110792010-03-24 Pedro Alves <pedro@codesourcery.com>
11080
11081 Teach linux gdbserver to step-over-breakpoints.
11082
11083 * linux-low.c (can_hardware_single_step): New.
11084 (supports_breakpoints): New.
11085 (handle_extended_wait): If stopping threads, read the stop pc of
11086 the new cloned LWP.
11087 (get_pc): New.
11088 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11089 low target doesn't support retrieving the PC.
11090 (add_lwp): Set last_resume_kind to resume_continue.
11091 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11092 (linux_attach): Don't clear stop_expected. Set the lwp's
11093 last_resume_kind to resume_stop.
11094 (linux_detach_one_lwp): Don't check for removed breakpoints.
11095 (check_removed_breakpoint): Delete.
11096 (status_pending_p): Rename to ...
11097 (status_pending_p_callback): ... this. Don't check for removed
11098 breakpoints. Don't consider threads that are stopped from GDB's
11099 perspective.
11100 (linux_wait_for_lwp): Always read the stop_pc here.
11101 (cancel_breakpoint): New.
11102 (step_over_bkpt): New global.
11103 (linux_wait_for_event_1): Implement stepping over breakpoints.
11104 (gdb_wants_lwp_stopped): New.
11105 (gdb_wants_all_stopped): New.
11106 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11107 single-step traps here. Store the thread's last reported target
11108 wait status.
11109 (send_sigstop): Don't clear stop_expected. Always set it,
11110 instead.
11111 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11112 (cancel_finished_single_step): New.
11113 (cancel_finished_single_steps): New.
11114 (wait_for_sigstop): Don't cancel finished single-step traps here.
11115 (linux_resume_one_lwp): Don't check for removed breakpoints.
11116 Don't set `step' on non-hardware step archs.
11117 (linux_set_resume_request): Ignore resume_stop requests if already
11118 stopping or stopped. Set the lwp's last_resume_kind.
11119 (resume_status_pending_p): Don't check for removed breakpoints.
11120 (need_step_over_p): New.
11121 (start_step_over): New.
11122 (finish_step_over): New.
11123 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11124 requests. Clear the thread's last reported target waitstatus.
11125 Don't use the `suspended' flag. Don't consider pending breakpoints.
11126 (linux_resume): Start a step-over if necessary.
11127 (proceed_one_lwp): New.
11128 (proceed_all_lwps): New.
11129 (unstop_all_lwps): New.
11130 * linux-low.h (struct lwp_info): Rewrite comment for the
11131 `suspended' flag. Add the `stop_pc' field. Delete the
11132 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11133 Add `'last_resume_kind' and `need_step_over' fields.
11134 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11135 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11136 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11137 (set_raw_breakpoint_at): New.
11138 (set_breakpoint_at): Rewrite to use it.
11139 (reinsert_breakpoint_handler): Delete.
11140 (set_reinsert_breakpoint): New.
11141 (reinsert_breakpoint_by_bp): Delete.
11142 (delete_reinsert_breakpoints): New.
11143 (uninsert_breakpoint): Rewrite.
11144 (uninsert_breakpoints_at): New.
11145 (reinsert_breakpoint): Rewrite.
11146 (reinsert_breakpoints_at): New.
11147 (check_breakpoints): Rewrite.
11148 (breakpoint_here): New.
11149 (breakpoint_inserted_here): New.
11150 (check_mem_read): Adjust.
11151 * mem-break.h (breakpoints_supported, breakpoint_here)
11152 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11153 (reinsert_breakpoint_by_bp): Delete declaration.
11154 (delete_reinsert_breakpoints): Declare.
11155 (reinsert_breakpoint): Delete declaration.
11156 (reinsert_breakpoints_at): Declare.
11157 (uninsert_breakpoint): Delete declaration.
11158 (uninsert_breakpoints_at): Declare.
11159 (check_breakpoints): Adjust prototype.
11160 * server.h: Adjust include order.
11161 (struct thread_info): Declare here. Add a `last_status' field.
11162
30ba68cb
MS
111632010-03-23 Michael Snyder <msnyder@vmware.com>
11164
11165 * server.c (crc32): New function.
11166 (handle_query): Add handling for 'qCRC:' request.
11167
b9a881c2
PA
111682010-03-23 Pedro Alves <pedro@codesourcery.com>
11169
11170 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11171 lwp had been stopped by a watchpoint.
11172
e92d13d5
PA
111732010-03-16 Pedro Alves <pedro@codesourcery.com>
11174
11175 * server.h (internal_error): Declare.
11176 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11177 * utils.c (internal_error): New function.
11178
64daa791
AS
111792010-03-15 Andreas Schwab <schwab@redhat.com>
11180
11181 * configure.srv: Fix typo setting srv_regobj.
11182
f52cd8cd
PA
111832010-03-15 Pedro Alves <pedro@codesourcery.com>
11184
11185 * linux-low.c (fetch_register): Avoid passing a non string literal
11186 format to `error'.
11187 (usr_store_inferior_registers): Ditto.
11188
93ae6fdc
PA
111892010-03-14 Pedro Alves <pedro@codesourcery.com>
11190
11191 * linux-low.c (linux_write_memory): Bail out early if peeking
11192 memory failed.
11193
c3adc08c
PA
111942010-03-14 Pedro Alves <pedro@codesourcery.com>
11195
11196 * linux-low.h (struct lwp_info): New fields
11197 `stopped_by_watchpoint' and `stopped_data_address'.
11198 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11199 here, and cache them in the lwp object.
11200 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11201 directly.
11202 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11203 field.
11204 (linux_stopped_by_watchpoint): Rewrite.
11205 (linux_stopped_data_address): Rewrite.
11206
bce522a2
PA
112072010-03-06 Simo Melenius <simo.melenius@iki.fi>
11208
11209 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11210 switching the current inferior, not before.
11211
90884b2b
L
112122010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11213
11214 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11215 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11216 i386-linux.c and amd64-linux.c.
11217 (reg-i386.o): Removed.
11218 (reg-i386.c): Likewise.
11219 (reg-i386-linux.o): Likewise.
11220 (reg-i386-linux.c): Likewise.
11221 (reg-x86-64.o): Likewise.
11222 (reg-x86-64.c): Likewise.
11223 (reg-x86-64-linux.o): Likewise.
11224 (reg-x86-64-linux.c): Likewise.
11225 (i386.o): New.
11226 (i386.c): Likewise.
11227 (i386-linux.o): Likewise.
11228 (i386-linux.c): Likewise.
11229 (amd64.o): Likewise.
11230 (amd64.c): Likewise.
11231 (amd64-linux.o): Likewise.
11232 (amd64-linux.c): Likewise.
11233
11234 * configure.srv (srv_i386_regobj): New.
11235 (srv_i386_linux_regobj): Likewise.
11236 (srv_amd64_regobj): Likewise.
11237 (srv_amd64_linux_regobj): Likewise.
11238 (srv_i386_32bit_xmlfiles): Likewise.
11239 (srv_i386_64bit_xmlfiles): Likewise.
11240 (srv_i386_xmlfiles): Likewise.
11241 (srv_amd64_xmlfiles): Likewise.
11242 (srv_i386_linux_xmlfiles): Likewise.
11243 (srv_amd64_linux_xmlfiles): Likewise.
11244 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11245 srv_xmlfiles to $srv_i386_xmlfiles.
11246 (i[34567]86-*-mingw32ce*): Likewise.
11247 (i[34567]86-*-mingw*): Likewise.
11248 (i[34567]86-*-nto*): Likewise.
11249 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11250 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11251 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11252 (x86_64-*-linux*): Likewise.
11253
11254 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11255 (init_registers_amd64_linux): New.
11256 (x86_arch_setup): Replace init_registers_x86_64_linux with
11257 init_registers_amd64_linux.
11258
193f13e6
MK
112592010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11260
11261 * configure.ac: Check for libdl. If it is not available link against
11262 static libthread_db.
11263 * configure: Regenerate.
11264
85d721b8
PA
112652010-02-22 Pedro Alves <pedro@codesourcery.com>
11266
11267 PR9605
11268
11269 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11270 handing a read watchpoint.
11271 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11272
6076632b
DE
112732010-02-12 Doug Evans <dje@google.com>
11274
11275 * linux-low.c (linux_supports_tracefork_flag): Document.
11276 (linux_look_up_symbols): Add comment.
11277
3327ccf7
L
112782010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11279
11280 * regcache.c (supply_register): Clear regcache if buf is NULL.
11281
0718675c 112822010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11283 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11284
11285 * inferiors.c (find_inferior): Add function documentation.
11286 (unloaded_dll): Handle the case where the unloaded dll has not
11287 been previously registered in the dll list.
11288
177321bd
DJ
112892010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11290
11291 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11292 (thumb2_breakpoint): New.
11293 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11294
2b009048
DJ
112952010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11296
11297 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11298 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11299 breakpoints.
11300
3be029c7
PA
113012010-01-21 Pedro Alves <pedro@codesourcery.com>
11302
11303 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11304
18f5de3b
JK
113052010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11306
11307 * linux-s390-low.c (s390_collect_ptrace_register)
11308 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11309
3743bb4f
DE
113102010-01-21 Doug Evans <dje@google.com>
11311
14ce3065
DE
11312 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11313 (PTRACE_ARG4_TYPE): New macro.
11314 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11315 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11316 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11317 (usr_store_inferior_registers): Ditto.
11318 (linux_read_memory, linux_write_memory): Ditto.
11319 (linux_test_for_tracefork): Ditto.
11320
3743bb4f
DE
11321 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11322 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11323
8b315be5
PA
113242010-01-21 Pedro Alves <pedro@codesourcery.com>
11325
11326 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11327 target.
11328
85492558
PA
113292010-01-21 Pedro Alves <pedro@codesourcery.com>
11330
11331 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11332 prototype to take a regcache. Adjust.
11333
442ea881
PA
113342010-01-20 Pedro Alves <pedro@codesourcery.com>
11335
11336 * regcache.h (struct thread_info): Forward declare.
11337 (struct regcache): New.
11338 (new_register_cache): Adjust prototype.
11339 (get_thread_regcache): Declare.
11340 (free_register_cache): Adjust prototype.
11341 (registers_to_string, registers_from_string): Ditto.
11342 (supply_register, supply_register_by_name, collect_register)
11343 (collect_register_as_string, collect_register_by_name): Ditto.
11344 * regcache.c (struct inferior_regcache_data): Delete.
11345 (get_regcache): Rename to ...
11346 (get_thread_regcache): ... this. Adjust. Switch inferior before
11347 fetching registers.
11348 (regcache_invalidate_one): Adjust.
11349 (regcache_invalidate): Fix prototype.
11350 (new_register_cache): Return the new register cache.
11351 (free_register_cache): Change prototype.
11352 (realloc_register_cache): Adjust.
11353 (registers_to_string): Change prototype to take a regcache. Adjust.
11354 (registers_from_string): Ditto.
11355 (register_data): Ditto.
11356 (supply_register): Ditto.
11357 (supply_register_by_name): Ditto.
11358 (collect_register): Ditto.
11359 (collect_register_as_string): Ditto.
11360 (collect_register_by_name): Ditto.
11361 * server.c (process_serial_event): Adjust.
11362 * linux-low.h (regset_fill_func, regset_store_func): Change
11363 prototype.
11364 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11365 Change prototype.
11366 * linux-low.c (get_stop_pc): Adjust.
11367 (check_removed_breakpoint): Adjust.
11368 (linux_wait_for_event): Adjust.
11369 (linux_resume_one_lwp): Adjust.
11370 (fetch_register): Add regcache parameter. Adjust.
11371 (usr_store_inferior_registers): Ditto.
11372 (regsets_fetch_inferior_registers): Ditto.
11373 (regsets_store_inferior_registers): Ditto.
11374 (linux_fetch_registers, linux_store_registers): Ditto.
11375 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11376 regcache. Adjust.
43aaf8b6
PA
11377 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11378 Ditto.
442ea881
PA
11379 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11380 prototype to take a regcache.
11381 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11382 * remote-utils.c (convert_ascii_to_int, outreg)
11383 (prepare_resume_reply): Change prototype to take a regcache.
11384 Adjust.
11385 * target.h (struct target_ops) <fetch_registers, store_registers>:
11386 Change prototype to take a regcache.
11387 (fetch_inferior_registers, store_inferior_registers): Change
11388 prototype to take a regcache. Adjust.
11389 * proc-service.c (ps_lgetregs): Adjust.
11390 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11391 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11392 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11393 take a regcache. Adjust.
11394 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11395 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11396 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11397 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11398 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11399 (cris_cannot_fetch_register):
11400 (cris_breakpoint_at): Change prototype to take a regcache.
11401 Adjust.
11402 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11403 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11404 to take a regcache. Adjust.
11405 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11406 Adjust.
11407 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11408 take a regcache. Adjust.
11409 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11410 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11411 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11412 * linux-mips-low.c (mips_get_pc):
11413 (mips_set_pc): Change prototype to take a regcache. Adjust.
11414 (mips_reinsert_addr): Adjust.
11415 (mips_collect_register): Change prototype to take a regcache.
11416 Adjust.
11417 (mips_supply_register):
11418 (mips_collect_register_32bit, mips_supply_register_32bit)
11419 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11420 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11421 * linux-ppc-low.c (ppc_supply_ptrace_register)
11422 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11423 (parse_spufs_run): Adjust.
11424 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11425 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11426 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11427 take a regcache. Adjust.
11428 * linux-s390-low.c (s390_collect_ptrace_register)
11429 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11430 (s390_set_pc): Change prototype to take a regcache. Adjust.
11431 (s390_arch_setup): Adjust.
11432 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11433 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11434 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11435 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11436 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11437 regcache. Adjust.
11438 (sparc_breakpoint_at): Adjust.
11439 * linux-xtensa-low.c (xtensa_fill_gregset):
11440 (xtensa_store_gregset):
11441 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11442 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11443 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11444 prototype to take a regcache. Adjust.
11445 * win32-arm-low.c (arm_fetch_inferior_register)
11446 (arm_store_inferior_register): Change prototype to take a
11447 regcache. Adjust.
11448 * win32-i386-low.c (i386_fetch_inferior_register)
11449 (i386_store_inferior_register): Change prototype to take a
11450 regcache. Adjust.
11451 * win32-low.c (child_fetch_inferior_registers)
11452 (child_store_inferior_registers): Change prototype to take a
11453 regcache. Adjust.
11454 (win32_wait): Adjust.
11455 (win32_fetch_inferior_registers): Change prototype to take a
11456 regcache. Adjust.
11457 (win32_store_inferior_registers): Adjust.
11458 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11459 store_inferior_register>: Change prototype to take a regcache.
11460
60c3d7b0
DE
114612010-01-20 Doug Evans <dje@google.com>
11462
11463 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11464 #ifdef.
11465 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11466 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11467
dc146f7c
VP
114682010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11469
11470 * linux-low.c (linux_core_of_thread): New.
11471 (compare_ints, show_process, list_threads): New.
11472 (linux_qxfer_osdata): Report threads and cores.
11473 (linux_target_op): Register linux_core_of_thread.
11474 * remote-utils.c (prepare_resume_reply): Report the core.
11475 (buffer_xml_printf): Support %d specifier.
11476 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11477 New.
11478 (handle_query): Handle qXfer:threads. Announce availability
11479 thereof.
11480 * target.h (struct target_ops): New field core_of_thread.
11481
7803799a
UW
114822010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11483
11484 * Makefile.in (clean): Remove new generated files.
11485 (reg-s390.o, reg-s390.c): Remove rules.
11486 (reg-s390x.o, reg-s390x.c): Likewise.
11487 (s390-linux32.o, s390-linux32.c): Add rules.
11488 (s390-linux64.o, s390-linux64.c): Likewise.
11489 (s390x-linux64.o, s390x-linux64.c): Likewise.
11490 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11491 * linux-s390-low.c: Include <elf.h>.
11492 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11493 (init_registers_s390): Remove prototype.
11494 (init_registers_s390x): Likewise.
11495 (init_registers_s390_linux32): Add prototype.
11496 (init_registers_s390_linux64): Likewise.
11497 (init_registers_s390x_linux64): Likewise.
11498 (s390_num_regs_3264): New define.
11499 (s390_regmap_3264): New global variable.
11500 (s390_cannot_fetch_register): Remove obsolete check.
11501 (s390_cannot_store_register): Likewise.
11502 (s390_collect_ptrace_register): Handle upper/lower register halves.
11503 (s390_supply_ptrace_register): Likewise.
11504 (s390_fill_gregset): Update to register number changes.
11505 (s390_get_hwcap): New routine.
11506 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11507 Install appropriate regmap and register set.
11508
6e7ffa39
JB
115092010-01-01 Joel Brobecker <brobecker@adacore.com>
11510
11511 * server.c (gdbserver_version): Update copyright year to 2010.
11512 * gdbreplay.c (gdbreplay_version): Likewise.
11513
957f3f49
DE
115142009-12-28 Doug Evans <dje@google.com>
11515
11516 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11517 elf/external.h. Include <elf.h> instead but only if necessary.
11518
ca5c370d
PA
115192009-12-28 Pedro Alves <pedro@codesourcery.com>
11520
11521 * linux-low.c (linux_remove_process): Remove `detaching'
11522 parameter. Don't release/detach from thread_db here.
11523 (linux_kill): Release/detach from thread_db here, ...
11524 (linux_detach): ... and here, before actually detaching.
11525 (linux_wait_1): ... and here, when a process exits.
11526 * thread-db.c (any_thread_of): New.
11527 (thread_db_free): Switch the current inferior to a thread of the
11528 passed in process.
11529
4ee62156
DE
115302009-12-21 Doug Evans <dje@google.com>
11531
d90e6a88
DE
11532 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11533
c5f62d5f
DE
11534 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11535 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11536 warning ifndef __NR_tkill. Move setting of errno there too.
11537 Delete unnecessary resetting of errno after syscall.
11538 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11539
10e86dd7
DE
11540 * configure.ac: Check for dladdr.
11541 * config.in: Regenerate.
11542 * configure: Regenerate.
11543 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11544 (try_thread_db_load): Update.
11545
4ee62156
DE
11546 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11547
00f515da
DE
115482009-12-18 Doug Evans <dje@google.com>
11549
e9464885
DE
11550 * event-loop.c: Include unistd.h if it exists.
11551
07d4f67e
DE
11552 * linux-low.c (my_waitpid): Move definition away from being in
11553 between linux_tracefork_child/linux_test_for_tracefork.
11554
00f515da
DE
11555 * gdb_proc_service.h (psaddr_t): Fix type.
11556 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11557 signature to match glibc.
11558
1de1badb
DE
115592009-12-16 Doug Evans <dje@google.com>
11560
11561 * linux-low.c (linux_read_memory): Fix argument to read.
11562
aeeb81d1
PA
115632009-11-26 Pedro Alves <pedro@codesourcery.com>
11564
11565 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11566 events, don't leave current_inferior pointing at null.
11567
10357975
PA
115682009-11-26 Pedro Alves <pedro@codesourcery.com>
11569
11570 * win32-low.c (LOG): Delete.
11571 (OUTMSG): Output to stderr.
11572 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11573 on compile time LOG macro.
11574 (win32_wait): Fix debug output.
11575
cf6e3471
PA
115762009-11-26 Pedro Alves <pedro@codesourcery.com>
11577
11578 * win32-low.c (win32_add_one_solib): If the dll name is
11579 "ntdll.dll", prepend the system directory to the dll path.
11580
0c85e18e
MK
115812009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11582
11583 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11584
9ac544ce 115852009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11586 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11587
11588 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11589 * configure.ac: Check for __mcoldfire__ and set
11590 gdb_cv_m68k_is_coldfire.
11591 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11592 reg-cf.o and reg-m68k.o.
11593 * configure: Regenerated.
11594
fd7dd3e6
PA
115952009-11-16 Pedro Alves <pedro@codesourcery.com>
11596
11597 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11598 Pass it to thread_db_free.
11599 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11600 proper `detaching' argument to linux_remove_process.
11601 * linux-low.h (thread_db_free): Add `detaching' parameter.
11602 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11603 to thread_db_free.
11604 (thread_db_free): Add `detaching' parameter. Only
11605 call td_ta_clear_event if detaching from process.
11606
75aa492e
MK
116072009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11608
11609 * thread-db.c (thread_db_free): Fix typo.
11610
21e1bee4
PP
116112009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11612
11613 PR gdb/10838
11614 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11615
8838b45e
NS
116162009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11617
11618 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11619 with an i686 compiler.
11620 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11621 needed.
11622 * configure: Rebuilt.
11623
8a35fb51
SL
116242009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11625
11626 PR gdb/10783
11627
11628 * server.c (handle_search_memory_1): Correct read_addr initialization
11629 in loop for searching subsequent chunks.
11630
96f15937
PP
116312009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11632
11633 * configure.ac: New --with-libthread-db option.
11634 * thread-db.c: Allow direct dependence on libthread_db.
11635 (thread_db_free): Adjust.
11636 * config.in: Regenerate.
11637 * configure: Likewise.
889bf7c5 11638
5f7d1694
PP
116392009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11640
11641 PR gdb/10757
11642 * thread-db.c (attach_thread): New function.
11643 (maybe_attach_thread): Return success/failure.
11644 (find_new_threads_callback): Adjust.
889bf7c5
PA
11645 (thread_db_find_new_threads): Loop until no new threads.
11646
88e3b899
PA
116472009-10-13 Pedro Alves <pedro@codesourcery.com>
11648
11649 * proc-service.c (ps_lgetregs): Formatting.
11650
cdbfd419
PP
116512009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11652
11653 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11654 * configure.ac: Adjust.
11655 * linux-low.h (struct process_info_private): Move members to struct
11656 thread_db.
11657 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11658 * linux-low.c (linux_remove_process): Adjust.
11659 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11660 * server.c (handle_query): Move code ...
11661 (handle_monitor_command): ... here. New function.
11662 * target.h (struct target_ops): New member.
11663 * thread-db.c (struct thread_db): New.
11664 (libthread_db_search_path): New variable.
11665 (thread_db_create_event, thread_db_enable_reporting)
11666 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11667 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11668 (try_thread_db_load_1, dladdr_to_soname): New functions.
11669 (try_thread_db_load, thread_db_load_search): New functions.
11670 (thread_db_init): Search for libthread_db.
11671 (thread_db_free): New function.
11672 (thread_db_handle_monitor_command): Likewise.
11673 * config.in: Regenerate.
11674 * configure: Regenerate.
889bf7c5 11675
4168d2d6
UW
116762009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11677
11678 * spu-low.c (spu_kill): Wait for inferior to terminate.
11679 Call clear_inferiors.
11680 (spu_detach): Call clear_inferiors.
11681
81ecdfbb
RW
116822009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11683
11684 * aclocal.m4: Regenerate.
11685 * config.in: Likewise.
11686 * configure: Likewise.
11687
0b9ff2c0
UW
116882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11689
11690 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11691 (parse_spufs_run): New function.
11692 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11693 (ppc_breakpoint_at): Handle SPU breakpoints.
11694
efcbbd14
UW
116952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11696
11697 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11698 (SPUFS_MAGIC): Define.
11699 (spu_enumerate_spu_ids): New function.
11700 (linux_qxfer_spu): New function.
11701 (linux_target_ops): Install linux_qxfer_spu.
11702
f4d9bade
UW
117032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11704
11705 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11706 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11707 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11708 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11709 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11710 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11711 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11712 (init_registers_powerpc_cell32l): Add prototype.
11713 (init_registers_powerpc_cell64l): Likewise.
11714 (ppc_arch_setup): Detect Cell/B.E. architecture.
11715
96e946ca
RW
117162009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11717
11718 * Makefile.in (datarootdir): New variable.
11719
58d6951d
DJ
117202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11721
11722 * linux-low.c (linux_write_memory): Update debugging output.
11723 * Makefile.in (clean): Add new descriptions.
11724 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11725 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11726 * configure.srv: Add new files for arm*-*-linux*.
11727 * linux-arm-low.c: Add new declarations.
11728 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11729 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11730 (HWCAP_VFPv3D16): New.
11731 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11732 instead of __IWMMXT__.
11733 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11734 (arm_arch_setup): New.
11735 (target_regsets): Remove #ifdef. Add VFP regset.
11736 (the_low_target): Use arm_arch_setup.
11737
12b42a12
DJ
117382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11739
11740 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11741 the main thread again.
11742
ac8c974e
AR
117432009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11744
11745 Adding Neutrino gdbserver.
11746 * configure: Regenerated.
11747 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11748 * configure.srv (i[34567]86-*-nto*): New target.
11749 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11750 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11751 (nto_comctrl) [__QNX__]: New function.
11752 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11753
4424e0c3 117542009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11755
11756 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11757 srv_tgtobj.
11758
912cf4ba
PA
117592009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11760 Pedro Alves <pedro@codesourcery.com>
11761
11762 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11763 don't support CONTEXT_EXTENDED_REGISTERS.
11764 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11765 (the_low_target): Install them.
11766 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11767 failing with ERROR_PIPE_NOT_CONNECTED.
11768
aa5ca48f
DE
117692009-06-30 Doug Evans <dje@google.com>
11770 Pierre Muller <muller@ics.u-strasbg.fr>
11771
11772 Add h/w watchpoint support to x86-linux, win32-i386.
11773 * Makefile.in (SFILES): Add i386-low.c
11774 (i386_low_h): Define.
11775 (i386-low.o): Add dependencies.
11776 (linux-x86-low.o): Add i386-low.h dependency.
11777 (win32-i386-low.o): Ditto.
11778 * i386-low.c: New file.
11779 * i386-low.h: New file.
11780 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11781 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11782 * linux-low.c (linux_add_process): Initialize arch_private.
11783 (linux_remove_process): Free arch_private.
11784 (add_lwp): Initialize arch_private.
11785 (delete_lwp): Free arch_private.
11786 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11787 provided.
11788 * linux-low.h (process_info_private): New member arch_private.
11789 (lwp_info): New member arch_private.
11790 (linux_target_ops): New members new_process, new_thread,
11791 prepare_to_resume.
11792 (ptid_of): New macro.
11793 * linux-x86-low.c: Include stddef.h, i386-low.h.
11794 (arch_process_info): New struct.
11795 (arch_lwp_info): New struct.
11796 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11797 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11798 (i386_dr_low_get_status): New function.
11799 (x86_insert_point, x86_remove_point): New functions.
11800 (x86_stopped_by_watchpoint): New function.
11801 (x86_stopped_data_address): New function.
11802 (x86_linux_new_process, x86_linux_new_thread): New functions.
11803 (x86_linux_prepare_to_resume): New function.
11804 (the_low_target): Add entries for insert_point, remove_point,
11805 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11806 prepare_to_resume.
11807 * server.c (debug_hw_points): New global.
11808 (monitor_show_help): Document set debug-hw-points.
11809 (handle_query): Process "set debug-hw-points".
11810 * server.h (debug_hw_points): Declare.
11811 (paddress): Declare.
11812 * utils.c (NUMCELLS, CELLSIZE): New macros.
11813 (get_sell, xsnprintf, paddress): New functions.
11814 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11815 remove_point, stopped_by_watchpoint, stopped_data_address.
11816 * win32-i386-low.c: Include i386-low.h.
11817 (debug_reg_state): Replaces dr.
11818 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11819 (i386_dr_low_get_status): New function.
11820 (i386_insert_point, i386_remove_point): New functions.
11821 (i386_stopped_by_watchpoint): New function.
11822 (i386_stopped_data_address): New function.
11823 (i386_initial_stuff): Update.
11824 (get_thread_context,set_thread_context,i386_thread_added): Update.
11825 (the_low_target): Add entries for insert_point,
11826 remove_point, stopped_by_watchpoint, stopped_data_address.
11827 * win32-low.c (win32_insert_watchpoint): New function.
11828 (win32_remove_watchpoint): New function.
11829 (win32_stopped_by_watchpoint): New function.
11830 (win32_stopped_data_address): New function.
11831 (win32_target_ops): Add entries for insert_watchpoint,
11832 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11833 * win32-low.h (win32_target_ops): New members insert_point,
11834 remove_point, stopped_by_watchpoint, stopped_data_address.
11835
d993e290
PA
118362009-06-25 Pedro Alves <pedro@codesourcery.com>
11837
11838 * server.c (process_serial_event): Re-return unsupported, not
11839 error, if the type isn't recognized. Re-allow supporting only
11840 insert or remove packets. Also call require_running for
11841 breakpoints. Add missing break statement to default case. Tidy.
11842 * target.h (struct target_ops): Rename insert_watchpoint to
11843 insert_point, and remove_watchpoint to remove_point.
11844
11845 * linux-low.h (struct linux_target_ops): Likewise.
11846 * linux-low.c (linux_insert_watchpoint): Rename to ...
11847 (linux_insert_point): ... this. Adjust.
11848 (linux_remove_watchpoint): Rename to ...
11849 (linux_remove_point): ... this. Adjust.
11850 (linux_target_ops): Adjust.
11851 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11852 (cris_insert_point): ... this.
11853 (cris_remove_watchpoint): Rename to ...
11854 (cris_remove_point): ... this.
11855 (the_low_target): Adjust.
11856
0f54c268
PM
118572009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11858
11859 * server.c (handle_v_kill): Pass signal_pid to
11860 kill_inferior if multi_process is zero.
11861
c6314022
AR
118622009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11863
11864 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11865 * target.h (target_ops): Comment for *_watchpoint to make it clear
11866 the functions can get types '0' and '1'.
11867
4463ce24
AR
118682009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11869
11870 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11871 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11872 * regcache.c (get_regcache): Likewise.
11873 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11874 * win32-low.c (child_fetch_inferior_registers): Remove check for
11875 regno 0.
11876
cf8fd78b
PA
118772009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11878 Pedro Alves <pedro@codesourcery.com>
11879
11880 * target.h (struct target_ops) <supports_multi_process>: New
11881 callback.
11882 (target_supports_multi_process): New.
11883 * server.c (handle_query): Even if GDB reports support, only
11884 enable multi-process if the target also supports it. Report
11885 multi-process support only if the target backend supports it.
11886 * linux-low.c (linux_supports_multi_process): New function.
11887 (linux_target_ops): Install it as target_supports_multi_process
11888 callback.
11889
47c0c975
DE
118902009-05-24 Doug Evans <dje@google.com>
11891
e09875d4
DE
11892 Global renaming of find_thread_pid to find_thread_ptid.
11893 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11894 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11895 All callers updated.
11896
e27d73f6
DE
11897 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11898 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11899 directly.
11900
47c0c975
DE
11901 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11902 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11903 (linux_resume_one_lwp): Ditto.
11904
2acc282a
DE
119052009-05-23 Doug Evans <dje@google.com>
11906
11907 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11908 from struct inferior_list_entry * to struct lwp_info *.
11909 All callers updated.
11910
9f1036c1
DE
119112009-05-13 Doug Evans <dje@google.com>
11912
11913 * linux-x86-low.c: Don't include assert.h.
11914 (x86_siginfo_fixup): Use fatal, not assert.
11915 (x86_arch_setup): Fix comment.
11916
d0722149
DE
119172009-05-12 Doug Evans <dje@google.com>
11918
11919 Biarch support for i386/amd64 gdbserver.
11920 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11921 Add linux-x86-low.c.
11922 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11923 (linux-x86-low.o): Add.
11924 * linux-x86-64-low.c: Delete.
11925 * linux-i386-low.c: Delete.
11926 * linux-x86-low.c: New file.
11927 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11928 linux-x86-low.o.
11929 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11930 linux-x86-low.o.
11931 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11932 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11933 (linux_child_pid_to_exec_file): New function.
11934 (elf_64_header_p, elf_64_file_p): New functions.
11935 (siginfo_fixup): New function.
11936 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11937 give target a chance to convert layout.
11938 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11939 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11940
fdeb2a12
DE
119412009-05-07 Doug Evans <dje@google.com>
11942
11943 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11944 (regsets_store_inferior_registers): Ditto.
11945
a6dbe5df
PA
119462009-05-06 Pedro Alves <pedro@codesourcery.com>
11947
11948 PR server/10048
11949
11950 * linux-low.c (must_set_ptrace_flags): Delete.
11951 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11952 of the global.
11953 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11954 `lwp->must_set_ptrace_flags' instead.
ba42693b 11955 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11956 (linux_wait_1): ... not here.
11957
5091eb23
DE
119582009-04-30 Doug Evans <dje@google.com>
11959
9f767825
DE
11960 * inferiors.c (started_inferior_callback): New function.
11961 (attached_inferior_callback): New function.
11962 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11963 * server.c (print_started_pid, print_attached_pid): New functions.
11964 (detach_or_kill_for_exit): New function.
11965 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11966 * server.h (have_started_inferiors_p): Declare.
11967 (have_attached_inferiors_p): Declare.
11968
5091eb23
DE
11969 * inferiors.c (remove_process): Fix memory leak, free process.
11970 * linux-low.c (linux_remove_process): New function.
11971 (linux_kill): Call it instead of remove_process.
11972 (linux_detach, linux_wait_1): Ditto.
11973
155c8968
PA
119742009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11975
11976 * configure.srv: Add x86 Windows CE target.
11977
7fe519cb
UW
119782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11979
11980 * inferiors.c (get_thread_process): Make global.
11981 * server.h (get_thread_process): Add prototype.
11982 * thread-db.c (find_one_thread): Use get_thread_process
11983 instead of current_process.
11984 (thread_db_get_tls_address): Do not crash if called when
11985 thread layer is not yet initialized.
11986
5472f405
UW
119872009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11988
11989 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11990 * spu-low.c (current_tid): Rename to ...
11991 (current_ptid): ... this.
11992 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11993 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11994 ptid_get_lwp (current_ptid) instead of current_tid.
11995 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11996 instead of current_tid. Use find_process_pid to verify pid
11997 argument is valid. Pass proper argument to remove_process.
11998 (spu_thread_alive): Compare current_ptid instead of current_tid.
11999 (spu_resume): Likewise.
12000
55ac2b99
PA
120012009-04-02 Pedro Alves <pedro@codesourcery.com>
12002
12003 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12004 variable.
12005
95954743
PA
120062009-04-01 Pedro Alves <pedro@codesourcery.com>
12007
12008 Implement the multiprocess extensions, and add linux multiprocess
12009 support.
12010
12011 * server.h (ULONGEST): Declare.
12012 (struct ptid, ptid_t): New.
12013 (minus_one_ptid, null_ptid): Declare.
12014 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12015 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12016 (struct inferior_list_entry): Change `id' type from unsigned from
12017 to ptid_t.
12018 (struct sym_cache, struct breakpoint, struct
12019 process_info_private): Forward declare.
12020 (struct process_info): Declare.
12021 (current_process): Declare.
12022 (all_processes): Declare.
12023 (initialize_inferiors): Declare.
12024 (add_thread): Adjust to use ptid_t.
12025 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12026 (add_process, remove_process, find_thread_pid): Declare.
12027 (find_inferior_id): Adjust to use ptid_t.
12028 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12029 (multi_process): Declare.
12030 (push_event): Adjust to use ptid_t.
12031 (read_ptid, write_ptid): Declare.
12032 (prepare_resume_reply): Adjust to use ptid_t.
12033 (clear_symbol_cache): Declare.
12034 * inferiors.c (all_processes): New.
12035 (null_ptid, minus_one_ptid): New.
12036 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12037 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12038 (add_thread): Change unsigned long to ptid. Remove gdb_id
12039 parameter. Adjust.
12040 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12041 (gdb_id_to_thread): Rename to ...
12042 (find_thread_pid): ... this. Change unsigned long to ptid.
12043 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12044 (loaded_dll, pull_pid_from_list): Adjust.
12045 (add_process, remove_process, find_process_pid)
12046 (get_thread_process, current_process, initialize_inferiors): New.
12047 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12048 (struct target_waitstatus) <related_pid>: Ditto.
12049 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12050 return type to int.
12051 (struct target_ops) <join>: Add `pid' argument.
12052 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12053 (struct target_ops) <wait>: Add `ptid' field. Change return type
12054 to ptid.
12055 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12056 (mywait): Add `ptid' argument. Change return type to ptid_t.
12057 (target_pid_to_str): Declare.
12058 * target.c (set_desired_inferior): Adjust to use ptids.
12059 (mywait): Add new `ptid' argument. Adjust.
12060 (target_pid_to_str): New.
12061 * mem-break.h (free_all_breakpoints): Declare.
12062 * mem-break.c (breakpoints): Delelete.
12063 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12064 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12065 to use per-process breakpoint list.
12066 (free_all_breakpoints): New.
12067 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12068 (symbol_cache, all_symbols_looked_up): Delete.
12069 (hexchars): New.
12070 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12071 read_ptid): New.
12072 (prepare_resume_reply): Change ptid argument's type from unsigned
12073 long to ptid_t. Adjust. Implement W;process and X;process.
12074 (free_sym_cache, clear_symbol_cache): New.
12075 (look_up_one_symbol): Adjust to per-process symbol cache. *
12076 * server.c (cont_thread, general_thread, step_thread): Change type
12077 to ptid_t.
12078 (attached): Delete.
12079 (multi_process): New.
12080 (last_ptid): Change type to ptid_t.
12081 (struct vstop_notif) <ptid>: Change type to ptid_t.
12082 (queue_stop_reply, push_event): Change `ptid' argument's type to
12083 ptid_t.
12084 (discard_queued_stop_replies): Add `pid' argument.
12085 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12086 changes. Don't reference the `attached' global.
12087 (attach_inferior): Adjust to mywait interface changes.
12088 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12089 features. Handle and report "multiprocess+". Handle
12090 "qAttached:PID".
12091 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12092 changes.
12093 (handle_v_kill): New.
12094 (handle_v_stopped): Adjust to use target_pid_to_str.
12095 (handle_v_requests): Allow multiple attaches and runs when
12096 multiprocess extensions are in effect. Handle "vKill".
12097 (myresume): Adjust to use ptids.
12098 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12099 (handle_status): Adjust to discard_queued_stop_replies interface
12100 change.
12101 (first_thread_of, kill_inferior_callback)
12102 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12103 (main): Call initialize_inferiors. Adjust to use ptids, killing
12104 and detaching from all inferiors. Handle multiprocess packet
12105 variants.
12106 * linux-low.h: Include gdb_proc_service.h.
12107 (struct process_info_private): New.
12108 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12109 <lwpid_of>: Use ptid_get_lwp.
12110 (get_lwp_thread): Adjust.
12111 (struct lwp_info): Add `dead' member.
12112 (find_lwp_pid): Declare.
12113 * linux-low.c (thread_db_active): Delete.
12114 (new_inferior): Adjust comment.
12115 (inferior_pid): Delete.
12116 (linux_add_process): New.
12117 (handle_extended_wait): Adjust.
12118 (add_lwp): Change unsigned long to ptid.
12119 (linux_create_inferior): Add process to processes table. Adjust
12120 to use ptids. Don't set new_inferior here.
12121 (linux_attach_lwp): Rename to ...
12122 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12123 it. Adjust to use ptids.
12124 (linux_attach_lwp): New.
12125 (linux_attach): Add process to processes table. Don't set
12126 new_inferior here.
12127 (struct counter): New.
12128 (second_thread_of_pid_p, last_thread_of_process_p): New.
12129 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12130 multiple processes.
12131 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12132 processes. Remove process from process table.
12133 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12134 to multiple processes.
12135 (any_thread_of): New.
12136 (linux_detach): Add `pid' argument, and handle it. Remove process
12137 from processes table.
12138 (linux_join): Add `pid' argument. Handle it.
12139 (linux_thread_alive): Change unsighed long argument to ptid_t.
12140 Consider dead lwps as not being alive.
12141 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12142 threads we're not interested in.
12143 (same_lwp, find_lwp_pid): New.
12144 (linux_wait_for_lwp): Change `pid' argument's type from int to
12145 ptid_t. Adjust.
12146 (linux_wait_for_event): Rename to ...
12147 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12148 from int to ptid_t. Adjust.
12149 (linux_wait_for_event): New.
12150 (linux_wait_1): Add `ptid' argument. Change return type to
12151 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12152 that exit from the process table.
12153 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12154 Adjust.
12155 (mark_lwp_dead): New.
12156 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12157 stopping all threads, mark its main lwp as dead.
12158 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12159 ptids.
12160 (fetch_register, usr_store_inferior_registers)
12161 (regsets_fetch_inferior_registers)
12162 (regsets_store_inferior_registers, linux_read_memory)
12163 (linux_write_memory): Inline `inferior_pid'.
12164 (linux_look_up_symbols): Adjust to use per-process
12165 `thread_db_active'.
12166 (linux_request_interrupt): Adjust to use ptids.
12167 (linux_read_auxv): Inline `inferior_pid'.
12168 (initialize_low): Don't reference thread_db_active.
12169 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12170 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12171 (ps_getpid): Return the pid of the current inferior.
12172 * thread-db.c (proc_handle, thread_agent): Delete.
12173 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12174 per-process data.
12175 (find_one_thread): Change argument type to ptid_t. Adjust to
12176 per-process data.
12177 (maybe_attach_thread): Adjust to per-process data and ptids.
12178 (thread_db_find_new_threads): Ditto.
12179 (thread_db_init): Ditto.
12180 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12181 processes table. Adjust to use ptids.
12182 (spu_kill, spu_detach): Adjust interface. Remove process from
12183 processes table.
12184 (spu_join, spu_thread_alive): Adjust interface.
12185 (spu_wait): Adjust interface. Remove process from processes
12186 table. Adjust to use ptids.
12187 * win32-low.c (current_inferior_tid): Delete.
12188 (current_inferior_ptid): New.
12189 (debug_event_ptid): New.
12190 (thread_rec): Take a ptid. Adjust.
12191 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12192 (child_delete_thread): Ditto.
12193 (do_initial_child_stuff): Add `attached' argument. Add process to
12194 processes table.
12195 (child_fetch_inferior_registers, child_store_inferior_registers):
12196 Adjust.
12197 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12198 (win32_attach): Pass 1 to do_initial_child_stuff.
12199 (win32_kill): Adjust interface. Remove process from processes
12200 table.
12201 (win32_detach): Ditto.
12202 (win32_join): Adjust interface.
12203 (win32_thread_alive): Take a ptid.
12204 (win32_resume): Adjust to use ptids.
12205 (get_child_debug_event): Ditto.
12206 (win32_wait): Adjust interface. Remove exiting process from
12207 processes table.
12208
bd99dc85
PA
122092009-04-01 Pedro Alves <pedro@codesourcery.com>
12210
12211 Non-stop mode support.
12212
12213 * server.h (non_stop): Declare.
12214 (gdb_client_data, handler_func): Declare.
12215 (delete_file_handler, add_file_handler, start_event_loop):
12216 Declare.
12217 (handle_serial_event, handle_target_event, push_event)
12218 (putpkt_notif): Declare.
12219 * target.h (enum resume_kind): New.
12220 (struct thread_resume): Replace `step' field by `kind' field.
12221 (TARGET_WNOHANG): Define.
12222 (struct target_ops) <wait>: Add `options' argument.
12223 <supports_non_stop, async, start_non_stop>: New fields.
12224 (target_supports_non_stop, target_async): New.
12225 (start_non_stop): Declare.
12226 (mywait): Add `options' argument.
12227 * target.c (mywait): Add `options' argument. Print child exit
12228 notifications here.
12229 (start_non_stop): New.
12230 * server.c (non_stop, own_buf, mem_buf): New globals.
12231 (struct vstop_notif): New.
12232 (notif_queue): New global.
12233 (queue_stop_reply, push_event, discard_queued_stop_replies)
12234 (send_next_stop_reply): New.
12235 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12236 interface changes.
12237 (attach_inferior): In non-stop mode, don't wait for the target
12238 here.
12239 (handle_general_set): Handle QNonStop.
12240 (handle_query): When handling qC, return the current general
12241 thread, instead of the first thread of the list.
12242 (handle_query): If the backend supports non-stop mode, include
12243 QNonStop+ in the qSupported query response.
12244 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12245 and non-stop mode.
12246 (handle_v_attach, handle_v_run): Handle non-stop mode.
12247 (handle_v_stopped): New.
12248 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12249 (myresume): Adjust to use resume_kind. Handle non-stop.
12250 (queue_stop_reply_callback): New.
12251 (handle_status): Handle non-stop mode.
12252 (main): Clear non_stop flag on reconnection. Use the event-loop.
12253 Refactor serial protocol handling from here ...
12254 (process_serial_event): ... to this new function. When GDB
12255 selects any thread, select one here. In non-stop mode, wait until
12256 GDB acks all pending events before exiting.
12257 (handle_serial_event, handle_target_event): New.
12258 * remote-utils.c (remote_open): Install remote_desc in the event
12259 loop.
12260 (remote_close): Remove remote_desc from the event loop.
12261 (putpkt_binary): Rename to...
12262 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12263 (putpkt_binary): New as wrapper around putpkt_binary_1.
12264 (putpkt_notif): New.
12265 (prepare_resume_reply): In non-stop mode, don't change the
12266 general_thread.
12267 * event-loop.c: New.
12268 * Makefile.in (OBJ): Add event-loop.o.
12269 (event-loop.o): New rule.
12270
12271 * linux-low.h (pid_of): Moved here.
12272 (lwpid_of): New.
12273 (get_lwp_thread): Use lwpid_of.
12274 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12275 * linux-low.c (pid_of): Delete.
12276 (inferior_pid): Use lwpid_of.
12277 (linux_event_pipe): New.
12278 (target_is_async_p): New.
12279 (delete_lwp): New.
12280 (handle_extended_wait): Use lwpid_of.
12281 (add_lwp): Don't set lwpid field.
12282 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12283 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12284 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12285 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12286 first. Adjust to linux_wait_for_event interface changes. Use
12287 lwpid_of.
12288 (linux_detach): Don't delete the main lwp here.
12289 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12290 (status_pending_p): Don't consider explicitly suspended lwps.
12291 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12292 pointer. Add OPTIONS argument. Change return type to int. Use
12293 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12294 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12295 pointer. Add status pointer argument. Return a pid instead of a
12296 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12297 changes. In non-stop mode, don't switch to a random thread.
12298 (linux_wait): Rename to...
12299 (linux_wait_1): ... this. Add target_options argument, and handle
12300 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12301 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12302 clean exit and signal exit code. Don't stop all threads in
12303 non-stop mode. In all-stop mode, only stop all threads when
12304 reporting a stop to GDB. Handle explicit thread stop requests.
12305 (async_file_flush, async_file_mark): New.
12306 (linux_wait): New.
12307 (send_sigstop): Use lwpid_of.
12308 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12309 interface changes. In non-stop mode, don't switch to a random
12310 thread.
12311 (linux_resume_one_lwp): Use lwpid_of.
12312 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12313 (linux_resume_one_thread): ... this. Handle resume_stop. In
12314 non-stop mode, don't look for pending flag in all threads.
12315 (resume_status_pending_p): Don't consider explicitly suspended
12316 threads.
12317 (my_waitpid): Reimplement. Emulate __WALL.
12318 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12319 Use lwpid_of.
12320 (sigchld_handler, linux_supports_non_stop, linux_async)
12321 (linux_start_non_stop): New.
12322 (linux_target_ops): Register linux_supports_non_stop, linux_async
12323 and linux_start_non_stop.
12324 (initialize_low): Install SIGCHLD handler.
12325 * thread-db.c (thread_db_create_event, find_one_thread)
12326 (thread_db_get_tls_address): Use lwpid_of.
12327 * win32-low.c (win32_detach): Adjust to use resume_kind.
12328 (win32_wait): Add `options' argument.
12329 * spu-low.c (spu_resume): Adjust to use resume_kind.
12330 (spu_wait): Add `options' argument.
12331
5b1c542e
PA
123322009-04-01 Pedro Alves <pedro@codesourcery.com>
12333
12334 Decouple target code from remote protocol.
12335
12336 * target.h (enum target_waitkind): New.
12337 (struct target_waitstatus): New.
12338 (struct target_ops) <wait>: Return an unsigned long. Take a
12339 target_waitstatus pointer instead of a char pointer.
12340 (mywait): Likewise.
12341 * target.c (mywait): Change prototype to return an unsigned long.
12342 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12343 * server.h (thread_from_wait, old_thread_from_wait): Delete
12344 declarations.
12345 (prepare_resume_reply): Change prototype to take a
12346 target_waitstatus.
12347 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12348 (last_status, last_ptid): New.
12349 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12350 pid instead of a signal.
12351 (attach_inferior): Remove "status" and "signal" parameters.
12352 Adjust.
12353 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12354 not as an address.
12355 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12356 (handle_v_requests, myresume): Remove "status" and "signal"
12357 parameters. Adjust.
12358 (handle_status): New.
12359 (main): Delete local `status'. Adjust.
12360 * remote-utils.c: Include target.h.
12361 (prepare_resume_reply): Change prototype to take a
12362 target_waitstatus. Adjust.
12363
12364 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12365 interface.
12366 * spu-low.c (spu_wait): Adjust.
12367 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12368 Delete.
12369 (win32_wait): Adjust.
12370
2bd7c093
PA
123712009-04-01 Pedro Alves <pedro@codesourcery.com>
12372
12373 * target.h (struct thread_resume): Delete leave_stopped member.
12374 (struct target_ops): Add a `n' argument to the `resume' callback.
12375 * server.c (start_inferior): Adjust.
12376 (handle_v_cont, myresume): Adjust.
12377 * linux-low.c (check_removed_breakpoint): Adjust to resume
12378 interface change, and to removed leave_stopped field.
12379 (resume_ptr): Delete.
12380 (struct thread_resume_array): New.
12381 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12382 resume interface change.
12383 (linux_continue_one_thread, linux_queue_one_thread)
12384 (resume_status_pending_p): Check if the resume field is NULL
12385 instead of checking the leave_stopped member.
12386 (linux_resume): Adjust to the target resume interface change.
12387 * spu-low.c (spu_resume): Adjust to the target resume interface
12388 change.
12389 * win32-low.c (win32_detach, win32_resume): Ditto.
12390
c35fafde
PA
123912009-04-01 Pedro Alves <pedro@codesourcery.com>
12392
12393 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12394 flag.
12395 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12396 pending.
12397 (linux_continue_one_thread): Only preserve the stepping flag if
12398 there's a pending breakpoint.
12399
0a59d50b
PA
124002009-03-31 Pedro Alves <pedro@codesourcery.com>
12401
12402 * server.c (main): After the inferior having exited, call
12403 remote_close before exiting gdbserver.
12404
f04c6d38
TJB
124052009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12406
12407 Fix size of FPSCR in Power 7 processors.
12408 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12409 (PPC_FEATURE_HAS_DFP): New #define.
12410 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12411 size of the FPSCR.
12412
78e5cee6
PA
124132009-03-23 Pedro Alves <pedro@codesourcery.com>
12414
12415 * server.c (handle_query) Whitespace and formatting.
12416
1b3f6016
PA
124172009-03-22 Pedro Alves <pedro@codesourcery.com>
12418
12419 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12420 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12421 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12422 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12423 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12424 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12425 Makefile.in, configure.ac: Fix whitespace throughout.
12426 * configure: Regenerate.
12427
a07b2135
PA
124282009-03-22 Pedro Alves <pedro@codesourcery.com>
12429
12430 * inferiors.c (find_inferior): Make it safe for the callback
12431 function to delete the currently iterated inferior.
12432
67cc2626
PA
124332009-03-22 Pedro Alves <pedro@codesourcery.com>
12434
12435 * Makefile.in (linuw_low_h): Move higher.
12436 (thread-db.o): Depend on $(linux_low_h).
12437
54a0b537
PA
124382009-03-17 Pedro Alves <pedro@codesourcery.com>
12439
12440 Rename "process" to "lwp" throughout.
12441
12442 * linux-low.c (all_processes): Rename to...
12443 (all_lwps): ... this.
12444 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12445 (add_process): Rename to ...
12446 (add_lwp): ... this. Adjust.
12447 (linux_create_inferior): Adjust.
12448 (linux_attach_lwp): Adjust.
12449 (linux_attach): Adjust.
12450 (linux_kill_one_process): Rename to ...
12451 (linux_kill_one_lwp): ... this. Adjust.
12452 (linux_kill): Adjust.
12453 (linux_detach_one_process): Rename to ...
12454 (linux_detach_one_lwp): ... this. Adjust.
12455 (linux_detach): Adjust.
12456 (check_removed_breakpoint): Adjust.
12457 (status_pending_p): Adjust.
12458 (linux_wait_for_process): Rename to ...
12459 (linux_wait_for_lwp): ... this. Adjust.
12460 (linux_wait_for_event): Adjust.
12461 (send_sigstop): Adjust.
12462 (wait_for_sigstop): Adjust.
12463 (stop_all_processes): Rename to ...
12464 (stop_all_lwps): ... this.
12465 (linux_resume_one_process): Rename to ...
12466 (linux_resume_one_lwp): ... this. Adjust.
12467 (linux_set_resume_request, linux_continue_one_thread)
12468 (linux_queue_one_thread, resume_status_pending_p)
12469 (usr_store_inferior_registers, regsets_store_inferior_registers)
12470 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12471 Adjust.
12472 * linux-low.h (get_process): Rename to ...
12473 (get_lwp): ... this. Adjust.
12474 (get_thread_process): Rename to ...
12475 (get_thread_lwp): ... this. Adjust.
12476 (get_process_thread): Rename to ...
12477 (get_lwp_thread): ... this. Adjust.
12478 (struct process_info): Rename to ...
12479 (struct lwp_info): ... this.
12480 (all_processes): Rename to ...
12481 (all_lwps): ... this.
12482 * proc-service.c (ps_lgetregs): Adjust.
12483 * thread-db.c (thread_db_create_event, find_one_thread)
12484 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12485
0b16c5cf
PA
124862009-03-14 Pedro Alves <pedro@codesourcery.com>
12487
12488 * server.c (handle_query): Handle "qAttached".
12489
32de4b9d
NS
124902009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12491
12492 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12493 GPLv3, update license URL.
12494
2aecd87f
DE
124952009-03-01 Doug Evans <dje@google.com>
12496
93efd302 12497 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12498 (server_h): Add gdb_signals.h.
12499 (signals.o): Update.
12500 * server.h (target_signal_from_host,target_signal_to_host_p)
12501 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12502
86b1f9c5
PM
125032009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12504
12505 * remote-utils.c (getpkt): Also generate remote-debug
12506 information if noack_mode is set.
12507
4aa995e1
PA
125082009-02-06 Pedro Alves <pedro@codesourcery.com>
12509
12510 * server.c (handle_query): Report qXfer:siginfo:read and
12511 qXfer:siginfo:write as supported and handle them.
12512 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12513 * linux-low.c (linux_xfer_siginfo): New.
12514 (linux_target_ops): Set it.
12515
62709adf
PA
125162009-01-26 Pedro Alves <pedro@codesourcery.com>
12517
12518 * server.c (gdbserver_usage): Mention --remote-debug.
12519 (main): Accept '--remote-debug' switch.
12520
aef93bd7
DE
125212009-01-18 Doug Evans <dje@google.com>
12522
12523 * regcache.c (new_register_cache): No need to check result of xcalloc.
12524 * server.c (handle_search_memory): Back out calls to xmalloc,
12525 result is checked and error is returned to user upon failure.
12526 (handle_query): Ditto. Add more checks for result of malloc.
12527 (handle_v_cont): Check result of malloc, report error back to
12528 user upon failure.
12529 (handle_v_run): Ditto. Call freeargv.
12530 * server.h (freeargv): Declare.
12531 * utils.c (freeargv): New fn.
12532
54363045
DE
125332009-01-15 Doug Evans <dje@google.com>
12534
f626972c
DE
12535 * gdbreplay.c (perror_with_name): Make arg const char *.
12536 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12537 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12538 * utils.c (perror_with_name): Make arg const char *.
54363045 12539
18aae699
PA
125402009-01-14 Pedro Alves <pedro@codesourcery.com>
12541
12542 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12543 when handling a EXIT_PROCESS_DEBUG_EVENT.
12544
ff703abe
JB
125452009-01-06 Joel Brobecker <brobecker@adacore.com>
12546
12547 * gdbreplay.c (gdbreplay_version): Update copyright year.
12548 * server.c (gdbserver_version): Likewise.
12549
f21cc1a2 125502009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12551
12552 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12553 (handle_extended_wait): Improve comment.
0e21c1ec 12554
bca929d3
DE
125552008-12-13 Doug Evans <dje@google.com>
12556
12557 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12558 * server.h (ATTR_MALLOC): New macro.
12559 (xmalloc,xcalloc,xstrdup): Declare.
12560 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12561 * inferiors.c: Ditto.
12562 * linux-low.c: Ditto.
12563 * mem-break.c: Ditto.
12564 * regcache.c: Ditto.
12565 * remote-utils.c: Ditto.
12566 * server.c: Ditto.
12567 * target.c: Ditto.
12568 * win32-low.c: Ditto.
12569
97438e3f
DE
125702008-12-12 Doug Evans <dje@google.com>
12571
896c7fbb
DE
12572 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12573 in debugging printf.
12574
97438e3f
DE
12575 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12576
e3b886f8
DE
125772008-12-09 Doug Evans <dje@google.com>
12578
12579 * linux-low.h (struct process_info): Delete member tid, unused.
12580 * thread-db.c (find_one_thread): Update.
12581 (maybe_attach_thread): Update.
12582
07e059b5
VP
125832008-12-02 Pedro Alves <pedro@codesourcery.com>
12584
889bf7c5
PA
12585 * target.h (struct target_ops): Add qxfer_osdata member.
12586 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12587 and dirent.h.
12588 (linux_qxfer_osdata): New functions.
12589 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12590 callback.
12591 * server.c (handle_query): Handle "qXfer:osdata:read:".
12592 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12593 (buffer_xml_printf): New functions.
12594 * server.h (struct buffer): New.
12595 (buffer_grow_str, buffer_grow_str0): New macros.
12596 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12597 (buffer_xml_printf): Declare.
07e059b5 12598
4cab47ab
DE
125992008-11-24 Doug Evans <dje@google.com>
12600
12601 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12602
f142445f
DJ
126032008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12604
12605 * server.c (handle_v_run): Always use the supplied argument list.
12606
d0107bb6 126072008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12608
d0107bb6
BW
12609 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12610 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12611
2c4ad781
TJB
126122008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12613
12614 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12615 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12616 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12617 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12618 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12619 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12620 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12621 XML target descriptions.
12622 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12623 when inferior is running on an ISA 2.05 or later processor. Add
12624 special case to return offset for full 64-bit slot of FPSCR when
12625 in 32-bits.
12626
dfb64f85
DJ
126272008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12628
12629 * Makefile.in (SFILES, clean): Added sparc64 files.
12630 (reg-sparc64.o, reg-sparc64.c): New.
12631 * configure.srv (sparc*-*-linux*): New configuration.
12632 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12633 syscall arguments for SPARC.
12634 (regsets_store_inferior_registers): Likewise.
12635 * linux-sparc-low.c: New file.
12636
66b6e1dd
DE
126372008-10-21 Doug Evans <dje@google.com>
12638
12639 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12640 (READLINE_DIR,READLINE_DEP): Delete.
12641 (INTERNAL_CFLAGS): Update.
12642 (LINTFLAGS): Update.
12643
9b710a42
PA
126442008-10-10 Pedro Alves <pedro@codesourcery.com>
12645
12646 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12647 whole argv from the last run, not just argv[0].
12648
5822d809
PA
126492008-09-08 Pedro Alves <pedro@codesourcery.com>
12650
12651 * regcache.c (new_register_cache): Return NULL if the register
12652 cache size isn't known yet.
12653 (free_register_cache): Avoid dereferencing a NULL regcache.
12654
74aac56f
DJ
126552008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12656
12657 * configure.srv: Merge MIPS and MIPS64.
12658
400b20f5
MR
126592008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12660
12661 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12662
677c5bb1
LM
126632008-08-18 Luis Machado <luisgpm@br.ibm.com>
12664
12665 * Makefile.in: Add required vsx dependencies.
12666
12667 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12668 Declare init_registers_powerpc_vsx32l.
12669 Declare init_registers_powerpc_vsx64l.
12670 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12671 (ppc_arch_setup): Check for VSX in hwcap.
12672 (ppc_fill_vsxregset): New function.
12673 (ppc_store_vsxregset): New function.
12674 Add new VSX entry in regset_info target_regsets.
12675
12676 * configure.srv: Add new VSX dependencies.
12677
a6f3e723
SL
126782008-08-12 Pedro Alves <pedro@codesourcery.com>
12679
12680 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12681 (remote_open): Set or clear transport_is_reliable.
12682 (putpkt_binary): Don't expect acks in noack mode.
12683 (getpkt): Don't send ack/nac in noack mode.
12684 * server.c (handle_general_set): Handle QStartNoAckMode.
12685 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12686 qSupported.
12687 (main): Reset noack_mode on every connection.
12688 * server.h (noack_mode): Declare.
12689
a417dc56
RW
126902008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12691
12692 * Makefile.in (GDBREPLAY_OBS): New variable.
12693 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12694
3221518c
UW
126952008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12696 Daniel Jacobowitz <dan@codesourcery.com>
12697
12698 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12699 (usr_store_inferior_registers): Likewise.
12700 (regsets_store_inferior_registers): Likewise.
12701
ec56be1b
PA
127022008-07-31 Rolf Jansen <rj@surtec.com>
12703 Pedro Alves <pedro@codesourcery.com>
12704
12705 * configure.ac: Check for memmem declaration.
12706 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12707 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12708 (disable_packet_qfThreadInfo): Unconditionally compile.
12709 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12710 * configure, config.in: Regenerate.
12711
2fe5e3ff
DE
127122008-07-28 Doug Kwan <dougkwan@google.com>
12713
12714 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12715 (linux_write_memory): Remove declaration of errno.
12716
836acd6d
UW
127172008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12718
12719 * linux-low.c (handle_extended_wait): Do not use "status"
12720 variable uninitialized.
12721
aeba519e
PA
127222008-07-07 Pedro Alves <pedro@codesourcery.com>
12723
12724 * server.c (handle_v_attach): Inhibit reporting dll changes.
12725
db42f210
PA
127262008-06-27 Pedro Alves <pedro@codesourcery.com>
12727
12728 * remote-utils.c (prepare_resume_reply): If requested, don't
12729 output "thread:TID" in the T stop reply.
12730
12731 * server.c (disable_packet_vCont, disable_packet_Tthread)
12732 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12733 (handle_query): If requested, disable support for qC, qfThreadInfo
12734 and qsThreadInfo.
12735 (handle_v_requests): If requested, disable support for vCont.
12736 (gdbserver_show_disableable): New.
12737 (main): Handle --disable-packet and --disable-packet=LIST.
12738
12739 * server.h (disable_packet_vCont, disable_packet_Tthread)
12740 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12741
8e4c5421
CD
127422008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12743
12744 * server.c (gdbserver_usage): Mention --version.
12745
6e23a804
DJ
127462008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12747
12748 * Makefile.in (gdbreplay.o): New rule.
12749
90aa6a40
JM
127502008-06-06 Joseph Myers <joseph@codesourcery.com>
12751
12752 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12753 message, not gdbserver.
12754
c16158bc 127552008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12756 Nathan Sidwell <nathan@codesourcery.com>
12757 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12758
12759 * acinclude.m4: Include ../../config/acx.m4.
12760 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12761 * configure, config.in: Regenerate.
12762 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12763 * server.c (gdbserver_version): Print PKGVERSION.
12764 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12765 (main): Adjust gdbserver_usage calls.
12766 * gdbreplay.c (version, host_name): Add declarations.
12767 (gdbreplay_version, gdbreplay_usage): New.
12768 (main): Accept --version and --help options.
12769
aeb75bf5
DJ
127702008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12771
12772 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12773 (arm_breakpoint_at): Handle Thumb.
12774 (the_low_target): Add comment.
12775
76b233dd
UW
127762008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12777
12778 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12779
08388c79
DE
127802008-05-09 Doug Evans <dje@google.com>
12781
a3c83fae
DE
12782 * server.h (decode_search_memory_packet): Declare.
12783 * remote-utils.c (decode_search_memory_packet): New fn.
12784 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12785 (handle_search_memory): New fn.
12786 (handle_query): Process qSearch:memory packets.
12787
bb9c3d36
UW
127882008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12789
12790 * regcache.c (registers_length): Remove.
12791 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12792 full register packet.
12793 * regcache.h (registers_length): Remove prototype.
12794 * server.h (PBUFSIZ): Define to 16384.
12795
7284e1be
UW
127962008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12797
12798 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12799 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12800 powerpc-64l.o, and powerpc-altivec64l.o.
12801 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12802 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12803 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12804 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12805 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12806 to srv_xmlfiles.
12807
12808 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12809 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12810 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12811 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12812 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12813 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12814 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12815 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12816 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12817 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12818 (clean): Update.
12819
12820 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12821 (init_registers_powerpc_32l): ... this new prototype.
12822 (init_registers_powerpc_32): Remove, replace by ...
12823 (init_registers_powerpc_altivec32l): ... this new prototype.
12824 (init_registers_powerpc_e500): Remove, replace by ...
12825 (init_registers_powerpc_e500l): ... this new prototype.
12826 (init_registers_ppc64): Remove, replace by ...
12827 (init_registers_powerpc_64l): ... this new prototype.
12828 (init_registers_powerpc_64): Remove, replace by ...
12829 (init_registers_powerpc_altivec64l): ... this new prototype.
12830 (ppc_num_regs): Set to 73.
12831 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12832 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12833 (ppc_cannot_store_register): Handle orig_r3 and trap.
12834 (ppc_arch_setup): Update init_registers_... calls.
12835 (ppc_fill_gregset): Handle orig_r3 and trap.
12836
12837 * inferiors.c (clear_inferiors): Reset current_inferior.
12838
fdc59709
PB
128392008-04-23 Paolo Bonzini <bonzini@gnu.org>
12840
889bf7c5
PA
12841 * acinclude.m4: Add override.m4.
12842 * configure: Regenerate.
fdc59709 12843
c9b2f845
UW
128442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12845
12846 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12847 initial call to init_register_ppc64.
12848
550512b8
UW
128492008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12850
43aaf8b6
PA
12851 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12852 single powerpc*-*-linux* case.
550512b8
UW
12853 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12854
b6430ec3
UW
128552008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12856
12857 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12858 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12859 from reg_xmlfiles.
12860 * linux-ppc-low.c: Include <elf.h>.
12861 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12862 (ppc_hwcap): New global variable.
12863 (ppc_regmap): Remove __SPE__ #ifdef sections.
12864 (ppc_regmap_e500): New global variable.
12865 (ppc_cannot_store_register): Update __SPE__ special case.
12866 (ppc_get_hwcap): New function.
12867 (ppc_arch_setup): Use it to determine whether inferior supports
12868 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12869 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12870 Do not access registers if target does not support AltiVec.
12871 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12872 Do not access registers if target does not support SPE.
12873 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12874
52fa2412
UW
128752008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12876
12877 * linux-low.c (disabled_regsets, num_regsets): New.
12878 (use_regsets_p): Delete.
12879 (linux_wait_for_process): Clear disabled_regsets.
12880 (regsets_fetch_inferior_registers): Check and set it.
12881 (regsets_store_inferior_registers): Likewise.
12882 (linux_fetch_registers, linux_store_registers): Do not use
12883 use_regsets_p.
12884 (initialize_low): Allocate disabled_regsets.
12885
e28b3332
DJ
128862008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12887
12888 * Makefile.in (LIBOBJS): New.
12889 (OBS): Use LIBOBJS.
12890 (memmem.o): New rule.
12891 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12892 * configure: Regenerated.
12893
4536995d
UW
128942008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12895
12896 * server.c (handle_query): Never return "unsupported" for
12897 qXfer:features:read queries.
12898
221c031f
UW
128992008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12900
12901 * server.c (get_features_xml): Fix inverted condition.
12902 (handle_query): Always support qXfer:feature:read.
12903
ccd213ac
DJ
129042008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12905
12906 * server.c (wrapper_argv): New.
12907 (start_inferior): Handle wrapper_argv. If set, expect an extra
12908 trap.
12909 (gdbserver_usage): Document --wrapper.
12910 (main): Parse --wrapper.
12911
6fe305f7
UW
129122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12913
12914 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12915 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12916 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12917 (ppc_set_pc): Likewise.
12918 (ppc_arch_setup): New function.
12919 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12920 of collect_register.
889bf7c5 12921 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12922
5b0a002e
UW
129232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12924
12925 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12926 instead of linux-ppc64-low.o.
12927 * linux-ppc64-low.c: Remove file.
12928 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12929 (linux-ppc64-low.o): Remove rule.
12930
12931 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12932 (init_registers_powerpc_64): Likewise.
12933 (ppc_regmap): Conditionally define depending on __powerpc64__.
12934 (ppc_cannot_store_register): Do not special-case "fpscr" when
12935 compiled on __powerpc64__.
12936 (ppc_collect_ptrace_register): New function.
12937 (ppc_supply_ptrace_register): New function.
12938 (ppc_breakpoint): Change type to "unsigned int".
12939 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12940 (the_low_target): Conditionally provide initializers for the
889bf7c5 12941 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12942 collect_ptrace_register and supply_ptrace_register members.
12943
9b4b61c8
UW
129442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12945
12946 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12947 * server.c (gdbserver_xmltarget): Define.
12948 (get_features_xml): Use it to replace "target.xml" and arch_string.
12949
12950 * configure.srv: Remove srv_xmltarget. Add XML files that were
12951 mentioned there to srv_xmlfiles instead. Remove conditional tests
12952 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12953 srv_xmlfiles and srv_regobj to include all possible choices.
12954 * configure.ac (srv_xmltarget): Remove.
12955 (srv_xmlfiles): Do not add "target.xml".
12956 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12957 checks for supplementary target information.
12958 * configure: Regenerate.
12959 * Makefile.in (XML_TARGET): Remove.
12960 (target.xml): Remove rule.
12961 (clean): Do not clean up target.xml.
12962 (.PRECIOUS): Do not mention target.xml.
12963
12964 * target.h (struct target_ops): Remove arch_string member.
12965 * linux-low.c (linux_arch_string): Remove.
12966 (linux_target_ops): Remove arch_string initializer.
12967 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12968 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12969 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12970 * spu-low.c (spu_arch_string): Remove.
12971 (spu_target_ops): Remove arch_string initializer.
12972 * win32-low.c (win32_arch_string): Remove.
12973 (win32_target_ops): Remove arch_string initializer.
12974 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12975 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12976 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12977
ee1a7ae4
UW
129782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12979
12980 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12981 by collect_ptrace_register and supply_ptrace_register hooks.
12982 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12983 instead of checking for the_low_target.left_pad_xfer.
12984 (usr_store_inferior_registers): Use collect_ptrace_register callback
12985 instead of checking for the_low_target.left_pad_xfer.
12986
12987 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12988 (s390_supply_ptrace_register): Likewise.
12989 (s390_fill_gregset): Call s390_collect_ptrace_register.
12990 (the_low_target): Update.
12991
12992 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12993 (ppc_supply_ptrace_register): Likewise.
12994 (the_low_target): Update.
12995
12996 * linux-i386-low.c (the_low_target): Update.
12997 * linux-x86-64-low.c (the_low_target): Update.
12998
d61ddec4
UW
129992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13000
13001 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13002 reg-s390.o and reg-s390x.o.
13003
13004 * linux-low.c (new_inferior): New global variable.
13005 (linux_create_inferior, linux_attach): Set it.
13006 (linux_wait_for_process): Call the_low_target.arch_setup after the
13007 target has stopped for the first time.
13008 (initialize_low): Do not call the_low_target.arch_setup.
13009
13010 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13011 (s390_set_pc): Likewise.
13012 (s390_arch_setup): New function.
13013 (the_low_target): Use s390_arch_setup as arch_setup routine.
13014
13015 * regcache.c (realloc_register_cache): New function.
13016 (set_register_cache): Call it for each existing regcache.
13017
d05b4ac3
UW
130182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13019
13020 * server.h (init_registers): Remove prototype.
13021
13022 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13023 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13024 instead of init_registers ().
13025 * linux-arm-low.c (init_registers_arm): Add prototype.
13026 (init_registers_arm_with_iwmmxt): Likewise.
13027 (the_low_target): Add initializer for arch_setup field.
13028 * linux-cris-low.c (init_registers_cris): Add prototype.
13029 (the_low_target): Add initializer for arch_setup field.
13030 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13031 (the_low_target): Add initializer for arch_setup field.
13032 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13033 (the_low_target): Add initializer for arch_setup field.
13034 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13035 (the_low_target): Add initializer for arch_setup field.
13036 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13037 (the_low_target): Add initializer for arch_setup field.
13038 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13039 (the_low_target): Add initializer for arch_setup field.
13040 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13041 (init_registers_mips64_linux): Likewise.
13042 (the_low_target): Add initializer for arch_setup field.
13043 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13044 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13045 (the_low_target): Add initializer for arch_setup field.
13046 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13047 (init_registers_powerpc_64): Likewise.
13048 (the_low_target): Add initializer for arch_setup field.
13049 * linux-s390-low.c (init_registers_s390): Add prototype.
13050 (init_registers_s390x): Likewise.
13051 (the_low_target): Add initializer for arch_setup field.
13052 * linux-sh-low.c (init_registers_sh): Add prototype.
13053 (the_low_target): Add initializer for arch_setup field.
13054 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13055 (the_low_target): Add initializer for arch_setup field.
13056 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13057 (the_low_target): Add initializer for arch_setup field.
13058
13059 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13060 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13061 instead of init_registers ().
13062 * win32-arm-low.c (init_registers_arm): Add prototype.
13063 (the_low_target): Add initializer for arch_setup field.
13064 * win32-i386-low.c (init_registers_i386): Add prototype.
13065 (the_low_target): Add initializer for arch_setup field.
13066
13067 * spu-low.c (init_registers_spu): Add prototype.
13068 (initialize_low): Call initialie_registers_spu () instead of
13069 initialize_registers ().
13070
fd96d250
PA
130712008-02-19 Pedro Alves <pedro@codesourcery.com>
13072
13073 * server.c (handle_v_requests): When handling the vRun and vAttach
13074 packets, if already debugging a process, don't kill it. Return an
13075 error instead.
13076
d41b6bb4
DJ
130772008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13078
13079 * server.c (handle_query): Correct length check.
13080
5ac588cf
PA
130812008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13082
13083 * win32-low.c (do_initial_child_stuff): Add process handle
13084 parameter. Set current_process_handle and current_process_id from the
13085 parameters. Clear globals.
13086 (win32_create_inferior): Don't set current_process_handle and
13087 current_process_id here. Instead pass them on the call to
13088 do_initial_child_stuff.
13089 (win32_attach): Likewise.
13090 (win32_clear_inferiors): New.
13091 (win32_kill): Don't close the current process handle or the
13092 current thread handle here. Instead call win32_clear_inferiors.
13093 (win32_detach): Don't open a new handle to the process. Call
13094 win32_clear_inferiors.
13095 (win32_join): Don't rely on current_process_handle; open a new
13096 handle using the process id.
13097 (win32_wait): Call win32_clear_inferiors when the inferior process
13098 has exited.
13099
ecd7ecbc
DJ
131002008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13101
13102 * server.c (monitor_show_help): Add "exit".
13103
1525d545
MG
131042008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13105
ecd7ecbc 13106 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13107 (clean): Add reg-xtensa.c.
13108 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13109 * configure.srv (xtensa*-*-linux*) New target.
13110 * linux-xtensa-low.c: New.
13111 * xtensa-xtregs.c: New.
1525d545 13112
59a016f0
PA
131132008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13114
13115 * hostio.c: Don't include errno.h.
13116 (errno_to_fileio_errno): Move to hostio-errno.
13117 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13118 error number outputting to the target->hostio_last_error callback.
13119 (hostio_packet_error): Use FILEIO_EINVAL directly.
13120 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13121 calls to hostio_error.
13122 * hostio-errno.c: New.
13123 * server.h (hostio_last_error_from_errno): Declare.
13124 * target.h (target_ops): Add hostio_last_error member.
13125 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13126 as hostio_last_error handler.
889bf7c5 13127 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13128 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13129 (wince_hostio_last_error): New functions.
13130 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13131 as hostio_last_error handler.
13132 (win32_target_ops) [!_WIN32_WCE]: Register
13133 hostio_last_error_from_errno as hostio_last_error handler.
13134 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13135 (hostio-errno.o): New rule.
13136 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13137 * configure.srv (srv_hostio_err_objs): New variable. Default to
13138 hostio-errno.o.
13139 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13140 * configure: Regenerate.
13141
2d717e4f
DJ
131422008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13143
13144 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13145 (linux_kill, linux_detach): Clean up the process list.
13146 * remote-utils.c (remote_open): Improve port number parsing.
13147 (putpkt_binary, input_interrupt): Only send interrupts if the target
13148 is running.
13149 * server.c (extended_protocol): Make static.
13150 (attached): Define earlier.
13151 (exit_requested, response_needed, program_argv): New variables.
13152 (target_running): New.
13153 (start_inferior): Clear attached here.
13154 (attach_inferior): Set attached here.
13155 (require_running): Define.
13156 (handle_query): Use require_running and target_running. Implement
13157 "monitor exit".
13158 (handle_v_attach, handle_v_run): New.
13159 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13160 (gdbserver_usage): Update.
13161 (main): Redo argument parsing. Handle --debug and --multi. Handle
13162 --attach along with other options or after the port. Save
13163 program_argv. Support no initial program. Resynchronize
13164 communication with GDB after an error. Handle "monitor exit".
13165 Use require_running and target_running. Always allow the extended
13166 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13167 restart in extended mode.
13168 * README: Refer to the GDB manual. Update --attach usage.
13169
7407e2de
AS
131702007-12-20 Andreas Schwab <schwab@suse.de>
13171
13172 * linux-low.c (STACK_SIZE): Define.
13173 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13174 (linux_test_for_tracefork): Likewise.
13175
b65d95c5
DJ
131762007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13177
13178 * linux-low.c (linux_wait_for_event): Update messages. Do not
13179 reinsert auto-delete breakpoints.
13180 * mem-break.c (struct breakpoint): Change return type of handler to
13181 int.
13182 (set_breakpoint_at): Update handler type.
13183 (reinsert_breakpoint_handler): Return 1 instead of calling
13184 delete_breakpoint.
13185 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13186 setting a new one.
13187 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13188 * mem-break.h (set_breakpoint_at): Update handler type.
13189 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13190 * win32-low.c (auto_delete_breakpoint): New.
13191 (get_child_debug_event): Use it.
13192
4e799345
DJ
131932007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13194
13195 * configure.ac: Check for pread and pwrite.
13196 * hostio.c (handle_pread): Fall back to lseek and read.
13197 (handle_pwrite): Fall back to lseek and write.
13198 * config.in, configure: Regenerated.
13199
27524b67
DJ
132002007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13201
13202 * server.c (myresume): Add own_buf argument.
13203 (main): Update calls.
13204
a20d5e98
DJ
132052007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13206
13207 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13208 * remote-utils.c (remote_open): Do not call disable_async_io.
13209 (block_async_io): Delete.
13210 (unblock_async_io): Make static.
13211 (initialize_async_io): New.
13212 * server.c (handle_v_cont): Handle async I/O here.
13213 (myresume): Likewise. Move other common resume tasks here...
13214 (main): ... from here. Call initialize_async_io. Disable async
13215 I/O before the main loop.
13216 * server.h (initialize_async_io): Declare.
13217 (block_async_io, unblock_async_io): Delete prototypes.
13218 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13219
b79d787e
DJ
132202007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13221
13222 * remote-utils.c (readchar): Allow binary data in received messages.
13223
d97903b2
PA
132242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13225
13226 * win32-low.c (attaching): New global.
13227 (win32_create_inferior): Clear the `attaching' global.
13228 (win32_attach): Set the `attaching' global.
13229 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13230 attaching. Only set a breakpoint at the entry point if not
13231 attaching.
13232
311de423
PA
132332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13234
13235 * server.c (main): Don't report dll events on the initial
13236 connection on attaches.
13237
6c2d16d2
PA
132382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13239
13240 * server.c (main): Relax numerical bases supported for the pid of
13241 the --attach command line argument.
13242
5ca906e6
PA
132432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13244
13245 * win32-low.c (win32_attach): Call OpenProcess before
13246 DebugActiveProcess, not after. Add last error output to error
13247 call.
13248
9c6c8194
PA
132492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13250
13251 * win32-low.c (win32_get_thread_context)
13252 (win32_set_thread_context): New functions.
13253 (thread_rec): Use win32_get_thread_context.
13254 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13255 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13256 field.
13257
4d5d1aaa
PA
132582007-12-03 Leo Zayas
13259 Pedro Alves <pedro_alves@portugalmail.pt>
13260
13261 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13262 global variables.
13263 (child_add_thread): Minor cleanup.
13264 (child_continue): Resume artificially suspended threads before
13265 calling ContinueDebugEvent.
13266 (suspend_one_thread): New.
13267 (fake_breakpoint_event): New.
13268 (get_child_debug_event): Change return type to int. Check here if
13269 gdb sent an interrupt request. If a soft interrupt was requested,
13270 fake a breakpoint event. Return 0 if there is no event to handle,
13271 and 1 otherwise.
13272 (win32_wait): Don't check here if gdb sent an interrupt request.
13273 Ensure there is a valid event to handle.
13274 (win32_request_interrupt): Add soft interruption method as last
13275 resort.
13276
c436e841
PA
132772007-12-03 Leo Zayas
13278 Pedro Alves <pedro_alves@portugalmail.pt>
13279
13280 * win32-low.h (win32_thread_info): Add descriptions to the
13281 structure members. Replace `suspend_count' counter by a
13282 `suspended' flag.
13283 * win32-low.c (thread_rec): Update condition of when to get the
13284 context from the inferior. Rely on ContextFlags being set if it
13285 has already been retrieved. Only suspend the inferior thread if
13286 we haven't already. Warn if that fails.
13287 (continue_one_thread): s/suspend_count/suspended/. Only call
13288 ResumeThread once. Warn if that fails.
13289
e7b5fa67
PA
132902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13291
13292 * win32-low.c (win32_wait): Don't read from the inferior when it
13293 has already exited.
13294
a385171d
PA
132952007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13296
13297 * Makefile.in (win32_low_h): New variable.
13298 (win32-low.o): Add dependency on $(win32_low_h).
13299 (win32-arm-low.o, win32-i386-low.o): New rules.
13300
f80c84b3
DJ
133012007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13302
13303 * hostio.c: Correct copyright year.
13304
a6b151f1
DJ
133052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13306
13307 * Makefile.in (OBS): Add hostio.o.
13308 (hostio.o): New rule.
13309 * server.h (handle_vFile): Declare.
13310 * hostio.c: New file.
13311 * server.c (handle_v_requests): Take packet_len and new_packet_len
13312 for binary packets. Call handle_vFile.
13313 (main): Update call to handle_v_requests.
13314
f9387fc3
DJ
133152007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13316
13317 * linux-low.c: Include <sched.h>.
13318
51c2684e
DJ
133192007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13320
13321 * linux-low.c (linux_tracefork_grandchild): New.
13322 (linux_tracefork_child): Use clone.
13323 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13324
75f83163
JB
133252007-10-31 Joel Brobecker <brobecker@adacore.com>
13326
13327 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13328
da5898ce
DJ
133292007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13330
13331 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13332
24a09b5f
DJ
133332007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13334
13335 * inferiors.c (change_inferior_id): Delete.
13336 (add_pid_to_list, pull_pid_from_list): New.
13337 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13338 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13339 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13340 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13341 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13342 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13343 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13344 (using_threads): Always set to 1.
13345 (handle_extended_wait): New.
13346 (add_process): Do not set TID.
13347 (linux_create_inferior): Set must_set_ptrace_flags.
13348 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13349 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13350 (linux_thread_alive): Rename TID argument to LWPID.
13351 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13352 (linux_wait_for_event): Do not use TID or check using_threads. Update
13353 call to dead_thread_notify. Call handle_extended_wait.
13354 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13355 (send_sigstop): Delete sigstop_sent.
13356 (wait_for_sigstop): Avoid TID.
13357 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13358 (linux_test_for_tracefork): New.
13359 (linux_lookup_signals): Use thread_db_active and
13360 linux_supports_tracefork_flag.
13361 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13362 * linux-low.h (get_process_thread): Avoid TID.
13363 (struct process_ifo): Move thread_known and tid to the end. Remove
13364 sigstop_sent.
13365 (linux_attach_lwp, thread_db_init): Update prototypes.
13366 * server.h (change_inferior_id): Delete prototype.
13367 (add_pid_to_list, pull_pid_from_list): New prototypes.
13368 * thread-db.c (thread_db_use_events): New.
13369 (find_first_thread): Rename to...
13370 (find_one_thread): ...this. Update callers and messages. Do not
13371 call fatal. Check thread_db_use_events. Do not call
13372 change_inferior_id or new_thread_notify.
13373 (maybe_attach_thread): Update. Do not call new_thread_notify.
13374 (thread_db_init): Set thread_db_use_events. Check use_events.
13375 * utils.c (fatal, warning): Correct message prefix.
13376
30ed0a8f
DJ
133772007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13378
13379 * Makefile.in (clean): Remove new files.
13380 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13381 (powerpc-64.o, powerpc-64.c): New rules.
13382 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13383 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13384 with SPE.
13385 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13386 SPE targets.
13387 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13388 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13389 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13390 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13391 (target_regsets): Add AltiVec and SPE register sets.
13392 * configure.ac: Check for AltiVec and SPE.
13393 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13394 (ppc_fill_vrregset, ppc_store_vrregset): New.
13395 (target_regsets): Add AltiVec register set.
13396 * configure: Regenerated.
13397
fd462a61
DJ
133982007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * linux-low.c (O_LARGEFILE): Define.
13401 (linux_read_memory): Use /proc/PID/mem.
13402 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13403 * configure, config.in: Regenerated.
13404
69f223ed
DJ
134052007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13406
13407 * linux-low.c (linux_wait_for_event): Do not pass signals while
13408 single-stepping.
13409
aec18585
PA
134102007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13411
13412 * win32-low.c (create_process): New.
13413 (win32_create_inferior): Use create_process instead of
13414 CreateProcess. If create_process failed retry appending an ".exe"
13415 suffix. Store the GetLastError result immediatelly after
13416 create_process calls and use it on the call to error.
13417
34d86ddd
PA
134182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13419
13420 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13421
5a0e3bd0
JB
134222007-08-23 Joel Brobecker <brobecker@adacore.com>
13423
13424 * configure.ac: Switch license to GPLv3.
13425
f88c79e6
MS
134262007-08-01 Michael Snyder <msnyder@access-company.com>
13427
13428 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13429
6b3d9b83
PA
134302007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13431
13432 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13433 typedef.
13434 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13435 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13436 CloseToolhelp32Snapshot.
13437 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13438 CloseToolhelp32Snapshot.
13439
c588c53c
MS
134402007-07-27 Michael Snyder <michael.snyder@access-company.com>
13441
13442 * server.c (main): Check for inferior exit before main loop.
13443
aa0403d9
PA
134442007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13445
13446 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13447 instead of on tmp_desc.
13448
255e7678
DJ
134492007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13450 Daniel Jacobowitz <dan@codesourcery.com>
13451
13452 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13453 (add_thread): Minor cleanups.
13454 (clear_inferiors): Move lower in the file. Clear the DLL
13455 list.
13456 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13457 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13458 (xml_escape_text): New.
13459 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13460 for qSupported.
13461 (handle_v_cont): Report errors.
13462 (gdbserver_version): Update.
13463 (main): Correct size of own_buf. Do not report initial DLL events.
13464 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13465 (unloaded_dll, xml_escape_text): New.
13466 * win32-low.c (enum target_waitkind): Update comments.
13467 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13468 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13469 (win32_EnumProcessModules, win32_GetModuleInformation)
13470 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13471 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13472 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13473 (win32_Module32First, win32_Module32Next, load_toolhelp)
13474 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13475 (get_child_debug_event): Handle DLL events.
13476 (win32_wait): Likewise.
13477
0d37add9
DJ
134782007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13479
13480 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13481 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13482
45e2715e
PA
134832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13484
13485 * win32-low.c (handle_output_debug_string): Ignore event if not
13486 waiting.
13487
c5674cf1
PA
134882007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13489
13490 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13491
2bbe3cc1
DJ
134922007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13493
13494 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13495
ae13219e
DJ
134962007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * inferiors.c (change_inferior_id): Add comment.
13499 * linux-low.c (check_removed_breakpoint): Add an early
13500 prototype. Improve debug output.
13501 (linux_attach): Doc update.
13502 (linux_detach_one_process, linux_detach): Clean up before releasing
13503 each process.
13504 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13505 * linux-low.h (struct process_info): Doc improvement.
13506 * mem-break.c (delete_all_breakpoints): New.
13507 * mem-break.h (delete_all_breakpoints): New prototype.
13508 * thread-db.c (find_first_thread): New.
13509 (thread_db_create_event): Call it instead of
13510 thread_db_find_new_threads. Clean up unused variables.
13511 (maybe_attach_thread): Remove first thread handling.
13512 (thread_db_find_new_threads): Use find_first_thread.
13513 (thread_db_get_tls_address): Likewise.
13514
4105de34
DJ
135152007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13516
13517 * thread-db.c (thread_db_find_new_threads): Add prototype.
13518 (thread_db_create_event): Check for the main thread before adding
13519 a new thread.
13520 (maybe_attach_thread): Only enable event reporting if TID == 0.
13521 (thread_db_get_tls_address): Check for new threads.
13522
2b876972
DJ
135232007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13524
13525 * linux-low.c (linux_create_inferior): Try execv before execvp.
13526 * spu-low.c (spu_create_inferior): Likewise.
13527
7a245884
DJ
135282007-06-13 Mike Frysinger <vapier@gentoo.org>
13529
13530 * linux-low.c (linux_create_inferior): Change execv to execvp.
13531 * spu-low.c (spu_create_inferior): Likewies.
13532
117ce543
DJ
135332007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13534
13535 * Makefile.in (clean): Clean new files instead of deleted ones.
13536 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13537 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13538 rules.
13539 * configure.srv: Specify XML files and new regformats for MIPS and
13540 MIPS64 GNU/Linux.
13541 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13542 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13543 an entry for the restart register.
13544 (mips_cannot_fetch_register, mips_cannot_store_register)
13545 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13546 register names to match the XML descriptions.
13547 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13548 restart register instead of $0.
13549
0e7f50da
UW
135502007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13551 Markus Deuling <deuling@de.ibm.com>
13552
13553 * remote-utils.c (decode_xfer_write): New function.
13554 * server.h (decode_xfer_write): Add prototype.
13555 * server.c (handle_query): Add PACKET_LEN argument. Support
13556 qXfer:spu:read and qXfer:spu:write packets.
13557 (main): Pass packet_len to handle_query.
13558 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13559 * target.h (target_ops): Add qxfer_spu.
13560
374c1d38
UW
135612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13562
13563 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13564 accessing non-seekable spufs files.
13565
bb63802a
UW
135662007-05-16 Markus Deuling <deuling@de.ibm.com>
13567
889bf7c5 13568 * server.c (handle_query): Add reply for qC packet.
bb63802a 13569
7390519e
PA
135702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13571 Leo Zayas <lerele@champenstudios@com>
13572
13573 * server.h (check_remote_input_interrupt_request): New function.
13574 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13575 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13576 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13577 (check_remote_input_interrupt_request): New function.
13578 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13579 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13580 winapi_GenerateConsoleCtrlEvent): New typedefs.
13581 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13582 to 250 ms.
13583 (win32_wait): Check for remote interrupt request
13584 with check_remote_input_interrupt_request.
13585 (win32_request_interrupt): New function.
13586 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13587
34b34921
PA
135882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13589
13590 * win32-low.c (debug_registers_changed,
13591 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13592 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13593 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13594 (thread_rec): Get context using the low target.
13595 (child_add_thread): Call thread_added on the low target,
13596 which does the same thing.
13597 (regptr): Delete.
13598 (do_initial_child_stuff): Remove debug registers references.
13599 Set context using the low target. Resume threads after
13600 setting the contexts.
13601 (child_continue): Remove dead variable. Remove debug
13602 registers references.
13603 (child_fetch_inferior_registers): Go through the low target.
13604 (do_child_store_inferior_registers): Remove.
13605 (child_store_inferior_registers): Go through the low target.
13606 (win32_resume): Remove debug registers references.
13607 Set context using the low target.
13608 (handle_exception): Change return type to void. Don't record
13609 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13610 first chance exception.
889bf7c5 13611 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13612 goto loop. Always return after waiting for debug event.
13613 (win32_wait): Convert to switch statement. Handle spurious
13614 events.
13615
13616 * win32-i386-low.c (debug_registers_changed,
13617 debug_registers_used): New.
13618 (initial_stuff): Rename to ...
13619 (i386_initial_stuff): ... this. Clear debug registers
13620 state variables.
13621 (store_debug_registers): Delete.
13622 (i386_get_thread_context): New.
13623 (load_debug_registers): Delete.
13624 (i386_set_thread_context): New.
13625 (i386_thread_added): New.
13626 (single_step): Rename to ...
13627 (i386_single_step): ... this.
13628 (do_fetch_inferior_registers): Rename to ...
13629 (i386_fetch_inferior_register): ... this.
13630 (i386_store_inferior_register): New.
13631 (the_low_target): Adapt to new interface.
13632
13633 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13634 (arm_get_thread_context): New.
13635 (arm_set_thread_context): New.
13636 (regptr): New.
13637 (do_fetch_inferior_registers): Rename to ...
13638 (arm_fetch_inferior_register): ... this.
13639 (arm_store_inferior_register): New.
13640 (arm_wince_breakpoint): Reimplement as unsigned long.
13641 (arm_wince_breakpoint_len): Define.
13642 (the_low_target): Adapt to new interface.
13643
13644 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13645 load_debug_registers. Add get_thread_context, set_thread_context,
13646 thread_added and store_inferior_register. Rename
13647 fetch_inferior_registers to fetch_inferior_register.
13648 (regptr): Remove declaration.
13649
dd6953e1
PA
136502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13651
13652 * linux-low.c (linux_detach): Change return type to int. Return 0.
13653 * spu-low.c (spu_detach): Likewise.
13654
444d6139
PA
136552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13656
13657 * target.h (target_ops): Change return type of detach to int.
13658 Add join.
13659 (join_inferior): New.
13660 * server.c (main): Don't skip detach support on mingw32.
13661 If the inferior doesn't support detaching return error.
13662 Call join_inferior instead of using waitpid.
13663 * linux-low.c (linux_join): New.
13664 (linux_target_op): Add linux_join.
13665 * spu-low.c (spu_join): New.
13666 (spu_target_ops): Add spu_join.
13667 * win32-low.c (win32_detach): Adapt to new interface.
13668 Reopen current_process_handle before detaching. Issue a child
13669 resume before detaching.
13670 (win32_join): New.
13671 (win32_target_op): Add win32_join.
13672
1d5315fe
PA
136732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13674
13675 * win32-low.c (win32-attach): Fix return value.
13676 * target.h (target_ops): Describe ATTACH return values.
13677
bf914831
PA
136782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13679
13680 * win32-low.c (GETPROCADDRESS): Define.
13681 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13682 (winapi_DebugSetProcessKillOnExit): Likewise.
13683 (win32_create_inferior): Force usage of ansi CreateProcessA.
13684 (win32_attach): Use GETPROCADDRESS.
13685 (win32_detach): Likewise.
13686
f72f3e60
PA
136872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13688
13689 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13690
ed50f18f
PA
136912007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13692
13693 * win32-low.c: Commit leftover changes from 2007-03-29.
13694
0c2ead7e
DJ
136952007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13696
13697 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13698 fields short instead of int. Add explicit padding.
13699 (i387_cache_to_fsave): Remove unnecessary casts.
13700 (i387_fsave_to_cache): Doc fix.
13701 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13702
73725ff3
DJ
137032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13706 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13707
d99f33d8
PA
137082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13709
13710 * configure.srv (arm*-*-mingw32ce*): Move near the other
13711 arm targets.
13712
68070c10
PA
137132007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13714
2482afc6 13715 * configure.ac: Add errno checking.
68070c10
PA
13716 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13717 sys/file.h and malloc.h.
13718 (AC_CHECK_DECLS): Add perror.
13719 (srv_mingwce): Handle.
2482afc6 13720 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13721 win32-i386-low.o to srv_tgtobj.
13722 (i[34567]86-*-mingw*): Likewise.
13723 (arm*-*-mingw32ce*): Add case.
13724 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13725 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13726 [__MINGW32CE__] (strerror): New function.
13727 [__MINGW32CE__] (errno): Define to GetLastError.
13728 [__MINGW32CE__] (COUNTOF): New macro.
13729 (remote_open): Remove extra close call.
13730 * mem-break.c (delete_breakpoint_at): New function.
13731 * mem-break.h (delete_breakpoint_at): Declare.
13732 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13733 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13734 [USE_WIN32API] (read, write): Add char* casts.
13735 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13736 * server.h: Include wincecompat.h on Windows CE.
13737 [HAVE_ERRNO_H]: Check.
13738 (perror): Declare if not declared.
13739 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13740 (perror_with_name): Remove errno declaration.
13741 * wincecompat.h: New.
13742 * wincecompat.c: New.
13743 * win32-low.h: New.
13744 * win32-arm-low.c: New.
13745 * win32-i386-low.c: New.
13746 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13747 (OUTMSG2): Make it safe.
13748 (_T): New macro.
13749 (COUNTOF): New macro.
13750 (NUM_REGS): Get it from the low target.
13751 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13752 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13753 (thread_rec): Let low target handle debug registers.
13754 (child_add_thread): Likewise.
13755 (child_init_thread_list): Likewise.
13756 (continue_one_thread): Likewise.
13757 (regptr): New.
13758 (do_child_fetch_inferior_registers): Move to ...
13759 * win32-i386-low.c: ... here, and rename to ...
13760 (do_fetch_inferior_registers): ... this.
889bf7c5 13761 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13762 Go through the low target.
13763 (do_child_store_inferior_registers): Use regptr.
13764 (strwinerror): New function.
13765 (win32_create_inferior): Handle Windows CE.
13766 Use strwinerror instead of strerror on Windows error
13767 codes. Add program to the error output.
13768 Don't close the main thread handle on Windows CE.
13769 (win32_attach): Use coredll.dll on Windows CE.
13770 (win32_kill): Close current process and current
13771 thread handles.
13772 (win32_detach): Use coredll.dll on Windows CE.
13773 (win32_resume): Let low target handle debug registers, and
13774 step request.
13775 (handle_exception): Add/Remove initial breakpoint. Avoid
13776 non-existant WSTOPSIG on Windows CE.
13777 (win32_read_inferior_memory): Cast to remove warning.
13778 (win32_arch_string): Go through the low target.
13779 (initialize_low): Call set_breakpoint_data with the low
13780 target's breakpoint.
13781 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13782 FOP_REGNUM, mappings): Move to ...
13783 * win32-i386-low.c: ... here.
13784 * win32-low.c (win32_thread_info): Move to ...
13785 * win32-low.h: ... here.
13786 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13787 win32-arm-low.c and wincecompat.c.
13788 (all:): Add $EXEEXT.
13789 (install-only:): Likewise.
13790 (gdbserver:): Likewise.
13791 (gdbreplay:): Likewise.
13792 * config.in: Regenerate.
13793 * configure: Regenerate.
13794
41093d81
PA
137952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13796
13797 * win32-low.c: Rename typedef thread_info to
13798 win32_thread_info throughout.
13799
544afa54
PA
138002007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13801
13802 * win32-i386-low.c: Rename to ...
13803 * win32-low.c: ... this.
13804 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13805 * Makefile.in: Likewise.
13806
bce7165d
PA
138072007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13808
13809 * remote-utils.c (monitor_output): Constify msg parameter.
13810 * server.h (monitor_output): Likewise.
13811 * win32-i386-low.c (handle_output_debug_string): New.
13812 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13813 handle_output_debug_string.
13814 (get_child_debug_event): Likewise.
13815
506c7aa0
DJ
138162007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13817
13818 * server.c (main): Correct strtoul check.
13819
42c81e2a
DJ
138202007-03-27 Jon Ringle <jon@ringle.org>
13821
13822 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13823
9453113a
DJ
138242007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13825
13826 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13827
64a69107
DJ
138282007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * terminal.h: Check HAVE_SGTTY_H.
13831
138322007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13833
13834 * remote-utils.c (remote_open): Print out the assigned port number.
13835
c74d0ad8
DJ
138362007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13837
13838 * remote-utils.c (monitor_output): New function.
13839 * server.c (debug_threads): Define here.
13840 (monitor_show_help): New function.
13841 (handle_query): Handle qRcmd.
13842 (main): Do not handle 'd' packet.
13843 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13844 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13845 of debug_threads.
13846
de7c3b4a
PA
138472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13848
13849 * Makefile.in (EXEEXT): New.
13850 (clean): Use $(EXEEXT).
13851
ef57601b
PA
138522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13853
13854 * target.h (target_ops): Rename send_signal to request_interrupt,
13855 and remove enum target_signal parameter.
13856 * linux-low.c (linux_request_interrupt): Rename from
13857 linux_send_signal, and always send SIGINT.
13858 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13859 and always send SIGINT.
13860 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13861 of send_signal.
13862 (input_interrupt): Likewise.
13863
820f2bda
PA
138642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13865
13866 * server.c (get_features_xml): Check if target implemented
13867 arch_string.
13868 * win32-i386-low.c (win32_arch_string): New.
13869 (win32_target_ops): Add win32_arch_string as arch_string member.
13870
ab39bf24
UW
138712007-02-22 Markus Deuling <deuling@de.ibm.com>
13872
13873 * spu-low.c (spu_arch_string): New.
13874 (spu_target_ops): Add spu_arch_string.
13875
61ff6e04
DJ
138762007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13879 * configure.ac: Do not check for terminal.h.
13880 * configure, config.in: Regenerated.
13881
fb1e4ffc
DJ
138822007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13883
13884 * Makefile.in (OBS): Add $(XML_BUILTIN).
13885 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13886 (clean): Update.
13887 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13888 (arm-with-iwmmxt.c): New.
13889 * config.in, configure: Regenerate.
13890 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13891 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13892 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13893 (arm*-*-linux*): Add iWMMXt and regset support.
13894 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13895 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13896 (arm_store_wmmxregset, target_regsets): New.
13897 * server.c (get_features_xml): Take annex argument. Check builtin
13898 XML documents.
13899 (handle_query): Handle multiple annexes.
13900
0f48aa01
DJ
139012007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13902
13903 * remote-utils.c [USE_WIN32API] (read, write): Define.
13904 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13905 write.
13906
23181151
DJ
139072007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * linux-i386-low.c (the_low_target): Set arch_string.
13910 * linux-x86-64-low.c (the_low_target): Likewise.
13911 * linux-low.c (linux_arch_string): New.
13912 (linux_target_ops): Add it.
13913 * linux-low.h (struct linux_target_ops): Add arch_string.
13914 * server.c (write_qxfer_response): Use const void * for DATA.
13915 (get_features_xml): New.
13916 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13917 * target.h (struct target_ops): Add arch_string method.
13918
9d606399
DJ
139192007-01-03 Denis Pilat <denis.pilat@st.com>
13920 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * linux-low.c (linux_kill): Handle being called with no threads.
13923 * win32-i386-low.c (win32_kill): Likewise.
13924 (get_child_debug_event): Clear current_process_handle.
13925
139262006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13927 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * remote-utils.c (remote_open): Check the type of specified
13930 serial port devices before opening them.
13931 * server.c (main): Kill the inferior if an error occurs during
13932 the first remote_open.
13933
a5e13d24
DJ
139342006-12-05 Markus Deuling <deuling@de.ibm.com>
13935
13936 * README: Update supported targets.
13937
186947f7
DJ
139382006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13939
13940 * Makefile.in (clean): Remove reg-mips64.c.
13941 (reg-mips64.c, reg-mips64.o): New rules.
13942 * configure.srv: Handle mips64. Include regset support for mips.
13943 * linux-mips-low.c (union mips_register): New.
13944 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13945 (mips_breakpoint, mips_breakpoint_at): Use int.
13946 (mips_collect_register, mips_supply_register)
13947 (mips_collect_register_32bit, mips_supply_register_32bit)
13948 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13949 (mips_store_fpregset, target_regsets): New.
13950 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13951
a13e2c95
UW
139522006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13953
13954 * configure.srv: Add target "spu*-*-*".
13955 * Makefile.in (clean): Remove reg-spu.c.
13956 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13957 * spu-low.c: New file.
13958
cb7283db
DJ
139592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * configure.ac: Correct td_thr_tls_get_addr test.
13962 * configure: Regenerated.
13963
89be2091
DJ
139642006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13965
13966 * linux-low.c (linux_wait_for_event): Reformat. Use the
13967 pass_signals array.
13968 * remote-utils.c (decode_address_to_semicolon): New.
13969 * server.c (pass_signals, handle_general_set): New.
13970 (handle_query): Mention QPassSignals for qSupported.
13971 (main): Call handle_general_set.
13972 * server.h (pass_signals, decode_address_to_semicolon): New.
13973
000ef4f0
DJ
139742006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * server.c (handle_query): Correct error handling for read_auxv.
13977
b7149293
UW
139782005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13979
13980 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13981 and srv_linux_thread_db to yes.
13982 * linux-s390-low.c (s390_fill_gregset): New function.
13983 (target_regsets): Define data structure.
13984
dae5f5cf
DJ
139852006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13986
13987 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13988 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13989 * config.in, configure: Regenerated.
13990 * inferiors.c (gdb_id_to_thread): New function.
13991 (gdb_id_to_thread_id): Use it.
13992 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13993 * linux-low.h (struct process_info): Add th member.
13994 (thread_db_get_tls_address): New prototype.
13995 * remote-utils.c (decode_address): Make non-static.
13996 * server.c (handle_query): Handle qGetTLSAddr.
13997 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13998 * target.h (struct target_ops): Add get_tls_address.
13999 * thread-db.c (maybe_attach_thread): Save the thread handle.
14000 (thread_db_get_tls_address): New.
14001
32ca6d61
DJ
140022006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14003
14004 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14005 (linux_resume_one_process): Take a siginfo_t *. Update all
14006 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14007 (struct pending_signals): Add a siginfo_t.
14008 (linux_wait_for_process): Always set last_status.
14009 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14010 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14011 * linux-low.h (struct process_info): Add last_status.
14012
5ffff7c1
DJ
140132006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * remote-utils.c (try_rle): New function.
14016 (putpkt_binary): Use it.
14017
8695c747
DJ
140182006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14019
14020 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14021 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14022 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14023 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14024 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14025 point registers.
14026
290fadea
RS
140272006-08-08 Richard Sandiford <richard@codesourcery.com>
14028
14029 * server.c (terminal_fd): New variable.
14030 (old_foreground_pgrp): Likewise.
14031 (restore_old_foreground_pgrp): New function.
14032 (start_inferior): Record the terminal file descriptor in terminal_fd
14033 and its original foreground group in old_foreground_pgrp. Register
14034 restore_old_foreground_pgrp with atexit().
14035
9f2e1e63
DJ
140362006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14037
14038 * server.c (handle_query): Correct qPart to qXfer.
14039
b80864fb
DJ
140402006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14041
14042 * configure.ac: Check for more headers which are missing on
14043 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14044 * configure.srv: Add Cygwin and mingw32.
14045 * remote-utils.c: Don't include headers unconditionally which
14046 are missing on mingw32. Include <winsock.h> for mingw32.
14047 (remote_open): Adjust for mingw32 support. Flush
14048 standard error after writing to it.
14049 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14050 (unblock_async_io, enable_async_io, disable_async_io)
14051 (readchar, getpkt): Update for Winsock support.
14052 (prepare_resume_reply): Expect a protocol signal number.
14053 * server.c: Disable <sys/wait.h> on mingw32.
14054 (start_inferior): Adjust for mingw32 support. Flush
14055 standard error after writing to it.
14056 (attach_inferior): Likewise. Use protocol signal
14057 numbers.
14058 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14059 and names.
14060 * win32-i386-low.c: New file.
14061 * Makefile.in (XM_CLIBS): Set.
14062 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14063 (win32-i386-low.o): New dependency rule.
14064 * linux-low.c (linux_wait): Use target signal numbers.
14065 * target.h (struct target_ops): Doc fix.
14066 * server.h (target_signal_to_name): New prototype.
14067 * gdbreplay.c: Don't include headers unconditionally which
14068 are missing on mingw32. Include <winsock.h> for mingw32.
14069 (remote_close, remote_open): Adjust for Winsock support.
14070 * configure, config.in: Regenerated.
14071
0876f84a
DJ
140722006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14073
14074 * server.c (decode_xfer_read, write_qxfer_response): New.
14075 (handle_query): Take a packet length argument. Handle
14076 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14077 the qSupported response.
14078 (main): Update call to handle_query.
14079
01f9e8fa
DJ
140802006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14081
14082 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14083 (putpkt_binary): Renamed from putpkt and adjusted for binary
14084 data.
14085 (putpkt): New wrapper for putpkt_binary.
14086 (readchar): Don't mask off the high bit.
14087 (decode_X_packet): New function.
14088 * server.c (main): Call putpkt_binary if a handler sets the packet
14089 length. Save the length of the incoming packet. Handle 'X'.
14090 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14091
be2a5f71
DJ
140922006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14093
14094 * server.c (handle_query): Handle qSupported.
14095
ea025f5f
DJ
140962006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14097
14098 * remote-utils.c (all_symbols_looked_up): New variable.
14099 (look_up_one_symbol): Check it.
14100 * server.h (look_up_one_symbol): New declaration.
14101 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14102
9308fc88
DJ
141032006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14104
14105 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14106 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14107 (PTRACE_GET_THREAD_AREA): Define.
14108 (ps_get_thread_area): New function.
14109
52fb6437
NS
141102006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14111
14112 * configure.srv (m68k*-*-uclinux*): New target.
14113 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14114 (linux_resume_one_process): Remove extraneous cast.
14115 (linux_read_offsets): New.
14116 (linux_target_op): Add linux_read_offsets on mmuless systems.
14117 * server.c (handle_query): Add qOffsets logic.
14118 * target.h (struct target_ops): Add read_offsets.
14119
21b0f40c
DJ
141202006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14121
14122 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14123 (PTRACE_GET_THREAD_AREA): Define.
14124 (ps_get_thread_area): New function.
14125 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14126 (linux-x86-64-low.o): Update.
14127
0050a760
DJ
141282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * configure.ac: Remove checks for prfpregset_t.
14131 * gdb_proc_service.h: New file.
14132 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14133 new "gdb_proc_service.h".
14134 * proc-service.c: Likewise.
14135 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14136 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14137 * Makefile.in (gdb_proc_service_h): Updated.
14138 * configure, config.in: Regenerated.
14139
b92a518e
DJ
141402006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14141
14142 * remote-utils.c (prepare_resume_reply): Move declaration
14143 of gdb_id_from_wait to the top of the block.
14144
545587ee
DJ
141452006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * linux-low.c (regsets_store_inferior_registers): Read the regset
14148 from the target before filling it.
14149
9db87ebd
DJ
141502006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14151
14152 * server.c (attach_inferior): Return SIGTRAP for a successful
14153 attach.
14154
dd24457d
DJ
141552006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14156
14157 * Makefile.in (OBS): Add version.o.
14158 (STAGESTUFF): Delete.
14159 (version.o): Add dependencies.
14160 (version.c): Replace rule.
14161 (clean): Remove version.c.
14162 * server.c (gdbserver_version): New.
14163 (gdbserver_usage): Use printf.
14164 (main): Handle --version and --help.
14165 * server.h (version, host_name): Add declarations.
14166
6f0f660e
EZ
141672005-12-23 Eli Zaretskii <eliz@gnu.org>
14168
889bf7c5
PA
14169 * linux-arm-low.c:
14170 * linux-arm-low.c:
14171 * inferiors.c:
14172 * i387-fp.h:
14173 * i387-fp.c:
14174 * gdbreplay.c:
14175 * regcache.c:
14176 * proc-service.c:
14177 * mem-break.h:
14178 * mem-break.c:
14179 * linux-x86-64-low.c:
14180 * linux-sh-low.c:
14181 * linux-s390-low.c:
14182 * linux-ppc64-low.c:
14183 * linux-ppc-low.c:
14184 * linux-mips-low.c:
14185 * linux-m68k-low.c:
14186 * linux-m32r-low.c:
14187 * linux-low.h:
14188 * linux-low.c:
14189 * linux-ia64-low.c:
14190 * linux-i386-low.c:
14191 * linux-crisv32-low.c:
14192 * thread-db.c:
14193 * terminal.h:
14194 * target.h:
14195 * target.c:
14196 * server.h:
14197 * server.c:
14198 * remote-utils.c:
14199 * regcache.h:
14200 * utils.c:
14201 * Makefile.in:
14202 * configure.ac:
6f0f660e
EZ
14203 * gdbserver.1: Add (C) after Copyright. Update the FSF
14204 address.
14205
9d1fb177
DJ
142062005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14207
14208 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14209 (arm_breakpoint_at): Recognize both breakpoints.
14210 (the_low_target): Use the correct breakpoint instruction.
14211
011a70c2
DJ
142122005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14215 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14216 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14217 (the_low_target): Update.
14218
7fb85e41
AS
142192005-10-25 Andreas Schwab <schwab@suse.de>
14220
14221 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14222
14223 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14224 (ia64_num_regs): Reduce to 462.
14225
3db0444b
DJ
142262005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * acinclude.m4: Correct quoting.
14229 * aclocal.m4: Regenerated.
14230
14231 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14232 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14233 (thread_db_init): Call thread_db_err_str.
14234 * configure.ac: Check for TD_VERSION.
14235 * config.in, configure: Regenerated.
14236
bee0189a
DJ
142372005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14238
14239 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14240
e9d25b98
DJ
142412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14242
14243 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14244 is not available. Define HAVE_PTRACE_GETREGS if it is.
14245 * config.in, configure: Regenerated.
14246 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14247 * linux-i386-low.c, linux-m68k-low.c: Update to use
14248 HAVE_PTRACE_GETREGS.
14249 * linux-low.c (regsets_fetch_inferior_registers)
14250 (regsets_store_inferior_registers): Only return 0 if we processed
14251 GENERAL_REGS.
14252 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14253 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14254
a06660f7
DJ
142552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14256
14257 * inferiors.c (struct thread_info): Add gdb_id.
14258 (add_thread): Add gdb_id argument.
14259 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14260 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14261 calls to add_thread.
14262 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14263 * server.c (handle_query): Use thread_to_gdb_id.
14264 (handle_v_cont, main): Use gdb_id_to_thread_id.
14265 * server.h (add_thread): Update prototype.
14266 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14267 prototypes.
14268
5a1f5858
DJ
142692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14272 left-padded registers.
14273 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14274 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14275
e122f1f5
SE
142762005-07-01 Steve Ellcey <sje@cup.hp.com>
14277
14278 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14279 * configure: Regenerate.
14280 * config.in: Regenerate.
14281 * server.h (NEED_DECLARATION_STRERROR):
14282 Replace with !HAVE_DECL_STRERROR.
14283
d592fa2f
DJ
142842005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * linux-low.c (linux_wait, linux_send_signal): Don't test
14287 an unsigned long variable for > 0 if it could be MAX_ULONG.
14288 * server.c (myresume): Likewise.
14289 * target.c (set_desired_inferior): Likewise.
14290
ccbd4912
MK
142912005-06-13 Mark Kettenis <kettenis@gnu.org>
14292
14293 * configure.ac: Simplify and improve check for socklen_t.
14294 * configure, config.in: Regenerate.
14295
f450004a
DJ
142962005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14297
14298 * acconfig.h: Remove.
14299 * configure.ac: Add a test for socklen_t. Use three-argument
14300 AC_DEFINE throughout.
14301 * config.in: Regenerated using autoheader 2.59.
14302 * configure: Regenerated.
14303
14304 * gdbreplay.c (socklen_t): Provide a default.
14305 (remote_open): Use socklen_t.
14306 * remote-utils.c (socklen_t): Provide a default.
14307 (remote_open): Use socklen_t.
14308 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14309 unsigned char.
14310
14311 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14312 char for buffers.
14313 * linux-low.c (linux_read_memory, linux_write_memory)
14314 (linux_read_auxv): Likewise.
14315 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14316 (check_mem_write): Likewise.
14317 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14318 Likewise.
14319 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14320 (registers_from_string, register_data): Likewise.
14321 * server.c (handle_query, main): Likewise.
14322 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14323 (decode_M_packet): Likewise.
14324 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14325 * target.h (struct target_ops): Update read_memory, write_memory,
14326 and read_auxv.
14327 (read_inferior_memory, write_inferior_memory): Update.
14328 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14329 to unsigned char *.
14330 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14331 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14332 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14333 linux-s390-low.c, linux-sh-low.c: Update for changes in
14334 read_inferior_memory and the_low_target->breakpoint.
14335
eee84df1
DJ
143362005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14339 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14340 * configure.srv: Add powerpc64-*-linux*.
14341 * linux-ppc64-low.c: New file.
14342
45b134e5
OF
143432005-05-23 Orjan Friberg <orjanf@axis.com>
14344
14345 * linux-cris-low.c: New file with support for CRIS.
14346 * linux-crisv32-low.c: Ditto for CRISv32.
14347 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14348 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14349 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14350 reg-crisv32.o, and reg-crisv32.c to make rules.
14351 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14352 recognized targets.
14353
48d93c75
UW
143542005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14355
14356 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14357 of sizeof (PTRACE_XFER_TYPE).
14358 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14359
e013ee27
OF
143602005-05-12 Orjan Friberg <orjanf@axis.com>
14361
889bf7c5 14362 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14363 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14364 pointers for hardware watchpoint support.
14365 * linux-low.h (struct linux_target_ops): Ditto.
14366 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14367 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14368 to linux_target_ops.
14369 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14370 reply packet.
14371 * server.c (main): Recognize 'Z' and 'z' packets.
14372
b0ded00b
UW
143732005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14374
14375 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14376 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14377 (the_low_target): Add new members.
14378
8643e2ad
DJ
143792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14380
14381 * proc-service.c (ps_lgetregs): Search all_processes instead of
14382 all_threads.
14383
fc620387
DJ
143842005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * server.c (start_inferior): Change return type to int.
14387 (attach_inferior): Change sigptr to int *.
14388 (handle_v_cont, handle_v_requests): Change signal to int *.
14389 (main): Change signal to int.
14390
143912005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14392
14393 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14394 * configure.srv: Add m32r*-*-linux*.
14395 * linux-m32r-low.c: New file.
14396
e0e76420
DJ
143972005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14400
a1928bad
DJ
144012005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14404 Take unsigned long arguments for PIDs.
14405 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14406 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14407 (wait_for_sigstop, linux_resume_one_process)
14408 (regsets_fetch_inferior_registers, linux_send_signal)
14409 (linux_read_auxv): Likewise. Update the types of variables holding
14410 PIDs. Update format string specifiers.
14411 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14412 * remote-utils.c (prepare_resume_reply): Likewise.
14413 * server.c (cont_thread, general_thread, step_thread)
14414 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14415 unsigned long.
14416 (handle_query): Update format specifiers.
14417 (handle_v_cont, main): Use strtoul for thread IDs.
14418 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14419 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14420 (general_thread, step_thread, thread_from_wait)
14421 (old_thread_from_wait): Update.
14422 * target.h (struct thread_resume): Use unsigned long for THREAD.
14423 (struct target_ops): Use unsigned long for arguments to attach and
14424 thread_alive.
14425
dcdb98d2
DJ
144262005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * acinclude.m4: Include bfd/bfd.m4 directly.
14429 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14430 <agriffis@toolchain.org>.
14431 * aclocal.m4, configure: Regenerated.
14432
bec39cab
AC
144332005-01-07 Andrew Cagney <cagney@gnu.org>
14434
14435 * configure.ac: Rename configure.in, require autoconf 2.59.
14436 * configure: Re-generate.
14437
434c4c77
DJ
144382004-12-08 Daniel Jacobowitz <dan@debian.org>
14439
14440 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14441 LIBS when finished.
14442 * aclocal.m4: Regenerated.
14443 * configure: Regenerated.
14444
db1d3e1b
AS
144452004-11-21 Andreas Schwab <schwab@suse.de>
14446
14447 * linux-m68k-low.c (m68k_num_gregs): Define.
14448 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14449 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14450 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14451 (m68k_breakpoint_at): New. Add to the_low_target.
14452
14453 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14454 srv_linux_thread_db to yes.
14455
43360365
JB
144562004-10-20 Joel Brobecker <brobecker@gnat.com>
14457
14458 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14459 (ARCH_SET_FS): Likewise.
14460 (ARCH_GET_FS): Likewise.
14461 (ARCH_GET_GS): Likewise.
14462
fd500816
DJ
144632004-10-16 Daniel Jacobowitz <dan@debian.org>
14464
14465 * linux-i386-low.c (ps_get_thread_area): New.
14466 * linux-x86-64-low.c (ps_get_thread_area): New.
14467 * linux-low.c: Include <sys/syscall.h>.
14468 (linux_kill_one_process): Don't kill the first thread here.
14469 (linux_kill): Kill the first thread here.
14470 (kill_lwp): New function.
14471 (send_sigstop, linux_send_signal): Use it.
14472 * proc-service.c: Clean up #ifdefs.
14473 (fpregset_info): Delete.
14474 (ps_lgetregs): Update and enable implementation.
14475 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14476 implementations.
14477 * remote-utils.c (struct sym_cache, symbol_cache): New.
14478 (input_interrupt): Print a clearer message.
14479 (async_io_enabled): New variable.
14480 (enable_async_io, disable_async_io): Use it. Update comments.
14481 (look_up_one_symbol): Use the symbol cache.
14482 * thread-db.c (thread_db_look_up_symbols): New function.
14483 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14484
f6de3c42
DJ
144852004-10-16 Daniel Jacobowitz <dan@debian.org>
14486
14487 * configure.in: Test for -rdynamic.
14488 * configure: Regenerated.
14489 * Makefile (INTERNAL_LDFLAGS): New.
14490 (gdbserver, gdbreplay): Use it.
14491
2c0fc042
AC
144922004-09-02 Andrew Cagney <cagney@gnu.org>
14493
14494 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14495
075b3282
DJ
144962004-03-23 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * linux-low.c (linux_wait): Clear all_processes list also.
14499
fa6a77dc
DJ
145002004-03-12 Daniel Jacobowitz <drow@mvista.com>
14501
14502 * linux-low.c: Include <errno.h>. Remove extern declaration of
14503 errno.
14504
6d782a97
DJ
145052004-03-12 Daniel Jacobowitz <drow@mvista.com>
14506
14507 * gdbreplay.c, server.h, utils.c: Update copyright years.
14508
3a7fb99b
DJ
145092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14510
14511 * server.c (main): Print child status or termination signal from
14512 variable 'signal', not 'sig'.
14513
c3e735a6
DJ
145142004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14515
14516 * linux-low.c (linux_read_memory): Change return type to
14517 int. Check for and return error from ptrace().
14518 * target.c (read_inferior_memory): Change return type to int. Pass
14519 back return status from the_target->read_memory().
14520 * target.h (struct target_ops): Adapt *read_memory() prototype.
14521 Update comment.
14522 (read_inferior_memory): Adapt prototype.
14523 * server.c (main): Return an error packet if
14524 read_inferior_memory() returns an error.
14525
a59d1c82
DJ
145262004-03-04 Daniel Jacobowitz <drow@mvista.com>
14527
14528 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14529 Unify with other clean targets.
14530
dc3f8883
DJ
145312004-02-29 Daniel Jacobowitz <drow@mvista.com>
14532
14533 * server.c (handle_v_cont): Call set_desired_inferior.
14534
89a208da
DJ
145352004-02-29 Daniel Jacobowitz <drow@mvista.com>
14536
14537 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14538
62ea82f5
DJ
145392004-02-29 Daniel Jacobowitz <drow@mvista.com>
14540
14541 * linux-low.c (linux_wait): Unblock async I/O.
14542 (linux_resume): Block and enable async I/O.
14543 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14544 * server.h (block_async_io, unblock_async_io): Add prototypes.
14545
6910d122
DJ
145462004-02-29 Daniel Jacobowitz <drow@mvista.com>
14547
14548 * remote-utils.c (remote_open): Print a status notice after
14549 opening a TCP port.
14550 * server.c (attach_inferior): Print a status notice after
14551 attaching.
14552
145532004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14554
14555 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14556
c89dc5d4
DJ
145572004-02-26 Daniel Jacobowitz <drow@mvista.com>
14558
14559 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14560 error packet.
14561 * server.c, target.h: Update copyright years.
14562
4b8dad4a
RM
145632004-02-25 Roland McGrath <roland@redhat.com>
14564
14565 * target.h (struct target_ops): New member `read_auxv'.
14566 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14567 * linux-low.c (linux_read_auxv): New function.
14568 (linux_target_ops): Initialize `read_auxv' member to that.
14569
d7446758
JB
145702004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14571
14572 Committed by Jim Blandy <jimb@redhat.com>.
14573
14574 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14575 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14576 instead of GPR_SIZE to distiguish s390 and s390x targets.
14577
5544ad89
DJ
145782004-01-31 Daniel Jacobowitz <drow@mvista.com>
14579
14580 * linux-low.c: Update copyright year.
14581 (check_removed_breakpoint): Clear pending_is_breakpoint.
14582 (linux_set_resume_request, linux_queue_one_thread)
14583 (resume_status_pending_p): New functions.
14584 (linux_continue_one_thread): Use process->resume.
14585 (linux_resume): Only resume threads if there are no pending events.
14586 * linux-low.h (struct process_info): Add resume request
14587 pointer.
14588
2a68b70e
DJ
145892004-01-30 Daniel Jacobowitz <drow@mvista.com>
14590
14591 * regcache.c (new_register_cache): Clear the allocated register
14592 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14593
64386c31
DJ
145942003-10-13 Daniel Jacobowitz <drow@mvista.com>
14595
14596 * linux-low.c (linux_resume): Take a struct thread_resume *
14597 argument.
14598 (linux_wait): Update call.
14599 (resume_ptr): New static variable.
14600 (linux_continue_one_thread): Renamed from
14601 linux_continue_one_process. Use resume_ptr.
14602 (linux_resume): Use linux_continue_one_thread.
14603 * server.c (handle_v_cont, handle_v_requests): New functions.
14604 (myresume): New function.
14605 (main): Handle 'v' case.
14606 * target.h (struct thread_resume): New type.
14607 (struct target_ops): Change argument of "resume" to struct
14608 thread_resume *.
14609 (myresume): Delete macro.
14610
c938e9b0
L
146112003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14612
14613 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14614 (uninstall): Support DESTDIR.
14615
7f313d07
BC
14616Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14617
14618 * configure.srv: Add xscale*linux copy of arm*linux entry.
14619
3b2fc2ea
DJ
146202003-07-24 Daniel Jacobowitz <drow@mvista.com>
14621
14622 * linux-arm-low.c (arm_reinsert_addr): New function.
14623 (the_low_target): Add arm_reinsert_addr.
14624
1c0a559e
MK
146252003-07-08 Mark Kettenis <kettenis@gnu.org>
14626
14627 * mem-break.c: Remove whitespace at end of file.
14628
43d5792c
DJ
146292003-06-28 Daniel Jacobowitz <drow@mvista.com>
14630
14631 * configure.in: Check whether we need to prototype strerror.
14632 * server.h: Optionally prototype strerror.
14633 * gdbreplay.c (perror_with_name): Use strerror.
14634 * linux-low.c (linux_attach_lwp): Use strerror.
14635 * utils.c (perror_with_name): Use strerror.
14636 * config.in, configure: Regenerated.
14637
c8a86edf
DJ
146382003-06-28 Daniel Jacobowitz <drow@mvista.com>
14639
14640 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14641 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14642
73d37363
DJ
146432003-06-20 Daniel Jacobowitz <drow@mvista.com>
14644
14645 * Makefile.in (SFILES): Update.
14646 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14647 low-sun3.c: Remove files.
14648
6ad8ae5c
DJ
146492003-06-17 Daniel Jacobowitz <drow@mvista.com>
14650
14651 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14652 (linux_detach_one_process, linux_detach): New functions.
14653 (linux_target_ops): Add linux_detach.
14654 * server.c (main): Handle 'D' packet.
14655 * target.h (struct target_ops): Add "detach" member.
14656 (detach_inferior): Define.
14657
1581182a
MK
146582003-06-13 Mark Kettenis <kettenis@gnu.org>
14659
14660 From Kelley Cook <kelleycook@wideopenwest.com>:
14661 * configure.srv: Accept i[34567]86 variants.
14662
e5379b03
DJ
146632003-06-05 Daniel Jacobowitz <drow@mvista.com>
14664
14665 * linux-low.c (linux_wait_for_event): Correct comment typos.
14666 (linux_resume_one_process): Call check_removed_breakpoint.
14667 (linux_send_signal): New function.
14668 (linux_target_ops): Add linux_send_signal.
14669 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14670 of kill.
14671 * target.h (struct target_ops): Add send_signal.
14672
2ff29de4
JB
146732003-05-29 Jim Blandy <jimb@redhat.com>
14674
14675 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14676 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14677 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14678 away part of the register's value.
14679
254787d4
DJ
146802003-03-26 Daniel Jacobowitz <drow@mvista.com>
14681
14682 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14683 (linux_wait_for_event, linux_init_signals): Likewise.
14684
94e10508
DJ
146852003-03-17 Daniel Jacobowitz <drow@mvista.com>
14686
14687 * configure.in: Check for stdlib.h.
14688 * configure: Regenerated.
14689 * config.in: Regenerated.
14690
4c0711e0
DJ
146912003-01-04 Andreas Schwab <schwab@suse.de>
14692
14693 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14694
ef66e766
AC
146952003-01-02 Andrew Cagney <ac131313@redhat.com>
14696
14697 * Makefile.in: Remove obsolete code.
14698
a1358604
DJ
146992002-11-20 Daniel Jacobowitz <drow@mvista.com>
14700
14701 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14702 defined(PT_FPR0_HI).
14703
23ce3b1c
DJ
147042002-11-17 Stuart Hughes <seh@zee2.com>
14705
14706 * linux-arm-low.c (arm_num_regs): Increase.
14707 (arm_regmap): Include status register.
14708
147092002-11-17 Daniel Jacobowitz <drow@mvista.com>
14710
14711 * linux-low.c (register_addr): Remove incorrect -1 check.
14712
a9fa9f7d
DJ
147132002-08-29 Daniel Jacobowitz <drow@mvista.com>
14714
14715 * linux-low.c (linux_create_inferior): Call setpgid. Return
14716 the new PID.
14717 (unstopped_p, linux_signal_pid): Remove.
14718 (linux_target_ops): Remove linux_signal_pid.
14719 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14720 global instead of target method.
14721 * target.h (struct target_ops): Remove signal_pid. Update comment
14722 for create_inferior.
14723 * server.c (signal_pid): New variable.
14724 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14725 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14726 (attach_inferior): Set signal_pid.
14727
17574093
DJ
147282002-08-23 Daniel Jacobowitz <drow@mvista.com>
14729
14730 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14731
147322002-08-20 Jim Blandy <jimb@redhat.com>
14733
14734 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14735 default for this.
14736
147372002-08-01 Andrew Cagney <cagney@redhat.com>
14738
14739 * Makefile.in: Make chill references obsolete.
14740
147412002-07-24 Kevin Buettner <kevinb@redhat.com>
14742
14743 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14744 * configure: Regenerate.
14745 * config.in: Regenerate.
14746
147472002-07-09 David O'Brien <obrien@FreeBSD.org>
14748
14749 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14750 (perror_with_name, remote_close, remote_open, expect, play): Static.
14751
147522002-07-04 Michal Ludvig <mludvig@suse.cz>
14753
4b8dad4a 14754 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14755 byte offsets instead of an array of indexes.
14756 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14757
147582002-06-13 Daniel Jacobowitz <drow@mvista.com>
14759
14760 * regcache.c: Add comment.
14761
147622002-06-11 Daniel Jacobowitz <drow@mvista.com>
14763
14764 * thread-db.c: New file.
14765 * proc-service.c: New file.
14766 * acinclude.m4: New file.
14767 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14768 proc-service.o, and thread-db.o.
14769 (linux-low.o): Add USE_THREAD_DB.
14770 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14771 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14772 * aclocal.m4: Regenerated.
14773 * config.in: Regenerated.
14774 * configure: Regenerated.
14775 * configure.in: Check for proc_service.h, sys/procfs.h,
14776 thread_db.h, and linux/elf.h headrs.
14777 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14778 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14779 Check for -lthread_db and thread support.
14780 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14781 PowerPC, and SuperH.
14782 * i387-fp.c: Constify arguments.
14783 * i387-fp.h: Likewise.
14784 * inferiors.c: (struct thread_info): Renamed from
14785 `struct inferior_info'. Remove PID member. Use generic inferior
14786 list header. All uses updated.
14787 (inferiors, signal_pid): Removed.
14788 (all_threads): New variable.
14789 (get_thread): Define.
14790 (add_inferior_to_list): New function.
14791 (for_each_inferior): New function.
14792 (change_inferior_id): New function.
14793 (add_inferior): Removed.
14794 (remove_inferior): New function.
14795 (add_thread): New function.
14796 (free_one_thread): New function.
14797 (remove_thread): New function.
14798 (clear_inferiors): Use for_each_inferior and free_one_thread.
14799 (find_inferior): New function.
14800 (find_inferior_id): New function.
14801 (inferior_target_data): Update argument type.
14802 (set_inferior_target_data): Likewise.
14803 (inferior_regcache_data): Likewise.
14804 (set_inferior_regcache_data): Likewise.
14805 * linux-low.c (linux_bp_reinsert): Remove.
14806 (all_processes, stopping_threads, using_thrads)
14807 (struct pending_signals, debug_threads, pid_of): New.
14808 (inferior_pid): Replace with macro.
14809 (struct inferior_linux_data): Remove.
14810 (get_stop_pc, add_process): New functions.
14811 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14812 Use add_process and add_thread.
14813 (linux_attach_lwp): New function, based on old linux_attach. Use
14814 add_process and add_thread. Set stop_expected for new threads.
14815 (linux_attach): New function.
14816 (linux_kill_one_process): New function.
14817 (linux_kill): Kill all LWPs.
14818 (linux_thread_alive): Use find_inferior_id.
14819 (check_removed_breakpoints, status_pending_p): New functions.
14820 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14821 Update. Use WNOHANG. Wait for cloned processes also. Update process
14822 struct for the found process.
14823 (linux_wait_for_event): New function.
14824 (linux_wait): Use it. Support LWPs.
14825 (send_sigstop, wait_for_sigstop, stop_all_processes)
14826 (linux_resume_one_process, linux_continue_one_process): New functions.
14827 (linux_resume): Support LWPs.
14828 (REGISTER_RAW_SIZE): Remove.
14829 (fetch_register): Use register_size instead. Call supply_register.
14830 (usr_store_inferior_registers): Likewise. Call collect_register.
14831 Fix recursive case.
14832 (regsets_fetch_inferior_registers): Improve error message.
14833 (regsets_store_inferior_registers): Add debugging.
14834 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14835 (unstopped_p, linux_signal_pid): New functions.
14836 (linux_target_ops): Add linux_signal_pid.
14837 (linux_init_signals): New function.
14838 (initialize_low): Call it. Initialize using_threads.
14839 * regcache.c (inferior_regcache_data): Add valid
14840 flag.
14841 (get_regcache): Fetch registers lazily. Add fetch argument
14842 and update all callers.
14843 (regcache_invalidate_one, regcache_invalidate): New
14844 functions.
14845 (new_register_cache): Renamed from create_register_cache.
14846 Return the new regcache.
14847 (free_register_cache): Change argument to a void *.
14848 (registers_to_string, registers_from_string): Call get_regcache
14849 with fetch flag set.
14850 (register_data): Make static. Pass fetch flag to get_regcache.
14851 (supply_register): Call get_regcache with fetch flag clear.
14852 (collect_register): Call get_regcache with fetch flag set.
14853 (collect_register_as_string): New function.
14854 * regcache.h: Update.
14855 * remote-utils.c (putpkt): Flush after debug output and use
14856 stderr.
14857 Handle input interrupts while waiting for an ACK.
14858 (input_interrupt): Use signal_pid method.
14859 (getpkt): Flush after debug output and use stderr.
14860 (outreg): Use collect_register_as_string.
14861 (new_thread_notify, dead_thread_notify): New functions.
14862 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14863 and general_thread.
14864 (look_up_one_symbol): Flush after debug output.
14865 * server.c (step_thread, server_waiting): New variables.
14866 (start_inferior): Don't use signal_pid. Update call to mywait.
14867 (attach_inferior): Update call to mywait.
14868 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14869 (main): Don't fetch/store registers explicitly. Use
14870 set_desired_inferior. Support proposed ``Hs'' packet. Update
14871 calls to mywait.
14872 * server.h: Update.
14873 (struct inferior_list, struct_inferior_list_entry): New.
14874 * target.c (set_desired_inferior): New.
14875 (write_inferior_memory): Constify.
14876 (mywait): New function.
14877 * target.h: Update.
14878 (struct target_ops): New signal_pid method.
14879 (mywait): Removed macro, added prototype.
14880
14881 * linux-low.h (regset_func): Removed.
14882 (regset_fill_func, regset_store_func): New.
14883 (enum regset_type): New.
14884 (struct regset_info): Add type field. Use new operation types.
14885 (struct linux_target_ops): stop_pc renamed to get_pc.
14886 Add decr_pc_after_break and breakpoint_at.
14887 (get_process, get_thread_proess, get_process_thread)
14888 (strut process_info, all_processes, linux_attach_lwp)
14889 (thread_db_init): New.
14890
14891 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14892 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14893 (the_low_target): Add new members.
14894 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14895 (i386_store_fpxregset): Constify.
14896 (target_regsets): Add new kind identifier.
14897 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14898 (i386_set_pc): Add debugging.
14899 (i386_breakpoint_at): New function.
14900 (the_low_target): Add new members.
14901 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14902 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14903 (mips_breakpoint_at): New.
14904 (the_low_target): Add new members.
14905 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14906 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14907 (the_low_target): Add new members.
14908 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14909 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14910 (the_low_target): Add new members.
14911 * linux-x86-64-low.c (target_regsets): Add new kind
14912 identifier.
14913
149142002-05-15 Daniel Jacobowitz <drow@mvista.com>
14915
14916 From Martin Pool <mbp@samba.org>:
14917 * server.c (gdbserver_usage): New function.
14918 (main): Call it.
14919
149202002-05-14 Daniel Jacobowitz <drow@mvista.com>
14921
14922 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14923 stop_at -> stop_pc.
14924
149252002-05-04 Andrew Cagney <ac131313@redhat.com>
14926
14927 * Makefile.in: Remove obsolete code.
14928
149292002-04-24 Michal Ludvig <mludvig@suse.cz>
14930
14931 * linux-low.c (regsets_fetch_inferior_registers),
14932 (regsets_store_inferior_registers): Removed cast to int from
14933 ptrace() calls.
14934 * regcache.h: Added declaration of struct inferior_info.
14935
149362002-04-20 Daniel Jacobowitz <drow@mvista.com>
14937
14938 * inferiors.c (struct inferior_info): Add regcache_data.
14939 (add_inferior): Call create_register_cache.
14940 (clear_inferiors): Call free_register_cache.
14941 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14942 * regcache.c (struct inferior_regcache_data): New.
14943 (registers): Remove.
14944 (get_regcache): New function.
14945 (create_register_cache, free_register_cache): New functions.
14946 (set_register_cache): Don't initialize the register cache here.
14947 (registers_to_string, registers_from_string, register_data): Call
14948 get_regcache.
14949 * regcache.h: Add prototypes.
14950 * server.h: Likewise.
14951
149522002-04-20 Daniel Jacobowitz <drow@mvista.com>
14953
14954 * mem-break.c: New file.
14955 * mem-break.h: New file.
14956 * Makefile.in: Add mem-break.o rule; update server.h
14957 dependencies.
14958 * inferiors.c (struct inferior_info): Add target_data
14959 member.
14960 (clear_inferiors): Free target_data member if set.
14961 (inferior_target_data, set_inferior_target_data): New functions.
14962 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14963 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14964 * linux-low.c (linux_bp_reinsert): New variable.
14965 (struct inferior_linux_data): New.
14966 (linux_create_inferior): Use set_inferior_target_data.
14967 (linux_attach): Likewise. Call add_inferior.
14968 (linux_wait_for_one_inferior): New function.
14969 (linux_wait): Call it.
14970 (linux_write_memory): Add const.
14971 (initialize_low): Call set_breakpoint_data.
14972 * linux-low.h (struct linux_target_ops): Add breakpoint
14973 handling members.
14974 * server.c (attach_inferior): Remove extra add_inferior
14975 call.
14976 * server.h: Include mem-break.h. Update inferior.c
14977 prototypes.
14978 * target.c (read_inferior_memory)
14979 (write_inferior_memory): New functions.
14980 * target.h (read_inferior_memory)
14981 (write_inferior_memory): Change macros to prototypes.
14982 (struct target_ops): Update comments. Add const to write_memory
14983 definition.
14984
149852002-04-11 Daniel Jacobowitz <drow@mvista.com>
14986
14987 * linux-low.c (usr_store_inferior_registers): Support
14988 registers which are allowed to fail to store.
14989 * linux-low.h (linux_target_ops): Likewise.
14990 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14991 (ppc_cannot_store_register): FPSCR may not be storable.
14992
149932002-04-09 Daniel Jacobowitz <drow@mvista.com>
14994
14995 * server.h: Include <string.h> if HAVE_STRING_H.
14996 * ChangeLog: Correct paths in last ChangeLog entry.
14997
149982002-04-09 Daniel Jacobowitz <drow@mvista.com>
14999
15000 * linux-low.h: Remove obsolete prototypes.
15001 (struct linux_target_ops): New.
15002 (extern the_low_target): New.
15003 * linux-low.c (num_regs, regmap): Remove declarations.
15004 (register_addr): Use the_low_target explicitly.
15005 (fetch_register): Likewise.
15006 (usr_fetch_inferior_registers): Likewise.
15007 (usr_store_inferior_registers): Likewise.
15008 * linux-arm-low.c (num_regs): Remove.
15009 (arm_num_regs): Define.
15010 (arm_regmap): Renamed from regmap, made static.
15011 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15012 made static.
15013 (arm_cannot_store_register): Renamed from cannot_store_register,
15014 made static.
15015 (the_low_target): New.
15016 * linux-i386-low.c (num_regs): Remove.
15017 (i386_num_regs): Define.
15018 (i386_regmap): Renamed from regmap, made static.
15019 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15020 made static.
15021 (i386_cannot_store_register): Renamed from cannot_store_register,
15022 made static.
15023 (the_low_target): New.
15024 * linux-ia64-low.c (num_regs): Remove.
15025 (ia64_num_regs): Define.
15026 (ia64_regmap): Renamed from regmap, made static.
15027 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15028 made static.
15029 (ia64_cannot_store_register): Renamed from cannot_store_register,
15030 made static.
15031 (the_low_target): New.
15032 * linux-m68k-low.c (num_regs): Remove.
15033 (m68k_num_regs): Define.
15034 (m68k_regmap): Renamed from regmap, made static.
15035 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15036 made static.
15037 (m68k_cannot_store_register): Renamed from cannot_store_register,
15038 made static.
15039 (the_low_target): New.
15040 * linux-mips-low.c (num_regs): Remove.
15041 (mips_num_regs): Define.
15042 (mips_regmap): Renamed from regmap, made static.
15043 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15044 made static.
15045 (mips_cannot_store_register): Renamed from cannot_store_register,
15046 made static.
15047 (the_low_target): New.
15048 * linux-ppc-low.c (num_regs): Remove.
15049 (ppc_num_regs): Define.
15050 (ppc_regmap): Renamed from regmap, made static.
15051 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15052 made static.
15053 (ppc_cannot_store_register): Renamed from cannot_store_register,
15054 made static.
15055 (the_low_target): New.
15056 * linux-s390-low.c (num_regs): Remove.
15057 (s390_num_regs): Define.
15058 (s390_regmap): Renamed from regmap, made static.
15059 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15060 made static.
15061 (s390_cannot_store_register): Renamed from cannot_store_register,
15062 made static.
15063 (the_low_target): New.
15064 * linux-sh-low.c (num_regs): Remove.
15065 (sh_num_regs): Define.
15066 (sh_regmap): Renamed from regmap, made static.
15067 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15068 made static.
15069 (sh_cannot_store_register): Renamed from cannot_store_register,
15070 made static.
15071 (the_low_target): New.
15072 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15073 (the_low_target): New.
15074
150752002-04-09 Daniel Jacobowitz <drow@mvista.com>
15076
15077 * Makefile.in: Add stamp-h target.
15078 * configure.in: Create stamp-h.
15079 * configure: Regenerated.
15080
150812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15082
15083 * inferiors.c: New file.
15084 * target.c: New file.
15085 * target.h: New file.
15086 * Makefile.in: Add target.o and inferiors.o. Update
15087 dependencies.
15088 * linux-low.c (inferior_pid): New static variable,
15089 moved from server.c.
15090 (linux_create_inferior): Renamed from create_inferior.
15091 Call add_inferior. Return 0 on success instead of a PID.
15092 (linux_attach): Renamed from myattach.
15093 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15094 (linux_thread_alive): Renamed from mythread_alive.
15095 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15096 child dies.
15097 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15098 (regsets_store_inferior_registers): Correct error message.
15099 Add missing ``return 0''.
15100 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15101 (linux_store_registers): Renamed from store_inferior_registers.
15102 (linux_read_memory): Renamed from read_inferior_memory.
15103 (linux_write_memory): Renamed from write_inferior_memory.
15104 (linux_target_ops): New structure.
15105 (initialize_low): Call set_target_ops ().
15106 * remote-utils.c (unhexify): New function.
15107 (hexify): New function.
15108 (input_interrupt): Send signals to ``signal_pid''.
15109 * server.c (inferior_pid): Remove.
15110 (start_inferior): Update create_inferior call.
15111 (attach_inferior): Call add_inferior.
15112 (handle_query): New function.
15113 (main): Call handle_query for `q' packets.
15114 * server.h: Include "target.h". Remove obsolete prototypes.
15115 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15116
151172002-04-09 Daniel Jacobowitz <drow@mvista.com>
15118
15119 * Makefile.in: Add WARN_CFLAGS. Update configury
15120 dependencies.
15121 * configure.in: Check for <string.h>
15122 * configure: Regenerate.
15123 * config.in: Regenerate.
15124 * gdbreplay.c: Include needed system headers.
15125 (remote_open): Remove strchr prototype.
15126 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15127 * regcache.c (supply_register): Change buf argument to const void *.
15128 (supply_register_by_name): Likewise.
15129 (collect_register): Change buf argument to void *.
15130 (collect_register_by_name): Likewise.
15131 * regcache.h: Add missing prototypes.
15132 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15133 * server.c (handle_query): New function.
15134 (attached): New static variable, moved out of main.
15135 (main): Quiet longjmp clobber warnings.
15136 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15137 * utils.c (error): Remove NORETURN.
15138 (fatal): Likewise.
This page took 1.916052 seconds and 4 git commands to generate.