]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Use '::iterator' instead of '::const_iterator' on environ.c (and fix breakage on...
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
9a6c7d9c
SDJ
12017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * linux-low.c (linux_create_inferior): Adjust code to access the
4 environment information via 'gdb_environ' class.
5 * lynx-low.c (lynx_create_inferior): Likewise.
6 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7 (get_environ): Return a pointer to 'our_environ'.
8 (captured_main): Initialize 'our_environ'.
9 * server.h (get_environ): Adjust prototype.
10 * spu-low.c (spu_create_inferior): Adjust code to access the
11 environment information via 'gdb_environ' class.
12
ae3e2ccf
SM
132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
14
15 * linux-low.c (linux_read_memory, linux_write_memory): Remove
16 usage of "register" keyword.
17
3e019bdc
SM
182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
19
20 * configure: Re-generate.
21
8465943a
SM
222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
23
24 * configure: Re-generate.
25
cf0dd6f0
SM
262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
27
28 * Makefile.in (COMPILE.pre): Add "-x c++".
29
9845682b
SDJ
302017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
31
32 * fork-child.c: Conditionally include <signal.h>.
33
aefd8b33
SDJ
342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
35
36 * server.c (handle_general_set): Handle new packet
37 "QStartupWithShell".
38 (handle_query): Add "QStartupWithShell" to the list of supported
39 packets.
40 (gdbserver_usage): Add help text explaining the
41 new "--startup-with-shell" and "--no-startup-with-shell" CLI
42 options.
43 (captured_main): Recognize and act upon the presence of the new
44 CLI options.
45
2090129c
SDJ
462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
47 Pedro Alves <palves@redhat.com>
48
49 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
50 * configure: Regenerate.
51 * configure.srv (srv_linux_obj): Add "fork-child.o" and
52 "fork-inferior.o".
53 (i[34567]86-*-lynxos*): Likewise.
54 (spu*-*-*): Likewise.
55 * fork-child.c: New file.
56 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
57 and "environ.h".
58 (linux_ptrace_fun): New function.
59 (linux_create_inferior): Adjust function prototype to reflect
60 change on "target.h". Adjust function code to use
61 "fork_inferior".
62 (linux_request_interrupt): Delete "signal_pid".
63 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
64 (lynx_ptrace_fun): New function.
65 (lynx_create_inferior): Adjust function prototype to reflect
66 change on "target.h". Adjust function code to use
67 "fork_inferior".
68 * nto-low.c (nto_create_inferior): Adjust function prototype and
69 code to reflect change on "target.h". Update comments.
70 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
71 "common-terminal.h" and "environ.h".
72 (terminal_fd): Moved to fork-child.c.
73 (old_foreground_pgrp): Likewise.
74 (restore_old_foreground_pgrp): Likewise.
75 (last_status): Make it global.
76 (last_ptid): Likewise.
77 (our_environ): New variable.
78 (startup_with_shell): Likewise.
79 (program_name): Likewise.
80 (program_argv): Rename to...
81 (program_args): ...this.
82 (wrapper_argv): New variable.
83 (start_inferior): Delete function.
84 (get_exec_wrapper): New function.
85 (get_exec_file): Likewise.
86 (get_environ): Likewise.
87 (prefork_hook): Likewise.
88 (post_fork_inferior): Likewise.
89 (postfork_hook): Likewise.
90 (postfork_child_hook): Likewise.
91 (handle_v_run): Update code to deal with arguments coming from the
92 remote host. Update calls from "start_inferior" to
93 "create_inferior".
94 (captured_main): Likewise. Initialize environment variable. Call
95 "have_job_control".
96 * server.h (post_fork_inferior): New prototype.
97 (get_environ): Likewise.
98 (last_status): Declare.
99 (last_ptid): Likewise.
100 (signal_pid): Likewise.
101 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
102 (spu_ptrace_fun): New function.
103 (spu_create_inferior): Adjust function prototype to reflect change
104 on "target.h". Adjust function code to use "fork_inferior".
105 * target.c (target_terminal_init): New function.
106 (target_terminal_inferior): Likewise.
107 (target_terminal_ours): Likewise.
108 * target.h: Include <vector>.
109 (struct target_ops) <create_inferior>: Update prototype.
110 (create_inferior): Update macro.
111 * utils.c (gdb_flush_out_err): New function.
112 * win32-low.c (win32_create_inferior): Adjust function prototype
113 and code to reflect change on "target.h".
114
043a4934
SDJ
1152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
116
117 * inferiors.c (switch_to_thread): New function.
118
15652511
SDJ
1192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
120
121 * Makefile.in (SFILE): Add "common/job-control.c".
122 (OBS): Add "job-control.o".
123
21ea5acd
SDJ
1242017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
125
126 * Makefile: Remove "@host_makefile_frag@".
127
e13cb306
PA
1282017-05-05 Pedro Alves <palves@redhat.com>
129
130 * configure: Regenerate.
131
c94fee56
SDJ
1322017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
133
134 * configure: Regenerate.
135
a0ff9e1a
SM
1362017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
137
138 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
139 software_single_step change of return type to
140 std::vector<CORE_ADDR>.
141 * linux-low.c (install_software_single_step_breakpoints):
142 Likewise.
143 * linux-low.h (install_software_single_step_breakpoints):
144 Likewise.
145
be628ab8
SDJ
1462017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
147
148 * remote-utils.c: Include "gdb_termios.h" instead of
149 "terminal.h".
150 * terminal.h: Delete file.
151
7c5ded6a
SDJ
1522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
153
154 * server.c: Include <vector>.
155 <program_argv, wrapper_argv>: Convert to std::vector.
156 (start_inferior): Rewrite function to use C++.
157 (handle_v_run): Likewise. Update code that calculates the argv
158 based on the vRun packet; use C++.
159 (captured_main): Likewise.
160
436252de
SM
1612017-04-06 Simon Marchi <simon.marchi@ericsson.com>
162
163 * server.c (handle_v_cont): Initialize thread_resume::thread
164 with null_ptid.
165
9bf2a700
PA
1662017-04-05 Pedro Alves <palves@redhat.com>
167
168 * configure: Regenerate.
169
a121b7c1
PA
1702017-04-05 Pedro Alves <palves@redhat.com>
171
172 * gdbreplay.c (sync_error): Constify.
173 * linux-x86-low.c (push_opcode): Constify.
174
21c8a587
PA
1752017-04-05 Pedro Alves <palves@redhat.com>
176
177 * win32-low.c (get_child_debug_event)
178 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
179 Report TARGET_WAITKIND_SPURIOUS instead.
180
fb32b4f7
PA
1812017-04-05 Pedro Alves <palves@redhat.com>
182
183 * remote-utils.c (remote_prepare, remote_open): Constify.
184 * remote-utils.h (remote_prepare, remote_open): Constify.
185 * server.c (captured_main): Constify 'port' handling.
186
65dd1e59
SM
1872017-04-04 Simon Marchi <simon.marchi@ericsson.com>
188
189 * Makefile.in (clean): Clear .deps.
190
8fa5b777
SM
1912017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
192
193 * .gitignore: Remove generated files, replace with wildcard.
194 * (clean): Replace removal of generated files with wildcard.
195 (version.c): Replace with...
196 (version-generated.c): ...this.
197 (xml-builtin.c): Replace with...
198 (xml-builtin-generated.c): ...this.
199 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
200 (%.c: *regformats*): Replace with...
201 (%-generated.c: *regformats*): ...this.
202
a12e714b
MF
2032017-03-27 Max Filippov <jcmvbkbc@gmail.com>
204
205 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
206 (xtensa_fill_gregset): Call collect_register_by_name for
207 threadptr register.
208 (xtensa_store_gregset): Call supply_register_by_name for
209 threadptr register.
210
1a09b50a
MF
2112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
212
213 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
214 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
215 (xtensa_store_gregset): Call supply_register for all registers in
216 a0_regnum..a0_regnum + C0_NREGS range.
217
1a01e7c6
SM
2182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
219
220 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
221 (ax-ipa.o: ax.c): Remove.
222 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
223 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
224 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
225 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
226 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
227
36bc18a8
SM
2282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
231 (print-utils-ipa.o: ../common/print-utils.c): Remove.
232 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
233 (errors-ipa.o: ../common/errors.c): Remove.
234 (format-ipa.o: ../common/format.c): Remove.
235 (common-utils-ipa.o: ../common/common-utils.c): Remove.
236
a8ebe3d5
SM
2372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
238
239 * Makefile.in (%-ipa.o: %.c): New rule.
240 (tracepoint-ipa.o: tracepoint.c): Remove.
241 (utils-ipa.o: utils.c): Remove.
242 (remote-utils-ipa.o: remote-utils.c): Remove.
243 (regcache-ipa.o: regcache.c): Remove.
244 (i386-linux-ipa.o: i386-linux.c): Remove.
245 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
246 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
247 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
248 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
249 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
250 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
251 (amd64-linux-ipa.o: amd64-linux.c): Remove.
252 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
253 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
254 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
255 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
256 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
257 (aarch64-ipa.o: aarch64.c): Remove.
258 (s390-linux32-ipa.o: s390-linux32.c): Remove.
259 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
260 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
261 (s390-linux64-ipa.o: s390-linux64.c): Remove.
262 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
263 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
264 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
265 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
266 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
267 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
268 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
269 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
270 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
271 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
272 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
273 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
274 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
275 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
276 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
277 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
278 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
279 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
280 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
281 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
282 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
283 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
284 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
285 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
286 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
287 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
288 (tdesc-ipa.o: tdesc.c): Remove.
289 (x32-linux-ipa.o: x32-linux.c): Remove.
290 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
291 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
292
50cfacb7
SM
2932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * Makefile.in (%.o: ../arch/%.c): New rule.
296 (arm.o: ../arch/arm.c): Remove.
297 (arm-linux.o: ../arch/arm-linux.c): Remove.
298 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
299 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
300
c5a22423
SM
3012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
302
303 * Makefile.in (%.o: ../nat/%.c): New rule.
304 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
305 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
306 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
307 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
308 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
309 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
310 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
311 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
312 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
313 (linux-personality.o: ../nat/linux-personality.c): Remove.
314 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
315 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
316 (x86-linux.o: ../nat/x86-linux.c): Remove.
317 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
318 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
319
6bda016b
SM
3202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
321
322 * Makefile.in (%.o: ../common/%.c): New rule.
323 (signals.o: ../common/signals.c): Remove.
324 (print-utils.o: ../common/print-utils.c): Remove.
325 (rsp-low.o: ../common/rsp-low.c): Remove.
326 (common-utils.o: ../common/common-utils.c): Remove.
327 (posix-strerror.o: ../common/posix-strerror.c): Remove.
328 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
329 (vec.o: ../common/vec.c): Remove.
330 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
331 (xml-utils.o: ../common/xml-utils.c): Remove.
332 (ptid.o: ../common/ptid.c): Remove.
333 (buffer.o: ../common/buffer.c): Remove.
334 (format.o: ../common/format.c): Remove.
335 (filestuff.o: ../common/filestuff.c): Remove.
336 (agent.o: ../common/agent.c): Remove.
337 (errors.o: ../common/errors.c): Remove.
338 (environ.o: ../common/environ.c): Remove.
339 (common-debug.o: ../common/common-debug.c): Remove.
340 (cleanups.o: ../common/cleanups.c): Remove.
341 (common-exceptions.o: ../common/common-exceptions.c): Remove.
342 (fileio.o: ../common/fileio.c): Remove.
343 (common-regcache.o: ../common/common-regcache.c): Remove.
344 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
345 (new-op.o: ../common/new-op.c): Remove.
346 (btrace-common.o: ../common/btrace-common.c): Remove.
347
21122961
SM
3482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
349
350 * Makefile.in (%.o: ../target/%.c): New rule.
351 (waitstatus.o: ../target/waitstatus.c): Remove.
352
c362e621
SM
3532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * Makefile.in
356 (%.c: ../regformats/%.dat,
357 (%.c: ../regformats/arm/%.dat,
358 (%.c: ../regformats/i386/%.dat,
359 (%.c: ../regformats/rs6000/%.dat): New rules.
360 (aarch64.c): Remove.
361 (reg-arm.c): Remove.
362 (arm-with-iwmmxt.c): Remove.
363 (arm-with-vfpv2.c): Remove.
364 (arm-with-vfpv3.c): Remove.
365 (arm-with-neon.c): Remove.
366 (reg-bfin.c): Remove.
367 (reg-cris.c): Remove.
368 (reg-crisv32.c): Remove.
369 (i386.c): Remove.
370 (i386-linux.c): Remove.
371 (i386-avx.c): Remove.
372 (i386-avx-linux.c): Remove.
373 (i386-avx-avx512.c): Remove.
374 (i386-avx-avx512-linux.c): Remove.
375 (i386-mpx.c): Remove.
376 (i386-mpx-linux.c): Remove.
377 (i386-avx-mpx-avx512-pku.c): Remove.
378 (i386-avx-mpx-avx512-pku-linux.c): Remove.
379 (i386-avx-mpx.c): Remove.
380 (i386-avx-mpx-linux.c): Remove.
381 (i386-mmx.c): Remove.
382 (i386-mmx-linux.c): Remove.
383 (reg-ia64.c): Remove.
384 (reg-m32r.c): Remove.
385 (reg-m68k.c): Remove.
386 (reg-cf.c): Remove.
387 (mips-linux.c): Remove.
388 (mips-dsp-linux.c): Remove.
389 (mips64-linux.c): Remove.
390 (mips64-dsp-linux.c): Remove.
391 (nios2-linux.c): Remove.
392 (powerpc-32.c): Remove.
393 (powerpc-32l.c): Remove.
394 (powerpc-altivec32l.c): Remove.
395 (powerpc-cell32l.c): Remove.
396 (powerpc-vsx32l.c): Remove.
397 (powerpc-isa205-32l.c): Remove.
398 (powerpc-isa205-altivec32l.c): Remove.
399 (powerpc-isa205-vsx32l.c): Remove.
400 (powerpc-e500l.c): Remove.
401 (powerpc-64l.c): Remove.
402 (powerpc-altivec64l.c): Remove.
403 (powerpc-cell64l.c): Remove.
404 (powerpc-vsx64l.c): Remove.
405 (powerpc-isa205-64l.c): Remove.
406 (powerpc-isa205-altivec64l.c): Remove.
407 (powerpc-isa205-vsx64l.c): Remove.
408 (s390-linux32.c): Remove.
409 (s390-linux32v1.c): Remove.
410 (s390-linux32v2.c): Remove.
411 (s390-linux64.c): Remove.
412 (s390-linux64v1.c): Remove.
413 (s390-linux64v2.c): Remove.
414 (s390-te-linux64.c): Remove.
415 (s390-vx-linux64.c): Remove.
416 (s390-tevx-linux64.c): Remove.
417 (s390x-linux64.c): Remove.
418 (s390x-linux64v1.c): Remove.
419 (s390x-linux64v2.c): Remove.
420 (s390x-te-linux64.c): Remove.
421 (s390x-vx-linux64.c): Remove.
422 (s390x-tevx-linux64.c): Remove.
423 (tic6x-c64xp-linux.c): Remove.
424 (tic6x-c64x-linux.c): Remove.
425 (tic6x-c62x-linux.c): Remove.
426 (reg-sh.c): Remove.
427 (reg-sparc64.c): Remove.
428 (reg-spu.c): Remove.
429 (amd64.c): Remove.
430 (amd64-linux.c): Remove.
431 (amd64-avx.c): Remove.
432 (amd64-avx-linux.c): Remove.
433 (amd64-avx-avx512.c): Remove.
434 (amd64-avx-avx512-linux.c): Remove.
435 (amd64-mpx.c): Remove.
436 (amd64-mpx-linux.c): Remove.
437 (amd64-avx-mpx-avx512-pku.c): Remove.
438 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
439 (amd64-avx-mpx.c): Remove.
440 (amd64-avx-mpx-linux.c): Remove.
441 (x32.c): Remove.
442 (x32-linux.c): Remove.
443 (x32-avx.c): Remove.
444 (x32-avx-linux.c): Remove.
445 (x32-avx-avx512.c): Remove.
446 (x32-avx-avx512-linux.c): Remove.
447 (reg-xtensa.c): Remove.
448 (reg-tilegx.c): Remove.
449 (reg-tilegx32.c): Remove.
450
1672e0d9
SDJ
4512017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
452
453 * Makefile.in (SFILES): Add "common/environ.c".
454 (OBJS): Add "common/environ.h".
455
239b6d10
WT
4562017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
457
458 * configure.ac: Check if the fs_base and gs_base members of
459 `struct user_regs_struct' exist.
460 * config.in: Regenerated.
461 * configure: Likewise.
462
694b382c
AT
4632017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
464
465 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
466 target_read_memory.
467 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
468 (get_next_pcs_syscall_next_pc): Likewise.
469
7dc53023
LM
4702016-12-23 Luis Machado <lgustavo@codesourcery.com>
471
472 * win32-i386-low.c: Fix incorrect reference to a couple source files.
473 * nto-x86-low.c: Likewise.
474
ad02e4fe
SM
4752016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
476
477 * Makefile.in: Include disable-implicit-rules.mk.
478
dcb07cfa
PA
4792016-11-23 Pedro Alves <palves@redhat.com>
480
481 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
482 (debug_vprintf): Use std::chrono::steady_clock instead of
483 gettimeofday. Use '.' instead of ':'.
484 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
485 (get_timestamp): Use std::chrono::steady_clock instead of
486 gettimeofday.
487
8629c02c
SM
4882016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
489
490 * Makefile.in: Fix whitespace formatting.
491
b593ecca
SM
4922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
493
494 * Makefile.in (SFILES, OBS): Flatten list and order
495 alphabetically.
496
9986ba08
PA
4972016-11-23 Pedro Alves <palves@redhat.com>
498
499 * event-loop.c (handle_file_event): Use warning.
500 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
501 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
502 Use warning.
503
4eefa7bc
PA
5042016-11-23 Pedro Alves <palves@redhat.com>
505
506 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
507 output.
508 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
509 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
510 debug_printf and debug_flush for debug output.
511 * server.c (handle_general_set): Likewise.
512 * thread-db.c (try_thread_db_load): Use debug_printf for debug
513 output.
514
5443506e
SM
5152016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
516
517 * Makefile.in (.c.o): Replace rule with ...
518 (%.o: %.c): ... this one.
519
3b165252
SM
5202016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
521
522 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
523 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
524 make.
525 * configure.ac: Remove checks for the make program.
526 * configure: Re-generate.
527
0bcda685
PA
5282016-10-28 Pedro Alves <palves@redhat.com>
529
530 * Makefile.in (CXX_DIALECT): Get from configure.
531 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
532 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
533 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
534 * config.in: Regenerate.
535 * configure: Regenerate.
536
c3805894
YQ
5372016-10-27 Yao Qi <yao.qi@linaro.org>
538
539 * linux-low.c (linux_supports_range_stepping): Return true if
540 can_software_single_step return true.
541
89342618
YQ
5422016-10-27 Yao Qi <yao.qi@linaro.org>
543
544 * inferiors.c (find_inferior_in_random): New function.
545 * inferiors.h (find_inferior_in_random): Declare.
546 * linux-low.c (linux_wait_for_event_filtered): Call
547 find_inferior_in_random instead of find_inferior.
548
e3652c84
YQ
5492016-10-27 Yao Qi <yao.qi@linaro.org>
550
551 * linux-low.c (linux_wait_1): If single-step breakpoints are
552 inserted, remove them.
553
5a04c4cf
PA
5542016-10-26 Pedro Alves <palves@redhat.com>
555
556 * linux-low.c (handle_extended_wait): Link parent/child fork
557 threads.
558 (linux_wait_1): Unlink them.
559 (linux_set_resume_request): Ignore resume requests for
560 already-resumed and unhandled fork child threads.
561 * linux-low.h (struct lwp_info) <fork_relative>: New field.
562 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
563 New functions.
564 (handle_v_requests) <vCont>: Don't call require_running.
565 * server.h (in_queued_stop_replies): New declaration.
566
cb93dc7f
YQ
5672016-10-24 Yao Qi <yao.qi@linaro.org>
568
569 PR server/20733
570 * linux-aarch64-low.c (append_insns): Cast the return value to
571 'uint32_t *'.
572
a1078bea
YQ
5732016-10-10 Yao Qi <yao.qi@linaro.org>
574
575 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
576
1fb77080
SDJ
5772016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
578
579 * target.c (target_supports_multi_process): New function, moved
580 from...
581 * target.h (target_supports_multi_process): ... here. Remove
582 macro.
583
39b5a3b9
TT
5842016-10-05 Tom Tromey <tom@tromey.com>
585
586 PR remote/20655:
587 * tracepoint.c (handle_tracepoint_bkpts): Check
588 ipa_error_tracepoint, not ipa_stopping_tracepoint.
589
c1d0b70a
YQ
5902016-10-05 Yao Qi <yao.qi@linaro.org>
591
592 * configure.srv: Update the path of arm-*.xml files.
593
0a69eedb
YQ
5942016-10-05 Terry Guo <terry.guo@arm.com>
595 Yao Qi <yao.qi@linaro.org>
596
597 * Makefile.in: Adjust the path of rules.
598 * configure.srv: Update the path of xml files.
599 * regformats/arm-with-iwmmxt.dat: Regenerated.
600 * regformats/arm-with-neon.dat: Likewise.
601 * regformats/arm-with-vfpv2.dat: Likewise.
602 * regformats/arm-with-vfpv3.dat Likewise.
603
17e16485
YQ
6042016-09-30 Yao Qi <yao.qi@linaro.org>
605
606 PR gdbserver/20627
607 * target.c (target_stop_and_wait): Don't call
608 target_continue_no_signal, use resume_stop instead.
609
edeeb602
YQ
6102016-09-26 Yao Qi <yao.qi@linaro.org>
611
612 * linux-low.c (linux_wait_1): Call debug_exit.
613
503b1c39
PA
6142016-09-23 Pedro Alves <palves@redhat.com>
615
616 * Makefile.in (SFILES): Add common/new-op.c.
617 (OBS): Add common/new-op.o.
618 (new-op.o): New rule.
619
74172ecf
SM
6202016-09-21 Simon Marchi <simon.marchi@ericsson.com>
621
622 * .gitinore: Ignore more files.
623
fc6cda2e
YQ
6242016-09-21 Yao Qi <yao.qi@linaro.org>
625
626 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
627 23.
628
bc1e6c81
SDJ
6292016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
630
631 * server.c (start_inferior): Call target_mourn_inferior instead of
632 mourn_inferior; pass ptid_t argument to it.
633 (resume): Likewise.
634 (handle_target_event): Likewise.
635 * target.c (target_mourn_inferior): New function.
636 * target.h (mourn_inferior): Delete macro.
637
0e00e962
AA
6382016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
639
640 * linux-low.c (lwp_is_stepping): New function.
641
1d8cb77d
CL
6422016-09-06 Carl Love <cel@us.ibm.com>
643
644 * server.c (start_inferior): Fixed comment, requested comment change
645 didn't get updated correctly. Removed reference to ptrace () call as
646 it is only true on Linux systems.
647
7313bced
CL
6482016-09-06 Carl Love <cel@us.ibm.com>
649
650 * server.c (start_inferior): Do not call
651 function target_post_create_inferior () if the
652 inferior process has already exited.
653
cf6de44d
PA
6542016-09-05 Pedro Alves <palves@redhat.com>
655
656 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
657 (COMPILE.pre, CC_LD): Use CXX directly.
658 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
659 * acinclude.m4: Don't include build-with-cxx.m4.
660 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
661 * configure: Regenerate.
662
c1da6748
AT
6632016-09-02 Akash Trehan <akash.trehan123@gmail.com>
664
665 PR gdb/19495
666 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
667 call writing data to own_buf.
668
f2b9e3df
SDJ
6692016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
670
671 * target.c (mywait): Call target_wait instead of
672 the_target->wait.
673 (target_wait): New function.
674
049a8570
SDJ
6752016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
676
677 * server.c (start_inferior): New variable 'ptid'. Replace calls
678 to the_target->resume by target_continue{,_no_signal}, depending
679 on the case.
680 * target.c (target_stop_and_wait): Call target_continue_no_signal
681 instead of the_target->resume.
682 (target_continue): New function.
683
3aa5cfa0
AT
6842016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
685
686 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
687
754653a7
AZ
6882016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
689
690 PR server/20491
691 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
692 ps_prochandle.
693 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
694 * linux-arm-low.c (ps_get_thread_area): Likewise.
695 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
696 * linux-m68k-low.c (ps_get_thread_area): Likewise.
697 * linux-mips-low.c (ps_get_thread_area): Likewise.
698 * linux-nios2-low.c (ps_get_thread_area): Likewise.
699 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
700 * linux-x86-low.c (ps_get_thread_area): Likewise.
701 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
702
ed036b40
PA
7032016-08-19 Pedro Alves <palves@redhat.com>
704
705 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
706
c8ef42ee
PA
7072016-08-19 Pedro Alves <palves@redhat.com>
708
709 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
710 comment. Use memcpy instead of casting through unsigned long.
711
9c235a72
PA
7122016-08-19 Pedro Alves <palves@redhat.com>
713
714 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
715 allocating around 0x80000000.
716
201506da
PA
7172016-08-19 Pedro Alves <palves@redhat.com>
718
719 PR gdb/20415
720 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
721 (x32-avx512-linux-ipa.o): New rules.
722 * configure.ac (x86_64-*-linux*): New x32 check.
723 * configure.srv (ipa_x32_linux_regobj): New.
724 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
725 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
726 descriptions.
727 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
728 descriptions.
729 * configure: Regenerate.
730
f348d89a
PA
7312016-08-09 Pedro Alves <palves@redhat.com>
732
733 PR gdb/18653
734 * Makefile.in (OBS): Add signals-state-save-restore.o.
735 (signals-state-save-restore.o): New rule.
736 * config.in: Regenerate.
737 * configure: Regenerate.
738 * linux-low.c: Include "signals-state-save-restore.h".
739 (linux_create_inferior): Call
740 restore_original_signals_state.
741 * server.c: Include "dispositions-save-restore.h".
742 (captured_main): Call save_original_signals_state.
743
1baf5149
PA
7442016-08-05 Pedro Alves <palves@redhat.com>
745
746 * configure: Regenerate.
747
fcd4a73d
YQ
7482016-08-04 Yao Qi <yao.qi@linaro.org>
749
750 * linux-low.c (regsets_fetch_inferior_registers): Check
751 errno is ESRCH or not.
752
979659d0
YQ
7532016-08-02 Yao Qi <yao.qi@linaro.org>
754
755 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
756 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
757 (thread_db_load_search): Update.
758 (try_thread_db_load_1): Don't look for td_ta_event_addr,
759 td_ta_set_event and td_ta_event_getmsg.
760
6598661d
PA
7612016-07-26 Pedro Alves <palves@redhat.com>
762
763 PR server/20414
764 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
765 of unsigned long for 64-bit registers and use uint32_t instead of
766 unsigned int for 32-bit registers.
767
9cf12d57
PA
7682016-07-26 Pedro Alves <palves@redhat.com>
769
770 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
771 to 'ptrace'.
772
305450ed
TT
7732016-07-21 Tom Tromey <tom@tromey.com>
774
775 * configure: Rebuild.
776
2583da7c
YQ
7772016-07-21 Yao Qi <yao.qi@linaro.org>
778
779 * mem-break.c (find_gdb_breakpoint): Cast bp to
780 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
781
21536b36
YQ
7822016-07-21 Yao Qi <yao.qi@linaro.org>
783
784 * server.c (handle_v_requests): Support s and S actions
785 if target_supports_software_single_step return true.
786
8901d193
YQ
7872016-07-21 Yao Qi <yao.qi@linaro.org>
788
789 * linux-low.c (resume_stopped_resumed_lwps): If resume request
790 is resume_step, call maybe_hw_step.
791 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
792 and unstop them.
793 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
794 breakpoints or not.
795 (proceed_one_lwp): If resume request is resume_step, install
796 reinsert breakpoints and call maybe_hw_step.
797
0e9a339e
YQ
7982016-07-21 Yao Qi <yao.qi@linaro.org>
799
800 * linux-low.c (proceed_one_lwp): Declare.
801 (linux_resume_one_thread): Remove local variable 'step'.
802 Lift code enqueue signal. Call proceed_one_lwp instead of
803 linux_resume_one_lwp.
804
4281b351
YQ
8052016-07-21 Yao Qi <yao.qi@linaro.org>
806
807 * linux-low.c (linux_resume_one_thread): Call
808 enqueue_pending_signal.
809
984a2c04
YQ
8102016-07-21 Yao Qi <yao.qi@linaro.org>
811
812 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
813 * inferiors.c (do_restore_current_thread_cleanup): New function.
814 (make_cleanup_restore_current_thread): Likewise.
815 * linux-low.c (install_software_single_step_breakpoints): Call
816 make_cleanup_restore_current_thread. Switch current_thread to
817 thread.
818
bec903c9
YQ
8192016-07-21 Yao Qi <yao.qi@linaro.org>
820
821 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
822 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
823 (clone_one_breakpoint): Likewise.
824 (delete_reinsert_breakpoints): Change parameter to thread.
825 Callers updated.
826 (has_reinsert_breakpoints): Likewise.
827 (uninsert_reinsert_breakpoints): Likewise.
828 (reinsert_reinsert_breakpoints): Likewise.
829 * mem-break.h (set_reinsert_breakpoint): Update declaration.
830 (delete_reinsert_breakpoints): Likewise.
831 (reinsert_reinsert_breakpoints): Likewise.
832 (uninsert_reinsert_breakpoints): Likewise.
833 (has_reinsert_breakpoints): Likewise.
834
63c40ec7
YQ
8352016-07-21 Yao Qi <yao.qi@linaro.org>
836
837 * inferiors.c (get_thread_process): Make parameter const.
838 * inferiors.h (get_thread_process): Update declaration.
839 * mem-break.c (clone_all_breakpoints): Remove all parameters.
840 Add new parameters child_thread and parent_thread. Callers
841 updated.
842 * mem-break.h (clone_all_breakpoints): Update declaration.
843
9aa76cd0
YQ
8442016-07-21 Yao Qi <yao.qi@linaro.org>
845
846 * mem-break.c (struct breakpoint) <cond_list>: Remove.
847 <command_list, handler>: Remove.
848 (struct gdb_breakpoint): New.
849 (struct other_breakpoint): New.
850 (struct reinsert_breakpoint): New.
851 (is_gdb_breakpoint): New function.
852 (any_persistent_commands): Update command_list if
853 is_gdb_breakpoint returns true.
854 (set_breakpoint): Create breakpoints according to their types.
855 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
856 (set_gdb_breakpoint_1): Likewise.
857 (set_gdb_breakpoint): Likewise.
858 (clear_breakpoint_conditions): Change parameter type to
859 'struct gdb_breakpoint *'.
860 (clear_breakpoint_commands): Likewise.
861 (clear_breakpoint_conditions_and_commands): Likewise.
862 (add_condition_to_breakpoint): Likewise.
863 (add_breakpoint_condition): Likewise.
864 (add_commands_to_breakpoint): Likewise.
865 (check_breakpoints): Check other_breakpoint.
866 (clone_one_breakpoint): Clone breakpopint according to its type.
867 * mem-break.h (struct gdb_breakpoint): Declare.
868 (set_gdb_breakpoint): Update declaration.
869 (clear_breakpoint_conditions_and_commands): Likewise.
870 (add_breakpoint_condition): Likewise.
871 (add_breakpoint_commands): Likewise.
872 * server.c (process_point_options): Change parameter type to
873 'struct gdb_breakpoint *'.
874
811f8301
YQ
8752016-07-21 Yao Qi <yao.qi@linaro.org>
876
877 * mem-break.c (set_breakpoint_at): Rename it to ...
878 (set_breakpoint_type_at): ... it.
879 (set_breakpoint_at): Call set_breakpoint_type_at.
880 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
881 * mem-break.h (set_breakpoint_at): Update comments.
882
b1c51e36
CLT
8832016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
884
885 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
886 to buf parameter.
887 (nios2_store_gregset): Likewise.
888
ced2dffb
PA
8892016-07-01 Pedro Alves <palves@redhat.com>
890 Antoine Tremblay <antoine.tremblay@ericsson.com>
891
892 * linux-low.c: Change interface to take the target lwp_info
893 pointer directly and return void. Handle detaching from a zombie
894 thread.
895 (linux_detach_lwp_callback): New function.
896 (linux_detach): Detach from the leader thread after detaching from
897 the clone threads.
898
2ac09a5b
YQ
8992016-06-28 Yao Qi <yao.qi@linaro.org>
900
901 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
902 for variable new_offset.
903 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
904 (aarch64_ftrace_insn_reloc_cb): Likewise.
905 (aarch64_ftrace_insn_reloc_tb): Likewise.
906 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
907 PRIx64 instead of PRIx32.
908
79e7fd4f
YQ
9092016-06-28 Yao Qi <yao.qi@linaro.org>
910
911 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
912 (the_low_target): Install arm_get_syscall_trapinfo.
913
061fc021
YQ
9142016-06-28 Yao Qi <yao.qi@linaro.org>
915
916 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
917 function.
918 (the_low_target): Install aarch64_get_syscall_trapinfo.
919
4cc32bec
YQ
9202016-06-28 Yao Qi <yao.qi@linaro.org>
921
922 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
923 Callers updated.
924 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
925 Remove parameter sysno.
926 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
927 sysret.
928
782c1122
AA
9292016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
930
931 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
932 (s390_emit_ne_goto): Likewise.
933 (s390_emit_lt_goto): Likewise.
934 (s390_emit_le_goto): Likewise.
935 (s390_emit_gt_goto): Likewise.
936 (s390_emit_ge_goto): Likewise.
937 (s390x_emit_eq_goto): Likewise.
938 (s390x_emit_ne_goto): Likewise.
939 (s390x_emit_lt_goto): Likewise.
940 (s390x_emit_le_goto): Likewise.
941 (s390x_emit_gt_goto): Likewise.
942 (s390x_emit_ge_goto): Likewise.
943 (s390_emit_ops_impl): Mark variable static.
944 (s390x_emit_ops): Likewise.
945
2e7b624b
YQ
9462016-06-17 Yao Qi <yao.qi@linaro.org>
947
948 * linux-low.c (handle_extended_wait): Call
949 uninsert_reinsert_breakpoints for the parent process. Remove
950 reinsert breakpoints from the child process. Reinsert them to
951 the parent process when vfork is done.
952 * mem-break.c (uninsert_reinsert_breakpoints): New function.
953 (reinsert_reinsert_breakpoints): New function.
954 * mem-break.h (uninsert_reinsert_breakpoints): Declare
955 (reinsert_reinsert_breakpoints): Declare.
956
8a81c5d7
YQ
9572016-06-17 Yao Qi <yao.qi@linaro.org>
958
959 * linux-low.c (handle_extended_wait): If the parent is doing
960 step-over, remove the reinsert breakpoints from the forked child.
961
f50bf8e5
YQ
9622016-06-17 Yao Qi <yao.qi@linaro.org>
963
964 * linux-low.c (unsuspend_all_lwps): Declare.
965 (linux_low_filter_event): If thread exited, call finish_step_over.
966 If step-over is finished, unsuspend other threads.
967
8376a3cb
YQ
9682016-06-17 Yao Qi <yao.qi@linaro.org>
969
970 * linux-low.c (linux_resume_one_lwp_throw): Assert
971 has_reinsert_breakpoints returns false.
972 * mem-break.c (delete_disabled_breakpoints): Assert
973 bp type isn't reinsert_breakpoint.
974
f79b145d
YQ
9752016-06-17 Yao Qi <yao.qi@linaro.org>
976
977 * linux-low.c (maybe_hw_step): New function.
978 (linux_resume_one_lwp_throw): Call maybe_hw_step.
979 (finish_step_over): Switch current_thread to lwp temporarily,
980 and assert has_reinsert_breakpoints returns true.
981 (proceed_one_lwp): Call maybe_hw_step.
982 * mem-break.c (has_reinsert_breakpoints): New function.
983 * mem-break.h (has_reinsert_breakpoints): Declare.
984
0ae534d2
JT
9852016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
986
987 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
988
fcdad592
YQ
9892016-05-17 Yao Qi <yao.qi@linaro.org>
990
991 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
992 instead of find_inferior.
993
9e784964
YQ
9942016-05-05 Yao Qi <yao.qi@linaro.org>
995
996 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
997 Initialize res to zero.
998
cf2ebb6e
YQ
9992016-05-05 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1002 to uint32_t.
1003
c1aebf87
UW
10042016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1005
1006 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1007 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1008 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1009
35fd2deb 10102016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1011 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1012
1013 * tracepoint.c (write_inferior_int8): New function.
1014 (cmd_qtenable_disable): Write enable flag using
1015 write_inferior_int8.
1016
484b3c32
YQ
10172016-04-25 Yao Qi <yao.qi@linaro.org>
1018
1019 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1020 (need_step_over_p): Return zero if the LWP has pending signals
1021 can be delivered on software single step target.
1022
85ba7d86
YQ
10232016-04-25 Yao Qi <yao.qi@linaro.org>
1024
1025 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1026 return instead of error.
1027
3539aa13
YQ
10282016-04-22 Yao Qi <yao.qi@linaro.org>
1029
1030 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1031 to 23.
1032
5b061e98
YQ
10332016-04-22 Yao Qi <yao.qi@linaro.org>
1034
1035 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1036 signal when stepping over breakpoint with software single
1037 step.
1038
3451269c
PA
10392016-04-21 Pedro Alves <palves@redhat.com>
1040
1041 * linux-s390-low.c (s390_collect_ptrace_register)
1042 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1043 add casts.
1044 (s390_check_regset): Use void * instead of gdb_byte *.
1045
a2358508
PA
10462016-04-20 Pedro Alves <palves@redhat.com>
1047
1048 * configure: Renegerate.
1049
6885166d
YQ
10502016-04-20 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1053 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1054 number 16.
1055 (arm_store_gregset): Likewise.
1056
2b863f51
WT
10572016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1058
1059 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1060 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1061 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1062 (amd64-avx-mpx-linux.c): New rules.
1063 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1064 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1065 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1066 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1067 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1068 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1069 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1070 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1071 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1072 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1073 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1074 * linux-x86-low.c (x86_linux_read_description): Add case for
1075 X86_XSTATE_AVX_MPX_MASK.
1076 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1077 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1078 init_registers_i386_avx_mpx_linux.
1079 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1080 (initialize_low_tracepoint): Call
1081 init_registers_i386_avx_mpx_linux.
1082 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1083 (initialize_low_tracepoint): Call
1084 init_registers_amd64_avx_mpx_linux.
1085 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1086 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1087 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1088 declarations.
1089
9b30624b
PA
10902016-04-18 Pedro Alves <palves@redhat.com>
1091
1092 * configure: Regenerate.
1093
45e3745e
AT
10942016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1095
1096 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1097 (aarch64_emit_sub): Likewise.
1098
2afc13ff
PA
10992016-04-12 Pedro Alves <palves@redhat.com>
1100
1101 * utils.c (prepare_to_throw_exception): Delete.
1102
6e774b13
SM
11032016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1104
1105 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1106
4dca19f8
MK
11072016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1108
1109 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1110
d0a9981f
MK
11112016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1112
1113 * linux-aarch64-ipa.c: Add <elf.h> include.
1114 * linux-ppc-ipa.c: Add <elf.h> include.
1115 * linux-s390-ipa.c: Add <elf.h> include.
1116
252db07e
MK
11172016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1118
1119 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1120 (get_raw_reg_ptr): Likewise.
1121 (get_trace_state_variable_value_ptr): Likewise.
1122 (set_trace_state_variable_value_ptr): Likewise.
1123 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1124 char *.
1125
14e2b6d9
MK
11262016-03-31 Wei-cheng Wang <cole945@gmail.com>
1127 Marcin Kościelnicki <koriakin@0x04.net>
1128
1129 PR/17221
1130 * linux-ppc-low.c (emit_insns): New function.
1131 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1132 (ppc_emit_prologue): New function.
1133 (ppc_emit_epilogue): New function.
1134 (ppc_emit_add): New function.
1135 (ppc_emit_sub): New function.
1136 (ppc_emit_mul): New function.
1137 (ppc_emit_lsh): New function.
1138 (ppc_emit_rsh_signed): New function.
1139 (ppc_emit_rsh_unsigned): New function.
1140 (ppc_emit_ext): New function.
1141 (ppc_emit_zero_ext): New function.
1142 (ppc_emit_log_not): New function.
1143 (ppc_emit_bit_and): New function.
1144 (ppc_emit_bit_or): New function.
1145 (ppc_emit_bit_xor): New function.
1146 (ppc_emit_bit_not): New function.
1147 (ppc_emit_equal): New function.
1148 (ppc_emit_less_signed): New function.
1149 (ppc_emit_less_unsigned): New function.
1150 (ppc_emit_ref): New function.
1151 (ppc_emit_const): New function.
1152 (ppc_emit_reg): New function.
1153 (ppc_emit_pop): New function.
1154 (ppc_emit_stack_flush): New function.
1155 (ppc_emit_swap): New function.
1156 (ppc_emit_stack_adjust): New function.
1157 (ppc_emit_call): New function.
1158 (ppc_emit_int_call_1): New function.
1159 (ppc_emit_void_call_2): New function.
1160 (ppc_emit_if_goto): New function.
1161 (ppc_emit_goto): New function.
1162 (ppc_emit_eq_goto): New function.
1163 (ppc_emit_ne_goto): New function.
1164 (ppc_emit_lt_goto): New function.
1165 (ppc_emit_le_goto): New function.
1166 (ppc_emit_gt_goto): New function.
1167 (ppc_emit_ge_goto): New function.
1168 (ppc_write_goto_address): New function.
1169 (ppc_emit_ops_impl): New static variable.
1170 (ppc64v1_emit_prologue): New function.
1171 (ppc64v2_emit_prologue): New function.
1172 (ppc64_emit_epilogue): New function.
1173 (ppc64_emit_add): New function.
1174 (ppc64_emit_sub): New function.
1175 (ppc64_emit_mul): New function.
1176 (ppc64_emit_lsh): New function.
1177 (ppc64_emit_rsh_signed): New function.
1178 (ppc64_emit_rsh_unsigned): New function.
1179 (ppc64_emit_ext): New function.
1180 (ppc64_emit_zero_ext): New function.
1181 (ppc64_emit_log_not): New function.
1182 (ppc64_emit_bit_and): New function.
1183 (ppc64_emit_bit_or): New function.
1184 (ppc64_emit_bit_xor): New function.
1185 (ppc64_emit_bit_not): New function.
1186 (ppc64_emit_equal): New function.
1187 (ppc64_emit_less_signed): New function.
1188 (ppc64_emit_less_unsigned): New function.
1189 (ppc64_emit_ref): New function.
1190 (ppc64_emit_const): New function.
1191 (ppc64v1_emit_reg): New function.
1192 (ppc64v2_emit_reg): New function.
1193 (ppc64_emit_pop): New function.
1194 (ppc64_emit_stack_flush): New function.
1195 (ppc64_emit_swap): New function.
1196 (ppc64v1_emit_call): New function.
1197 (ppc64v2_emit_call): New function.
1198 (ppc64v1_emit_int_call_1): New function.
1199 (ppc64v2_emit_int_call_1): New function.
1200 (ppc64v1_emit_void_call_2): New function.
1201 (ppc64v2_emit_void_call_2): New function.
1202 (ppc64_emit_if_goto): New function.
1203 (ppc64_emit_eq_goto): New function.
1204 (ppc64_emit_ne_goto): New function.
1205 (ppc64_emit_lt_goto): New function.
1206 (ppc64_emit_le_goto): New function.
1207 (ppc64_emit_gt_goto): New function.
1208 (ppc64_emit_ge_goto): New function.
1209 (ppc64v1_emit_ops_impl): New static variable.
1210 (ppc64v2_emit_ops_impl): New static variable.
1211 (ppc_emit_ops): New function.
1212 (linux_low_target): Wire in ppc_emit_ops.
1213
a2174ba4
MK
12142016-03-31 Wei-cheng Wang <cole945@gmail.com>
1215 Marcin Kościelnicki <koriakin@0x04.net>
1216
1217 PR/17221
1218 * Makefile.in: Add powerpc-*-ipa.o
1219 * configure.srv: Add ipa_obj for powerpc*-linux.
1220 * linux-ppc-ipa.c: New file.
1221 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1222 includes.
1223 (PPC_FIELD): New macro.
1224 (PPC_SEXT): New macro.
1225 (PPC_OP6): New macro.
1226 (PPC_BO): New macro.
1227 (PPC_LI): New macro.
1228 (PPC_BD): New macro.
1229 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1230 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1231 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1232 (ppc_get_thread_area): New function.
1233 (is_elfv2_inferior): New function.
1234 (gen_ds_form): New function.
1235 (GEN_STD): New macro.
1236 (GEN_STDU): New macro.
1237 (GEN_LD): New macro.
1238 (GEN_LDU): New macro.
1239 (gen_d_form): New function.
1240 (GEN_ADDI): New macro.
1241 (GEN_ADDIS): New macro.
1242 (GEN_LI): New macro.
1243 (GEN_LIS): New macro.
1244 (GEN_ORI): New macro.
1245 (GEN_ORIS): New macro.
1246 (GEN_LWZ): New macro.
1247 (GEN_STW): New macro.
1248 (GEN_STWU): New macro.
1249 (gen_xfx_form): New function.
1250 (GEN_MFSPR): New macro.
1251 (GEN_MTSPR): New macro.
1252 (GEN_MFCR): New macro.
1253 (GEN_MTCR): New macro.
1254 (GEN_SYNC): New macro.
1255 (GEN_LWSYNC): New macro.
1256 (gen_x_form): New function.
1257 (GEN_OR): New macro.
1258 (GEN_MR): New macro.
1259 (GEN_LWARX): New macro.
1260 (GEN_STWCX): New macro.
1261 (GEN_CMPW): New macro.
1262 (gen_md_form): New function.
1263 (GEN_RLDICL): New macro.
1264 (GEN_RLDICR): New macro.
1265 (gen_i_form): New function.
1266 (GEN_B): New macro.
1267 (GEN_BL): New macro.
1268 (gen_b_form): New function.
1269 (GEN_BNE): New macro.
1270 (GEN_LOAD): New macro.
1271 (GEN_STORE): New macro.
1272 (gen_limm): New function.
1273 (gen_atomic_xchg): New function.
1274 (gen_call): New function.
1275 (ppc_relocate_instruction): New function.
1276 (ppc_install_fast_tracepoint_jump_pad): New function.
1277 (ppc_get_min_fast_tracepoint_insn_len): New function.
1278 (ppc_get_ipa_tdesc_idx): New function.
1279 (the_low_target): Wire in the new functions.
1280 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1281 tdescs.
1282 * linux-ppc-tdesc.h: New file.
1283
a13c4696
MK
12842016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1285
1286 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1287 (alloc_jump_pad_buffer): New function.
1288 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1289 (alloc_jump_pad_buffer): New function.
1290 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1291 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1292 (alloc_jump_pad_buffer): New function.
1293 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1294 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1295 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1296 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1297
1cda1512
MK
12982016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1299
1300 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1301 * linux-amd64-ipa.c: Likewise.
1302 * linux-i386-ipa.c: Likewise.
1303 * linux-s390-ipa.c: Likewise.
1304 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1305 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1306 set_trace_state_variable_value_ptr.
1307 (struct ipa_sym_addresses): Likewise.
1308 (symbol_list): Likewise.
1309 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1310 accessing gdb_collect directly.
1311 (gdb_collect_ptr_type): New typedef.
1312 (get_raw_reg_ptr_type): New typedef.
1313 (get_trace_state_variable_value_ptr_type): New typedef.
1314 (set_trace_state_variable_value_ptr_type): New typedef.
1315 (gdb_collect_ptr): New global.
1316 (get_raw_reg_ptr): New global.
1317 (get_trace_state_variable_value_ptr): New global.
1318 (set_trace_state_variable_value_ptr): New global.
1319 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1320 accessing get_raw_reg directly.
1321 (get_get_tsv_func_addr): Likewise for
1322 get_trace_state_variable_value_ptr.
1323 (get_set_tsv_func_addr): Likewise for
1324 set_trace_state_variable_value_ptr.
1325 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1326
72fb5488
SM
13272016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1328
1329 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1330
28170b88
MK
13312016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1332
1333 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1334 packets.
1335 (relocate_instruction): Remove own_buf.
1336 * server.c (own_buf): Make global.
1337 (handle_v_requests): Make global.
1338 * server.h (own_buf): New declaration.
1339 (handle_v_requests): New prototype.
1340
f39e8743
MK
13412016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1342
1343 PR 18377
1344 * linux-s390-low.c (add_insns): New function.
1345 (s390_emit_prologue): New function.
1346 (s390_emit_epilogue): New function.
1347 (s390_emit_add): New function.
1348 (s390_emit_sub): New function.
1349 (s390_emit_mul): New function.
1350 (s390_emit_lsh): New function.
1351 (s390_emit_rsh_signed): New function.
1352 (s390_emit_rsh_unsigned): New function.
1353 (s390_emit_ext): New function.
1354 (s390_emit_log_not): New function.
1355 (s390_emit_bit_and): New function.
1356 (s390_emit_bit_or): New function.
1357 (s390_emit_bit_xor): New function.
1358 (s390_emit_bit_not): New function.
1359 (s390_emit_equal): New function.
1360 (s390_emit_less_signed): New function.
1361 (s390_emit_less_unsigned): New function.
1362 (s390_emit_ref): New function.
1363 (s390_emit_if_goto): New function.
1364 (s390_emit_goto): New function.
1365 (s390_write_goto_address): New function.
1366 (s390_emit_litpool): New function.
1367 (s390_emit_const): New function.
1368 (s390_emit_call): New function.
1369 (s390_emit_reg): New function.
1370 (s390_emit_pop): New function.
1371 (s390_emit_stack_flush): New function.
1372 (s390_emit_zero_ext): New function.
1373 (s390_emit_swap): New function.
1374 (s390_emit_stack_adjust): New function.
1375 (s390_emit_set_r2): New function.
1376 (s390_emit_int_call_1): New function.
1377 (s390_emit_void_call_2): New function.
1378 (s390_emit_eq_goto): New function.
1379 (s390_emit_ne_goto): New function.
1380 (s390_emit_lt_goto): New function.
1381 (s390_emit_le_goto): New function.
1382 (s390_emit_gt_goto): New function.
1383 (s390_emit_ge_goto): New function.
1384 (s390x_emit_prologue): New function.
1385 (s390x_emit_epilogue): New function.
1386 (s390x_emit_add): New function.
1387 (s390x_emit_sub): New function.
1388 (s390x_emit_mul): New function.
1389 (s390x_emit_lsh): New function.
1390 (s390x_emit_rsh_signed): New function.
1391 (s390x_emit_rsh_unsigned): New function.
1392 (s390x_emit_ext): New function.
1393 (s390x_emit_log_not): New function.
1394 (s390x_emit_bit_and): New function.
1395 (s390x_emit_bit_or): New function.
1396 (s390x_emit_bit_xor): New function.
1397 (s390x_emit_bit_not): New function.
1398 (s390x_emit_equal): New function.
1399 (s390x_emit_less_signed): New function.
1400 (s390x_emit_less_unsigned): New function.
1401 (s390x_emit_ref): New function.
1402 (s390x_emit_if_goto): New function.
1403 (s390x_emit_const): New function.
1404 (s390x_emit_call): New function.
1405 (s390x_emit_reg): New function.
1406 (s390x_emit_pop): New function.
1407 (s390x_emit_stack_flush): New function.
1408 (s390x_emit_zero_ext): New function.
1409 (s390x_emit_swap): New function.
1410 (s390x_emit_stack_adjust): New function.
1411 (s390x_emit_int_call_1): New function.
1412 (s390x_emit_void_call_2): New function.
1413 (s390x_emit_eq_goto): New function.
1414 (s390x_emit_ne_goto): New function.
1415 (s390x_emit_lt_goto): New function.
1416 (s390x_emit_le_goto): New function.
1417 (s390x_emit_gt_goto): New function.
1418 (s390x_emit_ge_goto): New function.
1419 (s390_emit_ops): New function.
1420 (struct linux_target_ops): Fill in emit_ops hook.
1421
abd9baf9
MK
14222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1423
1424 PR 18377
1425 * Makefile.in: Add s390 IPA files.
1426 * configure.srv: Build IPA for s390.
1427 * linux-s390-ipa.c: New file.
1428 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1429 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1430 (tdesc_s390_linux32): Likewise.
1431 (init_registers_s390_linux32v1): Likewise.
1432 (tdesc_s390_linux32v1): Likewise.
1433 (init_registers_s390_linux32v2): Likewise.
1434 (tdesc_s390_linux32v2): Likewise.
1435 (init_registers_s390_linux64): Likewise.
1436 (tdesc_s390_linux64): Likewise.
1437 (init_registers_s390_linux64v1): Likewise.
1438 (tdesc_s390_linux64v1): Likewise.
1439 (init_registers_s390_linux64v2): Likewise.
1440 (tdesc_s390_linux64v2): Likewise.
1441 (init_registers_s390_te_linux64): Likewise.
1442 (tdesc_s390_te_linux64): Likewise.
1443 (init_registers_s390_vx_linux64): Likewise.
1444 (tdesc_s390_vx_linux64): Likewise.
1445 (init_registers_s390_tevx_linux64): Likewise.
1446 (tdesc_s390_tevx_linux64): Likewise.
1447 (init_registers_s390x_linux64): Likewise.
1448 (tdesc_s390x_linux64): Likewise.
1449 (init_registers_s390x_linux64v1): Likewise.
1450 (tdesc_s390x_linux64v1): Likewise.
1451 (init_registers_s390x_linux64v2): Likewise.
1452 (tdesc_s390x_linux64v2): Likewise.
1453 (init_registers_s390x_te_linux64): Likewise.
1454 (tdesc_s390x_te_linux64): Likewise.
1455 (init_registers_s390x_vx_linux64): Likewise.
1456 (tdesc_s390x_vx_linux64): Likewise.
1457 (init_registers_s390x_tevx_linux64): Likewise.
1458 (tdesc_s390x_tevx_linux64): Likewise.
1459 (have_hwcap_s390_vx): New static variable.
1460 (s390_arch_setup): Fill have_hwcap_s390_vx.
1461 (s390_get_thread_area): New function.
1462 (s390_ft_entry_gpr_esa): New const.
1463 (s390_ft_entry_gpr_zarch): New const.
1464 (s390_ft_entry_misc): New const.
1465 (s390_ft_entry_fr): New const.
1466 (s390_ft_entry_vr): New const.
1467 (s390_ft_main_31): New const.
1468 (s390_ft_main_64): New const.
1469 (s390_ft_exit_fr): New const.
1470 (s390_ft_exit_vr): New const.
1471 (s390_ft_exit_misc): New const.
1472 (s390_ft_exit_gpr_esa): New const.
1473 (s390_ft_exit_gpr_zarch): New const.
1474 (append_insns): New function.
1475 (s390_relocate_instruction): New function.
1476 (s390_install_fast_tracepoint_jump_pad): New function.
1477 (s390_get_min_fast_tracepoint_insn_len): New function.
1478 (s390_get_ipa_tdesc_idx): New function.
1479 (struct linux_target_ops): Wire in the above functions.
1480 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1481 * linux-s390-tdesc.h: New file.
1482
a4105d04
MK
14832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1484
1485 * linux-s390-low.c (s390_supports_tracepoints): New function.
1486 (struct linux_target_ops): Fill supports_tracepoints hook.
1487
35ac8b3e
YQ
14882016-03-18 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-low.c (lwp_signal_can_be_delivered): New function.
1491 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1492
94610ec4
YQ
14932016-03-18 Yao Qi <yao.qi@linaro.org>
1494
1495 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1496 0 if signal is enqueued. Remove 'signal' from one debugging
1497 message. Move one debugging message to some lines below.
1498 Remove code setting 'signal' to 0.
1499
80aea927
YQ
15002016-03-18 Yao Qi <yao.qi@linaro.org>
1501
1502 * linux-low.c (linux_low_filter_event): Remove redundant
1503 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1504
b04fd3be
MK
15052016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1506
1507 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1508 (struct linux_target_ops): Wire in the above.
1509
c40c8d4b
YQ
15102016-03-03 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-low.c: Update comments to start_step_over.
1513
0f8288ae
YQ
15142016-03-03 Yao Qi <yao.qi@linaro.org>
1515
1516 PR server/19736
1517 * linux-low.c (handle_extended_wait): Set child suspended
1518 if event_lwp->bp_reinsert isn't zero.
1519
fdbd04a8
YQ
15202016-03-02 Yao Qi <yao.qi@linaro.org>
1521
1522 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1523 enqueue_pending_signal.
1524
6896a8fa
MK
15252016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1526
1527 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1528 is actually loaded.
1529
ab503087
MK
15302016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1531
1532 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1533 (s390_regmap_3264) [!__s390x__]: New global.
1534 (s390_collect_ptrace_register): Skip map entries containing -1.
1535 (s390_supply_ptrace_register): Ditto.
1536 (s390_fill_gprs_high): New function.
1537 (s390_store_gprs_high): New function.
1538 (s390_regsets): Add NT_S390_HIGH_GPRS.
1539 (s390_get_hwcap): Enable on 31-bit.
1540 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1541 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1542 Detect NT_S390_HIGH_GPRS.
1543 (s390_usrregs_info_3264): Enable on 31-bit.
1544 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1545 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1546
ae91f625
MK
15472016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1548
1549 PR gdb/13808
1550 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1551 * configure.srv: Ditto.
1552 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1553 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1554 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1555 (init_registers_amd64_linux): Remove prototype.
1556 (tdesc_amd64_linux): Remove declaration.
1557 (get_ipa_tdesc): New function.
1558 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1559 initialize remaining tdescs.
1560 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1561 (init_registers_i386_linux): Remove prototype.
1562 (tdesc_i386_linux): Remove declaration.
1563 (get_ipa_tdesc): New function.
1564 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1565 initialize remaining tdescs.
1566 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1567 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1568 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1569 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1570 (x86_get_ipa_tdesc_idx): New function.
1571 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1572 * linux-x86-tdesc.h: New file.
1573 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1574 (target_get_ipa_tdesc_idx): New macro.
1575 * tracepoint.c (ipa_tdesc_idx): New macro.
1576 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1577 (symbol_list): Add ipa_tdesc_idx.
1578 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1579 (ipa_tdesc): Remove.
1580 (ipa_tdesc_idx): New variable.
1581 (get_context_regcache): Use get_ipa_tdesc.
1582 (gdb_collect): Ditto.
1583 (gdb_probe): Ditto.
1584 * tracepoint.h (get_ipa_tdesc): New prototype.
1585 (ipa_tdesc): Remove.
1586
e7ad2f14
PA
15872016-02-24 Pedro Alves <palves@redhat.com>
1588
1589 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1590 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1591 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1592 Factor out common code between the USE_SIGTRAP_SIGINFO and
1593 !USE_SIGTRAP_SIGINFO blocks.
1594 (linux_low_filter_event): Call save_stop_reason instead of
1595 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1596 Update comments.
1597 (linux_wait_1): Update comments.
1598
657f9cde
WW
15992016-02-24 Wei-cheng Wang <cole945@gmail.com>
1600
1601 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1602 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1603 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1604 ppc_insert_point, ppc_remove_point.
1605
b00b61e1
MK
16062016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1607
1608 * linux-s390-low.c (s390_supports_z_point_type): New function.
1609 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1610
553cb527
YQ
16112016-02-16 Yao Qi <yao.qi@linaro.org>
1612
1613 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1614 PC. Get pc from regcache_read_pc.
1615
a5652c21
YQ
16162016-02-12 Yao Qi <yao.qi@linaro.org>
1617
1618 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1619 or linux_get_pc_32bit.
1620 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1621
ed443b61
YQ
16222016-02-12 Yao Qi <yao.qi@linaro.org>
1623
1624 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1625 arm_linux_get_next_pcs_fixup.
1626
020ecd38
MK
16272016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1628
1629 * tracepoint.c (x_tracepoint_action_download): Change
1630 write_inferior_data_ptr to write_inferior_data_pointer.
1631 (cmd_qtstart): Likewise.
1632 (write_inferior_data_ptr): Remove.
1633 (download_agent_expr): Change write_inferior_data_ptr to
1634 write_inferior_data_pointer.
1635 (download_tracepoint_1): Likewise.
1636 (download_tracepoint): Likewise.
1637 (download_trace_state_variables): Likewise.
1638
7cae9051
WW
16392016-02-11 Wei-cheng Wang <cole945@gmail.com>
1640 Marcin Kościelnicki <koriakin@0x04.net>
1641
1642 * tracepoint.c (struct tracepoint_action_ops): Remove.
1643 (struct tracepoint_action): Remove ops.
1644 (m_tracepoint_action_download, r_tracepoint_action_download)
1645 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1646 size and offset accordingly.
1647 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1648 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1649 (tracepoint_action_send, tracepoint_action_download): New functions.
1650 Helpers for trace action handlers.
1651 (add_tracepoint_action): Remove setup actions ops.
1652 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1653
9f6a71b4
YQ
16542016-02-10 Yao Qi <yao.qi@linaro.org>
1655
1656 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1657
1e94266c
SM
16582016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1661 to AC_OUTPUT.
1662 * configure: Regenerate.
1663
8adce034
SM
16642016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1665
1666 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1667 void * to gdb_byte *.
1668 * linux-low.c (siginfo_fixup): Likewise.
1669 (linux_xfer_siginfo): Likewise.
1670 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1671 Likewise.
1672 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1673
93813b37
WT
16742016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1675
1676 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1677 to srv_tgtobj.
1678 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1679 to srv_tgtobj.
1680 * linux-x86-low.c [__x86_64__]: Include
1681 "nat/amd64-linux-siginfo.h".
1682 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1683 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1684 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1685 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1686 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1687 (cpt_si_fd, si_timerid, si_overrun): Move from
1688 nat/amd64-linux-siginfo.c.
1689 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1690
8424cc97
SM
16912016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1692
1693 * server.c (skip_to_semicolon): Remove.
1694 (process_point_options): Use strchrnul instead of
1695 skip_to_semicolon.
1696
4d18591b
YQ
16972016-01-26 Yao Qi <yao.qi@linaro.org>
1698
1699 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1700 * linux-low.c (install_software_single_step_breakpoints): Don't
1701 call regcache_read_pc.
1702 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1703 argument pc.
1704
d8020970
YQ
17052016-01-26 Yao Qi <yao.qi@linaro.org>
1706
1707 * linux-low.c (install_software_single_step_breakpoints): Call
1708 regcache_read_pc instead of get_pc.
1709
8b207339
YQ
17102016-01-26 Yao Qi <yao.qi@linaro.org>
1711
1712 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1713 (unblock_async_io): Rename to ...
1714 (block_unblock_async_io): ... it. New function.
1715 (enable_async_io): Don't install SIGIO handler. Unblock it
1716 instead.
1717 (disable_async_io): Don't ignore SIGIO. Block it instead.
1718 (initialize_async_io): Install SIGIO handler. Don't call
1719 unblock_async_io.
1720
18879fef
YQ
17212016-01-26 Yao Qi <yao.qi@linaro.org>
1722
1723 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1724 first character is '\003', call *the_target->request_interrupt.
1725
a0f8e08a
YQ
17262016-01-25 Yao Qi <yao.qi@linaro.org>
1727
1728 * remote-utils.c (new_thread_notify): Remove.
1729 (dead_thread_notify): Likewise.
1730 * remote-utils.h (new_thread_notify): Remove declaration.
1731 (dead_thread_notify): Likewise.
1732
cc5fd9ab
MK
17332016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1734
1735 * gdb.trace/pending.exp: Fix expected message on continue.
1736
99e8eb11
MK
17372016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1738
1739 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1740 it works properly on big-endian machines where sizeof (CORE_ADDR)
1741 != sizeof (void *).
1742
a994041d
PA
17432016-01-21 Pedro Alves <palves@redhat.com>
1744
1745 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1746 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1747 * configure: Regenerate.
1748
f7a6a40d
YQ
17492016-01-21 Yao Qi <yao.qi@linaro.org>
1750
1751 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1752 is_thumb and set it according to CPSR saved on the stack.
1753 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1754 arm_sigreturn_next_pc.
1755
6f69e520
YQ
17562016-01-18 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-low.c (linux_set_pc_64bit): New function.
1759 (linux_get_pc_64bit): New function.
1760 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1761 Declare.
1762 * linux-sparc-low.c (debug_threads): Remove declaration.
1763 (sparc_get_pc): Remove.
1764 (the_low_target): Use linux_get_pc_64bit instead of
1765 sparc_get_pc.
1766 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1767 (the_low_target): Use linux_get_pc_64bit and
1768 linux_set_pc_64bit.
1769
276d4552
YQ
17702016-01-18 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-arm-low.c (debug_threads): Remove declaration.
1773 (arm_get_pc, arm_set_pc): Remove.
1774 (the_low_target): Use linux_get_pc_32bit and
1775 linux_set_pc_32bit.
1776 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1777 (the_low_target): Use linux_get_pc_32bit and
1778 linux_set_pc_32bit.
1779 * linux-cris-low.c (debug_threads): Remove declaration.
1780 (cris_get_pc, cris_set_pc,): Remove.
1781 (the_low_target): Use linux_get_pc_32bit and
1782 linux_set_pc_32bit.
1783 * linux-crisv32-low.c (debug_threads): Remove declaration.
1784 (cris_get_pc, cris_set_pc): Remove.
1785 (the_low_target): Use linux_get_pc_32bit and
1786 linux_set_pc_32bit.
1787 * linux-low.c: Include inttypes.h.
1788 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1789 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1790 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1791 (the_low_target): Use linux_get_pc_32bit and
1792 linux_set_pc_32bit.
1793 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1794 (the_low_target): Use linux_get_pc_32bit and
1795 linux_set_pc_32bit.
1796 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1797 (the_low_target): Use linux_get_pc_32bit and
1798 linux_set_pc_32bit.
1799 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1800 (the_low_target): Use linux_get_pc_32bit and
1801 linux_set_pc_32bit.
1802 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1803 (the_low_target): Use linux_get_pc_32bit and
1804 linux_set_pc_32bit.
1805
eb0edac8
GB
18062016-01-18 Gary Benson <gbenson@redhat.com>
1807
1808 * configure.ac (AC_FUNC_FORK): New check.
1809 * config.in: Regenerate.
1810 * configure: Likewise.
1811
1b451dda
YQ
18122016-01-14 Yao Qi <yao.qi@linaro.org>
1813
1814 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1815 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1816 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1817 arm_get_next_pcs_ctor.
1818
82075af2
JS
18192016-01-12 Josh Stone <jistone@redhat.com>
1820 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1821
1822 * inferiors.h: Include "gdb_vecs.h".
1823 (struct process_info): Add syscalls_to_catch.
1824 * inferiors.c (remove_process): Free syscalls_to_catch.
1825 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1826 syscall_return stops.
1827 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1828 * server.c (handle_general_set): Handle QCatchSyscalls.
1829 (handle_query): Report support for QCatchSyscalls.
1830 * target.h (struct target_ops): Add supports_catch_syscall.
1831 (target_supports_catch_syscall): New macro.
1832 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1833 (struct lwp_info): Add syscall_state.
1834 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1835 Maintain syscall_state and syscalls_to_catch across exec.
1836 (get_syscall_trapinfo): New function, proxy to the_low_target.
1837 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1838 (linux_low_filter_event): Toggle syscall_state entry/return for
1839 syscall traps, and set it ignored for all others.
1840 (gdb_catching_syscalls_p): New function.
1841 (gdb_catch_this_syscall_p): New function.
1842 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1843 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1844 (linux_supports_catch_syscall): New function.
1845 (linux_target_ops): Install it.
1846 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1847 (the_low_target): Install it.
1848
8f13a3ce
MF
18492016-01-12 Mike Frysinger <vapier@gentoo.org>
1850
1851 * acinclude.m4: Include new ../warning.m4 file.
1852 * configure: Regenerated.
1853 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1854
5b3da067
MF
18552016-01-12 Mike Frysinger <vapier@gentoo.org>
1856
1857 * ax.c (is_goto_target): Mark static.
1858 * linux-low.c (register_addr): Likewise.
1859 (linux_fetch_registers, linux_store_registers): Likewise.
1860 * mem-break.c (any_persistent_commands): Fix old prototype.
1861 (add_commands_to_breakpoint): Mark static.
1862 * regcache.c (find_register_by_name): Delete unused func.
1863 * remote-utils.c (hex_or_minus_one): Mark static.
1864 * server.c (monitor_show_help): Mark static.
1865 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1866 handle_v_requests): Likewise.
1867
bc504a31
PA
18682016-01-12 Pedro Alves <palves@redhat.com>
1869
1870 Remove use of the registered trademark symbol throughout.
1871
5a0dd67a
YQ
18722016-01-08 Yao Qi <yao.qi@linaro.org>
1873
1874 * remote-utils.c (getpkt): If c is '\003', call target hook
1875 request_interrupt.
1876
b2ca446f
YQ
18772016-01-06 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1880 linux-aarch32-low.c.
1881 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1882 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1883 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1884 (thumb2_breakpoint): Declare.
1885 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1886 linux-aarch32-low.h.
1887 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1888 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1889 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1890
edd88788
JB
18912016-01-01 Joel Brobecker <brobecker@adacore.com>
1892
1893 * gdbreplay.c (gdbreplay_version): Change copyright year in
1894 version message.
1895 * server.c (gdbserver_version): Likewise.
1896
65da7f14
PP
18972015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1898
1899 * server.c (crc32_table): Delete.
1900 (crc32): Use libiberty's xcrc32 function.
1901
4abd5ed2
JB
19022015-12-22 Joel Brobecker <brobecker@adacore.com>
1903
1904 * lynx-low.c (lynx_delete_thread_callback): New function.
1905 (lynx_mourn): Properly delete our process and all of its
1906 threads. Remove call to clear_inferiors.
1907
0e50fe5c
JB
19082015-12-22 Joel Brobecker <brobecker@adacore.com>
1909
1910 * target.c (thread_search_callback): Add check that
1911 the thread_stopped target callback is not NULL before
1912 calling it.
1913
35adc03f
YQ
19142015-12-21 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1917 arm breakpoint.
1918
bd2b2909
AT
19192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1920
1921 * server.c (handle_query): Call target_supports_software_single_step.
1922
7fe5e27e
AT
19232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1924
1925 * linux-low.c (single_step): New function.
1926 (linux_resume_one_lwp_throw): Call single_step.
1927 (start_step_over): Likewise.
1928
d9311bfa
AT
19292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1930
1931 * Makefile.in (SFILES): Append arch/arm-linux.c,
1932 arch/arm-get-next-pcs.c.
1933 (arm-linux.o): New rule.
1934 (arm-get-next-pcs.o): New rule.
1935 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1936 arm-linux.o.
1937 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1938 to linux-aarch32-low.c.
1939 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1940 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1941 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1942 (thumb2_breakpoint_len): Likewise.
1943 (arm_is_thumb_mode): Make non-static.
1944 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1945 from linux-aarch32-low.c.
1946 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1947 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1948 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1949 (thumb2_breakpoint_len): Likewise.
1950 (arm_is_thumb_mode): New declaration.
1951 * linux-arm-low.c: Include arch/arm-linux.h
1952 aarch/arm-get-next-pcs.h, sys/syscall.h.
1953 (get_next_pcs_ops): New struct.
1954 (get_next_pcs_addr_bits_remove): New function.
1955 (get_next_pcs_is_thumb): New function.
1956 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1957 (arm_sigreturn_next_pc): Likewise.
1958 (get_next_pcs_syscall_next_pc): Likewise.
1959 (arm_gdbserver_get_next_pcs): Likewise.
1960 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1961 Initialize.
1962 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1963 * server.h: Include gdb_vecs.h.
1964
68ce2059
AT
19652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1966
1967 * Makefile.in (SFILES): Append common/common-regcache.c.
1968 (OBS): Append common-regcache.o.
1969 (common-regcache.o): New rule.
1970 * regcache.c (init_register_cache): Initialize cache to
1971 REG_UNAVAILABLE.
1972 (regcache_raw_read_unsigned): New function.
1973 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1974 register_status enum.
1975
fa5308bd
AT
19762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1977
1978 * linux-aarch64-low.c (the_low_targets): Rename
1979 breakpoint_reinsert_addr to get_next_pcs.
1980 * linux-arm-low.c (the_low_targets): Likewise.
1981 * linux-bfin-low.c (the_low_targets): Likewise.
1982 * linux-cris-low.c (the_low_targets): Likewise.
1983 * linux-crisv32-low.c (the_low_targets): Likewise.
1984 * linux-low.c (can_software_single_step): Likewise.
1985 (install_software_single_step_breakpoints): New function.
1986 (start_step_over): Use install_software_single_step_breakpoints.
1987 * linux-low.h: New CORE_ADDR vector.
1988 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1989 get_next_pcs.
1990 * linux-mips-low.c (the_low_targets): Likewise.
1991 * linux-nios2-low.c (the_low_targets): Likewise.
1992 * linux-sparc-low.c (the_low_targets): Likewise.
1993
4a6ed09b
PA
19942015-12-17 Pedro Alves <palves@redhat.com>
1995
1996 * linux-low.c (linux_kill_one_lwp): Remove references to
1997 LinuxThreads.
1998 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1999 to 'kill'.
2000 (linux_init_signals): Delete.
2001 (initialize_low): Adjust.
2002 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2003
7544db95
PA
20042015-12-16 Pedro Alves <palves@redhat.com>
2005
2006 * configure.ac (compiler warning flags): When testing a
2007 -Wno-foo option, check whether -Wfoo works instead.
2008 * configure: Regenerate.
2009
8020350c
DB
20102015-12-11 Don Breazeal <donb@codesourcery.com>
2011
2012 * server.c (process_serial_event): Don't exit from gdbserver
2013 in remote mode if there are still active inferiors.
2014
db91f502
YQ
20152015-12-11 Yao Qi <yao.qi@linaro.org>
2016
2017 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2018 arm_breakpoint_at if the process is 32-bit.
2019
b37a6290
YQ
20202015-12-11 Yao Qi <yao.qi@linaro.org>
2021
2022 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2023 arm breakpoint.
2024
17b1509a
YQ
20252015-12-07 Yao Qi <yao.qi@linaro.org>
2026
2027 * configure.srv: Append arm.o to srv_tgtobj for
2028 aarch64*-*-linux* target.
2029 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2030 from linux-arm-low.c.
2031 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2032 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2033 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2034 (thumb2_breakpoint_len): Likewise.
2035 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2036 (arm_breakpoint_kinds): Likewise.
2037 (arm_breakpoint_kind_from_pc): Likewise.
2038 (arm_sw_breakpoint_from_kind): Likewise.
2039 (arm_breakpoint_kind_from_current_state): Likewise.
2040 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2041 (arm_sw_breakpoint_from_kind): Declare.
2042 (arm_breakpoint_kind_from_current_state): Declare.
2043 (arm_breakpoint_at): Declare.
2044 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2045 arm_sw_breakpoint_from_kind if process is 32-bit.
2046 (aarch64_breakpoint_kind_from_pc): New function.
2047 (aarch64_breakpoint_kind_from_current_state): New function.
2048 (the_low_target): Initialize fields breakpoint_kind_from_pc
2049 and breakpoint_kind_from_current_state.
2050 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2051 linux-aarch32-low.c.
2052 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2053 (arm_breakpoint, arm_breakpoint_len): Likewise.
2054 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2055 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2056 (arm_is_thumb_mode): Likewise.
2057 (arm_breakpoint_at): Likewise.
2058 (arm_breakpoint_kind_from_pc): Likewise.
2059 (arm_sw_breakpoint_from_kind): Likewise.
2060 (arm_breakpoint_kind_from_current_state): Likewise.
2061
2062 Revert:
2063 2015-08-04 Yao Qi <yao.qi@linaro.org>
2064
2065 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2066 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2067 * server.c (extended_protocol): Remove "static".
2068 * server.h (extended_protocol): Declare it.
2069
ece66d65
JS
20702015-12-04 Josh Stone <jistone@redhat.com>
2071
2072 * target.h (struct target_ops) <arch_setup>: Rename to ...
2073 (struct target_ops) <post_create_inferior>: ... this.
2074 (target_arch_setup): Rename to ...
2075 (target_post_create_inferior): ... this, calling post_create_inferior.
2076 * server.c (start_inferior): Update target_arch_setup calls to
2077 target_post_create_inferior.
2078 * linux-low.c (linux_low_ptrace_options): Forward declare.
2079 (linux_arch_setup): Update its comment for general use.
2080 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2081 (struct linux_target_ops): Use linux_post_create_inferior.
2082 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2083 to post_create_inferior.
2084 * nto-low.c (struct nto_target_ops): Likewise.
2085 * spu-low.c (struct spu_target_ops): Likewise.
2086 * win32-low.c (struct win32_target_ops): Likewise.
2087
e58c48b4
AT
20882015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2089
2090 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2091
fbec8956
AT
20922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2093
2094 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2095 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2096 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2097 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2098 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2099 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2100 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2101 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2102 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2103 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2104 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2105 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2106
9b4c5f87
AT
21072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2108
2109 * linux-low.c (linux_look_up_symbols): Don't call
2110 linux_supports_traceclone.
2111 * linux-low.h (thread_db_init): Remove use_events argument.
2112 * thread-db.c (thread_db_use_event): Remove global variable.
2113 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2114 (struct thread_db) <td_create_bp>: Remove field.
2115 (thread_db_create_event): Remove function.
2116 (thread_db_enable_reporting): Likewise.
2117 (find_one_thread): Don't check for thread_db_use_events.
2118 (attach_thread): Likewise.
2119 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2120 (try_thread_db_load_1): Don't check for thread_db_use_events.
2121 (thread_db_init): Remove use_events argument and thread events
2122 handling.
2123 (remove_thread_event_breakpoints): Remove function.
2124 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2125
7d00775e
AT
21262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2127
2128 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2129 New function.
2130 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2131 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2132 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2133 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2134 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2135 Initialize.
2136 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2137 New function.
2138 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2139 * linux-low.c (can_hardware_single_step): Use
2140 supports_hardware_single_step.
2141 (can_software_single_step): New function.
2142 (start_step_over): Call can_software_single_step.
2143 (linux_supports_hardware_single_step): New function.
2144 (struct target_ops) <supports_software_single_step>: Initialize.
2145 * linux-low.h (struct linux_target_ops)
2146 <supports_hardware_single_step>: Initialize.
2147 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2148 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2149 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2150 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2151 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2153 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2154 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2155 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2156 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2157 Initialize.
2158 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2159 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2160 Initialize.
2161 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2163 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2164 New function.
2165 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2166 * target.h (struct target_ops): <supports_software_single_step>:
2167 New field.
2168 (target_supports_software_single_step): New macro.
2169
2d97cd35
AT
21702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2171
2172 * linux-low.c (linux_wait_1): Fix pc advance condition.
2173 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2174 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2175
769ef81f
AT
21762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2177
2178 * linux-arm-low.c (arm_is_thumb_mode): New function.
2179 (arm_breakpoint_at): Use arm_is_thumb_mode.
2180 (arm_breakpoint_kind_from_current_state): New function.
2181 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2182 Initialize.
2183 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2184 (linux_breakpoint_kind_from_current_state): New function.
2185 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2186 * linux-low.h (struct linux_target_ops)
2187 <breakpoint_kind_from_current_state>: New field.
2188 * target.h (struct target_ops): Likewise.
2189 (target_breakpoint_kind_from_current_state): New macro.
2190
1bebeeca
PA
21912015-11-30 Pedro Alves <palves@redhat.com>
2192
2193 * linux-low.c (linux_resume): Wake up the event loop before
2194 returning.
2195
a67a9fae
PA
21962015-11-30 Pedro Alves <palves@redhat.com>
2197
2198 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2199 check.
2200 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2201 to -1.
2202 * target.c (struct thread_search): New structure.
2203 (thread_search_callback): New function.
2204 (prev_general_thread): New global.
2205 (prepare_to_access_memory, done_accessing_memory): New functions.
2206 * target.h (prepare_to_access_memory, done_accessing_memory):
2207 Replace macros with function declarations.
2208
f2faf941
PA
22092015-11-30 Pedro Alves <palves@redhat.com>
2210
2211 PR 14618
2212 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2213 report TARGET_WAITKIND_NO_RESUMED.
2214 * remote-utils.c (prepare_resume_reply): Handle
2215 TARGET_WAITKIND_NO_RESUMED.
2216 * server.c (report_no_resumed): New global.
2217 (handle_query) <qSupported>: Handle "no-resumed+". Report
2218 "no-resumed+" support.
2219 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2220 return error if the client doesn't support no-resumed events.
2221 (push_stop_notification): New function.
2222 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2223 events if the client supports them.
2224
a681f9c9
PA
22252015-11-30 Pedro Alves <palves@redhat.com>
2226
2227 * linux-low.c (thread_still_has_status_pending_p): Don't check
2228 vCont;t here.
2229 (lwp_resumed): New function.
2230 (status_pending_p_callback): Return early if the LWP is not
2231 supposed to be resumed.
2232
65706a29
PA
22332015-11-30 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (handle_extended_wait): Assert that the LWP's
2236 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2237 thread create events, leave the new child's status pending.
2238 (linux_low_filter_event): If GDB wants to hear about thread exit
2239 events, leave the LWP marked dead and don't delete it.
2240 (linux_wait_for_event_filtered): Don't check for thread exit.
2241 (filter_exit_event): New function.
2242 (linux_wait_1): Use it, when returning an exit event.
2243 (linux_resume_one_lwp_throw): Assert that the LWP's
2244 waitstatus is TARGET_WAITKIND_IGNORE.
2245 * remote-utils.c (prepare_resume_reply): Handle
2246 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2247 * server.c (report_thread_events): New global.
2248 (handle_general_set): Handle QThreadEvents.
2249 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2250 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2251 TARGET_WAITKIND_THREAD_EXITED.
2252 * server.h (report_thread_events): Declare.
2253
56cf4bed
PA
22542015-11-30 Pedro Alves <palves@redhat.com>
2255
2256 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2257 the thread's last_resume_kind was resume_stop.
2258
500c1d85
PA
22592015-11-30 Pedro Alves <palves@redhat.com>
2260
2261 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2262 before returning.
2263
de979965
PA
22642015-11-30 Pedro Alves <palves@redhat.com>
2265
2266 * server.c (handle_v_requests): Handle vCtrlC.
2267
34c65914
PA
22682015-11-30 Pedro Alves <palves@redhat.com>
2269
2270 * gdbthread.h (find_any_thread_of_pid): Declare.
2271 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2272 functions.
2273 * server.c (handle_query): If current_thread is NULL, look for
2274 another thread of the selected process.
2275
79efa585 22762015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2277 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2278
2279 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2280 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2281 name in reply.
2282 * target.h (struct target_ops) <thread_name>: New field.
2283 (target_thread_name): New macro.
2284
80d82c19
JB
22852015-11-23 Joel Brobecker <brobecker@adacore.com>
2286
2287 * regcache.h (regcache_invalidate_pid): Add declaration.
2288 * regcache.c (regcache_invalidate_pid): New function, extracted
2289 from regcache_invalidate.
2290 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2291 Add trivial documentation comment.
2292 * lynx-low.c: Use regcache_invalidate_pid instead of
2293 regcache_invalidate.
2294
64da5dd5
JB
22952015-11-23 Joel Brobecker <brobecker@adacore.com>
2296
2297 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2298 and Elf64_auxv_t if the target is Android.
2299
37ce4055
DE
23002015-11-22 Doug Evans <xdje42@gmail.com>
2301
2302 * target.h: #include <sys/types.h>.
2303
06e03fff
PA
23042015-11-19 Pedro Alves <palves@redhat.com>
2305
2306 * linux-low.c (linux_process_qsupported): Change prototype.
2307 Adjust.
2308 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2309 Change prototype.
2310 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2311 and adjust to loop over all features.
2312 * server.c (handle_query) <qSupported>: Adjust to call
2313 target_process_qsupported once, passing it a vector of unprocessed
2314 features.
2315 * target.h (struct target_ops) <process_qsupported>: Change
2316 prototype.
2317 (target_process_qsupported): Adjust.
2318
9a084706
PA
23192015-11-19 Pedro Alves <palves@redhat.com>
2320
2321 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2322 mode.
2323 * configure: Regenerate.
2324
dad44a1f
PA
23252015-11-19 Pedro Alves <palves@redhat.com>
2326
2327 * configure: Regenerate.
2328
231c0592
YQ
23292015-11-19 Yao Qi <yao.qi@linaro.org>
2330
2331 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2332 type to uint32_t.
2333
6c1c9a8b
YQ
23342015-11-19 Yao Qi <yao.qi@linaro.org>
2335
2336 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2337 (struct aarch64_operand): Move enum out.
2338
9caa3311
YQ
23392015-11-19 Yao Qi <yao.qi@linaro.org>
2340
2341 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2342 struct user_fpsimd_state *.
2343 (aarch64_store_fpregset): Likewise.
2344
6a69a054
YQ
23452015-11-19 Yao Qi <yao.qi@linaro.org>
2346
2347 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2348 struct user_pt_regs *.
2349 (aarch64_store_gregset): Likewise.
2350
1798301e
PA
23512015-11-18 Pedro Alves <palves@redhat.com>
2352
2353 * Makefile.in (all_object_files): Add $IPA_OBJS.
2354
ce7715e2
PA
23552015-11-17 Pedro Alves <palves@redhat.com>
2356
2357 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2358 GDB_SIGNAL_0 and gdb_signal_to_string.
2359
c0879059
PA
23602015-11-17 Pedro Alves <palves@redhat.com>
2361
2362 * win32-low.c (handle_output_debug_string): Remove parameter.
2363 (win32_kill): Remove our_status local and adjust call to
2364 handle_output_debug_string.
2365 (get_child_debug_event): Adjust call to
2366 handle_output_debug_string.
2367
1996e237
SM
23682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2369
2370 * linux-mips-low.c (mips_fill_gregset): Add cast.
2371 (mips_store_gregset): Likewise.
2372 (mips_fill_fpregset): Likewise.
2373 (mips_store_fpregset): Likewise.
2374
cbec665b
SM
23752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2376
2377 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2378 priv.
2379
eb3e3c67
SM
23802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2381
2382 * linux-mips-low.c (mips_linux_new_thread): Change type of
2383 watch_type to enum target_hw_bp_type.
2384
171de4b8
SM
23852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2386
2387 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2388 Change return type to arm_hwbp_type.
2389
04248ead
SM
23902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2391
2392 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2393 (arm_store_gregset): Likewise.
2394 * linux-arm-low.c (arm_get_hwcap): Likewise.
2395 (arm_read_description): Likewise.
2396
04b3479c
SM
23972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2398
2399 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2400
2bc84e8a
SM
24012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2402
2403 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2404 (ppc_fill_vsxregset): Likewise.
2405 (ppc_store_vsxregset): Likewise.
2406 (ppc_fill_vrregset): Likewise.
2407 (ppc_store_vrregset): Likewise.
2408 (ppc_fill_evrregset): Likewise.
2409 (ppc_store_evrregset): Likewise.
2410
e6c5bb05
SM
24112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2412
2413 * linux-ppc-low.c (ppc_usrregs_info): Remove
2414 forward-declaration.
2415 (ppc_arch_setup): Move lower in file.
2416
7ea45d72
SM
24172015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2418
2419 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2420 (ps_pdwrite): Likewise.
2421
69291610
HW
24222015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2423
2424 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2425 to after assert checks.
2426
b42945fd
SM
24272015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2428
2429 * proc-service.c (ps_pdread): Add/adjust casts.
2430 (ps_pdwrite): Add/adjust casts.
2431
d6f85c84
SM
24322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2433
2434 * server.c (handle_search_memory_1): Cast return value of
2435 memmem.
2436
f98cd059
SM
24372015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2438
2439 * server.c (write_qxfer_response): Change type of data to
2440 gdb_byte *.
2441
d2412fa5
PA
24422015-10-29 Pedro Alves <palves@redhat.com>
2443
2444 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2445
c17414a2
PA
24462015-10-29 Pedro Alves <palves@redhat.com>
2447
2448 * tracepoint.c (clear_installed_tracepoints): Add casts.
2449
e053fbc4
PA
24502015-10-29 Pedro Alves <palves@redhat.com>
2451
2452 * server.c (handle_v_cont, process_serial_event): Add enum
2453 gdb_signal casts to signal parsing code.
2454
add67df8
PA
24552015-10-29 Pedro Alves <palves@redhat.com>
2456
2457 * linux-low.h (NULL_REGSET): Define.
2458 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2459 * linux-arm-low.c (arm_regsets): Likewise.
2460 * linux-crisv32-low.c (cris_regsets): Likewise.
2461 * linux-m68k-low.c (m68k_regsets): Likewise.
2462 * linux-mips-low.c (mips_regsets): Likewise.
2463 * linux-nios2-low.c (nios2_regsets): Likewise.
2464 * linux-ppc-low.c (ppc_regsets): Likewise.
2465 * linux-s390-low.c (s390_regsets): Likewise.
2466 * linux-sh-low.c (sh_regsets): Likewise.
2467 * linux-sparc-low.c (sparc_regsets): Likewise.
2468 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2469 * linux-tile-low.c (tile_regsets): Likewise.
2470 * linux-x86-low.c (x86_regsets): Likewise.
2471 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2472
50bc912a
PA
24732015-10-29 Pedro Alves <palves@redhat.com>
2474
2475 * linux-low.h (NULL_REGSET): Define.
2476 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2477 * linux-arm-low.c (arm_regsets): Likewise.
2478 * linux-crisv32-low.c (cris_regsets): Likewise.
2479 * linux-m68k-low.c (m68k_regsets): Likewise.
2480 * linux-mips-low.c (mips_regsets): Likewise.
2481 * linux-nios2-low.c (nios2_regsets): Likewise.
2482 * linux-ppc-low.c (ppc_regsets): Likewise.
2483 * linux-s390-low.c (s390_regsets): Likewise.
2484 * linux-sh-low.c (sh_regsets): Likewise.
2485 * linux-sparc-low.c (sparc_regsets): Likewise.
2486 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2487 * linux-tile-low.c (tile_regsets): Likewise.
2488 * linux-x86-low.c (x86_regsets): Likewise.
2489 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2490
682b2546
DE
24912015-10-26 Doug Evans <dje@google.com>
2492
2493 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2494
963843d4
DE
24952015-10-26 Doug Evans <dje@google.com>
2496
2497 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2498
d41401ac
DE
24992015-10-26 Doug Evans <dje@google.com>
2500
2501 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2502 for debug_printf.
2503 (attach_thread, find_new_threads_callback): Ditto.
2504
3db28855
AT
25052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2506
2507 * mem-break.h (set_breakpoint_data): Remove.
2508
fb78e89c
AT
25092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2512 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2513 (initialize_low): Remove set_breakpoint_data call.
2514 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2515 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2516 (initialize_low): Remove set_breakpoint_data call.
2517 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2518 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2519 (initialize_low): Remove set_breakpoint_data call.
2520
2e6ee069
AT
25212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2522
2523 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2524 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2525 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2526 * target.h (target_breakpoint_kind_from_pc): New macro.
2527
1652a986
AT
25282015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2529
2530 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2531 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2532 the default breakpoint kind.
2533
abeead09
AT
25342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2535
2536 * linux-arm-low.c (arm_supports_z_point_type): Add software
2537 breakpoint support.
2538
b0b4b501
AT
25392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2540
2541 * linux-arm-low.c: Refactor breakpoint definitions.
2542 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2543 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2544
8689682c
AT
25452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2546
2547 * Makefile.in: Add arm.c/o.
2548 * configure.srv: Likewise.
2549 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2550 (arm_breakpoint_kind_from_pc): New function.
2551 (arm_sw_breakpoint_from_kind): Return proper kind.
2552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2553
27165294
AT
25542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2555
2556 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2557 removal.
2558 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2559 (struct raw_breakpoint) <size>: Remove.
2560 (struct raw_breakpoint) <kind>: Add.
2561 (bp_size): New function.
2562 (bp_opcode): Likewise.
2563 (find_raw_breakpoint_at): Adjust for kind.
2564 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2565 (remove_memory_breakpoint): Adjust for kind call bp_size.
2566 (set_raw_breakpoint_at): Adjust for kind.
2567 (set_breakpoint): Likewise.
2568 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2569 (delete_raw_breakpoint): Adjust for kind.
2570 (delete_breakpoint): Likewise.
2571 (find_gdb_breakpoint): Likewise.
2572 (set_gdb_breakpoint_1): Likewise.
2573 (set_gdb_breakpoint): Likewise.
2574 (delete_gdb_breakpoint_1): Likewise.
2575 (delete_gdb_breakpoint): Likewise.
2576 (uninsert_raw_breakpoint): Likewise.
2577 (reinsert_raw_breakpoint): Likewise.
2578 (set_breakpoint_data): Remove.
2579 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2580 (check_mem_read): Adjust for kind call bp_size.
2581 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2582 (clone_one_breakpoint): Adjust for kind.
2583 * mem-break.h (set_gdb_breakpoint): Likewise.
2584 (delete_gdb_breakpoint): Likewise.
2585 * server.c (process_serial_event): Likewise.
2586
dd373349
AT
25872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2588
2589 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2590 (struct linux_target_ops) <breakpoint>: Remove.
2591 (struct linux_target_ops) <breakpoint_len>: Remove.
2592 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2593 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2594 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2595 (arm_sw_breakpoint_from_kind): New function.
2596 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2597 (struct linux_target_ops) <breakpoint>: Remove.
2598 (struct linux_target_ops) <breakpoint_len>: Remove.
2599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2601 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2602 (struct linux_target_ops) <breakpoint>: Remove.
2603 (struct linux_target_ops) <breakpoint_len>: Remove.
2604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2606 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2607 (struct linux_target_ops) <breakpoint>: Remove.
2608 (struct linux_target_ops) <breakpoint_len>: Remove.
2609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2611 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2612 and sw_breakpoint_from_kind to increment the pc.
2613 (linux_breakpoint_kind_from_pc): New function.
2614 (linux_sw_breakpoint_from_kind): New function.
2615 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2616 (initialize_low): Call breakpoint_kind_from_pc and
2617 sw_breakpoint_from_kind to replace breakpoint_data/len.
2618 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2619 New field.
2620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2621 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2622 (struct linux_target_ops) <breakpoint>: Remove.
2623 (struct linux_target_ops) <breakpoint_len>: Remove.
2624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2626 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2627 (struct linux_target_ops) <breakpoint>: Remove.
2628 (struct linux_target_ops) <breakpoint_len>: Remove.
2629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2631 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2632 (struct linux_target_ops) <breakpoint>: Remove.
2633 (struct linux_target_ops) <breakpoint_len>: Remove.
2634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2636 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2637 (struct linux_target_ops) <breakpoint>: Remove.
2638 (struct linux_target_ops) <breakpoint_len>: Remove.
2639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2640 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2641 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2642 (struct linux_target_ops) <breakpoint>: Remove.
2643 (struct linux_target_ops) <breakpoint_len>: Remove.
2644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2646 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2647 (struct linux_target_ops) <breakpoint>: Remove.
2648 (struct linux_target_ops) <breakpoint_len>: Remove.
2649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2651 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2652 (struct linux_target_ops) <breakpoint>: Remove.
2653 (struct linux_target_ops) <breakpoint_len>: Remove.
2654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2656 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2657 (struct linux_target_ops) <breakpoint>: Remove.
2658 (struct linux_target_ops) <breakpoint_len>: Remove.
2659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2661 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2662 (struct linux_target_ops) <breakpoint>: Remove.
2663 (struct linux_target_ops) <breakpoint_len>: Remove.
2664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2666 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2667 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2668 (struct linux_target_ops) <breakpoint>: Remove.
2669 (struct linux_target_ops) <breakpoint_len>: Remove.
2670 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2671 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2672 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2673 (struct linux_target_ops) <breakpoint>: Remove.
2674 (struct linux_target_ops) <breakpoint_len>: Remove.
2675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2677
4cd98a19
AT
26782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2679
2680 * linux-cris-low.c (cris_get_pc): Remove void arg.
2681
774ee6d2
AR
26822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2683
2684 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2685 variable name.
2686
833dcd29
AR
26872015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2688
2689 * inferiors.c (thread_pid_matches_callback): New function.
2690 (find_thread_process): New function.
2691 (remove_thread): Reset current_thread.
2692 (remove_process): Assert threads have been removed first.
2693
8d689ee5
YQ
26942015-10-15 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2697 if it is 3.
2698 (aarch64_remove_point): Likewise.
2699 * regcache.c (regcache_register_size): New function.
2700
1c2e1515
YQ
27012015-10-12 Yao Qi <yao.qi@linaro.org>
2702
2703 * linux-aarch64-low.c: Update all callers as emit_load_store
2704 is renamed to aarch64_emit_load_store.
2705
e1c587c3
YQ
27062015-10-12 Yao Qi <yao.qi@linaro.org>
2707
2708 * linux-aarch64-low.c: Update all callers of function renaming
2709 from emit_insn to aarch64_emit_insn.
2710
b6542f81
YQ
27112015-10-12 Yao Qi <yao.qi@linaro.org>
2712
2713 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2714 arch/aarch64-insn.h.
2715 (struct aarch64_memory_operand): Likewise.
2716 (ENCODE): Likewise.
2717 (emit_insn): Move to arch/aarch64-insn.c.
2718 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2719 (emit_load_store): Move to arch/aarch64-insn.c.
2720 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2721 (can_encode_int32): Remove.
2722
246994ce
YQ
27232015-10-12 Yao Qi <yao.qi@linaro.org>
2724
2725 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2726 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2727 (aarch64_relocate_instruction): Likewise.
2728 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2729 (struct aarch64_insn_visitor): Likewise.
2730
0badd99f
YQ
27312015-10-12 Yao Qi <yao.qi@linaro.org>
2732
2733 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2734 (struct aarch64_insn_visitor): New.
2735 (struct aarch64_insn_relocation_data): New.
2736 (aarch64_ftrace_insn_reloc_b): New function.
2737 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2738 (aarch64_ftrace_insn_reloc_cb): Likewise.
2739 (aarch64_ftrace_insn_reloc_tb): Likewise.
2740 (aarch64_ftrace_insn_reloc_adr): Likewise.
2741 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2742 (aarch64_ftrace_insn_reloc_others): Likewise.
2743 (visitor): New.
2744 (aarch64_relocate_instruction): Use visitor.
2745
dfaffe9d
YQ
27462015-10-12 Yao Qi <yao.qi@linaro.org>
2747
2748 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2749 int. Add argument buf.
2750 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2751 aarch64_relocate_instruction.
2752
70b439f0
YQ
27532015-10-12 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2756 argument insn. Remove local variable insn. Don't call
2757 target_read_uint32.
2758 (aarch64_install_fast_tracepoint_jump_pad): Call
2759 target_read_uint32.
2760
7781c06f
YQ
27612015-09-30 Yao Qi <yao.qi@linaro.org>
2762
2763 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2764 (emit_load_store_pair): Likewise.
2765
9a3c8263
SM
27662015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2767
2768 * dll.c (match_dll): Add cast(s).
2769 (unloaded_dll): Likewise.
2770 * linux-low.c (second_thread_of_pid_p): Likewise.
2771 (delete_lwp_callback): Likewise.
2772 (count_events_callback): Likewise.
2773 (select_event_lwp_callback): Likewise.
2774 (linux_set_resume_request): Likewise.
2775 * server.c (accumulate_file_name_length): Likewise.
2776 (emit_dll_description): Likewise.
2777 (handle_qxfer_threads_worker): Likewise.
2778 (visit_actioned_threads): Likewise.
2779 * thread-db.c (any_thread_of): Likewise.
2780 * tracepoint.c (same_process_p): Likewise.
2781 (match_blocktype): Likewise.
2782 (build_traceframe_info_xml): Likewise.
2783
224c3ddb
SM
27842015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2785
2786 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2787 assignment.
2788 (gdb_unparse_agent_expr): Likewise.
2789 * hostio.c (require_data): Likewise.
2790 (handle_pread): Likewise.
2791 * linux-low.c (disable_regset): Likewise.
2792 (fetch_register): Likewise.
2793 (store_register): Likewise.
2794 (get_dynamic): Likewise.
2795 (linux_qxfer_libraries_svr4): Likewise.
2796 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2797 (set_fast_tracepoint_jump): Likewise.
2798 (uninsert_fast_tracepoint_jumps_at): Likewise.
2799 (reinsert_fast_tracepoint_jumps_at): Likewise.
2800 (validate_inserted_breakpoint): Likewise.
2801 (clone_agent_expr): Likewise.
2802 * regcache.c (init_register_cache): Likewise.
2803 * remote-utils.c (putpkt_binary_1): Likewise.
2804 (decode_M_packet): Likewise.
2805 (decode_X_packet): Likewise.
2806 (look_up_one_symbol): Likewise.
2807 (relocate_instruction): Likewise.
2808 (monitor_output): Likewise.
2809 * server.c (handle_search_memory): Likewise.
2810 (handle_qxfer_exec_file): Likewise.
2811 (handle_qxfer_libraries): Likewise.
2812 (handle_qxfer): Likewise.
2813 (handle_query): Likewise.
2814 (handle_v_cont): Likewise.
2815 (handle_v_run): Likewise.
2816 (captured_main): Likewise.
2817 * target.c (write_inferior_memory): Likewise.
2818 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2819 * tracepoint.c (init_trace_buffer): Likewise.
2820 (add_tracepoint_action): Likewise.
2821 (add_traceframe): Likewise.
2822 (add_traceframe_block): Likewise.
2823 (cmd_qtdpsrc): Likewise.
2824 (cmd_qtdv): Likewise.
2825 (cmd_qtstatus): Likewise.
2826 (response_source): Likewise.
2827 (response_tsv): Likewise.
2828 (cmd_qtnotes): Likewise.
2829 (gdb_collect): Likewise.
2830 (initialize_tracepoint): Likewise.
2831
afbe19f8
PL
28322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2833
2834 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2835 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2836 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2837 <NOP>: New.
2838 (enum aarch64_condition_codes): New enum.
2839 (w0): New static global.
2840 (fp): Likewise.
2841 (lr): Likewise.
2842 (struct aarch64_memory_operand) <type>: New
2843 MEMORY_OPERAND_POSTINDEX type.
2844 (postindex_memory_operand): New helper function.
2845 (emit_ret): New function.
2846 (emit_load_store_pair): New function, factored out of emit_stp
2847 with support for MEMORY_OPERAND_POSTINDEX.
2848 (emit_stp): Rewrite using emit_load_store_pair.
2849 (emit_ldp): New function.
2850 (emit_load_store): Likewise.
2851 (emit_ldr): Mention post-index instruction in comment.
2852 (emit_ldrh): New function.
2853 (emit_ldrb): New function.
2854 (emit_ldrsw): Mention post-index instruction in comment.
2855 (emit_str): Likewise.
2856 (emit_subs): New function.
2857 (emit_cmp): Likewise.
2858 (emit_and): Likewise.
2859 (emit_orr): Likewise.
2860 (emit_orn): Likewise.
2861 (emit_eor): Likewise.
2862 (emit_mvn): Likewise.
2863 (emit_lslv): Likewise.
2864 (emit_lsrv): Likewise.
2865 (emit_asrv): Likewise.
2866 (emit_mul): Likewise.
2867 (emit_sbfm): Likewise.
2868 (emit_sbfx): Likewise.
2869 (emit_ubfm): Likewise.
2870 (emit_ubfx): Likewise.
2871 (emit_csinc): Likewise.
2872 (emit_cset): Likewise.
2873 (emit_nop): Likewise.
2874 (emit_ops_insns): New helper function.
2875 (emit_pop): Likewise.
2876 (emit_push): Likewise.
2877 (aarch64_emit_prologue): New function.
2878 (aarch64_emit_epilogue): Likewise.
2879 (aarch64_emit_add): Likewise.
2880 (aarch64_emit_sub): Likewise.
2881 (aarch64_emit_mul): Likewise.
2882 (aarch64_emit_lsh): Likewise.
2883 (aarch64_emit_rsh_signed): Likewise.
2884 (aarch64_emit_rsh_unsigned): Likewise.
2885 (aarch64_emit_ext): Likewise.
2886 (aarch64_emit_log_not): Likewise.
2887 (aarch64_emit_bit_and): Likewise.
2888 (aarch64_emit_bit_or): Likewise.
2889 (aarch64_emit_bit_xor): Likewise.
2890 (aarch64_emit_bit_not): Likewise.
2891 (aarch64_emit_equal): Likewise.
2892 (aarch64_emit_less_signed): Likewise.
2893 (aarch64_emit_less_unsigned): Likewise.
2894 (aarch64_emit_ref): Likewise.
2895 (aarch64_emit_if_goto): Likewise.
2896 (aarch64_emit_goto): Likewise.
2897 (aarch64_write_goto_address): Likewise.
2898 (aarch64_emit_const): Likewise.
2899 (aarch64_emit_call): Likewise.
2900 (aarch64_emit_reg): Likewise.
2901 (aarch64_emit_pop): Likewise.
2902 (aarch64_emit_stack_flush): Likewise.
2903 (aarch64_emit_zero_ext): Likewise.
2904 (aarch64_emit_swap): Likewise.
2905 (aarch64_emit_stack_adjust): Likewise.
2906 (aarch64_emit_int_call_1): Likewise.
2907 (aarch64_emit_void_call_2): Likewise.
2908 (aarch64_emit_eq_goto): Likewise.
2909 (aarch64_emit_ne_goto): Likewise.
2910 (aarch64_emit_lt_goto): Likewise.
2911 (aarch64_emit_le_goto): Likewise.
2912 (aarch64_emit_gt_goto): Likewise.
2913 (aarch64_emit_ge_got): Likewise.
2914 (aarch64_emit_ops_impl): New static global variable.
2915 (aarch64_emit_ops): New target function, return
2916 &aarch64_emit_ops_impl.
2917 (struct linux_target_ops): Install it.
2918
bb903df0
PL
29192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2920
2921 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2922 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2923 aarch64-ipa.o.
2924 * linux-aarch64-ipa.c: New file.
2925 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2926 and endian.h.
2927 (aarch64_get_thread_area): New target method.
2928 (extract_signed_bitfield): New helper function.
2929 (aarch64_decode_ldr_literal): New function.
2930 (enum aarch64_opcodes): New enum.
2931 (struct aarch64_register): New struct.
2932 (struct aarch64_operand): New struct.
2933 (x0): New static global.
2934 (x1): Likewise.
2935 (x2): Likewise.
2936 (x3): Likewise.
2937 (x4): Likewise.
2938 (w2): Likewise.
2939 (ip0): Likewise.
2940 (sp): Likewise.
2941 (xzr): Likewise.
2942 (aarch64_register): New helper function.
2943 (register_operand): Likewise.
2944 (immediate_operand): Likewise.
2945 (struct aarch64_memory_operand): New struct.
2946 (offset_memory_operand): New helper function.
2947 (preindex_memory_operand): Likewise.
2948 (enum aarch64_system_control_registers): New enum.
2949 (ENCODE): New macro.
2950 (emit_insn): New helper function.
2951 (emit_b): New function.
2952 (emit_bcond): Likewise.
2953 (emit_cb): Likewise.
2954 (emit_tb): Likewise.
2955 (emit_blr): Likewise.
2956 (emit_stp): Likewise.
2957 (emit_ldp_q_offset): Likewise.
2958 (emit_stp_q_offset): Likewise.
2959 (emit_load_store): Likewise.
2960 (emit_ldr): Likewise.
2961 (emit_ldrsw): Likewise.
2962 (emit_str): Likewise.
2963 (emit_ldaxr): Likewise.
2964 (emit_stxr): Likewise.
2965 (emit_stlr): Likewise.
2966 (emit_data_processing_reg): Likewise.
2967 (emit_data_processing): Likewise.
2968 (emit_add): Likewise.
2969 (emit_sub): Likewise.
2970 (emit_mov): Likewise.
2971 (emit_movk): Likewise.
2972 (emit_mov_addr): Likewise.
2973 (emit_mrs): Likewise.
2974 (emit_msr): Likewise.
2975 (emit_sevl): Likewise.
2976 (emit_wfe): Likewise.
2977 (append_insns): Likewise.
2978 (can_encode_int32_in): New helper function.
2979 (aarch64_relocate_instruction): New function.
2980 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2981 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2982 (struct linux_target_ops): Install aarch64_get_thread_area,
2983 aarch64_install_fast_tracepoint_jump_pad and
2984 aarch64_get_min_fast_tracepoint_insn_len.
2985
787749ea
PL
29862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2987
2988 * Makefile.in (aarch64-insn.o): New rule.
2989 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2990
9812b2e6
YQ
29912015-09-21 Yao Qi <yao.qi@linaro.org>
2992
2993 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2994
18fe412b
YQ
29952015-09-21 Yao Qi <yao.qi@linaro.org>
2996
2997 * tracepoint.c (max_jump_pad_size): Remove.
2998
a0cc84cd
YQ
29992015-09-18 Yao Qi <yao.qi@linaro.org>
3000
3001 * linux-aarch64-low.c: Don't include sys/uio.h.
3002 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3003
d78908cf
WW
30042015-09-16 Wei-cheng Wang <cole945@gmail.com>
3005
3006 * tracepoint.c (eval_result_type): Change prototype.
3007 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3008
d57e0d50
PA
30092015-09-15 Pedro Alves <palves@redhat.com>
3010
3011 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3012 Check whether to report exec events instead of checking whether
3013 multiprocess is enabled.
3014
5a676acc
PA
30152015-09-15 Pedro Alves <palves@redhat.com>
3016
3017 PR remote/18965
3018 * remote-utils.c (prepare_resume_reply): Merge
3019 TARGET_WAITKIND_VFORK_DONE switch case with the
3020 TARGET_WAITKIND_FORKED case.
3021
7c5d0fad
YQ
30222015-09-15 Yao Qi <yao.qi@linaro.org>
3023
3024 * server.c (handle_query): Check string comparison using
3025 "else if" instead of "if".
3026
750ce8d1
YQ
30272015-09-15 Yao Qi <yao.qi@linaro.org>
3028
3029 * server.c (vCont_supported): New global variable.
3030 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3031 matches. Append ";vContSupported+" to own_buf.
3032 (handle_v_requests): Append ";s;S" to own_buf if target supports
3033 hardware single step or vCont_supported is false.
3034 (capture_main): Set vCont_supported to zero.
3035
70b90b91
YQ
30362015-09-15 Yao Qi <yao.qi@linaro.org>
3037
3038 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3039 it to ...
3040 (linux_supports_hardware_single_step): ... New function.
3041 (linux_target_ops): Update.
3042 * lynx-low.c (lynx_target_ops): Set field
3043 supports_hardware_single_step to target_can_do_hardware_single_step.
3044 * nto-low.c (nto_target_ops): Likewise.
3045 * spu-low.c (spu_target_ops): Likewise.
3046 * win32-low.c (win32_target_ops): Likewise.
3047 * target.c (target_can_do_hardware_single_step): New function.
3048 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3049 Remove. <supports_hardware_single_step>: New field.
3050 (target_supports_conditional_breakpoints): Remove.
3051 (target_supports_hardware_single_step): New macro.
3052 (target_can_do_hardware_single_step): Declare.
3053 * server.c (handle_query): Use target_supports_hardware_single_step
3054 instead of target_supports_conditional_breakpoints.
3055
ade90bde
YQ
30562015-09-15 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3059 function.
3060 (struct linux_target_ops the_low_target): Install
3061 aarch64_linux_siginfo_fixup.
3062
94585166
DB
30632015-09-11 Don Breazeal <donb@codesourcery.com>
3064 Luis Machado <lgustavo@codesourcery.com>
3065
3066 * linux-low.c (linux_mourn): Static declaration.
3067 (linux_arch_setup): Move in front of
3068 handle_extended_wait.
3069 (linux_arch_setup_thread): New function.
3070 (handle_extended_wait): Handle exec events. Call
3071 linux_arch_setup_thread. Make event_lwp argument a
3072 pointer-to-a-pointer.
3073 (check_zombie_leaders): Do not check stopped threads.
3074 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3075 (linux_low_filter_event): Add lwp and thread for exec'ing
3076 non-leader thread if leader thread has been deleted.
3077 Refactor code into linux_arch_setup_thread and call it.
3078 Pass child lwp pointer by reference to handle_extended_wait.
3079 (linux_wait_for_event_filtered): Update comment.
3080 (linux_wait_1): Prevent clobbering exec event status.
3081 (linux_supports_exec_events): New function.
3082 (linux_target_ops) <supports_exec_events>: Initialize new member.
3083 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3084 new member.
3085 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3086 * server.c (report_exec_events): New global variable.
3087 (handle_query): Handle qSupported query for exec-events feature.
3088 (captured_main): Initialize report_exec_events.
3089 * server.h (report_exec_events): Declare new global variable.
3090 * target.h (struct target_ops) <supports_exec_events>: New
3091 member.
3092 (target_supports_exec_events): New macro.
3093 * win32-low.c (win32_target_ops) <supports_exec_events>:
3094 Initialize new member.
3095
0568462b
MM
30962015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3097
3098 * linux-low.c (linux_low_enable_btrace): Remove.
3099 (linux_target_ops): Replace linux_low_enable_btrace with
3100 linux_enable_btrace.
3101
39edd165
YQ
31022015-09-03 Yao Qi <yao.qi@linaro.org>
3103
3104 * linux-aarch64-low.c (aarch64_insert_point): Call
3105 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3106 returns true.
3107
1db33b5a
UW
31082015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3109
3110 * linux-low.c (check_stopped_by_breakpoint): Use
3111 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3112
ab290430
PA
31132015-08-27 Pedro Alves <palves@redhat.com>
3114
3115 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3116
8d749320
SM
31172015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3118
6711b7f8
SM
3119 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3120 the XNEW-family equivalent.
8d749320
SM
3121 (compile_bytecodes): Likewise.
3122 * dll.c (loaded_dll): Likewise.
3123 * event-loop.c (append_callback_event): Likewise.
3124 (create_file_handler): Likewise.
3125 (create_file_event): Likewise.
3126 * hostio.c (handle_open): Likewise.
3127 * inferiors.c (add_thread): Likewise.
3128 (add_process): Likewise.
3129 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3130 * linux-arm-low.c (arm_new_process): Likewise.
3131 (arm_new_thread): Likewise.
3132 * linux-low.c (add_to_pid_list): Likewise.
3133 (linux_add_process): Likewise.
3134 (handle_extended_wait): Likewise.
3135 (add_lwp): Likewise.
3136 (enqueue_one_deferred_signal): Likewise.
3137 (enqueue_pending_signal): Likewise.
3138 (linux_resume_one_lwp_throw): Likewise.
3139 (linux_resume_one_thread): Likewise.
3140 (linux_read_memory): Likewise.
3141 (linux_write_memory): Likewise.
3142 * linux-mips-low.c (mips_linux_new_process): Likewise.
3143 (mips_linux_new_thread): Likewise.
3144 (mips_add_watchpoint): Likewise.
3145 * linux-x86-low.c (initialize_low_arch): Likewise.
3146 * lynx-low.c (lynx_add_process): Likewise.
3147 * mem-break.c (set_raw_breakpoint_at): Likewise.
3148 (set_breakpoint): Likewise.
3149 (add_condition_to_breakpoint): Likewise.
3150 (add_commands_to_breakpoint): Likewise.
3151 (clone_agent_expr): Likewise.
3152 (clone_one_breakpoint): Likewise.
3153 * regcache.c (new_register_cache): Likewise.
3154 * remote-utils.c (look_up_one_symbol): Likewise.
3155 * server.c (queue_stop_reply): Likewise.
3156 (start_inferior): Likewise.
3157 (queue_stop_reply_callback): Likewise.
3158 (handle_target_event): Likewise.
3159 * spu-low.c (fetch_ppc_memory): Likewise.
3160 (store_ppc_memory): Likewise.
3161 * target.c (set_target_ops): Likewise.
3162 * thread-db.c (thread_db_load_search): Likewise.
3163 (try_thread_db_load_1): Likewise.
3164 * tracepoint.c (add_tracepoint): Likewise.
3165 (add_tracepoint_action): Likewise.
3166 (create_trace_state_variable): Likewise.
3167 (cmd_qtdpsrc): Likewise.
3168 (cmd_qtro): Likewise.
3169 (add_while_stepping_state): Likewise.
3170 * win32-low.c (child_add_thread): Likewise.
3171 (get_image_name): Likewise.
3172
ed8b7b42
YQ
31732015-08-25 Yao Qi <yao.qi@linaro.org>
3174
3175 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3176
db3cb7cb
YQ
31772015-08-25 Yao Qi <yao.qi@linaro.org>
3178
3179 * Makefile.in (aarch64-linux.o): New rule.
3180 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3181 srv_tgtobj.
3182 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3183 (aarch64_init_debug_reg_state): Make it extern.
3184 (aarch64_linux_prepare_to_resume): Remove.
3185
f6011a1c
YQ
31862015-08-25 Yao Qi <yao.qi@linaro.org>
3187
3188 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3189 lwp_arch_private_info and ptid_of_lwp.
3190
88e2cf7e
YQ
31912015-08-25 Yao Qi <yao.qi@linaro.org>
3192
3193 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3194 Find proc_info by find_process_pid. All callers updated.
3195
5e35436e
YQ
31962015-08-25 Yao Qi <yao.qi@linaro.org>
3197
3198 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3199 Remove.
3200 (debug_reg_change_callback): Remove.
3201 (aarch64_notify_debug_reg_change): Remove.
3202
4a8a7965
YQ
32032015-08-25 Yao Qi <yao.qi@linaro.org>
3204
3205 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3206 Call current_lwp_ptid.
3207
32a271ee
YQ
32082015-08-25 Yao Qi <yao.qi@linaro.org>
3209
3210 * linux-aarch64-low.c (debug_reg_change_callback): Use
3211 debug_printf.
3212
0d51c8d7
YQ
32132015-08-25 Yao Qi <yao.qi@linaro.org>
3214
3215 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3216
31a43dd5
YQ
32172015-08-25 Yao Qi <yao.qi@linaro.org>
3218
3219 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3220
8ee52567
YQ
32212015-08-25 Yao Qi <yao.qi@linaro.org>
3222
3223 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3224 the code.
3225
ff3f0f45
YQ
32262015-08-25 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3229 Remove.
3230 (debug_reg_change_callback): Remove argument entry and add argument
3231 lwp. Remove local variable thread. Don't print thread id in the
3232 debugging output. Don't check whether pid of thread equals to pid.
3233 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3234 iterate_over_lwps instead find_inferior.
3235
3d40fbb5
PA
32362015-08-24 Pedro Alves <palves@redhat.com>
3237
3238 * inferiors.c (get_first_process): New function.
3239 * inferiors.h (get_first_process): New declaration.
3240 * remote-utils.c (read_ptid): Default to the first process in the
3241 list, instead of to the current thread's process.
3242
438e1e42
PA
32432015-08-24 Pedro Alves <palves@redhat.com>
3244
3245 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3246 * event-loop.c: Likewise.
3247 * remote-utils.c: Likewise.
3248 * tracepoint.c: Likewise.
3249
a8c6d4fc
PA
32502015-08-24 Pedro Alves <palves@redhat.com>
3251
3252 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3253 ptid_get_lwp.
3254
99b0bb12
PA
32552015-08-21 Pedro Alves <palves@redhat.com>
3256
3257 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3258 instead of literal 1.
3259
f8904751
PA
32602015-08-21 Pedro Alves <palves@redhat.com>
3261
3262 * tdesc.c (default_description): Explicitly zero-initialize.
3263
465a859e
PA
32642015-08-21 Pedro Alves <palves@redhat.com>
3265
3266 PR gdb/18749
3267 * inferiors.c (remove_thread): Discard any pending stop reply for
3268 this thread.
3269 * server.c (remove_all_on_match_pid): Rename to ...
3270 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3271 instead of a pid.
3272 (discard_queued_stop_replies): Change parameter to a ptid. Now
3273 extern.
3274 (handle_v_kill, kill_inferior_callback, captured_main)
3275 (process_serial_event): Adjust.
3276 * server.h (discard_queued_stop_replies): Declare.
3277
f0db101d
PA
32782015-08-21 Pedro Alves <palves@redhat.com>
3279
3280 * linux-low.c (wait_for_sigstop): Always switch to no thread
3281 selected if the previously current thread dies.
3282 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3283 process instead of the current thread's.
3284 * remote-utils.c (input_interrupt): Don't check if there's no
3285 current thread.
3286 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3287 current thread to the general thread fails, error out.
3288 (handle_qxfer_auxv, handle_qxfer_libraries)
3289 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3290 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3291 (handle_query): Check if there's a thread selected instead of
3292 checking whether there's any thread in the thread list.
3293 (handle_qxfer_threads, handle_qxfer_btrace)
3294 (handle_qxfer_btrace_conf): Don't error out early if there's no
3295 thread in the thread list.
3296 (handle_v_cont, myresume): Don't set the current thread to the
3297 continue thread.
3298 (process_serial_event) <Hg handling>: Also set thread_id if the
3299 previous general thread is still alive.
3300 (process_serial_event) <g/G handling>: If setting the current
3301 thread to the general thread fails, error out.
3302 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3303 thread's lwp instead of the current thread's.
3304 * target.c (set_desired_thread): If the desired thread was not
3305 found, leave the current thread pointing to NULL. Return an int
3306 (boolean) indicating success.
3307 * target.h (set_desired_thread): Change return type to int.
3308
40045d91
MF
33092015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3310
3311 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3312 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3313 #includes.
3314 (ps_get_thread_area): New function.
3315
45face3b
GB
33162015-08-19 Gary Benson <gbenson@redhat.com>
3317
3318 * hostio.c (handle_pread): Do not attempt to read more data
3319 than hostio_reply_with_data can fit in a packet.
3320
16d5f642
JB
33212015-08-18 Joel Brobecker <brobecker@adacore.com>
3322
3323 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3324
a738da3a
MF
33252015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3326
3327 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3328
33ebda9d
PA
33292015-08-06 Pedro Alves <palves@redhat.com>
3330
3331 * tracepoint.c (expr_eval_result): Now an int.
3332
a44892be
PA
33332015-08-06 Pedro Alves <palves@redhat.com>
3334
3335 * gdbthread.h (struct regcache): Forward declare.
3336 (struct thread_info) <regcache_data>: Now a struct regcache
3337 pointer.
3338 * inferiors.c (inferior_regcache_data)
3339 (set_inferior_regcache_data): Now work with struct regcache
3340 pointers.
3341 * inferiors.h (struct regcache): Forward declare.
3342 (inferior_regcache_data, set_inferior_regcache_data): Now work
3343 with struct regcache pointers.
3344 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3345 (free_register_cache_thread): Remove struct regcache pointer
3346 casts.
3347
608a1e46
PA
33482015-08-06 Pedro Alves <palves@redhat.com>
3349
3350 * server.c (captured_main): On error, print the exception message
3351 to stderr, and if run_once is set, throw a quit.
3352
f0ce0d3a
PA
33532015-08-06 Pedro Alves <palves@redhat.com>
3354
3355 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3356 the current thread.
3357
bf47e248
PA
33582015-08-06 Pedro Alves <palves@redhat.com>
3359
3360 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3361 reading beyond the passed in buffer length.
3362
b6b9ffcc
PL
33632015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3364
3365 * tracepoint.c (symbol_list) <required>: Remove.
3366
863d01bd
PA
33672015-08-06 Pedro Alves <palves@redhat.com>
3368
3369 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3370 count if stopping and suspending threads.
3371 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3372 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3373 (linux_detach): Complete an ongoing step-over.
3374 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3375 throughout.
3376 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3377 (linux_wait_1): If passing a signal to the inferior after
3378 finishing a step-over, unsuspend and re-resume all lwps. If we
3379 see a single-step event but the thread should be continuing, don't
3380 pass the trap to gdb.
3381 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3382 internal_error instead of gdb_assert.
3383 (enqueue_pending_signal): New function.
3384 (check_ptrace_stopped_lwp_gone): Add debug output.
3385 (start_step_over): Use internal_error instead of gdb_assert.
3386 (complete_ongoing_step_over): New function.
3387 (linux_resume_one_thread): Don't resume a suspended thread.
3388 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3389 it stepping.
3390
00db26fa
PA
33912015-08-06 Pedro Alves <palves@redhat.com>
3392
3393 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3394 (linux_thread_alive): Use lwp_is_marked_dead.
3395 (extended_event_reported): Delete.
3396 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3397 instead of extended_event_reported.
3398 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3399 as well.
3400 (lwp_is_marked_dead): New function.
3401 (lwp_running): Use lwp_is_marked_dead.
3402 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3403 comment.
3404
ad071a30
PA
34052015-08-06 Pedro Alves <palves@redhat.com>
3406
3407 * linux-low.c (linux_wait_1): Move fork event output out of the
3408 !report_to_gdb check. Pass event_child->waitstatus to
3409 target_waitstatus_to_string instead of ourstatus.
3410
524b57e6
YQ
34112015-08-04 Yao Qi <yao.qi@linaro.org>
3412
3413 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3414 if current_thread is 32 bit.
3415
6085d6f6
YQ
34162015-08-04 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3419 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3420 * server.c (extended_protocol): Remove "static".
3421 * server.h (extended_protocol): Declare it.
3422
8a7e4587
YQ
34232015-08-04 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3426 both aarch64 and aarch32.
3427 (aarch64_set_pc): Likewise.
3428
3b53ae99
YQ
34292015-08-04 Yao Qi <yao.qi@linaro.org>
3430
3431 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3432 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3433 arm-with-neon.xml to srv_xmlfiles.
3434 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3435 (is_64bit_tdesc): New function.
3436 (aarch64_linux_read_description): New function.
3437 (aarch64_arch_setup): Call aarch64_linux_read_description.
3438 (regs_info): Rename to regs_info_aarch64.
3439 (aarch64_regs_info): Return right regs_info.
3440 (initialize_low_arch): Call initialize_low_arch_aarch32.
3441
bd9e6534
YQ
34422015-08-04 Yao Qi <yao.qi@linaro.org>
3443
3444 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3445 * linux-aarch32-low.c: New file.
3446 * linux-aarch32-low.h: New file.
3447 * linux-arm-low.c (arm_fill_gregset): Move it to
3448 linux-aarch32-low.c.
3449 (arm_store_gregset): Likewise.
3450 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3451 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3452 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3453 (regs_info): Rename to regs_info_arm.
3454 (arm_regs_info): Return regs_info_aarch32 if
3455 have_ptrace_getregset is 1 and target description is
3456 arm_with_neon or arm_with_vfpv3.
3457 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3458 Call initialize_low_arch_aarch32 instead.
3459
ded48a5e
YQ
34602015-08-04 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3463 * linux-low.c: ... here.
3464 * linux-low.h (have_ptrace_getregset): Declare it.
3465
96e9210f
PA
34662015-08-04 Pedro Alves <palves@redhat.com>
3467
3468 * thread-db.c (struct thread_db): Use new typedefs.
3469 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3470 CHK calls.
3471 (disable_thread_event_reporting): Cast result of dlsym to
3472 destination function pointer type.
3473 (thread_db_mourn): Use td_ta_delete_ftype.
3474
af60a1ef
SL
34752015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3476
3477 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3478 arch variant.
3479 (CDX_BREAKPOINT): Define for R2.
3480 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3481 (the_low_target): Add comments.
3482
e8b41681
YQ
34832015-07-30 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-arm-low.c (arm_hwcap): Remove it.
3486 (arm_read_description): New local variable arm_hwcap. Don't
3487 set arm_hwcap to zero.
3488
89abb039
YQ
34892015-07-30 Yao Qi <yao.qi@linaro.org>
3490
3491 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3492 Use regcache->tdesc instead.
3493 (arm_store_wmmxregset): Likewise.
3494 (arm_fill_vfpregset): Likewise.
3495 (arm_store_vfpregset): Likewise.
3496
deca266c
YQ
34972015-07-30 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-arm-low.c: Include arch/arm.h.
3500 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3501 (arm_store_gregset): Likewise.
3502
aa58a496
SM
35032015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3504
3505 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3506 ptrace's 4th parameter.
3507
50904b25
YQ
35082015-07-27 Yao Qi <yao.qi@linaro.org>
3509
3510 * configure.srv (case aarch64*-*-linux*): Don't set
3511 srv_linux_usrregs.
3512
5826e159
PA
35132015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3514
3515 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3516 sys/ptrace.h.
3517 * linux-arm-low.c: Likewise.
3518 * linux-cris-low.c: Likewise.
3519 * linux-crisv32-low.c: Likewise.
3520 * linux-low.c: Likewise.
3521 * linux-m68k-low.c: Likewise.
3522 * linux-mips-low.c: Likewise.
3523 * linux-nios2-low.c: Likewise.
3524 * linux-s390-low.c: Likewise.
3525 * linux-sparc-low.c: Likewise.
3526 * linux-tic6x-low.c: Likewise.
3527 * linux-tile-low.c: Likewise.
3528 * linux-x86-low.c: Likewise.
3529
54019719
PA
35302015-07-24 Pedro Alves <palves@redhat.com>
3531
3532 * config.in: Regenerate.
3533 * configure: Regenerate.
3534
eb7aa561
PA
35352015-07-24 Pedro Alves <palves@redhat.com>
3536
3537 * acinclude.m4: Include ../ptrace.m4.
3538 * configure.ac: Call GDB_AC_PTRACE.
3539 * config.in, configure: Regenerate.
3540
55d7b841
YQ
35412015-07-24 Yao Qi <yao.qi@linaro.org>
3542
3543 * linux-low.c (linux_create_inferior): Remove setting to
3544 proc->priv->new_inferior.
3545 (linux_attach): Likewise.
3546 (linux_low_filter_event): Likewise.
3547 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3548
c06cbd92
YQ
35492015-07-24 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-low.c (linux_arch_setup): New function.
3552 (linux_low_filter_event): If proc->tdesc is NULL and
3553 proc->attached is true, call the_low_target.arch_setup.
3554 Otherwise, keep status pending, and return.
3555 (linux_resume_one_lwp_throw): Don't call get_pc if
3556 thread->while_stepping isn't NULL. Don't call
3557 get_thread_regcache if proc->tdesc is NULL.
3558 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3559 (linux_target_ops): Install arch_setup.
3560 * server.c (start_inferior): Call the_target->arch_setup.
3561 * target.h (struct target_ops) <arch_setup>: New field.
3562 (target_arch_setup): New marco.
3563 * lynx-low.c (lynx_target_ops): Update.
3564 * nto-low.c (nto_target_ops): Update.
3565 * spu-low.c (spu_target_ops): Update.
3566 * win32-low.c (win32_target_ops): Update.
3567
5ae3ebba
YQ
35682015-07-24 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-low.c (linux_add_process): Don't set
3571 proc->priv->new_inferior.
3572 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3573 (linux_attach): Likewise.
3574
eb97750b
YQ
35752015-07-24 Yao Qi <yao.qi@linaro.org>
3576
3577 * server.c (start_inferior): Code refactor.
3578
51aee833
YQ
35792015-07-24 Yao Qi <yao.qi@linaro.org>
3580
3581 * server.c (process_serial_event): Set general_thread.
3582
af1b22f3
YQ
35832015-07-21 Yao Qi <yao.qi@linaro.org>
3584
3585 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3586 aarch64_linux_get_debug_reg_capacity.
3587
554717a3
YQ
35882015-07-17 Yao Qi <yao.qi@linaro.org>
3589
3590 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3591 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3592 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3593 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3594 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3595 (AARCH64_HWP_ALIGNMENT): Likewise.
3596 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3597 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3598 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3599 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3600 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3601 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3602 (struct aarch64_debug_reg_state): Likewise.
3603 (struct arch_lwp_info): Likewise.
3604 (aarch64_align_watchpoint): Likewise.
3605 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3606 (aarch64_watchpoint_length): Likewise.
3607 (aarch64_point_encode_ctrl_reg): Likewise
3608 (aarch64_point_is_aligned): Likewise.
3609 (aarch64_align_watchpoint): Likewise.
3610 (aarch64_linux_set_debug_regs):
3611 (aarch64_dr_state_insert_one_point): Likewise.
3612 (aarch64_dr_state_remove_one_point): Likewise.
3613 (aarch64_handle_breakpoint): Likewise.
3614 (aarch64_handle_aligned_watchpoint): Likewise.
3615 (aarch64_handle_unaligned_watchpoint): Likewise.
3616 (aarch64_handle_watchpoint): Likewise.
3617
c67ca4de
YQ
36182015-07-17 Yao Qi <yao.qi@linaro.org>
3619
3620 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3621 and don't aarch64_get_debug_reg_state. All callers update.
3622 (aarch64_handle_aligned_watchpoint): Likewise.
3623 (aarch64_handle_unaligned_watchpoint): Likewise.
3624 (aarch64_handle_watchpoint): Likewise.
3625 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3626 (aarch64_remove_point): Likewise.
3627
25abf979
YQ
36282015-07-17 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3631 debug_printf.
3632 (aarch64_handle_unaligned_watchpoint): Likewise.
3633
db1ff28b
JK
36342015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3635
3636 Revert the previous 3 commits:
3637 Move gdb_regex* to common/
3638 Move linux_find_memory_regions_full & co.
3639 gdbserver build-id attribute generator
3640
700ca40f
JK
36412015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3642 Jan Kratochvil <jan.kratochvil@redhat.com>
3643
3644 gdbserver build-id attribute generator.
3645 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3646 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3647 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3648 (find_phdr): New.
3649 (get_dynamic): Use find_pdhr to traverse program headers.
3650 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3651 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3652 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3653 (get_hex_build_id): New.
3654 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3655 to reply XML document.
3656
9904185c
JK
36572015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3658 Jan Kratochvil <jan.kratochvil@redhat.com>
3659
3660 * target.c: Include target/target-utils.h and fcntl.h.
3661 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3662 (target_fileio_read_stralloc): New functions.
3663
6e5b4429
JK
36642015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3665
3666 * Makefile.in (OBS): Add gdb_regex.o.
3667 (gdb_regex.o): New.
3668 * config.in: Rebuilt.
3669 * configure: Rebuilt.
3670
ddc98fbf
JK
36712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3672 Jan Kratochvil <jan.kratochvil@redhat.com>
3673
3674 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3675 * Makefile.in (OBS): Add target-utils.o.
3676 (linux-maps.o, target-utils.o): New.
3677 * configure.srv (srv_linux_obj): Add linux-maps.o.
3678
e57bb7a0
PL
36792015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3680
3681 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3682 function, return 1.
3683 (the_low_target): Install it.
3684
586b02a9
PA
36852015-07-14 Pedro Alves <palves@redhat.com>
3686
3687 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3688 Instead, ignore ECHILD, and throw an error for other errnos.
3689
58c1b36c
PA
36902015-07-10 Pedro Alves <palves@redhat.com>
3691
3692 * event-loop.c (struct callback_event) <data>: Change type to
3693 gdb_client_data instance instead of gdb_client_data pointer.
3694 (append_callback_event): Adjust.
3695
421530db
PL
36962015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3697
3698 * linux-aarch64-low.c: Add comments for each linux_target_ops
3699 method. Remove comments already covered in target_ops and
3700 linux_target_ops definitions.
3701 (the_low_target): Add comments for each unimplemented method.
3702
c2d65f38
YQ
37032015-07-09 Yao Qi <yao.qi@linaro.org>
3704
3705 * linux-aarch64-low.c (aarch64_regmap): Remove.
3706 (aarch64_usrregs_info): Remove.
3707 (regs_info): Set field usrregs to NULL.
3708
b20a6524
MM
37092015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3710
3711 * linux-low.c: Include "rsp-low.h"
3712 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3713 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3714 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3715 (handle_btrace_enable_pt): New.
3716 (handle_btrace_general_set): Support "pt".
3717 (handle_btrace_conf_general_set): Support "pt:size".
3718
96c97461
PL
37192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3720
3721 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3722 Z_PACKET_SW_BP.
3723
37d66942
PL
37242015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3725
3726 * linux-aarch64-low.c: Remove comment about endianness.
3727 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3728 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3729 memcmp.
3730
dc06243f
GB
37312015-06-24 Gary Benson <gbenson@redhat.com>
3732
3733 * linux-i386-ipa.c (stdint.h): Do not include.
3734 * lynx-i386-low.c (stdint.h): Likewise.
3735 * lynx-ppc-low.c (stdint.h): Likewise.
3736 * mem-break.c (stdint.h): Likewise.
3737 * thread-db.c (stdint.h): Likewise.
3738 * tracepoint.c (stdint.h): Likewise.
3739 * win32-low.c (stdint.h): Likewise.
3740
124e13d9
SM
37412015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3742
3743 * server.c (write_qxfer_response): Update call to
3744 remote_escape_output.
3745
909c2cda
JK
37462015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3747 Jan Kratochvil <jan.kratochvil@redhat.com>
3748
3749 Merge multiple hex conversions.
3750 * gdbreplay.c (tohex): Rename to 'fromhex'.
3751 (logchar): Use fromhex.
3752
24c05f46
JK
37532015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3754
3755 * server.c (handle_qxfer_libraries): Set `version' attribute for
3756 <library-list>.
3757
14d2069a
GB
37582015-06-10 Gary Benson <gbenson@redhat.com>
3759
3760 * target.h (struct target_ops) <multifs_open>: New field.
3761 <multifs_unlink>: Likewise.
3762 <multifs_readlink>: Likewise.
3763 * linux-low.c (nat/linux-namespaces.h): New include.
3764 (linux_target_ops): Initialize the_target->multifs_open,
3765 the_target->multifs_unlink and the_target->multifs_readlink.
3766 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3767 * hostio.c (hostio_fs_pid): New static variable.
3768 (hostio_handle_new_gdb_connection): New function.
3769 (handle_setfs): Likewise.
3770 (handle_open): Use the_target->multifs_open as appropriate.
3771 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3772 (handle_readlink): Use the_target->multifs_readlink as
3773 appropriate.
3774 (handle_vFile): Handle vFile:setfs packets.
3775 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3776 after target_handle_new_gdb_connection.
3777
4b8b5e72
GB
37782015-06-10 Gary Benson <gbenson@redhat.com>
3779
3780 * configure.ac (AC_CHECK_FUNCS): Add setns.
3781 * config.in: Regenerate.
3782 * configure: Likewise.
3783 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3784 (linux-namespaces.o): New rule.
3785 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3786
3ac2e371
GB
37872015-06-09 Gary Benson <gbenson@redhat.com>
3788
3789 * hostio.c (handle_open): Process mode argument with
3790 fileio_to_host_mode.
3791
ca9b78ce
YQ
37922015-06-01 Yao Qi <yao.qi@linaro.org>
3793
3794 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3795 * linux-x86-low.c: Likewise.
3796
bfacd19d
DB
37972015-05-28 Don Breazeal <donb@codesourcery.com>
3798
3799 * linux-low.c (handle_extended_wait): Initialize
3800 thread_info.last_resume_kind for new fork children.
3801
452003ef
PA
38022015-05-15 Pedro Alves <palves@redhat.com>
3803
3804 * target.h (target_handle_new_gdb_connection): Rewrite using if
3805 wrapped in do/while.
3806
1041a03c
JB
38072015-05-14 Joel Brobecker <brobecker@adacore.com>
3808
3809 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3810 * configure, config.in: Regenerate.
3811 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3812 Declare typedef.
3813
c269dbdb
DB
38142015-05-12 Don Breazeal <donb@codesourcery.com>
3815
3816 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3817 PTRACE_EVENT_VFORK_DONE.
3818 (linux_low_ptrace_options, extended_event_reported): Add vfork
3819 events.
3820 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3821 and "vforkdone" for RSP 'T' Stop Reply Packet.
3822 * server.h (report_vfork_events): Declare
3823 global variable.
3824
3a8a0396
DB
38252015-05-12 Don Breazeal <donb@codesourcery.com>
3826
3827 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3828 (the_low_target) <new_fork>: Initialize new member.
3829 * linux-arm-low.c (arm_new_fork): New function.
3830 (the_low_target) <new_fork>: Initialize new member.
3831 * linux-low.c (handle_extended_wait): Call new target function
3832 new_fork.
3833 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3834 * linux-mips-low.c (mips_add_watchpoint): New function
3835 extracted from mips_insert_point.
3836 (the_low_target) <new_fork>: Initialize new member.
3837 (mips_linux_new_fork): New function.
3838 (mips_insert_point): Call mips_add_watchpoint.
3839 * linux-x86-low.c (x86_linux_new_fork): New function.
3840 (the_low_target) <new_fork>: Initialize new member.
3841
de0d863e
DB
38422015-05-12 Don Breazeal <donb@codesourcery.com>
3843
3844 * linux-low.c (handle_extended_wait): Implement return value,
3845 rename argument 'event_child' to 'event_lwp', handle
3846 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3847 (linux_low_ptrace_options): New function.
3848 (linux_low_filter_event): Call linux_low_ptrace_options,
3849 use different argument fo linux_enable_event_reporting,
3850 use return value from handle_extended_wait.
3851 (extended_event_reported): New function.
3852 (linux_wait_1): Call extended_event_reported and set
3853 status to report fork events.
3854 (linux_write_memory): Add pid to debug message.
3855 (reset_lwp_ptrace_options_callback): New function.
3856 (linux_handle_new_gdb_connection): New function.
3857 (linux_target_ops): Initialize new structure member.
3858 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3859 * lynx-low.c: Initialize new structure member.
3860 * remote-utils.c (prepare_resume_reply): Implement stop reason
3861 "fork" for "T" stop message.
3862 * server.c (handle_query): Call handle_new_gdb_connection.
3863 * server.h (report_fork_events): Declare global flag.
3864 * target.h (struct target_ops) <handle_new_gdb_connection>:
3865 New member.
3866 (target_handle_new_gdb_connection): New macro.
3867 * win32-low.c: Initialize new structure member.
3868
ddcbc397
DB
38692015-05-12 Don Breazeal <donb@codesourcery.com>
3870
3871 * mem-break.c (APPEND_TO_LIST): Define macro.
3872 (clone_agent_expr): New function.
3873 (clone_one_breakpoint): New function.
3874 (clone_all_breakpoints): New function.
3875 * mem-break.h: Declare new functions.
3876
89245bc0
DB
38772015-05-12 Don Breazeal <donb@codesourcery.com>
3878
3879 * linux-low.c (linux_supports_fork_events): New function.
3880 (linux_supports_vfork_events): New function.
3881 (linux_target_ops): Initialize new structure members.
3882 (initialize_low): Call linux_check_ptrace_features.
3883 * lynx-low.c (lynx_target_ops): Initialize new structure
3884 members.
3885 * server.c (report_fork_events, report_vfork_events):
3886 New global flags.
3887 (handle_query): Add new features to qSupported packet and
3888 response.
3889 (captured_main): Initialize new global variables.
3890 * target.h (struct target_ops) <supports_fork_events>:
3891 New member.
3892 <supports_vfork_events>: New member.
3893 (target_supports_fork_events): New macro.
3894 (target_supports_vfork_events): New macro.
3895 * win32-low.c (win32_target_ops): Initialize new structure
3896 members.
3897
835205d0
GB
38982015-05-12 Gary Benson <gbenson@redhat.com>
3899
3900 * server.c (handle_qxfer_exec_file): Use current process
3901 if annex is empty.
3902
21e94bd9
SL
39032015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3904
3905 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3906 Remove HAVE_PTRACE_GETREGS conditionals.
3907 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3908 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3909
45614f15
YQ
39102015-05-08 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-low.c (linux_supports_conditional_breakpoints): New
3913 function.
3914 (linux_target_ops): Install new target method.
3915 * lynx-low.c (lynx_target_ops): Install NULL hook for
3916 supports_conditional_breakpoints.
3917 * nto-low.c (nto_target_ops): Likewise.
3918 * spu-low.c (spu_target_ops): Likewise.
3919 * win32-low.c (win32_target_ops): Likewise.
3920 * server.c (handle_query): Check
3921 target_supports_conditional_breakpoints.
3922 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3923 New field.
3924 (target_supports_conditional_breakpoints): New macro.
3925
80ad801e
PA
39262015-05-06 Pedro Alves <palves@redhat.com>
3927
3928 PR server/18081
3929 * server.c (start_inferior): If the process exits, mourn it.
3930
819843c7
GB
39312015-04-21 Gary Benson <gbenson@redhat.com>
3932
3933 * hostio.c (fileio_open_flags_to_host): Factored out to
3934 fileio_to_host_openflags in common/fileio.c. Single use
3935 updated.
3936
a2d5a9d7
MF
39372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3938
3939 * linux-xtensa-low.c (xtensa_fill_gregset)
3940 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3941 XCHAL_HAVE_LOOP.
3942
deb44829
MF
39432015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3944
3945 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3946 (regs_info): Replace usrregs pointer with NULL.
3947
e57f1de3
GB
39482015-04-17 Gary Benson <gbenson@redhat.com>
3949
3950 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3951 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3952 * server.c (handle_qxfer_exec_file): New function.
3953 (qxfer_packets): Add exec-file entry.
3954 (handle_query): Report qXfer:exec-file:read as supported packet.
3955
62828379
RN
39562015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3957
3958 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3959
b88bb450
GB
39602015-04-09 Gary Benson <gbenson@redhat.com>
3961
3962 * hostio-errno.c (errno_to_fileio_error): Remove function.
3963 Update caller to use remote_fileio_to_fio_error.
3964
c8f4bfdd
YQ
39652015-04-09 Yao Qi <yao.qi@linaro.org>
3966
3967 * linux-low.c (linux_insert_point): Call
3968 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3969 (linux_remove_point): Call remove_memory_breakpoint if type is
3970 raw_bkpt_type_sw.
3971 * linux-x86-low.c (x86_insert_point): Don't call
3972 insert_memory_breakpoint.
3973 (x86_remove_point): Don't call remove_memory_breakpoint.
3974
41f98f02
PA
39752015-04-01 Pedro Alves <palves@redhat.com>
3976 Cleber Rosa <crosa@redhat.com>
3977
3978 * server.c (gdbserver_usage): Reorganize and extend the usage
3979 message.
3980
2bf6fb9d
PA
39812015-03-24 Pedro Alves <palves@redhat.com>
3982
3983 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3984 output. Also dump TRAP_TRACE.
3985 (linux_low_filter_event): In debug output, distinguish a
3986 resume_stop SIGSTOP from a delayed SIGSTOP.
3987
369f6daa
GB
39882015-03-24 Gary Benson <gbenson@redhat.com>
3989
3990 * linux-x86-low.c (x86_linux_new_thread): Moved to
3991 nat/x86-linux.c.
3992 (x86_linux_prepare_to_resume): Likewise.
3993
8e5d4070
GB
39942015-03-24 Gary Benson <gbenson@redhat.com>
3995
3996 * Makefile.in (x86-linux-dregs.o): New rule.
3997 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3998 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3999 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4000 (x86_linux_dr_get): Likewise.
4001 (x86_linux_dr_set): Likewise.
4002 (update_debug_registers_callback): Likewise.
4003 (x86_linux_dr_set_addr): Likewise.
4004 (x86_linux_dr_get_addr): Likewise.
4005 (x86_linux_dr_set_control): Likewise.
4006 (x86_linux_dr_get_control): Likewise.
4007 (x86_linux_dr_get_status): Likewise.
4008 (x86_linux_update_debug_registers): Likewise.
4009
2b95d440
GB
40102015-03-24 Gary Benson <gbenson@redhat.com>
4011
4012 * linux-x86-low.c (x86_linux_update_debug_registers):
4013 New function, factored out from...
4014 (x86_linux_prepare_to_resume): ...this.
4015
14b0bc68
GB
40162015-03-24 Gary Benson <gbenson@redhat.com>
4017
4018 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4019 (x86_linux_dr_set): Likewise.
4020 (update_debug_registers_callback): Likewise.
4021 (x86_linux_dr_set_addr): Likewise.
4022 (x86_linux_dr_get_addr): Likewise.
4023 (x86_linux_dr_set_control): Likewise.
4024 (x86_linux_dr_get_control): Likewise.
4025 (x86_linux_dr_get_status): Likewise.
4026 (x86_linux_prepare_to_resume): Likewise.
4027
5dfe6ca8
GB
40282015-03-24 Gary Benson <gbenson@redhat.com>
4029
4030 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4031 Use perror_with_name. Pass string through gettext.
4032 (x86_linux_dr_set): Likewise.
4033
d33472ad
GB
40342015-03-24 Gary Benson <gbenson@redhat.com>
4035
4036 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4037 (x86_linux_dr_set_addr): ...this.
4038 (x86_dr_low_get_addr): Rename to...
4039 (x86_linux_dr_get_addr): ...this.
4040 (x86_dr_low_set_control): Rename to...
4041 (x86_linux_dr_set_control): ...this.
4042 (x86_dr_low_get_control): Rename to...
4043 (x86_linux_dr_get_control): ...this.
4044 (x86_dr_low_get_status): Rename to...
4045 (x86_linux_dr_get_status): ...this.
4046 (x86_dr_low): Update with new function names.
4047
4b134ca1
GB
40482015-03-24 Gary Benson <gbenson@redhat.com>
4049
4050 * Makefile.in (x86-linux.o): New rule.
4051 * configure.srv: Add x86-linux.o to relevant targets.
4052 * linux-low.c (lwp_set_arch_private_info): New function.
4053 (lwp_arch_private_info): Likewise.
4054 * linux-x86-low.c: Include nat/x86-linux.h.
4055 (arch_lwp_info): Removed structure.
4056 (update_debug_registers_callback):
4057 Use lwp_set_debug_registers_changed.
4058 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4059 and lwp_set_debug_registers_changed.
4060 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4061
34c703da
GB
40622015-03-24 Gary Benson <gbenson@redhat.com>
4063
4064 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4065 * linux-arm-low.c (arm_new_thread): Likewise.
4066 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4067 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4068 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4069 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4070
cff068da
GB
40712015-03-24 Gary Benson <gbenson@redhat.com>
4072
4073 * linux-low.c (ptid_of_lwp): New function.
4074 (lwp_is_stopped): Likewise.
4075 (lwp_stop_reason): Likewise.
4076 * linux-x86-low.c (update_debug_registers_callback):
4077 Use lwp_is_stopped.
4078 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4079 lwp_stop_reason.
4080
b2f7c7e8
GB
40812015-03-24 Gary Benson <gbenson@redhat.com>
4082
4083 * linux-low.h (linux_stop_lwp): Remove declaration.
4084
6d4ee8c6
GB
40852015-03-24 Gary Benson <gbenson@redhat.com>
4086
4087 * linux-low.h: Include nat/linux-nat.h.
4088 * linux-low.c (iterate_over_lwps_args): New structure.
4089 (iterate_over_lwps_filter): New function.
4090 (iterate_over_lwps): Likewise.
4091 * linux-x86-low.c (update_debug_registers_callback):
4092 Update signature to what iterate_over_lwps expects.
4093 Remove PID check that iterate_over_lwps now performs.
4094 (x86_dr_low_set_addr): Use iterate_over_lwps.
4095 (x86_dr_low_set_control): Likewise.
4096
70a0bb6b
GB
40972015-03-24 Gary Benson <gbenson@redhat.com>
4098
4099 * linux-x86-low.c (x86_debug_reg_state): New function.
4100 (x86_linux_prepare_to_resume): Use the above.
4101
7b669087
GB
41022015-03-24 Gary Benson <gbenson@redhat.com>
4103
4104 * linux-low.c (current_lwp_ptid): New function.
4105 * linux-x86-low.c: Include nat/linux-nat.h.
4106 (x86_dr_low_get_addr): Use current_lwp_ptid.
4107 (x86_dr_low_get_control): Likewise.
4108 (x86_dr_low_get_status): Likewise.
4109
eef49a3d
PA
41102015-03-20 Pedro Alves <palves@redhat.com>
4111
4112 * tracepoint.c (cmd_qtstatus): Make "str" const.
4113
b2333d22
PA
41142015-03-20 Pedro Alves <palves@redhat.com>
4115
4116 * server.c (handle_general_set): Make "req_str" const.
4117
23f238d3
PA
41182015-03-19 Pedro Alves <palves@redhat.com>
4119
4120 * linux-low.c (linux_resume_one_lwp): Rename to ...
4121 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4122 instead call perror_with_name.
4123 (check_ptrace_stopped_lwp_gone): New function.
4124 (linux_resume_one_lwp): Reimplement as wrapper around
4125 linux_resume_one_lwp_throw that swallows errors if the LWP is
4126 gone.
4127
91baf43f
PA
41282015-03-19 Pedro Alves <palves@redhat.com>
4129
4130 * linux-low.c (count_events_callback, select_event_lwp_callback):
4131 No longer check whether the thread has resume_stop as last resume
4132 kind.
4133
8bf3b159
PA
41342015-03-19 Pedro Alves <palves@redhat.com>
4135
4136 * linux-low.c (count_events_callback, select_event_lwp_callback):
4137 Use the lwp's status_pending_p field, not the thread's.
4138
b90fc188
PA
41392015-03-19 Pedro Alves <palves@redhat.com>
4140
4141 * linux-low.c (select_event_lwp_callback): Update comments to
4142 no longer mention SIGTRAP.
4143
464b0089
GB
41442015-03-18 Gary Benson <gbenson@redhat.com>
4145
4146 * server.c (handle_query): Do not report vFile:fstat as supported.
4147
aa9e327f
GB
41482015-03-11 Gary Benson <gbenson@redhat.com>
4149
4150 * hostio.c (sys/types.h): New include.
4151 (sys/stat.h): Likewise.
4152 (common-remote-fileio.h): Likewise.
4153 (handle_fstat): New function.
4154 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4155
791c0056
GB
41562015-03-11 Gary Benson <gbenson@redhat.com>
4157
4158 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4159 struct stat.st_blocks and struct stat.st_blksize.
4160 * configure: Regenerate.
4161 * config.in: Likewise.
4162 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4163 (OBS): Add common-remote-fileio.o.
4164 (common-remote-fileio.o): New rule.
4165
9a9df970
PA
41662015-03-09 Pedro Alves <palves@redhat.com>
4167
4168 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4169 'struct sockaddr' pointer in 'accept' call.
4170
9eb1356e
PA
41712015-03-09 Pedro Alves <palves@redhat.com>
4172
4173 Revert:
4174 2015-03-07 Pedro Alves <palves@redhat.com>
4175 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4176 or <winsock2.h> here. Instead include "gdb_socket.h".
4177 (remote_open): Use union gdb_sockaddr_u.
4178 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4179 or <winsock2.h> here. Instead include "gdb_socket.h".
4180 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4181 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4182 or <sys/un.h>.
4183 (init_named_socket, gdb_agent_helper_thread): Use union
4184 gdb_sockaddr_u.
4185
aac331e4
PA
41862015-03-07 Pedro Alves <palves@redhat.com>
4187
4188 * configure.ac (build_warnings): Move
4189 -Wdeclaration-after-statement to the C-specific set.
4190 * configure: Regenerate.
4191
366c75fc
PA
41922015-03-07 Pedro Alves <palves@redhat.com>
4193
4194 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4195 or <winsock2.h> here. Instead include "gdb_socket.h".
4196 (remote_open): Use union gdb_sockaddr_u.
4197 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4198 or <winsock2.h> here. Instead include "gdb_socket.h".
4199 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4200 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4201 or <sys/un.h>.
4202 (init_named_socket, gdb_agent_helper_thread): Use union
4203 gdb_sockaddr_u.
4204
492d29ea
PA
42052015-03-07 Pedro Alves <palves@redhat.com>
4206
4207 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4208 instead.
4209
60a191ed
YQ
42102015-03-06 Yao Qi <yao.qi@linaro.org>
4211
4212 * linux-aarch64-low.c (aarch64_insert_point): Use
4213 show_debug_regs as a boolean.
4214 (aarch64_remove_point): Likewise.
4215
f5771b1d
PA
42162015-03-05 Pedro Alves <palves@redhat.com>
4217
4218 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4219 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4220 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4221 * nto-low.c (nto_target_ops): Likewise.
4222 * spu-low.c (spu_target_ops): Likewise.
4223 * win32-low.c (win32_target_ops): Likewise.
4224
3e572f71
PA
42252015-03-04 Pedro Alves <palves@redhat.com>
4226
72f4393d 4227 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4228 Decide whether a breakpoint triggered based on the SIGTRAP's
4229 siginfo.si_code.
72f4393d
L
4230 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4231 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4232 (linux_low_filter_event): Check for breakpoints before checking
4233 watchpoints.
4234 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4235 siginfo.si_code.
72f4393d
L
4236 (linux_stopped_by_sw_breakpoint)
4237 (linux_supports_stopped_by_sw_breakpoint)
4238 (linux_stopped_by_hw_breakpoint)
4239 (linux_supports_stopped_by_hw_breakpoint): New functions.
4240 (linux_target_ops): Install new target methods.
3e572f71 4241
1ec68e26
PA
42422015-03-04 Pedro Alves <palves@redhat.com>
4243
4244 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4245 * server.c (swbreak_feature, hwbreak_feature): New globals.
4246 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4247 (captured_main): Clear swbreak_feature and hwbreak_feature.
4248 * server.h (swbreak_feature, hwbreak_feature): Declare.
4249 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4250 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4251 supports_stopped_by_hw_breakpoint>: New fields.
4252 (target_supports_stopped_by_sw_breakpoint)
4253 (target_stopped_by_sw_breakpoint)
4254 (target_supports_stopped_by_hw_breakpoint)
4255 (target_stopped_by_hw_breakpoint): Declare.
4256
15c66dd6
PA
42572015-03-04 Pedro Alves <palves@redhat.com>
4258
4259 enum lwp_stop_reason -> enum target_stop_reason
4260 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4261 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4262 (linux_wait_1, stuck_in_jump_pad_callback)
4263 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4264 (linux_stopped_by_watchpoint):
4265 * linux-low.h (enum lwp_stop_reason): Delete.
4266 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4267 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4268
98fc70d6
YQ
42692015-03-04 Yao Qi <yao.qi@linaro.org>
4270
4271 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4272
dd2ac174
GB
42732015-03-03 Gary Benson <gbenson@redhat.com>
4274
4275 * hostio.c (handle_vFile): Fix prefix lengths.
4276
d68e53f4
MM
42772015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4278
4279 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4280 ptr_bits.
4281
bf2d68ab
AA
42822015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4283
4284 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4285 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4286 (clean): Add "rm -f" for above C files.
4287 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4288 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4289 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4290 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4291 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4292 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4293 (init_registers_s390x_vx_linux64)
4294 (init_registers_s390x_tevx_linux64)
4295 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4296 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4297 declarations.
4298 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4299 (s390_store_vxrs_high): New functions.
4300 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4301 NT_S390_VXRS_HIGH.
4302 (s390_arch_setup): Add logic for selecting one of the new target
4303 descriptions. Activate the new vector regsets if applicable.
4304 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4305 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4306 and init_registers_s390x_tevx_linux64.
4307
c966a859
PA
43082015-03-01 Pedro Alves <palves@redhat.com>
4309
4310 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4311 parameter.
4312
4180215b
PA
43132015-02-27 Pedro Alves <palves@redhat.com>
4314
4315 * linux-x86-low.c (u_debugreg_offset): New function.
4316 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4317
749bab01
PA
43182015-02-27 Pedro Alves <palves@redhat.com>
4319
4320 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4321 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4322 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4323 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4324 (ps_lsetfpregs, ps_getpid)
4325 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4326 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4327 (ps_lsetxregs, ps_plog): Declare.
4328
3c14e5a3
PA
43292015-02-27 Pedro Alves <palves@redhat.com>
4330
4331 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4332 IP_AGENT_EXPORT_FUNC.
4333 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4334 IP_AGENT_EXPORT_FUNC.
4335 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4336 (IP_AGENT_EXPORT): Delete.
4337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4338 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4339 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4340 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4341 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4342 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4343 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4344 (traceframe_read_count, traceframe_write_count)
4345 (traceframes_created, trace_state_variables, get_raw_reg)
4346 (get_trace_state_variable_value, set_trace_state_variable_value)
4347 (ust_loaded, helper_thread_id, cmd_buf): Use
4348 IPA_SYM_EXPORTED_NAME.
4349 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4350 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4351 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4352 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4353 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4354 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4355 EXTERN_C_PUSH/EXTERN_C_POP.
4356 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4357 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4358 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4359 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4360 (traceframe_write_count, traceframe_read_count)
4361 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4362 (about_to_request_buffer_space, get_trace_state_variable_value)
4363 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4364 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4365 EXTERN_C_PUSH/EXTERN_C_POP.
4366 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4367 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4368 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4369 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4370 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4371 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4372 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4373 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4374 Define.
4375 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4376 (IP_AGENT_EXPORT_VAR_DECL): Define.
4377 (tracing): Declare.
4378 (gdb_agent_get_raw_reg): Declare.
4379
fe978cb0
PA
43802015-02-27 Tom Tromey <tromey@redhat.com>
4381 Pedro Alves <palves@redhat.com>
4382
4383 Rename symbols whose names are reserved C++ keywords throughout.
4384
3bc3d82a
PA
43852015-02-27 Pedro Alves <palves@redhat.com>
4386
4387 * Makefile.in (COMPILER): New, get it from autoconf.
4388 (CXX): Get from autoconf instead.
4389 (COMPILE.pre): Use COMPILER.
4390 (CC-LD): Rename to ...
4391 (CC_LD): ... this. Use COMPILER.
4392 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4393 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4394 * acinclude.m4: Include build-with-cxx.m4.
4395 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4396 Disable -Werror by default if building in C++ mode.
4397 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4398 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4399 the C++ compiler. Save/restore CXXFLAGS too.
4400 * configure: Regenerate.
4401
07697489
PA
44022015-02-27 Pedro Alves <palves@redhat.com>
4403
4404 * acinclude.m4: Include libiberty.m4.
4405 * configure.ac: Call libiberty_INIT.
4406 * config.in, configure: Regenerate.
4407
9beb7c4e
PA
44082015-02-26 Pedro Alves <palves@redhat.com>
4409
4410 * linux-low.c (linux_wait_1): When incrementing the PC past a
4411 program breakpoint always use the_low_target.breakpoint_len as
4412 increment, rather than the maximum between that and
4413 the_low_target.decr_pc_after_break.
4414
8090aef2
PA
44152015-02-23 Pedro Alves <palves@redhat.com>
4416
4417 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4418 thread was doing a step-over; always adjust the PC if
4419 we stepped over a permanent breakpoint.
4420 (linux_wait_1): If we stepped over breakpoint that was on top of a
4421 permanent breakpoint, manually advance the PC past it.
4422
bc9540e8
PA
44232015-02-23 Pedro Alves <palves@redhat.com>
4424
4425 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4426 modes.
4427 (x86_fill_gregset, x86_store_gregset): Use it when handling
4428 $orig_eax.
4429
2db9a427
PA
44302015-02-20 Pedro Alves <palves@redhat.com>
4431
4432 * thread-db.c: Include "nat/linux-procfs.h".
4433 (thread_db_init): Skip listing new threads if the kernel supports
4434 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4435
afa8d396
PA
44362015-02-20 Pedro Alves <palves@redhat.com>
4437
4438 * linux-low.c (status_pending_p_callback): Use ptid_match.
4439
c9587f88
AT
44402015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4441
4442 PR breakpoints/16812
4443 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4444 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4445 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4446
b05ec7a5
AT
44472015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4448
4449 PR breakpoints/15956
4450 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4451
d33501a5
MM
44522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4453
4454 * linux-low.c (linux_low_btrace_conf): Print size.
4455 * server.c (handle_btrace_conf_general_set): New.
4456 (hanle_general_set): Call handle_btrace_conf_general_set.
4457 (handle_query): Report Qbtrace-conf:bts:size as supported.
4458
f4abbc16
MM
44592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4460
4461 * linux-low.c (linux_low_enable_btrace): Update parameters.
4462 (linux_low_btrace_conf): New.
4463 (linux_target_ops)<to_btrace_conf>: Initialize.
4464 * server.c (current_btrace_conf): New.
4465 (handle_btrace_enable): Rename to ...
4466 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4467 to target_enable_btrace. Update comment. Update users.
4468 (handle_qxfer_btrace_conf): New.
4469 (qxfer_packets): Add btrace-conf entry.
4470 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4471 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4472 (target_ops)<read_btrace_conf>: New.
4473 (target_enable_btrace): Update parameters.
4474 (target_read_btrace_conf): New.
4475
043c3577
MM
44762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4477
4478 * server.c (handle_btrace_general_set): Remove call to
4479 target_supports_btrace.
4480 (supported_btrace_packets): New.
4481 (handle_query): Call supported_btrace_packets.
4482 * target.h: include btrace-common.h.
4483 (btrace_target_info): Removed.
4484 (supports_btrace, target_supports_btrace): Update parameters.
4485
734b0e4b
MM
44862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4487
4488 * Makefile.in (SFILES): Add common/btrace-common.c.
4489 (OBS): Add common/btrace-common.o.
4490 (btrace-common.o): Add build rules.
4491 * linux-low: Include btrace-common.h.
4492 (linux_low_read_btrace): Use struct btrace_data. Call
4493 btrace_data_init and btrace_data_fini.
4494
d6c146e9
PA
44952015-02-06 Pedro Alves <palves@redhat.com>
4496
4497 * thread-db.c (find_new_threads_callback): Add debug output.
4498
20ba1ce6
PA
44992015-02-04 Pedro Alves <palves@redhat.com>
4500
4501 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4502 (resume_stopped_resumed_lwps): New function.
4503 (linux_wait_for_event_filtered): Use it.
4504
8cc73a39
SDJ
45052015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4506
4507 * Makefile.in (SFILES): Add linux-personality.c.
4508 (linux-personality.o): New rule.
4509 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4510 list of objects to be built.
4511 * linux-low.c: Include nat/linux-personality.h.
4512 (linux_create_inferior): Remove code to disable address space
4513 randomization (moved to ../nat/linux-personality.c). Create
4514 cleanup to disable address space randomization.
4515
fb23d554
SDJ
45162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4517
4518 * Makefile.in (posix-strerror.o): New rule.
4519 (mingw-strerror.o): Likewise.
4520 * configure: Regenerated.
4521 * configure.ac: Source file ../common/common.host. Initialize new
4522 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4523
cdf43629
YQ
45242015-01-14 Yao Qi <yao@codesourcery.com>
4525
4526 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4527 (ppc-linux.o): New rule.
4528 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4529 * configure.ac: AC_CHECK_FUNCS(getauxval).
4530 * config.in: Re-generated.
4531 * configure: Re-generated.
4532 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4533 ppc64_64bit_inferior_p
4534
514c5338
YQ
45352015-01-14 Yao Qi <yao@codesourcery.com>
4536
4537 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4538 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4539 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4540 (PT_ORIG_R3, PT_TRAP): Likewise.
4541 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4542 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4543 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4544
3368c1e5
JB
45452015-01-10 Joel Brobecker <brobecker@adacore.com>
4546
4547 * i387-fp.c (i387_cache_to_xsave): In look over
4548 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4549 zmmh_low_space field by use of zmmh_high_space.
4550
582511be
PA
45512015-01-09 Pedro Alves <palves@redhat.com>
4552
4553 * linux-low.c (step_over_bkpt): Move higher up in the file.
4554 (handle_extended_wait): Don't store the stop_pc here.
4555 (get_stop_pc): Adjust comments and rename to ...
4556 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4557 stopped for a software breakpoint or hardware breakpoint.
4558 (thread_still_has_status_pending_p): New function.
4559 (status_pending_p_callback): Use
4560 thread_still_has_status_pending_p. If the event is no longer
4561 interesting, resume the LWP.
4562 (handle_tracepoints): Add assert.
4563 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4564 (wstatus_maybe_breakpoint): New function.
4565 (cancel_breakpoint): Delete function.
4566 (check_stopped_by_watchpoint): New function, factored out from
4567 linux_low_filter_event.
4568 (lp_status_maybe_breakpoint): Delete function.
4569 (linux_low_filter_event): Remove filter_ptid argument.
4570 Leave thread group exits pending here. Store the LWP's stop PC.
4571 Always leave events pending.
4572 (linux_wait_for_event_filtered): Pull all events out of the
4573 kernel, and leave them all pending.
4574 (count_events_callback, select_event_lwp_callback): Consider all
4575 events.
4576 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4577 (select_event_lwp): Only give preference to the stepping LWP in
4578 all-stop mode. Adjust comments.
4579 (ignore_event): New function.
4580 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4581 references to cancel_breakpoints. Adjust to renames. Also give
4582 equal priority to all LWPs that have had events in non-stop mode.
4583 If reporting a software breakpoint event, unadjust the LWP's PC.
4584 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4585 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4586 Adjust.
4587 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4588 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4589 (linux_stopped_by_watchpoint): Adjust.
4590 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4591 * linux-low.h (enum lwp_stop_reason): New.
4592 (struct lwp_info) <stop_pc>: Adjust comment.
4593 <stopped_by_watchpoint>: Delete field.
4594 <stop_reason>: New field.
4595 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4596 * mem-break.c (software_breakpoint_inserted_here)
4597 (hardware_breakpoint_inserted_here): New function.
4598 * mem-break.h (software_breakpoint_inserted_here)
4599 (hardware_breakpoint_inserted_here): Declare.
4600 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4601 (cancel_breakpoints): Delete.
4602 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4603 (upload_fast_traceframes): Remove references to
4604 cancel_breakpoints.
4605
a33e3959
PA
46062015-01-09 Pedro Alves <palves@redhat.com>
4607
4608 * thread-db.c (find_new_threads_callback): Ignore thread if the
4609 kernel thread ID is -1.
4610
8784d563
PA
46112015-01-09 Pedro Alves <palves@redhat.com>
4612
4613 * linux-low.c (linux_attach_fail_reason_string): Move to
4614 nat/linux-ptrace.c, and rename.
4615 (linux_attach_lwp): Update comment.
4616 (attach_proc_task_lwp_callback): New function.
4617 (linux_attach): Adjust to rename and use
4618 linux_proc_attach_tgid_threads.
4619 (linux_attach_fail_reason_string): Delete declaration.
4620
76f2b779
JB
46212015-01-01 Joel Brobecker <brobecker@adacore.com>
4622
4623 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4624 * server.c (gdbserver_version): Likewise.
4625
fafcc06a
SDJ
46262014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4627
4628 * remote-utils.c: Include ctype.h.
4629 (input_interrupt): Explicitly handle the case when the char
4630 received is the NUL byte. Improve the printing of non-ASCII
4631 characters.
4632
beed38b8
JB
46332014-12-16 Joel Brobecker <brobecker@adacore.com>
4634
4635 * linux-low.c (linux_low_filter_event): Update call to
4636 linux_enable_event_reporting following the addition of
4637 a new parameter to that function.
4638
bf330350
CU
46392014-12-16 Catalin Udma <catalin.udma@freescale.com>
4640
4641 PR server/17457
4642 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4643 (AARCH64_FPCR_REGNO): Likewise.
4644 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4645 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4646 (aarch64_store_fpregset): Likewise.
4647
5227d625
JB
46482014-12-15 Joel Brobecker <brobecker@adacore.com>
4649
4650 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4651 Remove FIXME comment about assumption about N.
4652
f93b65a0
JB
46532014-12-13 Joel Brobecker <brobecker@adacore.com>
4654
4655 * configure.ac: If large-file support is disabled in GDBserver,
4656 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4657 * configure: Regenerate.
4658
e5a9158d
AA
46592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4660
4661 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4662 warning upon ENODATA from ptrace.
4663 * linux-s390-low.c (s390_store_tdb): New.
4664 (s390_regsets): Add regset for NT_S390_TDB.
4665
feea5f36
AA
46662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4667
4668 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4669 without a fill_function.
4670 * linux-s390-low.c (s390_fill_last_break): Remove.
4671 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4672 (s390_arch_setup): Use regset's size instead of fill_function for
4673 loop end condition.
4674
098dbe61
AA
46752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4676
4677 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4678 the regset's store function when ptrace returned an error.
4679 * regcache.c (get_thread_regcache): Invalidate register cache
4680 before fetching inferior's registers.
4681
28eef672
AA
46822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4683
4684 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4685 while-loop as for-loop.
4686 (regsets_store_inferior_registers): Likewise.
4687
bdca27a2
YQ
46882014-11-28 Yao Qi <yao@codesourcery.com>
4689
4690 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4691 * config.in, configure: Re-generate.
4692 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4693 is defined.
4694
9c232dda
YQ
46952014-11-21 Yao Qi <yao@codesourcery.com>
4696
4697 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4698 (AC_CHECK_HEADERS): Remove malloc.h.
4699 * configure: Re-generated.
4700 * config.in: Re-generated.
4701 * server.h: Don't include alloca.h and malloc.h.
4702 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4703 Don't include malloc.h.
4704
43968415
JB
47052014-11-17 Joel Brobecker <brobecker@adacore.com>
4706
4707 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4708 corresponding ERRNO check in same block.
4709
40e91bc7
PA
47102014-11-12 Pedro Alves <palves@redhat.com>
4711
4712 * server.c (cont_thread): Update comment.
4713 (start_inferior, attach_inferior): No longer clear cont_thread.
4714 (handle_v_cont): No longer set cont_thread.
4715 (captured_main): Clear cont_thread each time a GDB connects.
4716
c2c118cf
PA
47172014-11-12 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4720 thread, and don't resume all threads if the Hc thread has exited.
4721
78708b7c
PA
47222014-11-12 Pedro Alves <palves@redhat.com>
4723
4724 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4725 the process group instead of to a specific LWP.
4726
a2abc7de
PA
47272014-10-15 Pedro Alves <palves@redhat.com>
4728
4729 PR server/17487
4730 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4731 parameter.
4732 (arm_set_thread_context): Delete.
4733 (the_low_target): Adjust.
4734 * win32-i386-low.c (debug_registers_changed)
4735 (debug_registers_used): Delete.
4736 (update_debug_registers_callback): New function.
4737 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4738 needing to update their debug registers.
4739 (win32_get_current_dr): New function.
4740 (x86_dr_low_get_addr, x86_dr_low_get_control)
4741 (x86_dr_low_get_status): Fetch the debug register from the thread
4742 record's context.
4743 (i386_initial_stuff): Adjust.
4744 (i386_get_thread_context): Remove current_event parameter. Don't
4745 clear debug_registers_changed nor copy DR values to
4746 debug_reg_state.
4747 (i386_set_thread_context): Delete.
4748 (i386_prepare_to_resume): New function.
4749 (i386_thread_added): Mark the thread as needing to update irs
4750 debug registers.
4751 (the_low_target): Remove i386_set_thread_context and install
4752 i386_prepare_to_resume.
4753 * win32-low.c (win32_get_thread_context): Adjust.
4754 (win32_set_thread_context): Use SetThreadContext
4755 directly.
4756 (win32_prepare_to_resume): New function.
4757 (win32_require_context): New function, factored out from ...
4758 (thread_rec): ... this.
4759 (continue_one_thread): Call win32_prepare_to_resume on each thread
4760 we're about to continue.
4761 (win32_resume): Call win32_prepare_to_resume on the event thread.
4762 * win32-low.h (struct win32_thread_info)
4763 <debug_registers_changed>: New field.
4764 (struct win32_target_ops): Change prototype of set_thread_context,
4765 delete set_thread_context and add prepare_to_resume.
4766 (win32_require_context): New declaration.
4767
a442d071
GB
47682014-10-08 Gary Benson <gbenson@redhat.com>
4769
4770 * server.h: Do not include common-exceptions.h.
4771
6f1947e8
GB
47722014-10-08 Gary Benson <gbenson@redhat.com>
4773
4774 * server.h: Do not include cleanups.h.
4775
63b434a4
JH
47762014-09-30 James Hogan <james.hogan@imgtec.com>
4777
4778 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4779 mips64-dsp-linux.c.
4780
c4d9ceb6
YQ
47812014-09-23 Yao Qi <yao@codesourcery.com>
4782
4783 * linux-low.c (lp_status_maybe_breakpoint): New function.
4784 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4785 (count_events_callback): Likewise.
4786 (select_event_lwp_callback): Likewise.
4787 (cancel_breakpoints_callback): Likewise.
4788
89a5711c
DB
47892014-09-19 Don Breazeal <donb@codesourcery.com>
4790
4791 * linux-low.c (handle_extended_wait): Call
4792 linux_ptrace_get_extended_event.
4793 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4794 linux_is_extended_waitstatus.
4795
bffc0964
JB
47962014-09-16 Joel Brobecker <brobecker@adacore.com>
4797
4798 * Makefile.in (CPPFLAGS): Define.
4799 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4800 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4801
0bfdf32f
GB
48022014-09-16 Gary Benson <gbenson@redhat.com>
4803
4804 * inferiors.h (current_inferior): Renamed as...
4805 (current_thread): New variable. All uses updated.
4806 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4807 (maybe_move_out_of_jump_pad): Likewise.
4808 (cancel_breakpoint): Likewise.
4809 (linux_low_filter_event): Likewise.
4810 (wait_for_sigstop): Likewise.
4811 (linux_resume_one_lwp): Likewise.
4812 (need_step_over_p): Likewise.
4813 (start_step_over): Likewise.
4814 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4815 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4816 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4817 and save_inferior as saved_thread.
4818 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4819 saved_thread.
4820 (regcache_invalidate_thread): Likewise.
4821 * remote-utils.c (prepare_resume_reply): Likewise.
4822 * thread-db.c (thread_db_get_tls_address): Likewise.
4823 (disable_thread_event_reporting): Likewise.
4824 (remove_thread_event_breakpoints): Likewise.
4825 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4826 as saved_thread.
4827 * target.h (set_desired_inferior): Renamed as...
4828 (set_desired_thread): New declaration. All uses updated.
4829 * server.c (myresume): Updated comment to reference thread instead
4830 of inferior.
4831 (handle_serial_event): Likewise.
4832 (handle_target_event): Likewise.
4833
361c8ade
GB
48342014-09-12 Tom Tromey <tromey@redhat.com>
4835 Gary Benson <gbenson@redhat.com>
4836
4837 * regcache.h: Include common-regcache.h.
4838 (regcache_read_pc): Don't declare.
4839 * regcache.c (get_thread_regcache_for_ptid): New function.
4840
bd9269f7
GB
48412014-09-11 Tom Tromey <tromey@redhat.com>
4842 Gary Benson <gbenson@redhat.com>
4843
4844 * symbol.c: New file.
4845 * Makefile.in (SFILES): Add symbol.c.
4846 (OBS): Add symbol.o.
4847
f8c1d06b
GB
48482014-09-11 Gary Benson <gbenson@redhat.com>
4849
4850 * target.c (target_stop_ptid, target_continue_ptid): New
4851 functions.
4852
721ec300
GB
48532014-09-11 Tom Tromey <tromey@redhat.com>
4854 Gary Benson <gbenson@redhat.com>
4855
4856 * target.h: Include target/target.h.
4857 * target.c (target_read_memory, target_read_uint32)
4858 (target_write_memory): New functions.
4859
c5e92cca
GB
48602014-09-11 Gary Benson <gbenson@redhat.com>
4861
4862 * server.h (debug_hw_points): Don't declare.
4863 * server.c (debug_hw_points): Don't define. Replace all uses
4864 with show_debug_regs.
4865 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4866 all uses with show_debug_regs.
4867
2e4bb98a
EBM
48682014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4869
4870 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4871 endianness into account.
4872 (ppc_supply_ptrace_register): Likewise.
4873
ac740bc7
JH
48742014-09-03 James Hogan <james.hogan@imgtec.com>
4875
4876 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4877 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4878
97ea6506
GB
48792014-09-03 Gary Benson <gbenson@redhat.com>
4880
4881 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4882 ALL_DEBUG_ADDRESS_REGISTERS.
4883
df7e5265
GB
48842014-09-02 Gary Benson <gbenson@redhat.com>
4885
4886 * i386-low.h: Renamed as...
4887 * x86-low.h: New file. All type, function and variable name
4888 prefixes changed from "i386_" to "x86_". All references updated.
4889 * i386-low.c: Renamed as...
4890 * x86-low.c: New file. All type, function and variable name
4891 prefixes changed from "i386_" to "x86_". All references updated.
4892
ed859da7
GB
48932014-09-02 Gary Benson <gbenson@redhat.com>
4894
4895 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4896 (x86_linux_new_thread): Likewise.
4897
860789c7
GB
48982014-08-29 Gary Benson <gbenson@redhat.com>
4899
4900 * server.h (setjmp.h): Do not include.
4901 (toplevel): Do not declare.
4902 (common-exceptions.h): Include.
4903 (cleanups.h): Likewise.
4904 * server.c (toplevel): Do not define.
4905 (exit_code): New static global.
4906 (detach_or_kill_for_exit_cleanup): New function.
4907 (main): New function. Original main renamed to...
4908 (captured_main): New function.
4909 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4910
ff55e1b5
GB
49112014-08-29 Gary Benson <gbenson@redhat.com>
4912
4913 * Makefile.in (SFILES): Add common/common-exceptions.c.
4914 (OBS): Add common-exceptions.o.
4915 (common-exceptions.o): New rule.
4916 * utils.c (prepare_to_throw_exception): New function.
4917
e9bcb658
GB
49182014-08-29 Gary Benson <gbenson@redhat.com>
4919
4920 * config.in: Regenerate.
4921 * configure: Likewise.
4922
e3180625
GB
49232014-08-29 Gary Benson <gbenson@redhat.com>
4924
4925 * Makefile.in (SFILES): Add common/cleanups.c.
4926 (OBS): cleanups.o.
4927 (cleanups.o): New rule.
4928
e3d6ba5d
GB
49292014-08-29 Gary Benson <gbenson@redhat.com>
4930
4931 * utils.c (internal_vwarning): New function.
4932
7096e886
GB
49332014-08-28 Gary Benson <gbenson@redhat.com>
4934
4935 * utils.h (fatal): Remove declaration.
4936 * utils.c (fatal): Remove function.
4937
14ce3192
GB
49382014-08-28 Gary Benson <gbenson@redhat.com>
4939
4940 * tracepoint.c (gdb_agent_init): Replace fatal with
4941 perror_with_name.
4942 (initialize_tracepoint): Likewise.
4943
50278d59
GB
49442014-08-28 Gary Benson <gbenson@redhat.com>
4945
4946 * remote-utils.c (remote_prepare): Replace fatal with error.
4947
aa96c426
GB
49482014-08-28 Gary Benson <gbenson@redhat.com>
4949
4950 * linux-low.c (linux_async): Replace fatal with warning.
4951 Tidy up and return.
4952 (linux_start_non_stop): Return -1 if linux_async failed.
4953
f7160e97
GB
49542014-08-28 Gary Benson <gbenson@redhat.com>
4955
4956 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4957 gdb_assert.
4958 (i386_dr_low_get_addr): Remove vague comment.
4959 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4960 gdb_assert.
4961
38e08fca
GB
49622014-08-28 Gary Benson <gbenson@redhat.com>
4963
4964 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4965 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4966 internal_error.
4967 (linux_resume_one_lwp): Likewise.
4968 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4969 gdb_assert.
4970 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4971 with internal_error.
4972 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4973 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4974 (find_register_by_name): Replace fatal with internal_error.
4975 (find_regno): Likewise.
4976 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4977 * thread-db.c (thread_db_create_event): Likewise.
4978 (thread_db_load_search): Likewise.
4979 (try_thread_db_load_1): Likewise.
4980 * tracepoint.c (get_jump_space_head): Replace fatal with
4981 internal_error.
4982 (claim_trampoline_space): Likewise.
4983 (have_fast_tracepoint_trampoline_buffer): Likewise.
4984 (cmd_qtstart): Likewise.
4985 (stop_tracing): Likewise.
4986 (fast_tracepoint_collecting): Likewise.
4987 (target_malloc): Likewise.
4988 (download_tracepoint): Likewise.
4989 (download_trace_state_variables): Replace check with gdb_assert.
4990 (upload_fast_traceframes): Replace fatal with internal_error.
4991
34abf635
GB
49922014-08-19 Tom Tromey <tromey@redhat.com>
4993 Gary Benson <gbenson@redhat.com>
4994
4995 * Makefile.in (SFILES): Add common/common-debug.c.
4996 (OBS): Add common-debug.o.
4997 (common-debug.o): New rule.
4998 * debug.h (debug_printf): Don't declare.
4999 * debug.c (debug_printf): Renamed and rewritten as...
5000 (debug_vprintf): New function.
5001
f6e94d78
GB
50022014-08-19 Gary Benson <gbenson@redhat.com>
5003
5004 * utils.h: Do not include print-utils.h.
5005
9239eeab
GB
50062014-08-19 Tom Tromey <tromey@redhat.com>
5007 Gary Benson <gbenson@redhat.com>
5008
5009 * server.h: Add static assertion.
5010 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5011
ef87c8bb
GB
50122014-08-19 Tom Tromey <tromey@redhat.com>
5013 Gary Benson <gbenson@redhat.com>
5014
5015 * Makefile.in (SFILES): Add common/errors.c.
5016 (OBS): Add errors.o.
5017 (IPA_OBS): Add errors-ipa.o.
5018 (errors.o): New rule.
5019 (errors-ipa.o): Likewise.
5020 * utils.h (perror_with_name, error, warning): Don't declare.
5021 * utils.c (warning): Renamed and rewritten as...
5022 (vwarning): New function.
5023 (error): Renamed and rewritten as...
5024 (verror): New function.
5025 (internal_error): Renamed and rewritten as...
5026 (internal_verror): New function.
5027
bb974a24
GB
50282014-08-07 Gary Benson <gbenson@redhat.com>
5029
5030 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5031 * configure: Regenerate.
5032 * config.in: Likewise.
5033 * server.h: Do not include errno.h.
5034 * event-loop.c: Likewise.
5035 * hostio-errno.c: Likewise.
5036 * linux-low.c: Likewise.
5037 * remote-utils.c: Likewise.
5038 * spu-low.c: Likewise.
5039 * utils.c: Likewise.
5040 * gdbreplay.c: Unconditionally include errno.h.
5041
6d3d12eb
GB
50422014-08-07 Gary Benson <gbenson@redhat.com>
5043
5044 * server.h: Do not include string.h.
5045 * event-loop.c: Likewise.
5046 * linux-low.c: Likewise.
5047 * regcache.c: Likewise.
5048 * remote-utils.c: Likewise.
5049 * spu-low.c: Likewise.
5050 * utils.c: Likewise.
5051
dccbb609
GB
50522014-08-07 Gary Benson <gbenson@redhat.com>
5053
5054 * server.h: Do not include gdb_assert.h.
5055
e76df0d0
GB
50562014-08-07 Gary Benson <gbenson@redhat.com>
5057
5058 * server.h: Do not include common-utils.h.
5059
4cb9c816
GB
50602014-08-07 Gary Benson <gbenson@redhat.com>
5061
5062 * server.h: Do not include ptid.h.
5063 * notif.h: Likewise.
5064
3995eeee
GB
50652014-08-07 Gary Benson <gbenson@redhat.com>
5066
5067 * server.h: Do not include gdb_locale.h.
5068
cb9f1a9b
GB
50692014-08-07 Gary Benson <gbenson@redhat.com>
5070
5071 * server.h: Do not include gdb/signals.h.
5072 * win32-low.c: Likewise.
5073
a5fceff8
GB
50742014-08-07 Gary Benson <gbenson@redhat.com>
5075
5076 * server.h: Do not include pathmax.h.
5077
b9391142
GB
50782014-08-07 Gary Benson <gbenson@redhat.com>
5079
5080 * server.h: Do not include libiberty.h.
5081 * linux-bfin-low.c: Likewise.
5082
0e443c87
GB
50832014-08-07 Gary Benson <gbenson@redhat.com>
5084
5085 * server.h: Do not include ansidecl.h.
5086
8ebb3f56
GB
50872014-08-07 Gary Benson <gbenson@redhat.com>
5088
5089 * linux-x86-low.c: Do not include stddef.h.
5090 * lynx-ppc-low.c: Likewise.
5091 * tracepoint.c: Likewise.
5092
8980bdf6
GB
50932014-08-07 Gary Benson <gbenson@redhat.com>
5094
5095 * server.h: Do not include stdarg.h.
5096 * nto-low.c: Likewise.
5097
d7096f71
GB
50982014-08-07 Gary Benson <gbenson@redhat.com>
5099
5100 * server.h: Do not include stdlib.h.
5101 * inferiors.c: Likewise.
5102 * linux-low.c: Likewise.
5103 * regcache.c: Likewise.
5104 * spu-low.c: Likewise.
5105 * tracepoint.c: Likewise.
5106 * utils.c: Likewise.
5107
d02f550d
GB
51082014-08-07 Gary Benson <gbenson@redhat.com>
5109
5110 * server.h: Do not include stdio.h.
5111 * linux-low.c: Likewise.
5112 * remote-utils.c: Likewise.
5113 * spu-low.c: Likewise.
5114 * utils.c: Likewise.
5115 * wincecompat.c: Likewise.
5116
87f6c4e3
GB
51172014-08-06 Gary Benson <gbenson@redhat.com>
5118
5119 * regcache.c (init_register_cache): Move conditionals inside if.
5120
7089dca4
GB
51212014-08-06 Gary Benson <gbenson@redhat.com>
5122
5123 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5124
462f517e
GB
51252014-07-31 Gary Benson <gbenson@redhat.com>
5126
5127 * ax.h: Do not include server.h.
5128 * gdbthread.h: Likewise.
5129 * lynx-low.h: Likewise.
5130 * notif.h: Likewise.
5131
976411d6
GB
51322014-07-30 Gary Benson <gbenson@redhat.com>
5133
5134 * server.h: Include common-defs.h.
5135 Do not include config.h or build-gnulib-gdbserver/config.h.
5136
d41f6d8e
GB
51372014-07-30 Gary Benson <gbenson@redhat.com>
5138
5139 * hostio-errno.c: Move server.h to top of includes list.
5140 * inferiors.c: Likewise.
5141 * linux-x86-low.c: Likewise.
5142 * notif.c: Include server.h.
5143
314c6a35
TT
51442014-07-24 Tom Tromey <tromey@redhat.com>
5145 Gary Benson <gbenson@redhat.com>
5146
5147 * server.h (CORE_ADDR): Now unsigned.
5148
69ff6be5
PA
51492014-07-16 Pedro Alves <palves@redhat.com>
5150
5151 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5152
ce9e3fe7
PA
51532014-07-15 Pedro Alves <palves@redhat.com>
5154
5155 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5156 copy.
5157
e76126e8
PA
51582014-07-11 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (kill_wait_lwp): New function, based on
5161 kill_one_lwp_callback, but use my_waitpid directly.
5162 (kill_one_lwp_callback, linux_kill): Use it.
5163
8e9db26e
PA
51642014-06-23 Pedro Alves <palves@redhat.com>
5165
5166 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5167 before setting DR0..DR3.
5168
698b3e08
GB
51692014-06-20 Gary Benson <gbenson@redhat.com>
5170
5171 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5172 * configure: Regenerated.
5173 * config.in: Likewise.
5174
125f8a3d
GB
51752014-06-20 Gary Benson <gbenson@redhat.com>
5176
5177 * Makefile.in (SFILES): Update locations for files moved
5178 from common to nat.
5179 (object file files): Reordered.
5180
42995dbd
GB
51812014-06-20 Gary Benson <gbenson@redhat.com>
5182
5183 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5184 (i386_dr_low_set_addr): Likewise.
5185 (i386_dr_low_get_addr): Likewise.
5186 (i386_dr_low_can_set_control): Likewise.
5187 (i386_dr_low_set_control): Likewise.
5188 (i386_dr_low_get_control): Likewise.
5189 (i386_dr_low_get_status): Likewise.
5190 (i386_get_debug_register_length): Likewise.
5191 * linux-x86-low.c (i386_dr_low_set_addr):
5192 Changed signature. Made static.
5193 (i386_dr_low_get_addr): Likewise.
5194 (i386_dr_low_set_control): Likewise.
5195 (i386_dr_low_get_control): Likewise.
5196 (i386_dr_low_get_status): Likewise.
5197 (i386_dr_low): New global variable.
5198 * win32-i386-low.c (i386_dr_low_set_addr):
5199 Changed signature. Made static.
5200 (i386_dr_low_get_addr): Likewise.
5201 (i386_dr_low_set_control): Likewise.
5202 (i386_dr_low_get_control): Likewise.
5203 (i386_dr_low_get_status): Likewise.
5204 (i386_dr_low): New global variable.
5205
e1d2394b
MS
52062014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5207
5208 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5209 * Makefile.in (AR, AR_FLAGS): Define.
5210 * configure: Regenerate.
5211
3a8ee006
GB
52122014-06-19 Gary Benson <gbenson@redhat.com>
5213
5214 * Makefile.in (i386-dregs.o): New rule.
5215 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5216 * i386-low.c (target.h): Remove include.
5217 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5218 (DR_CONTROL_SHIFT): Likewise.
5219 (DR_CONTROL_SIZE): Likewise.
5220 (DR_RW_EXECUTE): Likewise.
5221 (DR_RW_WRITE): Likewise.
5222 (DR_RW_READ): Likewise.
5223 (DR_RW_IORW): Likewise.
5224 (DR_LEN_1): Likewise.
5225 (DR_LEN_2): Likewise.
5226 (DR_LEN_4): Likewise.
5227 (DR_LEN_8): Likewise.
5228 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5229 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5230 (DR_ENABLE_SIZE): Likewise.
5231 (DR_LOCAL_SLOWDOWN): Likewise.
5232 (DR_GLOBAL_SLOWDOWN): Likewise.
5233 (DR_CONTROL_RESERVED): Likewise.
5234 (I386_DR_CONTROL_MASK): Likewise.
5235 (I386_DR_VACANT): Likewise.
5236 (I386_DR_LOCAL_ENABLE): Likewise.
5237 (I386_DR_GLOBAL_ENABLE): Likewise.
5238 (I386_DR_DISABLE): Likewise.
5239 (I386_DR_SET_RW_LEN): Likewise.
5240 (I386_DR_GET_RW_LEN): Likewise.
5241 (I386_DR_WATCH_HIT): Likewise.
5242 (i386_wp_op_t): Likewise.
5243 (i386_show_dr): Likewise.
5244 (i386_length_and_rw_bits): Likewise.
5245 (i386_insert_aligned_watchpoint): Likewise.
5246 (i386_remove_aligned_watchpoint): Likewise.
5247 (i386_handle_nonaligned_watchpoint): Likewise.
5248 i386_update_inferior_debug_regs(): Likewise.
5249 (i386_dr_insert_watchpoint): Likewise.
5250 (i386_dr_remove_watchpoint): Likewise.
5251 (i386_dr_region_ok_for_watchpoint): Likewise.
5252 (i386_dr_stopped_data_address): Likewise.
5253 (i386_dr_stopped_by_watchpoint): Likewise.
5254
8f26655c
GB
52552014-06-19 Gary Benson <gbenson@redhat.com>
5256
5257 * i386-low.c (i386_dr_show): Renamed to
5258 i386_show_dr and made static. All uses updated.
5259 (i386_dr_length_and_rw_bits): Renamed to
5260 i386_length_and_rw_bits and made static.
5261 All uses updated.
5262 (i386_dr_insert_aligned_watchpoint): Renamed to
5263 i386_insert_aligned_watchpoint and made static.
5264 All uses updated.
5265 (i386_dr_remove_aligned_watchpoint): Renamed to
5266 i386_remove_aligned_watchpoint and made static.
5267 All uses updated.
5268 (i386_dr_update_inferior_debug_regs): Renamed to
5269 i386_update_inferior_debug_regs and made static.
5270 All uses updated.
5271
b9228891
GB
52722014-06-18 Gary Benson <gbenson@redhat.com>
5273
5171def3
GB
5274 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5275 (i386_dr_low_can_set_control): Likewise.
5276 (i386_get_debug_register_length): Likewise.
5277 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5278 (i386_dr_low_can_set_control): Likewise.
5279 (i386_get_debug_register_length): Likewise.
5280
52812014-06-17 Gary Benson <gbenson@redhat.com>
5282
b9228891
GB
5283 * i386-low.h (i386-dregs.h): New include.
5284 (DR_FIRSTADDR): Now in i386-dregs.h.
5285 (DR_LASTADDR): Likewise.
5286 (DR_NADDR): Likewise.
5287 (DR_STATUS): Likewise.
5288 (DR_CONTROL): Likewise.
5289 (i386_debug_reg_state): Likewise.
5290 (i386_dr_insert_watchpoint): Likewise.
5291 (i386_dr_remove_watchpoint): Likewise.
5292 (i386_dr_region_ok_for_watchpoint): Likewise.
5293 (i386_dr_stopped_data_address): Likewise.
5294 (i386_dr_stopped_by_watchpoint): Likewise.
5295 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5296
4be83cc2
GB
52972014-06-18 Gary Benson <gbenson@redhat.com>
5298
5299 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5300 i386_dr_insert_watchpoint.
5301 (i386_low_remove_watchpoint): Renamed to
5302 i386_dr_remove_watchpoint.
5303 (i386_low_region_ok_for_watchpoint): Renamed to
5304 i386_dr_region_ok_for_watchpoint.
5305 (i386_low_stopped_data_address): Renamed to
5306 i386_dr_stopped_data_address.
5307 (i386_low_stopped_by_watchpoint): Renamed to
5308 i386_dr_stopped_by_watchpoint.
5309 * i386-low.c (i386_show_dr): Renamed to
5310 i386_dr_show and made nonstatic. All uses updated.
5311 (i386_length_and_rw_bits): Renamed to
5312 i386_dr_length_and_rw_bits and made nonstatic.
5313 All uses updated.
5314 (i386_insert_aligned_watchpoint): Renamed to
5315 i386_dr_insert_aligned_watchpoint and made nonstatic.
5316 All uses updated.
5317 (i386_remove_aligned_watchpoint): Renamed to
5318 i386_dr_remove_aligned_watchpoint and made nonstatic.
5319 All uses updated.
5320 (i386_update_inferior_debug_regs): Renamed to
5321 i386_dr_update_inferior_debug_regs and made nonstatic.
5322 All uses updated.
5323 (i386_low_insert_watchpoint): Renamed to
5324 i386_dr_insert_watchpoint. All uses updated.
5325 (i386_low_remove_watchpoint): Renamed to
5326 i386_dr_remove_watchpoint. All uses updated.
5327 (i386_low_region_ok_for_watchpoint): Renamed to
5328 i386_dr_region_ok_for_watchpoint. All uses updated.
5329 (i386_low_stopped_data_address): Renamed to
5330 i386_dr_stopped_data_address. All uses updated.
5331 (i386_low_stopped_by_watchpoint): Renamed to
5332 i386_dr_stopped_by_watchpoint. All uses updated.
5333
131aa0d4
GB
53342014-06-18 Gary Benson <gbenson@redhat.com>
5335
5336 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5337 (i386_dr_low_can_set_control): Likewise.
5338 (i386_insert_aligned_watchpoint): New check.
5339
d9305f7f
GB
53402014-06-18 Gary Benson <gbenson@redhat.com>
5341
5342 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5343 Renamed to state.
5344
e927c9fc
GB
53452014-06-18 Gary Benson <gbenson@redhat.com>
5346
5347 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5348 instead of fatal and error.
5349 (i386_handle_nonaligned_watchpoint): Likewise.
5350
1b6d4134
GB
53512014-06-18 Gary Benson <gbenson@redhat.com>
5352
5353 * i386-low.c (i386_get_debug_register_length): New macro.
5354 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5355 (i386_show_dr): Use debug_printf instead of fprintf. Use
5356 phex to format values.
5357
6e62758f
GB
53582014-06-18 Gary Benson <gbenson@redhat.com>
5359
5360 * i386-low.h: Comment changes.
5361 * i386-low.c: Likewise.
5362
fc6e2f03
GB
53632014-06-18 Gary Benson <gbenson@redhat.com>
5364
5365 * i386-low.c: Whitespace changes.
5366
f9d1eeed
TT
53672014-06-12 Tom Tromey <tromey@redhat.com>
5368
5369 * utils.c (freeargv): Remove.
5370
0b04e523
TT
53712014-06-12 Tom Tromey <tromey@redhat.com>
5372
5373 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5374 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5375 (parse_debug_format_options): Likewise.
5376 (gdbserver_usage): Likewise.
5377 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5378 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5379 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5380 against libiberty.
5381 ($(LIBGNU)): Depend on libiberty.
5382 (all-lib): Recurse into all subdirs.
5383 (install-only): Invoke "install" target in subdirs.
5384 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5385 targets.
5386 * configure: Rebuild.
5387 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5388 for vasprintf, vsnprintf, or gettimeofday.
5389 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5390 srv_tgtobj.
5391
270c9937
JB
53922014-06-05 Joel Brobecker <brobecker@adacore.com>
5393
5394 * development.sh: Delete.
5395 * Makefile.in (config.status): Adjust dependency on development.sh.
5396 * configure.ac: Adjust development.sh source call.
5397 * configure: Regenerate.
5398
0a261ed8
PA
53992014-06-02 Pedro Alves <palves@redhat.com>
5400
5401 * ax.c (gdb_free_agent_expr): New function.
5402 * ax.h (gdb_free_agent_expr): New declaration.
5403 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5404 list.
5405 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5406 static.
5407 (clear_breakpoint_conditions_and_commands): New function.
5408 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5409 (clear_breakpoint_conditions_and_commands): New declaration.
5410
e9dae05e
RR
54112014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5412
5413 * linux-aarch64-low.c (asm/ptrace.h): Include.
5414
5876f503
JK
54152014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5416
5417 Fix TLS access for -static -pthread.
5418 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5419 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5420 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5421
802e8e6d
PA
54222014-05-20 Pedro Alves <palves@redhat.com>
5423
5424 * linux-aarch64-low.c (aarch64_insert_point)
5425 (aarch64_remove_point): No longer check whether the type is
5426 supported here. Adjust to new interface.
5427 (the_low_target): Install aarch64_supports_z_point_type as
5428 supports_z_point_type method.
5429 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5430 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5431 instead of a Z packet char. Adjust.
5432 (arm_supports_z_point_type): New function.
5433 (arm_insert_point, arm_remove_point): Adjust to new interface.
5434 (the_low_target): Install arm_supports_z_point_type.
5435 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5436 (cris_insert_point, cris_remove_point): Adjust to new interface.
5437 Don't check whether the type is supported here.
5438 (the_low_target): Install cris_supports_z_point_type.
5439 * linux-low.c (linux_supports_z_point_type): New function.
5440 (linux_insert_point, linux_remove_point): Adjust to new interface.
5441 * linux-low.h (struct linux_target_ops) <insert_point,
5442 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5443 raw_breakpoint pointer parameter.
5444 <supports_z_point_type>: New method.
5445 * linux-mips-low.c (mips_supports_z_point_type): New function.
5446 (mips_insert_point, mips_remove_point): Adjust to new interface.
5447 Use mips_supports_z_point_type.
5448 (the_low_target): Install mips_supports_z_point_type.
5449 * linux-ppc-low.c (the_low_target): Install NULL as
5450 supports_z_point_type method.
5451 * linux-s390-low.c (the_low_target): Install NULL as
5452 supports_z_point_type method.
5453 * linux-sparc-low.c (the_low_target): Install NULL as
5454 supports_z_point_type method.
5455 * linux-x86-low.c (x86_supports_z_point_type): New function.
5456 (x86_insert_point): Adjust to new insert_point interface. Use
5457 insert_memory_breakpoint. Adjust to new
5458 i386_low_insert_watchpoint interface.
5459 (x86_remove_point): Adjust to remove_point interface. Use
5460 remove_memory_breakpoint. Adjust to new
5461 i386_low_remove_watchpoint interface.
5462 (the_low_target): Install x86_supports_z_point_type.
5463 * lynx-low.c (lynx_target_ops): Install NULL as
5464 supports_z_point_type callback.
5465 * nto-low.c (nto_supports_z_point_type): New.
5466 (nto_insert_point, nto_remove_point): Adjust to new interface.
5467 (nto_target_ops): Install nto_supports_z_point_type.
5468 * mem-break.c: Adjust intro comment.
5469 (struct raw_breakpoint) <raw_type, size>: New fields.
5470 <inserted>: Update comment.
5471 <shlib_disabled>: Delete field.
5472 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5473 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5474 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5475 (raw_bkpt_type_to_target_hw_bp_type): New function.
5476 (find_enabled_raw_code_breakpoint_at): New function.
5477 (find_raw_breakpoint_at): New type and size parameters. Use them.
5478 (insert_memory_breakpoint): New function, based off
5479 set_raw_breakpoint_at.
5480 (remove_memory_breakpoint): New function.
5481 (set_raw_breakpoint_at): Reimplement.
5482 (set_breakpoint): New, based on set_breakpoint_at.
5483 (set_breakpoint_at): Reimplement.
5484 (delete_raw_breakpoint): Go through the_target->remove_point
5485 instead of assuming memory breakpoints.
5486 (find_gdb_breakpoint_at): Delete.
5487 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5488 (find_gdb_breakpoint): New function.
5489 (set_gdb_breakpoint_at): Delete.
5490 (z_type_supported): New function.
5491 (set_gdb_breakpoint_1): New function, loosely based off
5492 set_gdb_breakpoint_at.
5493 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5494 (delete_gdb_breakpoint_at): Delete.
5495 (delete_gdb_breakpoint_1): New function, loosely based off
5496 delete_gdb_breakpoint_at.
5497 (delete_gdb_breakpoint): New function.
5498 (clear_gdb_breakpoint_conditions): Rename to ...
5499 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5500 breakpoint.
5501 (add_condition_to_breakpoint): Make static.
5502 (add_breakpoint_condition): Take a struct breakpoint pointer
5503 instead of an address. Adjust.
5504 (gdb_condition_true_at_breakpoint): Rename to ...
5505 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5506 z_type parameter.
5507 (gdb_condition_true_at_breakpoint): Reimplement.
5508 (add_breakpoint_commands): Take a struct breakpoint pointer
5509 instead of an address. Adjust.
5510 (gdb_no_commands_at_breakpoint): Rename to ...
5511 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5512 parameter. Return true if no breakpoint was found. Change debug
5513 output.
5514 (gdb_no_commands_at_breakpoint): Reimplement.
5515 (run_breakpoint_commands): Rename to ...
5516 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5517 and change return type to boolean.
5518 (run_breakpoint_commands): New function.
5519 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5520 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5521 breakpoint. Go through the_target->remove_point instead of
5522 assuming memory breakpoint.
5523 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5524 software and hardware breakpoints.
5525 (reinsert_raw_breakpoint): Go through the_target->insert_point
5526 instead of assuming memory breakpoint.
5527 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5528 software and hardware breakpoints.
5529 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5530 Check both software and hardware breakpoints.
5531 (validate_inserted_breakpoint): Assert the breakpoint is a
5532 software breakpoint. Set the inserted flag to -1 instead of
5533 setting shlib_disabled.
5534 (delete_disabled_breakpoints): Adjust.
5535 (validate_breakpoints): Only validate software breakpoints.
5536 Adjust to inserted flag change.
5537 (check_mem_read, check_mem_write): Skip breakpoint types other
5538 than software breakpoints. Adjust to inserted flag change.
5539 * mem-break.h (enum raw_bkpt_type): New enum.
5540 (raw_breakpoint, struct process_info): Forward declare.
5541 (Z_packet_to_target_hw_bp_type): Delete declaration.
5542 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5543 (set_gdb_breakpoint, delete_gdb_breakpoint)
5544 (clear_breakpoint_conditions): New declarations.
5545 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5546 (breakpoint_inserted_here): Update comment.
5547 (add_breakpoint_condition, add_breakpoint_commands): Replace
5548 address parameter with a breakpoint pointer parameter.
5549 (gdb_breakpoint_here): Update comment.
5550 (delete_gdb_breakpoint_at): Delete.
5551 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5552 * server.c (process_point_options): Take a struct breakpoint
5553 pointer instead of an address. Adjust.
5554 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5555 delete_gdb_breakpoint.
5556 * spu-low.c (spu_target_ops): Install NULL as
5557 supports_z_point_type method.
5558 * target.h: Include mem-break.h.
5559 (struct target_ops) <prepare_to_access_memory>: Update comment.
5560 <supports_z_point_type>: New field.
5561 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5562 instead of a char. Also take a raw breakpoint pointer.
5563 * win32-arm-low.c (the_low_target): Install NULL as
5564 supports_z_point_type.
5565 * win32-i386-low.c (i386_supports_z_point_type): New function.
5566 (i386_insert_point, i386_remove_point): Adjust to new interface.
5567 (the_low_target): Install i386_supports_z_point_type.
5568 * win32-low.c (win32_supports_z_point_type): New function.
5569 (win32_insert_point, win32_remove_point): Adjust to new interface.
5570 (win32_target_ops): Install win32_supports_z_point_type.
5571 * win32-low.h (struct win32_target_ops):
5572 <supports_z_point_type>: New method.
5573 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5574 instead of a char. Also take a raw breakpoint pointer.
5575
932539e3
PA
55762014-05-20 Pedro Alves <palves@redhat.com>
5577
5578 * mem-break.h: Include break-common.h.
5579 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5580 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5581 (Z_packet_to_target_hw_bp_type): New declaration.
5582 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5583 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5584 (Z_PACKET_ACCESS_WP): Delete macros.
5585 (Z_packet_to_hw_type): Delete function.
5586 * i386-low.h: Don't include break-common.h here.
5587 (Z_packet_to_hw_type): Delete declaration.
5588 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5589 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5590 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5591 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5592 * linux-aarch64-low.c: Don't include break-common.h here.
5593 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5594 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5595 (Z_packet_to_target_hw_bp_type): Delete function.
5596 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5597 function.
5598 (mips_insert_point, mips_remove_point): Use
5599 Z_packet_to_target_hw_bp_type.
5600
4ff0d3d8
PA
56012014-05-20 Pedro Alves <palves@redhat.com>
5602
5603 * linux-aarch64-low.c: Include break-common.h.
5604 (enum target_point_type): Delete.
5605 (Z_packet_to_point_type): Rename to ...
5606 (Z_packet_to_target_hw_bp_type): ... this, and return a
5607 target_hw_bp_type instead.
5608 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5609 instead of an enum target_point_type.
5610 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5611 breakpoint type.
5612 (aarch64_dr_state_insert_one_point)
5613 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5614 (aarch64_handle_aligned_watchpoint)
5615 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5616 Take an enum target_hw_bp_type instead of an enum
5617 target_point_type.
5618 (aarch64_supports_z_point_type): New function.
5619 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5620 use Z_packet_to_target_hw_bp_type.
5621
786dc519
JB
56222014-05-20 Joel Brobecker <brobecker@adacore.com>
5623
5624 * configure.ac: Only use -Werror by default when DEVELOPMENT
5625 is true.
5626 * configure: Regenerate.
5627
9e0aa64f
JK
56282014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5629
5630 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5631 * linux-x86-low.c (X86_64_USER_REGS): New.
5632 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5633
2b577b92
YQ
56342014-04-28 Yao Qi <yao@codesourcery.com>
5635
5636 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5637 name.
5638
94611da2
PA
56392014-04-25 Pedro Alves <palves@redhat.com>
5640
5641 PR server/16255
5642 * linux-low.c (linux_attach_fail_reason_string): New function.
5643 (linux_attach_lwp): Delete.
5644 (linux_attach_lwp_1): Rename to ...
5645 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5646 argument. Remove "initial" parameter. Return int instead of
5647 void. Don't error or warn here.
5648 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5649 failure to attach to the tgid. Call warning when failing to
5650 attach to an lwp.
5651 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5652 argument. Remove "initial" parameter. Return int instead of
5653 void. Don't error or warn here.
5654 (linux_attach_fail_reason_string): New declaration.
5655 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5656 interface change. Use linux_attach_fail_reason_string.
5657
01f9f808
MS
56582014-04-24 Michael Sturm <michael.sturm@mintel.com>
5659 Walfred Tedeschi <walfred.tedeschi@intel.com>
5660
5661 * Makefile.in: Added rules to handle new files
5662 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5663 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5664 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5665 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5666 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5667 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5668 x32-avx512-linux.o.
5669 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5670 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5671 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5672 i386/x32-avx512.xml.
5673 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5674 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5675 i386/x32-avx512-linux.xml.
5676 * i387-fp.c (num_avx512_k_registers): New constant for number
5677 of K registers.
5678 (num_avx512_zmmh_low_registers): New constant for number of
5679 lower ZMM registers (0-15).
5680 (num_avx512_zmmh_high_registers): New constant for number of
5681 higher ZMM registers (16-31).
5682 (num_avx512_ymmh_registers): New contant for number of higher
5683 YMM registers (ymm16-31 added by avx521 on x86_64).
5684 (num_avx512_xmm_registers): New constant for number of higher
5685 XMM registers (xmm16-31 added by AVX512 on x86_64).
5686 (struct i387_xsave): Add space for AVX512 registers.
5687 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5688 Add code to handle AVX512 registers.
5689 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5690 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5691 prototypei from generated file.
5692 (tdesc_amd64_avx512_linux): Likewise.
5693 (init_registers_x32_avx512_linux): Likewise.
5694 (tdesc_x32_avx512_linux): Likewise.
5695 (init_registers_i386_avx512_linux): Likewise.
5696 (tdesc_i386_avx512_linux): Likewise.
5697 (x86_64_regmap): Add AVX512 registers.
5698 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5699 mask.
5700 (initialize_low_arch): Add code to initialize AVX512 registers.
5701
51aa91f9
PA
57022014-04-23 Pedro Alves <palves@redhat.com>
5703
5704 * mem-break.c (find_gdb_breakpoint_at): Make static.
5705 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5706
a4165e94
PA
57072014-04-23 Pedro Alves <palves@redhat.com>
5708
5709 * i386-low.c: Don't include break-common.h here.
5710 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5711 prototype to take target_hw_bp_type as argument instead of a Z
5712 packet char.
5713 * i386-low.h: Include break-common.h here.
5714 (Z_packet_to_hw_type): Declare.
5715 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5716 prototypes.
5717 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5718 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5719 (x86_remove_point): Convert the packet number to a
5720 target_hw_bp_type before calling i386_low_remove_watchpoint.
5721 * win32-i386-low.c (i386_insert_point): Convert the packet number
5722 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5723 (i386_remove_point): Convert the packet number to a
5724 target_hw_bp_type before calling i386_low_remove_watchpoint.
5725
b8acf843
PA
57262014-04-23 Pedro Alves <palves@redhat.com>
5727
5728 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5729
d708bcd1
PA
57302014-04-10 Pedro Alves <palves@redhat.com>
5731
5732 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5733 Check if the condition or command is NULL before checking if the
5734 breakpoint is known. On success, return true.
5735 * mem-break.h (add_breakpoint_condition): Document return.
5736 (add_breakpoint_commands): Add describing comment.
5737 * server.c (skip_to_semicolon): New function.
5738 (process_point_options): Use it.
5739
2eec7d5b
PA
57402014-04-09 Pedro Alves <palves@redhat.com>
5741
5742 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5743 to lwpid_of.
5744
fa96cb38
PA
57452014-02-27 Pedro Alves <palves@redhat.com>
5746
5747 PR 12702
5748 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5749 macros.
5750 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5751 output.
5752 (last_thread_of_process_p): Take a PID argument instead of a
5753 thread pointer.
5754 (linux_wait_for_lwp): Delete.
5755 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5756 functions.
5757 (linux_low_filter_event): New function, party factored out from
5758 linux_wait_for_event.
5759 (linux_wait_for_event): Rename to ...
5760 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5761 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5762 sigsuspend. Check for zombie leaders.
5763 (linux_wait_for_event): Reimplement as wrapper around
5764 linux_wait_for_event_filtered.
5765 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5766 a normal or signal exit is seen, it's the whole process exiting.
5767 (wait_for_sigstop): No longer a for_each_inferior callback.
5768 Rewrite on top of linux_wait_for_event_filtered.
5769 (stop_all_lwps): Call wait_for_sigstop directly.
5770 * server.c (resume, handle_target_event): Handle
5771 TARGET_WAITKIND_NO_RESUMED.
5772
d763de10
JB
57732014-02-26 Joel Brobecker <brobecker@adacore.com>
5774
5775 * win32-low.c (psapi_get_dll_name,
5776 * win32_CreateToolhelp32Snapshot): Delete.
5777 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5778 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5779 Delete.
5780 (handle_load_dll): Add function description.
5781 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5782
850a0f76
JB
57832014-02-26 Joel Brobecker <brobecker@adacore.com>
5784
5785 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5786 Add comment.
5787 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5788 base address when calling win32_add_one_solib.
5789 (handle_load_dll): Delete local variable load_addr.
5790 Remove 0x1000 offset applied to DLL base address when calling
5791 win32_add_one_solib.
5792 (handle_unload_dll): Add comment.
5793
f25b3fc3
JB
57942014-02-26 Joel Brobecker <brobecker@adacore.com>
5795
5796 * win32-low.c (win32_add_all_dlls): Renames
5797 win32_ensure_ntdll_loaded. Rewrite function documentation.
5798 Adjust implementation to always load all DLLs.
5799 Add 0x1000 offset to DLL base address when calling
5800 win32_add_one_solib.
5801 (child_initialization_done): New static global.
5802 (do_initial_child_stuff): Set child_initialization_done to
5803 zero during child initialization, and 1 after. Replace call
5804 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5805 Add comment.
5806 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5807 (handle_unload_dll): Add function documentation.
5808 (get_child_debug_event): Ignore load and unload DLL events
5809 during child initialization.
5810
d86d4aaf
DE
58112014-02-20 Doug Evans <dje@google.com>
5812
3bc32da3 5813 Remove global all_lwps.
d86d4aaf
DE
5814 * inferiors.h (ptid_of): Move here from linux-low.h.
5815 (pid_of, lwpid_of): Ditto.
5816 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5817 parameter is a struct thread_info * now.
5818 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5819 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5820 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5821 directly.
5822 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5823 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5824 * linux-arm-low.c (update_registers_callback): Update, "entry"
5825 parameter is a struct thread_info * now.
5826 Fetch lwpid from current_inferior directly.
5827 (arm_insert_point): Pass &all_threads to find_inferior instead of
5828 &all_lwps.
5829 (arm_remove_point): Ditto.
5830 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5831 (arm_prepare_to_resume): Fetch pid from thread.
5832 (arm_read_description): Fetch lwpid from current_inferior directly.
5833 * linux-low.c (all_lwps): Delete.
5834 (delete_lwp): Delete call to remove_inferior.
5835 (handle_extended_wait): Fetch lwpid from thread.
5836 (add_lwp): Don't set lwp->entry.id. Remove call to
5837 add_inferior_to_list.
5838 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5839 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5840 (kill_one_lwp_callback): Ditto.
5841 (linux_kill): Don't dereference NULL pointer.
5842 Fetch ptid,lwpid from thread.
5843 (get_detach_signal): Fetch ptid from thread.
5844 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5845 Simplify call to regcache_invalidate_thread.
5846 (delete_lwp_callback): Update, "entry" parameter is a
5847 struct thread_info * now. Fetch pid from thread.
5848 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5849 (status_pending_p_callback): Update, "entry" parameter is a
5850 struct thread_info * now. Fetch ptid from thread.
5851 (find_lwp_pid): Update, "entry" parameter is a
5852 struct thread_info * now.
5853 (linux_wait_for_lwp): Fetch pid from thread.
5854 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5855 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5856 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5857 (dequeue_one_deferred_signal): Ditto.
5858 (cancel_breakpoint): Fetch ptid from current_inferior.
5859 (linux_wait_for_event): Pass &all_threads to find_inferior,
5860 not &all_lwps. Fetch ptid, lwpid from thread.
5861 (count_events_callback): Update, "entry" parameter is a
5862 struct thread_info * now.
5863 (select_singlestep_lwp_callback): Ditto.
5864 (select_event_lwp_callback): Ditto.
5865 (cancel_breakpoints_callback): Ditto.
5866 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5867 not &all_lwps.
5868 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5869 (unsuspend_one_lwp): Update, "entry" parameter is a
5870 struct thread_info * now.
5871 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5872 not &all_lwps.
5873 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5874 Fetch lwpid from thread, not lwp.
5875 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5876 Pass &all_threads to find_inferior, not &all_lwps.
5877 (send_sigstop): Fetch lwpid from thread, not lwp.
5878 (send_sigstop_callback): Update, "entry" parameter is a
5879 struct thread_info * now.
5880 (suspend_and_send_sigstop_callback): Ditto.
5881 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5882 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5883 struct thread_info * now.
5884 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5885 from thread, lwp.
5886 (lwp_running): Update, "entry" parameter is a
5887 struct thread_info * now.
5888 (stop_all_lwps): Fetch ptid from thread.
5889 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5890 (linux_resume_one_lwp): Fetch lwpid from thread.
5891 (linux_set_resume_request): Update, "entry" parameter is a
5892 struct thread_info * now. Fetch pid, lwpid from thread.
5893 (resume_status_pending_p): Update, "entry" parameter is a
5894 struct thread_info * now.
5895 (need_step_over_p): Ditto. Fetch lwpid from thread.
5896 (start_step_over): Fetch lwpid from thread.
5897 (linux_resume_one_thread): Update, "entry" parameter is a
5898 struct thread_info * now. Fetch lwpid from thread.
5899 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5900 (proceed_one_lwp): Update, "entry" parameter is a
5901 struct thread_info * now. Fetch lwpid from thread.
5902 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5903 struct thread_info * now.
5904 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5905 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5906 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5907 directly.
5908 (regsets_store_inferior_registers): Ditto.
5909 (fetch_register, store_register): Ditto.
5910 (linux_read_memory, linux_write_memory): Ditto.
5911 (linux_request_interrupt): Ditto.
5912 (linux_read_auxv): Ditto.
5913 (linux_xfer_siginfo): Ditto.
5914 (linux_qxfer_spu): Ditto.
5915 (linux_qxfer_libraries_svr4): Ditto.
5916 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5917 moved to inferiors.h.
5918 (get_lwp): Delete.
5919 (get_thread_lwp): Update.
5920 (struct lwp_info): Delete member "entry". Simplify comment for
5921 member "thread".
5922 (all_lwps): Delete.
5923 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5924 current_inferior directly.
5925 (update_watch_registers_callback): Update, "entry" parameter is a
5926 struct thread_info * now. Fetch pid from thread.
5927 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5928 (mips_insert_point): Fetch lwpid from current_inferior.
5929 Pass &all_threads to find_inferior, not &all_lwps.
5930 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5931 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5932 directly.
5933 (mips_stopped_data_address): Ditto.
5934 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5935 directly.
5936 * linux-tile-low.c (tile_arch_setup): Ditto.
5937 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5938 (update_debug_registers_callback): Update, "entry" parameter is a
5939 struct thread_info * now. Fetch pid from thread.
5940 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5941 Pass &all_threads to find_inferior, not &all_lwps.
5942 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5943 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5944 Pass &all_threads to find_inferior, not &all_lwps.
5945 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5946 (i386_dr_low_get_status): Ditto.
5947 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5948 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5949 (x86_linux_read_description): Ditto.
5950 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5951
3b8361aa
DE
59522014-02-20 Doug Evans <dje@google.com>
5953
5954 * inferiors.c (get_first_inferior): Fix buglet.
5955
f7667f0d
DE
59562014-02-19 Doug Evans <dje@google.com>
5957
5958 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5959 * inferiors.c (add_thread): Change result type to struct thread_info *.
5960 All callers updated.
5961 (add_lwp): Call add_thread here instead of in callers.
5962 All callers updated.
5963 * linux-low.h (get_lwp_thread): Rewrite.
5964 (struct lwp_info): New member "thread".
5965
b3312d80
DE
59662014-02-19 Doug Evans <dje@google.com>
5967
5968 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5969 All callers updated.
5970
ecc6f45c
DE
59712014-02-19 Doug Evans <dje@google.com>
5972
5973 * inferiors.c (add_thread): Fix whitespace.
5974
649ebbca
DE
59752014-02-19 Doug Evans <dje@google.com>
5976
5977 * dll.c (clear_dlls): Replace accessing list implemention details
5978 with API function.
5979 * gdbthread.h (get_first_thread): Declare.
5980 * inferiors.c (for_each_inferior_with_data): New function.
5981 (get_first_thread): New function.
5982 (find_thread_ptid): Simplify.
5983 (get_first_inferior): New function.
5984 (clear_list): Delete.
5985 (one_inferior_p): New function.
5986 (clear_inferior_list): New function.
5987 (clear_inferiors): Update.
5988 * inferiors.h (for_each_inferior_with_data): Declare.
5989 (clear_inferior_list): Declare.
5990 (one_inferior_p): Declare.
5991 (get_first_inferior): Declare.
5992 * linux-low.c (linux_wait_for_event): Replace accessing list
5993 implemention details with API function.
5994 * server.c (target_running): Ditto.
5995 (accumulate_file_name_length): New function.
5996 (emit_dll_description): New function.
5997 (handle_qxfer_libraries): Replace accessing list implemention
5998 details with API function.
5999 (handle_qxfer_threads_worker): New function.
6000 (handle_qxfer_threads_proper): Replace accessing list implemention
6001 details with API function.
6002 (handle_query): Ditto.
6003 (visit_actioned_threads_callback_ftype): New typedef.
6004 (visit_actioned_threads_data): New struct.
6005 (visit_actioned_threads): Rewrite to be find_inferior callback.
6006 (resume): Call find_inferior.
6007 (handle_status): Replace accessing list implemention
6008 details with API function.
6009 (process_serial_event): Replace accessing list implemention details
6010 with API function.
6011 * target.c (set_desired_inferior): Replace accessing list implemention
6012 details with API function.
6013 * tracepoint.c (same_process_p): New function.
6014 (gdb_agent_about_to_close): Replace accessing list implemention
6015 details with API function.
6016 * win32-low.c (child_delete_thread): Replace accessing list
6017 implemention details with API function.
6018 (match_dll_by_basename): New function.
6019 (dll_is_loaded_by_basename): New function.
6020 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6021 details call to dll_is_loaded_by_basename.
6022
80894984
DE
60232014-02-19 Doug Evans <dje@google.com>
6024
6025 * dll.h (struct dll_info): Add comment.
6026 * gdbthread.h (struct thread_info): Add comment.
6027 (current_ptid): Simplify.
6028 * inferiors.c (add_process): Update.
6029 (remove_process): Update.
6030 * inferiors.h (struct process_info): Rename member "head" to "entry".
6031 * linux-low.c (delete_lwp): Update.
6032 (add_lwp): Update.
6033 (last_thread_of_process_p): Update.
6034 (kill_one_lwp_callback, linux_kill): Update.
6035 (status_pending_p_callback): Update.
6036 (wait_for_sigstop): Update. Simplify read of ptid.
6037 (start_step_over): Update.
6038 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6039 (get_lwp_thread): Update.
6040 (struct lwp_info): Rename member "head" to "entry".
6041 * regcache.h (inferior_list_entry): Delete.
6042 * server.c (kill_inferior_callback): Update.
6043 (detach_or_kill_inferior_callback): Update.
6044 (print_started_pid): Update.
6045 (print_attached_pid): Update.
6046 (process_serial_event): Simplify read of ptid.
6047 * thread-db.c (thread_db_create_event): Update.
6048 (thread_db_get_tls_address): Update.
6049 * win32-low.c (current_inferior_ptid): Simplify.
6050
46917d26
TT
60512014-02-19 Tom Tromey <tromey@redhat.com>
6052
6053 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6054 argument.
6055 (target_supports_btrace): Update.
6056
0759a81e
YQ
60572014-02-14 Yao Qi <yao@codesourcery.com>
6058
6059 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6060 (rsp-low-ipa.o): New target.
6061
a7191e8b
TT
60622014-02-12 Tom Tromey <tromey@redhat.com>
6063
6064 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6065 convert_ascii_to_int.
6066 * regcache.c (registers_to_string): Likewise.
6067 * remote-utils.c (decode_M_packet): Likewise.
6068 * server.c (process_serial_event): Likewise.
6069
ff0e980e
TT
60702014-02-12 Tom Tromey <tromey@redhat.com>
6071
6072 * server.c (handle_query, handle_v_run): Use hex2bin, not
6073 unhexify.
6074 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6075
e9371aff
TT
60762014-02-12 Tom Tromey <tromey@redhat.com>
6077
6078 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6079 convert_int_to_ascii.
6080 * regcache.c (registers_to_string, collect_register_as_string):
6081 Likewise.
6082 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6083 Likewise.
6084 * server.c (process_serial_event): Likewise.
6085 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6086 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6087
971dc0b8
TT
60882014-02-12 Tom Tromey <tromey@redhat.com>
6089
6090 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6091 bin2hex, not hexify.
6092 * tracepoint.c (cmd_qtstatus): Likewise.
6093
0a822afb
TT
60942014-02-12 Tom Tromey <tromey@redhat.com>
6095
6096 * remote-utils.c (monitor_output): Pass explicit length to
6097 hexify.
6098
9c3d6531
TT
60992014-02-12 Tom Tromey <tromey@redhat.com>
6100
6101 * tracepoint.c: Include rsp-low.h.
6102 * server.c: Include rsp-low.h.
6103 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6104 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6105 declare.
6106 * remote-utils.c: Include rsp-low.h.
6107 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6108 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6109 (convert_int_to_ascii, convert_ascii_to_int): Move to
6110 common/rsp-low.c.
6111 * regcache.c: Include rsp-low.h.
6112 * ax.c: Include rsp-low.h.
6113 * Makefile.in (SFILES): Add common/rsp-low.c.
6114 (OBS): Add rsp-low.o.
6115 (rsp-low.o): New target.
6116
01fd3ea5
TT
61172014-02-12 Tom Tromey <tromey@redhat.com>
6118
6119 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6120 Include print-utils.h.
6121 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6122 (plongest, thirty_two, phex_nz): Remove.
6123 * Makefile.in (SFILES): Add common/print-utils.c.
6124 (OBS): Add print-utils.o.
6125 (print-utils-ipa.o): New target.
6126 (print-utils.o): New target.
6127 (IPA_OBJS): Add print-utils-ipa.o.
6128
e99dc820
TT
61292014-02-06 Tom Tromey <tromey@redhat.com>
6130
6131 * Makefile.in (SFILES): Fix indentation.
6132
ee1e2d4f
DE
61332014-02-05 Doug Evans <dje@google.com>
6134
6135 * linux-low.c (linux_wait_for_event): Improve comment.
6136 (linux_wait_1): Keep current_inferior in sync with event_child.
6137
f5a02773
DE
61382014-01-22 Doug Evans <dje@google.com>
6139
6140 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6141
87ce2a04
DE
61422014-01-22 Doug Evans <dje@google.com>
6143
6144 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6145 * configure: Regenerate.
6146 * config.in: Regenerate.
6147 * Makefile.in (SFILES): Add debug.c.
6148 (OBS): Add debug.o.
6149 * debug.c: New file.
6150 * debug.h: New file.
6151 * linux-aarch64-low.c (*): Update all debugging printfs to use
6152 debug_printf instead of fprintf.
6153 * linux-arm-low.c (*): Ditto.
6154 * linux-cris-low.c (*): Ditto.
6155 * linux-crisv32-low.c (*): Ditto.
6156 * linux-m32r-low.c (*): Ditto.
6157 * linux-sparc-low.c (*): Ditto.
6158 * linux-x86.c (*): Ditto.
6159 * linux-low.c (*): Ditto.
6160 (linux_wait_1): Add calls to debug_enter, debug_exit.
6161 (linux_wait): Remove redundant debugging printf.
6162 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6163 (linux_resume, unstop_all_lwps): Ditto.
6164 * mem-break.c (*): Update all debugging printfs to use
6165 debug_printf instead of fprintf.
6166 * remote-utils.c (*): Ditto.
6167 * thread-db.c (*): Ditto.
6168 * server.c #include <ctype.h>, "gdb_vecs.h".
6169 (debug_threads): Moved to debug.c.
6170 (*): Update all debugging printfs to use debug_printf instead of
6171 fprintf.
6172 (start_inferior): Replace call to fflush with call to debug_flush.
6173 (monitor_show_help): Mention set debug-format.
6174 (parse_debug_format_options): New function.
6175 (handle_monitor_command): Handle "monitor set debug-format".
6176 (gdbserver_usage): Mention --debug-format.
6177 (main): Parse --debug-format.
6178 * server.h (debug_threads): Declaration moved to debug.h.
6179 #include "debug.h".
6180 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6181 trace_debug_1 that uses debug_printf.
6182 (tracepoint_look_up_symbols): Update all debugging printfs to use
6183 debug_printf instead of fprintf.
6184
e671835b
BS
61852014-01-20 Baruch Siach <baruch@tkos.co.il>
6186
6187 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6188 sys/ptrace.h.
6189
b5737fa9
PA
61902014-01-17 Pedro Alves <palves@redhat.com>
6191
ea38d2a9 6192 PR build/16445
c7faa97a
PA
6193 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6194 defined after including gdb_proc_service.h.
b5737fa9 6195
40ed484e
DE
61962014-01-16 Doug Evans <dje@google.com>
6197
6198 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6199 (match_dll): Use it.
6200
969c39fb
MM
62012014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6202
6203 * target.h (target_ops) <read_btrace>: Change parameters and
6204 return type to allow error reporting.
6205 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6206 trace reading errors on.
6207 * linux-low.c (linux_low_read_btrace): Pass trace reading
6208 errors on.
6209 (linux_low_disable_btrace): New.
6210
ab7f45ba
DE
62112014-01-15 Doug Evans <dje@google.com>
6212
6213 * inferiors.c (thread_id_to_gdb_id): Delete.
6214 * inferiors.h (thread_id_to_gdb_id): Delete.
6215
66af0f44
EZ
62162014-01-13 Eli Zaretskii <eliz@gnu.org>
6217
6218 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6219 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6220 versions.
6221
9939e131
PA
62222014-01-08 Pedro Alves <palves@redhat.com>
6223
6224 * server.c (handle_status): Don't discard previous queued stop
6225 replies or thread's pending status here.
6226 (main) <disconnection>: Do it here instead.
6227
b7ea362b
PA
62282014-01-08 Pedro Alves <palves@redhat.com>
6229
6230 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6231 * server.c (visit_actioned_threads, handle_pending_status): New
6232 function.
6233 (handle_v_cont): Factor out parts to ...
6234 (resume): ... this new function. If in all-stop, and a thread
6235 being resumed has a pending status, report it without actually
6236 resuming.
6237 (myresume): Adjust to use the new 'resume' function.
6238 (clear_pending_status_callback, set_pending_status_callback)
6239 (find_status_pending_thread_callback): New functions.
6240 (handle_status): Handle the case of multiple threads having
6241 interesting statuses to report. Report threads' real last signal
6242 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6243 with an interesting thread to report the status for, instead of
6244 always reporting the status of the first thread.
6245
28498c42
JB
62462014-01-01 Joel Brobecker <brobecker@adacore.com>
6247
6248 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6249 * gdbreplay.c (gdbreplay_version): Likewise.
6250
f45c82da
YZ
62512013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6252
6253 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6254 iov.iov_len with the real length in use.
6255
379a5e2d
JB
62562013-12-13 Joel Brobecker <brobecker@adacore.com>
6257
6258 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6259 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6260 for all targets that use win32-low.c.
6261 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6262 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6263
4210d83e
PA
62642013-12-13 Pedro Alves <palves@redhat.com>
6265
6266 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6267 if equal to TARGET_WAITKIND_LOADED.
6268 * win32-low.c (cached_status): New static global.
6269 (win32_wait): Add declaration.
6270 (do_initial_child_stuff): Flush all initial pending debug events
6271 up to the initial breakpoint.
6272 (win32_wait): If CACHED_STATUS was set, return that instead
6273 of doing a real wait. Remove the code resuming the execution
6274 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6275 during the initial phase. Also remove the code changing
6276 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6277 TARGET_WAITKIND_STOPPED.
6278
e7f0d979
YQ
62792013-12-11 Yao Qi <yao@codesourcery.com>
6280
6281 * notif.c (handle_notif_ack): Return 0 if no notification
6282 matches.
6283
ebcf782c
DE
62842013-11-20 Doug Evans <dje@google.com>
6285
6286 * linux-low.c (linux_set_resume_request): Fix comment.
6287
20ad9378
DE
62882013-11-20 Doug Evans <dje@google.com>
6289
6290 * linux-low.c (resume_status_pending_p): Tweak comment.
6291
a196ebeb
WT
62922013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6293
6294 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6295 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6296 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6297 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6298 (srv_amd64_regobj): Add amd64-mpx.o.
6299 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6300 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6301 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6302 * i387-fp.c (num_pl_bnd_register) Added constant.
6303 (num_pl_bnd_cfg_registers) Added constant.
6304 (struct i387_xsave) Added reserved area and MPX fields.
6305 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6306 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6307 function.
6308 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6309 (init_registers_amd64_mpx_linux): Declare new function.
6310 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6311 (x86_64_regmap): Add MPX registers.
6312 (x86_linux_read_description): Add MPX case.
6313 (initialize_low_arch): Initialize MPX targets.
6314
0080a2f6
TT
63152013-11-18 Tom Tromey <tromey@redhat.com>
6316
6317 * configure: Rebuild.
6318 * configure.ac: Don't check for stdlib.h.
6319 * gdbreplay.c: Unconditionally include stdlib.h.
6320
2978b111
TT
63212013-11-18 Tom Tromey <tromey@redhat.com>
6322
6323 * config.in: Rebuild.
6324 * configure: Rebuild.
6325 * configure.ac: Don't use AC_HEADER_DIRENT.
6326
a3d08894
TT
63272013-11-18 Tom Tromey <tromey@redhat.com>
6328
6329 * server.h: Don't check HAVE_STRING_H.
6330 * gdbreplay.c: Don't check HAVE_STRING_H.
6331 * configure: Rebuild.
6332
0a5dd17d
TT
63332013-11-18 Tom Tromey <tromey@redhat.com>
6334
6335 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6336 LIBGNU.
6337
1bd2f0ba
TT
63382013-11-08 Tom Tromey <tromey@redhat.com>
6339
6340 * configure, config.in: Rebuild.
6341 * configure.ac: Remove unused configury.
6342
3266f10b
TT
63432013-11-08 Tom Tromey <tromey@redhat.com>
6344
6345 * acinclude.m4: Include common.m4, codeset.m4.
6346 * configure, config.in: Rebuild.
6347 * configure.ac: Use GDB_AC_COMMON.
6348
6682d959
AA
63492013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6350
6351 * linux-s390-low.c (HWCAP_S390_TE): New define.
6352 (s390_arch_setup): Consider the TE field in the HWCAP for
6353 determining 'have_regset_tdb'.
6354
fd0a4d76
SDJ
63552013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6356
6357 PR gdb/16014
6358 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6359 call to sizeof.
6360
1a3d890b
PA
63612013-10-02 Pedro Alves <palves@redhat.com>
6362
6363 * server.c (process_serial_event): Don't output "GDBserver
6364 exiting" if GDB is connected through stdio.
6365 * target.c (mywait): Likewise, be silent if GDB is connected
6366 through stdio.
6367
97ad4581
JB
63682013-10-01 Joel Brobecker <brobecker@adacore.com>
6369
6370 * lynx-low.c (lynx_add_threads_after_attach): New function.
6371 (lynx_attach): Remove call to add_thread. Add call to
6372 lynx_add_threads_after_attach instead.
6373
5b4e221c
MF
63742013-09-28 Mike Frysinger <vapier@gentoo.org>
6375
6376 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6377 * config.in, configure: Regenerated.
6378
ee47b2f8
YQ
63792013-09-18 Yao Qi <yao@codesourcery.com>
6380
6381 PR server/15959
6382 * server.c (start_inferior): Clear 'resume_info'.
6383
d6707650 63842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6385
d6707650
JW
6386 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6387 for each register.
6388
9243dd0e 63892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6390
9243dd0e
JW
6391 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6392 linux-tile-low.o to srv_tgtobj.
6393
c623a6ef
WN
63942013-09-16 Will Newton <will.newton@linaro.org>
6395
6396 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6397 out regs.
6398
fb71d39e
PA
63992013-09-06 Pedro Alves <palves@redhat.com>
6400
6401 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6402 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6403 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6404 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6405 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6406 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6407
8e7e9910
PA
64082013-09-06 Pedro Alves <palves@redhat.com>
6409
6410 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6411 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6412
7c3a12ca
PA
64132013-09-06 Pedro Alves <palves@redhat.com>
6414
6415 * linux-amd64-ipa.c: Include tracepoint.h.
6416 * linux-i386-ipa.c: Include tracepoint.h.
6417
8eb3d7b6
RW
64182013-09-06 Ricard Wanderlof <ricardw@axis.com>
6419
6420 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6421 (ps_get_thread_area): New function.
6422
eddddb9d
RW
64232013-09-06 Ricard Wanderlof <ricardw@axis.com>
6424
6425 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6426 (initialize_low_arch): Call init_registers_crisv32 rather than
6427 init_register_crisv32.
6428
533b0600
PA
64292013-09-05 Pedro Alves <palves@redhat.com>
6430
6431 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6432 to ...
6433 * hostio.h: ... this new file.
6434 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6435 win32-low.c: Include hostio.h.
6436
0ce3d3b5
PA
64372013-09-05 Pedro Alves <palves@redhat.com>
6438
6439 * server.h (gdb_client_data, handler_func, callback_handler_func)
6440 (delete_file_handler, add_file_handler, append_callback_event)
6441 (delete_callback_event, start_event_loop, initialize_event_loop):
6442 Move to event-loop.h and include it.
6443 * event-loop.h: New file.
6444
799cdc37
PA
64452013-09-05 Pedro Alves <palves@redhat.com>
6446
6447 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6448 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6449 (loaded_dll, unloaded_dll): Move to ...
6450 * dll.h: ... this new file.
6451 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6452
6a6bbd9d
PA
64532013-09-05 Pedro Alves <palves@redhat.com>
6454
6455 * server.h (current_process, get_thread_process, all_processes)
6456 (add_inferior_to_list, for_each_inferior, current_inferior)
6457 (remove_inferior, add_process, remove_process, find_process_pid)
6458 (have_started_inferiors_p, have_attached_inferiors_p)
6459 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6460 (clear_inferiors, find_inferior, find_inferior_id)
6461 (inferior_target_data, set_inferior_target_data)
6462 (inferior_regcache_data, set_inferior_regcache_data): Move to
6463 inferiors.h, and include it.
6464 * inferiors.h: New file.
6465
f699aaba
PA
64662013-09-05 Pedro Alves <palves@redhat.com>
6467
6468 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6469 Move ...
72f4393d 6470 * ax.h: ... here.
f699aaba 6471
c144c7a0
PA
64722013-09-05 Pedro Alves <palves@redhat.com>
6473
6474 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6475 tracepoint.h.
6476 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6477 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6478 (handle_tracepoint_general_set, handle_tracepoint_query)
6479 (tracepoint_finished_step, tracepoint_was_hit)
6480 (release_while_stepping_state_list, current_traceframe)
6481 (in_readonly_region, traceframe_read_mem)
6482 (fetch_traceframe_registers, traceframe_read_sdata)
6483 (traceframe_read_info, struct fast_tpoint_collect_status)
6484 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6485 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6486 (supply_fast_tracepoint_registers)
6487 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6488 (ipa_tdesc, claim_trampoline_space)
6489 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6490 (agent_mem_read, agent_get_trace_state_variable_value)
6491 (agent_set_trace_state_variable_value, agent_tsv_read)
6492 (agent_mem_read_string, get_raw_reg_func_addr)
6493 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6494 * tracepoint.h: ... this new file.
6495
ff42e6ab
PA
64962013-09-05 Pedro Alves <palves@redhat.com>
6497
6498 * server.h (perror_with_name, error, fatal, warning, paddress)
6499 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6500 include it.
6501 * utils.h: New file.
6502
541af0f4
PA
65032013-09-05 Pedro Alves <palves@redhat.com>
6504
6505 * server.h (remote_debug, noack_mode, transport_is_reliable)
6506 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6507 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6508 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6509 (write_enn, initialize_async_io, enable_async_io)
6510 (disable_async_io, check_remote_input_interrupt_request)
6511 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6512 (dead_thread_notify, prepare_resume_reply)
6513 (decode_address_to_semicolon, decode_address, decode_m_packet)
6514 (decode_M_packet, decode_X_packet, decode_xfer_write)
6515 (decode_search_memory_packet, unhexify, hexify)
6516 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6517 (look_up_one_symbol, relocate_instruction)
6518 (monitor_output): Move to remote-utils.h, and include it.
6519 * remote-utils.h: New file.
6520
eebdf26b
PA
65212013-09-05 Pedro Alves <palves@redhat.com>
6522
6523 * server.h (_): Delete.
6524
3aafd2ff
PA
65252013-09-02 Pedro Alves <palves@redhat.com>
6526
6527 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6528 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6529 allocated.
6530 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6531
cee83bcb
PM
65322013-09-02 Pierre Muller <muller@sourceware.org>
6533
6534 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6535 or WriteProcessMemory complete successfully and handle
6536 ERROR_PARTIAL_COPY error.
6537
9a13b2fa
PA
65382013-09-02 Pedro Alves <palves@redhat.com>
6539
6540 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6541 error instead of EIO.
6542
602e3198
JK
65432013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6544
6545 PR server/15604
6546 * linux-low.c: Include filestuff.h.
6547 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6548 * lynx-low.c: Include filestuff.h.
6549 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6550 * server.c: Include filestuff.h.
6551 (main): Call notice_open_fds.
6552 * spu-low.c: Include filestuff.h.
6553 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6554
96d7229d
LM
65552013-08-22 Luis Machado <lgustavo@codesourcery.com>
6556
6557 * Makefile.in: Explain why ../target and ../nat are not
6558 listed as include file search paths.
6559 (linux-waitpid.o): New object file rule.
6560 * configure.srv (srv_native_linux_obj): New variable.
6561 Replace all occurrences of linux native object files with
6562 $srv_native_linux_obj.
6563 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6564 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6565 (linux_enable_event_reporting): Remove declaration.
6566 (my_waitpid): Moved to common/linux-waitpid.c.
6567 (linux_wait_for_event): Pass ptid when calling
6568 linux_enable_event_reporting.
6569 (linux_supports_tracefork_flag): Remove.
6570 (linux_enable_event_reporting): Likewise.
6571 (linux_tracefork_grandchild): Remove.
6572 (STACK_SIZE): Moved to common/linux-ptrace.c.
6573 (linux_tracefork_child): Remove.
6574 (linux_test_for_tracefork): Remove.
6575 (linux_look_up_symbols): Call linux_supports_traceclone.
6576 (initialize_low): Remove call to linux_test_for_tracefork.
6577 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6578 common/linux-ptrace.h.
6579 (PTRACE_TYPE_ARG4): Likewise.
6580 Include linux-ptrace.h.
6581
32940073
PA
65822013-08-21 Pedro Alves <palves@redhat.com>
6583
6584 * config.in: Renegerate.
6585
33b60d58 65862013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6587
33b60d58
LM
6588 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6589 (SFILES): Remove $(srcdir)/common/target-common.c and
6590 add $(srcdir)/target/waitstatus.c.
6591 (OBS): Remove target-common.o and add waitstatus.o.
6592 (server_h): Remove $(srcdir)/../common/target-common.h and
6593 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6594 and $(srcdir)/../target/waitstatus.h.
6595 (target-common.o): Remove.
6596 (waitstatus.o): New target object file.
6597 * target.h: Do not include target-common.h and
6598 include target/resume.h, target/wait.h and
6599 target/waitstatus.h.
6600
b8e1b30e
LM
66012013-08-13 Luis Machado <lgustavo@codesourcery.com>
6602
6603 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6604 to PTRACE_TYPE_ARG3.
6605 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6606 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6607 PTRACE_TYPE_ARG4.
6608 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6609 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6610
7a60ad40
YQ
66112013-07-27 Jie Zhang <jie@codesourcery.com>
6612 Daniel Jacobowitz <dan@codesourcery.com>
6613 Yao Qi <yao@codesourcery.com>
6614
6615 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6616 (mips-linux-watch.o): New rule.
6617 (mips_linux_watch_h): New variable.
6618 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6619 srv_tgtobj.
6620 * linux-mips-low.c: Include mips-linux-watch.h.
6621 (struct arch_process_info, struct arch_lwp_info): New.
6622 (update_watch_registers_callback): New function.
6623 (mips_linux_new_process, mips_linux_new_thread) New functions.
6624 (mips_linux_prepare_to_resume, mips_insert_point): New
6625 functions.
6626 (mips_remove_point, mips_stopped_by_watchpoint): New
6627 functions.
6628 (rsp_bp_type_to_target_hw_bp_type): New function.
6629 (mips_stopped_data_address): New function.
6630 (the_low_target): Add watchpoint support functions.
6631
de6f69ad
YQ
66322013-07-27 Yao Qi <yao@codesourcery.com>
6633
6634 * i386-low.c: Include break-common.h.
6635 (enum target_hw_bp_type): Remove.
6636
3360c0bf
LM
66372013-07-24 Luis Machado <lgustavo@codesourcery.com>
6638
6639 * Makefile.in (SFILES): /common/target-common.c.
6640 (OBS): Add target-common.o.
6641 (server_h): Add $(srcdir)/../common/target-common.h.
6642 (target-common.o): New target.
6643 * server.c (queue_stop_reply_callback): Free
6644 status string after use.
6645 * target.c (target_waitstatus_to_string): Remove.
6646 * target.h: Include target-common.h.
6647 (resume_kind): Likewise.
6648 (target_waitkind): Likewise.
6649 (target_waitstatus): Likewise.
6650 (TARGET_WNOHANG): Likewise.
6651
bd885420
YQ
66522013-07-04 Yao Qi <yao@codesourcery.com>
6653
6654 * Makefile.in (host_alias): Use @host_noncanonical@.
6655 (target_alias): Use @target_noncanonical@.
6656 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6657 ACX_NONCANONICAL_HOST.
6658 * configure: Regenerated.
6659
6660 Revert:
6661 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6662
6663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6664 * configure: Rebuild.
6665 * Makefile.in (version_host, version_target): Get from configure.
6666 (version.c): Use $(version_host) and $(version_target).
6667
17ef446e
PA
66682013-07-03 Pedro Alves <palves@redhat.com>
6669
6670 * Makefile.in (config.status): Depend on development.sh.
6671 * acinclude.m4: Include libmcheck.m4.
6672 * configure: Regenerate.
6673
7a9a7487
MG
66742013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6675
6676 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6677 attribute inside the parentheses.
6678 (winapi_DebugSetProcessKillOnExit): Ditto.
6679 (winapi_DebugBreakProcess): Ditto.
6680 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6681
49b64de6
MG
66822013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6683
6684 * notif.h (notif_event): Add a dummy member to avoid compiler
6685 errors.
6686
d5749ee7
PA
66872013-07-01 Pedro Alves <palves@redhat.com>
6688
6689 * hostio.c (HOSTIO_PATH_MAX): Define.
6690 (require_filename, handle_open, handle_unlink, handle_readlink):
6691 Use it.
6692
d8d2a3ee
PA
66932013-07-01 Pedro Alves <palves@redhat.com>
6694
6695 * server.h: Include "pathmax.h".
6696 * linux-low.c: Don't include sys/param.h.
6697 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6698 MAXPATHLEN.
6699 * win32-low.c: Don't include sys/param.h.
6700 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6701
bc7dea8d
PA
67022013-07-01 Pedro Alves <palves@redhat.com>
6703
6704 * event-loop.c: Don't check HAVE_UNISTD_H before including
6705 <unistd.h>.
6706 * gdbreplay.c: Likewise.
6707 * remote-utils.c: Likewise.
6708 * server.c: Likewise.
6709 * configure.ac: Don't check for unistd.h.
6710 * configure: Regenerate.
6711
d6c2da54
TT
67122013-06-28 Tom Tromey <tromey@redhat.com>
6713
6714 * Makefile.in (version.c): Use version.in, not
6715 common/version.in.
6716
257b6bec
MG
67172013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6718
6719 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6720 * configure: Rebuild.
6721 * Makefile.in (version_host, version_target): Get from configure.
6722 (version.c): Use $(version_host) and $(version_target).
6723
86ebe149
DK
67242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6725
6726 Fix trace-status to output user name without trailing colon.
6727 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6728
f30aa5af
DK
67292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6730
6731 Fix trace-status to output proper start-time and stop-time.
6732 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6733 output start time and stop time in hex as gdb expects.
6734
28a93511
YQ
67352013-06-26 Pedro Alves <pedro@codesourcery.com>
6736
6737 * tracepoint.c (build_traceframe_info_xml): Output trace state
6738 variables present in the trace buffer.
6739
01208463
TT
67402013-06-24 Tom Tromey <tromey@redhat.com>
6741
6742 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6743 create-version.sh.
6744 (version.o): Remove.
6745 * gdbreplay.c: Include version.h.
6746 (version, host_name): Don't declare.
6747 * server.h: Include version.h.
6748 (version, host_name): Don't declare.
6749
760256f9
PA
67502013-06-12 Pedro Alves <palves@redhat.com>
6751
6752 * linux-x86-low.c (linux_is_elf64): Delete global.
6753 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6754 with local linux_pid_exe_is_elf_64_file use.
6755
030031ee
PA
67562013-06-11 Pedro Alves <palves@redhat.com>
6757
6758 * linux-low.c (regset_disabled, disable_regset): New functions.
6759 (regsets_fetch_inferior_registers)
6760 (regsets_store_inferior_registers): Use them.
6761 (initialize_regsets_info); Don't allocate the disabled_regsets
6762 array here.
6763 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6764 comment.
6765
5da6eb0a
PA
67662013-06-11 Pedro Alves <palves@redhat.com>
6767
6768 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6769 xmalloc.
6770
7e5aaa09
PA
67712013-06-11 Pedro Alves <palves@redhat.com>
6772
6773 * linux-x86-low.c (initialize_low_arch): Call
6774 init_registers_x32_avx_linux.
6775
d878444c
JK
67762013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6777
6778 Fix compatibility with Android Bionic.
6779 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6780 it is not empty.
6781
3aee8918
PA
67822013-06-07 Pedro Alves <palves@redhat.com>
6783
5f2b57b5 6784 PR server/14823
3aee8918
PA
6785 * Makefile.in (OBS): Add tdesc.o.
6786 (IPA_OBJS): Add tdesc-ipa.o.
6787 (tdesc-ipa.o): New rule.
6788 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6789 interface.
6790 * linux-low.c (new_inferior): Delete.
6791 (disabled_regsets, num_regsets): Delete.
6792 (linux_add_process): Adjust to set the new per-process
6793 new_inferior flag.
6794 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6795 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6796 was a stop. When calling arch_setup, switch the current inferior
6797 to the thread that got an event.
6798 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6799 (regsets_fetch_inferior_registers)
6800 (regsets_store_inferior_registers): New regsets_info parameter.
6801 Adjust to use it.
6802 (linux_register_in_regsets): New regs_info parameter. Adjust to
6803 use it.
6804 (register_addr, fetch_register, store_register): New usrregs_info
6805 parameter. Adjust to use it.
6806 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6807 parameter regs_info. Adjust to use it.
6808 (linux_fetch_registers): Get the current inferior's regs_info, and
6809 adjust to use it.
6810 (linux_store_registers): Ditto.
6811 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6812 (initialize_low): Don't initialize the target_regsets here. Call
6813 initialize_low_arch.
6814 * linux-low.h (target_regsets): Delete declaration.
6815 (struct regsets_info): New.
6816 (struct usrregs_info): New.
6817 (struct regs_info): New.
6818 (struct process_info_private) <new_inferior>: New field.
6819 (struct linux_target_ops): Delete the num_regs, regmap, and
6820 regset_bitmap fields. New field regs_info.
6821 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6822 * i387-fp.c (num_xmm_registers): Delete.
6823 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6824 calls to new interface.
6825 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6826 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6827 Infer the number of xmm registers from the regcache's target
6828 description.
6829 * i387-fp.h (num_xmm_registers): Delete.
6830 * inferiors.c (add_thread): Don't install the thread's regcache
6831 here.
6832 * proc-service.c (gregset_info): Fetch the current inferior's
6833 regs_info. Adjust to use it.
6834 * regcache.c: Include tdesc.h.
6835 (register_bytes, reg_defs, num_registers)
6836 (gdbserver_expedite_regs): Delete.
6837 (get_thread_regcache): If the thread doesn't have a regcache yet,
6838 create one, instead of aborting gdbserver.
6839 (regcache_invalidate_one): Rename to ...
6840 (regcache_invalidate_thread): ... this.
6841 (regcache_invalidate_one): New.
6842 (regcache_invalidate): Only invalidate registers of the current
6843 process.
6844 (init_register_cache): Add target_desc parameter, and use it.
6845 (new_register_cache): Ditto. Assert the target description has a
6846 non zero registers_size.
6847 (regcache_cpy): Add assertions. Adjust.
6848 (realloc_register_cache, set_register_cache): Delete.
6849 (registers_to_string, registers_from_string): Adjust.
6850 (find_register_by_name, find_regno, find_register_by_number)
6851 (register_cache_size): Add target_desc parameter, and use it.
6852 (free_register_cache_thread, free_register_cache_thread_one)
6853 (regcache_release, register_cache_size): New.
6854 (register_size): Add target_desc parameter, and use it.
6855 (register_data, supply_register, supply_register_zeroed)
6856 (supply_regblock, supply_register_by_name, collect_register)
6857 (collect_register_as_string, collect_register_by_name): Adjust.
6858 * regcache.h (struct target_desc): Forward declare.
6859 (struct regcache) <tdesc>: New field.
6860 (init_register_cache, new_register_cache): Add target_desc
6861 parameter.
6862 (regcache_invalidate_thread): Declare.
6863 (regcache_invalidate_one): Delete declaration.
6864 (regcache_release): Declare.
6865 (find_register_by_number, register_cache_size, register_size)
6866 (find_regno): Add target_desc parameter.
6867 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6868 declarations.
6869 * remote-utils.c: Include tdesc.h.
6870 (outreg, prepare_resume_reply): Adjust.
6871 * server.c: Include tdesc.h.
6872 (gdbserver_xmltarget): Delete declaration.
6873 (get_features_xml, process_serial_event): Adjust.
6874 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6875 declare.
6876 (struct process_info) <tdesc>: New field.
6877 (ipa_tdesc): Declare.
6878 * tdesc.c: New file.
6879 * tdesc.h: New file.
6880 * tracepoint.c: Include tdesc.h.
6881 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6882 (get_context_regcache): Adjust to pass ipa_tdesc down.
6883 (do_action_at_tracepoint): Adjust to get the register cache size
6884 from the context regcache's description.
6885 (traceframe_walk_blocks): Adjust to get the register cache size
6886 from the current trace frame's description.
6887 (traceframe_get_pc): Adjust to get current trace frame's
6888 description and pass it down.
6889 (gdb_collect): Adjust to get the register cache size from the
6890 IPA's description.
6891 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6892 (gdbserver_xmltarget): Delete.
6893 (initialize_low_tracepoint): Set the ipa's target description.
6894 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6895 (initialize_low_tracepoint): Set the ipa's target description.
6896 * linux-x86-low.c: Include tdesc.h.
6897 [__x86_64__] (is_64bit_tdesc): New.
6898 (ps_get_thread_area, x86_get_thread_area): Use it.
6899 (i386_cannot_store_register): Rename to ...
6900 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6901 (i386_cannot_fetch_register): Rename to ...
6902 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6903 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6904 to new interface.
6905 (target_regsets): Rename to ...
6906 (x86_regsets): ... this.
6907 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6908 interface.
6909 (x86_siginfo_fixup): Use is_64bit_tdesc.
6910 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6911 (tdesc_x32_avx_linux, tdesc_x32_linux)
6912 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6913 Declare.
6914 (x86_linux_update_xmltarget): Delete.
6915 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6916 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6917 (AMD64_LINUX_USER64_CS): New.
6918 (x86_linux_read_description): New, based on
6919 x86_linux_update_xmltarget.
6920 (same_process_callback): New.
6921 (x86_arch_setup_process_callback): New.
6922 (x86_linux_update_xmltarget): New.
6923 (x86_regsets_info): New.
6924 (amd64_linux_regs_info): New.
6925 (i386_linux_usrregs_info): New.
6926 (i386_linux_regs_info): New.
6927 (x86_linux_regs_info): New.
6928 (x86_arch_setup): Reimplement.
6929 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6930 (x86_emit_ops): Ditto.
6931 (the_low_target): Adjust. Install x86_linux_regs_info,
6932 x86_cannot_fetch_register, and x86_cannot_store_register.
6933 (initialize_low_arch): New.
6934 * linux-ia64-low.c (tdesc_ia64): Declare.
6935 (ia64_fetch_register): Adjust.
6936 (ia64_usrregs_info, regs_info): New globals.
6937 (ia64_regs_info): New function.
6938 (the_low_target): Adjust.
6939 (initialize_low_arch): New function.
6940 * linux-sparc-low.c (tdesc_sparc64): Declare.
6941 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6942 Adjust.
6943 (sparc_arch_setup): New function.
6944 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6945 (the_low_target): Adjust.
6946 (initialize_low_arch): New function.
6947 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6948 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6949 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6950 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6951 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6952 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6953 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6954 (tdesc_powerpc_isa205_vsx64l): Declare.
6955 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6956 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6957 (ppc_set_pc, ppc_get_hwcap): Adjust.
6958 (ppc_usrregs_info): Forward declare.
6959 (!__powerpc64__) ppc_regmap_adjusted: New global.
6960 (ppc_arch_setup): Adjust to the current process'es target
6961 description.
6962 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6963 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6964 (ppc_store_evrregset): Adjust.
6965 (target_regsets): Rename to ...
6966 (ppc_regsets): ... this, and make static.
6967 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6968 (ppc_regs_info): New function.
6969 (the_low_target): Adjust.
6970 (initialize_low_arch): New function.
6971 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6972 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6973 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6974 (tdesc_s390x_linux64v2): Declare.
6975 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6976 (s390_fill_gregset, s390_store_last_break): Adjust.
6977 (target_regsets): Rename to ...
6978 (s390_regsets): ... this, and make static.
6979 (s390_get_pc, s390_set_pc): Adjust.
6980 (s390_get_hwcap): New target_desc parameter, and use it.
6981 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6982 (s390_arch_setup): Adjust to set the current process'es target
6983 description. Don't adjust the regmap.
6984 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6985 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6986 (regs_info_3264): New globals.
6987 (s390_regs_info): New function.
6988 (the_low_target): Adjust.
6989 (initialize_low_arch): New function.
6990 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6991 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6992 [__mips64] (init_registers_mips_linux)
6993 (init_registers_mips_dsp_linux): Delete defines.
6994 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6995 (have_dsp): New global.
6996 (mips_read_description): New, based on mips_arch_setup.
6997 (mips_arch_setup): Reimplement.
6998 (get_usrregs_info): New function.
6999 (mips_cannot_fetch_register, mips_cannot_store_register)
7000 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7001 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7002 (target_regsets): Rename to ...
7003 (mips_regsets): ... this, and make static.
7004 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7005 (dsp_regs_info, regs_info): New globals.
7006 (mips_regs_info): New function.
7007 (the_low_target): Adjust.
7008 (initialize_low_arch): New function.
7009 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7010 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7011 Declare.
7012 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7013 (arm_read_description): New, with bits factored from
7014 arm_arch_setup.
7015 (arm_arch_setup): Reimplement.
7016 (target_regsets): Rename to ...
7017 (arm_regsets): ... this, and make static.
7018 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7019 (arm_regs_info): New function.
7020 (the_low_target): Adjust.
7021 (initialize_low_arch): New function.
7022 * linux-m68k-low.c (tdesc_m68k): Declare.
7023 (target_regsets): Rename to ...
7024 (m68k_regsets): ... this, and make static.
7025 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7026 (m68k_regs_info): New function.
7027 (m68k_arch_setup): New function.
7028 (the_low_target): Adjust.
7029 (initialize_low_arch): New function.
7030 * linux-sh-low.c (tdesc_sharch): Declare.
7031 (target_regsets): Rename to ...
7032 (sh_regsets): ... this, and make static.
7033 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7034 (sh_regs_info, sh_arch_setup): New functions.
7035 (the_low_target): Adjust.
7036 (initialize_low_arch): New function.
7037 * linux-bfin-low.c (tdesc_bfin): Declare.
7038 (bfin_arch_setup): New function.
7039 (bfin_usrregs_info, regs_info): New globals.
7040 (bfin_regs_info): New function.
7041 (the_low_target): Adjust.
7042 (initialize_low_arch): New function.
7043 * linux-cris-low.c (tdesc_cris): Declare.
7044 (cris_arch_setup): New function.
7045 (cris_usrregs_info, regs_info): New globals.
7046 (cris_regs_info): New function.
7047 (the_low_target): Adjust.
7048 (initialize_low_arch): New function.
7049 * linux-cris-low.c (tdesc_crisv32): Declare.
7050 (cris_arch_setup): New function.
7051 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7052 (cris_regs_info): New function.
7053 (the_low_target): Adjust.
7054 (initialize_low_arch): New function.
7055 * linux-m32r-low.c (tdesc_m32r): Declare.
7056 (m32r_arch_setup): New function.
7057 (m32r_usrregs_info, regs_info): New globals.
7058 (m32r_regs_info): Adjust.
7059 (initialize_low_arch): New function.
7060 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7061 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7062 (tic6x_usrregs_info): Forward declare.
7063 (tic6x_read_description): New function, based on ...
7064 (tic6x_arch_setup): ... this. Reimplement.
7065 (target_regsets): Rename to ...
7066 (tic6x_regsets): ... this, and make static.
7067 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7068 (tic6x_regs_info): New function.
7069 (the_low_target): Adjust.
7070 (initialize_low_arch): New function.
7071 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7072 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7073 (target_regsets): Rename to ...
7074 (xtensa_regsets): ... this, and make static.
7075 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7076 globals.
7077 (xtensa_arch_setup, xtensa_regs_info): New functions.
7078 (the_low_target): Adjust.
7079 (initialize_low_arch): New function.
7080 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7081 (nios2_arch_setup): Set the current process'es tdesc.
7082 (target_regsets): Rename to ...
7083 (nios2_regsets): ... this.
7084 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7085 (nios2_regs_info): New function.
7086 (the_low_target): Adjust.
7087 (initialize_low_arch): New function.
a261b8f5
PA
7088 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7089 (aarch64_arch_setup): Set the current process'es tdesc.
7090 (target_regsets): Rename to ...
7091 (aarch64_regsets): ... this.
7092 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7093 (aarch64_regs_info): New function.
7094 (the_low_target): Adjust.
7095 (initialize_low_arch): New function.
3aee8918
PA
7096 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7097 globals.
7098 (target_regsets): Rename to ...
7099 (tile_regsets): ... this.
7100 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7101 (tile_regs_info): New function.
7102 (tile_arch_setup): Set the current process'es tdesc.
7103 (the_low_target): Adjust.
7104 (initialize_low_arch): New function.
7105 * spu-low.c (tdesc_spu): Declare.
7106 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7107 * win32-arm-low.c (tdesc_arm): Declare.
7108 (arm_arch_setup): New function.
7109 (the_low_target): Install arm_arch_setup instead of
7110 init_registers_arm.
7111 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7112 (init_windows_x86): Rename to ...
7113 (i386_arch_setup): ... this. Set `win32_tdesc'.
7114 (the_low_target): Adjust.
7115 * win32-low.c (win32_tdesc): New global.
7116 (child_add_thread): Don't create the thread cache here.
7117 (do_initial_child_stuff): Set the new process'es tdesc.
7118 * win32-low.h (struct target_desc): Forward declare.
7119 (win32_tdesc): Declare.
7120 * lynx-i386-low.c (tdesc_i386): Declare global.
7121 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7122 * lynx-low.c (lynx_tdesc): New global.
7123 (lynx_add_process): Set the new process'es tdesc.
7124 * lynx-low.h (struct target_desc): Forward declare.
7125 (lynx_tdesc): Declare global.
7126 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7127 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7128 * nto-low.c (nto_tdesc): New global.
7129 (do_attach): Set the new process'es tdesc.
7130 * nto-low.h (struct target_desc): Forward declare.
7131 (nto_tdesc): Declare.
7132 * nto-x86-low.c (tdesc_i386): Declare.
7133 (nto_x86_arch_setup): Set `nto_tdesc'.
7134
b1fbec62
GB
71352013-06-04 Gary Benson <gbenson@redhat.com>
7136
7137 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7138 to qSupported response when appropriate.
7139 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7140 with nonzero-length annex.
7141 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7142 arguments supplied in annex.
7143
d1ec4ce7
DE
71442013-05-31 Doug Evans <dje@google.com>
7145
ac44adcb 7146 PR server/15594
d1ec4ce7
DE
7147 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7148 64 bits in 64-cross-32 environment.
7149
9b25f2d3
PA
71502013-05-28 Pedro Alves <palves@redhat.com>
7151
7152 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7153 (aarch64-without-fpu.c): Delete rule.
7154 * configure.srv (aarch64*-*-linux*): Remove references to
7155 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7156 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7157 declaration.
7158
6740dc9c
PA
71592013-05-24 Pedro Alves <palves@redhat.com>
7160
7161 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7162 instead of strchr/decode_address. Error if the range isn't split
7163 with a ','. Don't assume there's be a ':' in the action.
7164
c2d6af84
PA
71652013-05-23 Yao Qi <yao@codesourcery.com>
7166 Pedro Alves <palves@redhat.com>
7167
7168 * linux-low.c (lwp_in_step_range): New function.
7169 (linux_wait_1): If the thread was range stepping and stopped
7170 outside the stepping range, report the stop to GDB. Otherwise,
7171 continue stepping. Add range stepping debug output.
7172 (linux_set_resume_request): Copy the step range from the resume
7173 request to the lwp.
7174 (linux_supports_range_stepping): New.
7175 (linux_target_ops) <supports_range_stepping>: Set to
7176 linux_supports_range_stepping.
7177 * linux-low.h (struct linux_target_ops)
7178 <supports_range_stepping>: New field.
7179 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7180 * linux-x86-low.c (x86_supports_range_stepping): New.
7181 (the_low_target) <supports_range_stepping>: Set to
7182 x86_supports_range_stepping.
7183 * server.c (handle_v_cont): Handle 'r' action.
7184 (handle_v_requests): Append ";r" if the target supports range
7185 stepping.
7186 * target.h (struct thread_resume) <step_range_start,
7187 step_range_end>: New fields.
7188 (struct target_ops) <supports_range_stepping>:
7189 New field.
7190 (target_supports_range_stepping): New macro.
7191
58794e1a
JB
71922013-05-17 Joel Brobecker <brobecker@adacore.com>
7193
7194 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7195 confusion in comment.
7196
d631c5a7
JB
71972013-05-17 Joel Brobecker <brobecker@adacore.com>
7198
7199 * lynx-low.c (struct process_info_private): New type.
7200 (lynx_add_process): New function.
7201 (lynx_create_inferior, lynx_attach): Replace calls to
7202 add_process by calls to lynx_add_process.
7203 (lynx_resume): If PTID is null, then try using
7204 current_process()->private->last_wait_event_ptid.
7205 Add comments.
7206 (lynx_clear_inferiors): Delete. The contents of that function
7207 has been inlined in lynx_mourn;
7208 (lynx_wait_1): Save the ptid in the process's private data.
7209 (lynx_mourn): Free the process' private data. Replace call
7210 to lynx_clear_inferiors by call to clear_inferiors.
7211
96f7a20f
YQ
72122013-05-17 Yao Qi <yao@codesourcery.com>
7213
7214 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7215 the right place.
7216
db0dfaa0
LM
72172013-05-16 Luis Machado <lgustavo@codesourcery.com>
7218
7219 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7220 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7221 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7222 PT_TEXT_END_ADDR guards. Update comments.
7223 (linux_target_op) <read_offsets>: Conditionally define to
7224 linux_read_offsets if the target is UCLIBC and if it defines
7225 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7226
68f5f838
SL
72272013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7228 Andrew Jenner <andrew@codesourcery.com>
7229
7230 * Makefile.in (SFILES): Add linux-nios2-low.c.
7231 (clean): Add action to delete nios2-linux.c.
7232 (nios2-linux.c): New rule.
7233 * configure.srv: Add nios2*-*-linux*.
7234 * linux-nios2-low.c: New.
7235
1ebff1fd
HAQ
72362013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7237
7238 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7239
f6150862
HZ
72402013-04-25 Hui Zhu <hui@codesourcery.com>
7241
7242 PR gdb/15186
f6150862
HZ
7243 * ax.c (ax_printf): Add fflush.
7244
614c279d
TT
72452013-04-22 Tom Tromey <tromey@redhat.com>
7246
7247 * Makefile.in (SFILES): Add filestuff.c.
7248 (OBS): Add filestuff.o.
7249 (filestuff.o): New target.
7250 * config.in, configure: Rebuild.
7251 * configure.ac: Check for fdwalk, pipe2.
7252
7d4e5717
PA
72532013-04-17 Pedro Alves <palves@redhat.com>
7254
7255 * configure.ac (USE_THREAD_DB): Delete variable.
7256 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7257 Don't AC_SUBST USE_THREAD_DB.
7258 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7259 * config.in, configure: Regenerate.
7260
d5c93e41
PA
72612013-04-16 Pedro Alves <palves@redhat.com>
7262
7263 * linux-low.h (struct lwp_info) <thread_known>: Move under
7264 the USE_THREAD_DB #ifdef.
7265
04f5fe89
PA
72662013-04-16 Pedro Alves <palves@redhat.com>
7267
7268 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7269 (linux-low.o): Delete rule.
7270 * linux-low.h: Always include "gdb_thread_db.h" instead of
7271 conditionally including thread_db.h.
7272 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7273 HAVE_THREAD_DB_H.
7274
480b27bf
JK
72752013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7276
7277 * Makefile.in (install-only): Fix make install regression.
7278
43662968
JK
72792013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7280
7281 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7282 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7283 installation.
7284 * gdbserver.1: Remove.
7285
3e74e146
PA
72862013-03-22 Pedro Alves <palves@redhat.com>
7287
7288 * linux-low.c (handle_extended_wait): Don't call
7289 linux_enable_event_reporting.
7290
a8347a2a
TT
72912013-03-15 Tony Theodore <tonyt@logyst.com>
7292
7293 PR build/9098:
7294 * Makefile.in (SHELL): Use @SHELL@.
7295
eeb56fa7
SDJ
72962013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7297
7298 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7299 compiler warning.
7300
4fa7e2ff
JB
73012013-03-13 Joel Brobecker <brobecker@adacore.com>
7302
7303 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7304 Remove extraneous NULL element.
7305
8ddb1965
YQ
73062013-03-13 Yao Qi <yao@codesourcery.com>
7307
7308 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7309 'V' block in trace frame.
7310
9accd112
MM
73112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7312
7313 * target.h (struct target_ops): Add btrace ops.
7314 (target_supports_btrace): New macro.
7315 (target_enable_btrace): New macro.
7316 (target_disable_btrace): New macro.
7317 (target_read_btrace): New macro.
7318 * gdbthread.h (struct thread_info): Add btrace field.
7319 * server.c: Include btrace-common.h.
7320 (handle_btrace_general_set): New function.
7321 (handle_btrace_enable): New function.
7322 (handle_btrace_disable): New function.
7323 (handle_general_set): Call handle_btrace_general_set.
7324 (handle_qxfer_btrace): New function.
7325 (struct qxfer qxfer_packets[]): Add btrace entry.
7326 * inferiors.c (remove_thread): Disable btrace.
7327 * linux-low: Include linux-btrace.h.
7328 (linux_low_enable_btrace): New function.
7329 (linux_low_read_btrace): New function.
7330 (linux_target_ops): Add btrace ops.
7331 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7332 Add srv_linux_btrace=yes.
7333 (x86_64-*-linux*): Add linux-btrace.o.
7334 Add srv_linux_btrace=yes.
7335 * configure.ac: Define HAVE_LINUX_BTRACE.
7336 * config.in: Regenerated.
7337 * configure: Regenerated.
7338
5cc22e4c
MM
73392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7340
7341 * server.c (handle_qxfer): Preserve error message if -3 is
7342 returned.
7343 (qxfer): Document the -3 return value.
7344
7c97f91e
MM
73452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7346
7347 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7348 (linux_btrace_h): New variable.
7349 (linux-btrace.o): New rule.
7350
be9a119c 73512013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7352 Hafiz Abid Qadeer <abidh@codesourcery.com>
7353
7354 * tracepoint.c (trace_buffer_size): New global.
7355 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7356 (init_trace_buffer): Change to one-argument function. Allocate
7357 trace buffer memory.
7358 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7359 handle QTBuffer:size packet.
7360 (cmd_bigqtbuffer_size): New function.
7361 (initialize_tracepoint): Call init_trace_buffer with
7362 DEFAULT_TRACE_BUFFER_SIZE.
7363 * server.c (handle_query): Add QTBuffer:size in the
7364 supported packets.
7365
e64f7499
YQ
73662013-03-07 Yao Qi <yao@codesourcery.com>
7367
7368 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7369 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7370 of -1.
7371 (cmd_qtsp): Adjust condition. Do post increment.
7372 Set cur_action and cur_step_action back to 0.
7373
f0ae6fc3
PA
73742013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7375
7376 PR server/15236
7377 * linux-low.c (linux_write_memory): Return early success if LEN is
7378 zero.
7379
b5b0b0af
CV
73802013-03-05 Corinna Vinschen <vinschen@redhat.de>
7381
334ad4a8 7382 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7383
589bc927
TT
73842013-02-28 Tom Tromey <tromey@redhat.com>
7385
7386 * configure.ac: Invoke AC_SYS_LARGEFILE.
7387 * configure, config.in: Rebuild.
7388
dfe07582
CV
73892013-02-28 Corinna Vinschen <vinschen@redhat.com>
7390
7391 * win32-low.c: Throughout, fix format strings and casts of
7392 printf-like functions to avoid type related warnings on all
7393 platforms.
7394 (get_child_debug_event): Print dwDebugEventCode as hex since
7395 that's how it's usually documented.
7396
736cd585
YQ
73972013-02-28 Yao Qi <yao@codesourcery.com>
7398
7399 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7400 pulongest.
7401
e1f58301
JW
74022013-02-27 Jiong Wang <jiwang@tilera.com>
7403
7404 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7405 (reg-tilegx32.c): New rule.
7406 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7407 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7408 different register info initializer according to elf class.
7409 (init_registers_tilgx32): New function. The tilegx32 register info
7410 initializer.
7411 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7412 (tile_store_gregset): Likewise.
7413
d171ca78
YQ
74142013-02-27 Yao Qi <yao@codesourcery.com>
7415
7416 * server.c (process_point_options): Print debug message when
7417 debug_threads is true.
7418
282bbdf3
YQ
74192013-02-26 Yao Qi <yao@codesourcery.com>
7420
7421 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7422
aca22551
PA
74232013-02-19 Pedro Alves <palves@redhat.com>
7424 Kai Tietz <ktietz@redhat.com>
7425
7426 PR gdb/15161
7427
7428 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7429 instead of strtoul to extract address from packet.
7430 (process_serial_event) <'z'>: Likewise.
7431
4f3cee1c
YQ
74322013-02-18 Yao Qi <yao@codesourcery.com>
7433
7434 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7435
8e1d55a3
PA
74362013-02-14 Pedro Alves <palves@redhat.com>
7437
7438 Plug memory leak.
7439
7440 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7441 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7442
458820da
PA
74432013-02-14 Pedro Alves <palves@redhat.com>
7444
7445 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7446
baea0dae
PA
74472013-02-14 Pedro Alves <palves@redhat.com>
7448
7449 * tracepoint.c (save_string): Delete.
7450 (add_tracepoint_action): Use savestring instead of save_string.
7451
0b1afbb3
PA
74522013-02-12 Pedro Alves <palves@redhat.com>
7453
7454 * linux-xtensa-low.c: Ditto.
7455 * xtensa-xtregs.c: Ditto.
7456
8a4ac37e
PA
74572013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7458
7459 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7460 thread_db.
7461
148de6bb
MS
74622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7463
7464 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7465 aarch64_num_wp_regs and aarch64_num_bp_regs to
7466 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7467
55fac6e0
MS
74682013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7469
7470 * linux-aarch64-low.c (ps_get_thread_area): Replace
7471 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7472
176eb98c
MS
74732013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7474 Marcus Shawcroft <marcus.shawcroft@arm.com>
7475 Nigel Stephens <nigel.stephens@arm.com>
7476 Yufeng Zhang <yufeng.zhang@arm.com>
7477
7478 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7479 (aarch64.c, aarch64-without-fpu.c): New targets.
7480 * configure.srv (aarch64*-*-linux*): New.
7481 * linux-aarch64-low.c: New file.
7482
56f7af9c
MS
74832013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7484
43aaf8b6 7485 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7486 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7487 (dequeue_one_deferred_signal, linux_resume_one_thread)
7488 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7489 (linux_tracefork_grandchild, linux_test_for_tracefork)
7490 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7491 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7492 where the argument is 0.
7493
60f662b0
YQ
74942013-01-25 Yao Qi <yao@codesourcery.com>
7495
7496 * event-loop.c: Include "queue.h".
7497 (gdb_event_p): New typedef.
7498 (struct gdb_event) <next_event>: Remove.
7499 (event_queue): Change to QUEUE(gdb_event_p).
7500 (async_queue_event): Remove.
7501 (gdb_event_xfree): New.
7502 (initialize_event_loop): New.
7503 (process_event): Use API from QUEUE.
7504 (wait_for_event): Likewise.
7505 * server.c (main): Call initialize_event_loop.
7506 * server.h (initialize_event_loop): Declare.
7507
5ae4861a
YQ
75082013-01-18 Yao Qi <yao@codesourcery.com>
7509
7510 * ax.h (struct eval_agent_expr_context): New.
7511 (gdb_eval_agent_expr): Update declaration.
7512 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7513 TFRAME. Add new argument CTX.
7514 * server.h (struct eval_agent_expr_context): Declare.
7515 (agent_mem_read, agent_tsv_read): Update declaration.
7516 (agent_mem_read_string): Likewise.
7517 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7518 (add_traceframe_block): Add new argument TPOINT.
7519 Increase TPOINT->traceframe_usage.
7520 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7521 eval_tracepoint_agent_expr.
7522 (condition_true_at_tracepoint): Likewise.
7523 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7524 (agent_mem_read_string, agent_tsv_read): Likewise.
7525
85e00e85
YQ
75262013-01-16 Yao Qi <yao@codesourcery.com>
7527
7528 * linux-low.c (linux_resume_one_lwp): Don't check
7529 'lwp->bp_reinsert != 0'.
7530
4039cf45
JB
75312013-01-07 Joel Brobecker <brobecker@adacore.com>
7532 Pedro Alves <palves@redhat.com>
7533
7534 * lynx-low.c (ptrace_request_to_str): Define a temporary
7535 macro and use it to simplify this function's implementation.
7536
9044dee2
JB
75372013-01-07 Joel Brobecker <brobecker@adacore.com>
7538
7539 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7540 sets errno.
7541
e6352c8f
JB
75422013-01-07 Joel Brobecker <brobecker@adacore.com>
7543
7544 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7545
50681a27
JB
75462013-01-07 Joel Brobecker <brobecker@adacore.com>
7547
7548 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7549
3f6e77ef
JB
75502013-01-07 Joel Brobecker <brobecker@adacore.com>
7551
7552 * lynx-low.c (lynx_resume): Use the resume_info parameter
7553 to determine the ptid for the lynx_ptrace call, unless
7554 it is equal to minus_one_ptid, in which case we use the
7555 ptid of the current_inferior.
7556 (lynx_wait_1): After having received a thread create/exit
7557 event, resume the inferior's execution using the signaling
7558 thread's ptid, rather than the old ptid.
7559
7fda33ae
JB
75602013-01-07 Joel Brobecker <brobecker@adacore.com>
7561
7562 * lynx-low.c (lynx_resume): Delete variable ret.
7563
b9786c74
JB
75642013-01-01 Joel Brobecker <brobecker@adacore.com>
7565
7566 * gdbreplay.c (gdbreplay_version): Update copyright year.
7567 * server.c (gdbserver_version): Likewise.
7568
8b93d60f
JB
75692012-12-17 Joel Brobecker <brobecker@adacore.com>
7570
7571 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7572 new thread.
7573
037335a7
JB
75742012-12-17 Joel Brobecker <brobecker@adacore.com>
7575
7576 * lynx-low.c (ptrace_request_to_str): Add handling for
7577 PTRACE_GETTRACESIG.
7578
52d4cbd8
JB
75792012-12-17 Joel Brobecker <brobecker@adacore.com>
7580
7581 * lynx-low.c (lynx_attach): Delete variable new_process.
7582
ab8f6ca9
JB
75832012-12-17 Joel Brobecker <brobecker@adacore.com>
7584
7585 * lynx-low.c (lynx_create_inferior): Delete variable
7586 new_process.
7587
78cbc024
JB
75882012-12-17 Joel Brobecker <brobecker@adacore.com>
7589
7590 * lynx-low.c (ptrace_request_to_str): Do not handle
7591 PTRACE_GETTHREADLIST if this macro does not exist.
7592
14a00470
YQ
75932012-12-15 Yao Qi <yao@codesourcery.com>
7594
7595 * Makefile.in (OBS): Add notif.o.
7596 * notif.c, notif.h: New.
7597 * server.c: Include "notif.h".
7598 (struct vstop_notif) <next>: Remove.
7599 <base>: New field.
7600 (queue_stop_reply): Update.
7601 (push_event, send_next_stop_reply): Remove.
7602 (discard_queued_stop_replies): Update.
7603 (notif_stop): New variable.
7604 (handle_v_stopped): Remove.
7605 (handle_v_requests): Don't call handle_v_stopped. Call
7606 handle_ack_notif instead.
7607 (queue_stop_reply_callback): Call notif_event_enque instead
7608 of queue_stop_reply.
7609 (handle_status): Don't call send_next_stop_reply, call
7610 notif_write_event instead.
7611 (kill_inferior_callback): Likewise.
7612 (detach_or_kill_inferior_callback): Likewise.
7613 (main): Call initialize_notif.
7614 (process_serial_event): Call QUEUE_is_empty.
7615 (handle_target_event): Call notif_push instead of push event.
7616 * server.h (push_event): Remove declaration.
7617
61c125b9
TT
76182012-12-10 Tom Tromey <tromey@redhat.com>
7619
7620 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7621 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7622 macros.
7623 (.c.o): Rewrite.
7624 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7625 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7626 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7627 (amd64-linux-ipa.o, ax.o): Rewrite.
7628 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7629 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7630 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7631 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7632 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7633 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7634 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7635 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7636 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7637 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7638 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7639 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7640 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7641 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7642 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7643 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7644 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7645 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7646 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7647 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7648 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7649 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7650 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7651 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7652 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7653 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7654 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7655 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7656 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7657 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7658 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7659 (reg-tilegx.o): Remove.
7660 (all_object_files): New macro.
7661 Include .deps files.
7662 * aclocal.m4, configure: Rebuild.
7663 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7664 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7665 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7666
e90e9ad9
TT
76672012-12-05 Tom Tromey <tromey@redhat.com>
7668
7669 PR gdb/14917:
7670 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7671
02d403bf 76722012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7673
7674 * configure.ac: Check for linux/perf_event.h.
7675 * config.in: Regenerated.
7676 * configure: Regenerated.
7677
0270a750
PA
76782012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7679
7680 * hostio.c (handle_readlink): Decrease buffer size
7681 parameter passed to readlink by one byte.
7682
8c29b58e
YQ
76832012-11-26 Yao Qi <yao@codesourcery.com>
7684
7685 * configure.ac (build_warnings): Append '-Wempty-body'.
7686 * configure: Regenerated.
7687 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7688 body.
7689
8bdce1ff
PM
76902012-11-15 Pierre Muller <muller@sourceware.org>
7691
7692 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7693 * config.in: Regenerate.
7694 * configure: Regenerate.
7695 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7696 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7697 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7698 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7699 header.
7700 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7701 instead of <sys/wait.h> header.
7702 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7703
02d403bf 77042012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7705
7706 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7707 (various make rules): Remove -DGDBSERVER
7708
fbd5db48
YQ
77092012-11-09 Yao Qi <yao@codesourcery.com>
7710
7711 * spu-low.c (current_ptid): Move it to ..
7712 * gdbthread.h: ... here. New.
7713 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7714 * server.c (myresume, process_serial_event): Likewise.
7715 * thread-db.c (thread_db_find_new_threads): Likewise.
7716 * tracepoint.c (run_inferior_command): Likewise.
7717
b3dc46ff
AB
77182012-10-01 Andrew Burgess <aburgess@broadcom.com>
7719
7720 * server.c (handle_search_memory_1): Include access length in
7721 warning message.
7722
07c04788
HPN
77232012-09-05 Michael Brandt <michael.brandt@axis.com>
7724
7725 * linux-crisv32-low.c: Fix compile errors.
7726
918d227b
YQ
77272012-09-04 Yao Qi <yao@codesourcery.com>
7728
7729 * tracepoint.c (cmd_qtsv): Adjust debug message.
7730 Don't check CUR_TPOINT.
7731
18c1b81a
YQ
77322012-08-28 Yao Qi <yao@codesourcery.com>
7733
7734 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7735 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7736 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7737 Remove declarations of xmalloc, xreallloc, xstrdup and
7738 freeargv.
7739 * Makefile.in (libiberty_h): New.
7740 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7741 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7742
dc82f37b
YQ
77432012-08-23 Yao Qi <yao@codesourcery.com>
7744
7745 * server.h: Remove declaration of 'xsnprintf'.
7746
406b1477
KS
77472012-08-22 Keith Seitz <keiths@redhat.com>
7748
7749 * server.h: Include build-gnulib-gbserver/config.h.
7750 * gdbreplay.c: Likewise.
7751
e6712ff1
DE
77522012-08-08 Doug Evans <dje@google.com>
7753
7754 * Makefile.in (SFILES): Add gdb_vecs.c.
7755 (OBS): Add gdb_vecs.o.
7756 (gdb_vecs_h, host_defs_h): New variables.
7757 (thread-db.o): Add $(gdb_vecs_h) dependency.
7758 (gdb_vecs.o): New rule.
7759 * thread-db.c: #include "gdb_vecs.h".
7760 (thread_db_load_search): Use a vector to iterate over path elements.
7761 Handle text appearing after "$pdir".
7762
7763 * configure.ac: Add check for strstr.
7764 * config.in: Regenerate.
7765 * configure: Regenerate.
7766
7c3270ae
UW
77672012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7768
7769 * hostio.c (handle_pread): If pread fails, fall back to attempting
7770 lseek/read.
7771 (handle_pwrite): Likewise for pwrite.
7772
b62e2b27
UW
77732012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7774
7775 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7776 between unsupported TYPE and unimplementable ADDR/LEN combination.
7777 (arm_insert_point): Act on new return value.
7778
78a99e91
PA
77792012-07-31 Pedro Alves <palves@redhat.com>
7780
7781 * server.c (process_point_options): Only skip tokens if we find
7782 one that is unrecognized. Don't treat 'X' specially while
7783 skipping unrecognized tokens.
7784
fcf303ab
UW
77852012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7786
7787 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7788 to 4-byte-align HW breakpoint addresses for Thumb.
7789
7255706c
YQ
77902012-07-27 Yao Qi <yao@codesourcery.com>
7791
7792 PR remote/14161.
7793
7794 * server.h: Declare gdb_agent_about_to_close.
7795 * target.c (kill_inferior): Include "agent.h".
7796 New. Send command 'kill'.
7797 * target.h (kill_inferior): Removed macro.
7798 * tracepoint.c (gdb_agent_about_to_close): New.
7799 (gdb_agent_helper_thread): Handle command 'close'.
7800 Wait endlessly until the inferior stops.
7801 Install gdb_agent_remove_socket to atexit hook.
7802 (agent_socket_name): New static variable.
7803 (gdb_agent_socket_init): Replace local variable 'name' with
7804 'agent_socket_name'.
7805 (gdb_agent_remove_socket): New.
7806
5a3f286f
YQ
78072012-07-27 Yao Qi <yao@codesourcery.com>
7808
7809 * server.c (process_point_options): Stop at 'X' when parsing.
7810
961bd387
ME
78112012-07-19 Michael Eager <eager@eagercon.com>
7812
a261b8f5 7813 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7814 to hw_execute.
7815 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7816 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7817 hardware breakpoint.
7818
aa7c7447
JK
78192012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7820
7821 * gdbserver/linux-low.c (initialize_low): Call
7822 linux_ptrace_init_warnings.
7823
7f216e7c
DE
78242012-07-02 Doug Evans <dje@google.com>
7825
7826 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7827 pointer to int.
7828
d3ce09f5
SS
78292012-07-02 Stan Shebs <stan@codesourcery.com>
7830
7831 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7832 (ax.o): Add it to build rule.
7833 (ax-ipa.o): Ditto.
7834 (OBS): Add format.o.
7835 (IPA_OBS): Add format.o.
7836 * server.c (handle_query): Claim support for breakpoint commands.
7837 (process_point_options): Add command case.
7838 (process_serial_event): Leave running if there are printfs in
7839 effect.
7840 * mem-break.h (any_persistent_commands): Declare.
7841 (add_breakpoint_commands): Declare.
7842 (gdb_no_commands_at_breakpoint): Declare.
7843 (run_breakpoint_commands): Declare.
7844 * mem-break.c (struct point_command_list): New struct.
7845 (struct breakpoint): New field command_list.
7846 (any_persistent_commands): New function.
7847 (add_commands_to_breakpoint): New function.
7848 (add_breakpoint_commands): New function.
7849 (gdb_no_commands_at_breakpoint): New function.
7850 (run_breakpoint_commands): New function.
7851 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7852 locally.
7853 * ax.c: Include format.h.
7854 (ax_printf): New function.
7855 (gdb_eval_agent_expr): Add printf opcode.
7856
2f8f6aed
YQ
78572012-06-13 Yao Qi <yao@codesourcery.com>
7858
7859 * server.c (start_inferior): Remove duplicated writes to fields
7860 'last_resume_kind' and 'last_status' of 'current_inferior'.
7861
0c9070b3
YQ
78622012-06-12 Yao Qi <yao@codesourcery.com>
7863 Pedro Alves <palves@redhat.com>
7864
7865 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7866 comment.
7867 * server.c (handle_v_cont): Extend comment.
7868
c52daf70
YQ
78692012-06-11 Yao Qi <yao@codesourcery.com>
7870
7871 * linux-low.c (linux_attach): Add 'static'.
7872
d38bbb0a
YQ
78732012-06-06 Yao Qi <yao@codesourcery.com>
7874
7875 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7876
89dc0afd
JK
78772012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7878
7879 Fix gcc -flto compilation warning.
7880 * server.c (main): Make variable multi_mode and attach volatile.
7881
75f62ce7
TJB
78822012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7883
7884 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7885 if the platform doesn't know about it.
7886
65f479b6
PA
78872012-05-30 Jeff Kenton <jkenton@tilera.com>
7888
7889 * Makefile.in (SFILES): Add linux-tile-low.c.
7890 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7891 * configure.srv: Handle tilegx-*-linux*.
7892 * linux-tile-low.c: New file.
7893
0c5bf5a9
JK
78942012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7895
7896 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7897
a493e3e2
PA
78982012-05-24 Pedro Alves <palves@redhat.com>
7899
7900 PR gdb/7205
7901
43aaf8b6 7902 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7903
2ea28649
PA
79042012-05-24 Pedro Alves <palves@redhat.com>
7905
7906 PR gdb/7205
7907
7908 Replace target_signal with gdb_signal throughout.
7909
8d409d16
MR
79102012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7911
7912 * linux-low.c (linux_store_registers): Avoid the copying sequence
7913 when no data has been retrieved by ptrace.
7914
23512c01
MGD
79152012-05-22 Will Deacon <will.deacon@arm.com>
7916
7917 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7918 Include asm/ptrace.h.
7919 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7920 already defined.
7921
4934b29e
MR
79222012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7923
7924 * linux-low.c (linux_store_registers): Don't re-retrieve data
7925 with ptrace that has already been obtained from /proc. Always
7926 copy any data retrieved with ptrace to the buffer supplied.
7927
bde24c0a
PA
79282012-05-11 Yao Qi <yao@codesourcery.com>
7929 Pedro Alves <palves@redhat.com>
7930
7931 * linux-low.c (enum stopping_threads_kind): New.
7932 (stopping_threads): Change type to `enum stopping_threads_kind'.
7933 (handle_extended_wait): If stopping and suspending threads, leave
7934 the new_lwp suspended too.
7935 (linux_wait_for_event): Adjust.
7936 (stop_all_lwps): Set `stopping_threads' to
7937 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7938 whether we're suspending threads or just stopping them. Assert no
7939 recursion happens.
7940
623b6bdf
YQ
79412012-04-29 Yao Qi <yao@codesourcery.com>
7942
7943 * server.h: Move some code to ...
7944 * gdbthread.h: ... here. New.
7945 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7946 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7947 (nto-low.o, win32-low.o): Likewise.
7948 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7949 * regcache.c, remote-utils.c, server.c: Likewise.
7950 * target.c, tracepoint.c, win32-low.c: Likewise.
7951
f15f9948
TJB
79522012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7953
7954 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7955 (PTRACE_ARG4_TYPE): Likewise.
7956 (PTRACE_XFER_TYPE): Likewise.
7957 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7958 ptrace to PTRACE_ARG3_TYPE.
7959 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7960 (PTRACE_ARG4_TYPE): Likewise.
7961 (PTRACE_XFER_TYPE): Likewise.
7962 (linux_detach_one_lwp): Cast fourth argument of
7963 ptrace to long then PTRACE_ARG4_TYPE.
7964 (regsets_fetch_inferior_registers): Cast third argument of
7965 ptrace to long then PTRACE_ARG3_TYPE.
7966 (regsets_store_inferior_registers): Likewise.
7967
38ea300a
PA
79682012-04-20 Pedro Alves <palves@redhat.com>
7969
7970 * configure: Regenerate.
7971
c971b7fa
PA
79722012-04-19 Pedro Alves <palves@redhat.com>
7973
43aaf8b6 7974 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7975 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7976 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7977 (all, install-only, uninstall, clean-info, all-lib, clean): No
7978 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7979 (maintainer-clean realclean distclean): Use subdir_do.
7980 (subdir_do): New.
7981 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7982 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7983 * acinclude.m4: Include acx_configure_dir.m4.
7984 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7985 calls. Call AC_PROG_RANLIB. Configure gnulib using
7986 ACX_CONFIGURE_DIR.
7987 (GNULIB): New.
7988 (GNULIB_STDINT_H): Adjust.
7989 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7990 * gdbreplay.c: Include build-gnulib/config.h.
7991 * server.h: Likewise.
7992 * aclocal.m4: Regenerate.
7993 * config.in: Regenerate.
7994 * configure: Regenerate.
c971b7fa 7995
809277f8
PA
79962012-04-19 Pedro Alves <palves@redhat.com>
7997
7998 * Makefile.in (LIBGNU, INCGNU): Adjust.
7999 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8000 (all, install-only, uninstall, clean-info, all-lib, clean)
8001 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8002 * configure.ac: Adjust AC_OUTPUT output.
8003 * aclocal.m4: Regenerate.
8004 * configure: Regenerate.
8005
fd9bb8b8
PA
80062012-04-19 Pedro Alves <palves@redhat.com>
8007
8008 * Makefile.in (generated_files): New.
8009 (server_h): Remove the explicit dependency on config.h, and depend
8010 on $generated_files.
8011
1c298c66
PA
80122012-04-19 Pedro Alves <palves@redhat.com>
8013
8014 * Makefile.in (INCGNU): Add -Ignulib.
8015
57c4b50b
PA
80162012-04-19 Pedro Alves <palves@redhat.com>
8017
8018 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8019 (INCGNU): ... this, and spell out -I here.
8020 (GNULIB_LIB): Rename to ...
8021 (LIBGNU): ... this.
8022 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8023
1030e047
PA
80242012-04-19 Pedro Alves <palves@redhat.com>
8025
8026 * config.in: Regenerate.
8027
447d4319
PA
80282012-04-19 Pedro Alves <palves@redhat.com>
8029
8030 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8031 * server.h (memmem): Remove declaration.
8032 * config.in: Regenerate.
8033 * configure: Regenerate.
8034
aad9eab9
YQ
80352012-04-19 Yao Qi <yao@codesourcery.com>
8036
8037 * Makefile.in (SFILES): Add common/vec.c.
8038 (OBS): Add vec.o.
8039 (vec.o): New rule.
8040
3e10640f
YQ
80412012-04-19 Yao Qi <yao@codesourcery.com>
8042
8043 * remote-utils.c (prepare_resume_reply): Replace with macro
8044 target_core_of_thread.
8045 * server.c (handle_qxfer_threads_proper): Likewise.
8046 * target.h (traget_core_of_thread): New macro.
8047
71622373
PA
80482012-04-18 Pedro Alves <palves@redhat.com>
8049
8050 * aclocal.m4: Regenerate.
8051 * configure: Regenerate.
8052
80d26939
YQ
80532012-04-16 Yao Qi <yao@codesourcery.com>
8054
8055 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8056 duplicated on address.
8057
42476b70
YQ
80582012-04-16 Yao Qi <yao@codesourcery.com>
8059
8060 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8061 (struct tracepoint_action_ops) <send>: New field.
8062 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8063 (agent_expr_send, x_tracepoint_action_send): New.
8064 (l_tracepoint_action_send): New.
8065 (cmd_qtdp): Download and install tracepoint
8066 according to `use_agent'.
8067 (run_inferior_command): Add one more parameter `len'.
8068 Update callers.
8069 (tracepoint_send_agent): New.
8070 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8071
7bc83639
YQ
80722012-04-16 Yao Qi <yao@codesourcery.com>
8073
8074 * tracepoint.c (download_tracepoints): Moved to ...
8075 (cmd_qtstart): ... here.
8076
5f18041e
YQ
80772012-04-14 Yao Qi <yao@codesourcery.com>
8078
8079 * tracepoint.c: Include inttypes.h.
8080 (struct collect_memory_action): Use sized types.
8081 (struct tracepoint): Likewise.
8082 (cmd_qtdp, stop_tracing): Update print specifiers.
8083 (cmd_qtp, response_tracepoint): Likewise.
8084 (collect_data_at_tracepoint): Likewise.
8085 (collect_data_at_step): Likewise.
8086
55a8c076
YQ
80872012-04-14 Yao Qi <yao@codesourcery.com>
8088
8089 Import gnulib module inttypes.
8090 * aclocal.m4, config.in, configure: Regenerated.
8091
dc750257
YQ
80922012-04-14 Yao Qi <yao@codesourcery.com>
8093
8094 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8095 Makefile and config.status at last.
8096
0ab5faf9
YQ
80972012-04-13 Yao Qi <yao@codesourcery.com>
8098
8099 * tracepoint.c: Include stdint.h unconditionally.
8100
18f5fd81
TJB
81012012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8102
8103 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8104 on BFD_HAVE_SYS_PROCFS_TYPE.
8105 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8106 * configure: Regenerate.
8107 * config.in: Likewise.
8108
4d47af5c
L
81092012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8110
8111 * Makefile.in (clean): Also remove x32.c x32-linux.c
8112 x32-avx.c x32-avx-linux.c.
8113 (x32.o): New target.
8114 (x32.c): Likewise.
8115 (x32-linux.o): Likewise.
8116 (x32-linux.c): Likewise.
8117 (x32-avx.o): Likewise.
8118 (x32-avx.c): Likewise.
8119 (x32-avx-linux.o): Likewise.
8120 (x32-avx-linux.c): Likewise.
8121
8122 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8123 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8124 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8125 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8126 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8127 i386/x32-avx-linux.xml.
8128
8129 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8130 (init_registers_x32_avx_linux): Likwise.
8131 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8132 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8133
ecedbe58
PA
81342012-04-13 Pedro Alves <palves@redhat.com>
8135
8136 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8137 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8138 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8139 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8140 the sub-make.
8141
c92b5177
L
81422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8143
8144 * linux-x86-low.c (compat_x32_clock_t): New.
8145 (compat_x32_siginfo_t): Likewise.
8146 (compat_x32_siginfo_from_siginfo): Likewise.
8147 (siginfo_from_compat_x32_siginfo): Likewise.
8148 (linux_is_elf64): Likewise.
8149 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8150 and siginfo_from_compat_x32_siginfo for x32.
8151 (x86_arch_setup): Set linux_is_elf64.
8152
214d508e
L
81532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8154
8155 PR gdb/13969
8156 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8157 e_machine field.
8158 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8159 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8160 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8161 compatible with process.
8162
c9a1864a
YQ
81632012-04-12 Yao Qi <yao@codesourcery.com>
8164
8165 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8166 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8167 (install-only, install-info, clean): Handle sub dir gnulib.
8168 (all-lib, am--refresh): New targets.
8169 (memmem.o): Remove target.
8170 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8171 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8172 (AC_REPLACE_FUNCS): Remove memmem.
8173 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8174 (AC_OUTPUT): Generate Makefile in gnulib/.
8175 * aclocal.m4, config.in, configure: Regenerated.
8176
367ba2c2
MR
81772012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8178
8179 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8180
9d236627
PA
81812012-04-05 Pedro Alves <palves@redhat.com>
8182
8183 -Werror=strict-aliasing
8184
8185 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8186 pointer.
8187
111217b3
PA
81882012-04-04 Pedro Alves <palves@redhat.com>
8189
8190 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8191 (sparc_store_gregset_from_stack, sparc_store_gregset)
8192 (sparc_breakpoint_at): Fix formatting.
8193
8365dcf5
TJB
81942012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8195
8196 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8197 are available.
8198 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8199 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8200 * config.in: Regenerate.
8201 * configure: Likewise.
8202
689cc2ae
PA
82032012-03-29 Pedro Alves <palves@redhat.com>
8204
8205 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8206 Correct ptrace arguments.
8207
c14dfd32
PA
82082012-03-28 Pedro Alves <palves@redhat.com>
8209
8210 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8211 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8212 (IA64_FR1_REGNUM): New defines.
8213 (ia64_fetch_register): New.
8214 (the_low_target): Install it.
8215 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8216 field.
8217 * linux-low.c (linux_fetch_registers): Try the
8218 the_low_target.fetch_register hook first.
8219
8220 * linux-arm-low.c (the_low_target): Adjust.
8221 * linux-bfin-low.c (the_low_target): Adjust.
8222 * linux-cris-low.c (the_low_target): Adjust.
8223 * linux-crisv32-low.c (the_low_target): Adjust.
8224 * linux-m32r-low.c (the_low_target): Adjust.
8225 * linux-m68k-low.c (the_low_target): Adjust.
8226 * linux-mips-low.c (the_low_target): Adjust.
8227 * linux-ppc-low.c (the_low_target): Adjust.
8228 * linux-s390-low.c (the_low_target): Adjust.
8229 * linux-sh-low.c (the_low_target): Adjust.
8230 * linux-sparc-low.c (the_low_target): Adjust.
8231 * linux-tic6x-low.c (the_low_target): Adjust.
8232 * linux-x86-low.c (the_low_target): Adjust.
8233 * linux-xtensa-low.c (the_low_target): Adjust.
8234
63c88e13
PA
82352012-03-26 Pedro Alves <palves@redhat.com>
8236
8237 * server.c (handle_qxfer_libraries): Don't bail early if
8238 the_target->qxfer_libraries_svr4 is not NULL.
8239
fb723180
PA
82402012-03-26 Pedro Alves <palves@redhat.com>
8241
8242 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8243
0afae3cf
PA
82442012-03-23 Pedro Alves <palves@redhat.com>
8245
8246 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8247 "library-list-svr4" element's start tag when the the DSO list is
8248 empty.
8249
485f1ee4
PA
82502012-03-23 Pedro Alves <palves@redhat.com>
8251
8252 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8253 a variable whose type size is the same as the inferior's pointer
8254 size.
8255
a5362b9a
TS
82562012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8257
8258 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8259 struct siginfo.
8260 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8261 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8262 * linux-low.h: Include <signal.h>.
8263 (struct siginfo): Remove forward declaration.
8264 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8265 struct siginfo.
8266
d226c142
MF
82672012-03-21 Mike Frysinger <vapier@gentoo.org>
8268
8269 * .gitignore: Ignore more files.
8270
122f36ef
PA
82712012-03-19 Pedro Alves <palves@redhat.com>
8272 Jan Kratochvil <jan.kratochvil@redhat.com>
8273
8274 * server.c (cont_thread, general_thread): Add describing comments.
8275 (start_inferior): Clear `cont_thread'.
8276 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8277 of a process.
8278
fc3e5175
YQ
82792012-03-15 Yao Qi <yao@codesourcery.com>
8280
8281 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8282 handling to ...
8283 (cmd_qtdp): ... here.
8284
8d0d92cd
YQ
82852012-03-15 Yao Qi <yao@codesourcery.com>
8286
8287 * tracepoint.c (struct tracepoint_action_ops): New.
8288 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8289 (m_tracepoint_action_download): New.
8290 (r_tracepoint_action_download): New.
8291 (x_tracepoint_action_download): New.
8292 (l_tracepoint_action_download): New.
8293 (add_tracepoint_action): Install `action->ops' according type.
8294 (download_tracepoint_1): Move code `download' function pointer
8295 of various tracepoint_action_ops.
8296
87b0bb13
JK
82972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8298
8299 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8300 linux_ptrace_attach_warnings.
8301
5f572dec
JK
83022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8303
8304 * Makefile.in (linux-ptrace.o): New.
8305 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8306 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8307 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8308 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8309 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8310 of these targets.
8311 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8312
f4647387
YQ
83132012-03-08 Yao Qi <yao@codesourcery.com>
8314 Pedro Alves <palves@redhat.com>
8315
8316 Fix PR server/13392.
8317 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8318 offset of JMP insn.
8319 * tracepoint.c (remove_tracepoint): New.
8320 (cmd_qtdp): Call remove_tracepoint when failed to install.
8321
9b224c5e
PA
83222012-03-07 Pedro Alves <palves@redhat.com>
8323
8324 * linux-low.c (get_detach_signal): New.
8325 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8326 Pass on pending signals to PTRACE_DETACH. Check the result of the
8327 ptrace call.
8328 * server.c (program_signals, program_signals_p): New.
8329 (handle_general_set): Handle QProgramSignals.
8330 * server.h (program_signals, program_signals_p): Declare.
8331
e237a7e2
JK
83322012-03-05 Pedro Alves <palves@redhat.com>
8333 Jan Kratochvil <jan.kratochvil@redhat.com>
8334
8335 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8336 New comment why.
8337
5808517f
YQ
83382012-03-03 Yao Qi <yao@codesourcery.com>
8339
8340 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8341 agent_look_up_symbols.
8342
58b4daa5
YQ
83432012-03-03 Yao Qi <yao@codesourcery.com>
8344
8345 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8346 (linux-x86-low.o): Likewise.
8347 * server.h: Remove in_process_agent_loaded.
8348 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8349 common/agent.c.
8350 Update callers.
8351
8ffcbaaf
YQ
83522012-03-03 Yao Qi <yao@codesourcery.com>
8353
8354 * tracepoint.c (gdb_agent_capability): New global.
8355 (in_process_agent_loaded_ust): Renamed to
8356 `in_process_agent_supports_ust'.
8357 Update callers.
8358 (in_process_agent_supports_ust): Call agent_capability_check.
8359 (clear_installed_tracepoints): Assert that agent supports
8360 agent.
8361
d1feda86
YQ
83622012-03-03 Yao Qi <yao@codesourcery.com>
8363
8364 * linux-low.c (linux_supports_agent): New.
8365 (linux_target_ops): Initialize field `supports_agent' with
8366 linux_supports_agent.
8367 * target.h (struct target_ops) <supports_agent>: New.
8368 (target_supports_agent): New macro.
8369 * server.c (handle_general_set): Handle packet 'QAgent'.
8370 (handle_query): Send `QAgent+'.
8371 * Makefile.in (server.o): Depends on agent.h.
8372
2fa291ac
YQ
83732012-03-03 Yao Qi <yao@codesourcery.com>
8374
8375 * Makefile.in (OBS): Add agent.o.
8376 Add new rule for agent.o.
8377 Track dependence of tracepoint.c on agent.h.
8378 * tracepoint.c (run_inferior_command_1):
8379 (run_inferior_command): Call agent_run_command.
8380 (gdb_ust_connect_sync_socket): Deleted. Move it to
8381 common/agent.c.
8382 (resume_thread, stop_thread): Likewise.
8383 (gdb_ust_socket_init): Renamed to ...
8384 (gdb_agent_socket_init): ... New.
8385 (gdb_ust_thread): Renamed to ...
8386 (gdb_agent_helper_thread): ... New.
8387 (gdb_ust_init): Move some code to ...
8388 (gdb_agent_init): ... here. New.
8389 [HAVE_UST]: Call gdb_ust_init.
8390 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8391 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8392 * config.in, configure: Regenerated.
8393
05044653
PA
83942012-03-02 Pedro Alves <palves@redhat.com>
8395
8396 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8397 * linux-low.c (struct simple_pid_list): New.
8398 (stopped_pids): New a struct simple_pid_list pointer.
8399 (add_to_pid_list, pull_pid_from_list): New.
8400 (handle_extended_wait): Don't assume the first signal new children
8401 report is SIGSTOP. Adjust call to pull_pid_from_list.
8402 (linux_wait_for_lwp): Adjust.
8403
8d00225b
YQ
84042012-03-02 Yao Qi <yao@codesourcery.com>
8405
8406 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8407 debug log.
8408
19560ba5
YQ
84092012-03-02 Yao Qi <yao@codesourcery.com>
8410
8411 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8412 `stop_pc' and `tpoint'. Update caller.
8413
1faeff08
MR
84142012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8415
8416 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8417 * linux-low.c (use_linux_regsets): New macro.
8418 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8419 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8420 (linux_register_in_regsets): New function.
8421 (usr_fetch_inferior_registers): Skip registers covered by
8422 regsets.
8423 (usr_store_inferior_registers): Likewise.
8424 (usr_fetch_inferior_registers): New macro.
8425 (usr_store_inferior_registers): Likewise.
8426 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8427 (linux_store_registers): Likewise.
8428 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8429 prototype.
8430 (init_registers_mips64_dsp_linux): Likewise.
8431 (init_registers_mips_linux): New macro.
8432 (init_registers_mips_dsp_linux): Likewise.
8433 (mips_dsp_num_regs): Likewise.
8434 (DSP_BASE, DSP_CONTROL): New fallback macros.
8435 (mips_base_regs): New macro.
8436 (mips_regmap): Use it. Fix the size.
8437 (mips_dsp_regmap): New variable.
8438 (mips_dsp_regset_bitmap): Likewise.
8439 (mips_arch_setup): New function.
8440 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8441 than mips_regmap.
8442 (mips_cannot_store_register): Likewise.
8443 (the_low_target): Update .arch_setup, .num_regs and .regmap
8444 initializers. Add .regset_bitmap initializer.
8445 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8446 initializer.
8447 * linux-bfin-low.c (the_low_target): Likewise.
8448 * linux-cris-low.c (the_low_target): Likewise.
8449 * linux-crisv32-low.c (the_low_target): Likewise.
8450 * linux-ia64-low.c (the_low_target): Likewise.
8451 * linux-m32r-low.c (the_low_target): Likewise.
8452 * linux-m68k-low.c (the_low_target): Likewise.
8453 * linux-ppc-low.c (the_low_target): Likewise.
8454 * linux-s390-low.c (the_low_target): Likewise.
8455 * linux-sh-low.c (the_low_target): Likewise.
8456 * linux-sparc-low.c (the_low_target): Likewise.
8457 * linux-tic6x-low.c (the_low_target): Likewise.
8458 * linux-x86-low.c (the_low_target): Likewise.
8459 * linux-xtensa-low.c (the_low_target): Likewise.
8460 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8461 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8462 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8463 srv_xmlfiles.
8464 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8465 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8466
c03e6ccc
YQ
84672012-02-29 Yao Qi <yao@codesourcery.com>
8468 Pedro Alves <palves@redhat.com>
8469
8470 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8471 `step_over_finished' is true.
8472
644cebc9
PA
84732012-02-27 Pedro Alves <palves@redhat.com>
8474
8475 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8476 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8477
c14d7ab2
PA
84782012-02-27 Pedro Alves <palves@redhat.com>
8479
8480 PR server/9684
8481 * linux-low.c (pid_is_stopped): New.
8482 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8483
412c89dd
LM
84842012-02-25 Luis Machado <lgustavo@codesourcery.com>
8485
8486 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8487 of conditions.
8488
b745defe
MR
84892012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8490
8491 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8492
9f3a5c85
LM
84932012-02-24 Luis Machado <lgustavo@codesourcery>
8494
8495 * server.c (handle_query): Advertise support for target-side
8496 breakpoint condition evaluation.
8497 (process_point_options): New function.
8498 (process_serial_event): When inserting a breakpoint, check for
8499 a target-side condition that should be evaluated.
8500
8501 * mem-break.c: Include regcache.h and ax.h.
8502 (point_cond_list_t): New data structure.
8503 (breakpoint) <cond_list>: New field.
8504 (find_gdb_breakpoint_at): Make non-static.
8505 (delete_gdb_breakpoint_at): Clear any target-side
8506 conditions.
8507 (clear_gdb_breakpoint_conditions): New function.
8508 (add_condition_to_breakpoint): Likewise.
8509 (add_breakpoint_condition): Likewise.
8510 (gdb_condition_true_at_breakpoint): Likewise.
8511 (gdb_breakpoint_here): Return result directly instead
8512 of going through a local variable.
8513
8514 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8515 (clear_gdb_breakpoint_conditions): Likewise.
8516 (add_breakpoint_condition): Likewise.
8517 (gdb_condition_true_at_breakpoint): Likewise.
8518
8519 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8520 (need_step_over_p): Take target-side breakpoint condition into
8521 consideration.
8522
5e1dc496
LM
85232012-02-24 Luis Machado <lgustavo@codesourcery>
8524
8525 * server.h: Include tracepoint.h.
8526 (agent_mem_read, agent_get_trace_state_variable_value,
8527 agent_set_trace_state_variable_value,
8528 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8529 get_set_tsv_func_addr): New prototypes.
8530
8531 * ax.h: New include file.
8532 * ax.c: New source file.
8533
8534 * tracepoint.c: Include ax.h.
8535 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8536 agent_expr, eval_result_type): Move to ax.h.
8537 (parse_agent_expr): Rename to ...
8538 (gdb_parse_agent_expr): ... this, make it non-static and move
8539 to ax.h.
8540 (unparse_agent_expr) Rename to ...
8541 (gdb_unparse_agent_expr): ... this, make it non-static and move
8542 to ax.h.
8543 (eval_agent_expr): Rename to ...
8544 (eval_tracepoint_agent_expr): ... this.
8545 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8546 forward declarations.
8547 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8548 (agent_get_trace_state_variable_value): New function.
8549 (agent_set_trace_state_variable_value): New function.
8550 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8551 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8552 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8553 (condition_true_at_tracepoint): Likewise.
8554 (parse_agent_expr): Rename to ...
8555 (gdb_parse_agent_expr): ... this and move to ax.c.
8556 (unparse_agent_expr): Rename to ...
8557 (gdb_unparse_agent_expr): ... this and move to ax.c.
8558 (gdb_agent_op_name): Move to ax.c.
8559 (eval_agent_expr): Rename to ...
8560 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8561 and move to ax.c.
8562 (eval_tracepoint_agent_expr): New function.
8563 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8564 non-static.
5e1dc496
LM
8565 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8566 ax.c.
8567 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8568 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8569 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8570 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8571 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8572 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8573 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8574 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8575 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8576 (compile_bytecodes): Remove forward declaration.
8577 (is_goto_target): Move to ax.c.
8578 (compile_bytecodes): Move to ax.c and call
8579 agent_get_trace_state_variable_value (...) and
8580 agent_set_trace_state_variable_value (...).
8581
8582 * Makefile.in: Update ax.c and IPA dependencies.
8583
277e4e52
PA
85842012-02-24 Pedro Alves <palves@redhat.com>
8585
8586 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8587 (cmd_bigqtbuffer_circular): ... this. Only handle
8588 'QTBuffer:circular:'.
8589 (handle_tracepoint_general_set): Adjust.
8590
bf4c19f7
YQ
85912012-02-16 Yao Qi <yao@codesourcery.com>
8592
8593 * inferiors.c: Move code to ...
8594 * dll.c: .... here. New.
8595 * server.h: Declare clear_dlls.
8596 * Makefile.in (SFILES): Add dll.c.
8597 (OBS): Add dll.o
8598 (dll.o): New rule.
8599
d73f2619
YQ
86002012-02-11 Yao Qi <yao@codesourcery.com>
8601
8602 * server.c: (handle_monitor_command): Add a new parameter
8603 `own_buf'.
8604 (handle_query): Update caller.
8605
f8255c2a
JB
86062012-02-09 Joel Brobecker <brobecker@adacore.com>
8607
8608 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8609 * configure, config.in: Regenerate.
8610 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8611 is not defined.
8612
da84f473
PA
86132012-02-02 Pedro Alves <palves@redhat.com>
8614
8615 Try SIGKILL first, then PTRACE_KILL.
8616 * linux-low.c (linux_kill_one_lwp): New.
8617 (linux_kill_one_lwp): Rename to ...
8618 (kill_one_lwp_callback): ... this. Use the new
8619 linux_kill_one_lwp.
8620
e886a173
PA
86212012-02-02 Pedro Alves <palves@redhat.com>
8622
8623 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8624 inferior.
8625
be07f1a2
PA
86262012-01-27 Pedro Alves <palves@redhat.com>
8627
8628 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8629 (elf_64_file_p): Make static.
8630 (linux_pid_exe_is_elf_64_file): New.
8631 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8632 Delete declarations.
8633 (linux_pid_exe_is_elf_64_file): Declare.
8634 * linux-x86-low.c (x86_arch_setup): Use
8635 linux_pid_exe_is_elf_64_file.
8636
d8301ad1
JK
86372012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8638
8639 * linux-low.c (linux_wait_for_event_1): Rename to ...
8640 (linux_wait_for_event): ... here and merge it with former
8641 linux_wait_for_event - new variable wait_ptid, use it.
8642 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8643
01b17894
PA
86442012-01-23 Pedro Alves <palves@redhat.com>
8645
8646 * server.c (main): Avoid yet another case of infinite loop while
8647 detaching/killing after a longjmp.
8648
e825046f
JK
86492012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8650
8651 Code cleanup.
8652 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8653
b9e7b9c3
UW
86542012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8655
8656 * hostio.c (handle_readlink): New function.
8657 (handle_vFile): Call it to handle "vFile:readlink" packets.
8658
901f9912
UW
86592012-01-20 Pedro Alves <palves@redhat.com>
8660 Ulrich Weigand <ulrich.weigand@linaro.org>
8661
8662 * server.c (handle_v_requests): Only support vAttach and vRun to
8663 start multiple processes when in extended protocol mode.
8664
fc1ab1a0
PA
86652012-01-17 Pedro Alves <palves@redhat.com>
8666
8667 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8668 memalign plus mprotect to allocate the scratch buffer.
8669
7d5d4e98
PA
86702012-01-13 Pedro Alves <palves@redhat.com>
8671
8672 * server.c (attach_inferior): Clear `cont_thread'.
8673
f128d5e9
PA
86742012-01-13 Pedro Alves <palves@redhat.com>
8675
8676 * server.c (main): Avoid infinite loop while detaching/killing
8677 after a longjmp.
8678
06db92f0
DE
86792012-01-09 Doug Evans <dje@google.com>
8680
8681 * server.c (start_inferior): Set last_ptid in --wrapper case.
8682
32d92999
YQ
86832012-01-06 Yao Qi <yao@codesourcery.com>
8684
8685 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8686 defined.
8687 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8688
5e0a92a9
YQ
86892012-01-04 Yao Qi <yao@codesourcery.com>
8690
8691 * tracepoint.c (cmd_qtdp): Print debug message
8692 for static tracepoint.
8693
ae639e8c
YQ
86942012-01-04 Yao Qi <yao@codesourcery.com>
8695
8696 * tracepoint.c (trace_vdebug): Differentiate debug message
8697 between gdbserver and IPA.
8698
f72429c5
YQ
86992012-01-03 Yao Qi <yao@codesourcery.com>
8700
8701 * tracepoint.c (tracepoint_was_hit): Don't collect for
8702 static tracepoint.
8703
12c3e59c
JB
87042012-01-02 Joel Brobecker <brobecker@adacore.com>
8705
8706 * terminal.h: Reformat copyright header.
8707
67827812
JB
87082012-01-02 Joel Brobecker <brobecker@adacore.com>
8709
8710 * server.c (gdbserver_version): Update copyright year.
8711 * gdbreplay.c (gdbreplay_version): Likewise.
8712
3e52c33d
JK
87132011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8714
8715 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8716
8717 Revert:
8718 2011-12-18 Hui Zhu <teawater@gmail.com>
8719 * linux-low.c (linux_create_inferior): Save return value to ret.
8720
66f1260e
HZ
87212011-12-18 Hui Zhu <teawater@gmail.com>
8722
8723 * linux-low.c (linux_create_inferior): Save return value to ret.
8724
e77616d7
DE
87252011-12-16 Doug Evans <dje@google.com>
8726
e7b06c57
DE
8727 * linux-low.c (linux_create_inferior): If stdio connection,
8728 redirect stdin from /dev/null, stdout to stderr.
8729 * remote-utils.c (remote_is_stdio): New static global.
8730 (remote_connection_is_stdio): New function.
8731 (remote_prepare): Handle stdio connection.
8732 (remote_open): Ditto.
8733 (remote_close): Don't close stdin for stdio connections.
8734 (read_prim,write_prim): New functions. Replace all calls to
8735 read/write to these.
8736 * server.c (main): Watch for "-" argument. Move call to
8737 remote_prepare before start_inferior.
8738 * server.h (STDIO_CONNECTION_NAME): New macro.
8739 (remote_connection_is_stdio): Declare.
8740
e77616d7
DE
8741 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8742 in debugging output.
8743
82067193
YQ
87442011-12-15 Yao Qi <yao@codesourcery.com>
8745
8746 * tracepoint.c: Include sys/syscall.h.
8747 (gdb_ust_thread): Remove preprocessor conditional.
8748
82bfbe7e
PA
87492011-12-14 Pedro Alves <pedro@codesourcery.com>
8750
8751 * linux-low.c (linux_detach_one_lwp): Call
8752 the_low_target.prepare_to_resume before detaching.
8753
712c6575
YQ
87542011-12-14 Yao Qi <yao@codesourcery.com>
8755
8756 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8757 of write.
8758
d54d1edf
YQ
87592011-12-14 Yao Qi <yao@codesourcery.com>
8760
8761 * i386-low.c (i386_low_stopped_data_address): Initialize local
8762 variable `control'.
8763
6210a125
PA
87642011-12-13 Pedro Alves <pedro@codesourcery.com>
8765
8766 PR remote/13492
8767
8768 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8769 DR_CONTROL unless necessary. Extend comments.
8770 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8771 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8772
2ece8244
YQ
87732011-12-13 Yao Qi <yao@codesourcery.com>
8774
8775 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8776 macros.
8777 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8778
784867a5
JK
87792011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8780
8781 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8782 Print new debug message for such case.
8783
6bf36717
JK
87842011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8785
8786 Fix overlapping memcpy.
8787 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8788 the read_inferior_memory transfer.
8789 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8790 write_inferior_memory transfer.
8791 (set_fast_tracepoint_jump): New variable buf. Use it for the
8792 read_inferior_memory and write_inferior_memory transfers.
8793 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8794 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8795 Use it for the write_inferior_memory transfer.
8796 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8797 buffers.
8798
50275556
MR
87992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8800
8801 * linux-low.c (fetch_register, store_register): Make code
8802 consistent, fix formatting.
8803
7325beb4
MR
88042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8805
8806 * linux-low.c (usr_store_inferior_registers): Factor out code
8807 to handle individual registers into...
8808 (store_register): ... this new function.
8809
c642a434
UW
88102011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8811
8812 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8813 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8814 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8815 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8816 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8817 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8818 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8819 (srv_xmlfiles): Add new XML files.
8820
8821 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8822 and <sys/uio.h>.
8823 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8824 (init_registers_s390_linux32v1): Add prototype.
8825 (init_registers_s390_linux32v2): Likewise.
8826 (init_registers_s390_linux64v1): Likewise.
8827 (init_registers_s390_linux64v2): Likewise.
8828 (init_registers_s390x_linux64v1): Likewise.
8829 (init_registers_s390x_linux64v2): Likewise.
8830 (s390_num_regs): Increment to 52.
8831 (s390_regmap): Add orig_r2 register.
8832 (s390_num_regs_3264): Increment to 68.
8833 (s390_regmap_3264): Add orig_r2 register.
8834 (s390_collect_ptrace_register): Handle orig_r2 register.
8835 (s390_supply_ptrace_register): Likewise.
8836 (s390_fill_last_break): New function.
8837 (s390_store_last_break): Likewise.
8838 (s390_fill_system_call): New function.
8839 (s390_store_system_call): Likewise.
8840 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8841 register sets.
8842 (s390_check_regset): New function.
8843 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8844 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8845 Update target_regsets for available register sets.
8846
2268b414
JK
88472011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8848 Jan Kratochvil <jan.kratochvil@redhat.com>
8849
8850 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8851 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8852 New.
8853 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8854 * linux-low.h (struct process_info_private): New member r_debug.
8855 * server.c (handle_qxfer_libraries): Call
8856 the_target->qxfer_libraries_svr4.
8857 (handle_qxfer_libraries_svr4): New function.
8858 (qxfer_packets): New entry "libraries-svr4".
8859 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8860 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8861 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8862 PACKET_qXfer_libraries_svr4.
8863
d6db1fab
UW
88642011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8865
8866 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8867 PSW address/mask between 8-byte and 16-byte formats.
8868 (s390_supply_ptrace_register): Likewise.
8869 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8870 basic addressing mode bit.
8871
242f5f1c
SS
88722011-11-24 Stan Shebs <stan@codesourcery.com>
8873
8874 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8875
f196051f
SS
88762011-11-17 Stan Shebs <stan@codesourcery.com>
8877
8878 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8879 (tracing_start_time): New global.
8880 (tracing_stop_time): New global.
8881 (tracing_user_name): New global.
8882 (tracing_notes): New global.
8883 (tracing_stop_note): New global.
8884 (cmd_qtstart): Set traceframe_usage, start_time.
8885 (stop_tracing): Set stop_time.
8886 (cmd_qtstatus): Report additional status.
8887 (cmd_qtp): New function.
8888 (handle_tracepoint_query): Call it.
8889 (cmd_qtnotes): New function.
8890 (handle_tracepoint_general_set): Call it.
8891 (get_timestamp): Rename from tsv_get_timestamp.
8892
405f8e94
SS
88932011-11-14 Stan Shebs <stan@codesourcery.com>
8894 Kwok Cheung Yeung <kcy@codesourcery.com>
8895
8896 * linux-x86-low.c (small_jump_insn): New.
8897 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8898 trampoline and error message, build a trampoline and issue a small
8899 jump instruction to it.
8900 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8901 trampoline and error message.
8902 (x86_get_min_fast_tracepoint_insn_len): New.
8903 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8904 * linux-low.h (struct linux_target_ops): Add arguments to
8905 install_fast_tracepoint_jump_pad operation, add new operation.
8906 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8907 arguments.
8908 (linux_get_min_fast_tracepoint_insn_len): New function.
8909 (linux_target_op): Add new operation.
8910 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8911 (gdb_trampoline_buffer_end): Ditto.
8912 (gdb_trampoline_buffer_error): Ditto.
8913 (struct ipa_sym_addresses): Add fields for new IPA variables.
8914 (symbol_list): Add entries for new IPA variables.
8915 (struct tracepoint): Add fields to hold the address range of the
8916 trampoline used by the tracepoint.
8917 (trampoline_buffer_head): New static variable.
8918 (trampoline_buffer_tail): Ditto.
8919 (claim_trampoline_space): New function.
8920 (have_fast_tracepoint_trampoline_buffer): New function.
8921 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8922 structure.
8923 (install_fast_tracepoint): Ditto, also add error buffer argument.
8924 (cmd_qtminftpilen): New function.
8925 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8926 (fast_tracepoint_from_trampoline_address): New function.
8927 (fast_tracepoint_collecting): Handle trampoline as part of jump
8928 pad space.
8929 (set_trampoline_buffer_space): New function.
8930 (initialize_tracepoint): Initialize new IPA variables.
8931 * target.h (struct target_ops): Add arguments to
8932 install_fast_tracepoint_jump_pad operation, add new
8933 get_min_fast_tracepoint_insn_len operation.
8934 (target_get_min_fast_tracepoint_insn_len): New.
8935 (install_fast_tracepoint_jump_pad): Add arguments.
8936 * server.h (IPA_BUFSIZ): Define.
8937 * linux-i386-ipa.c: Include extra header files.
8938 (initialize_fast_tracepoint_trampoline_buffer): New function.
8939 (initialize_low_tracepoint): Call it.
8940 * server.h (set_trampoline_buffer_space): Declare.
8941 (claim_trampoline_space): Ditto.
8942 (have_fast_tracepoint_trampoline_buffer): Ditto.
8943
1e4d1764
YQ
89442011-11-14 Yao Qi <yao@codesourcery.com>
8945
8946 * server.c (handle_query): Handle InstallInTrace for qSupported.
8947 * tracepoint.c (add_tracepoint): Sort list.
8948 (install_tracepoint, download_tracepoint): New.
8949 (cmd_qtdp): Call them to install and download tracepoints.
8950 (sort_tracepoints): Removed.
8951 (cmd_qtstart): Update.
8952
5c73ff4e
YQ
89532011-11-14 Yao Qi <yao@codesourcery.com>
8954
8955 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8956 * mem-break.h: Declare.
8957 * tracepoint.c (cmd_qtstart): Move some code to ...
8958 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8959 New.
8960 (download_tracepoints): Move some code to ...
8961 (download_tracepoint_1): ... here. New.
8962
86a30030
YQ
89632011-11-08 Yao Qi <yao@codesourcery.com>
8964
8965 * remote-utils.c (relocate_instruction): A comment fix.
8966
8d26e50c
JB
89672011-11-07 Joel Brobecker <brobecker@adacore.com>
8968
8969 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8970 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8971 dr_status_mirror and dr_control_mirror from debug_reg_state.
8972 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8973 (i386_initial_stuff): Remove use of deleted globals.
8974 (i386_get_thread_context, i386_set_thread_context,
8975 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8976 from debug_reg_state.
8977
a59306a3
YQ
89782011-11-05 Yao Qi <yao@codesourcery.com>
8979
8980 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8981 address as TPOINT's.
8982
3065dfb6
SS
89832011-11-02 Stan Shebs <stan@codesourcery.com>
8984
8985 * tracepoint.c (agent_mem_read_string): New function.
8986 (eval_agent_expr): Call it for tracenz.
8987 * server.c (handle_query): Report support for tracenz.
8988
fd0d8c7c
YQ
89892011-11-02 Yao Qi <yao@codesourcery.com>
8990
8991 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8992
609086b1
YQ
89932011-11-02 Yao Qi <yao@codesourcery.com>
8994
8995 * target.h: Fix a typo in comment.
8996
b9fd1791
PA
89972011-10-31 Pedro Alves <pedro@codesourcery.com>
8998
8999 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9000 clobber the breakpoints' shadows with fast tracepoint jumps.
9001 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9002 * target.c (write_inferior_memory): Also pass MYADDR down to
9003 check_mem_write.
9004
03583c20
UW
90052011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9006
9007 * configure.ac: Check support for personality routine.
9008 * configure: Regenerate.
9009 * config.in: Likewise.
9010 * linux-low.c: Include <sys/personality.h>.
9011 Define ADDR_NO_RANDOMIZE if necessary.
9012 (linux_create_inferior): Disable address space randomization when
9013 forking inferior, if requested.
9014 (linux_supports_disable_randomization): New function.
9015 (linux_target_ops): Install it.
9016 * server.h (disable_randomization): Declare.
9017 * server.c (disable_randomization): New global variable.
9018 (handle_general_set): Handle QDisableRandomization.
9019 (handle_query): Likewise for qSupported.
9020 (main): Support --disable-randomization and --no-disable-randomization
9021 command line arguments.
9022 * target.h (struct target_ops): Add supports_disable_randomization.
9023 (target_supports_disable_randomization): New macro.
9024
723b724b
MF
90252011-09-29 Mike Frysinger <vapier@gentoo.org>
9026
9027 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9028 ifdef check.
9029 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9030 [!PT_GETDSBT] (target_loadmap): New definition.
9031 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9032 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9033 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9034 and PT_GETDSBT to LINUX_LOADMAP.
9035 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9036 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9037
55329a5c 90382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9039
9040 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9041 (arm_linux_hwbp_cap): New static variable.
9042 (arm_linux_get_hwbp_cap): Replace by ...
9043 (arm_linux_init_hwbp_cap): ... this new function.
9044 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9045 (arm_linux_get_hw_watchpoint_count): Likewise.
9046 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9047 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9048 (arm_prepare_to_resume): Use perror_with_name instead of error.
9049
55329a5c 90502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9051
9052 * linux-arm-low.c: Include <signal.h>.
9053 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9054 (struct arm_linux_hwbp_cap): New data type.
9055 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9056 (struct arm_linux_hw_breakpoint): New data type.
9057 (MAX_BPTS, MAX_WPTS): Define.
9058 (struct arch_process_info, struct arch_lwp_info): New data types.
9059 (arm_linux_get_hwbp_cap): New function.
9060 (arm_linux_get_hw_breakpoint_count): Likewise.
9061 (arm_linux_get_hw_watchpoint_count): Likewise.
9062 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9063 (arm_hwbp_control_initialize): Likewise.
9064 (arm_hwbp_control_is_enabled): Likewise.
9065 (arm_hwbp_control_is_initialized): Likewise.
9066 (arm_hwbp_control_disable): Likewise.
9067 (arm_linux_hw_breakpoint_equal): Likewise.
9068 (arm_linux_hw_point_initialize): Likewise.
9069 (struct update_registers_data): New data structure.
9070 (update_registers_callback: New function.
9071 (arm_insert_point): Likewise.
9072 (arm_remove_point): Likewise.
9073 (arm_stopped_by_watchpoint): Likewise.
9074 (arm_stopped_data_address): Likewise.
9075 (arm_new_process): Likewise.
9076 (arm_new_thread): Likewise.
9077 (arm_prepare_to_resume): Likewise.
9078 (the_low_target): Register arm_insert_point, arm_remove_point,
9079 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9080 arm_new_thread, and arm_prepare_to_resume.
9081
6b9801d4
SS
90822011-09-15 Stan Shebs <stan@codesourcery.com>
9083
9084 * server.h (struct emit_ops): Add compare-goto fields.
9085 * tracepoint.c (gdb_agent_op_sizes): New table.
9086 (emit_eq_goto): New function.
9087 (emit_ne_goto): New function.
9088 (emit_lt_goto): New function.
9089 (emit_le_goto): New function.
9090 (emit_gt_goto): New function.
9091 (emit_ge_goto): New function.
9092 (is_goto_target): New function.
9093 (compile_bytecodes): Recognize special cases of compare-goto
9094 combinations and call specialized emitters for them.
9095 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9096 (amd64_emit_ne_goto): New function.
9097 (amd64_emit_lt_goto): New function.
9098 (amd64_emit_le_goto): New function.
9099 (amd64_emit_gt_goto): New function.
9100 (amd64_emit_ge_goto): New function.
9101 (amd64_emit_ops): Add the new functions.
9102 (i386_emit_eq_goto): New function.
9103 (i386_emit_ne_goto): New function.
9104 (i386_emit_lt_goto): New function.
9105 (i386_emit_le_goto): New function.
9106 (i386_emit_gt_goto): New function.
9107 (i386_emit_ge_goto): New function.
9108 (i386_emit_ops): Add the new functions.
9109
bf15cbda
SS
91102011-09-08 Stan Shebs <stan@codesourcery.com>
9111
9112 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9113 (i386_emit_epilogue): Restore %ebx.
9114
943ca1dd
JZ
91152011-08-31 Jie Zhang <jzhang918@gmail.com>
9116
9117 * server.c (step_thread): Remove definition.
9118 (process_serial_event): Don't handle Hs.
9119 * server.h (step_thread): Remove declaration.
9120 * target.c (set_desired_inferior): Remove use of step_thread.
9121
e3deef73
LM
91222011-08-24 Luis Machado <lgustavo@codesourcery.com>
9123
9124 * linux-low.c: Include linux-procfs.h.
9125 (linux_attach_lwp_1): Update comments.
9126 (linux_attach): Scan for existing threads when attaching to a
9127 process that is the tgid.
9128 * Makefile.in: Update dependencies.
9129
13da1c97
LM
91302011-08-24 Luis Machado <lgustavo@codesourcery.com>
9131
9132 * configure.srv: Add linux-procfs.o dependencies.
9133
881127c9
YQ
91342011-08-14 Yao Qi <yao@codesourcery.com>
9135
9136 * target.h (struct target_ops): Fix indent.
9137 * win32-low.c (win32_target_ops): Fix comment.
9138
58dbd541
YQ
91392011-08-14 Andrew Jenner <andrew@codesourcery.com>
9140 Yao Qi <yao@codesourcery.com>
9141
9142 * Makefile.in (clean): Remove tic6x-*.c files.
9143 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9144 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9145 (tic6x-c64xp-linux.c): Likewise.
9146 * configure.srv: Add support for tic6x-*-uclinux.
9147 * linux-tic6x-low.c: New.
9148 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9149
78d85199
YQ
91502011-08-14 Andrew Stubbs <ams@codesourcery.com>
9151 Yao Qi <yao@codesourcery.com>
9152
9153 * target.h (struct target_ops): Add read_loadmap.
9154 * linux-low.c (struct target_loadseg): New type.
9155 (struct target_loadmap): New type.
9156 (linux_read_loadmap): New function.
9157 (linux_target_ops): Add linux_read_loadmap.
9158 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9159 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9160 to NULL.
78d85199 9161
a959a88d
EZ
91622011-08-05 Eli Zaretskii <eliz@gnu.org>
9163
9164 * win32-low.c: Include <stdint.h>.
9165
1ced966e
PA
91662011-07-22 Pedro Alves <pedro@codesourcery.com>
9167
9168 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9169 to the inferior here.
9170 (i386_remove_aligned_watchpoint): Ditto.
9171 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9172 fit part of the watchpoint in the debug registers.
9173 (i386_update_inferior_debug_regs): New.
9174 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9175 registers, and only update the inferior on success.
9176 (i386_low_remove_watchpoint): Ditto.
9177
d26e3629
KY
91782011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9179
9180 * linux-low.c (compare_ints, unique, list_threads, show_process,
9181 linux_core_of_thread): Delete.
9182 (linux_target_ops): Change linux_core_of_thread to
9183 linux_common_core_of_thread.
9184 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9185 * utils.c (malloc_failure): Change type of argument.
9186 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9187 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9188 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9189 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9190 (IPA_OBJS): Add common-utils-ipa.o.
9191 (ptid_h, linux_osdata_h): New macros.
9192 (server_h): Add common/common-utils.h, common/xml-utils.h,
9193 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9194 common/ptid.h.
9195 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9196 ptid.o, buffer.o): New rules.
9197 (linux-low.o): Add common/linux-osdata.h as a dependency.
9198 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9199 * configure.ac: Add AC_HEADER_DIRENT check.
9200 * config.in: Regenerate.
9201 * configure: Regenerate.
9202 * remote-utils.c (xml_escape_text): Delete.
9203 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9204 buffer_xml_printf): Move to common/buffer.c.
9205 * server.c (main): Remove call to initialize_inferiors.
9206 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9207 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9208 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9209 internal_error, gdb_assert, gdb_assert_fail): Delete.
9210 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9211 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9212 common/buffer.h.
9213 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9214 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9215 initialize_inferiors): Delete.
9216
2275a1a7
PA
92172011-07-20 Pedro Alves <pedro@codesourcery.com>
9218
9219 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9220 symbol error.
9221
0a5b1e09
PA
92222011-05-31 Pedro Alves <pedro@codesourcery.com>
9223
9224 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9225 assertion.
9226 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9227
6938fd34
YQ
92282011-05-26 Yao Qi <yao@codesourcery.com>
9229
9230 * Makefile.in (thread-db.o): Track dependence to
9231 common/gdb_thread_db.h.
9232 * thread-db.c: include gdb_thread_db.h from right place.
9233
b481f9e0
TT
92342011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9235
9236 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9237 __FILE__ and __LINE__ to internal_error.
9238
98a5dd13
DE
92392011-05-13 Doug Evans <dje@google.com>
9240
9241 * thread-db.c (try_thread_db_load_from_sdir): New function.
9242 (try_thread_db_load_from_dir): New function.
9243 (thread_db_load_search): Handle $sdir, ignore $pdir.
9244 Remove trying of system directories if search of
9245 libthread-db-search-path fails, that is now done via $sdir.
9246
d248b706
KY
92472011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9248
9249 * server.c (handle_query): Add EnableDisableTracepoints to the list
9250 of supported features.
43aaf8b6 9251 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9252 tracepoints.
43aaf8b6
PA
9253 (cmd_qtenable_disable): New.
9254 (cmd_qtstart): Install tracepoints even if disabled.
9255 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9256 receiving a QTEnable or QTDisable packet.
9257 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9258 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9259 tracepoints.
9260 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9261
84e578fb
DE
92622011-05-10 Doug Evans <dje@google.com>
9263
9264 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9265
71f55dd8
DE
92662011-05-04 Doug Evans <dje@google.com>
9267
9268 * linux-low.c (linux_join): Skip process lookup.
9269 * spu-low.c (spu_join): Ditto.
9270 * server.c (join_inferiors_callback): Delete.
9271 (process_serial_event): For 'D' packet (detach) call join_inferior
9272 directly.
9273
4d393d60
JM
92742011-05-04 Joseph Myers <joseph@codesourcery.com>
9275
9276 * README: Don't mention xscale*-*-linux*.
9277 * configure.srv (xscale*-*-linux*): Don't handle target.
9278
b00ad6ff
NF
92792011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9280
9281 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9282 casting pointers.
9283 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9284 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9285 (i386_emit_void_call_2): Likewise.
9286
af96c192
YQ
92872011-04-26 Yao Qi <yao@codesourcery.com>
9288
43aaf8b6
PA
9289 * linux-low.c: Move common macros to linux-ptrace.h.
9290 Include linux-ptrace.h.
af96c192
YQ
9291 * Makefile.in (linux_ptrace_h): New.
9292 (linux-low.o): Depends on linux-ptrace.h.
9293
03f2bd59
JK
92942011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9295
9296 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9297 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9298 (remote_prepare): New function with most of the TCP code from ...
9299 (remote_open): ... here. Detect PORT here unconditionally. Move also
9300 setting transport_is_reliable.
9301 * server.c (run_once): New variable.
9302 (gdbserver_usage): Document it.
9303 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9304 the first run if RUN_ONCE.
9305 * server.h (run_once, remote_prepare): New declarations.
9306
7a9dd1b2
TT
93072011-04-19 Tom Tromey <tromey@redhat.com>
9308
9309 * win32-low.c (handle_load_dll): Remove duplicate "the".
9310
81239425
PM
93112011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9312
9313 Remove support for old Cygwin 1.5 versions.
9314 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9315 function to avoid warning.
9316 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9317 warning.
9318
9e0627f1
PM
93192011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9320
9321 * gdbserver/server.h (Macro _): Define it if not available.
9322
588eebee
MS
93232011-03-14 Michael Snyder <msnyder@vmware.com>
9324
348af9f7 9325 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9326
43f70d4c
JB
93272011-03-10 Joel Brobecker <brobecker@adacore.com>
9328
9329 * Makefile.in (maintainer-clean realclean distclean): Remove
9330 "make ... subdir_do" command.
9331
348af9f7
MS
93322011-03-10 Michael Snyder <msnyder@vmware.com>
9333
9334 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9335
9336 * server.c (handle_v_run): Free alloced buffer on early return.
9337
e637a4f5
YQ
93382011-03-09 Yao Qi <yao@codesourcery.com>
9339
9340 Revert:
9341 2011-03-04 Yao Qi <yao@codesourcery.com>
9342
9343 * Makefile.in: Remove GNU make feature --directory.
9344
9345 2011-03-05 Yao Qi <yao@codesourcery.com>
9346
9347 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9348 (subdir_do): New make target. Copied from gdb/Makefile.
9349 (maintainer-clean, realclean, distclean, clean): Call corresponding
9350 make targets in common/Makefile.
9351
9352 2011-02-11 Yao Qi <yao@codesourcery.com>
9353
9354 * configure.ac: Call AC_PROG_RANLIB.
9355 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9356 * configure: Regenerate.
9357
e6edda56
JK
93582011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9359
9360 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9361
e5141119
JB
93622011-03-06 Yao Qi <yao@codesourcery.com>
9363
9364 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9365
64794aa4
JB
93662011-03-05 Yao Qi <yao@codesourcery.com>
9367
9368 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9369 (subdir_do): New make target. Copied from gdb/Makefile.
9370 (maintainer-clean, realclean, distclean, clean): Call corresponding
9371 make targets in common/Makefile.
9372
7a762829
YQ
93732011-03-04 Yao Qi <yao@codesourcery.com>
9374
9375 * Makefile.in: Remove GNU make feature --directory.
9376
348af9f7
MS
93772011-03-04 Michael Snyder <msnyder@vmware.com>
9378
9379 * server.c (queue_stop_reply): Call xmalloc not malloc.
9380
93812011-03-02 Michael Snyder <msnyder@vmware.com>
9382
9383 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9384
9f72fee2
MS
93852011-02-28 Michael Snyder <msnyder@vmware.com>
9386
588eebee
MS
9387 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9388 (cmd_qtframe): Ditto.
9389 (cmd_qtbuffer): Ditto.
9390 (cmd_bigqtbuffer): Ditto.
9391
9f72fee2
MS
9392 * utils.c (decimal2str): Initialize 'width' to nine, then
9393 don't mess with it.
9394
8040bd49
UW
93952011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9396
9397 * hostio.c (require_data): Free *data, not data.
9398
7e52cbd0
JK
93992011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9400
9401 * hostio.c (require_data): Use free, not xfree.
9402
9130f83e
MS
94032011-02-27 Michael Snyder <msnyder@vmware.com>
9404
4b812f4e
MS
9405 * server.c (handle_query): Discard unused value.
9406
9130f83e
MS
9407 * hostio.c (require_data): Free malloc memory before returning
9408 error.
9409
69d37113
MS
94102011-02-26 Michael Snyder <msnyder@vmware.com>
9411
9412 * linux-low.c (list_threads): Call closedir for dirent.
9413
35f5825a
MS
94142011-02-27 Michael Snyder <msnyder@vmware.com>
9415
2a589cef
MS
9416 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9417 a case statement falls through.
9418
0adea5f7
MS
9419 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9420
35f5825a
MS
9421 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9422 in comparison.
9423
238f1c74
MS
94242011-02-26 Michael Snyder <msnyder@vmware.com>
9425
9426 * utils.c (decimal2str): Eliminate dead code and dead param.
9427 (pulongest): Drop dead param from call to decimal2str.
9428 (plongest): Ditto.
9429
633ff500
JB
94302011-02-24 Joel Brobecker <brobecker@adacore.com>
9431
9432 Revert the following patch (not approved yet):
9433 2011-02-21 Hui Zhu <teawater@gmail.com>
9434 * tracepoint.c (tp_printf): New function.
9435 (eval_agent_expr): Handle gdb_agent_op_printf.
9436
f9c6ff72
HZ
94372011-02-21 Hui Zhu <teawater@gmail.com>
9438
9439 * tracepoint.c (tp_printf): New function.
9440 (eval_agent_expr): Handle gdb_agent_op_printf.
9441
94d5e490
TT
94422011-02-18 Tom Tromey <tromey@redhat.com>
9443
9444 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9445 (tracepoint.o): Likewise.
9446 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9447 (gdb_agent_op_names): Likewise.
9448
c7f96d2b
TT
94492011-02-18 Tom Tromey <tromey@redhat.com>
9450
9451 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9452 gdb_agent_op_rot>: New constants.
9453 (gdb_agent_op_names): Add pick and roll.
9454 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9455 cases.
9456
0feedb2c
JK
94572011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9458
9459 * aclocal.m4: Regenerated with aclocal-1.11.1.
9460
b3b9301e
PA
94612011-02-14 Pedro Alves <pedro@codesourcery.com>
9462
9463 * server.c (handle_qxfer_traceframe_info): New.
9464 (qxfer_packets): Register "traceframe-info".
9465 (handle_query): Report support for qXfer:traceframe-info:read+.
9466 * tracepoint.c (match_blocktype): New.
9467 (traceframe_find_block_type): Rename to ...
9468 (traceframe_walk_blocks): ... this. Add callback filter argument,
9469 and use it.
9470 (traceframe_find_block_type): New, reimplemented on top of
9471 traceframe_walk_blocks.
9472 (build_traceframe_info_xml): New.
9473 (traceframe_read_info): New.
9474 * server.h (traceframe_read_info): Declare.
9475
4f3e6fb7
YQ
94762011-02-11 Yao Qi <yao@codesourcery.com>
9477
9478 * configure.ac: Call AC_PROG_RANLIB.
9479 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9480 * configure: Regenerate.
9481
764880b7
PA
94822011-02-07 Pedro Alves <pedro@codesourcery.com>
9483
9484 * server.c (gdb_read_memory): Change return semantics to allow
9485 partial transfers.
9486 (handle_search_memory_1): Adjust.
9487 (process_serial_event) <'m' packet>: Handle partial transfers.
9488 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9489
1c79eb8a
PA
94902011-01-28 Pedro Alves <pedro@codesourcery.com>
9491
9492 * regcache.c (init_register_cache): Initialize
9493 regcache->register_status.
9494 (free_register_cache): Release regcache->register_status.
9495 (regcache_cpy): Copy register_status.
9496 (registers_to_string): Print 'x's for unavailable registers.
9497 (supply_register): Mark the register's status valid or
9498 unavailable, depending on whether a buffer was passed in or not.
9499 (supply_register_zeroed): New.
9500 (supply_regblock): Mark the registers' status valid or
9501 unavailable, depending on whether a buffer was passed in or not.
9502 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9503 (struct regcache): New `register_status' field.
9504 (supply_register_zeroed): Declare.
9505 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9506 supply_register_zeroed, rather than passing a NULL buffer to
9507 supply_register.
9508 * tracepoint.c (fetch_traceframe_registers): Update comment.
9509
85724a0e
PA
95102011-01-28 Pedro Alves <pedro@codesourcery.com>
9511
9512 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9513 buffer explicit.
9514
d08aafef
PA
95152011-01-25 Pedro Alves <pedro@codesourcery.com>
9516
9517 * server.h (decode_xfer_write): Change prototype.
9518 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9519 and don't extract the annex here.
9520 * server.c (decode_xfer_read): Remove `annex' parameter,
9521 and don't extract the annex here.
9522 (decode_xfer): New.
9523 (struct qxfer): New.
9524 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9525 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9526 (handle_qxfer_statictrace): New functions, abstracted out from
9527 handle_query, and made to use the struct qxfer interface.
9528 (handle_threads_qxfer_proper): Rename to ...
9529 (handle_qxfer_threads_proper): ... this.
9530 (handle_threads_qxfer): Rename to ...
9531 (handle_qxfer_threads): ... this. Adjust.
9532 (qxfer_packets): New array.
9533 (handle_qxfer): New function.
9534 (handle_query): Use handle_qxfer.
9535
493e2a69
MS
95362011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9537
9538 * gdbreplay.c: Shorten lines of >= 80 columns.
9539 * linux-low.c: Ditto.
9540 * linux-ppc-low.c: Ditto.
9541 * linux-s390-low.c: Ditto.
9542 * linux-sparc-low.c: Ditto.
9543 * linux-x86-low.c: Ditto.
9544 * linux-xtensa-low.c: Ditto.
9545 * mem-break.c: Ditto.
9546 * nto-low.c: Ditto.
9547 * regcache.h: Ditto.
9548 * remote-utils.c: Ditto.
9549 * server.c: Ditto.
9550 * server.h: Ditto.
9551 * thread-db.c: Ditto.
9552 * tracepoint.c: Ditto.
9553 * utils.c: Ditto.
9554 * win32-low.h: Ditto.
9555
44944448
JB
95562011-01-05 Joel Brobecker <brobecker@adacore.com>
9557
9558 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9559 update.
9560
71ce852c
JB
95612011-01-01 Joel Brobecker <brobecker@adacore.com>
9562
9563 * server.c (gdbserver_version): Update copyright year in version
9564 output.
9565 * gdbreplay.c (gdbreplay_version): Ditto.
9566
eb826dc6
MF
95672010-12-29 Jie Zhang <jie.zhang@analog.com>
9568
9569 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9570 * linux-bfin-low.c: New file.
9571 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9572 PT_DATA_ADDR for BFIN targets.
9573 * Makefile.in (SFILES): Add linux-bfin-low.c.
9574 (clean): Remove reg-bfin.c.
9575 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9576 * README: Mention supported Blackfin targets.
9577
39ab222a
MF
95782010-12-23 Mike Frysinger <vapier@gentoo.org>
9579
9580 * .gitignore: New file.
9581
a1f2ce7d
MF
95822010-11-16 Mike Frysinger <vapier@gentoo.org>
9583
9584 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9585
f474844c
JZ
95862010-10-22 Jie Zhang <jie@codesourcery.com>
9587
9588 * Makefile.in: Add FLAGS_TO_PASS variable.
9589 (install): Remove dependency of install-only and recursively
9590 invoke make for install-only.
9591
f1048712
DE
95922010-10-04 Doug Evans <dje@google.com>
9593
9594 * Makefile.in (uninstall): Use $(DESTDIR).
9595
b53a1623
PA
95962010-09-24 Pedro Alves <pedro@codesourcery.com>
9597
e6ee044d
PA
9598 PR gdb/11842
9599
b53a1623
PA
9600 * linux-x86-low.c (compat_siginfo_from_siginfo)
9601 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9602 si_code is < 0. Check for si_code == SI_TIMER before checking for
9603 si_code < 0.
9604
fa1bd1e4
JB
96052010-09-13 Joel Brobecker <brobecker@adacore.com>
9606
9607 * lynx-i386-low.c: New file.
9608 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9609
47fac8f8
JB
96102010-09-13 Joel Brobecker <brobecker@adacore.com>
9611
9612 * lynx-low.c (ptrace_request_to_str): Remove handling for
9613 request values that have been removed in LynxOS 5.x.
9614
1adfc54d
JB
96152010-09-13 Joel Brobecker <brobecker@adacore.com>
9616
9617 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9618 <ptrace.h>
9619
c2a66c29
NS
96202010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9621
9622 * configure.ac: Add --enable-inprocess-agent option.
9623 * configure: Rebuilt.
9624
32fcada3
YQ
96252010-09-06 Yao Qi <yao@codesourcery.com>
9626
9627 * linux-low.c (linux_kill): Remove unused variable.
9628 (linux_stabilize_threads): Likewise.
9629 * server.c (start_inferior): Likewise.
9630 (queue_stop_reply_callback): Likewise.
9631 * tracepoint.c (do_action_at_tracepoint): Likewise.
9632
0cccb683
YQ
96332010-09-06 Yao Qi <yao@codesourcery.com>
9634
9635 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9636 on return.
9637
423ec54c
JK
96382010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9639
9640 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9641
12ac6819
PA
96422010-09-06 Pedro Alves <pedro@codesourcery.com>
9643
9644 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9645 "$(IPA_DEPFILES)".
9646
8ed54b31
JB
96472010-09-01 Joel Brobecker <brobecker@adacore.com>
9648
9649 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9650 gdbserver/lynx-ppc-low.c: New files.
9651 * Makefile.in (lynx_low_h): New variable.
9652 (lynx-low.o, lynx-ppc-low.o): New rules.
9653 * configure.ac: On LynxOS, link with -lnetinet.
9654 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9655 * configure: regenerate.
9656
bb0116a4
JB
96572010-09-01 Joel Brobecker <brobecker@adacore.com>
9658
9659 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9660 * configure.ac: Add check for vasprintf and vsnprintf.
9661 * configure, config.in: Regenerate.
9662 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9663
a778ab81 96642010-09-01 Joel Brobecker <brobecker@adacore.com>
9665
9666 * gdbreplay.c: Move include of alloca.h up, next to include of
9667 malloc.h.
9668 * server.h: Add include of malloc.h.
9669 * mem-break.c: Remove include of malloc.h.
9670 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9671
8b034a19 96722010-09-01 Joel Brobecker <brobecker@adacore.com>
9673
9674 * Makefile.in (memmem.o): Build with -Wno-error.
9675
96762010-09-01 Joel Brobecker <brobecker@adacore.com>
9677
9678 * utils.c (xsnprintf): Make non-static.
9679 * server.h: Add xsnprintf declaration.
9680 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9681 replace calls to snprintf by calls to xsnprintf throughout.
9682
96832010-09-01 Joel Brobecker <brobecker@adacore.com>
9684
9685 * configure.ac: Add configure check for alloca.
9686 * configure, config.in: Regenerate.
9687 * server.h: Include alloca.h if it exists.
9688 * gdbreplay.c: Include alloca.h if it exists.
9689
1a981360
PA
96902010-08-28 Pedro Alves <pedro@codesourcery.com>
9691
9692 * linux-low.c (__SIGRTMIN): Define if not already defined.
9693 (linux_create_inferior): Check for __ANDROID__ rather than
9694 __SIGRTMIN.
9695 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9696 are already deferred.
9697 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9698 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9699 stopped and already has a pending signal to report.
9700 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9701 a pending signal to report or is moving out of a jump pad.
9702 (linux_init_signals): Check for __ANDROID__ rather than
9703 __SIGRTMIN.
9704
b4d51a55
PA
97052010-08-28 Pedro Alves <pedro@codesourcery.com>
9706
9707 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9708 debug_threads check. Avoid a linear search when not doing debug
9709 output.
9710
ec48365d
PA
97112010-08-27 Pedro Alves <pedro@codesourcery.com>
9712
9713 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9714 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9715 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9716 (process_event): Change local fd's type to gdb_fildes_t.
9717 (create_file_handler): Adjust prototype.
9718 (delete_file_handler): Adjust prototype.
9719 (handle_file_event): Adjust prototype. Use pfildes.
9720 (create_file_event): Adjsut prototype.
9721 * remote-utils.c (remote_desc, listen_desc): Change type to
9722 gdb_fildes_t.
9723 * server.h: New gdb_fildes_t typedef.
9724 [USE_WIN32API]: Include winsock2.h.
9725 (delete_file_handler, add_file_handler): Adjust prototypes.
9726 (pfildes): Declare.
9727 * utils.c (pfildes): New.
9728
854d88f0
PA
97292010-08-27 Pedro Alves <pedro@codesourcery.com>
9730
9731 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9732 * configure: Regenerate.
9733
0146f85b
PA
97342010-08-27 Pedro Alves <pedro@codesourcery.com>
9735
9736 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9737 (linux_done_accessing_memory): ... this.
9738 (linux_target_ops): Adjust.
9739 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9740 * nto-low.c (nto_target_ops): Adjust comment.
9741 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9742 * spu-low.c (spu_target_ops): Adjust comment.
9743 * target.h (target_ops): Rename unprepare_to_access_memory field
9744 to done_accessing_memory.
9745 (unprepare_to_access_memory): Rename to ...
9746 (done_accessing_memory): ... this.
9747
90d74c30
PA
97482010-08-26 Pedro Alves <pedro@codesourcery.com>
9749
9750 * linux-low.c (linux_prepare_to_access_memory): New.
9751 (linux_unprepare_to_access_memory): New.
9752 (linux_target_ops): Install them.
9753 * server.c (read_memory): Rename to ...
9754 (gdb_read_memory): ... this. Use
9755 prepare_to_access_memory/prepare_to_access_memory.
9756 (write_memory): Rename to ...
9757 (gdb_write_memory): ... this. Use
9758 prepare_to_access_memory/prepare_to_access_memory.
9759 (handle_search_memory_1): Adjust.
9760 (process_serial_event): Adjust.
9761 * target.h (struct target_ops): New fields
9762 prepare_to_access_memory and unprepare_to_access_memory.
9763 (prepare_to_access_memory, unprepare_to_access_memory): New.
9764 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9765 prepare_to_access_memory/prepare_to_access_memory.
9766 * nto-low.c (nto_target_ops): Adjust.
9767 * spu-low.c (spu_target_ops): Adjust.
9768 * win32-low.c (win32_target_ops): Adjust.
9769
fd467969
PA
97702010-08-26 Pedro Alves <pedro@codesourcery.com>
9771
9772 * Makefile.in (WARN_CFLAGS): Get it from configure.
9773 (WERROR_CFLAGS): New.
9774 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9775 * configure.ac: Introduce --enable-werror, which adds -Werror to
9776 the compiler command line. Enabled by default. Disable with
9777 --disable-werror. Add -Wdeclaration-after-statement
9778 Wpointer-arith and -Wformat-nonliteral to warning flags.
9779 * configure: Regenerate.
9780
331e2f5f
PA
97812010-08-26 Pedro Alves <pedro@codesourcery.com>
9782
9783 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9784
e581f2b4
PA
97852010-08-26 Pedro Alves <pedro@codesourcery.com>
9786
9787 * gdbreplay.c (remote_error): New.
9788 (gdbchar): New.
9789 (expect): Use gdbchar. Check for error reading from GDB.
9790 Clarify sync error output.
9791 (play): Check for errors writing to GDB.
9792 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9793 * remote-utils.c (getpkt): Check for errors writing to the remote
9794 descriptor.
9795
3c11dd79
PA
97962010-08-25 Pedro Alves <pedro@codesourcery.com>
9797
9798 * linux-low.c (linux_wait_1): Move non-debugging code out of
9799 `debug_threads' control.
9800
d20a8ad9
PA
98012010-08-25 Pedro Alves <pedro@codesourcery.com>
9802
9803 * linux-low.c (linux_wait_1): Don't set last_status here.
9804 * server.c (push_event, queue_stop_reply_callback): Assert we're
9805 not pushing a TARGET_WAITKIND_IGNORE event.
9806 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9807 (myresume, handle_target_event): Set the thread's last_resume_kind
9808 and last_status from the target returned status.
9809
964e4306
PA
98102010-08-25 Pedro Alves <pedro@codesourcery.com>
9811
9812 PR threads/10729
9813
9814 * linux-x86-low.c (update_debug_registers_callback): New.
9815 (i386_dr_low_set_addr): Use it.
9816 (i386_dr_low_get_addr): New.
9817 (i386_dr_low_set_control): Use update_debug_registers_callback.
9818 (i386_dr_low_get_control): New.
9819 (i386_dr_low_get_status): Adjust.
9820 * linux-low.c (linux_stop_lwp): New.
9821 * linux-low.h (linux_stop_lwp): Declare.
9822
9823 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9824 argument instead of a i386_debug_reg_state.
9825 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9826 a i386_debug_reg_state.
9827 (i386_insert_aligned_watchpoint): Adjust.
9828 (i386_remove_aligned_watchpoint): Adjust.
9829 (i386_low_stopped_data_address): Read the debug registers from the
9830 inferior instead of from the mirrors.
9831 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9832 (i386_dr_low_get_addr): Declare.
9833 (i386_dr_low_get_control): Declare.
9834 (i386_dr_low_get_status): Change prototype.
9835
9836 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9837 (i386_dr_low_get_addr): New.
9838 (i386_dr_low_get_control): New.
9839 (i386_dr_low_get_status): Adjust prototype. Return
9840 dr_status_mirror.
9841 (i386_initial_stuff): Clear dr_status_mirror and
9842 dr_control_mirror.
9843 (i386_get_thread_context): Adjust.
9844 (i386_set_thread_context): Adjust.
9845 (i386_thread_added): Adjust.
9846
5f21a75b
PA
98472010-08-24 Pedro Alves <pedro@codesourcery.com>
9848
9849 * linux-low.h (linux_thread_area): Delete declaration.
9850
3e4c1235
TS
98512010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9852
9853 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9854 after its termination.
9855
1971b033
PA
98562010-08-09 Pedro Alves <pedro@codesourcery.com>
9857
9858 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9859 (gdb_wants_all_stopped): Delete.
9860 (linux_wait_1): Don't call them.
9861 * server.c (handle_v_cont): Tag all threads as want-stopped.
9862 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9863 stopped as "client-wants-stopped".
9864
310444ac
PA
98652010-07-31 Pedro Alves <pedro@codesourcery.com>
9866
9867 * Makefile.in (signals_h): New.
9868 (server_h): Depend on it.
9869 (server.o): Don't depend on $(signals_def).
9870 (signals.o): Depend on $(signals_def).
9871
a19cae16
JK
98722010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9873
9874 * Makefile.in (signals_def): New.
9875 (server_h): Append include/gdb/signals.h and signals_def.
9876 (server.o): Append signals_def.
9877
30d50328
JK
98782010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9879
9880 * server.c (handle_target_event): Use target_signal_to_host for
9881 resume_info.sig initialization.
9882 * target.h (struct thread_resume) <sig>: New comment.
9883
5c3216e2
OS
98842010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9885
c6f46ca0
OS
9886 * server.c (handle_query): strcpy() the returned string from paddress()
9887 instead of sprintf().
5c3216e2
OS
9888 * utils.c (paddress): Return phex_nz().
9889
6bd31874
JB
98902010-07-07 Joel Brobecker <brobecker@adacore.com>
9891
9892 * server.c (handle_v_cont): Call mourn_inferior if process
9893 just exited.
9894 (myresume): Likewise.
9895
0fb4aa4b
PA
98962010-07-01 Pedro Alves <pedro@codesourcery.com>
9897
9898 Static tracepoints, and integration with UST.
9899
9900 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9901 * mem-break.c (uninsert_all_breakpoints)
9902 (reinsert_all_breakpoints): New.
9903 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9904 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9905 (gdb_agent_ust_loaded, helper_thread_id)
9906 (gdb_agent_helper_thread_id): New macros.
9907 (struct ipa_sym_addresses): Add addr_ust_loaded,
9908 addr_helper_thread_id, addr_cmd_buf.
9909 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9910 (in_process_agent_loaded_ust): New.
9911 (write_e_ust_not_loaded): New.
9912 (maybe_write_ipa_ust_not_loaded): New.
9913 (struct collect_static_trace_data_action): New.
9914 (enum tracepoint_type) <static_tracepoint>: New.
9915 (struct tracepoint) <handle>: Mention static tracepoints.
9916 (struct static_tracepoint_ctx): New.
9917 (CMD_BUF_SIZE): New.
9918 (add_tracepoint_action): Handle static tracepoint actions.
9919 (unprobe_marker_at): New.
9920 (clear_installed_tracepoints): Handle static tracepoints.
9921 (cmd_qtdp): Handle static tracepoints.
9922 (probe_marker_at): New.
9923 (cmd_qtstart): Handle static tracepoints.
9924 (response_tracepoint): Handle static tracepoints.
9925 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9926 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9927 (get_context_regcache): Handle static tracepoints.
9928 (do_action_at_tracepoint): Handle static tracepoint actions.
9929 (traceframe_find_block_type): Handle static trace data blocks.
9930 (traceframe_read_sdata): New.
9931 (download_tracepoints): Download static tracepoint actions.
9932 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9933 (GDB_PROBE_NAME): New.
9934 (ust_ops): New.
9935 (GET_UST_SYM): New.
9936 (USTF): New.
9937 (dlsym_ust): New.
9938 (ust_marker_to_static_tracepoint): New.
9939 (gdb_probe): New.
9940 (collect_ust_data_at_tracepoint): New.
9941 (gdb_ust_probe): New.
9942 (UNIX_PATH_MAX, SOCK_DIR): New.
9943 (gdb_ust_connect_sync_socket): New.
9944 (resume_thread, stop_thread): New.
9945 (run_inferior_command): New.
9946 (init_named_socket): New.
9947 (gdb_ust_socket_init): New.
9948 (cstr_to_hexstr): New.
9949 (next_st): New.
9950 (first_marker, next_marker): New.
9951 (response_ust_marker): New.
9952 (cmd_qtfstm, cmd_qtsstm): New.
9953 (unprobe_marker_at, probe_marker_at): New.
9954 (cmd_qtstmat, gdb_ust_thread): New.
9955 (gdb_ust_init): New.
9956 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9957 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9958 (ST_REGENTRY): New.
9959 (x86_64_st_collect_regmap): New.
9960 (X86_64_NUM_ST_COLLECT_GREGS): New.
9961 (AMD64_RIP_REGNUM): New.
9962 (supply_static_tracepoint_registers): New.
9963 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9964 (ST_REGENTRY): New.
9965 (i386_st_collect_regmap): New.
9966 (i386_NUM_ST_COLLECT_GREGS): New.
9967 (supply_static_tracepoint_registers): New.
9968 * server.c (handle_query): Handle qXfer:statictrace:read.
9969 <qSupported>: Report support for StaticTracepoints, and
9970 qXfer:statictrace:read features.
9971 * server.h (traceframe_read_sdata)
9972 (supply_static_tracepoint_registers): Declare.
9973 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9974 (unpack_varlen_hex): Include in IPA build.
9975 * Makefile.in (ustlibs, ustinc): New.
9976 (IPA_OBJS): Add remote-utils-ipa.o.
9977 ($(IPA_LIB)): Link -ldl and -lpthread.
9978 (UST_CFLAGS): New.
9979 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9980 * config.in, configure: Regenerate.
9981
9e4344e5
PA
99822010-06-20 Ian Lance Taylor <iant@google.com>
9983 Pedro Alves <pedro@codesourcery.com>
9984
9985 * linux-x86-low.c (always_true): Delete.
9986 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9987 trying to fool the compiler with always_true.
9988
c6beb2cb
PA
99892010-06-20 Pedro Alves <pedro@codesourcery.com>
9990
9991 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9992 conditions in gdbserver.
9993
d2ed6730
UW
99942010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9995
9996 * spu-low.c (spu_read_memory): Wrap around local store limit.
9997 (spu_write_memory): Likewise.
9998
4e29fb54
PA
99992010-06-15 Pedro Alves <pedro@codesourcery.com>
10000
10001 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10002 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10003 LONGEST uses.
10004 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10005 uses.
10006 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10007 uses with LONGEST uses.
10008
6a271cae
PA
100092010-06-14 Stan Shebs <stan@codesourcery.com>
10010 Pedro Alves <pedro@codesourcery.com>
10011
10012 Bytecode compiler.
10013
10014 * linux-x86-low.c: Include limits.h.
10015 (add_insns): New.
10016 (always_true): New.
10017 (EMIT_ASM): New.
10018 (EMIT_ASM32): New.
10019 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10020 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10021 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10022 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10023 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10024 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10025 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10026 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10027 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10028 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10029 (amd64_emit_void_call_2): New.
10030 (amd64_emit_ops): New.
10031 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10032 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10033 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10034 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10035 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10036 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10037 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10038 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10039 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10040 (i386_emit_stack_adjust, i386_emit_int_call_1)
10041 (i386_emit_void_call_2): New.
10042 (i386_emit_ops): New.
10043 (x86_emit_ops): New.
10044 (the_low_target): Install x86_emit_ops.
10045 * server.h (struct emit_ops): New.
10046 (get_raw_reg_func_addr): Declare.
10047 (current_insn_ptr, emit_error): Declare.
10048 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10049 (set_trace_state_variable_value): New defines.
10050 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10051 addr_get_trace_state_variable_value and
10052 addr_set_trace_state_variable_value.
10053 (symbol_list): New fields for get_raw_reg,
10054 get_trace_state_variable_value and set_trace_state_variable_value.
10055 (condfn): New typedef.
10056 (struct tracepoint): New field `compiled_cond'.
10057 (do_action_at_tracepoint): Clear compiled_cond.
10058 (get_trace_state_variable_value, set_trace_state_variable_value):
10059 Export in the IPA.
10060 (condition_true_at_tracepoint): If there's a compiled condition,
10061 run that.
10062 (current_insn_ptr, emit_error): New globals.
10063 (struct bytecode_address): New.
10064 (get_raw_reg_func_addr): New.
10065 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10066 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10067 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10068 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10069 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10070 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10071 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10072 (compile_tracepoint_condition, compile_bytecodes): New.
10073 * target.h (emit_ops): Forward declare.
10074 (struct target_ops): New field emit_ops.
10075 (target_emit_ops): New.
10076 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10077 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10078 * linux-low.c (linux_emit_ops): New.
10079 (linux_target_ops): Install it.
10080 * linux-low.h (struct linux_target_ops): New field emit_ops.
10081
92b72907
UW
100822010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10083
10084 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10085 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10086
fa593d66
PA
100872010-06-01 Pedro Alves <pedro@codesourcery.com>
10088 Stan Shebs <stan@codesourcery.com>
10089
10090 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10091 (all): Depend on $(extra_libraries).
10092 (install-only): Install the IPA.
10093 (IPA_OBJS, IPA_LIB): New.
10094 (clean): Remove the IPA lib.
10095 (IPAGENT_CFLAGS): New.
10096 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10097 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10098 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10099 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10100 * configure.ac: Check for atomic builtins support in the compiler.
10101 (IPA_DEPFILES, extra_libraries): Define.
10102 * configure.srv (ipa_obj): Add description.
10103 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10104 (i[34567]86-*-linux*): Set ipa_obj.
10105 (x86_64-*-linux*): Set ipa_obj.
10106 * linux-low.c (stabilizing_threads): New.
10107 (supports_fast_tracepoints): New.
10108 (linux_detach): Stabilize threads before detaching.
10109 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10110 the lwp is either not stabilizing, or is moving out of a jump pad.
10111 (linux_fast_tracepoint_collecting): New.
10112 (maybe_move_out_of_jump_pad): New.
10113 (enqueue_one_deferred_signal): New.
10114 (dequeue_one_deferred_signal): New.
10115 (linux_wait_for_event_1): If moving out of a jump pad, defer
10116 pending signals to later.
10117 (linux_stabilize_threads): New.
10118 (linux_wait_1): Check if threads need moving out of jump pads, and
10119 do it if so.
10120 (stuck_in_jump_pad_callback): New.
10121 (move_out_of_jump_pad_callback): New.
10122 (lwp_running): New.
10123 (linux_resume_one_lwp): Handle moving out of jump pads.
10124 (linux_set_resume_request): Dequeue deferred signals.
10125 (need_step_over_p): Also step over fast tracepoint jumps.
10126 (start_step_over): Also uninsert fast tracepoint jumps.
10127 (finish_step_over): Also reinsert fast tracepoint jumps.
10128 (linux_install_fast_tracepoint_jump): New.
10129 (linux_target_ops): Install linux_stabilize_threads and
10130 linux_install_fast_tracepoint_jump_pad.
10131 * linux-low.h (linux_target_ops) <get_thread_area,
10132 install_fast_tracepoint_jump_pad>: New fields.
10133 (struct lwp_info) <collecting_fast_tracepoint,
10134 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10135 (linux_get_thread_area): Declare.
10136 * linux-x86-low.c (jump_insn): New.
10137 (x86_get_thread_area): New.
10138 (append_insns): New.
10139 (push_opcode): New.
10140 (amd64_install_fast_tracepoint_jump_pad): New.
10141 (i386_install_fast_tracepoint_jump_pad): New.
10142 (x86_install_fast_tracepoint_jump_pad): New.
10143 (the_low_target): Install x86_get_thread_area and
10144 x86_install_fast_tracepoint_jump_pad.
10145 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10146 (struct fast_tracepoint_jump): New.
10147 (fast_tracepoint_jump_insn): New.
10148 (fast_tracepoint_jump_shadow): New.
10149 (find_fast_tracepoint_jump_at): New.
10150 (fast_tracepoint_jump_here): New.
10151 (delete_fast_tracepoint_jump): New.
10152 (set_fast_tracepoint_jump): New.
10153 (uninsert_fast_tracepoint_jumps_at): New.
10154 (reinsert_fast_tracepoint_jumps_at): New.
10155 (set_breakpoint_at): Use write_inferior_memory.
10156 (uninsert_raw_breakpoint): Use write_inferior_memory.
10157 (check_mem_read): Mask out fast tracepoint jumps.
10158 (check_mem_write): Mask out fast tracepoint jumps.
10159 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10160 (set_fast_tracepoint_jump): Declare.
10161 (delete_fast_tracepoint_jump)
10162 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10163 (reinsert_fast_tracepoint_jumps_at): Declare.
10164 * regcache.c: Don't compile many functions when building the
10165 in-process agent library.
10166 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10167 the register buffer in the heap.
10168 (free_register_cache): If the register buffer isn't owned by the
10169 regcache, don't free it.
10170 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10171 pre-existing register caches.
10172 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10173 type.
10174 (convert_ascii_to_int): : Constify `from' parameter type.
10175 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10176 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10177 the needed buffer in-place.
10178 (relocate_instruction): New.
10179 * server.c (handle_query) <qSymbols>: If the target supports
10180 tracepoints, give it a chance of looking up symbols. Report
10181 support for fast tracepoints.
10182 (handle_status): Stabilize threads.
10183 (process_serial_event): Adjust.
10184 * server.h (struct fast_tracepoint_jump): Forward declare.
10185 (struct process_info) <fast_tracepoint_jumps>: New field.
10186 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10187 (decode_X_packet, decode_M_packet): Adjust.
10188 (relocate_instruction): Declare.
10189 (in_process_agent_loaded): Declare.
10190 (tracepoint_look_up_symbols): Declare.
10191 (struct fast_tpoint_collect_status): Declare.
10192 (fast_tracepoint_collecting): Declare.
10193 (force_unlock_trace_buffer): Declare.
10194 (handle_tracepoint_bkpts): Declare.
10195 (initialize_low_tracepoint)
10196 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10197 * target.h (struct target_ops) <stabilize_threads,
10198 install_fast_tracepoint_jump_pad>: New fields.
10199 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10200 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10201 [HAVE_STDINT_H]: Include stdint.h.
10202 (trace_debug_1): Rename to ...
10203 (trace_vdebug): ... this.
10204 (trace_debug): Rename to ...
10205 (trace_debug_1): ... this. Add `level' parameter.
10206 (trace_debug): New.
10207 (ATTR_USED, ATTR_NOINLINE): New.
10208 (IP_AGENT_EXPORT): New.
10209 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10210 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10211 (about_to_request_buffer_space, trace_buffer_is_full)
10212 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10213 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10214 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10215 (traceframe_write_count, traceframes_created)
10216 (trace_state_variables)
10217 New renaming defines.
10218 (struct ipa_sym_addresses): New.
10219 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10220 (symbol_list): New.
10221 (ipa_sym_addrs): New.
10222 (all_tracepoint_symbols_looked_up): New.
10223 (in_process_agent_loaded): New.
10224 (write_e_ipa_not_loaded): New.
10225 (maybe_write_ipa_not_loaded): New.
10226 (tracepoint_look_up_symbols): New.
10227 (debug_threads) [IN_PROCESS_AGENT]: New.
10228 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10229 (UNKNOWN_SIDE_EFFECTS): New.
10230 (stop_tracing): New.
10231 (flush_trace_buffer): New.
10232 (stop_tracing_bkpt): New.
10233 (flush_trace_buffer_bkpt): New.
10234 (read_inferior_integer): New.
10235 (read_inferior_uinteger): New.
10236 (read_inferior_data_pointer): New.
10237 (write_inferior_data_pointer): New.
10238 (write_inferior_integer): New.
10239 (write_inferior_uinteger): New.
10240 (struct collect_static_trace_data_action): Delete.
10241 (enum tracepoint_type): New.
10242 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10243 <actions_str, step_actions, step_actions_str>: Only include in
10244 GDBserver.
fa593d66
PA
10245 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10246 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10247 (tracepoints): Use IP_AGENT_EXPORT.
10248 (last_tracepoint): Don't include in the IPA.
10249 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10250 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10251 (alloced_trace_state_variables): New.
10252 (trace_state_variables): Use IP_AGENT_EXPORT.
10253 (traceframe_t): Delete unused variable.
10254 (circular_trace_buffer): Don't include in the IPA.
10255 (trace_buffer_start): Delete.
10256 (struct trace_buffer_control): New.
10257 (trace_buffer_free): Delete.
10258 (struct ipa_trace_buffer_control): New.
10259 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10260 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10261 New.
10262 (trace_buffer_ctrl): New.
10263 (TRACE_BUFFER_CTRL_CURR): New.
10264 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10265 Reimplement as macros.
10266 (trace_buffer_wrap): Delete.
10267 (traceframe_write_count, traceframe_read_count)
10268 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10269 (struct tracepoint_hit_ctx) <type>: New field.
10270 (struct fast_tracepoint_ctx): New.
10271 (memory_barrier): New.
10272 (cmpxchg): New.
10273 (record_tracepoint_error): Update atomically in the IPA.
10274 (clear_inferior_trace_buffer): New.
10275 (about_to_request_buffer_space): New.
10276 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10277 updating the same buffer.
10278 (add_tracepoint): Default the tracepoint's type to trap
10279 tracepoint, and orig_size to -1.
10280 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10281 internal variables.
10282 (create_trace_state_variable): New parameter `gdb'. Handle it.
10283 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10284 (cmd_qtdp): Handle fast tracepoints.
10285 (cmd_qtdv): Adjust.
10286 (max_jump_pad_size): New.
10287 (gdb_jump_pad_head): New.
10288 (get_jump_space_head): New.
10289 (claim_jump_space): New.
10290 (sort_tracepoints): New.
10291 (MAX_JUMP_SIZE): New.
10292 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10293 IPA.
10294 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10295 support. Upload fast traceframes, and delete internal IPA
10296 breakpoints.
10297 (stop_tracing_handler): New.
10298 (flush_trace_buffer_handler): New.
10299 (cmd_qtstop): Upload fast tracepoints.
10300 (response_tracepoint): Handle fast tracepoints.
10301 (tracepoint_finished_step): Upload fast traceframes. Set the
10302 tracepoint hit context's tracepoint type.
10303 (handle_tracepoint_bkpts): New.
10304 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10305 type. Add comment about fast tracepoints.
10306 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10307 non-existing action_str field.
10308 (get_context_regcache): Handle fast tracepoints.
10309 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10310 to the regcache.
10311 (fast_tracepoint_from_jump_pad_address): New.
10312 (fast_tracepoint_from_ipa_tpoint_address): New.
10313 (collecting_t): New.
10314 (force_unlock_trace_buffer): New.
10315 (fast_tracepoint_collecting): New.
10316 (collecting): New.
10317 (gdb_collect): New.
10318 (write_inferior_data_ptr): New.
10319 (target_tp_heap): New.
10320 (target_malloc): New.
10321 (download_agent_expr): New.
10322 (UALIGN): New.
10323 (download_tracepoints): New.
10324 (download_trace_state_variables): New.
10325 (upload_fast_traceframes): New.
10326 (IPA_FIRST_TRACEFRAME): New.
10327 (IPA_NEXT_TRACEFRAME_1): New.
10328 (IPA_NEXT_TRACEFRAME): New.
10329 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10330 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10331 (gdb_jump_pad_buffer_end): New.
10332 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10333 (initialize_tracepoint): Adjust.
10334 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10335 buffer. Initialize the low module.
10336 * utils.c (PREFIX, TOOLNAME): New.
10337 (malloc_failure): Use PREFIX.
10338 (error): In the IPA, an error causes an exit.
10339 (fatal, warning): Use PREFIX.
10340 (internal_error): Use TOOLNAME.
10341 (NUMCELLS): Increase to 10.
10342 * configure, config.in: Regenerate.
10343
d149dd1d
PA
103442010-06-01 Pedro Alves <pedro@codesourcery.com>
10345
10346 * server.c (handle_query) <qSupported>: Do two passes over the
10347 qSupported string to avoid nesting strtok.
10348
f6528abd
JK
103492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10350
10351 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10352 (CDEPS): New.
10353 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10354 -Wl,--dynamic-list.
10355 * configure: Regenerate.
10356 * proc-service.list: New.
10357
ca2a87a0
JK
103582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10359
10360 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10361 New comment.
10362
363a6e9f
OS
103632010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10364
10365 * gdbreplay.c (remote_open): Check error return from socket() call by
10366 its equality to -1 not by it being negative.
10367 * remote-utils.c (remote_open): Likewise.
10368
d23b6cb1
PA
103692010-05-23 Pedro Alves <pedro@codesourcery.com>
10370
10371 * config.h: Regenerate.
10372
28d3cf85
MK
103732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10374
10375 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10376 doesn't provide PTRACE_GET_THREAD_AREA.
10377
fea36a59
MK
103782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10379
10380 * linux-m68k-low.c: Include <asm/ptrace.h>
10381 (ps_get_thread_area): Implement.
10382
24b066ba
DE
103832010-05-03 Doug Evans <dje@google.com>
10384
10385 * event-loop.c (struct callback_event): New struct.
10386 (callback_list): New global.
10387 (append_callback_event, delete_callback_event): New functions.
10388 (process_callback): New function.
10389 (start_event_loop): Call it.
10390 * remote-utils.c (NOT_SCHEDULED): Define.
10391 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10392 moved out of readchar.
10393 (readchar): Rewrite. Call reschedule before returning.
10394 (reset_readchar): New function.
10395 (remote_close): Call it.
10396 (process_remaining, reschedule): New functions.
10397 * server.h (callback_handler_func): New typedef.
10398 (append_callback_event, delete_callback_event): Declare.
10399
9836d6ea
PA
104002010-05-03 Pedro Alves <pedro@codesourcery.com>
10401
10402 * proc-service.c (ps_pglobal_lookup): Use
10403 thread_db_look_up_one_symbol.
10404 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10405 parameter. Use it instead of all_symbols_looked_up.
10406 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10407 field.
10408 (all_symbols_looked_up): Don't declare.
10409 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10410 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10411 field.
10412 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10413 Set all_symbols_looked_up here.
10414 (thread_db_look_up_one_symbol): New.
10415 (thread_db_get_tls_address): Adjust.
10416 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10417 thread_db object on the heap, and tentatively set it in the
10418 process structure.
10419 (thread_db_init): Don't set all_symbols_looked_up here.
10420 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10421
7984d532
PA
104222010-05-03 Pedro Alves <pedro@codesourcery.com>
10423
10424 * linux-low.c (linux_kill, linux_detach): Adjust.
10425 (status_pending_p_callback): Remove redundant statement. Check
10426 for !TARGET_WAITIKIND_IGNORE, instead of
10427 TARGET_WAITKIND_STOPPED.
10428 (handle_tracepoints): Make sure LWP is locked. Adjust.
10429 (linux_wait_for_event_1): Adjust.
10430 (linux_cancel_breakpoints): New.
10431 (unsuspend_one_lwp): New.
10432 (unsuspend_all_lwps): New.
10433 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10434 (send_sigstop_callback): Change return type to int, add new
10435 `except' parameter and handle it.
10436 (suspend_and_send_sigstop_callback): New.
10437 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10438 pass them down. If SUSPEND, also increment the lwp's suspend
10439 count.
10440 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10441 (need_step_over_p): Don't consider suspended LWPs.
10442 (start_step_over): Adjust.
10443 (proceed_one_lwp): Change return type to int, add new `except'
10444 parameter and handle it.
10445 (unsuspend_and_proceed_one_lwp): New.
10446 (proceed_all_lwps): Use find_inferior instead of
10447 for_each_inferior.
10448 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10449 also decrement the suspend count of LWPs. Pass `except' down,
10450 instead of hacking its suspend count.
10451 (linux_pause_all): Add `freeze' parameter. Adjust.
10452 (linux_unpause_all): New.
10453 (linux_target_ops): Install linux_unpause_all.
10454 * server.c (handle_status): Adjust.
10455 * target.h (struct target_ops): New fields `unpause_all' and
10456 `cancel_breakpoints'. Add new parameter to `pause_all'.
10457 (pause_all): Add new `freeze' parameter.
10458 (unpause_all): New.
10459 (cancel_breakpoints): New.
10460 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10461 cancel breakpoints.
10462 (cmd_qtstart): Pause threads.
10463 (stop_tracing): Pause threads, and cancel breakpoints.
10464 * win32-low.c (win32_target_ops): Adjust.
10465
e471f25b
PA
104662010-05-03 Pedro Alves <pedro@codesourcery.com>
10467
10468 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10469 the inferior right away from here...
10470 (linux_wait_1): ... to here, and adjust to check the thread's
10471 last_resume_kind instead of the lwp's step or stop_expected flags.
10472
1915ef4f
PA
104732010-05-02 Pedro Alves <pedro@codesourcery.com>
10474
10475 * README: Use consistent `GDB' and `GDBserver' spellings.
10476
f9e39928
PA
104772010-05-02 Pedro Alves <pedro@codesourcery.com>
10478
10479 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10480 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10481 (linux_detach_one_lwp): Assume the lwp is stopped.
10482 (any_thread_of): Delete.
10483 (linux_detach): Stop all lwps here. Don't blindly delete all
10484 breakpoints.
10485 (delete_lwp_callback): New.
10486 (linux_mourn): Delete all lwps of the process that is gone.
10487 (linux_wait_1): Don't delete the last lwp of the process here.
10488 * mem-break.h (mark_breakpoints_out): Declare.
10489 * mem-break.c (mark_breakpoints_out): New.
10490 (free_all_breakpoints): Use it.
10491 * server.c (handle_target_event): If the process is gone, mark
10492 breakpoints out.
10493 * thread-db.c (struct thread_db) <create_bp>: New field.
10494 (thread_db_enable_reporting): Fix prototype. Store a thread event
10495 breakpoint reference in the thread_db struct.
10496 (thread_db_load_search): Clear the thread_db object.
10497 (try_thread_db_load_1): Ditto.
10498 (switch_to_process): New.
10499 (disable_thread_event_reporting): Use it.
10500 (remove_thread_event_breakpoints): New.
10501 (thread_db_detach, thread_db_mourn): Use it.
10502
1e7fc18c
PA
105032010-05-01 Pedro Alves <pedro@codesourcery.com>
10504
10505 * linux-low.c (linux_enable_event_reporting): New.
10506 (linux_wait_for_event_1, handle_extended_wait): Use it.
10507
02fc4de7
PA
105082010-04-30 Pedro Alves <pedro@codesourcery.com>
10509
10510 * linux-low.c (linux_kill_one_lwp, linux_kill)
10511 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10512 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10513 SIGSTOP even if the LWP is stopped.
10514 (send_sigstop_callback): New.
10515 (stop_all_lwps): Use send_sigstop_callback instead.
10516 (linux_resume_one_thread): Adjust.
10517 (proceed_one_lwp): Still proceed an LWP that the client has
10518 requested to stop, if we haven't reported it as stopped yet. Make
10519 sure that LWPs the client want stopped, have a pending SIGSTOP.
10520
bc3b5632
DE
105212010-04-26 Doug Evans <dje@google.com>
10522
ae1ada35
DE
10523 * server.c (handle_general_set): Make static.
10524
bc3b5632
DE
10525 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10526 Print received char after testing for error/eof instead of before.
10527 (input_interrupt): Tweak comment.
10528
65730243
DE
105292010-04-23 Doug Evans <dje@google.com>
10530
10531 * server.c (start_inferior): Print inferior argv if --debug.
10532
a8ae7dc0
AR
105332010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10534
10535 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10536 * nto-x86-low.c: Include server.h
10537
1c07cc19
PM
105382010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10539
10540 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10541 be consistent with other sources of this directory.
10542 (init_registers_amd64): Correct name of source file of this function
10543 in the comment.
10544
e0a61e09
PM
105452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10546
10547 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10548 64-bit executables.
10549
54709339
PM
105502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10551
10552 * win32-i386-low.c: Add 64-bit support.
10553 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10554 (init_registers_amd64): Declare.
10555 (mappings): Add 64-bit version of array.
10556 (init_windows_x86): New function.
10557 (the_low_target): Change init_arch field to init_windows_x86.
10558
e8f0053d
PM
105592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10560
10561 * win32-low.c: Adapt to support also 64-bit architecture.
10562 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10563 (get_image_name): Use SIZE_T type for local variable `done'.
10564 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10565 (toolhelp_get_dll_name): Idem.
10566 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10567 Use uintptr_t typecast to avoid warning.
10568 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10569 (handle_exception): Use phex_nz to avoid warning.
10570 (win32_wait): Remove unused local variable `process'.
10571
c481e77e
PM
105722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10573
10574 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10575 `amd64-avx.o'.
10576
12ea4b69
PM
105772010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10578
10579 * configure.ac: Use `ws2_32' library for srv_mingw.
10580 * configure: Regenerate.
10581 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10582 * remote-utils.c: Likewise.
10583
f6d1620c
L
105842010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10585
10586 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10587 if __x86_64__ is defined.
10588
8e642873
PM
105892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10590
10591 * configure: Regenerate.
10592
711e434b
PM
105932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10594
10595 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10596 * target.h (target_ops): New get_tib_address field.
10597 * win32-low.h (win32_thread_info): Add thread_local_base field.
10598 * win32-low.c (child_add_thread): Add tlb argument.
10599 Set thread_local_base field to TLB.
10600 (get_child_debug_event): Adapt to child_add_thread change.
10601 (win32_get_tib_address): New function.
10602 (win32_target_ops): Set get_tib_address field to
10603 win32_get_tib_address.
10604 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10605
505106cd
PA
106062010-04-12 Pedro Alves <pedro@codesourcery.com>
10607
505106cd
PA
10608 * linux-low.c (linux_mourn): Also remove the process.
10609 * server.c (handle_target_event): Don't remove the process here.
10610 * nto-low.c (nto_mourn): New.
10611 (nto_target_ops): Install it.
10612 * spu-low.c (spu_mourn): New.
10613 (spu_target_ops): Install it.
10614 * win32-low.c (win32_mourn): New.
10615 (win32_target_ops): Install it.
10616
e8470a06
PA
106172010-04-12 Pedro Alves <pedro@codesourcery.com>
10618
10619 * server.h (buffer_xml_printf): Remove redundant `;'.
10620
45ba0d02
PA
106212010-04-12 Pedro Alves <pedro@codesourcery.com>
10622
10623 * regcache.c (set_register_cache): Invalidate regcaches before
10624 changing the register cache layout.
10625 (regcache_invalidate_one): Allow a NULL regcache.
10626 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10627 regcaches before changing the register cache layout or the target
10628 regsets.
10629
59e04013
L
106302010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10631
10632 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10633 variable warning on Linux/x86-64.
10634
8336d594
PA
106352010-04-11 Pedro Alves <pedro@codesourcery.com>
10636
10637 GDBserver disconnected tracing support.
10638
10639 * linux-low.c (linux_remove_process): Delete.
10640 (add_lwp): Don't set last_resume_kind here.
10641 (linux_kill): Use `mourn'.
10642 (linux_detach): Use `thread_db_detach', and `mourn'.
10643 (linux_mourn): New.
10644 (linux_attach_lwp_1): Adjust comment.
10645 (linux_attach): last_resume_kind moved the thread_info; adjust.
10646 (status_pending_p_callback): Adjust.
10647 (linux_wait_for_event_1): Adjust.
10648 (count_events_callback, select_singlestep_lwp_callback)
10649 (select_event_lwp_callback, cancel_breakpoints_callback)
10650 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10651 (proceed_one_lwp): Adjust.
10652 (linux_async): Add debug output.
10653 (linux_thread_stopped): New.
10654 (linux_pause_all): New.
10655 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10656 linux_pause_all.
10657 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10658 (thread_db_free): Delete declaration.
10659 (thread_db_detach, thread_db_mourn): Declare.
10660 * thread-db.c (thread_db_init): Use thread_db_mourn.
10661 (thread_db_free): Delete, split in two.
10662 (disable_thread_event_reporting): New.
10663 (thread_db_detach): New.
10664 (thread_db_mourn): New.
10665
10666 * server.h (struct thread_info) <last_resume_kind>: New field.
10667 <attached>: Add comment.
10668 <gdb_detached>: New field.
10669 (handler_func): Change return type to int.
10670 (handle_serial_event, handle_target_event): Ditto.
10671 (gdb_connected): Declare.
10672 (tracing): Delete.
10673 (disconnected_tracing): Declare.
10674 (stop_tracing): Declare.
10675
10676 * server.c (handle_query) <qSupported>: Report support for
10677 disconnected tracing.
10678 (queue_stop_reply_callback): Account for running threads.
10679 (gdb_wants_thread_stopped): New.
10680 (gdb_wants_all_threads_stopped): New.
10681 (gdb_reattached_process): New.
10682 (handle_status): Clear the `gdb_detached' flag of all processes.
10683 In all-stop, stop all threads.
10684 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10685 (process_serial_event): If the remote connection breaks, or if an
10686 exit was forced with "monitor exit", force an event loop exit.
10687 Handle disconnected tracing on detach.
10688 (handle_serial_event): Adjust.
10689 (handle_target_event): If GDB isn't connected, forward events back
10690 to the inferior, unless the last process exited, in which case,
10691 exit gdbserver. Adjust interface.
10692
10693 * remote-utils.c (remote_open): Don't block in accept. Instead
10694 register an event loop source on the listen socket file
10695 descriptor. Refactor bits into ...
10696 (listen_desc): ... this new global.
10697 (gdb_connected): ... this new function.
10698 (enable_async_notification): ... this new function.
10699 (handle_accept_event): ... this new function.
10700 (remote_close): Clear remote_desc.
10701
10702 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10703
10704 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10705 New fields.
10706 (mourn_inferior): Define.
10707 (target_process_qsupported): Avoid the dangling else problem.
10708 (thread_stopped): Define.
10709 (pause_all): Define.
10710 (target_waitstatus_to_string): Declare.
10711 * target.c (target_waitstatus_to_string): New.
10712
10713 * tracepoint.c (tracing): Make extern.
10714 (disconnected_tracing): New.
10715 (stop_tracing): Make extern. Handle tracing stops due to GDB
10716 disconnecting.
10717 (cmd_qtdisconnected): New.
10718 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10719 (handle_tracepoint_general_set): Handle QTDisconnected.
10720
10721 * event-loop.c (event_handler_func): Change return type to int.
10722 (process_event): Bail out if the event handler wants the event
10723 loop to stop.
10724 (handle_file_event): Ditto.
10725 (start_event_loop): Bail out if the event handler wants the event
10726 loop to stop.
10727
10728 * nto-low.c (nto_target_ops): Adjust.
10729 * spu-low.c (spu_wait): Don't remove the process here.
10730 (spu_target_ops): Adjust.
10731 * win32-low.c (win32_wait): Don't remove the process here.
10732 (win32_target_ops): Adjust.
10733
5d267c4c
PA
107342010-04-11 Pedro Alves <pedro@codesourcery.com>
10735
10736 * regcache.c (realloc_register_cache): Invalidate inferior's
10737 regcache before recreating it.
10738
623ccd72
PA
107392010-04-09 Pedro Alves <pedro@codesourcery.com>
10740
10741 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10742
219f2f23
PA
107432010-04-09 Stan Shebs <stan@codesourcery.com>
10744 Pedro Alves <pedro@codesourcery.com>
10745
10746 * server.h (LONGEST): New.
10747 (struct thread_info) <while_stepping>: New field.
10748 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10749 Declare.
10750 (initialize_tracepoint, handle_tracepoint_general_set)
10751 (handle_tracepoint_query, tracepoint_finished_step)
10752 (tracepoint_was_hit, release_while_stepping_state_list):
10753 (current_traceframe): Declare.
10754 * server.c (handle_general_set): Handle tracepoint packets.
10755 (read_memory): New.
10756 (write_memory): New.
10757 (handle_search_memory_1): Use read_memory.
10758 (handle_query): Report support for conditional tracepoints, trace
10759 state variables, and tracepoint sources. Handle tracepoint
10760 queries.
10761 (main): Initialize the tracepoints module.
10762 (process_serial_event): Handle traceframe reads/writes.
10763
10764 * linux-low.c (handle_tracepoints): New.
10765 (linux_wait_1): Call it.
10766 (linux_resume_one_lwp): Handle while-stepping.
10767 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10768 (linux_target_ops): Install them.
10769 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10770 New field.
10771 * linux-x86-low.c (x86_supports_tracepoints): New.
10772 (the_low_target). Install it.
10773
10774 * mem-break.h (delete_breakpoint): Declare.
10775 * mem-break.c (delete_breakpoint): Make external.
10776
10777 * target.h (struct target_ops): Add `supports_tracepoints',
10778 `read_pc', and `write_pc' fields.
10779 (target_supports_tracepoints): Define.
10780 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10781 (phex_nz): New.
10782
10783 * regcache.h (struct regcache) <registers_owned>: New field.
10784 (init_register_cache, regcache_cpy): Declare.
10785 (regcache_read_pc, regcache_write_pc): Declare.
10786 (register_cache_size): Declare.
10787 (supply_regblock): Declare.
10788 * regcache.c (init_register_cache): New.
10789 (new_register_cache): Use it.
10790 (regcache_cpy): New.
10791 (register_cache_size): New.
10792 (supply_regblock): New.
10793 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10794
219f2f23
PA
10795 * tracepoint.c: New.
10796
10797 * Makefile.in (OBS): Add tracepoint.o.
10798 (tracepoint.o): New rule.
10799
3a13a53b
L
108002010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10801
10802 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10803 (i386-mmx.o): New.
10804 (i386-mmx.c): Likewise.
10805 (i386-mmx-linux.o): Likewise.
10806 (i386-mmx-linux.c): Likewise.
10807
10808 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10809 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10810 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10811 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10812
10813 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10814 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10815 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10816
1570b33e
L
108172010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10818
10819 * Makefile.in (clean): Updated.
10820 (i386-avx.o): New.
10821 (i386-avx.c): Likewise.
10822 (i386-avx-linux.o): Likewise.
10823 (i386-avx-linux.c): Likewise.
10824 (amd64-avx.o): Likewise.
10825 (amd64-avx.c): Likewise.
10826 (amd64-avx-linux.o): Likewise.
10827 (amd64-avx-linux.c): Likewise.
10828
10829 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10830 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10831 (srv_amd64_regobj): Add amd64-avx.o.
10832 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10833 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10834 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10835 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10836 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10837 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10838 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10839
10840 * i387-fp.c: Include "i386-xstate.h".
10841 (i387_xsave): New.
10842 (i387_cache_to_xsave): Likewise.
10843 (i387_xsave_to_cache): Likewise.
10844 (x86_xcr0): Likewise.
10845
10846 * i387-fp.h (i387_cache_to_xsave): Likewise.
10847 (i387_xsave_to_cache): Likewise.
10848 (x86_xcr0): Likewise.
10849
10850 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10851 * linux-crisv32-low.c (target_regsets): Likewise.
10852 * linux-m68k-low.c (target_regsets): Likewise.
10853 * linux-mips-low.c (target_regsets): Likewise.
10854 * linux-ppc-low.c (target_regsets): Likewise.
10855 * linux-s390-low.c (target_regsets): Likewise.
10856 * linux-sh-low.c (target_regsets): Likewise.
10857 * linux-sparc-low.c (target_regsets): Likewise.
10858 * linux-xtensa-low.c (target_regsets): Likewise.
10859
10860 * linux-low.c: Include <sys/uio.h>.
10861 (regsets_fetch_inferior_registers): Support nt_type.
10862 (regsets_store_inferior_registers): Likewise.
10863 (linux_process_qsupported): New.
10864 (linux_target_ops): Add linux_process_qsupported.
10865
10866 * linux-low.h (regset_info): Add nt_type.
10867 (linux_target_ops): Add process_qsupported.
10868
10869 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10870 and <sys/uio.h>.
10871 (init_registers_i386_avx_linux): New.
10872 (init_registers_amd64_avx_linux): Likewise.
10873 (xmltarget_i386_linux_no_xml): Likewise.
10874 (xmltarget_amd64_linux_no_xml): Likewise.
10875 (PTRACE_GETREGSET): Likewise.
10876 (PTRACE_SETREGSET): Likewise.
10877 (x86_fill_xstateregset): Likewise.
10878 (x86_store_xstateregset): Likewise.
10879 (use_xml): Likewise.
10880 (x86_linux_update_xmltarget): Likewise.
10881 (x86_linux_process_qsupported): Likewise.
10882 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10883 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10884 init_registers_i386_linux here. Call
10885 x86_linux_update_xmltarget.
10886 (the_low_target): Add x86_linux_process_qsupported.
10887
10888 * server.c (handle_query): Call target_process_qsupported.
10889
10890 * target.h (target_ops): Add process_qsupported.
10891 (target_process_qsupported): New.
10892
fc7238bb
PA
108932010-04-03 Pedro Alves <pedro@codesourcery.com>
10894
10895 * inferiors.c (add_thread): Set last_status kind to
10896 TARGET_WAITKIND_IGNORE.
10897 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10898 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10899 (linux_wait_1): Move `thread' local definition to block that uses
10900 it. Don't NULL initialize `event_child'.
10901 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10902 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10903 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10904
bdabb078
PA
109052010-04-01 Pedro Alves <pedro@codesourcery.com>
10906
10907 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10908 an extended waitstatus, or by a watchpoint.
10909 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10910 thread was stepping or has been stopped by a watchpoint.
10911
d3bbe7a0
PA
109122010-04-01 Pedro Alves <pedro@codesourcery.com>
10913
10914 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10915 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10916 of another, then delete the previous, and validate all
10917 breakpoints.
10918 (validate_inserted_breakpoint): New.
10919 (delete_disabled_breakpoints): New.
10920 (validate_breakpoints): New.
10921 (check_mem_read): Validate breakpoints before trusting their
10922 shadow. Delete disabled breakpoints.
10923 (check_mem_write): Validate breakpoints before trusting they
10924 should be inserted. Delete disabled breakpoints.
10925 * mem-break.h (validate_breakpoints):
10926 * server.c (handle_query): Validate breakpoints when we see a
10927 qSymbol query.
10928
8b07ae33
PA
109292010-04-01 Pedro Alves <pedro@codesourcery.com>
10930
10931 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10932 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10933 if we could tell there's a GDB breakpoint at stop_pc.
10934 (need_step_over_p): Don't do a step over if we find a GDB
10935 breakpoint at the resume PC.
10936
10937 * mem-break.c (struct raw_breakpoint): New.
10938 (enum bkpt_type): New type `gdb_breakpoint'.
10939 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10940 fields. New field `raw'.
10941 (find_raw_breakpoint_at): New.
10942 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10943 breakpoint instead.
10944 (set_breakpoint_at): Adjust.
10945 (delete_raw_breakpoint): New.
10946 (release_breakpoint): New.
10947 (delete_breakpoint): Rename to...
10948 (delete_breakpoint_1): ... this. Add proc parameter. Use
10949 release_breakpoint. Return ENOENT.
10950 (delete_breakpoint): Reimplement.
10951 (find_breakpoint_at): Delete.
10952 (find_gdb_breakpoint_at): New.
10953 (delete_breakpoint_at): Delete.
10954 (set_gdb_breakpoint_at): New.
10955 (delete_gdb_breakpoint_at): New.
10956 (gdb_breakpoint_here): New.
10957 (set_reinsert_breakpoint): Use release_breakpoint.
10958 (uninsert_breakpoint): Rename to ...
10959 (uninsert_raw_breakpoint): ... this.
10960 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10961 (reinsert_raw_breakpoint): Change parameter type to
10962 raw_breakpoint.
10963 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10964 instead.
10965 (check_breakpoints): Adjust. Use release_breakpoint.
10966 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10967 (breakpoint_inserted_here): Ditto.
10968 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10969 Don't trust the breakpoint's shadow if it is not inserted.
10970 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10971 (delete_all_breakpoints): Adjust.
10972 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10973 use delete_breakpoint_1.
10974
10975 * mem-break.h (breakpoints_supported): Delete declaration.
10976 (set_gdb_breakpoint_at): Declare.
10977 (gdb_breakpoint_here): Declare.
10978 (delete_breakpoint_at): Delete.
10979 (delete_gdb_breakpoint_at): Declare.
10980
10981 * server.h (struct raw_breakpoint): Forward declare.
10982 (struct process_info): New field `raw_breakpoints'.
10983
10984 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10985 breakpoints.
10986
6bf5e0ba
PA
109872010-03-24 Pedro Alves <pedro@codesourcery.com>
10988
10989 * linux-low.c (status_pending_p_callback): Fix comment.
10990 (linux_wait_for_event_1): Move most of the internal breakpoint
10991 handling from here...
10992 (linux_wait_1): ... to here.
10993 (count_events_callback): New.
10994 (select_singlestep_lwp_callback): New.
10995 (select_event_lwp_callback): New.
10996 (cancel_breakpoints_callback): New.
10997 (select_event_lwp): New.
10998 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10999 priority to all LWPs that have had events that should be reported
11000 to the client. Cancel breakpoints when about to reporting the
11001 event to the client, not while stopping lwps. No longer cancel
11002 finished single-steps here.
11003 (cancel_finished_single_step): Delete.
11004 (cancel_finished_single_steps): Delete.
11005
414a389f
PA
110062010-03-24 Pedro Alves <pedro@codesourcery.com>
11007
11008 * mem-break.c (enum bkpt_type): New.
11009 (struct breakpoint): New field `type'.
11010 (set_breakpoint_at): Change return type to struct breakpoint
11011 pointer. Set type to `other_breakpoint' by default.
11012 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11013 in the breakpoint list.
11014 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11015 (reinsert_breakpoint): Rename to ...
11016 (reinsert_raw_breakpoint): ... this.
11017 (reinsert_breakpoints_at): Adjust.
11018 * mem-break.h (struct breakpoint): Declare.
11019 (set_breakpoint_at): Change return type to struct breakpoint
11020 pointer.
11021
2280c721
PA
110222010-03-24 Pedro Alves <pedro@codesourcery.com>
11023
11024 * server.c (handle_query): Assign, not compare.
11025
d50171e4
PA
110262010-03-24 Pedro Alves <pedro@codesourcery.com>
11027
11028 Teach linux gdbserver to step-over-breakpoints.
11029
11030 * linux-low.c (can_hardware_single_step): New.
11031 (supports_breakpoints): New.
11032 (handle_extended_wait): If stopping threads, read the stop pc of
11033 the new cloned LWP.
11034 (get_pc): New.
11035 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11036 low target doesn't support retrieving the PC.
11037 (add_lwp): Set last_resume_kind to resume_continue.
11038 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11039 (linux_attach): Don't clear stop_expected. Set the lwp's
11040 last_resume_kind to resume_stop.
11041 (linux_detach_one_lwp): Don't check for removed breakpoints.
11042 (check_removed_breakpoint): Delete.
11043 (status_pending_p): Rename to ...
11044 (status_pending_p_callback): ... this. Don't check for removed
11045 breakpoints. Don't consider threads that are stopped from GDB's
11046 perspective.
11047 (linux_wait_for_lwp): Always read the stop_pc here.
11048 (cancel_breakpoint): New.
11049 (step_over_bkpt): New global.
11050 (linux_wait_for_event_1): Implement stepping over breakpoints.
11051 (gdb_wants_lwp_stopped): New.
11052 (gdb_wants_all_stopped): New.
11053 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11054 single-step traps here. Store the thread's last reported target
11055 wait status.
11056 (send_sigstop): Don't clear stop_expected. Always set it,
11057 instead.
11058 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11059 (cancel_finished_single_step): New.
11060 (cancel_finished_single_steps): New.
11061 (wait_for_sigstop): Don't cancel finished single-step traps here.
11062 (linux_resume_one_lwp): Don't check for removed breakpoints.
11063 Don't set `step' on non-hardware step archs.
11064 (linux_set_resume_request): Ignore resume_stop requests if already
11065 stopping or stopped. Set the lwp's last_resume_kind.
11066 (resume_status_pending_p): Don't check for removed breakpoints.
11067 (need_step_over_p): New.
11068 (start_step_over): New.
11069 (finish_step_over): New.
11070 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11071 requests. Clear the thread's last reported target waitstatus.
11072 Don't use the `suspended' flag. Don't consider pending breakpoints.
11073 (linux_resume): Start a step-over if necessary.
11074 (proceed_one_lwp): New.
11075 (proceed_all_lwps): New.
11076 (unstop_all_lwps): New.
11077 * linux-low.h (struct lwp_info): Rewrite comment for the
11078 `suspended' flag. Add the `stop_pc' field. Delete the
11079 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11080 Add `'last_resume_kind' and `need_step_over' fields.
11081 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11082 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11083 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11084 (set_raw_breakpoint_at): New.
11085 (set_breakpoint_at): Rewrite to use it.
11086 (reinsert_breakpoint_handler): Delete.
11087 (set_reinsert_breakpoint): New.
11088 (reinsert_breakpoint_by_bp): Delete.
11089 (delete_reinsert_breakpoints): New.
11090 (uninsert_breakpoint): Rewrite.
11091 (uninsert_breakpoints_at): New.
11092 (reinsert_breakpoint): Rewrite.
11093 (reinsert_breakpoints_at): New.
11094 (check_breakpoints): Rewrite.
11095 (breakpoint_here): New.
11096 (breakpoint_inserted_here): New.
11097 (check_mem_read): Adjust.
11098 * mem-break.h (breakpoints_supported, breakpoint_here)
11099 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11100 (reinsert_breakpoint_by_bp): Delete declaration.
11101 (delete_reinsert_breakpoints): Declare.
11102 (reinsert_breakpoint): Delete declaration.
11103 (reinsert_breakpoints_at): Declare.
11104 (uninsert_breakpoint): Delete declaration.
11105 (uninsert_breakpoints_at): Declare.
11106 (check_breakpoints): Adjust prototype.
11107 * server.h: Adjust include order.
11108 (struct thread_info): Declare here. Add a `last_status' field.
11109
30ba68cb
MS
111102010-03-23 Michael Snyder <msnyder@vmware.com>
11111
11112 * server.c (crc32): New function.
11113 (handle_query): Add handling for 'qCRC:' request.
11114
b9a881c2
PA
111152010-03-23 Pedro Alves <pedro@codesourcery.com>
11116
11117 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11118 lwp had been stopped by a watchpoint.
11119
e92d13d5
PA
111202010-03-16 Pedro Alves <pedro@codesourcery.com>
11121
11122 * server.h (internal_error): Declare.
11123 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11124 * utils.c (internal_error): New function.
11125
64daa791
AS
111262010-03-15 Andreas Schwab <schwab@redhat.com>
11127
11128 * configure.srv: Fix typo setting srv_regobj.
11129
f52cd8cd
PA
111302010-03-15 Pedro Alves <pedro@codesourcery.com>
11131
11132 * linux-low.c (fetch_register): Avoid passing a non string literal
11133 format to `error'.
11134 (usr_store_inferior_registers): Ditto.
11135
93ae6fdc
PA
111362010-03-14 Pedro Alves <pedro@codesourcery.com>
11137
11138 * linux-low.c (linux_write_memory): Bail out early if peeking
11139 memory failed.
11140
c3adc08c
PA
111412010-03-14 Pedro Alves <pedro@codesourcery.com>
11142
11143 * linux-low.h (struct lwp_info): New fields
11144 `stopped_by_watchpoint' and `stopped_data_address'.
11145 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11146 here, and cache them in the lwp object.
11147 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11148 directly.
11149 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11150 field.
11151 (linux_stopped_by_watchpoint): Rewrite.
11152 (linux_stopped_data_address): Rewrite.
11153
bce522a2
PA
111542010-03-06 Simo Melenius <simo.melenius@iki.fi>
11155
11156 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11157 switching the current inferior, not before.
11158
90884b2b
L
111592010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11160
11161 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11162 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11163 i386-linux.c and amd64-linux.c.
11164 (reg-i386.o): Removed.
11165 (reg-i386.c): Likewise.
11166 (reg-i386-linux.o): Likewise.
11167 (reg-i386-linux.c): Likewise.
11168 (reg-x86-64.o): Likewise.
11169 (reg-x86-64.c): Likewise.
11170 (reg-x86-64-linux.o): Likewise.
11171 (reg-x86-64-linux.c): Likewise.
11172 (i386.o): New.
11173 (i386.c): Likewise.
11174 (i386-linux.o): Likewise.
11175 (i386-linux.c): Likewise.
11176 (amd64.o): Likewise.
11177 (amd64.c): Likewise.
11178 (amd64-linux.o): Likewise.
11179 (amd64-linux.c): Likewise.
11180
11181 * configure.srv (srv_i386_regobj): New.
11182 (srv_i386_linux_regobj): Likewise.
11183 (srv_amd64_regobj): Likewise.
11184 (srv_amd64_linux_regobj): Likewise.
11185 (srv_i386_32bit_xmlfiles): Likewise.
11186 (srv_i386_64bit_xmlfiles): Likewise.
11187 (srv_i386_xmlfiles): Likewise.
11188 (srv_amd64_xmlfiles): Likewise.
11189 (srv_i386_linux_xmlfiles): Likewise.
11190 (srv_amd64_linux_xmlfiles): Likewise.
11191 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11192 srv_xmlfiles to $srv_i386_xmlfiles.
11193 (i[34567]86-*-mingw32ce*): Likewise.
11194 (i[34567]86-*-mingw*): Likewise.
11195 (i[34567]86-*-nto*): Likewise.
11196 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11197 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11198 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11199 (x86_64-*-linux*): Likewise.
11200
11201 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11202 (init_registers_amd64_linux): New.
11203 (x86_arch_setup): Replace init_registers_x86_64_linux with
11204 init_registers_amd64_linux.
11205
193f13e6
MK
112062010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11207
11208 * configure.ac: Check for libdl. If it is not available link against
11209 static libthread_db.
11210 * configure: Regenerate.
11211
85d721b8
PA
112122010-02-22 Pedro Alves <pedro@codesourcery.com>
11213
11214 PR9605
11215
11216 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11217 handing a read watchpoint.
11218 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11219
6076632b
DE
112202010-02-12 Doug Evans <dje@google.com>
11221
11222 * linux-low.c (linux_supports_tracefork_flag): Document.
11223 (linux_look_up_symbols): Add comment.
11224
3327ccf7
L
112252010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11226
11227 * regcache.c (supply_register): Clear regcache if buf is NULL.
11228
0718675c 112292010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11230 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11231
11232 * inferiors.c (find_inferior): Add function documentation.
11233 (unloaded_dll): Handle the case where the unloaded dll has not
11234 been previously registered in the dll list.
11235
177321bd
DJ
112362010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11237
11238 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11239 (thumb2_breakpoint): New.
11240 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11241
2b009048
DJ
112422010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11243
11244 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11245 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11246 breakpoints.
11247
3be029c7
PA
112482010-01-21 Pedro Alves <pedro@codesourcery.com>
11249
11250 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11251
18f5de3b
JK
112522010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11253
11254 * linux-s390-low.c (s390_collect_ptrace_register)
11255 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11256
3743bb4f
DE
112572010-01-21 Doug Evans <dje@google.com>
11258
14ce3065
DE
11259 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11260 (PTRACE_ARG4_TYPE): New macro.
11261 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11262 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11263 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11264 (usr_store_inferior_registers): Ditto.
11265 (linux_read_memory, linux_write_memory): Ditto.
11266 (linux_test_for_tracefork): Ditto.
11267
3743bb4f
DE
11268 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11269 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11270
8b315be5
PA
112712010-01-21 Pedro Alves <pedro@codesourcery.com>
11272
11273 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11274 target.
11275
85492558
PA
112762010-01-21 Pedro Alves <pedro@codesourcery.com>
11277
11278 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11279 prototype to take a regcache. Adjust.
11280
442ea881
PA
112812010-01-20 Pedro Alves <pedro@codesourcery.com>
11282
11283 * regcache.h (struct thread_info): Forward declare.
11284 (struct regcache): New.
11285 (new_register_cache): Adjust prototype.
11286 (get_thread_regcache): Declare.
11287 (free_register_cache): Adjust prototype.
11288 (registers_to_string, registers_from_string): Ditto.
11289 (supply_register, supply_register_by_name, collect_register)
11290 (collect_register_as_string, collect_register_by_name): Ditto.
11291 * regcache.c (struct inferior_regcache_data): Delete.
11292 (get_regcache): Rename to ...
11293 (get_thread_regcache): ... this. Adjust. Switch inferior before
11294 fetching registers.
11295 (regcache_invalidate_one): Adjust.
11296 (regcache_invalidate): Fix prototype.
11297 (new_register_cache): Return the new register cache.
11298 (free_register_cache): Change prototype.
11299 (realloc_register_cache): Adjust.
11300 (registers_to_string): Change prototype to take a regcache. Adjust.
11301 (registers_from_string): Ditto.
11302 (register_data): Ditto.
11303 (supply_register): Ditto.
11304 (supply_register_by_name): Ditto.
11305 (collect_register): Ditto.
11306 (collect_register_as_string): Ditto.
11307 (collect_register_by_name): Ditto.
11308 * server.c (process_serial_event): Adjust.
11309 * linux-low.h (regset_fill_func, regset_store_func): Change
11310 prototype.
11311 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11312 Change prototype.
11313 * linux-low.c (get_stop_pc): Adjust.
11314 (check_removed_breakpoint): Adjust.
11315 (linux_wait_for_event): Adjust.
11316 (linux_resume_one_lwp): Adjust.
11317 (fetch_register): Add regcache parameter. Adjust.
11318 (usr_store_inferior_registers): Ditto.
11319 (regsets_fetch_inferior_registers): Ditto.
11320 (regsets_store_inferior_registers): Ditto.
11321 (linux_fetch_registers, linux_store_registers): Ditto.
11322 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11323 regcache. Adjust.
43aaf8b6
PA
11324 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11325 Ditto.
442ea881
PA
11326 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11327 prototype to take a regcache.
11328 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11329 * remote-utils.c (convert_ascii_to_int, outreg)
11330 (prepare_resume_reply): Change prototype to take a regcache.
11331 Adjust.
11332 * target.h (struct target_ops) <fetch_registers, store_registers>:
11333 Change prototype to take a regcache.
11334 (fetch_inferior_registers, store_inferior_registers): Change
11335 prototype to take a regcache. Adjust.
11336 * proc-service.c (ps_lgetregs): Adjust.
11337 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11338 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11339 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11340 take a regcache. Adjust.
11341 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11342 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11343 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11344 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11345 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11346 (cris_cannot_fetch_register):
11347 (cris_breakpoint_at): Change prototype to take a regcache.
11348 Adjust.
11349 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11350 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11351 to take a regcache. Adjust.
11352 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11353 Adjust.
11354 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11355 take a regcache. Adjust.
11356 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11357 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11358 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11359 * linux-mips-low.c (mips_get_pc):
11360 (mips_set_pc): Change prototype to take a regcache. Adjust.
11361 (mips_reinsert_addr): Adjust.
11362 (mips_collect_register): Change prototype to take a regcache.
11363 Adjust.
11364 (mips_supply_register):
11365 (mips_collect_register_32bit, mips_supply_register_32bit)
11366 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11367 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11368 * linux-ppc-low.c (ppc_supply_ptrace_register)
11369 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11370 (parse_spufs_run): Adjust.
11371 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11372 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11373 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11374 take a regcache. Adjust.
11375 * linux-s390-low.c (s390_collect_ptrace_register)
11376 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11377 (s390_set_pc): Change prototype to take a regcache. Adjust.
11378 (s390_arch_setup): Adjust.
11379 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11380 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11381 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11382 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11383 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11384 regcache. Adjust.
11385 (sparc_breakpoint_at): Adjust.
11386 * linux-xtensa-low.c (xtensa_fill_gregset):
11387 (xtensa_store_gregset):
11388 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11389 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11390 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11391 prototype to take a regcache. Adjust.
11392 * win32-arm-low.c (arm_fetch_inferior_register)
11393 (arm_store_inferior_register): Change prototype to take a
11394 regcache. Adjust.
11395 * win32-i386-low.c (i386_fetch_inferior_register)
11396 (i386_store_inferior_register): Change prototype to take a
11397 regcache. Adjust.
11398 * win32-low.c (child_fetch_inferior_registers)
11399 (child_store_inferior_registers): Change prototype to take a
11400 regcache. Adjust.
11401 (win32_wait): Adjust.
11402 (win32_fetch_inferior_registers): Change prototype to take a
11403 regcache. Adjust.
11404 (win32_store_inferior_registers): Adjust.
11405 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11406 store_inferior_register>: Change prototype to take a regcache.
11407
60c3d7b0
DE
114082010-01-20 Doug Evans <dje@google.com>
11409
11410 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11411 #ifdef.
11412 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11413 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11414
dc146f7c
VP
114152010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11416
11417 * linux-low.c (linux_core_of_thread): New.
11418 (compare_ints, show_process, list_threads): New.
11419 (linux_qxfer_osdata): Report threads and cores.
11420 (linux_target_op): Register linux_core_of_thread.
11421 * remote-utils.c (prepare_resume_reply): Report the core.
11422 (buffer_xml_printf): Support %d specifier.
11423 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11424 New.
11425 (handle_query): Handle qXfer:threads. Announce availability
11426 thereof.
11427 * target.h (struct target_ops): New field core_of_thread.
11428
7803799a
UW
114292010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11430
11431 * Makefile.in (clean): Remove new generated files.
11432 (reg-s390.o, reg-s390.c): Remove rules.
11433 (reg-s390x.o, reg-s390x.c): Likewise.
11434 (s390-linux32.o, s390-linux32.c): Add rules.
11435 (s390-linux64.o, s390-linux64.c): Likewise.
11436 (s390x-linux64.o, s390x-linux64.c): Likewise.
11437 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11438 * linux-s390-low.c: Include <elf.h>.
11439 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11440 (init_registers_s390): Remove prototype.
11441 (init_registers_s390x): Likewise.
11442 (init_registers_s390_linux32): Add prototype.
11443 (init_registers_s390_linux64): Likewise.
11444 (init_registers_s390x_linux64): Likewise.
11445 (s390_num_regs_3264): New define.
11446 (s390_regmap_3264): New global variable.
11447 (s390_cannot_fetch_register): Remove obsolete check.
11448 (s390_cannot_store_register): Likewise.
11449 (s390_collect_ptrace_register): Handle upper/lower register halves.
11450 (s390_supply_ptrace_register): Likewise.
11451 (s390_fill_gregset): Update to register number changes.
11452 (s390_get_hwcap): New routine.
11453 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11454 Install appropriate regmap and register set.
11455
6e7ffa39
JB
114562010-01-01 Joel Brobecker <brobecker@adacore.com>
11457
11458 * server.c (gdbserver_version): Update copyright year to 2010.
11459 * gdbreplay.c (gdbreplay_version): Likewise.
11460
957f3f49
DE
114612009-12-28 Doug Evans <dje@google.com>
11462
11463 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11464 elf/external.h. Include <elf.h> instead but only if necessary.
11465
ca5c370d
PA
114662009-12-28 Pedro Alves <pedro@codesourcery.com>
11467
11468 * linux-low.c (linux_remove_process): Remove `detaching'
11469 parameter. Don't release/detach from thread_db here.
11470 (linux_kill): Release/detach from thread_db here, ...
11471 (linux_detach): ... and here, before actually detaching.
11472 (linux_wait_1): ... and here, when a process exits.
11473 * thread-db.c (any_thread_of): New.
11474 (thread_db_free): Switch the current inferior to a thread of the
11475 passed in process.
11476
4ee62156
DE
114772009-12-21 Doug Evans <dje@google.com>
11478
d90e6a88
DE
11479 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11480
c5f62d5f
DE
11481 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11482 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11483 warning ifndef __NR_tkill. Move setting of errno there too.
11484 Delete unnecessary resetting of errno after syscall.
11485 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11486
10e86dd7
DE
11487 * configure.ac: Check for dladdr.
11488 * config.in: Regenerate.
11489 * configure: Regenerate.
11490 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11491 (try_thread_db_load): Update.
11492
4ee62156
DE
11493 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11494
00f515da
DE
114952009-12-18 Doug Evans <dje@google.com>
11496
e9464885
DE
11497 * event-loop.c: Include unistd.h if it exists.
11498
07d4f67e
DE
11499 * linux-low.c (my_waitpid): Move definition away from being in
11500 between linux_tracefork_child/linux_test_for_tracefork.
11501
00f515da
DE
11502 * gdb_proc_service.h (psaddr_t): Fix type.
11503 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11504 signature to match glibc.
11505
1de1badb
DE
115062009-12-16 Doug Evans <dje@google.com>
11507
11508 * linux-low.c (linux_read_memory): Fix argument to read.
11509
aeeb81d1
PA
115102009-11-26 Pedro Alves <pedro@codesourcery.com>
11511
11512 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11513 events, don't leave current_inferior pointing at null.
11514
10357975
PA
115152009-11-26 Pedro Alves <pedro@codesourcery.com>
11516
11517 * win32-low.c (LOG): Delete.
11518 (OUTMSG): Output to stderr.
11519 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11520 on compile time LOG macro.
11521 (win32_wait): Fix debug output.
11522
cf6e3471
PA
115232009-11-26 Pedro Alves <pedro@codesourcery.com>
11524
11525 * win32-low.c (win32_add_one_solib): If the dll name is
11526 "ntdll.dll", prepend the system directory to the dll path.
11527
0c85e18e
MK
115282009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11529
11530 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11531
9ac544ce 115322009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11533 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11534
11535 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11536 * configure.ac: Check for __mcoldfire__ and set
11537 gdb_cv_m68k_is_coldfire.
11538 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11539 reg-cf.o and reg-m68k.o.
11540 * configure: Regenerated.
11541
fd7dd3e6
PA
115422009-11-16 Pedro Alves <pedro@codesourcery.com>
11543
11544 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11545 Pass it to thread_db_free.
11546 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11547 proper `detaching' argument to linux_remove_process.
11548 * linux-low.h (thread_db_free): Add `detaching' parameter.
11549 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11550 to thread_db_free.
11551 (thread_db_free): Add `detaching' parameter. Only
11552 call td_ta_clear_event if detaching from process.
11553
75aa492e
MK
115542009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11555
11556 * thread-db.c (thread_db_free): Fix typo.
11557
21e1bee4
PP
115582009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11559
11560 PR gdb/10838
11561 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11562
8838b45e
NS
115632009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11564
11565 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11566 with an i686 compiler.
11567 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11568 needed.
11569 * configure: Rebuilt.
11570
8a35fb51
SL
115712009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11572
11573 PR gdb/10783
11574
11575 * server.c (handle_search_memory_1): Correct read_addr initialization
11576 in loop for searching subsequent chunks.
11577
96f15937
PP
115782009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11579
11580 * configure.ac: New --with-libthread-db option.
11581 * thread-db.c: Allow direct dependence on libthread_db.
11582 (thread_db_free): Adjust.
11583 * config.in: Regenerate.
11584 * configure: Likewise.
889bf7c5 11585
5f7d1694
PP
115862009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11587
11588 PR gdb/10757
11589 * thread-db.c (attach_thread): New function.
11590 (maybe_attach_thread): Return success/failure.
11591 (find_new_threads_callback): Adjust.
889bf7c5
PA
11592 (thread_db_find_new_threads): Loop until no new threads.
11593
88e3b899
PA
115942009-10-13 Pedro Alves <pedro@codesourcery.com>
11595
11596 * proc-service.c (ps_lgetregs): Formatting.
11597
cdbfd419
PP
115982009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11599
11600 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11601 * configure.ac: Adjust.
11602 * linux-low.h (struct process_info_private): Move members to struct
11603 thread_db.
11604 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11605 * linux-low.c (linux_remove_process): Adjust.
11606 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11607 * server.c (handle_query): Move code ...
11608 (handle_monitor_command): ... here. New function.
11609 * target.h (struct target_ops): New member.
11610 * thread-db.c (struct thread_db): New.
11611 (libthread_db_search_path): New variable.
11612 (thread_db_create_event, thread_db_enable_reporting)
11613 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11614 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11615 (try_thread_db_load_1, dladdr_to_soname): New functions.
11616 (try_thread_db_load, thread_db_load_search): New functions.
11617 (thread_db_init): Search for libthread_db.
11618 (thread_db_free): New function.
11619 (thread_db_handle_monitor_command): Likewise.
11620 * config.in: Regenerate.
11621 * configure: Regenerate.
889bf7c5 11622
4168d2d6
UW
116232009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11624
11625 * spu-low.c (spu_kill): Wait for inferior to terminate.
11626 Call clear_inferiors.
11627 (spu_detach): Call clear_inferiors.
11628
81ecdfbb
RW
116292009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11630
11631 * aclocal.m4: Regenerate.
11632 * config.in: Likewise.
11633 * configure: Likewise.
11634
0b9ff2c0
UW
116352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11636
11637 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11638 (parse_spufs_run): New function.
11639 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11640 (ppc_breakpoint_at): Handle SPU breakpoints.
11641
efcbbd14
UW
116422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11643
11644 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11645 (SPUFS_MAGIC): Define.
11646 (spu_enumerate_spu_ids): New function.
11647 (linux_qxfer_spu): New function.
11648 (linux_target_ops): Install linux_qxfer_spu.
11649
f4d9bade
UW
116502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11651
11652 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11653 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11654 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11655 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11656 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11657 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11658 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11659 (init_registers_powerpc_cell32l): Add prototype.
11660 (init_registers_powerpc_cell64l): Likewise.
11661 (ppc_arch_setup): Detect Cell/B.E. architecture.
11662
96e946ca
RW
116632009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11664
11665 * Makefile.in (datarootdir): New variable.
11666
58d6951d
DJ
116672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11668
11669 * linux-low.c (linux_write_memory): Update debugging output.
11670 * Makefile.in (clean): Add new descriptions.
11671 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11672 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11673 * configure.srv: Add new files for arm*-*-linux*.
11674 * linux-arm-low.c: Add new declarations.
11675 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11676 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11677 (HWCAP_VFPv3D16): New.
11678 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11679 instead of __IWMMXT__.
11680 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11681 (arm_arch_setup): New.
11682 (target_regsets): Remove #ifdef. Add VFP regset.
11683 (the_low_target): Use arm_arch_setup.
11684
12b42a12
DJ
116852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11686
11687 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11688 the main thread again.
11689
ac8c974e
AR
116902009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11691
11692 Adding Neutrino gdbserver.
11693 * configure: Regenerated.
11694 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11695 * configure.srv (i[34567]86-*-nto*): New target.
11696 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11697 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11698 (nto_comctrl) [__QNX__]: New function.
11699 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11700
4424e0c3 117012009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11702
11703 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11704 srv_tgtobj.
11705
912cf4ba
PA
117062009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11707 Pedro Alves <pedro@codesourcery.com>
11708
11709 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11710 don't support CONTEXT_EXTENDED_REGISTERS.
11711 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11712 (the_low_target): Install them.
11713 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11714 failing with ERROR_PIPE_NOT_CONNECTED.
11715
aa5ca48f
DE
117162009-06-30 Doug Evans <dje@google.com>
11717 Pierre Muller <muller@ics.u-strasbg.fr>
11718
11719 Add h/w watchpoint support to x86-linux, win32-i386.
11720 * Makefile.in (SFILES): Add i386-low.c
11721 (i386_low_h): Define.
11722 (i386-low.o): Add dependencies.
11723 (linux-x86-low.o): Add i386-low.h dependency.
11724 (win32-i386-low.o): Ditto.
11725 * i386-low.c: New file.
11726 * i386-low.h: New file.
11727 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11728 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11729 * linux-low.c (linux_add_process): Initialize arch_private.
11730 (linux_remove_process): Free arch_private.
11731 (add_lwp): Initialize arch_private.
11732 (delete_lwp): Free arch_private.
11733 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11734 provided.
11735 * linux-low.h (process_info_private): New member arch_private.
11736 (lwp_info): New member arch_private.
11737 (linux_target_ops): New members new_process, new_thread,
11738 prepare_to_resume.
11739 (ptid_of): New macro.
11740 * linux-x86-low.c: Include stddef.h, i386-low.h.
11741 (arch_process_info): New struct.
11742 (arch_lwp_info): New struct.
11743 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11744 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11745 (i386_dr_low_get_status): New function.
11746 (x86_insert_point, x86_remove_point): New functions.
11747 (x86_stopped_by_watchpoint): New function.
11748 (x86_stopped_data_address): New function.
11749 (x86_linux_new_process, x86_linux_new_thread): New functions.
11750 (x86_linux_prepare_to_resume): New function.
11751 (the_low_target): Add entries for insert_point, remove_point,
11752 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11753 prepare_to_resume.
11754 * server.c (debug_hw_points): New global.
11755 (monitor_show_help): Document set debug-hw-points.
11756 (handle_query): Process "set debug-hw-points".
11757 * server.h (debug_hw_points): Declare.
11758 (paddress): Declare.
11759 * utils.c (NUMCELLS, CELLSIZE): New macros.
11760 (get_sell, xsnprintf, paddress): New functions.
11761 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11762 remove_point, stopped_by_watchpoint, stopped_data_address.
11763 * win32-i386-low.c: Include i386-low.h.
11764 (debug_reg_state): Replaces dr.
11765 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11766 (i386_dr_low_get_status): New function.
11767 (i386_insert_point, i386_remove_point): New functions.
11768 (i386_stopped_by_watchpoint): New function.
11769 (i386_stopped_data_address): New function.
11770 (i386_initial_stuff): Update.
11771 (get_thread_context,set_thread_context,i386_thread_added): Update.
11772 (the_low_target): Add entries for insert_point,
11773 remove_point, stopped_by_watchpoint, stopped_data_address.
11774 * win32-low.c (win32_insert_watchpoint): New function.
11775 (win32_remove_watchpoint): New function.
11776 (win32_stopped_by_watchpoint): New function.
11777 (win32_stopped_data_address): New function.
11778 (win32_target_ops): Add entries for insert_watchpoint,
11779 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11780 * win32-low.h (win32_target_ops): New members insert_point,
11781 remove_point, stopped_by_watchpoint, stopped_data_address.
11782
d993e290
PA
117832009-06-25 Pedro Alves <pedro@codesourcery.com>
11784
11785 * server.c (process_serial_event): Re-return unsupported, not
11786 error, if the type isn't recognized. Re-allow supporting only
11787 insert or remove packets. Also call require_running for
11788 breakpoints. Add missing break statement to default case. Tidy.
11789 * target.h (struct target_ops): Rename insert_watchpoint to
11790 insert_point, and remove_watchpoint to remove_point.
11791
11792 * linux-low.h (struct linux_target_ops): Likewise.
11793 * linux-low.c (linux_insert_watchpoint): Rename to ...
11794 (linux_insert_point): ... this. Adjust.
11795 (linux_remove_watchpoint): Rename to ...
11796 (linux_remove_point): ... this. Adjust.
11797 (linux_target_ops): Adjust.
11798 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11799 (cris_insert_point): ... this.
11800 (cris_remove_watchpoint): Rename to ...
11801 (cris_remove_point): ... this.
11802 (the_low_target): Adjust.
11803
0f54c268
PM
118042009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11805
11806 * server.c (handle_v_kill): Pass signal_pid to
11807 kill_inferior if multi_process is zero.
11808
c6314022
AR
118092009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11810
11811 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11812 * target.h (target_ops): Comment for *_watchpoint to make it clear
11813 the functions can get types '0' and '1'.
11814
4463ce24
AR
118152009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11816
11817 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11818 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11819 * regcache.c (get_regcache): Likewise.
11820 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11821 * win32-low.c (child_fetch_inferior_registers): Remove check for
11822 regno 0.
11823
cf8fd78b
PA
118242009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11825 Pedro Alves <pedro@codesourcery.com>
11826
11827 * target.h (struct target_ops) <supports_multi_process>: New
11828 callback.
11829 (target_supports_multi_process): New.
11830 * server.c (handle_query): Even if GDB reports support, only
11831 enable multi-process if the target also supports it. Report
11832 multi-process support only if the target backend supports it.
11833 * linux-low.c (linux_supports_multi_process): New function.
11834 (linux_target_ops): Install it as target_supports_multi_process
11835 callback.
11836
47c0c975
DE
118372009-05-24 Doug Evans <dje@google.com>
11838
e09875d4
DE
11839 Global renaming of find_thread_pid to find_thread_ptid.
11840 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11841 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11842 All callers updated.
11843
e27d73f6
DE
11844 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11845 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11846 directly.
11847
47c0c975
DE
11848 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11849 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11850 (linux_resume_one_lwp): Ditto.
11851
2acc282a
DE
118522009-05-23 Doug Evans <dje@google.com>
11853
11854 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11855 from struct inferior_list_entry * to struct lwp_info *.
11856 All callers updated.
11857
9f1036c1
DE
118582009-05-13 Doug Evans <dje@google.com>
11859
11860 * linux-x86-low.c: Don't include assert.h.
11861 (x86_siginfo_fixup): Use fatal, not assert.
11862 (x86_arch_setup): Fix comment.
11863
d0722149
DE
118642009-05-12 Doug Evans <dje@google.com>
11865
11866 Biarch support for i386/amd64 gdbserver.
11867 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11868 Add linux-x86-low.c.
11869 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11870 (linux-x86-low.o): Add.
11871 * linux-x86-64-low.c: Delete.
11872 * linux-i386-low.c: Delete.
11873 * linux-x86-low.c: New file.
11874 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11875 linux-x86-low.o.
11876 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11877 linux-x86-low.o.
11878 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11879 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11880 (linux_child_pid_to_exec_file): New function.
11881 (elf_64_header_p, elf_64_file_p): New functions.
11882 (siginfo_fixup): New function.
11883 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11884 give target a chance to convert layout.
11885 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11886 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11887
fdeb2a12
DE
118882009-05-07 Doug Evans <dje@google.com>
11889
11890 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11891 (regsets_store_inferior_registers): Ditto.
11892
a6dbe5df
PA
118932009-05-06 Pedro Alves <pedro@codesourcery.com>
11894
11895 PR server/10048
11896
11897 * linux-low.c (must_set_ptrace_flags): Delete.
11898 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11899 of the global.
11900 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11901 `lwp->must_set_ptrace_flags' instead.
ba42693b 11902 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11903 (linux_wait_1): ... not here.
11904
5091eb23
DE
119052009-04-30 Doug Evans <dje@google.com>
11906
9f767825
DE
11907 * inferiors.c (started_inferior_callback): New function.
11908 (attached_inferior_callback): New function.
11909 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11910 * server.c (print_started_pid, print_attached_pid): New functions.
11911 (detach_or_kill_for_exit): New function.
11912 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11913 * server.h (have_started_inferiors_p): Declare.
11914 (have_attached_inferiors_p): Declare.
11915
5091eb23
DE
11916 * inferiors.c (remove_process): Fix memory leak, free process.
11917 * linux-low.c (linux_remove_process): New function.
11918 (linux_kill): Call it instead of remove_process.
11919 (linux_detach, linux_wait_1): Ditto.
11920
155c8968
PA
119212009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11922
11923 * configure.srv: Add x86 Windows CE target.
11924
7fe519cb
UW
119252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11926
11927 * inferiors.c (get_thread_process): Make global.
11928 * server.h (get_thread_process): Add prototype.
11929 * thread-db.c (find_one_thread): Use get_thread_process
11930 instead of current_process.
11931 (thread_db_get_tls_address): Do not crash if called when
11932 thread layer is not yet initialized.
11933
5472f405
UW
119342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11935
11936 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11937 * spu-low.c (current_tid): Rename to ...
11938 (current_ptid): ... this.
11939 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11940 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11941 ptid_get_lwp (current_ptid) instead of current_tid.
11942 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11943 instead of current_tid. Use find_process_pid to verify pid
11944 argument is valid. Pass proper argument to remove_process.
11945 (spu_thread_alive): Compare current_ptid instead of current_tid.
11946 (spu_resume): Likewise.
11947
55ac2b99
PA
119482009-04-02 Pedro Alves <pedro@codesourcery.com>
11949
11950 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11951 variable.
11952
95954743
PA
119532009-04-01 Pedro Alves <pedro@codesourcery.com>
11954
11955 Implement the multiprocess extensions, and add linux multiprocess
11956 support.
11957
11958 * server.h (ULONGEST): Declare.
11959 (struct ptid, ptid_t): New.
11960 (minus_one_ptid, null_ptid): Declare.
11961 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11962 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11963 (struct inferior_list_entry): Change `id' type from unsigned from
11964 to ptid_t.
11965 (struct sym_cache, struct breakpoint, struct
11966 process_info_private): Forward declare.
11967 (struct process_info): Declare.
11968 (current_process): Declare.
11969 (all_processes): Declare.
11970 (initialize_inferiors): Declare.
11971 (add_thread): Adjust to use ptid_t.
11972 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11973 (add_process, remove_process, find_thread_pid): Declare.
11974 (find_inferior_id): Adjust to use ptid_t.
11975 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11976 (multi_process): Declare.
11977 (push_event): Adjust to use ptid_t.
11978 (read_ptid, write_ptid): Declare.
11979 (prepare_resume_reply): Adjust to use ptid_t.
11980 (clear_symbol_cache): Declare.
11981 * inferiors.c (all_processes): New.
11982 (null_ptid, minus_one_ptid): New.
11983 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11984 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11985 (add_thread): Change unsigned long to ptid. Remove gdb_id
11986 parameter. Adjust.
11987 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11988 (gdb_id_to_thread): Rename to ...
11989 (find_thread_pid): ... this. Change unsigned long to ptid.
11990 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11991 (loaded_dll, pull_pid_from_list): Adjust.
11992 (add_process, remove_process, find_process_pid)
11993 (get_thread_process, current_process, initialize_inferiors): New.
11994 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11995 (struct target_waitstatus) <related_pid>: Ditto.
11996 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11997 return type to int.
11998 (struct target_ops) <join>: Add `pid' argument.
11999 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12000 (struct target_ops) <wait>: Add `ptid' field. Change return type
12001 to ptid.
12002 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12003 (mywait): Add `ptid' argument. Change return type to ptid_t.
12004 (target_pid_to_str): Declare.
12005 * target.c (set_desired_inferior): Adjust to use ptids.
12006 (mywait): Add new `ptid' argument. Adjust.
12007 (target_pid_to_str): New.
12008 * mem-break.h (free_all_breakpoints): Declare.
12009 * mem-break.c (breakpoints): Delelete.
12010 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12011 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12012 to use per-process breakpoint list.
12013 (free_all_breakpoints): New.
12014 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12015 (symbol_cache, all_symbols_looked_up): Delete.
12016 (hexchars): New.
12017 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12018 read_ptid): New.
12019 (prepare_resume_reply): Change ptid argument's type from unsigned
12020 long to ptid_t. Adjust. Implement W;process and X;process.
12021 (free_sym_cache, clear_symbol_cache): New.
12022 (look_up_one_symbol): Adjust to per-process symbol cache. *
12023 * server.c (cont_thread, general_thread, step_thread): Change type
12024 to ptid_t.
12025 (attached): Delete.
12026 (multi_process): New.
12027 (last_ptid): Change type to ptid_t.
12028 (struct vstop_notif) <ptid>: Change type to ptid_t.
12029 (queue_stop_reply, push_event): Change `ptid' argument's type to
12030 ptid_t.
12031 (discard_queued_stop_replies): Add `pid' argument.
12032 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12033 changes. Don't reference the `attached' global.
12034 (attach_inferior): Adjust to mywait interface changes.
12035 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12036 features. Handle and report "multiprocess+". Handle
12037 "qAttached:PID".
12038 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12039 changes.
12040 (handle_v_kill): New.
12041 (handle_v_stopped): Adjust to use target_pid_to_str.
12042 (handle_v_requests): Allow multiple attaches and runs when
12043 multiprocess extensions are in effect. Handle "vKill".
12044 (myresume): Adjust to use ptids.
12045 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12046 (handle_status): Adjust to discard_queued_stop_replies interface
12047 change.
12048 (first_thread_of, kill_inferior_callback)
12049 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12050 (main): Call initialize_inferiors. Adjust to use ptids, killing
12051 and detaching from all inferiors. Handle multiprocess packet
12052 variants.
12053 * linux-low.h: Include gdb_proc_service.h.
12054 (struct process_info_private): New.
12055 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12056 <lwpid_of>: Use ptid_get_lwp.
12057 (get_lwp_thread): Adjust.
12058 (struct lwp_info): Add `dead' member.
12059 (find_lwp_pid): Declare.
12060 * linux-low.c (thread_db_active): Delete.
12061 (new_inferior): Adjust comment.
12062 (inferior_pid): Delete.
12063 (linux_add_process): New.
12064 (handle_extended_wait): Adjust.
12065 (add_lwp): Change unsigned long to ptid.
12066 (linux_create_inferior): Add process to processes table. Adjust
12067 to use ptids. Don't set new_inferior here.
12068 (linux_attach_lwp): Rename to ...
12069 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12070 it. Adjust to use ptids.
12071 (linux_attach_lwp): New.
12072 (linux_attach): Add process to processes table. Don't set
12073 new_inferior here.
12074 (struct counter): New.
12075 (second_thread_of_pid_p, last_thread_of_process_p): New.
12076 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12077 multiple processes.
12078 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12079 processes. Remove process from process table.
12080 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12081 to multiple processes.
12082 (any_thread_of): New.
12083 (linux_detach): Add `pid' argument, and handle it. Remove process
12084 from processes table.
12085 (linux_join): Add `pid' argument. Handle it.
12086 (linux_thread_alive): Change unsighed long argument to ptid_t.
12087 Consider dead lwps as not being alive.
12088 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12089 threads we're not interested in.
12090 (same_lwp, find_lwp_pid): New.
12091 (linux_wait_for_lwp): Change `pid' argument's type from int to
12092 ptid_t. Adjust.
12093 (linux_wait_for_event): Rename to ...
12094 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12095 from int to ptid_t. Adjust.
12096 (linux_wait_for_event): New.
12097 (linux_wait_1): Add `ptid' argument. Change return type to
12098 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12099 that exit from the process table.
12100 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12101 Adjust.
12102 (mark_lwp_dead): New.
12103 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12104 stopping all threads, mark its main lwp as dead.
12105 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12106 ptids.
12107 (fetch_register, usr_store_inferior_registers)
12108 (regsets_fetch_inferior_registers)
12109 (regsets_store_inferior_registers, linux_read_memory)
12110 (linux_write_memory): Inline `inferior_pid'.
12111 (linux_look_up_symbols): Adjust to use per-process
12112 `thread_db_active'.
12113 (linux_request_interrupt): Adjust to use ptids.
12114 (linux_read_auxv): Inline `inferior_pid'.
12115 (initialize_low): Don't reference thread_db_active.
12116 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12117 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12118 (ps_getpid): Return the pid of the current inferior.
12119 * thread-db.c (proc_handle, thread_agent): Delete.
12120 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12121 per-process data.
12122 (find_one_thread): Change argument type to ptid_t. Adjust to
12123 per-process data.
12124 (maybe_attach_thread): Adjust to per-process data and ptids.
12125 (thread_db_find_new_threads): Ditto.
12126 (thread_db_init): Ditto.
12127 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12128 processes table. Adjust to use ptids.
12129 (spu_kill, spu_detach): Adjust interface. Remove process from
12130 processes table.
12131 (spu_join, spu_thread_alive): Adjust interface.
12132 (spu_wait): Adjust interface. Remove process from processes
12133 table. Adjust to use ptids.
12134 * win32-low.c (current_inferior_tid): Delete.
12135 (current_inferior_ptid): New.
12136 (debug_event_ptid): New.
12137 (thread_rec): Take a ptid. Adjust.
12138 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12139 (child_delete_thread): Ditto.
12140 (do_initial_child_stuff): Add `attached' argument. Add process to
12141 processes table.
12142 (child_fetch_inferior_registers, child_store_inferior_registers):
12143 Adjust.
12144 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12145 (win32_attach): Pass 1 to do_initial_child_stuff.
12146 (win32_kill): Adjust interface. Remove process from processes
12147 table.
12148 (win32_detach): Ditto.
12149 (win32_join): Adjust interface.
12150 (win32_thread_alive): Take a ptid.
12151 (win32_resume): Adjust to use ptids.
12152 (get_child_debug_event): Ditto.
12153 (win32_wait): Adjust interface. Remove exiting process from
12154 processes table.
12155
bd99dc85
PA
121562009-04-01 Pedro Alves <pedro@codesourcery.com>
12157
12158 Non-stop mode support.
12159
12160 * server.h (non_stop): Declare.
12161 (gdb_client_data, handler_func): Declare.
12162 (delete_file_handler, add_file_handler, start_event_loop):
12163 Declare.
12164 (handle_serial_event, handle_target_event, push_event)
12165 (putpkt_notif): Declare.
12166 * target.h (enum resume_kind): New.
12167 (struct thread_resume): Replace `step' field by `kind' field.
12168 (TARGET_WNOHANG): Define.
12169 (struct target_ops) <wait>: Add `options' argument.
12170 <supports_non_stop, async, start_non_stop>: New fields.
12171 (target_supports_non_stop, target_async): New.
12172 (start_non_stop): Declare.
12173 (mywait): Add `options' argument.
12174 * target.c (mywait): Add `options' argument. Print child exit
12175 notifications here.
12176 (start_non_stop): New.
12177 * server.c (non_stop, own_buf, mem_buf): New globals.
12178 (struct vstop_notif): New.
12179 (notif_queue): New global.
12180 (queue_stop_reply, push_event, discard_queued_stop_replies)
12181 (send_next_stop_reply): New.
12182 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12183 interface changes.
12184 (attach_inferior): In non-stop mode, don't wait for the target
12185 here.
12186 (handle_general_set): Handle QNonStop.
12187 (handle_query): When handling qC, return the current general
12188 thread, instead of the first thread of the list.
12189 (handle_query): If the backend supports non-stop mode, include
12190 QNonStop+ in the qSupported query response.
12191 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12192 and non-stop mode.
12193 (handle_v_attach, handle_v_run): Handle non-stop mode.
12194 (handle_v_stopped): New.
12195 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12196 (myresume): Adjust to use resume_kind. Handle non-stop.
12197 (queue_stop_reply_callback): New.
12198 (handle_status): Handle non-stop mode.
12199 (main): Clear non_stop flag on reconnection. Use the event-loop.
12200 Refactor serial protocol handling from here ...
12201 (process_serial_event): ... to this new function. When GDB
12202 selects any thread, select one here. In non-stop mode, wait until
12203 GDB acks all pending events before exiting.
12204 (handle_serial_event, handle_target_event): New.
12205 * remote-utils.c (remote_open): Install remote_desc in the event
12206 loop.
12207 (remote_close): Remove remote_desc from the event loop.
12208 (putpkt_binary): Rename to...
12209 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12210 (putpkt_binary): New as wrapper around putpkt_binary_1.
12211 (putpkt_notif): New.
12212 (prepare_resume_reply): In non-stop mode, don't change the
12213 general_thread.
12214 * event-loop.c: New.
12215 * Makefile.in (OBJ): Add event-loop.o.
12216 (event-loop.o): New rule.
12217
12218 * linux-low.h (pid_of): Moved here.
12219 (lwpid_of): New.
12220 (get_lwp_thread): Use lwpid_of.
12221 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12222 * linux-low.c (pid_of): Delete.
12223 (inferior_pid): Use lwpid_of.
12224 (linux_event_pipe): New.
12225 (target_is_async_p): New.
12226 (delete_lwp): New.
12227 (handle_extended_wait): Use lwpid_of.
12228 (add_lwp): Don't set lwpid field.
12229 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12230 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12231 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12232 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12233 first. Adjust to linux_wait_for_event interface changes. Use
12234 lwpid_of.
12235 (linux_detach): Don't delete the main lwp here.
12236 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12237 (status_pending_p): Don't consider explicitly suspended lwps.
12238 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12239 pointer. Add OPTIONS argument. Change return type to int. Use
12240 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12241 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12242 pointer. Add status pointer argument. Return a pid instead of a
12243 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12244 changes. In non-stop mode, don't switch to a random thread.
12245 (linux_wait): Rename to...
12246 (linux_wait_1): ... this. Add target_options argument, and handle
12247 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12248 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12249 clean exit and signal exit code. Don't stop all threads in
12250 non-stop mode. In all-stop mode, only stop all threads when
12251 reporting a stop to GDB. Handle explicit thread stop requests.
12252 (async_file_flush, async_file_mark): New.
12253 (linux_wait): New.
12254 (send_sigstop): Use lwpid_of.
12255 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12256 interface changes. In non-stop mode, don't switch to a random
12257 thread.
12258 (linux_resume_one_lwp): Use lwpid_of.
12259 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12260 (linux_resume_one_thread): ... this. Handle resume_stop. In
12261 non-stop mode, don't look for pending flag in all threads.
12262 (resume_status_pending_p): Don't consider explicitly suspended
12263 threads.
12264 (my_waitpid): Reimplement. Emulate __WALL.
12265 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12266 Use lwpid_of.
12267 (sigchld_handler, linux_supports_non_stop, linux_async)
12268 (linux_start_non_stop): New.
12269 (linux_target_ops): Register linux_supports_non_stop, linux_async
12270 and linux_start_non_stop.
12271 (initialize_low): Install SIGCHLD handler.
12272 * thread-db.c (thread_db_create_event, find_one_thread)
12273 (thread_db_get_tls_address): Use lwpid_of.
12274 * win32-low.c (win32_detach): Adjust to use resume_kind.
12275 (win32_wait): Add `options' argument.
12276 * spu-low.c (spu_resume): Adjust to use resume_kind.
12277 (spu_wait): Add `options' argument.
12278
5b1c542e
PA
122792009-04-01 Pedro Alves <pedro@codesourcery.com>
12280
12281 Decouple target code from remote protocol.
12282
12283 * target.h (enum target_waitkind): New.
12284 (struct target_waitstatus): New.
12285 (struct target_ops) <wait>: Return an unsigned long. Take a
12286 target_waitstatus pointer instead of a char pointer.
12287 (mywait): Likewise.
12288 * target.c (mywait): Change prototype to return an unsigned long.
12289 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12290 * server.h (thread_from_wait, old_thread_from_wait): Delete
12291 declarations.
12292 (prepare_resume_reply): Change prototype to take a
12293 target_waitstatus.
12294 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12295 (last_status, last_ptid): New.
12296 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12297 pid instead of a signal.
12298 (attach_inferior): Remove "status" and "signal" parameters.
12299 Adjust.
12300 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12301 not as an address.
12302 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12303 (handle_v_requests, myresume): Remove "status" and "signal"
12304 parameters. Adjust.
12305 (handle_status): New.
12306 (main): Delete local `status'. Adjust.
12307 * remote-utils.c: Include target.h.
12308 (prepare_resume_reply): Change prototype to take a
12309 target_waitstatus. Adjust.
12310
12311 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12312 interface.
12313 * spu-low.c (spu_wait): Adjust.
12314 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12315 Delete.
12316 (win32_wait): Adjust.
12317
2bd7c093
PA
123182009-04-01 Pedro Alves <pedro@codesourcery.com>
12319
12320 * target.h (struct thread_resume): Delete leave_stopped member.
12321 (struct target_ops): Add a `n' argument to the `resume' callback.
12322 * server.c (start_inferior): Adjust.
12323 (handle_v_cont, myresume): Adjust.
12324 * linux-low.c (check_removed_breakpoint): Adjust to resume
12325 interface change, and to removed leave_stopped field.
12326 (resume_ptr): Delete.
12327 (struct thread_resume_array): New.
12328 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12329 resume interface change.
12330 (linux_continue_one_thread, linux_queue_one_thread)
12331 (resume_status_pending_p): Check if the resume field is NULL
12332 instead of checking the leave_stopped member.
12333 (linux_resume): Adjust to the target resume interface change.
12334 * spu-low.c (spu_resume): Adjust to the target resume interface
12335 change.
12336 * win32-low.c (win32_detach, win32_resume): Ditto.
12337
c35fafde
PA
123382009-04-01 Pedro Alves <pedro@codesourcery.com>
12339
12340 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12341 flag.
12342 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12343 pending.
12344 (linux_continue_one_thread): Only preserve the stepping flag if
12345 there's a pending breakpoint.
12346
0a59d50b
PA
123472009-03-31 Pedro Alves <pedro@codesourcery.com>
12348
12349 * server.c (main): After the inferior having exited, call
12350 remote_close before exiting gdbserver.
12351
f04c6d38
TJB
123522009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12353
12354 Fix size of FPSCR in Power 7 processors.
12355 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12356 (PPC_FEATURE_HAS_DFP): New #define.
12357 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12358 size of the FPSCR.
12359
78e5cee6
PA
123602009-03-23 Pedro Alves <pedro@codesourcery.com>
12361
12362 * server.c (handle_query) Whitespace and formatting.
12363
1b3f6016
PA
123642009-03-22 Pedro Alves <pedro@codesourcery.com>
12365
12366 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12367 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12368 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12369 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12370 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12371 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12372 Makefile.in, configure.ac: Fix whitespace throughout.
12373 * configure: Regenerate.
12374
a07b2135
PA
123752009-03-22 Pedro Alves <pedro@codesourcery.com>
12376
12377 * inferiors.c (find_inferior): Make it safe for the callback
12378 function to delete the currently iterated inferior.
12379
67cc2626
PA
123802009-03-22 Pedro Alves <pedro@codesourcery.com>
12381
12382 * Makefile.in (linuw_low_h): Move higher.
12383 (thread-db.o): Depend on $(linux_low_h).
12384
54a0b537
PA
123852009-03-17 Pedro Alves <pedro@codesourcery.com>
12386
12387 Rename "process" to "lwp" throughout.
12388
12389 * linux-low.c (all_processes): Rename to...
12390 (all_lwps): ... this.
12391 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12392 (add_process): Rename to ...
12393 (add_lwp): ... this. Adjust.
12394 (linux_create_inferior): Adjust.
12395 (linux_attach_lwp): Adjust.
12396 (linux_attach): Adjust.
12397 (linux_kill_one_process): Rename to ...
12398 (linux_kill_one_lwp): ... this. Adjust.
12399 (linux_kill): Adjust.
12400 (linux_detach_one_process): Rename to ...
12401 (linux_detach_one_lwp): ... this. Adjust.
12402 (linux_detach): Adjust.
12403 (check_removed_breakpoint): Adjust.
12404 (status_pending_p): Adjust.
12405 (linux_wait_for_process): Rename to ...
12406 (linux_wait_for_lwp): ... this. Adjust.
12407 (linux_wait_for_event): Adjust.
12408 (send_sigstop): Adjust.
12409 (wait_for_sigstop): Adjust.
12410 (stop_all_processes): Rename to ...
12411 (stop_all_lwps): ... this.
12412 (linux_resume_one_process): Rename to ...
12413 (linux_resume_one_lwp): ... this. Adjust.
12414 (linux_set_resume_request, linux_continue_one_thread)
12415 (linux_queue_one_thread, resume_status_pending_p)
12416 (usr_store_inferior_registers, regsets_store_inferior_registers)
12417 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12418 Adjust.
12419 * linux-low.h (get_process): Rename to ...
12420 (get_lwp): ... this. Adjust.
12421 (get_thread_process): Rename to ...
12422 (get_thread_lwp): ... this. Adjust.
12423 (get_process_thread): Rename to ...
12424 (get_lwp_thread): ... this. Adjust.
12425 (struct process_info): Rename to ...
12426 (struct lwp_info): ... this.
12427 (all_processes): Rename to ...
12428 (all_lwps): ... this.
12429 * proc-service.c (ps_lgetregs): Adjust.
12430 * thread-db.c (thread_db_create_event, find_one_thread)
12431 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12432
0b16c5cf
PA
124332009-03-14 Pedro Alves <pedro@codesourcery.com>
12434
12435 * server.c (handle_query): Handle "qAttached".
12436
32de4b9d
NS
124372009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12438
12439 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12440 GPLv3, update license URL.
12441
2aecd87f
DE
124422009-03-01 Doug Evans <dje@google.com>
12443
93efd302 12444 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12445 (server_h): Add gdb_signals.h.
12446 (signals.o): Update.
12447 * server.h (target_signal_from_host,target_signal_to_host_p)
12448 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12449
86b1f9c5
PM
124502009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12451
12452 * remote-utils.c (getpkt): Also generate remote-debug
12453 information if noack_mode is set.
12454
4aa995e1
PA
124552009-02-06 Pedro Alves <pedro@codesourcery.com>
12456
12457 * server.c (handle_query): Report qXfer:siginfo:read and
12458 qXfer:siginfo:write as supported and handle them.
12459 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12460 * linux-low.c (linux_xfer_siginfo): New.
12461 (linux_target_ops): Set it.
12462
62709adf
PA
124632009-01-26 Pedro Alves <pedro@codesourcery.com>
12464
12465 * server.c (gdbserver_usage): Mention --remote-debug.
12466 (main): Accept '--remote-debug' switch.
12467
aef93bd7
DE
124682009-01-18 Doug Evans <dje@google.com>
12469
12470 * regcache.c (new_register_cache): No need to check result of xcalloc.
12471 * server.c (handle_search_memory): Back out calls to xmalloc,
12472 result is checked and error is returned to user upon failure.
12473 (handle_query): Ditto. Add more checks for result of malloc.
12474 (handle_v_cont): Check result of malloc, report error back to
12475 user upon failure.
12476 (handle_v_run): Ditto. Call freeargv.
12477 * server.h (freeargv): Declare.
12478 * utils.c (freeargv): New fn.
12479
54363045
DE
124802009-01-15 Doug Evans <dje@google.com>
12481
f626972c
DE
12482 * gdbreplay.c (perror_with_name): Make arg const char *.
12483 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12484 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12485 * utils.c (perror_with_name): Make arg const char *.
54363045 12486
18aae699
PA
124872009-01-14 Pedro Alves <pedro@codesourcery.com>
12488
12489 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12490 when handling a EXIT_PROCESS_DEBUG_EVENT.
12491
ff703abe
JB
124922009-01-06 Joel Brobecker <brobecker@adacore.com>
12493
12494 * gdbreplay.c (gdbreplay_version): Update copyright year.
12495 * server.c (gdbserver_version): Likewise.
12496
f21cc1a2 124972009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12498
12499 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12500 (handle_extended_wait): Improve comment.
0e21c1ec 12501
bca929d3
DE
125022008-12-13 Doug Evans <dje@google.com>
12503
12504 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12505 * server.h (ATTR_MALLOC): New macro.
12506 (xmalloc,xcalloc,xstrdup): Declare.
12507 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12508 * inferiors.c: Ditto.
12509 * linux-low.c: Ditto.
12510 * mem-break.c: Ditto.
12511 * regcache.c: Ditto.
12512 * remote-utils.c: Ditto.
12513 * server.c: Ditto.
12514 * target.c: Ditto.
12515 * win32-low.c: Ditto.
12516
97438e3f
DE
125172008-12-12 Doug Evans <dje@google.com>
12518
896c7fbb
DE
12519 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12520 in debugging printf.
12521
97438e3f
DE
12522 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12523
e3b886f8
DE
125242008-12-09 Doug Evans <dje@google.com>
12525
12526 * linux-low.h (struct process_info): Delete member tid, unused.
12527 * thread-db.c (find_one_thread): Update.
12528 (maybe_attach_thread): Update.
12529
07e059b5
VP
125302008-12-02 Pedro Alves <pedro@codesourcery.com>
12531
889bf7c5
PA
12532 * target.h (struct target_ops): Add qxfer_osdata member.
12533 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12534 and dirent.h.
12535 (linux_qxfer_osdata): New functions.
12536 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12537 callback.
12538 * server.c (handle_query): Handle "qXfer:osdata:read:".
12539 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12540 (buffer_xml_printf): New functions.
12541 * server.h (struct buffer): New.
12542 (buffer_grow_str, buffer_grow_str0): New macros.
12543 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12544 (buffer_xml_printf): Declare.
07e059b5 12545
4cab47ab
DE
125462008-11-24 Doug Evans <dje@google.com>
12547
12548 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12549
f142445f
DJ
125502008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12551
12552 * server.c (handle_v_run): Always use the supplied argument list.
12553
d0107bb6 125542008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12555
d0107bb6
BW
12556 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12557 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12558
2c4ad781
TJB
125592008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12560
12561 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12562 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12563 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12564 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12565 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12566 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12567 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12568 XML target descriptions.
12569 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12570 when inferior is running on an ISA 2.05 or later processor. Add
12571 special case to return offset for full 64-bit slot of FPSCR when
12572 in 32-bits.
12573
dfb64f85
DJ
125742008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12575
12576 * Makefile.in (SFILES, clean): Added sparc64 files.
12577 (reg-sparc64.o, reg-sparc64.c): New.
12578 * configure.srv (sparc*-*-linux*): New configuration.
12579 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12580 syscall arguments for SPARC.
12581 (regsets_store_inferior_registers): Likewise.
12582 * linux-sparc-low.c: New file.
12583
66b6e1dd
DE
125842008-10-21 Doug Evans <dje@google.com>
12585
12586 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12587 (READLINE_DIR,READLINE_DEP): Delete.
12588 (INTERNAL_CFLAGS): Update.
12589 (LINTFLAGS): Update.
12590
9b710a42
PA
125912008-10-10 Pedro Alves <pedro@codesourcery.com>
12592
12593 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12594 whole argv from the last run, not just argv[0].
12595
5822d809
PA
125962008-09-08 Pedro Alves <pedro@codesourcery.com>
12597
12598 * regcache.c (new_register_cache): Return NULL if the register
12599 cache size isn't known yet.
12600 (free_register_cache): Avoid dereferencing a NULL regcache.
12601
74aac56f
DJ
126022008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12603
12604 * configure.srv: Merge MIPS and MIPS64.
12605
400b20f5
MR
126062008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12607
12608 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12609
677c5bb1
LM
126102008-08-18 Luis Machado <luisgpm@br.ibm.com>
12611
12612 * Makefile.in: Add required vsx dependencies.
12613
12614 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12615 Declare init_registers_powerpc_vsx32l.
12616 Declare init_registers_powerpc_vsx64l.
12617 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12618 (ppc_arch_setup): Check for VSX in hwcap.
12619 (ppc_fill_vsxregset): New function.
12620 (ppc_store_vsxregset): New function.
12621 Add new VSX entry in regset_info target_regsets.
12622
12623 * configure.srv: Add new VSX dependencies.
12624
a6f3e723
SL
126252008-08-12 Pedro Alves <pedro@codesourcery.com>
12626
12627 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12628 (remote_open): Set or clear transport_is_reliable.
12629 (putpkt_binary): Don't expect acks in noack mode.
12630 (getpkt): Don't send ack/nac in noack mode.
12631 * server.c (handle_general_set): Handle QStartNoAckMode.
12632 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12633 qSupported.
12634 (main): Reset noack_mode on every connection.
12635 * server.h (noack_mode): Declare.
12636
a417dc56
RW
126372008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12638
12639 * Makefile.in (GDBREPLAY_OBS): New variable.
12640 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12641
3221518c
UW
126422008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12643 Daniel Jacobowitz <dan@codesourcery.com>
12644
12645 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12646 (usr_store_inferior_registers): Likewise.
12647 (regsets_store_inferior_registers): Likewise.
12648
ec56be1b
PA
126492008-07-31 Rolf Jansen <rj@surtec.com>
12650 Pedro Alves <pedro@codesourcery.com>
12651
12652 * configure.ac: Check for memmem declaration.
12653 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12654 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12655 (disable_packet_qfThreadInfo): Unconditionally compile.
12656 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12657 * configure, config.in: Regenerate.
12658
2fe5e3ff
DE
126592008-07-28 Doug Kwan <dougkwan@google.com>
12660
12661 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12662 (linux_write_memory): Remove declaration of errno.
12663
836acd6d
UW
126642008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12665
12666 * linux-low.c (handle_extended_wait): Do not use "status"
12667 variable uninitialized.
12668
aeba519e
PA
126692008-07-07 Pedro Alves <pedro@codesourcery.com>
12670
12671 * server.c (handle_v_attach): Inhibit reporting dll changes.
12672
db42f210
PA
126732008-06-27 Pedro Alves <pedro@codesourcery.com>
12674
12675 * remote-utils.c (prepare_resume_reply): If requested, don't
12676 output "thread:TID" in the T stop reply.
12677
12678 * server.c (disable_packet_vCont, disable_packet_Tthread)
12679 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12680 (handle_query): If requested, disable support for qC, qfThreadInfo
12681 and qsThreadInfo.
12682 (handle_v_requests): If requested, disable support for vCont.
12683 (gdbserver_show_disableable): New.
12684 (main): Handle --disable-packet and --disable-packet=LIST.
12685
12686 * server.h (disable_packet_vCont, disable_packet_Tthread)
12687 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12688
8e4c5421
CD
126892008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12690
12691 * server.c (gdbserver_usage): Mention --version.
12692
6e23a804
DJ
126932008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12694
12695 * Makefile.in (gdbreplay.o): New rule.
12696
90aa6a40
JM
126972008-06-06 Joseph Myers <joseph@codesourcery.com>
12698
12699 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12700 message, not gdbserver.
12701
c16158bc 127022008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12703 Nathan Sidwell <nathan@codesourcery.com>
12704 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12705
12706 * acinclude.m4: Include ../../config/acx.m4.
12707 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12708 * configure, config.in: Regenerate.
12709 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12710 * server.c (gdbserver_version): Print PKGVERSION.
12711 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12712 (main): Adjust gdbserver_usage calls.
12713 * gdbreplay.c (version, host_name): Add declarations.
12714 (gdbreplay_version, gdbreplay_usage): New.
12715 (main): Accept --version and --help options.
12716
aeb75bf5
DJ
127172008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12718
12719 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12720 (arm_breakpoint_at): Handle Thumb.
12721 (the_low_target): Add comment.
12722
76b233dd
UW
127232008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12724
12725 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12726
08388c79
DE
127272008-05-09 Doug Evans <dje@google.com>
12728
a3c83fae
DE
12729 * server.h (decode_search_memory_packet): Declare.
12730 * remote-utils.c (decode_search_memory_packet): New fn.
12731 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12732 (handle_search_memory): New fn.
12733 (handle_query): Process qSearch:memory packets.
12734
bb9c3d36
UW
127352008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12736
12737 * regcache.c (registers_length): Remove.
12738 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12739 full register packet.
12740 * regcache.h (registers_length): Remove prototype.
12741 * server.h (PBUFSIZ): Define to 16384.
12742
7284e1be
UW
127432008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12744
12745 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12746 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12747 powerpc-64l.o, and powerpc-altivec64l.o.
12748 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12749 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12750 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12751 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12752 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12753 to srv_xmlfiles.
12754
12755 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12756 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12757 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12758 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12759 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12760 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12761 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12762 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12763 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12764 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12765 (clean): Update.
12766
12767 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12768 (init_registers_powerpc_32l): ... this new prototype.
12769 (init_registers_powerpc_32): Remove, replace by ...
12770 (init_registers_powerpc_altivec32l): ... this new prototype.
12771 (init_registers_powerpc_e500): Remove, replace by ...
12772 (init_registers_powerpc_e500l): ... this new prototype.
12773 (init_registers_ppc64): Remove, replace by ...
12774 (init_registers_powerpc_64l): ... this new prototype.
12775 (init_registers_powerpc_64): Remove, replace by ...
12776 (init_registers_powerpc_altivec64l): ... this new prototype.
12777 (ppc_num_regs): Set to 73.
12778 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12779 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12780 (ppc_cannot_store_register): Handle orig_r3 and trap.
12781 (ppc_arch_setup): Update init_registers_... calls.
12782 (ppc_fill_gregset): Handle orig_r3 and trap.
12783
12784 * inferiors.c (clear_inferiors): Reset current_inferior.
12785
fdc59709
PB
127862008-04-23 Paolo Bonzini <bonzini@gnu.org>
12787
889bf7c5
PA
12788 * acinclude.m4: Add override.m4.
12789 * configure: Regenerate.
fdc59709 12790
c9b2f845
UW
127912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12792
12793 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12794 initial call to init_register_ppc64.
12795
550512b8
UW
127962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12797
43aaf8b6
PA
12798 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12799 single powerpc*-*-linux* case.
550512b8
UW
12800 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12801
b6430ec3
UW
128022008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12803
12804 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12805 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12806 from reg_xmlfiles.
12807 * linux-ppc-low.c: Include <elf.h>.
12808 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12809 (ppc_hwcap): New global variable.
12810 (ppc_regmap): Remove __SPE__ #ifdef sections.
12811 (ppc_regmap_e500): New global variable.
12812 (ppc_cannot_store_register): Update __SPE__ special case.
12813 (ppc_get_hwcap): New function.
12814 (ppc_arch_setup): Use it to determine whether inferior supports
12815 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12816 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12817 Do not access registers if target does not support AltiVec.
12818 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12819 Do not access registers if target does not support SPE.
12820 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12821
52fa2412
UW
128222008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12823
12824 * linux-low.c (disabled_regsets, num_regsets): New.
12825 (use_regsets_p): Delete.
12826 (linux_wait_for_process): Clear disabled_regsets.
12827 (regsets_fetch_inferior_registers): Check and set it.
12828 (regsets_store_inferior_registers): Likewise.
12829 (linux_fetch_registers, linux_store_registers): Do not use
12830 use_regsets_p.
12831 (initialize_low): Allocate disabled_regsets.
12832
e28b3332
DJ
128332008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12834
12835 * Makefile.in (LIBOBJS): New.
12836 (OBS): Use LIBOBJS.
12837 (memmem.o): New rule.
12838 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12839 * configure: Regenerated.
12840
4536995d
UW
128412008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12842
12843 * server.c (handle_query): Never return "unsupported" for
12844 qXfer:features:read queries.
12845
221c031f
UW
128462008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12847
12848 * server.c (get_features_xml): Fix inverted condition.
12849 (handle_query): Always support qXfer:feature:read.
12850
ccd213ac
DJ
128512008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12852
12853 * server.c (wrapper_argv): New.
12854 (start_inferior): Handle wrapper_argv. If set, expect an extra
12855 trap.
12856 (gdbserver_usage): Document --wrapper.
12857 (main): Parse --wrapper.
12858
6fe305f7
UW
128592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12860
12861 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12862 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12863 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12864 (ppc_set_pc): Likewise.
12865 (ppc_arch_setup): New function.
12866 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12867 of collect_register.
889bf7c5 12868 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12869
5b0a002e
UW
128702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12871
12872 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12873 instead of linux-ppc64-low.o.
12874 * linux-ppc64-low.c: Remove file.
12875 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12876 (linux-ppc64-low.o): Remove rule.
12877
12878 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12879 (init_registers_powerpc_64): Likewise.
12880 (ppc_regmap): Conditionally define depending on __powerpc64__.
12881 (ppc_cannot_store_register): Do not special-case "fpscr" when
12882 compiled on __powerpc64__.
12883 (ppc_collect_ptrace_register): New function.
12884 (ppc_supply_ptrace_register): New function.
12885 (ppc_breakpoint): Change type to "unsigned int".
12886 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12887 (the_low_target): Conditionally provide initializers for the
889bf7c5 12888 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12889 collect_ptrace_register and supply_ptrace_register members.
12890
9b4b61c8
UW
128912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12892
12893 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12894 * server.c (gdbserver_xmltarget): Define.
12895 (get_features_xml): Use it to replace "target.xml" and arch_string.
12896
12897 * configure.srv: Remove srv_xmltarget. Add XML files that were
12898 mentioned there to srv_xmlfiles instead. Remove conditional tests
12899 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12900 srv_xmlfiles and srv_regobj to include all possible choices.
12901 * configure.ac (srv_xmltarget): Remove.
12902 (srv_xmlfiles): Do not add "target.xml".
12903 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12904 checks for supplementary target information.
12905 * configure: Regenerate.
12906 * Makefile.in (XML_TARGET): Remove.
12907 (target.xml): Remove rule.
12908 (clean): Do not clean up target.xml.
12909 (.PRECIOUS): Do not mention target.xml.
12910
12911 * target.h (struct target_ops): Remove arch_string member.
12912 * linux-low.c (linux_arch_string): Remove.
12913 (linux_target_ops): Remove arch_string initializer.
12914 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12915 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12916 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12917 * spu-low.c (spu_arch_string): Remove.
12918 (spu_target_ops): Remove arch_string initializer.
12919 * win32-low.c (win32_arch_string): Remove.
12920 (win32_target_ops): Remove arch_string initializer.
12921 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12922 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12923 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12924
ee1a7ae4
UW
129252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12926
12927 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12928 by collect_ptrace_register and supply_ptrace_register hooks.
12929 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12930 instead of checking for the_low_target.left_pad_xfer.
12931 (usr_store_inferior_registers): Use collect_ptrace_register callback
12932 instead of checking for the_low_target.left_pad_xfer.
12933
12934 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12935 (s390_supply_ptrace_register): Likewise.
12936 (s390_fill_gregset): Call s390_collect_ptrace_register.
12937 (the_low_target): Update.
12938
12939 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12940 (ppc_supply_ptrace_register): Likewise.
12941 (the_low_target): Update.
12942
12943 * linux-i386-low.c (the_low_target): Update.
12944 * linux-x86-64-low.c (the_low_target): Update.
12945
d61ddec4
UW
129462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12947
12948 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12949 reg-s390.o and reg-s390x.o.
12950
12951 * linux-low.c (new_inferior): New global variable.
12952 (linux_create_inferior, linux_attach): Set it.
12953 (linux_wait_for_process): Call the_low_target.arch_setup after the
12954 target has stopped for the first time.
12955 (initialize_low): Do not call the_low_target.arch_setup.
12956
12957 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12958 (s390_set_pc): Likewise.
12959 (s390_arch_setup): New function.
12960 (the_low_target): Use s390_arch_setup as arch_setup routine.
12961
12962 * regcache.c (realloc_register_cache): New function.
12963 (set_register_cache): Call it for each existing regcache.
12964
d05b4ac3
UW
129652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12966
12967 * server.h (init_registers): Remove prototype.
12968
12969 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12970 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12971 instead of init_registers ().
12972 * linux-arm-low.c (init_registers_arm): Add prototype.
12973 (init_registers_arm_with_iwmmxt): Likewise.
12974 (the_low_target): Add initializer for arch_setup field.
12975 * linux-cris-low.c (init_registers_cris): Add prototype.
12976 (the_low_target): Add initializer for arch_setup field.
12977 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12978 (the_low_target): Add initializer for arch_setup field.
12979 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12980 (the_low_target): Add initializer for arch_setup field.
12981 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12982 (the_low_target): Add initializer for arch_setup field.
12983 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12984 (the_low_target): Add initializer for arch_setup field.
12985 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12986 (the_low_target): Add initializer for arch_setup field.
12987 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12988 (init_registers_mips64_linux): Likewise.
12989 (the_low_target): Add initializer for arch_setup field.
12990 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12991 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12992 (the_low_target): Add initializer for arch_setup field.
12993 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12994 (init_registers_powerpc_64): Likewise.
12995 (the_low_target): Add initializer for arch_setup field.
12996 * linux-s390-low.c (init_registers_s390): Add prototype.
12997 (init_registers_s390x): Likewise.
12998 (the_low_target): Add initializer for arch_setup field.
12999 * linux-sh-low.c (init_registers_sh): Add prototype.
13000 (the_low_target): Add initializer for arch_setup field.
13001 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13002 (the_low_target): Add initializer for arch_setup field.
13003 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13004 (the_low_target): Add initializer for arch_setup field.
13005
13006 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13007 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13008 instead of init_registers ().
13009 * win32-arm-low.c (init_registers_arm): Add prototype.
13010 (the_low_target): Add initializer for arch_setup field.
13011 * win32-i386-low.c (init_registers_i386): Add prototype.
13012 (the_low_target): Add initializer for arch_setup field.
13013
13014 * spu-low.c (init_registers_spu): Add prototype.
13015 (initialize_low): Call initialie_registers_spu () instead of
13016 initialize_registers ().
13017
fd96d250
PA
130182008-02-19 Pedro Alves <pedro@codesourcery.com>
13019
13020 * server.c (handle_v_requests): When handling the vRun and vAttach
13021 packets, if already debugging a process, don't kill it. Return an
13022 error instead.
13023
d41b6bb4
DJ
130242008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13025
13026 * server.c (handle_query): Correct length check.
13027
5ac588cf
PA
130282008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13029
13030 * win32-low.c (do_initial_child_stuff): Add process handle
13031 parameter. Set current_process_handle and current_process_id from the
13032 parameters. Clear globals.
13033 (win32_create_inferior): Don't set current_process_handle and
13034 current_process_id here. Instead pass them on the call to
13035 do_initial_child_stuff.
13036 (win32_attach): Likewise.
13037 (win32_clear_inferiors): New.
13038 (win32_kill): Don't close the current process handle or the
13039 current thread handle here. Instead call win32_clear_inferiors.
13040 (win32_detach): Don't open a new handle to the process. Call
13041 win32_clear_inferiors.
13042 (win32_join): Don't rely on current_process_handle; open a new
13043 handle using the process id.
13044 (win32_wait): Call win32_clear_inferiors when the inferior process
13045 has exited.
13046
ecd7ecbc
DJ
130472008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13048
13049 * server.c (monitor_show_help): Add "exit".
13050
1525d545
MG
130512008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13052
ecd7ecbc 13053 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13054 (clean): Add reg-xtensa.c.
13055 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13056 * configure.srv (xtensa*-*-linux*) New target.
13057 * linux-xtensa-low.c: New.
13058 * xtensa-xtregs.c: New.
1525d545 13059
59a016f0
PA
130602008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13061
13062 * hostio.c: Don't include errno.h.
13063 (errno_to_fileio_errno): Move to hostio-errno.
13064 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13065 error number outputting to the target->hostio_last_error callback.
13066 (hostio_packet_error): Use FILEIO_EINVAL directly.
13067 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13068 calls to hostio_error.
13069 * hostio-errno.c: New.
13070 * server.h (hostio_last_error_from_errno): Declare.
13071 * target.h (target_ops): Add hostio_last_error member.
13072 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13073 as hostio_last_error handler.
889bf7c5 13074 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13075 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13076 (wince_hostio_last_error): New functions.
13077 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13078 as hostio_last_error handler.
13079 (win32_target_ops) [!_WIN32_WCE]: Register
13080 hostio_last_error_from_errno as hostio_last_error handler.
13081 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13082 (hostio-errno.o): New rule.
13083 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13084 * configure.srv (srv_hostio_err_objs): New variable. Default to
13085 hostio-errno.o.
13086 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13087 * configure: Regenerate.
13088
2d717e4f
DJ
130892008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13090
13091 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13092 (linux_kill, linux_detach): Clean up the process list.
13093 * remote-utils.c (remote_open): Improve port number parsing.
13094 (putpkt_binary, input_interrupt): Only send interrupts if the target
13095 is running.
13096 * server.c (extended_protocol): Make static.
13097 (attached): Define earlier.
13098 (exit_requested, response_needed, program_argv): New variables.
13099 (target_running): New.
13100 (start_inferior): Clear attached here.
13101 (attach_inferior): Set attached here.
13102 (require_running): Define.
13103 (handle_query): Use require_running and target_running. Implement
13104 "monitor exit".
13105 (handle_v_attach, handle_v_run): New.
13106 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13107 (gdbserver_usage): Update.
13108 (main): Redo argument parsing. Handle --debug and --multi. Handle
13109 --attach along with other options or after the port. Save
13110 program_argv. Support no initial program. Resynchronize
13111 communication with GDB after an error. Handle "monitor exit".
13112 Use require_running and target_running. Always allow the extended
13113 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13114 restart in extended mode.
13115 * README: Refer to the GDB manual. Update --attach usage.
13116
7407e2de
AS
131172007-12-20 Andreas Schwab <schwab@suse.de>
13118
13119 * linux-low.c (STACK_SIZE): Define.
13120 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13121 (linux_test_for_tracefork): Likewise.
13122
b65d95c5
DJ
131232007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13124
13125 * linux-low.c (linux_wait_for_event): Update messages. Do not
13126 reinsert auto-delete breakpoints.
13127 * mem-break.c (struct breakpoint): Change return type of handler to
13128 int.
13129 (set_breakpoint_at): Update handler type.
13130 (reinsert_breakpoint_handler): Return 1 instead of calling
13131 delete_breakpoint.
13132 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13133 setting a new one.
13134 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13135 * mem-break.h (set_breakpoint_at): Update handler type.
13136 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13137 * win32-low.c (auto_delete_breakpoint): New.
13138 (get_child_debug_event): Use it.
13139
4e799345
DJ
131402007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13141
13142 * configure.ac: Check for pread and pwrite.
13143 * hostio.c (handle_pread): Fall back to lseek and read.
13144 (handle_pwrite): Fall back to lseek and write.
13145 * config.in, configure: Regenerated.
13146
27524b67
DJ
131472007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13148
13149 * server.c (myresume): Add own_buf argument.
13150 (main): Update calls.
13151
a20d5e98
DJ
131522007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13153
13154 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13155 * remote-utils.c (remote_open): Do not call disable_async_io.
13156 (block_async_io): Delete.
13157 (unblock_async_io): Make static.
13158 (initialize_async_io): New.
13159 * server.c (handle_v_cont): Handle async I/O here.
13160 (myresume): Likewise. Move other common resume tasks here...
13161 (main): ... from here. Call initialize_async_io. Disable async
13162 I/O before the main loop.
13163 * server.h (initialize_async_io): Declare.
13164 (block_async_io, unblock_async_io): Delete prototypes.
13165 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13166
b79d787e
DJ
131672007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13168
13169 * remote-utils.c (readchar): Allow binary data in received messages.
13170
d97903b2
PA
131712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13172
13173 * win32-low.c (attaching): New global.
13174 (win32_create_inferior): Clear the `attaching' global.
13175 (win32_attach): Set the `attaching' global.
13176 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13177 attaching. Only set a breakpoint at the entry point if not
13178 attaching.
13179
311de423
PA
131802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13181
13182 * server.c (main): Don't report dll events on the initial
13183 connection on attaches.
13184
6c2d16d2
PA
131852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13186
13187 * server.c (main): Relax numerical bases supported for the pid of
13188 the --attach command line argument.
13189
5ca906e6
PA
131902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13191
13192 * win32-low.c (win32_attach): Call OpenProcess before
13193 DebugActiveProcess, not after. Add last error output to error
13194 call.
13195
9c6c8194
PA
131962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13197
13198 * win32-low.c (win32_get_thread_context)
13199 (win32_set_thread_context): New functions.
13200 (thread_rec): Use win32_get_thread_context.
13201 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13202 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13203 field.
13204
4d5d1aaa
PA
132052007-12-03 Leo Zayas
13206 Pedro Alves <pedro_alves@portugalmail.pt>
13207
13208 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13209 global variables.
13210 (child_add_thread): Minor cleanup.
13211 (child_continue): Resume artificially suspended threads before
13212 calling ContinueDebugEvent.
13213 (suspend_one_thread): New.
13214 (fake_breakpoint_event): New.
13215 (get_child_debug_event): Change return type to int. Check here if
13216 gdb sent an interrupt request. If a soft interrupt was requested,
13217 fake a breakpoint event. Return 0 if there is no event to handle,
13218 and 1 otherwise.
13219 (win32_wait): Don't check here if gdb sent an interrupt request.
13220 Ensure there is a valid event to handle.
13221 (win32_request_interrupt): Add soft interruption method as last
13222 resort.
13223
c436e841
PA
132242007-12-03 Leo Zayas
13225 Pedro Alves <pedro_alves@portugalmail.pt>
13226
13227 * win32-low.h (win32_thread_info): Add descriptions to the
13228 structure members. Replace `suspend_count' counter by a
13229 `suspended' flag.
13230 * win32-low.c (thread_rec): Update condition of when to get the
13231 context from the inferior. Rely on ContextFlags being set if it
13232 has already been retrieved. Only suspend the inferior thread if
13233 we haven't already. Warn if that fails.
13234 (continue_one_thread): s/suspend_count/suspended/. Only call
13235 ResumeThread once. Warn if that fails.
13236
e7b5fa67
PA
132372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13238
13239 * win32-low.c (win32_wait): Don't read from the inferior when it
13240 has already exited.
13241
a385171d
PA
132422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13243
13244 * Makefile.in (win32_low_h): New variable.
13245 (win32-low.o): Add dependency on $(win32_low_h).
13246 (win32-arm-low.o, win32-i386-low.o): New rules.
13247
f80c84b3
DJ
132482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13249
13250 * hostio.c: Correct copyright year.
13251
a6b151f1
DJ
132522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13253
13254 * Makefile.in (OBS): Add hostio.o.
13255 (hostio.o): New rule.
13256 * server.h (handle_vFile): Declare.
13257 * hostio.c: New file.
13258 * server.c (handle_v_requests): Take packet_len and new_packet_len
13259 for binary packets. Call handle_vFile.
13260 (main): Update call to handle_v_requests.
13261
f9387fc3
DJ
132622007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13263
13264 * linux-low.c: Include <sched.h>.
13265
51c2684e
DJ
132662007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13267
13268 * linux-low.c (linux_tracefork_grandchild): New.
13269 (linux_tracefork_child): Use clone.
13270 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13271
75f83163
JB
132722007-10-31 Joel Brobecker <brobecker@adacore.com>
13273
13274 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13275
da5898ce
DJ
132762007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13277
13278 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13279
24a09b5f
DJ
132802007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * inferiors.c (change_inferior_id): Delete.
13283 (add_pid_to_list, pull_pid_from_list): New.
13284 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13285 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13286 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13287 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13288 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13289 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13290 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13291 (using_threads): Always set to 1.
13292 (handle_extended_wait): New.
13293 (add_process): Do not set TID.
13294 (linux_create_inferior): Set must_set_ptrace_flags.
13295 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13296 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13297 (linux_thread_alive): Rename TID argument to LWPID.
13298 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13299 (linux_wait_for_event): Do not use TID or check using_threads. Update
13300 call to dead_thread_notify. Call handle_extended_wait.
13301 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13302 (send_sigstop): Delete sigstop_sent.
13303 (wait_for_sigstop): Avoid TID.
13304 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13305 (linux_test_for_tracefork): New.
13306 (linux_lookup_signals): Use thread_db_active and
13307 linux_supports_tracefork_flag.
13308 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13309 * linux-low.h (get_process_thread): Avoid TID.
13310 (struct process_ifo): Move thread_known and tid to the end. Remove
13311 sigstop_sent.
13312 (linux_attach_lwp, thread_db_init): Update prototypes.
13313 * server.h (change_inferior_id): Delete prototype.
13314 (add_pid_to_list, pull_pid_from_list): New prototypes.
13315 * thread-db.c (thread_db_use_events): New.
13316 (find_first_thread): Rename to...
13317 (find_one_thread): ...this. Update callers and messages. Do not
13318 call fatal. Check thread_db_use_events. Do not call
13319 change_inferior_id or new_thread_notify.
13320 (maybe_attach_thread): Update. Do not call new_thread_notify.
13321 (thread_db_init): Set thread_db_use_events. Check use_events.
13322 * utils.c (fatal, warning): Correct message prefix.
13323
30ed0a8f
DJ
133242007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13325
13326 * Makefile.in (clean): Remove new files.
13327 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13328 (powerpc-64.o, powerpc-64.c): New rules.
13329 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13330 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13331 with SPE.
13332 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13333 SPE targets.
13334 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13335 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13336 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13337 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13338 (target_regsets): Add AltiVec and SPE register sets.
13339 * configure.ac: Check for AltiVec and SPE.
13340 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13341 (ppc_fill_vrregset, ppc_store_vrregset): New.
13342 (target_regsets): Add AltiVec register set.
13343 * configure: Regenerated.
13344
fd462a61
DJ
133452007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13346
13347 * linux-low.c (O_LARGEFILE): Define.
13348 (linux_read_memory): Use /proc/PID/mem.
13349 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13350 * configure, config.in: Regenerated.
13351
69f223ed
DJ
133522007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13353
13354 * linux-low.c (linux_wait_for_event): Do not pass signals while
13355 single-stepping.
13356
aec18585
PA
133572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13358
13359 * win32-low.c (create_process): New.
13360 (win32_create_inferior): Use create_process instead of
13361 CreateProcess. If create_process failed retry appending an ".exe"
13362 suffix. Store the GetLastError result immediatelly after
13363 create_process calls and use it on the call to error.
13364
34d86ddd
PA
133652007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13366
13367 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13368
5a0e3bd0
JB
133692007-08-23 Joel Brobecker <brobecker@adacore.com>
13370
13371 * configure.ac: Switch license to GPLv3.
13372
f88c79e6
MS
133732007-08-01 Michael Snyder <msnyder@access-company.com>
13374
13375 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13376
6b3d9b83
PA
133772007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13378
13379 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13380 typedef.
13381 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13382 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13383 CloseToolhelp32Snapshot.
13384 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13385 CloseToolhelp32Snapshot.
13386
c588c53c
MS
133872007-07-27 Michael Snyder <michael.snyder@access-company.com>
13388
13389 * server.c (main): Check for inferior exit before main loop.
13390
aa0403d9
PA
133912007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13392
13393 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13394 instead of on tmp_desc.
13395
255e7678
DJ
133962007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13397 Daniel Jacobowitz <dan@codesourcery.com>
13398
13399 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13400 (add_thread): Minor cleanups.
13401 (clear_inferiors): Move lower in the file. Clear the DLL
13402 list.
13403 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13404 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13405 (xml_escape_text): New.
13406 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13407 for qSupported.
13408 (handle_v_cont): Report errors.
13409 (gdbserver_version): Update.
13410 (main): Correct size of own_buf. Do not report initial DLL events.
13411 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13412 (unloaded_dll, xml_escape_text): New.
13413 * win32-low.c (enum target_waitkind): Update comments.
13414 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13415 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13416 (win32_EnumProcessModules, win32_GetModuleInformation)
13417 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13418 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13419 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13420 (win32_Module32First, win32_Module32Next, load_toolhelp)
13421 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13422 (get_child_debug_event): Handle DLL events.
13423 (win32_wait): Likewise.
13424
0d37add9
DJ
134252007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13426
13427 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13428 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13429
45e2715e
PA
134302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13431
13432 * win32-low.c (handle_output_debug_string): Ignore event if not
13433 waiting.
13434
c5674cf1
PA
134352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13436
13437 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13438
2bbe3cc1
DJ
134392007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13440
13441 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13442
ae13219e
DJ
134432007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13444
13445 * inferiors.c (change_inferior_id): Add comment.
13446 * linux-low.c (check_removed_breakpoint): Add an early
13447 prototype. Improve debug output.
13448 (linux_attach): Doc update.
13449 (linux_detach_one_process, linux_detach): Clean up before releasing
13450 each process.
13451 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13452 * linux-low.h (struct process_info): Doc improvement.
13453 * mem-break.c (delete_all_breakpoints): New.
13454 * mem-break.h (delete_all_breakpoints): New prototype.
13455 * thread-db.c (find_first_thread): New.
13456 (thread_db_create_event): Call it instead of
13457 thread_db_find_new_threads. Clean up unused variables.
13458 (maybe_attach_thread): Remove first thread handling.
13459 (thread_db_find_new_threads): Use find_first_thread.
13460 (thread_db_get_tls_address): Likewise.
13461
4105de34
DJ
134622007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13463
13464 * thread-db.c (thread_db_find_new_threads): Add prototype.
13465 (thread_db_create_event): Check for the main thread before adding
13466 a new thread.
13467 (maybe_attach_thread): Only enable event reporting if TID == 0.
13468 (thread_db_get_tls_address): Check for new threads.
13469
2b876972
DJ
134702007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13471
13472 * linux-low.c (linux_create_inferior): Try execv before execvp.
13473 * spu-low.c (spu_create_inferior): Likewise.
13474
7a245884
DJ
134752007-06-13 Mike Frysinger <vapier@gentoo.org>
13476
13477 * linux-low.c (linux_create_inferior): Change execv to execvp.
13478 * spu-low.c (spu_create_inferior): Likewies.
13479
117ce543
DJ
134802007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13481
13482 * Makefile.in (clean): Clean new files instead of deleted ones.
13483 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13484 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13485 rules.
13486 * configure.srv: Specify XML files and new regformats for MIPS and
13487 MIPS64 GNU/Linux.
13488 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13489 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13490 an entry for the restart register.
13491 (mips_cannot_fetch_register, mips_cannot_store_register)
13492 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13493 register names to match the XML descriptions.
13494 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13495 restart register instead of $0.
13496
0e7f50da
UW
134972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13498 Markus Deuling <deuling@de.ibm.com>
13499
13500 * remote-utils.c (decode_xfer_write): New function.
13501 * server.h (decode_xfer_write): Add prototype.
13502 * server.c (handle_query): Add PACKET_LEN argument. Support
13503 qXfer:spu:read and qXfer:spu:write packets.
13504 (main): Pass packet_len to handle_query.
13505 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13506 * target.h (target_ops): Add qxfer_spu.
13507
374c1d38
UW
135082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13509
13510 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13511 accessing non-seekable spufs files.
13512
bb63802a
UW
135132007-05-16 Markus Deuling <deuling@de.ibm.com>
13514
889bf7c5 13515 * server.c (handle_query): Add reply for qC packet.
bb63802a 13516
7390519e
PA
135172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13518 Leo Zayas <lerele@champenstudios@com>
13519
13520 * server.h (check_remote_input_interrupt_request): New function.
13521 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13522 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13523 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13524 (check_remote_input_interrupt_request): New function.
13525 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13526 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13527 winapi_GenerateConsoleCtrlEvent): New typedefs.
13528 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13529 to 250 ms.
13530 (win32_wait): Check for remote interrupt request
13531 with check_remote_input_interrupt_request.
13532 (win32_request_interrupt): New function.
13533 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13534
34b34921
PA
135352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13536
13537 * win32-low.c (debug_registers_changed,
13538 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13539 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13540 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13541 (thread_rec): Get context using the low target.
13542 (child_add_thread): Call thread_added on the low target,
13543 which does the same thing.
13544 (regptr): Delete.
13545 (do_initial_child_stuff): Remove debug registers references.
13546 Set context using the low target. Resume threads after
13547 setting the contexts.
13548 (child_continue): Remove dead variable. Remove debug
13549 registers references.
13550 (child_fetch_inferior_registers): Go through the low target.
13551 (do_child_store_inferior_registers): Remove.
13552 (child_store_inferior_registers): Go through the low target.
13553 (win32_resume): Remove debug registers references.
13554 Set context using the low target.
13555 (handle_exception): Change return type to void. Don't record
13556 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13557 first chance exception.
889bf7c5 13558 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13559 goto loop. Always return after waiting for debug event.
13560 (win32_wait): Convert to switch statement. Handle spurious
13561 events.
13562
13563 * win32-i386-low.c (debug_registers_changed,
13564 debug_registers_used): New.
13565 (initial_stuff): Rename to ...
13566 (i386_initial_stuff): ... this. Clear debug registers
13567 state variables.
13568 (store_debug_registers): Delete.
13569 (i386_get_thread_context): New.
13570 (load_debug_registers): Delete.
13571 (i386_set_thread_context): New.
13572 (i386_thread_added): New.
13573 (single_step): Rename to ...
13574 (i386_single_step): ... this.
13575 (do_fetch_inferior_registers): Rename to ...
13576 (i386_fetch_inferior_register): ... this.
13577 (i386_store_inferior_register): New.
13578 (the_low_target): Adapt to new interface.
13579
13580 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13581 (arm_get_thread_context): New.
13582 (arm_set_thread_context): New.
13583 (regptr): New.
13584 (do_fetch_inferior_registers): Rename to ...
13585 (arm_fetch_inferior_register): ... this.
13586 (arm_store_inferior_register): New.
13587 (arm_wince_breakpoint): Reimplement as unsigned long.
13588 (arm_wince_breakpoint_len): Define.
13589 (the_low_target): Adapt to new interface.
13590
13591 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13592 load_debug_registers. Add get_thread_context, set_thread_context,
13593 thread_added and store_inferior_register. Rename
13594 fetch_inferior_registers to fetch_inferior_register.
13595 (regptr): Remove declaration.
13596
dd6953e1
PA
135972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13598
13599 * linux-low.c (linux_detach): Change return type to int. Return 0.
13600 * spu-low.c (spu_detach): Likewise.
13601
444d6139
PA
136022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13603
13604 * target.h (target_ops): Change return type of detach to int.
13605 Add join.
13606 (join_inferior): New.
13607 * server.c (main): Don't skip detach support on mingw32.
13608 If the inferior doesn't support detaching return error.
13609 Call join_inferior instead of using waitpid.
13610 * linux-low.c (linux_join): New.
13611 (linux_target_op): Add linux_join.
13612 * spu-low.c (spu_join): New.
13613 (spu_target_ops): Add spu_join.
13614 * win32-low.c (win32_detach): Adapt to new interface.
13615 Reopen current_process_handle before detaching. Issue a child
13616 resume before detaching.
13617 (win32_join): New.
13618 (win32_target_op): Add win32_join.
13619
1d5315fe
PA
136202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13621
13622 * win32-low.c (win32-attach): Fix return value.
13623 * target.h (target_ops): Describe ATTACH return values.
13624
bf914831
PA
136252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13626
13627 * win32-low.c (GETPROCADDRESS): Define.
13628 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13629 (winapi_DebugSetProcessKillOnExit): Likewise.
13630 (win32_create_inferior): Force usage of ansi CreateProcessA.
13631 (win32_attach): Use GETPROCADDRESS.
13632 (win32_detach): Likewise.
13633
f72f3e60
PA
136342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13635
13636 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13637
ed50f18f
PA
136382007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13639
13640 * win32-low.c: Commit leftover changes from 2007-03-29.
13641
0c2ead7e
DJ
136422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13643
13644 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13645 fields short instead of int. Add explicit padding.
13646 (i387_cache_to_fsave): Remove unnecessary casts.
13647 (i387_fsave_to_cache): Doc fix.
13648 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13649
73725ff3
DJ
136502007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13651
13652 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13653 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13654
d99f33d8
PA
136552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13656
13657 * configure.srv (arm*-*-mingw32ce*): Move near the other
13658 arm targets.
13659
68070c10
PA
136602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13661
2482afc6 13662 * configure.ac: Add errno checking.
68070c10
PA
13663 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13664 sys/file.h and malloc.h.
13665 (AC_CHECK_DECLS): Add perror.
13666 (srv_mingwce): Handle.
2482afc6 13667 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13668 win32-i386-low.o to srv_tgtobj.
13669 (i[34567]86-*-mingw*): Likewise.
13670 (arm*-*-mingw32ce*): Add case.
13671 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13672 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13673 [__MINGW32CE__] (strerror): New function.
13674 [__MINGW32CE__] (errno): Define to GetLastError.
13675 [__MINGW32CE__] (COUNTOF): New macro.
13676 (remote_open): Remove extra close call.
13677 * mem-break.c (delete_breakpoint_at): New function.
13678 * mem-break.h (delete_breakpoint_at): Declare.
13679 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13680 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13681 [USE_WIN32API] (read, write): Add char* casts.
13682 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13683 * server.h: Include wincecompat.h on Windows CE.
13684 [HAVE_ERRNO_H]: Check.
13685 (perror): Declare if not declared.
13686 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13687 (perror_with_name): Remove errno declaration.
13688 * wincecompat.h: New.
13689 * wincecompat.c: New.
13690 * win32-low.h: New.
13691 * win32-arm-low.c: New.
13692 * win32-i386-low.c: New.
13693 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13694 (OUTMSG2): Make it safe.
13695 (_T): New macro.
13696 (COUNTOF): New macro.
13697 (NUM_REGS): Get it from the low target.
13698 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13699 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13700 (thread_rec): Let low target handle debug registers.
13701 (child_add_thread): Likewise.
13702 (child_init_thread_list): Likewise.
13703 (continue_one_thread): Likewise.
13704 (regptr): New.
13705 (do_child_fetch_inferior_registers): Move to ...
13706 * win32-i386-low.c: ... here, and rename to ...
13707 (do_fetch_inferior_registers): ... this.
889bf7c5 13708 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13709 Go through the low target.
13710 (do_child_store_inferior_registers): Use regptr.
13711 (strwinerror): New function.
13712 (win32_create_inferior): Handle Windows CE.
13713 Use strwinerror instead of strerror on Windows error
13714 codes. Add program to the error output.
13715 Don't close the main thread handle on Windows CE.
13716 (win32_attach): Use coredll.dll on Windows CE.
13717 (win32_kill): Close current process and current
13718 thread handles.
13719 (win32_detach): Use coredll.dll on Windows CE.
13720 (win32_resume): Let low target handle debug registers, and
13721 step request.
13722 (handle_exception): Add/Remove initial breakpoint. Avoid
13723 non-existant WSTOPSIG on Windows CE.
13724 (win32_read_inferior_memory): Cast to remove warning.
13725 (win32_arch_string): Go through the low target.
13726 (initialize_low): Call set_breakpoint_data with the low
13727 target's breakpoint.
13728 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13729 FOP_REGNUM, mappings): Move to ...
13730 * win32-i386-low.c: ... here.
13731 * win32-low.c (win32_thread_info): Move to ...
13732 * win32-low.h: ... here.
13733 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13734 win32-arm-low.c and wincecompat.c.
13735 (all:): Add $EXEEXT.
13736 (install-only:): Likewise.
13737 (gdbserver:): Likewise.
13738 (gdbreplay:): Likewise.
13739 * config.in: Regenerate.
13740 * configure: Regenerate.
13741
41093d81
PA
137422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13743
13744 * win32-low.c: Rename typedef thread_info to
13745 win32_thread_info throughout.
13746
544afa54
PA
137472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13748
13749 * win32-i386-low.c: Rename to ...
13750 * win32-low.c: ... this.
13751 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13752 * Makefile.in: Likewise.
13753
bce7165d
PA
137542007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13755
13756 * remote-utils.c (monitor_output): Constify msg parameter.
13757 * server.h (monitor_output): Likewise.
13758 * win32-i386-low.c (handle_output_debug_string): New.
13759 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13760 handle_output_debug_string.
13761 (get_child_debug_event): Likewise.
13762
506c7aa0
DJ
137632007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13764
13765 * server.c (main): Correct strtoul check.
13766
42c81e2a
DJ
137672007-03-27 Jon Ringle <jon@ringle.org>
13768
13769 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13770
9453113a
DJ
137712007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13772
13773 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13774
64a69107
DJ
137752007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13776
13777 * terminal.h: Check HAVE_SGTTY_H.
13778
137792007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13780
13781 * remote-utils.c (remote_open): Print out the assigned port number.
13782
c74d0ad8
DJ
137832007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13784
13785 * remote-utils.c (monitor_output): New function.
13786 * server.c (debug_threads): Define here.
13787 (monitor_show_help): New function.
13788 (handle_query): Handle qRcmd.
13789 (main): Do not handle 'd' packet.
13790 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13791 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13792 of debug_threads.
13793
de7c3b4a
PA
137942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13795
13796 * Makefile.in (EXEEXT): New.
13797 (clean): Use $(EXEEXT).
13798
ef57601b
PA
137992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13800
13801 * target.h (target_ops): Rename send_signal to request_interrupt,
13802 and remove enum target_signal parameter.
13803 * linux-low.c (linux_request_interrupt): Rename from
13804 linux_send_signal, and always send SIGINT.
13805 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13806 and always send SIGINT.
13807 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13808 of send_signal.
13809 (input_interrupt): Likewise.
13810
820f2bda
PA
138112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13812
13813 * server.c (get_features_xml): Check if target implemented
13814 arch_string.
13815 * win32-i386-low.c (win32_arch_string): New.
13816 (win32_target_ops): Add win32_arch_string as arch_string member.
13817
ab39bf24
UW
138182007-02-22 Markus Deuling <deuling@de.ibm.com>
13819
13820 * spu-low.c (spu_arch_string): New.
13821 (spu_target_ops): Add spu_arch_string.
13822
61ff6e04
DJ
138232007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13826 * configure.ac: Do not check for terminal.h.
13827 * configure, config.in: Regenerated.
13828
fb1e4ffc
DJ
138292007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13830
13831 * Makefile.in (OBS): Add $(XML_BUILTIN).
13832 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13833 (clean): Update.
13834 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13835 (arm-with-iwmmxt.c): New.
13836 * config.in, configure: Regenerate.
13837 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13838 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13839 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13840 (arm*-*-linux*): Add iWMMXt and regset support.
13841 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13842 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13843 (arm_store_wmmxregset, target_regsets): New.
13844 * server.c (get_features_xml): Take annex argument. Check builtin
13845 XML documents.
13846 (handle_query): Handle multiple annexes.
13847
0f48aa01
DJ
138482007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13849
13850 * remote-utils.c [USE_WIN32API] (read, write): Define.
13851 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13852 write.
13853
23181151
DJ
138542007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13855
13856 * linux-i386-low.c (the_low_target): Set arch_string.
13857 * linux-x86-64-low.c (the_low_target): Likewise.
13858 * linux-low.c (linux_arch_string): New.
13859 (linux_target_ops): Add it.
13860 * linux-low.h (struct linux_target_ops): Add arch_string.
13861 * server.c (write_qxfer_response): Use const void * for DATA.
13862 (get_features_xml): New.
13863 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13864 * target.h (struct target_ops): Add arch_string method.
13865
9d606399
DJ
138662007-01-03 Denis Pilat <denis.pilat@st.com>
13867 Daniel Jacobowitz <dan@codesourcery.com>
13868
13869 * linux-low.c (linux_kill): Handle being called with no threads.
13870 * win32-i386-low.c (win32_kill): Likewise.
13871 (get_child_debug_event): Clear current_process_handle.
13872
138732006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13874 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * remote-utils.c (remote_open): Check the type of specified
13877 serial port devices before opening them.
13878 * server.c (main): Kill the inferior if an error occurs during
13879 the first remote_open.
13880
a5e13d24
DJ
138812006-12-05 Markus Deuling <deuling@de.ibm.com>
13882
13883 * README: Update supported targets.
13884
186947f7
DJ
138852006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13886
13887 * Makefile.in (clean): Remove reg-mips64.c.
13888 (reg-mips64.c, reg-mips64.o): New rules.
13889 * configure.srv: Handle mips64. Include regset support for mips.
13890 * linux-mips-low.c (union mips_register): New.
13891 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13892 (mips_breakpoint, mips_breakpoint_at): Use int.
13893 (mips_collect_register, mips_supply_register)
13894 (mips_collect_register_32bit, mips_supply_register_32bit)
13895 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13896 (mips_store_fpregset, target_regsets): New.
13897 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13898
a13e2c95
UW
138992006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13900
13901 * configure.srv: Add target "spu*-*-*".
13902 * Makefile.in (clean): Remove reg-spu.c.
13903 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13904 * spu-low.c: New file.
13905
cb7283db
DJ
139062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13907
13908 * configure.ac: Correct td_thr_tls_get_addr test.
13909 * configure: Regenerated.
13910
89be2091
DJ
139112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * linux-low.c (linux_wait_for_event): Reformat. Use the
13914 pass_signals array.
13915 * remote-utils.c (decode_address_to_semicolon): New.
13916 * server.c (pass_signals, handle_general_set): New.
13917 (handle_query): Mention QPassSignals for qSupported.
13918 (main): Call handle_general_set.
13919 * server.h (pass_signals, decode_address_to_semicolon): New.
13920
000ef4f0
DJ
139212006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13922
13923 * server.c (handle_query): Correct error handling for read_auxv.
13924
b7149293
UW
139252005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13926
13927 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13928 and srv_linux_thread_db to yes.
13929 * linux-s390-low.c (s390_fill_gregset): New function.
13930 (target_regsets): Define data structure.
13931
dae5f5cf
DJ
139322006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13935 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13936 * config.in, configure: Regenerated.
13937 * inferiors.c (gdb_id_to_thread): New function.
13938 (gdb_id_to_thread_id): Use it.
13939 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13940 * linux-low.h (struct process_info): Add th member.
13941 (thread_db_get_tls_address): New prototype.
13942 * remote-utils.c (decode_address): Make non-static.
13943 * server.c (handle_query): Handle qGetTLSAddr.
13944 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13945 * target.h (struct target_ops): Add get_tls_address.
13946 * thread-db.c (maybe_attach_thread): Save the thread handle.
13947 (thread_db_get_tls_address): New.
13948
32ca6d61
DJ
139492006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13950
13951 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13952 (linux_resume_one_process): Take a siginfo_t *. Update all
13953 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13954 (struct pending_signals): Add a siginfo_t.
13955 (linux_wait_for_process): Always set last_status.
13956 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13957 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13958 * linux-low.h (struct process_info): Add last_status.
13959
5ffff7c1
DJ
139602006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13961
13962 * remote-utils.c (try_rle): New function.
13963 (putpkt_binary): Use it.
13964
8695c747
DJ
139652006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13968 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13969 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13970 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13971 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13972 point registers.
13973
290fadea
RS
139742006-08-08 Richard Sandiford <richard@codesourcery.com>
13975
13976 * server.c (terminal_fd): New variable.
13977 (old_foreground_pgrp): Likewise.
13978 (restore_old_foreground_pgrp): New function.
13979 (start_inferior): Record the terminal file descriptor in terminal_fd
13980 and its original foreground group in old_foreground_pgrp. Register
13981 restore_old_foreground_pgrp with atexit().
13982
9f2e1e63
DJ
139832006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13984
13985 * server.c (handle_query): Correct qPart to qXfer.
13986
b80864fb
DJ
139872006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13988
13989 * configure.ac: Check for more headers which are missing on
13990 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13991 * configure.srv: Add Cygwin and mingw32.
13992 * remote-utils.c: Don't include headers unconditionally which
13993 are missing on mingw32. Include <winsock.h> for mingw32.
13994 (remote_open): Adjust for mingw32 support. Flush
13995 standard error after writing to it.
13996 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13997 (unblock_async_io, enable_async_io, disable_async_io)
13998 (readchar, getpkt): Update for Winsock support.
13999 (prepare_resume_reply): Expect a protocol signal number.
14000 * server.c: Disable <sys/wait.h> on mingw32.
14001 (start_inferior): Adjust for mingw32 support. Flush
14002 standard error after writing to it.
14003 (attach_inferior): Likewise. Use protocol signal
14004 numbers.
14005 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14006 and names.
14007 * win32-i386-low.c: New file.
14008 * Makefile.in (XM_CLIBS): Set.
14009 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14010 (win32-i386-low.o): New dependency rule.
14011 * linux-low.c (linux_wait): Use target signal numbers.
14012 * target.h (struct target_ops): Doc fix.
14013 * server.h (target_signal_to_name): New prototype.
14014 * gdbreplay.c: Don't include headers unconditionally which
14015 are missing on mingw32. Include <winsock.h> for mingw32.
14016 (remote_close, remote_open): Adjust for Winsock support.
14017 * configure, config.in: Regenerated.
14018
0876f84a
DJ
140192006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14020
14021 * server.c (decode_xfer_read, write_qxfer_response): New.
14022 (handle_query): Take a packet length argument. Handle
14023 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14024 the qSupported response.
14025 (main): Update call to handle_query.
14026
01f9e8fa
DJ
140272006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14028
14029 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14030 (putpkt_binary): Renamed from putpkt and adjusted for binary
14031 data.
14032 (putpkt): New wrapper for putpkt_binary.
14033 (readchar): Don't mask off the high bit.
14034 (decode_X_packet): New function.
14035 * server.c (main): Call putpkt_binary if a handler sets the packet
14036 length. Save the length of the incoming packet. Handle 'X'.
14037 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14038
be2a5f71
DJ
140392006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14040
14041 * server.c (handle_query): Handle qSupported.
14042
ea025f5f
DJ
140432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14044
14045 * remote-utils.c (all_symbols_looked_up): New variable.
14046 (look_up_one_symbol): Check it.
14047 * server.h (look_up_one_symbol): New declaration.
14048 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14049
9308fc88
DJ
140502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14051
14052 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14053 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14054 (PTRACE_GET_THREAD_AREA): Define.
14055 (ps_get_thread_area): New function.
14056
52fb6437
NS
140572006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14058
14059 * configure.srv (m68k*-*-uclinux*): New target.
14060 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14061 (linux_resume_one_process): Remove extraneous cast.
14062 (linux_read_offsets): New.
14063 (linux_target_op): Add linux_read_offsets on mmuless systems.
14064 * server.c (handle_query): Add qOffsets logic.
14065 * target.h (struct target_ops): Add read_offsets.
14066
21b0f40c
DJ
140672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14068
14069 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14070 (PTRACE_GET_THREAD_AREA): Define.
14071 (ps_get_thread_area): New function.
14072 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14073 (linux-x86-64-low.o): Update.
14074
0050a760
DJ
140752006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14076
14077 * configure.ac: Remove checks for prfpregset_t.
14078 * gdb_proc_service.h: New file.
14079 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14080 new "gdb_proc_service.h".
14081 * proc-service.c: Likewise.
14082 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14083 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14084 * Makefile.in (gdb_proc_service_h): Updated.
14085 * configure, config.in: Regenerated.
14086
b92a518e
DJ
140872006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * remote-utils.c (prepare_resume_reply): Move declaration
14090 of gdb_id_from_wait to the top of the block.
14091
545587ee
DJ
140922006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14093
14094 * linux-low.c (regsets_store_inferior_registers): Read the regset
14095 from the target before filling it.
14096
9db87ebd
DJ
140972006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14098
14099 * server.c (attach_inferior): Return SIGTRAP for a successful
14100 attach.
14101
dd24457d
DJ
141022006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14103
14104 * Makefile.in (OBS): Add version.o.
14105 (STAGESTUFF): Delete.
14106 (version.o): Add dependencies.
14107 (version.c): Replace rule.
14108 (clean): Remove version.c.
14109 * server.c (gdbserver_version): New.
14110 (gdbserver_usage): Use printf.
14111 (main): Handle --version and --help.
14112 * server.h (version, host_name): Add declarations.
14113
6f0f660e
EZ
141142005-12-23 Eli Zaretskii <eliz@gnu.org>
14115
889bf7c5
PA
14116 * linux-arm-low.c:
14117 * linux-arm-low.c:
14118 * inferiors.c:
14119 * i387-fp.h:
14120 * i387-fp.c:
14121 * gdbreplay.c:
14122 * regcache.c:
14123 * proc-service.c:
14124 * mem-break.h:
14125 * mem-break.c:
14126 * linux-x86-64-low.c:
14127 * linux-sh-low.c:
14128 * linux-s390-low.c:
14129 * linux-ppc64-low.c:
14130 * linux-ppc-low.c:
14131 * linux-mips-low.c:
14132 * linux-m68k-low.c:
14133 * linux-m32r-low.c:
14134 * linux-low.h:
14135 * linux-low.c:
14136 * linux-ia64-low.c:
14137 * linux-i386-low.c:
14138 * linux-crisv32-low.c:
14139 * thread-db.c:
14140 * terminal.h:
14141 * target.h:
14142 * target.c:
14143 * server.h:
14144 * server.c:
14145 * remote-utils.c:
14146 * regcache.h:
14147 * utils.c:
14148 * Makefile.in:
14149 * configure.ac:
6f0f660e
EZ
14150 * gdbserver.1: Add (C) after Copyright. Update the FSF
14151 address.
14152
9d1fb177
DJ
141532005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14154
14155 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14156 (arm_breakpoint_at): Recognize both breakpoints.
14157 (the_low_target): Use the correct breakpoint instruction.
14158
011a70c2
DJ
141592005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14160
14161 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14162 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14163 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14164 (the_low_target): Update.
14165
7fb85e41
AS
141662005-10-25 Andreas Schwab <schwab@suse.de>
14167
14168 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14169
14170 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14171 (ia64_num_regs): Reduce to 462.
14172
3db0444b
DJ
141732005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * acinclude.m4: Correct quoting.
14176 * aclocal.m4: Regenerated.
14177
14178 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14179 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14180 (thread_db_init): Call thread_db_err_str.
14181 * configure.ac: Check for TD_VERSION.
14182 * config.in, configure: Regenerated.
14183
bee0189a
DJ
141842005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14185
14186 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14187
e9d25b98
DJ
141882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14189
14190 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14191 is not available. Define HAVE_PTRACE_GETREGS if it is.
14192 * config.in, configure: Regenerated.
14193 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14194 * linux-i386-low.c, linux-m68k-low.c: Update to use
14195 HAVE_PTRACE_GETREGS.
14196 * linux-low.c (regsets_fetch_inferior_registers)
14197 (regsets_store_inferior_registers): Only return 0 if we processed
14198 GENERAL_REGS.
14199 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14200 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14201
a06660f7
DJ
142022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14203
14204 * inferiors.c (struct thread_info): Add gdb_id.
14205 (add_thread): Add gdb_id argument.
14206 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14207 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14208 calls to add_thread.
14209 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14210 * server.c (handle_query): Use thread_to_gdb_id.
14211 (handle_v_cont, main): Use gdb_id_to_thread_id.
14212 * server.h (add_thread): Update prototype.
14213 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14214 prototypes.
14215
5a1f5858
DJ
142162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14217
14218 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14219 left-padded registers.
14220 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14221 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14222
e122f1f5
SE
142232005-07-01 Steve Ellcey <sje@cup.hp.com>
14224
14225 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14226 * configure: Regenerate.
14227 * config.in: Regenerate.
14228 * server.h (NEED_DECLARATION_STRERROR):
14229 Replace with !HAVE_DECL_STRERROR.
14230
d592fa2f
DJ
142312005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14232
14233 * linux-low.c (linux_wait, linux_send_signal): Don't test
14234 an unsigned long variable for > 0 if it could be MAX_ULONG.
14235 * server.c (myresume): Likewise.
14236 * target.c (set_desired_inferior): Likewise.
14237
ccbd4912
MK
142382005-06-13 Mark Kettenis <kettenis@gnu.org>
14239
14240 * configure.ac: Simplify and improve check for socklen_t.
14241 * configure, config.in: Regenerate.
14242
f450004a
DJ
142432005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * acconfig.h: Remove.
14246 * configure.ac: Add a test for socklen_t. Use three-argument
14247 AC_DEFINE throughout.
14248 * config.in: Regenerated using autoheader 2.59.
14249 * configure: Regenerated.
14250
14251 * gdbreplay.c (socklen_t): Provide a default.
14252 (remote_open): Use socklen_t.
14253 * remote-utils.c (socklen_t): Provide a default.
14254 (remote_open): Use socklen_t.
14255 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14256 unsigned char.
14257
14258 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14259 char for buffers.
14260 * linux-low.c (linux_read_memory, linux_write_memory)
14261 (linux_read_auxv): Likewise.
14262 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14263 (check_mem_write): Likewise.
14264 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14265 Likewise.
14266 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14267 (registers_from_string, register_data): Likewise.
14268 * server.c (handle_query, main): Likewise.
14269 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14270 (decode_M_packet): Likewise.
14271 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14272 * target.h (struct target_ops): Update read_memory, write_memory,
14273 and read_auxv.
14274 (read_inferior_memory, write_inferior_memory): Update.
14275 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14276 to unsigned char *.
14277 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14278 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14279 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14280 linux-s390-low.c, linux-sh-low.c: Update for changes in
14281 read_inferior_memory and the_low_target->breakpoint.
14282
eee84df1
DJ
142832005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14284
14285 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14286 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14287 * configure.srv: Add powerpc64-*-linux*.
14288 * linux-ppc64-low.c: New file.
14289
45b134e5
OF
142902005-05-23 Orjan Friberg <orjanf@axis.com>
14291
14292 * linux-cris-low.c: New file with support for CRIS.
14293 * linux-crisv32-low.c: Ditto for CRISv32.
14294 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14295 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14296 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14297 reg-crisv32.o, and reg-crisv32.c to make rules.
14298 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14299 recognized targets.
14300
48d93c75
UW
143012005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14302
14303 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14304 of sizeof (PTRACE_XFER_TYPE).
14305 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14306
e013ee27
OF
143072005-05-12 Orjan Friberg <orjanf@axis.com>
14308
889bf7c5 14309 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14310 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14311 pointers for hardware watchpoint support.
14312 * linux-low.h (struct linux_target_ops): Ditto.
14313 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14314 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14315 to linux_target_ops.
14316 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14317 reply packet.
14318 * server.c (main): Recognize 'Z' and 'z' packets.
14319
b0ded00b
UW
143202005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14321
14322 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14323 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14324 (the_low_target): Add new members.
14325
8643e2ad
DJ
143262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * proc-service.c (ps_lgetregs): Search all_processes instead of
14329 all_threads.
14330
fc620387
DJ
143312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * server.c (start_inferior): Change return type to int.
14334 (attach_inferior): Change sigptr to int *.
14335 (handle_v_cont, handle_v_requests): Change signal to int *.
14336 (main): Change signal to int.
14337
143382005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14339
14340 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14341 * configure.srv: Add m32r*-*-linux*.
14342 * linux-m32r-low.c: New file.
14343
e0e76420
DJ
143442005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14347
a1928bad
DJ
143482005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14349
14350 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14351 Take unsigned long arguments for PIDs.
14352 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14353 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14354 (wait_for_sigstop, linux_resume_one_process)
14355 (regsets_fetch_inferior_registers, linux_send_signal)
14356 (linux_read_auxv): Likewise. Update the types of variables holding
14357 PIDs. Update format string specifiers.
14358 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14359 * remote-utils.c (prepare_resume_reply): Likewise.
14360 * server.c (cont_thread, general_thread, step_thread)
14361 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14362 unsigned long.
14363 (handle_query): Update format specifiers.
14364 (handle_v_cont, main): Use strtoul for thread IDs.
14365 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14366 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14367 (general_thread, step_thread, thread_from_wait)
14368 (old_thread_from_wait): Update.
14369 * target.h (struct thread_resume): Use unsigned long for THREAD.
14370 (struct target_ops): Use unsigned long for arguments to attach and
14371 thread_alive.
14372
dcdb98d2
DJ
143732005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14374
14375 * acinclude.m4: Include bfd/bfd.m4 directly.
14376 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14377 <agriffis@toolchain.org>.
14378 * aclocal.m4, configure: Regenerated.
14379
bec39cab
AC
143802005-01-07 Andrew Cagney <cagney@gnu.org>
14381
14382 * configure.ac: Rename configure.in, require autoconf 2.59.
14383 * configure: Re-generate.
14384
434c4c77
DJ
143852004-12-08 Daniel Jacobowitz <dan@debian.org>
14386
14387 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14388 LIBS when finished.
14389 * aclocal.m4: Regenerated.
14390 * configure: Regenerated.
14391
db1d3e1b
AS
143922004-11-21 Andreas Schwab <schwab@suse.de>
14393
14394 * linux-m68k-low.c (m68k_num_gregs): Define.
14395 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14396 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14397 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14398 (m68k_breakpoint_at): New. Add to the_low_target.
14399
14400 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14401 srv_linux_thread_db to yes.
14402
43360365
JB
144032004-10-20 Joel Brobecker <brobecker@gnat.com>
14404
14405 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14406 (ARCH_SET_FS): Likewise.
14407 (ARCH_GET_FS): Likewise.
14408 (ARCH_GET_GS): Likewise.
14409
fd500816
DJ
144102004-10-16 Daniel Jacobowitz <dan@debian.org>
14411
14412 * linux-i386-low.c (ps_get_thread_area): New.
14413 * linux-x86-64-low.c (ps_get_thread_area): New.
14414 * linux-low.c: Include <sys/syscall.h>.
14415 (linux_kill_one_process): Don't kill the first thread here.
14416 (linux_kill): Kill the first thread here.
14417 (kill_lwp): New function.
14418 (send_sigstop, linux_send_signal): Use it.
14419 * proc-service.c: Clean up #ifdefs.
14420 (fpregset_info): Delete.
14421 (ps_lgetregs): Update and enable implementation.
14422 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14423 implementations.
14424 * remote-utils.c (struct sym_cache, symbol_cache): New.
14425 (input_interrupt): Print a clearer message.
14426 (async_io_enabled): New variable.
14427 (enable_async_io, disable_async_io): Use it. Update comments.
14428 (look_up_one_symbol): Use the symbol cache.
14429 * thread-db.c (thread_db_look_up_symbols): New function.
14430 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14431
f6de3c42
DJ
144322004-10-16 Daniel Jacobowitz <dan@debian.org>
14433
14434 * configure.in: Test for -rdynamic.
14435 * configure: Regenerated.
14436 * Makefile (INTERNAL_LDFLAGS): New.
14437 (gdbserver, gdbreplay): Use it.
14438
2c0fc042
AC
144392004-09-02 Andrew Cagney <cagney@gnu.org>
14440
14441 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14442
075b3282
DJ
144432004-03-23 Daniel Jacobowitz <drow@mvista.com>
14444
14445 * linux-low.c (linux_wait): Clear all_processes list also.
14446
fa6a77dc
DJ
144472004-03-12 Daniel Jacobowitz <drow@mvista.com>
14448
14449 * linux-low.c: Include <errno.h>. Remove extern declaration of
14450 errno.
14451
6d782a97
DJ
144522004-03-12 Daniel Jacobowitz <drow@mvista.com>
14453
14454 * gdbreplay.c, server.h, utils.c: Update copyright years.
14455
3a7fb99b
DJ
144562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14457
14458 * server.c (main): Print child status or termination signal from
14459 variable 'signal', not 'sig'.
14460
c3e735a6
DJ
144612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14462
14463 * linux-low.c (linux_read_memory): Change return type to
14464 int. Check for and return error from ptrace().
14465 * target.c (read_inferior_memory): Change return type to int. Pass
14466 back return status from the_target->read_memory().
14467 * target.h (struct target_ops): Adapt *read_memory() prototype.
14468 Update comment.
14469 (read_inferior_memory): Adapt prototype.
14470 * server.c (main): Return an error packet if
14471 read_inferior_memory() returns an error.
14472
a59d1c82
DJ
144732004-03-04 Daniel Jacobowitz <drow@mvista.com>
14474
14475 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14476 Unify with other clean targets.
14477
dc3f8883
DJ
144782004-02-29 Daniel Jacobowitz <drow@mvista.com>
14479
14480 * server.c (handle_v_cont): Call set_desired_inferior.
14481
89a208da
DJ
144822004-02-29 Daniel Jacobowitz <drow@mvista.com>
14483
14484 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14485
62ea82f5
DJ
144862004-02-29 Daniel Jacobowitz <drow@mvista.com>
14487
14488 * linux-low.c (linux_wait): Unblock async I/O.
14489 (linux_resume): Block and enable async I/O.
14490 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14491 * server.h (block_async_io, unblock_async_io): Add prototypes.
14492
6910d122
DJ
144932004-02-29 Daniel Jacobowitz <drow@mvista.com>
14494
14495 * remote-utils.c (remote_open): Print a status notice after
14496 opening a TCP port.
14497 * server.c (attach_inferior): Print a status notice after
14498 attaching.
14499
145002004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14501
14502 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14503
c89dc5d4
DJ
145042004-02-26 Daniel Jacobowitz <drow@mvista.com>
14505
14506 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14507 error packet.
14508 * server.c, target.h: Update copyright years.
14509
4b8dad4a
RM
145102004-02-25 Roland McGrath <roland@redhat.com>
14511
14512 * target.h (struct target_ops): New member `read_auxv'.
14513 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14514 * linux-low.c (linux_read_auxv): New function.
14515 (linux_target_ops): Initialize `read_auxv' member to that.
14516
d7446758
JB
145172004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14518
14519 Committed by Jim Blandy <jimb@redhat.com>.
14520
14521 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14522 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14523 instead of GPR_SIZE to distiguish s390 and s390x targets.
14524
5544ad89
DJ
145252004-01-31 Daniel Jacobowitz <drow@mvista.com>
14526
14527 * linux-low.c: Update copyright year.
14528 (check_removed_breakpoint): Clear pending_is_breakpoint.
14529 (linux_set_resume_request, linux_queue_one_thread)
14530 (resume_status_pending_p): New functions.
14531 (linux_continue_one_thread): Use process->resume.
14532 (linux_resume): Only resume threads if there are no pending events.
14533 * linux-low.h (struct process_info): Add resume request
14534 pointer.
14535
2a68b70e
DJ
145362004-01-30 Daniel Jacobowitz <drow@mvista.com>
14537
14538 * regcache.c (new_register_cache): Clear the allocated register
14539 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14540
64386c31
DJ
145412003-10-13 Daniel Jacobowitz <drow@mvista.com>
14542
14543 * linux-low.c (linux_resume): Take a struct thread_resume *
14544 argument.
14545 (linux_wait): Update call.
14546 (resume_ptr): New static variable.
14547 (linux_continue_one_thread): Renamed from
14548 linux_continue_one_process. Use resume_ptr.
14549 (linux_resume): Use linux_continue_one_thread.
14550 * server.c (handle_v_cont, handle_v_requests): New functions.
14551 (myresume): New function.
14552 (main): Handle 'v' case.
14553 * target.h (struct thread_resume): New type.
14554 (struct target_ops): Change argument of "resume" to struct
14555 thread_resume *.
14556 (myresume): Delete macro.
14557
c938e9b0
L
145582003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14559
14560 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14561 (uninstall): Support DESTDIR.
14562
7f313d07
BC
14563Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14564
14565 * configure.srv: Add xscale*linux copy of arm*linux entry.
14566
3b2fc2ea
DJ
145672003-07-24 Daniel Jacobowitz <drow@mvista.com>
14568
14569 * linux-arm-low.c (arm_reinsert_addr): New function.
14570 (the_low_target): Add arm_reinsert_addr.
14571
1c0a559e
MK
145722003-07-08 Mark Kettenis <kettenis@gnu.org>
14573
14574 * mem-break.c: Remove whitespace at end of file.
14575
43d5792c
DJ
145762003-06-28 Daniel Jacobowitz <drow@mvista.com>
14577
14578 * configure.in: Check whether we need to prototype strerror.
14579 * server.h: Optionally prototype strerror.
14580 * gdbreplay.c (perror_with_name): Use strerror.
14581 * linux-low.c (linux_attach_lwp): Use strerror.
14582 * utils.c (perror_with_name): Use strerror.
14583 * config.in, configure: Regenerated.
14584
c8a86edf
DJ
145852003-06-28 Daniel Jacobowitz <drow@mvista.com>
14586
14587 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14588 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14589
73d37363
DJ
145902003-06-20 Daniel Jacobowitz <drow@mvista.com>
14591
14592 * Makefile.in (SFILES): Update.
14593 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14594 low-sun3.c: Remove files.
14595
6ad8ae5c
DJ
145962003-06-17 Daniel Jacobowitz <drow@mvista.com>
14597
14598 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14599 (linux_detach_one_process, linux_detach): New functions.
14600 (linux_target_ops): Add linux_detach.
14601 * server.c (main): Handle 'D' packet.
14602 * target.h (struct target_ops): Add "detach" member.
14603 (detach_inferior): Define.
14604
1581182a
MK
146052003-06-13 Mark Kettenis <kettenis@gnu.org>
14606
14607 From Kelley Cook <kelleycook@wideopenwest.com>:
14608 * configure.srv: Accept i[34567]86 variants.
14609
e5379b03
DJ
146102003-06-05 Daniel Jacobowitz <drow@mvista.com>
14611
14612 * linux-low.c (linux_wait_for_event): Correct comment typos.
14613 (linux_resume_one_process): Call check_removed_breakpoint.
14614 (linux_send_signal): New function.
14615 (linux_target_ops): Add linux_send_signal.
14616 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14617 of kill.
14618 * target.h (struct target_ops): Add send_signal.
14619
2ff29de4
JB
146202003-05-29 Jim Blandy <jimb@redhat.com>
14621
14622 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14623 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14624 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14625 away part of the register's value.
14626
254787d4
DJ
146272003-03-26 Daniel Jacobowitz <drow@mvista.com>
14628
14629 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14630 (linux_wait_for_event, linux_init_signals): Likewise.
14631
94e10508
DJ
146322003-03-17 Daniel Jacobowitz <drow@mvista.com>
14633
14634 * configure.in: Check for stdlib.h.
14635 * configure: Regenerated.
14636 * config.in: Regenerated.
14637
4c0711e0
DJ
146382003-01-04 Andreas Schwab <schwab@suse.de>
14639
14640 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14641
ef66e766
AC
146422003-01-02 Andrew Cagney <ac131313@redhat.com>
14643
14644 * Makefile.in: Remove obsolete code.
14645
a1358604
DJ
146462002-11-20 Daniel Jacobowitz <drow@mvista.com>
14647
14648 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14649 defined(PT_FPR0_HI).
14650
23ce3b1c
DJ
146512002-11-17 Stuart Hughes <seh@zee2.com>
14652
14653 * linux-arm-low.c (arm_num_regs): Increase.
14654 (arm_regmap): Include status register.
14655
146562002-11-17 Daniel Jacobowitz <drow@mvista.com>
14657
14658 * linux-low.c (register_addr): Remove incorrect -1 check.
14659
a9fa9f7d
DJ
146602002-08-29 Daniel Jacobowitz <drow@mvista.com>
14661
14662 * linux-low.c (linux_create_inferior): Call setpgid. Return
14663 the new PID.
14664 (unstopped_p, linux_signal_pid): Remove.
14665 (linux_target_ops): Remove linux_signal_pid.
14666 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14667 global instead of target method.
14668 * target.h (struct target_ops): Remove signal_pid. Update comment
14669 for create_inferior.
14670 * server.c (signal_pid): New variable.
14671 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14672 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14673 (attach_inferior): Set signal_pid.
14674
17574093
DJ
146752002-08-23 Daniel Jacobowitz <drow@mvista.com>
14676
14677 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14678
146792002-08-20 Jim Blandy <jimb@redhat.com>
14680
14681 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14682 default for this.
14683
146842002-08-01 Andrew Cagney <cagney@redhat.com>
14685
14686 * Makefile.in: Make chill references obsolete.
14687
146882002-07-24 Kevin Buettner <kevinb@redhat.com>
14689
14690 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14691 * configure: Regenerate.
14692 * config.in: Regenerate.
14693
146942002-07-09 David O'Brien <obrien@FreeBSD.org>
14695
14696 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14697 (perror_with_name, remote_close, remote_open, expect, play): Static.
14698
146992002-07-04 Michal Ludvig <mludvig@suse.cz>
14700
4b8dad4a 14701 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14702 byte offsets instead of an array of indexes.
14703 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14704
147052002-06-13 Daniel Jacobowitz <drow@mvista.com>
14706
14707 * regcache.c: Add comment.
14708
147092002-06-11 Daniel Jacobowitz <drow@mvista.com>
14710
14711 * thread-db.c: New file.
14712 * proc-service.c: New file.
14713 * acinclude.m4: New file.
14714 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14715 proc-service.o, and thread-db.o.
14716 (linux-low.o): Add USE_THREAD_DB.
14717 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14718 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14719 * aclocal.m4: Regenerated.
14720 * config.in: Regenerated.
14721 * configure: Regenerated.
14722 * configure.in: Check for proc_service.h, sys/procfs.h,
14723 thread_db.h, and linux/elf.h headrs.
14724 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14725 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14726 Check for -lthread_db and thread support.
14727 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14728 PowerPC, and SuperH.
14729 * i387-fp.c: Constify arguments.
14730 * i387-fp.h: Likewise.
14731 * inferiors.c: (struct thread_info): Renamed from
14732 `struct inferior_info'. Remove PID member. Use generic inferior
14733 list header. All uses updated.
14734 (inferiors, signal_pid): Removed.
14735 (all_threads): New variable.
14736 (get_thread): Define.
14737 (add_inferior_to_list): New function.
14738 (for_each_inferior): New function.
14739 (change_inferior_id): New function.
14740 (add_inferior): Removed.
14741 (remove_inferior): New function.
14742 (add_thread): New function.
14743 (free_one_thread): New function.
14744 (remove_thread): New function.
14745 (clear_inferiors): Use for_each_inferior and free_one_thread.
14746 (find_inferior): New function.
14747 (find_inferior_id): New function.
14748 (inferior_target_data): Update argument type.
14749 (set_inferior_target_data): Likewise.
14750 (inferior_regcache_data): Likewise.
14751 (set_inferior_regcache_data): Likewise.
14752 * linux-low.c (linux_bp_reinsert): Remove.
14753 (all_processes, stopping_threads, using_thrads)
14754 (struct pending_signals, debug_threads, pid_of): New.
14755 (inferior_pid): Replace with macro.
14756 (struct inferior_linux_data): Remove.
14757 (get_stop_pc, add_process): New functions.
14758 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14759 Use add_process and add_thread.
14760 (linux_attach_lwp): New function, based on old linux_attach. Use
14761 add_process and add_thread. Set stop_expected for new threads.
14762 (linux_attach): New function.
14763 (linux_kill_one_process): New function.
14764 (linux_kill): Kill all LWPs.
14765 (linux_thread_alive): Use find_inferior_id.
14766 (check_removed_breakpoints, status_pending_p): New functions.
14767 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14768 Update. Use WNOHANG. Wait for cloned processes also. Update process
14769 struct for the found process.
14770 (linux_wait_for_event): New function.
14771 (linux_wait): Use it. Support LWPs.
14772 (send_sigstop, wait_for_sigstop, stop_all_processes)
14773 (linux_resume_one_process, linux_continue_one_process): New functions.
14774 (linux_resume): Support LWPs.
14775 (REGISTER_RAW_SIZE): Remove.
14776 (fetch_register): Use register_size instead. Call supply_register.
14777 (usr_store_inferior_registers): Likewise. Call collect_register.
14778 Fix recursive case.
14779 (regsets_fetch_inferior_registers): Improve error message.
14780 (regsets_store_inferior_registers): Add debugging.
14781 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14782 (unstopped_p, linux_signal_pid): New functions.
14783 (linux_target_ops): Add linux_signal_pid.
14784 (linux_init_signals): New function.
14785 (initialize_low): Call it. Initialize using_threads.
14786 * regcache.c (inferior_regcache_data): Add valid
14787 flag.
14788 (get_regcache): Fetch registers lazily. Add fetch argument
14789 and update all callers.
14790 (regcache_invalidate_one, regcache_invalidate): New
14791 functions.
14792 (new_register_cache): Renamed from create_register_cache.
14793 Return the new regcache.
14794 (free_register_cache): Change argument to a void *.
14795 (registers_to_string, registers_from_string): Call get_regcache
14796 with fetch flag set.
14797 (register_data): Make static. Pass fetch flag to get_regcache.
14798 (supply_register): Call get_regcache with fetch flag clear.
14799 (collect_register): Call get_regcache with fetch flag set.
14800 (collect_register_as_string): New function.
14801 * regcache.h: Update.
14802 * remote-utils.c (putpkt): Flush after debug output and use
14803 stderr.
14804 Handle input interrupts while waiting for an ACK.
14805 (input_interrupt): Use signal_pid method.
14806 (getpkt): Flush after debug output and use stderr.
14807 (outreg): Use collect_register_as_string.
14808 (new_thread_notify, dead_thread_notify): New functions.
14809 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14810 and general_thread.
14811 (look_up_one_symbol): Flush after debug output.
14812 * server.c (step_thread, server_waiting): New variables.
14813 (start_inferior): Don't use signal_pid. Update call to mywait.
14814 (attach_inferior): Update call to mywait.
14815 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14816 (main): Don't fetch/store registers explicitly. Use
14817 set_desired_inferior. Support proposed ``Hs'' packet. Update
14818 calls to mywait.
14819 * server.h: Update.
14820 (struct inferior_list, struct_inferior_list_entry): New.
14821 * target.c (set_desired_inferior): New.
14822 (write_inferior_memory): Constify.
14823 (mywait): New function.
14824 * target.h: Update.
14825 (struct target_ops): New signal_pid method.
14826 (mywait): Removed macro, added prototype.
14827
14828 * linux-low.h (regset_func): Removed.
14829 (regset_fill_func, regset_store_func): New.
14830 (enum regset_type): New.
14831 (struct regset_info): Add type field. Use new operation types.
14832 (struct linux_target_ops): stop_pc renamed to get_pc.
14833 Add decr_pc_after_break and breakpoint_at.
14834 (get_process, get_thread_proess, get_process_thread)
14835 (strut process_info, all_processes, linux_attach_lwp)
14836 (thread_db_init): New.
14837
14838 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14839 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14840 (the_low_target): Add new members.
14841 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14842 (i386_store_fpxregset): Constify.
14843 (target_regsets): Add new kind identifier.
14844 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14845 (i386_set_pc): Add debugging.
14846 (i386_breakpoint_at): New function.
14847 (the_low_target): Add new members.
14848 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14849 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14850 (mips_breakpoint_at): New.
14851 (the_low_target): Add new members.
14852 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14853 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14854 (the_low_target): Add new members.
14855 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14856 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14857 (the_low_target): Add new members.
14858 * linux-x86-64-low.c (target_regsets): Add new kind
14859 identifier.
14860
148612002-05-15 Daniel Jacobowitz <drow@mvista.com>
14862
14863 From Martin Pool <mbp@samba.org>:
14864 * server.c (gdbserver_usage): New function.
14865 (main): Call it.
14866
148672002-05-14 Daniel Jacobowitz <drow@mvista.com>
14868
14869 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14870 stop_at -> stop_pc.
14871
148722002-05-04 Andrew Cagney <ac131313@redhat.com>
14873
14874 * Makefile.in: Remove obsolete code.
14875
148762002-04-24 Michal Ludvig <mludvig@suse.cz>
14877
14878 * linux-low.c (regsets_fetch_inferior_registers),
14879 (regsets_store_inferior_registers): Removed cast to int from
14880 ptrace() calls.
14881 * regcache.h: Added declaration of struct inferior_info.
14882
148832002-04-20 Daniel Jacobowitz <drow@mvista.com>
14884
14885 * inferiors.c (struct inferior_info): Add regcache_data.
14886 (add_inferior): Call create_register_cache.
14887 (clear_inferiors): Call free_register_cache.
14888 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14889 * regcache.c (struct inferior_regcache_data): New.
14890 (registers): Remove.
14891 (get_regcache): New function.
14892 (create_register_cache, free_register_cache): New functions.
14893 (set_register_cache): Don't initialize the register cache here.
14894 (registers_to_string, registers_from_string, register_data): Call
14895 get_regcache.
14896 * regcache.h: Add prototypes.
14897 * server.h: Likewise.
14898
148992002-04-20 Daniel Jacobowitz <drow@mvista.com>
14900
14901 * mem-break.c: New file.
14902 * mem-break.h: New file.
14903 * Makefile.in: Add mem-break.o rule; update server.h
14904 dependencies.
14905 * inferiors.c (struct inferior_info): Add target_data
14906 member.
14907 (clear_inferiors): Free target_data member if set.
14908 (inferior_target_data, set_inferior_target_data): New functions.
14909 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14910 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14911 * linux-low.c (linux_bp_reinsert): New variable.
14912 (struct inferior_linux_data): New.
14913 (linux_create_inferior): Use set_inferior_target_data.
14914 (linux_attach): Likewise. Call add_inferior.
14915 (linux_wait_for_one_inferior): New function.
14916 (linux_wait): Call it.
14917 (linux_write_memory): Add const.
14918 (initialize_low): Call set_breakpoint_data.
14919 * linux-low.h (struct linux_target_ops): Add breakpoint
14920 handling members.
14921 * server.c (attach_inferior): Remove extra add_inferior
14922 call.
14923 * server.h: Include mem-break.h. Update inferior.c
14924 prototypes.
14925 * target.c (read_inferior_memory)
14926 (write_inferior_memory): New functions.
14927 * target.h (read_inferior_memory)
14928 (write_inferior_memory): Change macros to prototypes.
14929 (struct target_ops): Update comments. Add const to write_memory
14930 definition.
14931
149322002-04-11 Daniel Jacobowitz <drow@mvista.com>
14933
14934 * linux-low.c (usr_store_inferior_registers): Support
14935 registers which are allowed to fail to store.
14936 * linux-low.h (linux_target_ops): Likewise.
14937 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14938 (ppc_cannot_store_register): FPSCR may not be storable.
14939
149402002-04-09 Daniel Jacobowitz <drow@mvista.com>
14941
14942 * server.h: Include <string.h> if HAVE_STRING_H.
14943 * ChangeLog: Correct paths in last ChangeLog entry.
14944
149452002-04-09 Daniel Jacobowitz <drow@mvista.com>
14946
14947 * linux-low.h: Remove obsolete prototypes.
14948 (struct linux_target_ops): New.
14949 (extern the_low_target): New.
14950 * linux-low.c (num_regs, regmap): Remove declarations.
14951 (register_addr): Use the_low_target explicitly.
14952 (fetch_register): Likewise.
14953 (usr_fetch_inferior_registers): Likewise.
14954 (usr_store_inferior_registers): Likewise.
14955 * linux-arm-low.c (num_regs): Remove.
14956 (arm_num_regs): Define.
14957 (arm_regmap): Renamed from regmap, made static.
14958 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14959 made static.
14960 (arm_cannot_store_register): Renamed from cannot_store_register,
14961 made static.
14962 (the_low_target): New.
14963 * linux-i386-low.c (num_regs): Remove.
14964 (i386_num_regs): Define.
14965 (i386_regmap): Renamed from regmap, made static.
14966 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14967 made static.
14968 (i386_cannot_store_register): Renamed from cannot_store_register,
14969 made static.
14970 (the_low_target): New.
14971 * linux-ia64-low.c (num_regs): Remove.
14972 (ia64_num_regs): Define.
14973 (ia64_regmap): Renamed from regmap, made static.
14974 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14975 made static.
14976 (ia64_cannot_store_register): Renamed from cannot_store_register,
14977 made static.
14978 (the_low_target): New.
14979 * linux-m68k-low.c (num_regs): Remove.
14980 (m68k_num_regs): Define.
14981 (m68k_regmap): Renamed from regmap, made static.
14982 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14983 made static.
14984 (m68k_cannot_store_register): Renamed from cannot_store_register,
14985 made static.
14986 (the_low_target): New.
14987 * linux-mips-low.c (num_regs): Remove.
14988 (mips_num_regs): Define.
14989 (mips_regmap): Renamed from regmap, made static.
14990 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14991 made static.
14992 (mips_cannot_store_register): Renamed from cannot_store_register,
14993 made static.
14994 (the_low_target): New.
14995 * linux-ppc-low.c (num_regs): Remove.
14996 (ppc_num_regs): Define.
14997 (ppc_regmap): Renamed from regmap, made static.
14998 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14999 made static.
15000 (ppc_cannot_store_register): Renamed from cannot_store_register,
15001 made static.
15002 (the_low_target): New.
15003 * linux-s390-low.c (num_regs): Remove.
15004 (s390_num_regs): Define.
15005 (s390_regmap): Renamed from regmap, made static.
15006 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15007 made static.
15008 (s390_cannot_store_register): Renamed from cannot_store_register,
15009 made static.
15010 (the_low_target): New.
15011 * linux-sh-low.c (num_regs): Remove.
15012 (sh_num_regs): Define.
15013 (sh_regmap): Renamed from regmap, made static.
15014 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15015 made static.
15016 (sh_cannot_store_register): Renamed from cannot_store_register,
15017 made static.
15018 (the_low_target): New.
15019 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15020 (the_low_target): New.
15021
150222002-04-09 Daniel Jacobowitz <drow@mvista.com>
15023
15024 * Makefile.in: Add stamp-h target.
15025 * configure.in: Create stamp-h.
15026 * configure: Regenerated.
15027
150282002-04-09 Daniel Jacobowitz <drow@mvista.com>
15029
15030 * inferiors.c: New file.
15031 * target.c: New file.
15032 * target.h: New file.
15033 * Makefile.in: Add target.o and inferiors.o. Update
15034 dependencies.
15035 * linux-low.c (inferior_pid): New static variable,
15036 moved from server.c.
15037 (linux_create_inferior): Renamed from create_inferior.
15038 Call add_inferior. Return 0 on success instead of a PID.
15039 (linux_attach): Renamed from myattach.
15040 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15041 (linux_thread_alive): Renamed from mythread_alive.
15042 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15043 child dies.
15044 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15045 (regsets_store_inferior_registers): Correct error message.
15046 Add missing ``return 0''.
15047 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15048 (linux_store_registers): Renamed from store_inferior_registers.
15049 (linux_read_memory): Renamed from read_inferior_memory.
15050 (linux_write_memory): Renamed from write_inferior_memory.
15051 (linux_target_ops): New structure.
15052 (initialize_low): Call set_target_ops ().
15053 * remote-utils.c (unhexify): New function.
15054 (hexify): New function.
15055 (input_interrupt): Send signals to ``signal_pid''.
15056 * server.c (inferior_pid): Remove.
15057 (start_inferior): Update create_inferior call.
15058 (attach_inferior): Call add_inferior.
15059 (handle_query): New function.
15060 (main): Call handle_query for `q' packets.
15061 * server.h: Include "target.h". Remove obsolete prototypes.
15062 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15063
150642002-04-09 Daniel Jacobowitz <drow@mvista.com>
15065
15066 * Makefile.in: Add WARN_CFLAGS. Update configury
15067 dependencies.
15068 * configure.in: Check for <string.h>
15069 * configure: Regenerate.
15070 * config.in: Regenerate.
15071 * gdbreplay.c: Include needed system headers.
15072 (remote_open): Remove strchr prototype.
15073 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15074 * regcache.c (supply_register): Change buf argument to const void *.
15075 (supply_register_by_name): Likewise.
15076 (collect_register): Change buf argument to void *.
15077 (collect_register_by_name): Likewise.
15078 * regcache.h: Add missing prototypes.
15079 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15080 * server.c (handle_query): New function.
15081 (attached): New static variable, moved out of main.
15082 (main): Quiet longjmp clobber warnings.
15083 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15084 * utils.c (error): Remove NORETURN.
15085 (fatal): Likewise.