linux-low: Remove usage of "register" keyword
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ae3e2ccf
SM
12017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4 usage of "register" keyword.
5
3e019bdc
SM
62017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7
8 * configure: Re-generate.
9
8465943a
SM
102017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11
12 * configure: Re-generate.
13
cf0dd6f0
SM
142017-06-17 Simon Marchi <simon.marchi@ericsson.com>
15
16 * Makefile.in (COMPILE.pre): Add "-x c++".
17
9845682b
SDJ
182017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
19
20 * fork-child.c: Conditionally include <signal.h>.
21
aefd8b33
SDJ
222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
23
24 * server.c (handle_general_set): Handle new packet
25 "QStartupWithShell".
26 (handle_query): Add "QStartupWithShell" to the list of supported
27 packets.
28 (gdbserver_usage): Add help text explaining the
29 new "--startup-with-shell" and "--no-startup-with-shell" CLI
30 options.
31 (captured_main): Recognize and act upon the presence of the new
32 CLI options.
33
2090129c
SDJ
342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
35 Pedro Alves <palves@redhat.com>
36
37 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
38 * configure: Regenerate.
39 * configure.srv (srv_linux_obj): Add "fork-child.o" and
40 "fork-inferior.o".
41 (i[34567]86-*-lynxos*): Likewise.
42 (spu*-*-*): Likewise.
43 * fork-child.c: New file.
44 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
45 and "environ.h".
46 (linux_ptrace_fun): New function.
47 (linux_create_inferior): Adjust function prototype to reflect
48 change on "target.h". Adjust function code to use
49 "fork_inferior".
50 (linux_request_interrupt): Delete "signal_pid".
51 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
52 (lynx_ptrace_fun): New function.
53 (lynx_create_inferior): Adjust function prototype to reflect
54 change on "target.h". Adjust function code to use
55 "fork_inferior".
56 * nto-low.c (nto_create_inferior): Adjust function prototype and
57 code to reflect change on "target.h". Update comments.
58 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
59 "common-terminal.h" and "environ.h".
60 (terminal_fd): Moved to fork-child.c.
61 (old_foreground_pgrp): Likewise.
62 (restore_old_foreground_pgrp): Likewise.
63 (last_status): Make it global.
64 (last_ptid): Likewise.
65 (our_environ): New variable.
66 (startup_with_shell): Likewise.
67 (program_name): Likewise.
68 (program_argv): Rename to...
69 (program_args): ...this.
70 (wrapper_argv): New variable.
71 (start_inferior): Delete function.
72 (get_exec_wrapper): New function.
73 (get_exec_file): Likewise.
74 (get_environ): Likewise.
75 (prefork_hook): Likewise.
76 (post_fork_inferior): Likewise.
77 (postfork_hook): Likewise.
78 (postfork_child_hook): Likewise.
79 (handle_v_run): Update code to deal with arguments coming from the
80 remote host. Update calls from "start_inferior" to
81 "create_inferior".
82 (captured_main): Likewise. Initialize environment variable. Call
83 "have_job_control".
84 * server.h (post_fork_inferior): New prototype.
85 (get_environ): Likewise.
86 (last_status): Declare.
87 (last_ptid): Likewise.
88 (signal_pid): Likewise.
89 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
90 (spu_ptrace_fun): New function.
91 (spu_create_inferior): Adjust function prototype to reflect change
92 on "target.h". Adjust function code to use "fork_inferior".
93 * target.c (target_terminal_init): New function.
94 (target_terminal_inferior): Likewise.
95 (target_terminal_ours): Likewise.
96 * target.h: Include <vector>.
97 (struct target_ops) <create_inferior>: Update prototype.
98 (create_inferior): Update macro.
99 * utils.c (gdb_flush_out_err): New function.
100 * win32-low.c (win32_create_inferior): Adjust function prototype
101 and code to reflect change on "target.h".
102
043a4934
SDJ
1032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
104
105 * inferiors.c (switch_to_thread): New function.
106
15652511
SDJ
1072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
108
109 * Makefile.in (SFILE): Add "common/job-control.c".
110 (OBS): Add "job-control.o".
111
21ea5acd
SDJ
1122017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
113
114 * Makefile: Remove "@host_makefile_frag@".
115
e13cb306
PA
1162017-05-05 Pedro Alves <palves@redhat.com>
117
118 * configure: Regenerate.
119
c94fee56
SDJ
1202017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
121
122 * configure: Regenerate.
123
a0ff9e1a
SM
1242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
125
126 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
127 software_single_step change of return type to
128 std::vector<CORE_ADDR>.
129 * linux-low.c (install_software_single_step_breakpoints):
130 Likewise.
131 * linux-low.h (install_software_single_step_breakpoints):
132 Likewise.
133
be628ab8
SDJ
1342017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
135
136 * remote-utils.c: Include "gdb_termios.h" instead of
137 "terminal.h".
138 * terminal.h: Delete file.
139
7c5ded6a
SDJ
1402017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
141
142 * server.c: Include <vector>.
143 <program_argv, wrapper_argv>: Convert to std::vector.
144 (start_inferior): Rewrite function to use C++.
145 (handle_v_run): Likewise. Update code that calculates the argv
146 based on the vRun packet; use C++.
147 (captured_main): Likewise.
148
436252de
SM
1492017-04-06 Simon Marchi <simon.marchi@ericsson.com>
150
151 * server.c (handle_v_cont): Initialize thread_resume::thread
152 with null_ptid.
153
9bf2a700
PA
1542017-04-05 Pedro Alves <palves@redhat.com>
155
156 * configure: Regenerate.
157
a121b7c1
PA
1582017-04-05 Pedro Alves <palves@redhat.com>
159
160 * gdbreplay.c (sync_error): Constify.
161 * linux-x86-low.c (push_opcode): Constify.
162
21c8a587
PA
1632017-04-05 Pedro Alves <palves@redhat.com>
164
165 * win32-low.c (get_child_debug_event)
166 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
167 Report TARGET_WAITKIND_SPURIOUS instead.
168
fb32b4f7
PA
1692017-04-05 Pedro Alves <palves@redhat.com>
170
171 * remote-utils.c (remote_prepare, remote_open): Constify.
172 * remote-utils.h (remote_prepare, remote_open): Constify.
173 * server.c (captured_main): Constify 'port' handling.
174
65dd1e59
SM
1752017-04-04 Simon Marchi <simon.marchi@ericsson.com>
176
177 * Makefile.in (clean): Clear .deps.
178
8fa5b777
SM
1792017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
180
181 * .gitignore: Remove generated files, replace with wildcard.
182 * (clean): Replace removal of generated files with wildcard.
183 (version.c): Replace with...
184 (version-generated.c): ...this.
185 (xml-builtin.c): Replace with...
186 (xml-builtin-generated.c): ...this.
187 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
188 (%.c: *regformats*): Replace with...
189 (%-generated.c: *regformats*): ...this.
190
a12e714b
MF
1912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
192
193 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
194 (xtensa_fill_gregset): Call collect_register_by_name for
195 threadptr register.
196 (xtensa_store_gregset): Call supply_register_by_name for
197 threadptr register.
198
1a09b50a
MF
1992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
200
201 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
202 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
203 (xtensa_store_gregset): Call supply_register for all registers in
204 a0_regnum..a0_regnum + C0_NREGS range.
205
1a01e7c6
SM
2062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
207
208 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
209 (ax-ipa.o: ax.c): Remove.
210 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
211 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
212 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
213 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
214 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
215
36bc18a8
SM
2162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
217
218 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
219 (print-utils-ipa.o: ../common/print-utils.c): Remove.
220 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
221 (errors-ipa.o: ../common/errors.c): Remove.
222 (format-ipa.o: ../common/format.c): Remove.
223 (common-utils-ipa.o: ../common/common-utils.c): Remove.
224
a8ebe3d5
SM
2252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
226
227 * Makefile.in (%-ipa.o: %.c): New rule.
228 (tracepoint-ipa.o: tracepoint.c): Remove.
229 (utils-ipa.o: utils.c): Remove.
230 (remote-utils-ipa.o: remote-utils.c): Remove.
231 (regcache-ipa.o: regcache.c): Remove.
232 (i386-linux-ipa.o: i386-linux.c): Remove.
233 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
234 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
235 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
236 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
237 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
238 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
239 (amd64-linux-ipa.o: amd64-linux.c): Remove.
240 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
241 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
242 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
243 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
244 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
245 (aarch64-ipa.o: aarch64.c): Remove.
246 (s390-linux32-ipa.o: s390-linux32.c): Remove.
247 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
248 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
249 (s390-linux64-ipa.o: s390-linux64.c): Remove.
250 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
251 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
252 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
253 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
254 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
255 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
256 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
257 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
258 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
259 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
260 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
261 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
262 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
263 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
264 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
265 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
266 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
267 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
268 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
269 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
270 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
271 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
272 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
273 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
274 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
275 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
276 (tdesc-ipa.o: tdesc.c): Remove.
277 (x32-linux-ipa.o: x32-linux.c): Remove.
278 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
279 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
280
50cfacb7
SM
2812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
282
283 * Makefile.in (%.o: ../arch/%.c): New rule.
284 (arm.o: ../arch/arm.c): Remove.
285 (arm-linux.o: ../arch/arm-linux.c): Remove.
286 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
287 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
288
c5a22423
SM
2892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
290
291 * Makefile.in (%.o: ../nat/%.c): New rule.
292 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
293 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
294 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
295 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
296 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
297 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
298 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
299 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
300 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
301 (linux-personality.o: ../nat/linux-personality.c): Remove.
302 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
303 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
304 (x86-linux.o: ../nat/x86-linux.c): Remove.
305 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
306 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
307
6bda016b
SM
3082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
309
310 * Makefile.in (%.o: ../common/%.c): New rule.
311 (signals.o: ../common/signals.c): Remove.
312 (print-utils.o: ../common/print-utils.c): Remove.
313 (rsp-low.o: ../common/rsp-low.c): Remove.
314 (common-utils.o: ../common/common-utils.c): Remove.
315 (posix-strerror.o: ../common/posix-strerror.c): Remove.
316 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
317 (vec.o: ../common/vec.c): Remove.
318 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
319 (xml-utils.o: ../common/xml-utils.c): Remove.
320 (ptid.o: ../common/ptid.c): Remove.
321 (buffer.o: ../common/buffer.c): Remove.
322 (format.o: ../common/format.c): Remove.
323 (filestuff.o: ../common/filestuff.c): Remove.
324 (agent.o: ../common/agent.c): Remove.
325 (errors.o: ../common/errors.c): Remove.
326 (environ.o: ../common/environ.c): Remove.
327 (common-debug.o: ../common/common-debug.c): Remove.
328 (cleanups.o: ../common/cleanups.c): Remove.
329 (common-exceptions.o: ../common/common-exceptions.c): Remove.
330 (fileio.o: ../common/fileio.c): Remove.
331 (common-regcache.o: ../common/common-regcache.c): Remove.
332 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
333 (new-op.o: ../common/new-op.c): Remove.
334 (btrace-common.o: ../common/btrace-common.c): Remove.
335
21122961
SM
3362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
337
338 * Makefile.in (%.o: ../target/%.c): New rule.
339 (waitstatus.o: ../target/waitstatus.c): Remove.
340
c362e621
SM
3412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
342
343 * Makefile.in
344 (%.c: ../regformats/%.dat,
345 (%.c: ../regformats/arm/%.dat,
346 (%.c: ../regformats/i386/%.dat,
347 (%.c: ../regformats/rs6000/%.dat): New rules.
348 (aarch64.c): Remove.
349 (reg-arm.c): Remove.
350 (arm-with-iwmmxt.c): Remove.
351 (arm-with-vfpv2.c): Remove.
352 (arm-with-vfpv3.c): Remove.
353 (arm-with-neon.c): Remove.
354 (reg-bfin.c): Remove.
355 (reg-cris.c): Remove.
356 (reg-crisv32.c): Remove.
357 (i386.c): Remove.
358 (i386-linux.c): Remove.
359 (i386-avx.c): Remove.
360 (i386-avx-linux.c): Remove.
361 (i386-avx-avx512.c): Remove.
362 (i386-avx-avx512-linux.c): Remove.
363 (i386-mpx.c): Remove.
364 (i386-mpx-linux.c): Remove.
365 (i386-avx-mpx-avx512-pku.c): Remove.
366 (i386-avx-mpx-avx512-pku-linux.c): Remove.
367 (i386-avx-mpx.c): Remove.
368 (i386-avx-mpx-linux.c): Remove.
369 (i386-mmx.c): Remove.
370 (i386-mmx-linux.c): Remove.
371 (reg-ia64.c): Remove.
372 (reg-m32r.c): Remove.
373 (reg-m68k.c): Remove.
374 (reg-cf.c): Remove.
375 (mips-linux.c): Remove.
376 (mips-dsp-linux.c): Remove.
377 (mips64-linux.c): Remove.
378 (mips64-dsp-linux.c): Remove.
379 (nios2-linux.c): Remove.
380 (powerpc-32.c): Remove.
381 (powerpc-32l.c): Remove.
382 (powerpc-altivec32l.c): Remove.
383 (powerpc-cell32l.c): Remove.
384 (powerpc-vsx32l.c): Remove.
385 (powerpc-isa205-32l.c): Remove.
386 (powerpc-isa205-altivec32l.c): Remove.
387 (powerpc-isa205-vsx32l.c): Remove.
388 (powerpc-e500l.c): Remove.
389 (powerpc-64l.c): Remove.
390 (powerpc-altivec64l.c): Remove.
391 (powerpc-cell64l.c): Remove.
392 (powerpc-vsx64l.c): Remove.
393 (powerpc-isa205-64l.c): Remove.
394 (powerpc-isa205-altivec64l.c): Remove.
395 (powerpc-isa205-vsx64l.c): Remove.
396 (s390-linux32.c): Remove.
397 (s390-linux32v1.c): Remove.
398 (s390-linux32v2.c): Remove.
399 (s390-linux64.c): Remove.
400 (s390-linux64v1.c): Remove.
401 (s390-linux64v2.c): Remove.
402 (s390-te-linux64.c): Remove.
403 (s390-vx-linux64.c): Remove.
404 (s390-tevx-linux64.c): Remove.
405 (s390x-linux64.c): Remove.
406 (s390x-linux64v1.c): Remove.
407 (s390x-linux64v2.c): Remove.
408 (s390x-te-linux64.c): Remove.
409 (s390x-vx-linux64.c): Remove.
410 (s390x-tevx-linux64.c): Remove.
411 (tic6x-c64xp-linux.c): Remove.
412 (tic6x-c64x-linux.c): Remove.
413 (tic6x-c62x-linux.c): Remove.
414 (reg-sh.c): Remove.
415 (reg-sparc64.c): Remove.
416 (reg-spu.c): Remove.
417 (amd64.c): Remove.
418 (amd64-linux.c): Remove.
419 (amd64-avx.c): Remove.
420 (amd64-avx-linux.c): Remove.
421 (amd64-avx-avx512.c): Remove.
422 (amd64-avx-avx512-linux.c): Remove.
423 (amd64-mpx.c): Remove.
424 (amd64-mpx-linux.c): Remove.
425 (amd64-avx-mpx-avx512-pku.c): Remove.
426 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
427 (amd64-avx-mpx.c): Remove.
428 (amd64-avx-mpx-linux.c): Remove.
429 (x32.c): Remove.
430 (x32-linux.c): Remove.
431 (x32-avx.c): Remove.
432 (x32-avx-linux.c): Remove.
433 (x32-avx-avx512.c): Remove.
434 (x32-avx-avx512-linux.c): Remove.
435 (reg-xtensa.c): Remove.
436 (reg-tilegx.c): Remove.
437 (reg-tilegx32.c): Remove.
438
1672e0d9
SDJ
4392017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
440
441 * Makefile.in (SFILES): Add "common/environ.c".
442 (OBJS): Add "common/environ.h".
443
239b6d10
WT
4442017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
445
446 * configure.ac: Check if the fs_base and gs_base members of
447 `struct user_regs_struct' exist.
448 * config.in: Regenerated.
449 * configure: Likewise.
450
694b382c
AT
4512017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
452
453 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
454 target_read_memory.
455 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
456 (get_next_pcs_syscall_next_pc): Likewise.
457
7dc53023
LM
4582016-12-23 Luis Machado <lgustavo@codesourcery.com>
459
460 * win32-i386-low.c: Fix incorrect reference to a couple source files.
461 * nto-x86-low.c: Likewise.
462
ad02e4fe
SM
4632016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
464
465 * Makefile.in: Include disable-implicit-rules.mk.
466
dcb07cfa
PA
4672016-11-23 Pedro Alves <palves@redhat.com>
468
469 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
470 (debug_vprintf): Use std::chrono::steady_clock instead of
471 gettimeofday. Use '.' instead of ':'.
472 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
473 (get_timestamp): Use std::chrono::steady_clock instead of
474 gettimeofday.
475
8629c02c
SM
4762016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * Makefile.in: Fix whitespace formatting.
479
b593ecca
SM
4802016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
481
482 * Makefile.in (SFILES, OBS): Flatten list and order
483 alphabetically.
484
9986ba08
PA
4852016-11-23 Pedro Alves <palves@redhat.com>
486
487 * event-loop.c (handle_file_event): Use warning.
488 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
489 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
490 Use warning.
491
4eefa7bc
PA
4922016-11-23 Pedro Alves <palves@redhat.com>
493
494 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
495 output.
496 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
497 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
498 debug_printf and debug_flush for debug output.
499 * server.c (handle_general_set): Likewise.
500 * thread-db.c (try_thread_db_load): Use debug_printf for debug
501 output.
502
5443506e
SM
5032016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
504
505 * Makefile.in (.c.o): Replace rule with ...
506 (%.o: %.c): ... this one.
507
3b165252
SM
5082016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
509
510 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
511 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
512 make.
513 * configure.ac: Remove checks for the make program.
514 * configure: Re-generate.
515
0bcda685
PA
5162016-10-28 Pedro Alves <palves@redhat.com>
517
518 * Makefile.in (CXX_DIALECT): Get from configure.
519 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
520 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
521 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
522 * config.in: Regenerate.
523 * configure: Regenerate.
524
c3805894
YQ
5252016-10-27 Yao Qi <yao.qi@linaro.org>
526
527 * linux-low.c (linux_supports_range_stepping): Return true if
528 can_software_single_step return true.
529
89342618
YQ
5302016-10-27 Yao Qi <yao.qi@linaro.org>
531
532 * inferiors.c (find_inferior_in_random): New function.
533 * inferiors.h (find_inferior_in_random): Declare.
534 * linux-low.c (linux_wait_for_event_filtered): Call
535 find_inferior_in_random instead of find_inferior.
536
e3652c84
YQ
5372016-10-27 Yao Qi <yao.qi@linaro.org>
538
539 * linux-low.c (linux_wait_1): If single-step breakpoints are
540 inserted, remove them.
541
5a04c4cf
PA
5422016-10-26 Pedro Alves <palves@redhat.com>
543
544 * linux-low.c (handle_extended_wait): Link parent/child fork
545 threads.
546 (linux_wait_1): Unlink them.
547 (linux_set_resume_request): Ignore resume requests for
548 already-resumed and unhandled fork child threads.
549 * linux-low.h (struct lwp_info) <fork_relative>: New field.
550 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
551 New functions.
552 (handle_v_requests) <vCont>: Don't call require_running.
553 * server.h (in_queued_stop_replies): New declaration.
554
cb93dc7f
YQ
5552016-10-24 Yao Qi <yao.qi@linaro.org>
556
557 PR server/20733
558 * linux-aarch64-low.c (append_insns): Cast the return value to
559 'uint32_t *'.
560
a1078bea
YQ
5612016-10-10 Yao Qi <yao.qi@linaro.org>
562
563 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
564
1fb77080
SDJ
5652016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * target.c (target_supports_multi_process): New function, moved
568 from...
569 * target.h (target_supports_multi_process): ... here. Remove
570 macro.
571
39b5a3b9
TT
5722016-10-05 Tom Tromey <tom@tromey.com>
573
574 PR remote/20655:
575 * tracepoint.c (handle_tracepoint_bkpts): Check
576 ipa_error_tracepoint, not ipa_stopping_tracepoint.
577
c1d0b70a
YQ
5782016-10-05 Yao Qi <yao.qi@linaro.org>
579
580 * configure.srv: Update the path of arm-*.xml files.
581
0a69eedb
YQ
5822016-10-05 Terry Guo <terry.guo@arm.com>
583 Yao Qi <yao.qi@linaro.org>
584
585 * Makefile.in: Adjust the path of rules.
586 * configure.srv: Update the path of xml files.
587 * regformats/arm-with-iwmmxt.dat: Regenerated.
588 * regformats/arm-with-neon.dat: Likewise.
589 * regformats/arm-with-vfpv2.dat: Likewise.
590 * regformats/arm-with-vfpv3.dat Likewise.
591
17e16485
YQ
5922016-09-30 Yao Qi <yao.qi@linaro.org>
593
594 PR gdbserver/20627
595 * target.c (target_stop_and_wait): Don't call
596 target_continue_no_signal, use resume_stop instead.
597
edeeb602
YQ
5982016-09-26 Yao Qi <yao.qi@linaro.org>
599
600 * linux-low.c (linux_wait_1): Call debug_exit.
601
503b1c39
PA
6022016-09-23 Pedro Alves <palves@redhat.com>
603
604 * Makefile.in (SFILES): Add common/new-op.c.
605 (OBS): Add common/new-op.o.
606 (new-op.o): New rule.
607
74172ecf
SM
6082016-09-21 Simon Marchi <simon.marchi@ericsson.com>
609
610 * .gitinore: Ignore more files.
611
fc6cda2e
YQ
6122016-09-21 Yao Qi <yao.qi@linaro.org>
613
614 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
615 23.
616
bc1e6c81
SDJ
6172016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
618
619 * server.c (start_inferior): Call target_mourn_inferior instead of
620 mourn_inferior; pass ptid_t argument to it.
621 (resume): Likewise.
622 (handle_target_event): Likewise.
623 * target.c (target_mourn_inferior): New function.
624 * target.h (mourn_inferior): Delete macro.
625
0e00e962
AA
6262016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
627
628 * linux-low.c (lwp_is_stepping): New function.
629
1d8cb77d
CL
6302016-09-06 Carl Love <cel@us.ibm.com>
631
632 * server.c (start_inferior): Fixed comment, requested comment change
633 didn't get updated correctly. Removed reference to ptrace () call as
634 it is only true on Linux systems.
635
7313bced
CL
6362016-09-06 Carl Love <cel@us.ibm.com>
637
638 * server.c (start_inferior): Do not call
639 function target_post_create_inferior () if the
640 inferior process has already exited.
641
cf6de44d
PA
6422016-09-05 Pedro Alves <palves@redhat.com>
643
644 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
645 (COMPILE.pre, CC_LD): Use CXX directly.
646 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
647 * acinclude.m4: Don't include build-with-cxx.m4.
648 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
649 * configure: Regenerate.
650
c1da6748
AT
6512016-09-02 Akash Trehan <akash.trehan123@gmail.com>
652
653 PR gdb/19495
654 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
655 call writing data to own_buf.
656
f2b9e3df
SDJ
6572016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
658
659 * target.c (mywait): Call target_wait instead of
660 the_target->wait.
661 (target_wait): New function.
662
049a8570
SDJ
6632016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
664
665 * server.c (start_inferior): New variable 'ptid'. Replace calls
666 to the_target->resume by target_continue{,_no_signal}, depending
667 on the case.
668 * target.c (target_stop_and_wait): Call target_continue_no_signal
669 instead of the_target->resume.
670 (target_continue): New function.
671
3aa5cfa0
AT
6722016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
673
674 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
675
754653a7
AZ
6762016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
677
678 PR server/20491
679 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
680 ps_prochandle.
681 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
682 * linux-arm-low.c (ps_get_thread_area): Likewise.
683 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
684 * linux-m68k-low.c (ps_get_thread_area): Likewise.
685 * linux-mips-low.c (ps_get_thread_area): Likewise.
686 * linux-nios2-low.c (ps_get_thread_area): Likewise.
687 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
688 * linux-x86-low.c (ps_get_thread_area): Likewise.
689 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
690
ed036b40
PA
6912016-08-19 Pedro Alves <palves@redhat.com>
692
693 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
694
c8ef42ee
PA
6952016-08-19 Pedro Alves <palves@redhat.com>
696
697 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
698 comment. Use memcpy instead of casting through unsigned long.
699
9c235a72
PA
7002016-08-19 Pedro Alves <palves@redhat.com>
701
702 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
703 allocating around 0x80000000.
704
201506da
PA
7052016-08-19 Pedro Alves <palves@redhat.com>
706
707 PR gdb/20415
708 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
709 (x32-avx512-linux-ipa.o): New rules.
710 * configure.ac (x86_64-*-linux*): New x32 check.
711 * configure.srv (ipa_x32_linux_regobj): New.
712 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
713 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
714 descriptions.
715 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
716 descriptions.
717 * configure: Regenerate.
718
f348d89a
PA
7192016-08-09 Pedro Alves <palves@redhat.com>
720
721 PR gdb/18653
722 * Makefile.in (OBS): Add signals-state-save-restore.o.
723 (signals-state-save-restore.o): New rule.
724 * config.in: Regenerate.
725 * configure: Regenerate.
726 * linux-low.c: Include "signals-state-save-restore.h".
727 (linux_create_inferior): Call
728 restore_original_signals_state.
729 * server.c: Include "dispositions-save-restore.h".
730 (captured_main): Call save_original_signals_state.
731
1baf5149
PA
7322016-08-05 Pedro Alves <palves@redhat.com>
733
734 * configure: Regenerate.
735
fcd4a73d
YQ
7362016-08-04 Yao Qi <yao.qi@linaro.org>
737
738 * linux-low.c (regsets_fetch_inferior_registers): Check
739 errno is ESRCH or not.
740
979659d0
YQ
7412016-08-02 Yao Qi <yao.qi@linaro.org>
742
743 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
744 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
745 (thread_db_load_search): Update.
746 (try_thread_db_load_1): Don't look for td_ta_event_addr,
747 td_ta_set_event and td_ta_event_getmsg.
748
6598661d
PA
7492016-07-26 Pedro Alves <palves@redhat.com>
750
751 PR server/20414
752 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
753 of unsigned long for 64-bit registers and use uint32_t instead of
754 unsigned int for 32-bit registers.
755
9cf12d57
PA
7562016-07-26 Pedro Alves <palves@redhat.com>
757
758 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
759 to 'ptrace'.
760
305450ed
TT
7612016-07-21 Tom Tromey <tom@tromey.com>
762
763 * configure: Rebuild.
764
2583da7c
YQ
7652016-07-21 Yao Qi <yao.qi@linaro.org>
766
767 * mem-break.c (find_gdb_breakpoint): Cast bp to
768 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
769
21536b36
YQ
7702016-07-21 Yao Qi <yao.qi@linaro.org>
771
772 * server.c (handle_v_requests): Support s and S actions
773 if target_supports_software_single_step return true.
774
8901d193
YQ
7752016-07-21 Yao Qi <yao.qi@linaro.org>
776
777 * linux-low.c (resume_stopped_resumed_lwps): If resume request
778 is resume_step, call maybe_hw_step.
779 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
780 and unstop them.
781 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
782 breakpoints or not.
783 (proceed_one_lwp): If resume request is resume_step, install
784 reinsert breakpoints and call maybe_hw_step.
785
0e9a339e
YQ
7862016-07-21 Yao Qi <yao.qi@linaro.org>
787
788 * linux-low.c (proceed_one_lwp): Declare.
789 (linux_resume_one_thread): Remove local variable 'step'.
790 Lift code enqueue signal. Call proceed_one_lwp instead of
791 linux_resume_one_lwp.
792
4281b351
YQ
7932016-07-21 Yao Qi <yao.qi@linaro.org>
794
795 * linux-low.c (linux_resume_one_thread): Call
796 enqueue_pending_signal.
797
984a2c04
YQ
7982016-07-21 Yao Qi <yao.qi@linaro.org>
799
800 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
801 * inferiors.c (do_restore_current_thread_cleanup): New function.
802 (make_cleanup_restore_current_thread): Likewise.
803 * linux-low.c (install_software_single_step_breakpoints): Call
804 make_cleanup_restore_current_thread. Switch current_thread to
805 thread.
806
bec903c9
YQ
8072016-07-21 Yao Qi <yao.qi@linaro.org>
808
809 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
810 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
811 (clone_one_breakpoint): Likewise.
812 (delete_reinsert_breakpoints): Change parameter to thread.
813 Callers updated.
814 (has_reinsert_breakpoints): Likewise.
815 (uninsert_reinsert_breakpoints): Likewise.
816 (reinsert_reinsert_breakpoints): Likewise.
817 * mem-break.h (set_reinsert_breakpoint): Update declaration.
818 (delete_reinsert_breakpoints): Likewise.
819 (reinsert_reinsert_breakpoints): Likewise.
820 (uninsert_reinsert_breakpoints): Likewise.
821 (has_reinsert_breakpoints): Likewise.
822
63c40ec7
YQ
8232016-07-21 Yao Qi <yao.qi@linaro.org>
824
825 * inferiors.c (get_thread_process): Make parameter const.
826 * inferiors.h (get_thread_process): Update declaration.
827 * mem-break.c (clone_all_breakpoints): Remove all parameters.
828 Add new parameters child_thread and parent_thread. Callers
829 updated.
830 * mem-break.h (clone_all_breakpoints): Update declaration.
831
9aa76cd0
YQ
8322016-07-21 Yao Qi <yao.qi@linaro.org>
833
834 * mem-break.c (struct breakpoint) <cond_list>: Remove.
835 <command_list, handler>: Remove.
836 (struct gdb_breakpoint): New.
837 (struct other_breakpoint): New.
838 (struct reinsert_breakpoint): New.
839 (is_gdb_breakpoint): New function.
840 (any_persistent_commands): Update command_list if
841 is_gdb_breakpoint returns true.
842 (set_breakpoint): Create breakpoints according to their types.
843 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
844 (set_gdb_breakpoint_1): Likewise.
845 (set_gdb_breakpoint): Likewise.
846 (clear_breakpoint_conditions): Change parameter type to
847 'struct gdb_breakpoint *'.
848 (clear_breakpoint_commands): Likewise.
849 (clear_breakpoint_conditions_and_commands): Likewise.
850 (add_condition_to_breakpoint): Likewise.
851 (add_breakpoint_condition): Likewise.
852 (add_commands_to_breakpoint): Likewise.
853 (check_breakpoints): Check other_breakpoint.
854 (clone_one_breakpoint): Clone breakpopint according to its type.
855 * mem-break.h (struct gdb_breakpoint): Declare.
856 (set_gdb_breakpoint): Update declaration.
857 (clear_breakpoint_conditions_and_commands): Likewise.
858 (add_breakpoint_condition): Likewise.
859 (add_breakpoint_commands): Likewise.
860 * server.c (process_point_options): Change parameter type to
861 'struct gdb_breakpoint *'.
862
811f8301
YQ
8632016-07-21 Yao Qi <yao.qi@linaro.org>
864
865 * mem-break.c (set_breakpoint_at): Rename it to ...
866 (set_breakpoint_type_at): ... it.
867 (set_breakpoint_at): Call set_breakpoint_type_at.
868 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
869 * mem-break.h (set_breakpoint_at): Update comments.
870
b1c51e36
CLT
8712016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
872
873 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
874 to buf parameter.
875 (nios2_store_gregset): Likewise.
876
ced2dffb
PA
8772016-07-01 Pedro Alves <palves@redhat.com>
878 Antoine Tremblay <antoine.tremblay@ericsson.com>
879
880 * linux-low.c: Change interface to take the target lwp_info
881 pointer directly and return void. Handle detaching from a zombie
882 thread.
883 (linux_detach_lwp_callback): New function.
884 (linux_detach): Detach from the leader thread after detaching from
885 the clone threads.
886
2ac09a5b
YQ
8872016-06-28 Yao Qi <yao.qi@linaro.org>
888
889 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
890 for variable new_offset.
891 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
892 (aarch64_ftrace_insn_reloc_cb): Likewise.
893 (aarch64_ftrace_insn_reloc_tb): Likewise.
894 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
895 PRIx64 instead of PRIx32.
896
79e7fd4f
YQ
8972016-06-28 Yao Qi <yao.qi@linaro.org>
898
899 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
900 (the_low_target): Install arm_get_syscall_trapinfo.
901
061fc021
YQ
9022016-06-28 Yao Qi <yao.qi@linaro.org>
903
904 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
905 function.
906 (the_low_target): Install aarch64_get_syscall_trapinfo.
907
4cc32bec
YQ
9082016-06-28 Yao Qi <yao.qi@linaro.org>
909
910 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
911 Callers updated.
912 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
913 Remove parameter sysno.
914 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
915 sysret.
916
782c1122
AA
9172016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
918
919 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
920 (s390_emit_ne_goto): Likewise.
921 (s390_emit_lt_goto): Likewise.
922 (s390_emit_le_goto): Likewise.
923 (s390_emit_gt_goto): Likewise.
924 (s390_emit_ge_goto): Likewise.
925 (s390x_emit_eq_goto): Likewise.
926 (s390x_emit_ne_goto): Likewise.
927 (s390x_emit_lt_goto): Likewise.
928 (s390x_emit_le_goto): Likewise.
929 (s390x_emit_gt_goto): Likewise.
930 (s390x_emit_ge_goto): Likewise.
931 (s390_emit_ops_impl): Mark variable static.
932 (s390x_emit_ops): Likewise.
933
2e7b624b
YQ
9342016-06-17 Yao Qi <yao.qi@linaro.org>
935
936 * linux-low.c (handle_extended_wait): Call
937 uninsert_reinsert_breakpoints for the parent process. Remove
938 reinsert breakpoints from the child process. Reinsert them to
939 the parent process when vfork is done.
940 * mem-break.c (uninsert_reinsert_breakpoints): New function.
941 (reinsert_reinsert_breakpoints): New function.
942 * mem-break.h (uninsert_reinsert_breakpoints): Declare
943 (reinsert_reinsert_breakpoints): Declare.
944
8a81c5d7
YQ
9452016-06-17 Yao Qi <yao.qi@linaro.org>
946
947 * linux-low.c (handle_extended_wait): If the parent is doing
948 step-over, remove the reinsert breakpoints from the forked child.
949
f50bf8e5
YQ
9502016-06-17 Yao Qi <yao.qi@linaro.org>
951
952 * linux-low.c (unsuspend_all_lwps): Declare.
953 (linux_low_filter_event): If thread exited, call finish_step_over.
954 If step-over is finished, unsuspend other threads.
955
8376a3cb
YQ
9562016-06-17 Yao Qi <yao.qi@linaro.org>
957
958 * linux-low.c (linux_resume_one_lwp_throw): Assert
959 has_reinsert_breakpoints returns false.
960 * mem-break.c (delete_disabled_breakpoints): Assert
961 bp type isn't reinsert_breakpoint.
962
f79b145d
YQ
9632016-06-17 Yao Qi <yao.qi@linaro.org>
964
965 * linux-low.c (maybe_hw_step): New function.
966 (linux_resume_one_lwp_throw): Call maybe_hw_step.
967 (finish_step_over): Switch current_thread to lwp temporarily,
968 and assert has_reinsert_breakpoints returns true.
969 (proceed_one_lwp): Call maybe_hw_step.
970 * mem-break.c (has_reinsert_breakpoints): New function.
971 * mem-break.h (has_reinsert_breakpoints): Declare.
972
0ae534d2
JT
9732016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
974
975 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
976
fcdad592
YQ
9772016-05-17 Yao Qi <yao.qi@linaro.org>
978
979 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
980 instead of find_inferior.
981
9e784964
YQ
9822016-05-05 Yao Qi <yao.qi@linaro.org>
983
984 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
985 Initialize res to zero.
986
cf2ebb6e
YQ
9872016-05-05 Yao Qi <yao.qi@linaro.org>
988
989 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
990 to uint32_t.
991
c1aebf87
UW
9922016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
993
994 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
995 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
996 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
997
35fd2deb 9982016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 999 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1000
1001 * tracepoint.c (write_inferior_int8): New function.
1002 (cmd_qtenable_disable): Write enable flag using
1003 write_inferior_int8.
1004
484b3c32
YQ
10052016-04-25 Yao Qi <yao.qi@linaro.org>
1006
1007 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1008 (need_step_over_p): Return zero if the LWP has pending signals
1009 can be delivered on software single step target.
1010
85ba7d86
YQ
10112016-04-25 Yao Qi <yao.qi@linaro.org>
1012
1013 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1014 return instead of error.
1015
3539aa13
YQ
10162016-04-22 Yao Qi <yao.qi@linaro.org>
1017
1018 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1019 to 23.
1020
5b061e98
YQ
10212016-04-22 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1024 signal when stepping over breakpoint with software single
1025 step.
1026
3451269c
PA
10272016-04-21 Pedro Alves <palves@redhat.com>
1028
1029 * linux-s390-low.c (s390_collect_ptrace_register)
1030 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1031 add casts.
1032 (s390_check_regset): Use void * instead of gdb_byte *.
1033
a2358508
PA
10342016-04-20 Pedro Alves <palves@redhat.com>
1035
1036 * configure: Renegerate.
1037
6885166d
YQ
10382016-04-20 Yao Qi <yao.qi@linaro.org>
1039
1040 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1041 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1042 number 16.
1043 (arm_store_gregset): Likewise.
1044
2b863f51
WT
10452016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1046
1047 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1048 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1049 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1050 (amd64-avx-mpx-linux.c): New rules.
1051 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1052 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1053 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1054 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1055 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1056 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1057 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1058 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1059 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1060 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1061 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1062 * linux-x86-low.c (x86_linux_read_description): Add case for
1063 X86_XSTATE_AVX_MPX_MASK.
1064 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1065 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1066 init_registers_i386_avx_mpx_linux.
1067 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1068 (initialize_low_tracepoint): Call
1069 init_registers_i386_avx_mpx_linux.
1070 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1071 (initialize_low_tracepoint): Call
1072 init_registers_amd64_avx_mpx_linux.
1073 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1074 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1075 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1076 declarations.
1077
9b30624b
PA
10782016-04-18 Pedro Alves <palves@redhat.com>
1079
1080 * configure: Regenerate.
1081
45e3745e
AT
10822016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1083
1084 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1085 (aarch64_emit_sub): Likewise.
1086
2afc13ff
PA
10872016-04-12 Pedro Alves <palves@redhat.com>
1088
1089 * utils.c (prepare_to_throw_exception): Delete.
1090
6e774b13
SM
10912016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1094
4dca19f8
MK
10952016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1096
1097 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1098
d0a9981f
MK
10992016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1100
1101 * linux-aarch64-ipa.c: Add <elf.h> include.
1102 * linux-ppc-ipa.c: Add <elf.h> include.
1103 * linux-s390-ipa.c: Add <elf.h> include.
1104
252db07e
MK
11052016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1106
1107 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1108 (get_raw_reg_ptr): Likewise.
1109 (get_trace_state_variable_value_ptr): Likewise.
1110 (set_trace_state_variable_value_ptr): Likewise.
1111 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1112 char *.
1113
14e2b6d9
MK
11142016-03-31 Wei-cheng Wang <cole945@gmail.com>
1115 Marcin Kościelnicki <koriakin@0x04.net>
1116
1117 PR/17221
1118 * linux-ppc-low.c (emit_insns): New function.
1119 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1120 (ppc_emit_prologue): New function.
1121 (ppc_emit_epilogue): New function.
1122 (ppc_emit_add): New function.
1123 (ppc_emit_sub): New function.
1124 (ppc_emit_mul): New function.
1125 (ppc_emit_lsh): New function.
1126 (ppc_emit_rsh_signed): New function.
1127 (ppc_emit_rsh_unsigned): New function.
1128 (ppc_emit_ext): New function.
1129 (ppc_emit_zero_ext): New function.
1130 (ppc_emit_log_not): New function.
1131 (ppc_emit_bit_and): New function.
1132 (ppc_emit_bit_or): New function.
1133 (ppc_emit_bit_xor): New function.
1134 (ppc_emit_bit_not): New function.
1135 (ppc_emit_equal): New function.
1136 (ppc_emit_less_signed): New function.
1137 (ppc_emit_less_unsigned): New function.
1138 (ppc_emit_ref): New function.
1139 (ppc_emit_const): New function.
1140 (ppc_emit_reg): New function.
1141 (ppc_emit_pop): New function.
1142 (ppc_emit_stack_flush): New function.
1143 (ppc_emit_swap): New function.
1144 (ppc_emit_stack_adjust): New function.
1145 (ppc_emit_call): New function.
1146 (ppc_emit_int_call_1): New function.
1147 (ppc_emit_void_call_2): New function.
1148 (ppc_emit_if_goto): New function.
1149 (ppc_emit_goto): New function.
1150 (ppc_emit_eq_goto): New function.
1151 (ppc_emit_ne_goto): New function.
1152 (ppc_emit_lt_goto): New function.
1153 (ppc_emit_le_goto): New function.
1154 (ppc_emit_gt_goto): New function.
1155 (ppc_emit_ge_goto): New function.
1156 (ppc_write_goto_address): New function.
1157 (ppc_emit_ops_impl): New static variable.
1158 (ppc64v1_emit_prologue): New function.
1159 (ppc64v2_emit_prologue): New function.
1160 (ppc64_emit_epilogue): New function.
1161 (ppc64_emit_add): New function.
1162 (ppc64_emit_sub): New function.
1163 (ppc64_emit_mul): New function.
1164 (ppc64_emit_lsh): New function.
1165 (ppc64_emit_rsh_signed): New function.
1166 (ppc64_emit_rsh_unsigned): New function.
1167 (ppc64_emit_ext): New function.
1168 (ppc64_emit_zero_ext): New function.
1169 (ppc64_emit_log_not): New function.
1170 (ppc64_emit_bit_and): New function.
1171 (ppc64_emit_bit_or): New function.
1172 (ppc64_emit_bit_xor): New function.
1173 (ppc64_emit_bit_not): New function.
1174 (ppc64_emit_equal): New function.
1175 (ppc64_emit_less_signed): New function.
1176 (ppc64_emit_less_unsigned): New function.
1177 (ppc64_emit_ref): New function.
1178 (ppc64_emit_const): New function.
1179 (ppc64v1_emit_reg): New function.
1180 (ppc64v2_emit_reg): New function.
1181 (ppc64_emit_pop): New function.
1182 (ppc64_emit_stack_flush): New function.
1183 (ppc64_emit_swap): New function.
1184 (ppc64v1_emit_call): New function.
1185 (ppc64v2_emit_call): New function.
1186 (ppc64v1_emit_int_call_1): New function.
1187 (ppc64v2_emit_int_call_1): New function.
1188 (ppc64v1_emit_void_call_2): New function.
1189 (ppc64v2_emit_void_call_2): New function.
1190 (ppc64_emit_if_goto): New function.
1191 (ppc64_emit_eq_goto): New function.
1192 (ppc64_emit_ne_goto): New function.
1193 (ppc64_emit_lt_goto): New function.
1194 (ppc64_emit_le_goto): New function.
1195 (ppc64_emit_gt_goto): New function.
1196 (ppc64_emit_ge_goto): New function.
1197 (ppc64v1_emit_ops_impl): New static variable.
1198 (ppc64v2_emit_ops_impl): New static variable.
1199 (ppc_emit_ops): New function.
1200 (linux_low_target): Wire in ppc_emit_ops.
1201
a2174ba4
MK
12022016-03-31 Wei-cheng Wang <cole945@gmail.com>
1203 Marcin Kościelnicki <koriakin@0x04.net>
1204
1205 PR/17221
1206 * Makefile.in: Add powerpc-*-ipa.o
1207 * configure.srv: Add ipa_obj for powerpc*-linux.
1208 * linux-ppc-ipa.c: New file.
1209 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1210 includes.
1211 (PPC_FIELD): New macro.
1212 (PPC_SEXT): New macro.
1213 (PPC_OP6): New macro.
1214 (PPC_BO): New macro.
1215 (PPC_LI): New macro.
1216 (PPC_BD): New macro.
1217 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1218 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1219 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1220 (ppc_get_thread_area): New function.
1221 (is_elfv2_inferior): New function.
1222 (gen_ds_form): New function.
1223 (GEN_STD): New macro.
1224 (GEN_STDU): New macro.
1225 (GEN_LD): New macro.
1226 (GEN_LDU): New macro.
1227 (gen_d_form): New function.
1228 (GEN_ADDI): New macro.
1229 (GEN_ADDIS): New macro.
1230 (GEN_LI): New macro.
1231 (GEN_LIS): New macro.
1232 (GEN_ORI): New macro.
1233 (GEN_ORIS): New macro.
1234 (GEN_LWZ): New macro.
1235 (GEN_STW): New macro.
1236 (GEN_STWU): New macro.
1237 (gen_xfx_form): New function.
1238 (GEN_MFSPR): New macro.
1239 (GEN_MTSPR): New macro.
1240 (GEN_MFCR): New macro.
1241 (GEN_MTCR): New macro.
1242 (GEN_SYNC): New macro.
1243 (GEN_LWSYNC): New macro.
1244 (gen_x_form): New function.
1245 (GEN_OR): New macro.
1246 (GEN_MR): New macro.
1247 (GEN_LWARX): New macro.
1248 (GEN_STWCX): New macro.
1249 (GEN_CMPW): New macro.
1250 (gen_md_form): New function.
1251 (GEN_RLDICL): New macro.
1252 (GEN_RLDICR): New macro.
1253 (gen_i_form): New function.
1254 (GEN_B): New macro.
1255 (GEN_BL): New macro.
1256 (gen_b_form): New function.
1257 (GEN_BNE): New macro.
1258 (GEN_LOAD): New macro.
1259 (GEN_STORE): New macro.
1260 (gen_limm): New function.
1261 (gen_atomic_xchg): New function.
1262 (gen_call): New function.
1263 (ppc_relocate_instruction): New function.
1264 (ppc_install_fast_tracepoint_jump_pad): New function.
1265 (ppc_get_min_fast_tracepoint_insn_len): New function.
1266 (ppc_get_ipa_tdesc_idx): New function.
1267 (the_low_target): Wire in the new functions.
1268 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1269 tdescs.
1270 * linux-ppc-tdesc.h: New file.
1271
a13c4696
MK
12722016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1273
1274 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1275 (alloc_jump_pad_buffer): New function.
1276 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1277 (alloc_jump_pad_buffer): New function.
1278 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1279 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1280 (alloc_jump_pad_buffer): New function.
1281 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1282 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1283 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1284 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1285
1cda1512
MK
12862016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1287
1288 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1289 * linux-amd64-ipa.c: Likewise.
1290 * linux-i386-ipa.c: Likewise.
1291 * linux-s390-ipa.c: Likewise.
1292 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1293 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1294 set_trace_state_variable_value_ptr.
1295 (struct ipa_sym_addresses): Likewise.
1296 (symbol_list): Likewise.
1297 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1298 accessing gdb_collect directly.
1299 (gdb_collect_ptr_type): New typedef.
1300 (get_raw_reg_ptr_type): New typedef.
1301 (get_trace_state_variable_value_ptr_type): New typedef.
1302 (set_trace_state_variable_value_ptr_type): New typedef.
1303 (gdb_collect_ptr): New global.
1304 (get_raw_reg_ptr): New global.
1305 (get_trace_state_variable_value_ptr): New global.
1306 (set_trace_state_variable_value_ptr): New global.
1307 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1308 accessing get_raw_reg directly.
1309 (get_get_tsv_func_addr): Likewise for
1310 get_trace_state_variable_value_ptr.
1311 (get_set_tsv_func_addr): Likewise for
1312 set_trace_state_variable_value_ptr.
1313 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1314
72fb5488
SM
13152016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1316
1317 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1318
28170b88
MK
13192016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1320
1321 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1322 packets.
1323 (relocate_instruction): Remove own_buf.
1324 * server.c (own_buf): Make global.
1325 (handle_v_requests): Make global.
1326 * server.h (own_buf): New declaration.
1327 (handle_v_requests): New prototype.
1328
f39e8743
MK
13292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1330
1331 PR 18377
1332 * linux-s390-low.c (add_insns): New function.
1333 (s390_emit_prologue): New function.
1334 (s390_emit_epilogue): New function.
1335 (s390_emit_add): New function.
1336 (s390_emit_sub): New function.
1337 (s390_emit_mul): New function.
1338 (s390_emit_lsh): New function.
1339 (s390_emit_rsh_signed): New function.
1340 (s390_emit_rsh_unsigned): New function.
1341 (s390_emit_ext): New function.
1342 (s390_emit_log_not): New function.
1343 (s390_emit_bit_and): New function.
1344 (s390_emit_bit_or): New function.
1345 (s390_emit_bit_xor): New function.
1346 (s390_emit_bit_not): New function.
1347 (s390_emit_equal): New function.
1348 (s390_emit_less_signed): New function.
1349 (s390_emit_less_unsigned): New function.
1350 (s390_emit_ref): New function.
1351 (s390_emit_if_goto): New function.
1352 (s390_emit_goto): New function.
1353 (s390_write_goto_address): New function.
1354 (s390_emit_litpool): New function.
1355 (s390_emit_const): New function.
1356 (s390_emit_call): New function.
1357 (s390_emit_reg): New function.
1358 (s390_emit_pop): New function.
1359 (s390_emit_stack_flush): New function.
1360 (s390_emit_zero_ext): New function.
1361 (s390_emit_swap): New function.
1362 (s390_emit_stack_adjust): New function.
1363 (s390_emit_set_r2): New function.
1364 (s390_emit_int_call_1): New function.
1365 (s390_emit_void_call_2): New function.
1366 (s390_emit_eq_goto): New function.
1367 (s390_emit_ne_goto): New function.
1368 (s390_emit_lt_goto): New function.
1369 (s390_emit_le_goto): New function.
1370 (s390_emit_gt_goto): New function.
1371 (s390_emit_ge_goto): New function.
1372 (s390x_emit_prologue): New function.
1373 (s390x_emit_epilogue): New function.
1374 (s390x_emit_add): New function.
1375 (s390x_emit_sub): New function.
1376 (s390x_emit_mul): New function.
1377 (s390x_emit_lsh): New function.
1378 (s390x_emit_rsh_signed): New function.
1379 (s390x_emit_rsh_unsigned): New function.
1380 (s390x_emit_ext): New function.
1381 (s390x_emit_log_not): New function.
1382 (s390x_emit_bit_and): New function.
1383 (s390x_emit_bit_or): New function.
1384 (s390x_emit_bit_xor): New function.
1385 (s390x_emit_bit_not): New function.
1386 (s390x_emit_equal): New function.
1387 (s390x_emit_less_signed): New function.
1388 (s390x_emit_less_unsigned): New function.
1389 (s390x_emit_ref): New function.
1390 (s390x_emit_if_goto): New function.
1391 (s390x_emit_const): New function.
1392 (s390x_emit_call): New function.
1393 (s390x_emit_reg): New function.
1394 (s390x_emit_pop): New function.
1395 (s390x_emit_stack_flush): New function.
1396 (s390x_emit_zero_ext): New function.
1397 (s390x_emit_swap): New function.
1398 (s390x_emit_stack_adjust): New function.
1399 (s390x_emit_int_call_1): New function.
1400 (s390x_emit_void_call_2): New function.
1401 (s390x_emit_eq_goto): New function.
1402 (s390x_emit_ne_goto): New function.
1403 (s390x_emit_lt_goto): New function.
1404 (s390x_emit_le_goto): New function.
1405 (s390x_emit_gt_goto): New function.
1406 (s390x_emit_ge_goto): New function.
1407 (s390_emit_ops): New function.
1408 (struct linux_target_ops): Fill in emit_ops hook.
1409
abd9baf9
MK
14102016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1411
1412 PR 18377
1413 * Makefile.in: Add s390 IPA files.
1414 * configure.srv: Build IPA for s390.
1415 * linux-s390-ipa.c: New file.
1416 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1417 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1418 (tdesc_s390_linux32): Likewise.
1419 (init_registers_s390_linux32v1): Likewise.
1420 (tdesc_s390_linux32v1): Likewise.
1421 (init_registers_s390_linux32v2): Likewise.
1422 (tdesc_s390_linux32v2): Likewise.
1423 (init_registers_s390_linux64): Likewise.
1424 (tdesc_s390_linux64): Likewise.
1425 (init_registers_s390_linux64v1): Likewise.
1426 (tdesc_s390_linux64v1): Likewise.
1427 (init_registers_s390_linux64v2): Likewise.
1428 (tdesc_s390_linux64v2): Likewise.
1429 (init_registers_s390_te_linux64): Likewise.
1430 (tdesc_s390_te_linux64): Likewise.
1431 (init_registers_s390_vx_linux64): Likewise.
1432 (tdesc_s390_vx_linux64): Likewise.
1433 (init_registers_s390_tevx_linux64): Likewise.
1434 (tdesc_s390_tevx_linux64): Likewise.
1435 (init_registers_s390x_linux64): Likewise.
1436 (tdesc_s390x_linux64): Likewise.
1437 (init_registers_s390x_linux64v1): Likewise.
1438 (tdesc_s390x_linux64v1): Likewise.
1439 (init_registers_s390x_linux64v2): Likewise.
1440 (tdesc_s390x_linux64v2): Likewise.
1441 (init_registers_s390x_te_linux64): Likewise.
1442 (tdesc_s390x_te_linux64): Likewise.
1443 (init_registers_s390x_vx_linux64): Likewise.
1444 (tdesc_s390x_vx_linux64): Likewise.
1445 (init_registers_s390x_tevx_linux64): Likewise.
1446 (tdesc_s390x_tevx_linux64): Likewise.
1447 (have_hwcap_s390_vx): New static variable.
1448 (s390_arch_setup): Fill have_hwcap_s390_vx.
1449 (s390_get_thread_area): New function.
1450 (s390_ft_entry_gpr_esa): New const.
1451 (s390_ft_entry_gpr_zarch): New const.
1452 (s390_ft_entry_misc): New const.
1453 (s390_ft_entry_fr): New const.
1454 (s390_ft_entry_vr): New const.
1455 (s390_ft_main_31): New const.
1456 (s390_ft_main_64): New const.
1457 (s390_ft_exit_fr): New const.
1458 (s390_ft_exit_vr): New const.
1459 (s390_ft_exit_misc): New const.
1460 (s390_ft_exit_gpr_esa): New const.
1461 (s390_ft_exit_gpr_zarch): New const.
1462 (append_insns): New function.
1463 (s390_relocate_instruction): New function.
1464 (s390_install_fast_tracepoint_jump_pad): New function.
1465 (s390_get_min_fast_tracepoint_insn_len): New function.
1466 (s390_get_ipa_tdesc_idx): New function.
1467 (struct linux_target_ops): Wire in the above functions.
1468 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1469 * linux-s390-tdesc.h: New file.
1470
a4105d04
MK
14712016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1472
1473 * linux-s390-low.c (s390_supports_tracepoints): New function.
1474 (struct linux_target_ops): Fill supports_tracepoints hook.
1475
35ac8b3e
YQ
14762016-03-18 Yao Qi <yao.qi@linaro.org>
1477
1478 * linux-low.c (lwp_signal_can_be_delivered): New function.
1479 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1480
94610ec4
YQ
14812016-03-18 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1484 0 if signal is enqueued. Remove 'signal' from one debugging
1485 message. Move one debugging message to some lines below.
1486 Remove code setting 'signal' to 0.
1487
80aea927
YQ
14882016-03-18 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-low.c (linux_low_filter_event): Remove redundant
1491 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1492
b04fd3be
MK
14932016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1494
1495 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1496 (struct linux_target_ops): Wire in the above.
1497
c40c8d4b
YQ
14982016-03-03 Yao Qi <yao.qi@linaro.org>
1499
1500 * linux-low.c: Update comments to start_step_over.
1501
0f8288ae
YQ
15022016-03-03 Yao Qi <yao.qi@linaro.org>
1503
1504 PR server/19736
1505 * linux-low.c (handle_extended_wait): Set child suspended
1506 if event_lwp->bp_reinsert isn't zero.
1507
fdbd04a8
YQ
15082016-03-02 Yao Qi <yao.qi@linaro.org>
1509
1510 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1511 enqueue_pending_signal.
1512
6896a8fa
MK
15132016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1514
1515 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1516 is actually loaded.
1517
ab503087
MK
15182016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1519
1520 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1521 (s390_regmap_3264) [!__s390x__]: New global.
1522 (s390_collect_ptrace_register): Skip map entries containing -1.
1523 (s390_supply_ptrace_register): Ditto.
1524 (s390_fill_gprs_high): New function.
1525 (s390_store_gprs_high): New function.
1526 (s390_regsets): Add NT_S390_HIGH_GPRS.
1527 (s390_get_hwcap): Enable on 31-bit.
1528 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1529 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1530 Detect NT_S390_HIGH_GPRS.
1531 (s390_usrregs_info_3264): Enable on 31-bit.
1532 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1533 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1534
ae91f625
MK
15352016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1536
1537 PR gdb/13808
1538 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1539 * configure.srv: Ditto.
1540 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1541 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1542 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1543 (init_registers_amd64_linux): Remove prototype.
1544 (tdesc_amd64_linux): Remove declaration.
1545 (get_ipa_tdesc): New function.
1546 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1547 initialize remaining tdescs.
1548 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1549 (init_registers_i386_linux): Remove prototype.
1550 (tdesc_i386_linux): Remove declaration.
1551 (get_ipa_tdesc): New function.
1552 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1553 initialize remaining tdescs.
1554 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1555 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1556 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1557 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1558 (x86_get_ipa_tdesc_idx): New function.
1559 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1560 * linux-x86-tdesc.h: New file.
1561 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1562 (target_get_ipa_tdesc_idx): New macro.
1563 * tracepoint.c (ipa_tdesc_idx): New macro.
1564 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1565 (symbol_list): Add ipa_tdesc_idx.
1566 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1567 (ipa_tdesc): Remove.
1568 (ipa_tdesc_idx): New variable.
1569 (get_context_regcache): Use get_ipa_tdesc.
1570 (gdb_collect): Ditto.
1571 (gdb_probe): Ditto.
1572 * tracepoint.h (get_ipa_tdesc): New prototype.
1573 (ipa_tdesc): Remove.
1574
e7ad2f14
PA
15752016-02-24 Pedro Alves <palves@redhat.com>
1576
1577 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1578 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1579 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1580 Factor out common code between the USE_SIGTRAP_SIGINFO and
1581 !USE_SIGTRAP_SIGINFO blocks.
1582 (linux_low_filter_event): Call save_stop_reason instead of
1583 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1584 Update comments.
1585 (linux_wait_1): Update comments.
1586
657f9cde
WW
15872016-02-24 Wei-cheng Wang <cole945@gmail.com>
1588
1589 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1590 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1591 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1592 ppc_insert_point, ppc_remove_point.
1593
b00b61e1
MK
15942016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1595
1596 * linux-s390-low.c (s390_supports_z_point_type): New function.
1597 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1598
553cb527
YQ
15992016-02-16 Yao Qi <yao.qi@linaro.org>
1600
1601 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1602 PC. Get pc from regcache_read_pc.
1603
a5652c21
YQ
16042016-02-12 Yao Qi <yao.qi@linaro.org>
1605
1606 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1607 or linux_get_pc_32bit.
1608 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1609
ed443b61
YQ
16102016-02-12 Yao Qi <yao.qi@linaro.org>
1611
1612 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1613 arm_linux_get_next_pcs_fixup.
1614
020ecd38
MK
16152016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1616
1617 * tracepoint.c (x_tracepoint_action_download): Change
1618 write_inferior_data_ptr to write_inferior_data_pointer.
1619 (cmd_qtstart): Likewise.
1620 (write_inferior_data_ptr): Remove.
1621 (download_agent_expr): Change write_inferior_data_ptr to
1622 write_inferior_data_pointer.
1623 (download_tracepoint_1): Likewise.
1624 (download_tracepoint): Likewise.
1625 (download_trace_state_variables): Likewise.
1626
7cae9051
WW
16272016-02-11 Wei-cheng Wang <cole945@gmail.com>
1628 Marcin Kościelnicki <koriakin@0x04.net>
1629
1630 * tracepoint.c (struct tracepoint_action_ops): Remove.
1631 (struct tracepoint_action): Remove ops.
1632 (m_tracepoint_action_download, r_tracepoint_action_download)
1633 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1634 size and offset accordingly.
1635 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1636 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1637 (tracepoint_action_send, tracepoint_action_download): New functions.
1638 Helpers for trace action handlers.
1639 (add_tracepoint_action): Remove setup actions ops.
1640 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1641
9f6a71b4
YQ
16422016-02-10 Yao Qi <yao.qi@linaro.org>
1643
1644 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1645
1e94266c
SM
16462016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1649 to AC_OUTPUT.
1650 * configure: Regenerate.
1651
8adce034
SM
16522016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1653
1654 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1655 void * to gdb_byte *.
1656 * linux-low.c (siginfo_fixup): Likewise.
1657 (linux_xfer_siginfo): Likewise.
1658 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1659 Likewise.
1660 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1661
93813b37
WT
16622016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1663
1664 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1665 to srv_tgtobj.
1666 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1667 to srv_tgtobj.
1668 * linux-x86-low.c [__x86_64__]: Include
1669 "nat/amd64-linux-siginfo.h".
1670 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1671 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1672 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1673 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1674 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1675 (cpt_si_fd, si_timerid, si_overrun): Move from
1676 nat/amd64-linux-siginfo.c.
1677 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1678
8424cc97
SM
16792016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * server.c (skip_to_semicolon): Remove.
1682 (process_point_options): Use strchrnul instead of
1683 skip_to_semicolon.
1684
4d18591b
YQ
16852016-01-26 Yao Qi <yao.qi@linaro.org>
1686
1687 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1688 * linux-low.c (install_software_single_step_breakpoints): Don't
1689 call regcache_read_pc.
1690 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1691 argument pc.
1692
d8020970
YQ
16932016-01-26 Yao Qi <yao.qi@linaro.org>
1694
1695 * linux-low.c (install_software_single_step_breakpoints): Call
1696 regcache_read_pc instead of get_pc.
1697
8b207339
YQ
16982016-01-26 Yao Qi <yao.qi@linaro.org>
1699
1700 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1701 (unblock_async_io): Rename to ...
1702 (block_unblock_async_io): ... it. New function.
1703 (enable_async_io): Don't install SIGIO handler. Unblock it
1704 instead.
1705 (disable_async_io): Don't ignore SIGIO. Block it instead.
1706 (initialize_async_io): Install SIGIO handler. Don't call
1707 unblock_async_io.
1708
18879fef
YQ
17092016-01-26 Yao Qi <yao.qi@linaro.org>
1710
1711 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1712 first character is '\003', call *the_target->request_interrupt.
1713
a0f8e08a
YQ
17142016-01-25 Yao Qi <yao.qi@linaro.org>
1715
1716 * remote-utils.c (new_thread_notify): Remove.
1717 (dead_thread_notify): Likewise.
1718 * remote-utils.h (new_thread_notify): Remove declaration.
1719 (dead_thread_notify): Likewise.
1720
cc5fd9ab
MK
17212016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1722
1723 * gdb.trace/pending.exp: Fix expected message on continue.
1724
99e8eb11
MK
17252016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1726
1727 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1728 it works properly on big-endian machines where sizeof (CORE_ADDR)
1729 != sizeof (void *).
1730
a994041d
PA
17312016-01-21 Pedro Alves <palves@redhat.com>
1732
1733 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1734 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1735 * configure: Regenerate.
1736
f7a6a40d
YQ
17372016-01-21 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1740 is_thumb and set it according to CPSR saved on the stack.
1741 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1742 arm_sigreturn_next_pc.
1743
6f69e520
YQ
17442016-01-18 Yao Qi <yao.qi@linaro.org>
1745
1746 * linux-low.c (linux_set_pc_64bit): New function.
1747 (linux_get_pc_64bit): New function.
1748 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1749 Declare.
1750 * linux-sparc-low.c (debug_threads): Remove declaration.
1751 (sparc_get_pc): Remove.
1752 (the_low_target): Use linux_get_pc_64bit instead of
1753 sparc_get_pc.
1754 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1755 (the_low_target): Use linux_get_pc_64bit and
1756 linux_set_pc_64bit.
1757
276d4552
YQ
17582016-01-18 Yao Qi <yao.qi@linaro.org>
1759
1760 * linux-arm-low.c (debug_threads): Remove declaration.
1761 (arm_get_pc, arm_set_pc): Remove.
1762 (the_low_target): Use linux_get_pc_32bit and
1763 linux_set_pc_32bit.
1764 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1765 (the_low_target): Use linux_get_pc_32bit and
1766 linux_set_pc_32bit.
1767 * linux-cris-low.c (debug_threads): Remove declaration.
1768 (cris_get_pc, cris_set_pc,): Remove.
1769 (the_low_target): Use linux_get_pc_32bit and
1770 linux_set_pc_32bit.
1771 * linux-crisv32-low.c (debug_threads): Remove declaration.
1772 (cris_get_pc, cris_set_pc): Remove.
1773 (the_low_target): Use linux_get_pc_32bit and
1774 linux_set_pc_32bit.
1775 * linux-low.c: Include inttypes.h.
1776 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1777 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1778 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1779 (the_low_target): Use linux_get_pc_32bit and
1780 linux_set_pc_32bit.
1781 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1782 (the_low_target): Use linux_get_pc_32bit and
1783 linux_set_pc_32bit.
1784 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1785 (the_low_target): Use linux_get_pc_32bit and
1786 linux_set_pc_32bit.
1787 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1788 (the_low_target): Use linux_get_pc_32bit and
1789 linux_set_pc_32bit.
1790 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1791 (the_low_target): Use linux_get_pc_32bit and
1792 linux_set_pc_32bit.
1793
eb0edac8
GB
17942016-01-18 Gary Benson <gbenson@redhat.com>
1795
1796 * configure.ac (AC_FUNC_FORK): New check.
1797 * config.in: Regenerate.
1798 * configure: Likewise.
1799
1b451dda
YQ
18002016-01-14 Yao Qi <yao.qi@linaro.org>
1801
1802 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1803 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1804 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1805 arm_get_next_pcs_ctor.
1806
82075af2
JS
18072016-01-12 Josh Stone <jistone@redhat.com>
1808 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1809
1810 * inferiors.h: Include "gdb_vecs.h".
1811 (struct process_info): Add syscalls_to_catch.
1812 * inferiors.c (remove_process): Free syscalls_to_catch.
1813 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1814 syscall_return stops.
1815 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1816 * server.c (handle_general_set): Handle QCatchSyscalls.
1817 (handle_query): Report support for QCatchSyscalls.
1818 * target.h (struct target_ops): Add supports_catch_syscall.
1819 (target_supports_catch_syscall): New macro.
1820 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1821 (struct lwp_info): Add syscall_state.
1822 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1823 Maintain syscall_state and syscalls_to_catch across exec.
1824 (get_syscall_trapinfo): New function, proxy to the_low_target.
1825 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1826 (linux_low_filter_event): Toggle syscall_state entry/return for
1827 syscall traps, and set it ignored for all others.
1828 (gdb_catching_syscalls_p): New function.
1829 (gdb_catch_this_syscall_p): New function.
1830 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1831 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1832 (linux_supports_catch_syscall): New function.
1833 (linux_target_ops): Install it.
1834 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1835 (the_low_target): Install it.
1836
8f13a3ce
MF
18372016-01-12 Mike Frysinger <vapier@gentoo.org>
1838
1839 * acinclude.m4: Include new ../warning.m4 file.
1840 * configure: Regenerated.
1841 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1842
5b3da067
MF
18432016-01-12 Mike Frysinger <vapier@gentoo.org>
1844
1845 * ax.c (is_goto_target): Mark static.
1846 * linux-low.c (register_addr): Likewise.
1847 (linux_fetch_registers, linux_store_registers): Likewise.
1848 * mem-break.c (any_persistent_commands): Fix old prototype.
1849 (add_commands_to_breakpoint): Mark static.
1850 * regcache.c (find_register_by_name): Delete unused func.
1851 * remote-utils.c (hex_or_minus_one): Mark static.
1852 * server.c (monitor_show_help): Mark static.
1853 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1854 handle_v_requests): Likewise.
1855
bc504a31
PA
18562016-01-12 Pedro Alves <palves@redhat.com>
1857
1858 Remove use of the registered trademark symbol throughout.
1859
5a0dd67a
YQ
18602016-01-08 Yao Qi <yao.qi@linaro.org>
1861
1862 * remote-utils.c (getpkt): If c is '\003', call target hook
1863 request_interrupt.
1864
b2ca446f
YQ
18652016-01-06 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1868 linux-aarch32-low.c.
1869 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1870 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1871 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1872 (thumb2_breakpoint): Declare.
1873 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1874 linux-aarch32-low.h.
1875 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1876 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1877 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1878
edd88788
JB
18792016-01-01 Joel Brobecker <brobecker@adacore.com>
1880
1881 * gdbreplay.c (gdbreplay_version): Change copyright year in
1882 version message.
1883 * server.c (gdbserver_version): Likewise.
1884
65da7f14
PP
18852015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1886
1887 * server.c (crc32_table): Delete.
1888 (crc32): Use libiberty's xcrc32 function.
1889
4abd5ed2
JB
18902015-12-22 Joel Brobecker <brobecker@adacore.com>
1891
1892 * lynx-low.c (lynx_delete_thread_callback): New function.
1893 (lynx_mourn): Properly delete our process and all of its
1894 threads. Remove call to clear_inferiors.
1895
0e50fe5c
JB
18962015-12-22 Joel Brobecker <brobecker@adacore.com>
1897
1898 * target.c (thread_search_callback): Add check that
1899 the thread_stopped target callback is not NULL before
1900 calling it.
1901
35adc03f
YQ
19022015-12-21 Yao Qi <yao.qi@linaro.org>
1903
1904 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1905 arm breakpoint.
1906
bd2b2909
AT
19072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1908
1909 * server.c (handle_query): Call target_supports_software_single_step.
1910
7fe5e27e
AT
19112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1912
1913 * linux-low.c (single_step): New function.
1914 (linux_resume_one_lwp_throw): Call single_step.
1915 (start_step_over): Likewise.
1916
d9311bfa
AT
19172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1918
1919 * Makefile.in (SFILES): Append arch/arm-linux.c,
1920 arch/arm-get-next-pcs.c.
1921 (arm-linux.o): New rule.
1922 (arm-get-next-pcs.o): New rule.
1923 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1924 arm-linux.o.
1925 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1926 to linux-aarch32-low.c.
1927 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1928 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1929 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1930 (thumb2_breakpoint_len): Likewise.
1931 (arm_is_thumb_mode): Make non-static.
1932 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1933 from linux-aarch32-low.c.
1934 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1935 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1936 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1937 (thumb2_breakpoint_len): Likewise.
1938 (arm_is_thumb_mode): New declaration.
1939 * linux-arm-low.c: Include arch/arm-linux.h
1940 aarch/arm-get-next-pcs.h, sys/syscall.h.
1941 (get_next_pcs_ops): New struct.
1942 (get_next_pcs_addr_bits_remove): New function.
1943 (get_next_pcs_is_thumb): New function.
1944 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1945 (arm_sigreturn_next_pc): Likewise.
1946 (get_next_pcs_syscall_next_pc): Likewise.
1947 (arm_gdbserver_get_next_pcs): Likewise.
1948 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1949 Initialize.
1950 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1951 * server.h: Include gdb_vecs.h.
1952
68ce2059
AT
19532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1954
1955 * Makefile.in (SFILES): Append common/common-regcache.c.
1956 (OBS): Append common-regcache.o.
1957 (common-regcache.o): New rule.
1958 * regcache.c (init_register_cache): Initialize cache to
1959 REG_UNAVAILABLE.
1960 (regcache_raw_read_unsigned): New function.
1961 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1962 register_status enum.
1963
fa5308bd
AT
19642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1965
1966 * linux-aarch64-low.c (the_low_targets): Rename
1967 breakpoint_reinsert_addr to get_next_pcs.
1968 * linux-arm-low.c (the_low_targets): Likewise.
1969 * linux-bfin-low.c (the_low_targets): Likewise.
1970 * linux-cris-low.c (the_low_targets): Likewise.
1971 * linux-crisv32-low.c (the_low_targets): Likewise.
1972 * linux-low.c (can_software_single_step): Likewise.
1973 (install_software_single_step_breakpoints): New function.
1974 (start_step_over): Use install_software_single_step_breakpoints.
1975 * linux-low.h: New CORE_ADDR vector.
1976 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1977 get_next_pcs.
1978 * linux-mips-low.c (the_low_targets): Likewise.
1979 * linux-nios2-low.c (the_low_targets): Likewise.
1980 * linux-sparc-low.c (the_low_targets): Likewise.
1981
4a6ed09b
PA
19822015-12-17 Pedro Alves <palves@redhat.com>
1983
1984 * linux-low.c (linux_kill_one_lwp): Remove references to
1985 LinuxThreads.
1986 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1987 to 'kill'.
1988 (linux_init_signals): Delete.
1989 (initialize_low): Adjust.
1990 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1991
7544db95
PA
19922015-12-16 Pedro Alves <palves@redhat.com>
1993
1994 * configure.ac (compiler warning flags): When testing a
1995 -Wno-foo option, check whether -Wfoo works instead.
1996 * configure: Regenerate.
1997
8020350c
DB
19982015-12-11 Don Breazeal <donb@codesourcery.com>
1999
2000 * server.c (process_serial_event): Don't exit from gdbserver
2001 in remote mode if there are still active inferiors.
2002
db91f502
YQ
20032015-12-11 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2006 arm_breakpoint_at if the process is 32-bit.
2007
b37a6290
YQ
20082015-12-11 Yao Qi <yao.qi@linaro.org>
2009
2010 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2011 arm breakpoint.
2012
17b1509a
YQ
20132015-12-07 Yao Qi <yao.qi@linaro.org>
2014
2015 * configure.srv: Append arm.o to srv_tgtobj for
2016 aarch64*-*-linux* target.
2017 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2018 from linux-arm-low.c.
2019 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2020 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2021 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2022 (thumb2_breakpoint_len): Likewise.
2023 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2024 (arm_breakpoint_kinds): Likewise.
2025 (arm_breakpoint_kind_from_pc): Likewise.
2026 (arm_sw_breakpoint_from_kind): Likewise.
2027 (arm_breakpoint_kind_from_current_state): Likewise.
2028 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2029 (arm_sw_breakpoint_from_kind): Declare.
2030 (arm_breakpoint_kind_from_current_state): Declare.
2031 (arm_breakpoint_at): Declare.
2032 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2033 arm_sw_breakpoint_from_kind if process is 32-bit.
2034 (aarch64_breakpoint_kind_from_pc): New function.
2035 (aarch64_breakpoint_kind_from_current_state): New function.
2036 (the_low_target): Initialize fields breakpoint_kind_from_pc
2037 and breakpoint_kind_from_current_state.
2038 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2039 linux-aarch32-low.c.
2040 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2041 (arm_breakpoint, arm_breakpoint_len): Likewise.
2042 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2043 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2044 (arm_is_thumb_mode): Likewise.
2045 (arm_breakpoint_at): Likewise.
2046 (arm_breakpoint_kind_from_pc): Likewise.
2047 (arm_sw_breakpoint_from_kind): Likewise.
2048 (arm_breakpoint_kind_from_current_state): Likewise.
2049
2050 Revert:
2051 2015-08-04 Yao Qi <yao.qi@linaro.org>
2052
2053 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2054 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2055 * server.c (extended_protocol): Remove "static".
2056 * server.h (extended_protocol): Declare it.
2057
ece66d65
JS
20582015-12-04 Josh Stone <jistone@redhat.com>
2059
2060 * target.h (struct target_ops) <arch_setup>: Rename to ...
2061 (struct target_ops) <post_create_inferior>: ... this.
2062 (target_arch_setup): Rename to ...
2063 (target_post_create_inferior): ... this, calling post_create_inferior.
2064 * server.c (start_inferior): Update target_arch_setup calls to
2065 target_post_create_inferior.
2066 * linux-low.c (linux_low_ptrace_options): Forward declare.
2067 (linux_arch_setup): Update its comment for general use.
2068 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2069 (struct linux_target_ops): Use linux_post_create_inferior.
2070 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2071 to post_create_inferior.
2072 * nto-low.c (struct nto_target_ops): Likewise.
2073 * spu-low.c (struct spu_target_ops): Likewise.
2074 * win32-low.c (struct win32_target_ops): Likewise.
2075
e58c48b4
AT
20762015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2077
2078 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2079
fbec8956
AT
20802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2081
2082 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2083 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2084 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2085 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2086 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2087 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2088 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2089 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2090 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2091 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2092 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2093 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2094
9b4c5f87
AT
20952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2096
2097 * linux-low.c (linux_look_up_symbols): Don't call
2098 linux_supports_traceclone.
2099 * linux-low.h (thread_db_init): Remove use_events argument.
2100 * thread-db.c (thread_db_use_event): Remove global variable.
2101 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2102 (struct thread_db) <td_create_bp>: Remove field.
2103 (thread_db_create_event): Remove function.
2104 (thread_db_enable_reporting): Likewise.
2105 (find_one_thread): Don't check for thread_db_use_events.
2106 (attach_thread): Likewise.
2107 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2108 (try_thread_db_load_1): Don't check for thread_db_use_events.
2109 (thread_db_init): Remove use_events argument and thread events
2110 handling.
2111 (remove_thread_event_breakpoints): Remove function.
2112 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2113
7d00775e
AT
21142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2115
2116 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2117 New function.
2118 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2119 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2120 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2121 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2122 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2123 Initialize.
2124 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2125 New function.
2126 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2127 * linux-low.c (can_hardware_single_step): Use
2128 supports_hardware_single_step.
2129 (can_software_single_step): New function.
2130 (start_step_over): Call can_software_single_step.
2131 (linux_supports_hardware_single_step): New function.
2132 (struct target_ops) <supports_software_single_step>: Initialize.
2133 * linux-low.h (struct linux_target_ops)
2134 <supports_hardware_single_step>: Initialize.
2135 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2136 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2137 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2138 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2139 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2140 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2141 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2142 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2143 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2144 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2145 Initialize.
2146 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2147 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2148 Initialize.
2149 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2151 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2152 New function.
2153 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2154 * target.h (struct target_ops): <supports_software_single_step>:
2155 New field.
2156 (target_supports_software_single_step): New macro.
2157
2d97cd35
AT
21582015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2159
2160 * linux-low.c (linux_wait_1): Fix pc advance condition.
2161 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2162 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2163
769ef81f
AT
21642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2165
2166 * linux-arm-low.c (arm_is_thumb_mode): New function.
2167 (arm_breakpoint_at): Use arm_is_thumb_mode.
2168 (arm_breakpoint_kind_from_current_state): New function.
2169 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2170 Initialize.
2171 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2172 (linux_breakpoint_kind_from_current_state): New function.
2173 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2174 * linux-low.h (struct linux_target_ops)
2175 <breakpoint_kind_from_current_state>: New field.
2176 * target.h (struct target_ops): Likewise.
2177 (target_breakpoint_kind_from_current_state): New macro.
2178
1bebeeca
PA
21792015-11-30 Pedro Alves <palves@redhat.com>
2180
2181 * linux-low.c (linux_resume): Wake up the event loop before
2182 returning.
2183
a67a9fae
PA
21842015-11-30 Pedro Alves <palves@redhat.com>
2185
2186 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2187 check.
2188 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2189 to -1.
2190 * target.c (struct thread_search): New structure.
2191 (thread_search_callback): New function.
2192 (prev_general_thread): New global.
2193 (prepare_to_access_memory, done_accessing_memory): New functions.
2194 * target.h (prepare_to_access_memory, done_accessing_memory):
2195 Replace macros with function declarations.
2196
f2faf941
PA
21972015-11-30 Pedro Alves <palves@redhat.com>
2198
2199 PR 14618
2200 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2201 report TARGET_WAITKIND_NO_RESUMED.
2202 * remote-utils.c (prepare_resume_reply): Handle
2203 TARGET_WAITKIND_NO_RESUMED.
2204 * server.c (report_no_resumed): New global.
2205 (handle_query) <qSupported>: Handle "no-resumed+". Report
2206 "no-resumed+" support.
2207 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2208 return error if the client doesn't support no-resumed events.
2209 (push_stop_notification): New function.
2210 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2211 events if the client supports them.
2212
a681f9c9
PA
22132015-11-30 Pedro Alves <palves@redhat.com>
2214
2215 * linux-low.c (thread_still_has_status_pending_p): Don't check
2216 vCont;t here.
2217 (lwp_resumed): New function.
2218 (status_pending_p_callback): Return early if the LWP is not
2219 supposed to be resumed.
2220
65706a29
PA
22212015-11-30 Pedro Alves <palves@redhat.com>
2222
2223 * linux-low.c (handle_extended_wait): Assert that the LWP's
2224 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2225 thread create events, leave the new child's status pending.
2226 (linux_low_filter_event): If GDB wants to hear about thread exit
2227 events, leave the LWP marked dead and don't delete it.
2228 (linux_wait_for_event_filtered): Don't check for thread exit.
2229 (filter_exit_event): New function.
2230 (linux_wait_1): Use it, when returning an exit event.
2231 (linux_resume_one_lwp_throw): Assert that the LWP's
2232 waitstatus is TARGET_WAITKIND_IGNORE.
2233 * remote-utils.c (prepare_resume_reply): Handle
2234 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2235 * server.c (report_thread_events): New global.
2236 (handle_general_set): Handle QThreadEvents.
2237 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2238 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2239 TARGET_WAITKIND_THREAD_EXITED.
2240 * server.h (report_thread_events): Declare.
2241
56cf4bed
PA
22422015-11-30 Pedro Alves <palves@redhat.com>
2243
2244 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2245 the thread's last_resume_kind was resume_stop.
2246
500c1d85
PA
22472015-11-30 Pedro Alves <palves@redhat.com>
2248
2249 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2250 before returning.
2251
de979965
PA
22522015-11-30 Pedro Alves <palves@redhat.com>
2253
2254 * server.c (handle_v_requests): Handle vCtrlC.
2255
34c65914
PA
22562015-11-30 Pedro Alves <palves@redhat.com>
2257
2258 * gdbthread.h (find_any_thread_of_pid): Declare.
2259 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2260 functions.
2261 * server.c (handle_query): If current_thread is NULL, look for
2262 another thread of the selected process.
2263
79efa585 22642015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2265 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2266
2267 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2268 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2269 name in reply.
2270 * target.h (struct target_ops) <thread_name>: New field.
2271 (target_thread_name): New macro.
2272
80d82c19
JB
22732015-11-23 Joel Brobecker <brobecker@adacore.com>
2274
2275 * regcache.h (regcache_invalidate_pid): Add declaration.
2276 * regcache.c (regcache_invalidate_pid): New function, extracted
2277 from regcache_invalidate.
2278 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2279 Add trivial documentation comment.
2280 * lynx-low.c: Use regcache_invalidate_pid instead of
2281 regcache_invalidate.
2282
64da5dd5
JB
22832015-11-23 Joel Brobecker <brobecker@adacore.com>
2284
2285 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2286 and Elf64_auxv_t if the target is Android.
2287
37ce4055
DE
22882015-11-22 Doug Evans <xdje42@gmail.com>
2289
2290 * target.h: #include <sys/types.h>.
2291
06e03fff
PA
22922015-11-19 Pedro Alves <palves@redhat.com>
2293
2294 * linux-low.c (linux_process_qsupported): Change prototype.
2295 Adjust.
2296 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2297 Change prototype.
2298 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2299 and adjust to loop over all features.
2300 * server.c (handle_query) <qSupported>: Adjust to call
2301 target_process_qsupported once, passing it a vector of unprocessed
2302 features.
2303 * target.h (struct target_ops) <process_qsupported>: Change
2304 prototype.
2305 (target_process_qsupported): Adjust.
2306
9a084706
PA
23072015-11-19 Pedro Alves <palves@redhat.com>
2308
2309 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2310 mode.
2311 * configure: Regenerate.
2312
dad44a1f
PA
23132015-11-19 Pedro Alves <palves@redhat.com>
2314
2315 * configure: Regenerate.
2316
231c0592
YQ
23172015-11-19 Yao Qi <yao.qi@linaro.org>
2318
2319 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2320 type to uint32_t.
2321
6c1c9a8b
YQ
23222015-11-19 Yao Qi <yao.qi@linaro.org>
2323
2324 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2325 (struct aarch64_operand): Move enum out.
2326
9caa3311
YQ
23272015-11-19 Yao Qi <yao.qi@linaro.org>
2328
2329 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2330 struct user_fpsimd_state *.
2331 (aarch64_store_fpregset): Likewise.
2332
6a69a054
YQ
23332015-11-19 Yao Qi <yao.qi@linaro.org>
2334
2335 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2336 struct user_pt_regs *.
2337 (aarch64_store_gregset): Likewise.
2338
1798301e
PA
23392015-11-18 Pedro Alves <palves@redhat.com>
2340
2341 * Makefile.in (all_object_files): Add $IPA_OBJS.
2342
ce7715e2
PA
23432015-11-17 Pedro Alves <palves@redhat.com>
2344
2345 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2346 GDB_SIGNAL_0 and gdb_signal_to_string.
2347
c0879059
PA
23482015-11-17 Pedro Alves <palves@redhat.com>
2349
2350 * win32-low.c (handle_output_debug_string): Remove parameter.
2351 (win32_kill): Remove our_status local and adjust call to
2352 handle_output_debug_string.
2353 (get_child_debug_event): Adjust call to
2354 handle_output_debug_string.
2355
1996e237
SM
23562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2357
2358 * linux-mips-low.c (mips_fill_gregset): Add cast.
2359 (mips_store_gregset): Likewise.
2360 (mips_fill_fpregset): Likewise.
2361 (mips_store_fpregset): Likewise.
2362
cbec665b
SM
23632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2364
2365 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2366 priv.
2367
eb3e3c67
SM
23682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2369
2370 * linux-mips-low.c (mips_linux_new_thread): Change type of
2371 watch_type to enum target_hw_bp_type.
2372
171de4b8
SM
23732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2374
2375 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2376 Change return type to arm_hwbp_type.
2377
04248ead
SM
23782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2379
2380 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2381 (arm_store_gregset): Likewise.
2382 * linux-arm-low.c (arm_get_hwcap): Likewise.
2383 (arm_read_description): Likewise.
2384
04b3479c
SM
23852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2386
2387 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2388
2bc84e8a
SM
23892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2390
2391 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2392 (ppc_fill_vsxregset): Likewise.
2393 (ppc_store_vsxregset): Likewise.
2394 (ppc_fill_vrregset): Likewise.
2395 (ppc_store_vrregset): Likewise.
2396 (ppc_fill_evrregset): Likewise.
2397 (ppc_store_evrregset): Likewise.
2398
e6c5bb05
SM
23992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2400
2401 * linux-ppc-low.c (ppc_usrregs_info): Remove
2402 forward-declaration.
2403 (ppc_arch_setup): Move lower in file.
2404
7ea45d72
SM
24052015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2408 (ps_pdwrite): Likewise.
2409
69291610
HW
24102015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2411
2412 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2413 to after assert checks.
2414
b42945fd
SM
24152015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2416
2417 * proc-service.c (ps_pdread): Add/adjust casts.
2418 (ps_pdwrite): Add/adjust casts.
2419
d6f85c84
SM
24202015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2421
2422 * server.c (handle_search_memory_1): Cast return value of
2423 memmem.
2424
f98cd059
SM
24252015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2426
2427 * server.c (write_qxfer_response): Change type of data to
2428 gdb_byte *.
2429
d2412fa5
PA
24302015-10-29 Pedro Alves <palves@redhat.com>
2431
2432 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2433
c17414a2
PA
24342015-10-29 Pedro Alves <palves@redhat.com>
2435
2436 * tracepoint.c (clear_installed_tracepoints): Add casts.
2437
e053fbc4
PA
24382015-10-29 Pedro Alves <palves@redhat.com>
2439
2440 * server.c (handle_v_cont, process_serial_event): Add enum
2441 gdb_signal casts to signal parsing code.
2442
add67df8
PA
24432015-10-29 Pedro Alves <palves@redhat.com>
2444
2445 * linux-low.h (NULL_REGSET): Define.
2446 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2447 * linux-arm-low.c (arm_regsets): Likewise.
2448 * linux-crisv32-low.c (cris_regsets): Likewise.
2449 * linux-m68k-low.c (m68k_regsets): Likewise.
2450 * linux-mips-low.c (mips_regsets): Likewise.
2451 * linux-nios2-low.c (nios2_regsets): Likewise.
2452 * linux-ppc-low.c (ppc_regsets): Likewise.
2453 * linux-s390-low.c (s390_regsets): Likewise.
2454 * linux-sh-low.c (sh_regsets): Likewise.
2455 * linux-sparc-low.c (sparc_regsets): Likewise.
2456 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2457 * linux-tile-low.c (tile_regsets): Likewise.
2458 * linux-x86-low.c (x86_regsets): Likewise.
2459 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2460
50bc912a
PA
24612015-10-29 Pedro Alves <palves@redhat.com>
2462
2463 * linux-low.h (NULL_REGSET): Define.
2464 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2465 * linux-arm-low.c (arm_regsets): Likewise.
2466 * linux-crisv32-low.c (cris_regsets): Likewise.
2467 * linux-m68k-low.c (m68k_regsets): Likewise.
2468 * linux-mips-low.c (mips_regsets): Likewise.
2469 * linux-nios2-low.c (nios2_regsets): Likewise.
2470 * linux-ppc-low.c (ppc_regsets): Likewise.
2471 * linux-s390-low.c (s390_regsets): Likewise.
2472 * linux-sh-low.c (sh_regsets): Likewise.
2473 * linux-sparc-low.c (sparc_regsets): Likewise.
2474 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2475 * linux-tile-low.c (tile_regsets): Likewise.
2476 * linux-x86-low.c (x86_regsets): Likewise.
2477 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2478
682b2546
DE
24792015-10-26 Doug Evans <dje@google.com>
2480
2481 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2482
963843d4
DE
24832015-10-26 Doug Evans <dje@google.com>
2484
2485 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2486
d41401ac
DE
24872015-10-26 Doug Evans <dje@google.com>
2488
2489 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2490 for debug_printf.
2491 (attach_thread, find_new_threads_callback): Ditto.
2492
3db28855
AT
24932015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2494
2495 * mem-break.h (set_breakpoint_data): Remove.
2496
fb78e89c
AT
24972015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2498
2499 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2500 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2501 (initialize_low): Remove set_breakpoint_data call.
2502 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2503 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2504 (initialize_low): Remove set_breakpoint_data call.
2505 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2506 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2507 (initialize_low): Remove set_breakpoint_data call.
2508
2e6ee069
AT
25092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2512 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2513 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2514 * target.h (target_breakpoint_kind_from_pc): New macro.
2515
1652a986
AT
25162015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2517
2518 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2519 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2520 the default breakpoint kind.
2521
abeead09
AT
25222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2523
2524 * linux-arm-low.c (arm_supports_z_point_type): Add software
2525 breakpoint support.
2526
b0b4b501
AT
25272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2528
2529 * linux-arm-low.c: Refactor breakpoint definitions.
2530 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2531 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2532
8689682c
AT
25332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2534
2535 * Makefile.in: Add arm.c/o.
2536 * configure.srv: Likewise.
2537 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2538 (arm_breakpoint_kind_from_pc): New function.
2539 (arm_sw_breakpoint_from_kind): Return proper kind.
2540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2541
27165294
AT
25422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2543
2544 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2545 removal.
2546 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2547 (struct raw_breakpoint) <size>: Remove.
2548 (struct raw_breakpoint) <kind>: Add.
2549 (bp_size): New function.
2550 (bp_opcode): Likewise.
2551 (find_raw_breakpoint_at): Adjust for kind.
2552 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2553 (remove_memory_breakpoint): Adjust for kind call bp_size.
2554 (set_raw_breakpoint_at): Adjust for kind.
2555 (set_breakpoint): Likewise.
2556 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2557 (delete_raw_breakpoint): Adjust for kind.
2558 (delete_breakpoint): Likewise.
2559 (find_gdb_breakpoint): Likewise.
2560 (set_gdb_breakpoint_1): Likewise.
2561 (set_gdb_breakpoint): Likewise.
2562 (delete_gdb_breakpoint_1): Likewise.
2563 (delete_gdb_breakpoint): Likewise.
2564 (uninsert_raw_breakpoint): Likewise.
2565 (reinsert_raw_breakpoint): Likewise.
2566 (set_breakpoint_data): Remove.
2567 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2568 (check_mem_read): Adjust for kind call bp_size.
2569 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2570 (clone_one_breakpoint): Adjust for kind.
2571 * mem-break.h (set_gdb_breakpoint): Likewise.
2572 (delete_gdb_breakpoint): Likewise.
2573 * server.c (process_serial_event): Likewise.
2574
dd373349
AT
25752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2576
2577 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2578 (struct linux_target_ops) <breakpoint>: Remove.
2579 (struct linux_target_ops) <breakpoint_len>: Remove.
2580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2582 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2583 (arm_sw_breakpoint_from_kind): New function.
2584 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2585 (struct linux_target_ops) <breakpoint>: Remove.
2586 (struct linux_target_ops) <breakpoint_len>: Remove.
2587 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2588 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2589 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2595 (struct linux_target_ops) <breakpoint>: Remove.
2596 (struct linux_target_ops) <breakpoint_len>: Remove.
2597 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2598 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2599 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2600 and sw_breakpoint_from_kind to increment the pc.
2601 (linux_breakpoint_kind_from_pc): New function.
2602 (linux_sw_breakpoint_from_kind): New function.
2603 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2604 (initialize_low): Call breakpoint_kind_from_pc and
2605 sw_breakpoint_from_kind to replace breakpoint_data/len.
2606 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2607 New field.
2608 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2609 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2610 (struct linux_target_ops) <breakpoint>: Remove.
2611 (struct linux_target_ops) <breakpoint_len>: Remove.
2612 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2613 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2614 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2615 (struct linux_target_ops) <breakpoint>: Remove.
2616 (struct linux_target_ops) <breakpoint_len>: Remove.
2617 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2618 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2619 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2620 (struct linux_target_ops) <breakpoint>: Remove.
2621 (struct linux_target_ops) <breakpoint_len>: Remove.
2622 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2623 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2624 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2625 (struct linux_target_ops) <breakpoint>: Remove.
2626 (struct linux_target_ops) <breakpoint_len>: Remove.
2627 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2628 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2629 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2630 (struct linux_target_ops) <breakpoint>: Remove.
2631 (struct linux_target_ops) <breakpoint_len>: Remove.
2632 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2633 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2634 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2635 (struct linux_target_ops) <breakpoint>: Remove.
2636 (struct linux_target_ops) <breakpoint_len>: Remove.
2637 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2638 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2639 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2640 (struct linux_target_ops) <breakpoint>: Remove.
2641 (struct linux_target_ops) <breakpoint_len>: Remove.
2642 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2643 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2644 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2645 (struct linux_target_ops) <breakpoint>: Remove.
2646 (struct linux_target_ops) <breakpoint_len>: Remove.
2647 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2648 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2649 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2650 (struct linux_target_ops) <breakpoint>: Remove.
2651 (struct linux_target_ops) <breakpoint_len>: Remove.
2652 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2653 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2654 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2655 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2656 (struct linux_target_ops) <breakpoint>: Remove.
2657 (struct linux_target_ops) <breakpoint_len>: Remove.
2658 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2659 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2660 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2661 (struct linux_target_ops) <breakpoint>: Remove.
2662 (struct linux_target_ops) <breakpoint_len>: Remove.
2663 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2664 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2665
4cd98a19
AT
26662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2667
2668 * linux-cris-low.c (cris_get_pc): Remove void arg.
2669
774ee6d2
AR
26702015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2671
2672 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2673 variable name.
2674
833dcd29
AR
26752015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2676
2677 * inferiors.c (thread_pid_matches_callback): New function.
2678 (find_thread_process): New function.
2679 (remove_thread): Reset current_thread.
2680 (remove_process): Assert threads have been removed first.
2681
8d689ee5
YQ
26822015-10-15 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2685 if it is 3.
2686 (aarch64_remove_point): Likewise.
2687 * regcache.c (regcache_register_size): New function.
2688
1c2e1515
YQ
26892015-10-12 Yao Qi <yao.qi@linaro.org>
2690
2691 * linux-aarch64-low.c: Update all callers as emit_load_store
2692 is renamed to aarch64_emit_load_store.
2693
e1c587c3
YQ
26942015-10-12 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-aarch64-low.c: Update all callers of function renaming
2697 from emit_insn to aarch64_emit_insn.
2698
b6542f81
YQ
26992015-10-12 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2702 arch/aarch64-insn.h.
2703 (struct aarch64_memory_operand): Likewise.
2704 (ENCODE): Likewise.
2705 (emit_insn): Move to arch/aarch64-insn.c.
2706 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2707 (emit_load_store): Move to arch/aarch64-insn.c.
2708 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2709 (can_encode_int32): Remove.
2710
246994ce
YQ
27112015-10-12 Yao Qi <yao.qi@linaro.org>
2712
2713 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2714 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2715 (aarch64_relocate_instruction): Likewise.
2716 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2717 (struct aarch64_insn_visitor): Likewise.
2718
0badd99f
YQ
27192015-10-12 Yao Qi <yao.qi@linaro.org>
2720
2721 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2722 (struct aarch64_insn_visitor): New.
2723 (struct aarch64_insn_relocation_data): New.
2724 (aarch64_ftrace_insn_reloc_b): New function.
2725 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2726 (aarch64_ftrace_insn_reloc_cb): Likewise.
2727 (aarch64_ftrace_insn_reloc_tb): Likewise.
2728 (aarch64_ftrace_insn_reloc_adr): Likewise.
2729 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2730 (aarch64_ftrace_insn_reloc_others): Likewise.
2731 (visitor): New.
2732 (aarch64_relocate_instruction): Use visitor.
2733
dfaffe9d
YQ
27342015-10-12 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2737 int. Add argument buf.
2738 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2739 aarch64_relocate_instruction.
2740
70b439f0
YQ
27412015-10-12 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2744 argument insn. Remove local variable insn. Don't call
2745 target_read_uint32.
2746 (aarch64_install_fast_tracepoint_jump_pad): Call
2747 target_read_uint32.
2748
7781c06f
YQ
27492015-09-30 Yao Qi <yao.qi@linaro.org>
2750
2751 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2752 (emit_load_store_pair): Likewise.
2753
9a3c8263
SM
27542015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2755
2756 * dll.c (match_dll): Add cast(s).
2757 (unloaded_dll): Likewise.
2758 * linux-low.c (second_thread_of_pid_p): Likewise.
2759 (delete_lwp_callback): Likewise.
2760 (count_events_callback): Likewise.
2761 (select_event_lwp_callback): Likewise.
2762 (linux_set_resume_request): Likewise.
2763 * server.c (accumulate_file_name_length): Likewise.
2764 (emit_dll_description): Likewise.
2765 (handle_qxfer_threads_worker): Likewise.
2766 (visit_actioned_threads): Likewise.
2767 * thread-db.c (any_thread_of): Likewise.
2768 * tracepoint.c (same_process_p): Likewise.
2769 (match_blocktype): Likewise.
2770 (build_traceframe_info_xml): Likewise.
2771
224c3ddb
SM
27722015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2773
2774 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2775 assignment.
2776 (gdb_unparse_agent_expr): Likewise.
2777 * hostio.c (require_data): Likewise.
2778 (handle_pread): Likewise.
2779 * linux-low.c (disable_regset): Likewise.
2780 (fetch_register): Likewise.
2781 (store_register): Likewise.
2782 (get_dynamic): Likewise.
2783 (linux_qxfer_libraries_svr4): Likewise.
2784 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2785 (set_fast_tracepoint_jump): Likewise.
2786 (uninsert_fast_tracepoint_jumps_at): Likewise.
2787 (reinsert_fast_tracepoint_jumps_at): Likewise.
2788 (validate_inserted_breakpoint): Likewise.
2789 (clone_agent_expr): Likewise.
2790 * regcache.c (init_register_cache): Likewise.
2791 * remote-utils.c (putpkt_binary_1): Likewise.
2792 (decode_M_packet): Likewise.
2793 (decode_X_packet): Likewise.
2794 (look_up_one_symbol): Likewise.
2795 (relocate_instruction): Likewise.
2796 (monitor_output): Likewise.
2797 * server.c (handle_search_memory): Likewise.
2798 (handle_qxfer_exec_file): Likewise.
2799 (handle_qxfer_libraries): Likewise.
2800 (handle_qxfer): Likewise.
2801 (handle_query): Likewise.
2802 (handle_v_cont): Likewise.
2803 (handle_v_run): Likewise.
2804 (captured_main): Likewise.
2805 * target.c (write_inferior_memory): Likewise.
2806 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2807 * tracepoint.c (init_trace_buffer): Likewise.
2808 (add_tracepoint_action): Likewise.
2809 (add_traceframe): Likewise.
2810 (add_traceframe_block): Likewise.
2811 (cmd_qtdpsrc): Likewise.
2812 (cmd_qtdv): Likewise.
2813 (cmd_qtstatus): Likewise.
2814 (response_source): Likewise.
2815 (response_tsv): Likewise.
2816 (cmd_qtnotes): Likewise.
2817 (gdb_collect): Likewise.
2818 (initialize_tracepoint): Likewise.
2819
afbe19f8
PL
28202015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2821
2822 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2823 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2824 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2825 <NOP>: New.
2826 (enum aarch64_condition_codes): New enum.
2827 (w0): New static global.
2828 (fp): Likewise.
2829 (lr): Likewise.
2830 (struct aarch64_memory_operand) <type>: New
2831 MEMORY_OPERAND_POSTINDEX type.
2832 (postindex_memory_operand): New helper function.
2833 (emit_ret): New function.
2834 (emit_load_store_pair): New function, factored out of emit_stp
2835 with support for MEMORY_OPERAND_POSTINDEX.
2836 (emit_stp): Rewrite using emit_load_store_pair.
2837 (emit_ldp): New function.
2838 (emit_load_store): Likewise.
2839 (emit_ldr): Mention post-index instruction in comment.
2840 (emit_ldrh): New function.
2841 (emit_ldrb): New function.
2842 (emit_ldrsw): Mention post-index instruction in comment.
2843 (emit_str): Likewise.
2844 (emit_subs): New function.
2845 (emit_cmp): Likewise.
2846 (emit_and): Likewise.
2847 (emit_orr): Likewise.
2848 (emit_orn): Likewise.
2849 (emit_eor): Likewise.
2850 (emit_mvn): Likewise.
2851 (emit_lslv): Likewise.
2852 (emit_lsrv): Likewise.
2853 (emit_asrv): Likewise.
2854 (emit_mul): Likewise.
2855 (emit_sbfm): Likewise.
2856 (emit_sbfx): Likewise.
2857 (emit_ubfm): Likewise.
2858 (emit_ubfx): Likewise.
2859 (emit_csinc): Likewise.
2860 (emit_cset): Likewise.
2861 (emit_nop): Likewise.
2862 (emit_ops_insns): New helper function.
2863 (emit_pop): Likewise.
2864 (emit_push): Likewise.
2865 (aarch64_emit_prologue): New function.
2866 (aarch64_emit_epilogue): Likewise.
2867 (aarch64_emit_add): Likewise.
2868 (aarch64_emit_sub): Likewise.
2869 (aarch64_emit_mul): Likewise.
2870 (aarch64_emit_lsh): Likewise.
2871 (aarch64_emit_rsh_signed): Likewise.
2872 (aarch64_emit_rsh_unsigned): Likewise.
2873 (aarch64_emit_ext): Likewise.
2874 (aarch64_emit_log_not): Likewise.
2875 (aarch64_emit_bit_and): Likewise.
2876 (aarch64_emit_bit_or): Likewise.
2877 (aarch64_emit_bit_xor): Likewise.
2878 (aarch64_emit_bit_not): Likewise.
2879 (aarch64_emit_equal): Likewise.
2880 (aarch64_emit_less_signed): Likewise.
2881 (aarch64_emit_less_unsigned): Likewise.
2882 (aarch64_emit_ref): Likewise.
2883 (aarch64_emit_if_goto): Likewise.
2884 (aarch64_emit_goto): Likewise.
2885 (aarch64_write_goto_address): Likewise.
2886 (aarch64_emit_const): Likewise.
2887 (aarch64_emit_call): Likewise.
2888 (aarch64_emit_reg): Likewise.
2889 (aarch64_emit_pop): Likewise.
2890 (aarch64_emit_stack_flush): Likewise.
2891 (aarch64_emit_zero_ext): Likewise.
2892 (aarch64_emit_swap): Likewise.
2893 (aarch64_emit_stack_adjust): Likewise.
2894 (aarch64_emit_int_call_1): Likewise.
2895 (aarch64_emit_void_call_2): Likewise.
2896 (aarch64_emit_eq_goto): Likewise.
2897 (aarch64_emit_ne_goto): Likewise.
2898 (aarch64_emit_lt_goto): Likewise.
2899 (aarch64_emit_le_goto): Likewise.
2900 (aarch64_emit_gt_goto): Likewise.
2901 (aarch64_emit_ge_got): Likewise.
2902 (aarch64_emit_ops_impl): New static global variable.
2903 (aarch64_emit_ops): New target function, return
2904 &aarch64_emit_ops_impl.
2905 (struct linux_target_ops): Install it.
2906
bb903df0
PL
29072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2908
2909 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2910 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2911 aarch64-ipa.o.
2912 * linux-aarch64-ipa.c: New file.
2913 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2914 and endian.h.
2915 (aarch64_get_thread_area): New target method.
2916 (extract_signed_bitfield): New helper function.
2917 (aarch64_decode_ldr_literal): New function.
2918 (enum aarch64_opcodes): New enum.
2919 (struct aarch64_register): New struct.
2920 (struct aarch64_operand): New struct.
2921 (x0): New static global.
2922 (x1): Likewise.
2923 (x2): Likewise.
2924 (x3): Likewise.
2925 (x4): Likewise.
2926 (w2): Likewise.
2927 (ip0): Likewise.
2928 (sp): Likewise.
2929 (xzr): Likewise.
2930 (aarch64_register): New helper function.
2931 (register_operand): Likewise.
2932 (immediate_operand): Likewise.
2933 (struct aarch64_memory_operand): New struct.
2934 (offset_memory_operand): New helper function.
2935 (preindex_memory_operand): Likewise.
2936 (enum aarch64_system_control_registers): New enum.
2937 (ENCODE): New macro.
2938 (emit_insn): New helper function.
2939 (emit_b): New function.
2940 (emit_bcond): Likewise.
2941 (emit_cb): Likewise.
2942 (emit_tb): Likewise.
2943 (emit_blr): Likewise.
2944 (emit_stp): Likewise.
2945 (emit_ldp_q_offset): Likewise.
2946 (emit_stp_q_offset): Likewise.
2947 (emit_load_store): Likewise.
2948 (emit_ldr): Likewise.
2949 (emit_ldrsw): Likewise.
2950 (emit_str): Likewise.
2951 (emit_ldaxr): Likewise.
2952 (emit_stxr): Likewise.
2953 (emit_stlr): Likewise.
2954 (emit_data_processing_reg): Likewise.
2955 (emit_data_processing): Likewise.
2956 (emit_add): Likewise.
2957 (emit_sub): Likewise.
2958 (emit_mov): Likewise.
2959 (emit_movk): Likewise.
2960 (emit_mov_addr): Likewise.
2961 (emit_mrs): Likewise.
2962 (emit_msr): Likewise.
2963 (emit_sevl): Likewise.
2964 (emit_wfe): Likewise.
2965 (append_insns): Likewise.
2966 (can_encode_int32_in): New helper function.
2967 (aarch64_relocate_instruction): New function.
2968 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2969 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2970 (struct linux_target_ops): Install aarch64_get_thread_area,
2971 aarch64_install_fast_tracepoint_jump_pad and
2972 aarch64_get_min_fast_tracepoint_insn_len.
2973
787749ea
PL
29742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2975
2976 * Makefile.in (aarch64-insn.o): New rule.
2977 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2978
9812b2e6
YQ
29792015-09-21 Yao Qi <yao.qi@linaro.org>
2980
2981 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2982
18fe412b
YQ
29832015-09-21 Yao Qi <yao.qi@linaro.org>
2984
2985 * tracepoint.c (max_jump_pad_size): Remove.
2986
a0cc84cd
YQ
29872015-09-18 Yao Qi <yao.qi@linaro.org>
2988
2989 * linux-aarch64-low.c: Don't include sys/uio.h.
2990 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2991
d78908cf
WW
29922015-09-16 Wei-cheng Wang <cole945@gmail.com>
2993
2994 * tracepoint.c (eval_result_type): Change prototype.
2995 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2996
d57e0d50
PA
29972015-09-15 Pedro Alves <palves@redhat.com>
2998
2999 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3000 Check whether to report exec events instead of checking whether
3001 multiprocess is enabled.
3002
5a676acc
PA
30032015-09-15 Pedro Alves <palves@redhat.com>
3004
3005 PR remote/18965
3006 * remote-utils.c (prepare_resume_reply): Merge
3007 TARGET_WAITKIND_VFORK_DONE switch case with the
3008 TARGET_WAITKIND_FORKED case.
3009
7c5d0fad
YQ
30102015-09-15 Yao Qi <yao.qi@linaro.org>
3011
3012 * server.c (handle_query): Check string comparison using
3013 "else if" instead of "if".
3014
750ce8d1
YQ
30152015-09-15 Yao Qi <yao.qi@linaro.org>
3016
3017 * server.c (vCont_supported): New global variable.
3018 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3019 matches. Append ";vContSupported+" to own_buf.
3020 (handle_v_requests): Append ";s;S" to own_buf if target supports
3021 hardware single step or vCont_supported is false.
3022 (capture_main): Set vCont_supported to zero.
3023
70b90b91
YQ
30242015-09-15 Yao Qi <yao.qi@linaro.org>
3025
3026 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3027 it to ...
3028 (linux_supports_hardware_single_step): ... New function.
3029 (linux_target_ops): Update.
3030 * lynx-low.c (lynx_target_ops): Set field
3031 supports_hardware_single_step to target_can_do_hardware_single_step.
3032 * nto-low.c (nto_target_ops): Likewise.
3033 * spu-low.c (spu_target_ops): Likewise.
3034 * win32-low.c (win32_target_ops): Likewise.
3035 * target.c (target_can_do_hardware_single_step): New function.
3036 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3037 Remove. <supports_hardware_single_step>: New field.
3038 (target_supports_conditional_breakpoints): Remove.
3039 (target_supports_hardware_single_step): New macro.
3040 (target_can_do_hardware_single_step): Declare.
3041 * server.c (handle_query): Use target_supports_hardware_single_step
3042 instead of target_supports_conditional_breakpoints.
3043
ade90bde
YQ
30442015-09-15 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3047 function.
3048 (struct linux_target_ops the_low_target): Install
3049 aarch64_linux_siginfo_fixup.
3050
94585166
DB
30512015-09-11 Don Breazeal <donb@codesourcery.com>
3052 Luis Machado <lgustavo@codesourcery.com>
3053
3054 * linux-low.c (linux_mourn): Static declaration.
3055 (linux_arch_setup): Move in front of
3056 handle_extended_wait.
3057 (linux_arch_setup_thread): New function.
3058 (handle_extended_wait): Handle exec events. Call
3059 linux_arch_setup_thread. Make event_lwp argument a
3060 pointer-to-a-pointer.
3061 (check_zombie_leaders): Do not check stopped threads.
3062 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3063 (linux_low_filter_event): Add lwp and thread for exec'ing
3064 non-leader thread if leader thread has been deleted.
3065 Refactor code into linux_arch_setup_thread and call it.
3066 Pass child lwp pointer by reference to handle_extended_wait.
3067 (linux_wait_for_event_filtered): Update comment.
3068 (linux_wait_1): Prevent clobbering exec event status.
3069 (linux_supports_exec_events): New function.
3070 (linux_target_ops) <supports_exec_events>: Initialize new member.
3071 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3072 new member.
3073 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3074 * server.c (report_exec_events): New global variable.
3075 (handle_query): Handle qSupported query for exec-events feature.
3076 (captured_main): Initialize report_exec_events.
3077 * server.h (report_exec_events): Declare new global variable.
3078 * target.h (struct target_ops) <supports_exec_events>: New
3079 member.
3080 (target_supports_exec_events): New macro.
3081 * win32-low.c (win32_target_ops) <supports_exec_events>:
3082 Initialize new member.
3083
0568462b
MM
30842015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3085
3086 * linux-low.c (linux_low_enable_btrace): Remove.
3087 (linux_target_ops): Replace linux_low_enable_btrace with
3088 linux_enable_btrace.
3089
39edd165
YQ
30902015-09-03 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-aarch64-low.c (aarch64_insert_point): Call
3093 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3094 returns true.
3095
1db33b5a
UW
30962015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3097
3098 * linux-low.c (check_stopped_by_breakpoint): Use
3099 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3100
ab290430
PA
31012015-08-27 Pedro Alves <palves@redhat.com>
3102
3103 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3104
8d749320
SM
31052015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3106
6711b7f8
SM
3107 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3108 the XNEW-family equivalent.
8d749320
SM
3109 (compile_bytecodes): Likewise.
3110 * dll.c (loaded_dll): Likewise.
3111 * event-loop.c (append_callback_event): Likewise.
3112 (create_file_handler): Likewise.
3113 (create_file_event): Likewise.
3114 * hostio.c (handle_open): Likewise.
3115 * inferiors.c (add_thread): Likewise.
3116 (add_process): Likewise.
3117 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3118 * linux-arm-low.c (arm_new_process): Likewise.
3119 (arm_new_thread): Likewise.
3120 * linux-low.c (add_to_pid_list): Likewise.
3121 (linux_add_process): Likewise.
3122 (handle_extended_wait): Likewise.
3123 (add_lwp): Likewise.
3124 (enqueue_one_deferred_signal): Likewise.
3125 (enqueue_pending_signal): Likewise.
3126 (linux_resume_one_lwp_throw): Likewise.
3127 (linux_resume_one_thread): Likewise.
3128 (linux_read_memory): Likewise.
3129 (linux_write_memory): Likewise.
3130 * linux-mips-low.c (mips_linux_new_process): Likewise.
3131 (mips_linux_new_thread): Likewise.
3132 (mips_add_watchpoint): Likewise.
3133 * linux-x86-low.c (initialize_low_arch): Likewise.
3134 * lynx-low.c (lynx_add_process): Likewise.
3135 * mem-break.c (set_raw_breakpoint_at): Likewise.
3136 (set_breakpoint): Likewise.
3137 (add_condition_to_breakpoint): Likewise.
3138 (add_commands_to_breakpoint): Likewise.
3139 (clone_agent_expr): Likewise.
3140 (clone_one_breakpoint): Likewise.
3141 * regcache.c (new_register_cache): Likewise.
3142 * remote-utils.c (look_up_one_symbol): Likewise.
3143 * server.c (queue_stop_reply): Likewise.
3144 (start_inferior): Likewise.
3145 (queue_stop_reply_callback): Likewise.
3146 (handle_target_event): Likewise.
3147 * spu-low.c (fetch_ppc_memory): Likewise.
3148 (store_ppc_memory): Likewise.
3149 * target.c (set_target_ops): Likewise.
3150 * thread-db.c (thread_db_load_search): Likewise.
3151 (try_thread_db_load_1): Likewise.
3152 * tracepoint.c (add_tracepoint): Likewise.
3153 (add_tracepoint_action): Likewise.
3154 (create_trace_state_variable): Likewise.
3155 (cmd_qtdpsrc): Likewise.
3156 (cmd_qtro): Likewise.
3157 (add_while_stepping_state): Likewise.
3158 * win32-low.c (child_add_thread): Likewise.
3159 (get_image_name): Likewise.
3160
ed8b7b42
YQ
31612015-08-25 Yao Qi <yao.qi@linaro.org>
3162
3163 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3164
db3cb7cb
YQ
31652015-08-25 Yao Qi <yao.qi@linaro.org>
3166
3167 * Makefile.in (aarch64-linux.o): New rule.
3168 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3169 srv_tgtobj.
3170 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3171 (aarch64_init_debug_reg_state): Make it extern.
3172 (aarch64_linux_prepare_to_resume): Remove.
3173
f6011a1c
YQ
31742015-08-25 Yao Qi <yao.qi@linaro.org>
3175
3176 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3177 lwp_arch_private_info and ptid_of_lwp.
3178
88e2cf7e
YQ
31792015-08-25 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3182 Find proc_info by find_process_pid. All callers updated.
3183
5e35436e
YQ
31842015-08-25 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3187 Remove.
3188 (debug_reg_change_callback): Remove.
3189 (aarch64_notify_debug_reg_change): Remove.
3190
4a8a7965
YQ
31912015-08-25 Yao Qi <yao.qi@linaro.org>
3192
3193 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3194 Call current_lwp_ptid.
3195
32a271ee
YQ
31962015-08-25 Yao Qi <yao.qi@linaro.org>
3197
3198 * linux-aarch64-low.c (debug_reg_change_callback): Use
3199 debug_printf.
3200
0d51c8d7
YQ
32012015-08-25 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3204
31a43dd5
YQ
32052015-08-25 Yao Qi <yao.qi@linaro.org>
3206
3207 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3208
8ee52567
YQ
32092015-08-25 Yao Qi <yao.qi@linaro.org>
3210
3211 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3212 the code.
3213
ff3f0f45
YQ
32142015-08-25 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3217 Remove.
3218 (debug_reg_change_callback): Remove argument entry and add argument
3219 lwp. Remove local variable thread. Don't print thread id in the
3220 debugging output. Don't check whether pid of thread equals to pid.
3221 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3222 iterate_over_lwps instead find_inferior.
3223
3d40fbb5
PA
32242015-08-24 Pedro Alves <palves@redhat.com>
3225
3226 * inferiors.c (get_first_process): New function.
3227 * inferiors.h (get_first_process): New declaration.
3228 * remote-utils.c (read_ptid): Default to the first process in the
3229 list, instead of to the current thread's process.
3230
438e1e42
PA
32312015-08-24 Pedro Alves <palves@redhat.com>
3232
3233 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3234 * event-loop.c: Likewise.
3235 * remote-utils.c: Likewise.
3236 * tracepoint.c: Likewise.
3237
a8c6d4fc
PA
32382015-08-24 Pedro Alves <palves@redhat.com>
3239
3240 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3241 ptid_get_lwp.
3242
99b0bb12
PA
32432015-08-21 Pedro Alves <palves@redhat.com>
3244
3245 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3246 instead of literal 1.
3247
f8904751
PA
32482015-08-21 Pedro Alves <palves@redhat.com>
3249
3250 * tdesc.c (default_description): Explicitly zero-initialize.
3251
465a859e
PA
32522015-08-21 Pedro Alves <palves@redhat.com>
3253
3254 PR gdb/18749
3255 * inferiors.c (remove_thread): Discard any pending stop reply for
3256 this thread.
3257 * server.c (remove_all_on_match_pid): Rename to ...
3258 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3259 instead of a pid.
3260 (discard_queued_stop_replies): Change parameter to a ptid. Now
3261 extern.
3262 (handle_v_kill, kill_inferior_callback, captured_main)
3263 (process_serial_event): Adjust.
3264 * server.h (discard_queued_stop_replies): Declare.
3265
f0db101d
PA
32662015-08-21 Pedro Alves <palves@redhat.com>
3267
3268 * linux-low.c (wait_for_sigstop): Always switch to no thread
3269 selected if the previously current thread dies.
3270 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3271 process instead of the current thread's.
3272 * remote-utils.c (input_interrupt): Don't check if there's no
3273 current thread.
3274 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3275 current thread to the general thread fails, error out.
3276 (handle_qxfer_auxv, handle_qxfer_libraries)
3277 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3278 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3279 (handle_query): Check if there's a thread selected instead of
3280 checking whether there's any thread in the thread list.
3281 (handle_qxfer_threads, handle_qxfer_btrace)
3282 (handle_qxfer_btrace_conf): Don't error out early if there's no
3283 thread in the thread list.
3284 (handle_v_cont, myresume): Don't set the current thread to the
3285 continue thread.
3286 (process_serial_event) <Hg handling>: Also set thread_id if the
3287 previous general thread is still alive.
3288 (process_serial_event) <g/G handling>: If setting the current
3289 thread to the general thread fails, error out.
3290 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3291 thread's lwp instead of the current thread's.
3292 * target.c (set_desired_thread): If the desired thread was not
3293 found, leave the current thread pointing to NULL. Return an int
3294 (boolean) indicating success.
3295 * target.h (set_desired_thread): Change return type to int.
3296
40045d91
MF
32972015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3298
3299 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3300 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3301 #includes.
3302 (ps_get_thread_area): New function.
3303
45face3b
GB
33042015-08-19 Gary Benson <gbenson@redhat.com>
3305
3306 * hostio.c (handle_pread): Do not attempt to read more data
3307 than hostio_reply_with_data can fit in a packet.
3308
16d5f642
JB
33092015-08-18 Joel Brobecker <brobecker@adacore.com>
3310
3311 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3312
a738da3a
MF
33132015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3314
3315 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3316
33ebda9d
PA
33172015-08-06 Pedro Alves <palves@redhat.com>
3318
3319 * tracepoint.c (expr_eval_result): Now an int.
3320
a44892be
PA
33212015-08-06 Pedro Alves <palves@redhat.com>
3322
3323 * gdbthread.h (struct regcache): Forward declare.
3324 (struct thread_info) <regcache_data>: Now a struct regcache
3325 pointer.
3326 * inferiors.c (inferior_regcache_data)
3327 (set_inferior_regcache_data): Now work with struct regcache
3328 pointers.
3329 * inferiors.h (struct regcache): Forward declare.
3330 (inferior_regcache_data, set_inferior_regcache_data): Now work
3331 with struct regcache pointers.
3332 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3333 (free_register_cache_thread): Remove struct regcache pointer
3334 casts.
3335
608a1e46
PA
33362015-08-06 Pedro Alves <palves@redhat.com>
3337
3338 * server.c (captured_main): On error, print the exception message
3339 to stderr, and if run_once is set, throw a quit.
3340
f0ce0d3a
PA
33412015-08-06 Pedro Alves <palves@redhat.com>
3342
3343 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3344 the current thread.
3345
bf47e248
PA
33462015-08-06 Pedro Alves <palves@redhat.com>
3347
3348 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3349 reading beyond the passed in buffer length.
3350
b6b9ffcc
PL
33512015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3352
3353 * tracepoint.c (symbol_list) <required>: Remove.
3354
863d01bd
PA
33552015-08-06 Pedro Alves <palves@redhat.com>
3356
3357 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3358 count if stopping and suspending threads.
3359 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3360 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3361 (linux_detach): Complete an ongoing step-over.
3362 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3363 throughout.
3364 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3365 (linux_wait_1): If passing a signal to the inferior after
3366 finishing a step-over, unsuspend and re-resume all lwps. If we
3367 see a single-step event but the thread should be continuing, don't
3368 pass the trap to gdb.
3369 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3370 internal_error instead of gdb_assert.
3371 (enqueue_pending_signal): New function.
3372 (check_ptrace_stopped_lwp_gone): Add debug output.
3373 (start_step_over): Use internal_error instead of gdb_assert.
3374 (complete_ongoing_step_over): New function.
3375 (linux_resume_one_thread): Don't resume a suspended thread.
3376 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3377 it stepping.
3378
00db26fa
PA
33792015-08-06 Pedro Alves <palves@redhat.com>
3380
3381 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3382 (linux_thread_alive): Use lwp_is_marked_dead.
3383 (extended_event_reported): Delete.
3384 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3385 instead of extended_event_reported.
3386 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3387 as well.
3388 (lwp_is_marked_dead): New function.
3389 (lwp_running): Use lwp_is_marked_dead.
3390 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3391 comment.
3392
ad071a30
PA
33932015-08-06 Pedro Alves <palves@redhat.com>
3394
3395 * linux-low.c (linux_wait_1): Move fork event output out of the
3396 !report_to_gdb check. Pass event_child->waitstatus to
3397 target_waitstatus_to_string instead of ourstatus.
3398
524b57e6
YQ
33992015-08-04 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3402 if current_thread is 32 bit.
3403
6085d6f6
YQ
34042015-08-04 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3407 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3408 * server.c (extended_protocol): Remove "static".
3409 * server.h (extended_protocol): Declare it.
3410
8a7e4587
YQ
34112015-08-04 Yao Qi <yao.qi@linaro.org>
3412
3413 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3414 both aarch64 and aarch32.
3415 (aarch64_set_pc): Likewise.
3416
3b53ae99
YQ
34172015-08-04 Yao Qi <yao.qi@linaro.org>
3418
3419 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3420 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3421 arm-with-neon.xml to srv_xmlfiles.
3422 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3423 (is_64bit_tdesc): New function.
3424 (aarch64_linux_read_description): New function.
3425 (aarch64_arch_setup): Call aarch64_linux_read_description.
3426 (regs_info): Rename to regs_info_aarch64.
3427 (aarch64_regs_info): Return right regs_info.
3428 (initialize_low_arch): Call initialize_low_arch_aarch32.
3429
bd9e6534
YQ
34302015-08-04 Yao Qi <yao.qi@linaro.org>
3431
3432 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3433 * linux-aarch32-low.c: New file.
3434 * linux-aarch32-low.h: New file.
3435 * linux-arm-low.c (arm_fill_gregset): Move it to
3436 linux-aarch32-low.c.
3437 (arm_store_gregset): Likewise.
3438 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3439 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3440 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3441 (regs_info): Rename to regs_info_arm.
3442 (arm_regs_info): Return regs_info_aarch32 if
3443 have_ptrace_getregset is 1 and target description is
3444 arm_with_neon or arm_with_vfpv3.
3445 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3446 Call initialize_low_arch_aarch32 instead.
3447
ded48a5e
YQ
34482015-08-04 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3451 * linux-low.c: ... here.
3452 * linux-low.h (have_ptrace_getregset): Declare it.
3453
96e9210f
PA
34542015-08-04 Pedro Alves <palves@redhat.com>
3455
3456 * thread-db.c (struct thread_db): Use new typedefs.
3457 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3458 CHK calls.
3459 (disable_thread_event_reporting): Cast result of dlsym to
3460 destination function pointer type.
3461 (thread_db_mourn): Use td_ta_delete_ftype.
3462
af60a1ef
SL
34632015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3464
3465 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3466 arch variant.
3467 (CDX_BREAKPOINT): Define for R2.
3468 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3469 (the_low_target): Add comments.
3470
e8b41681
YQ
34712015-07-30 Yao Qi <yao.qi@linaro.org>
3472
3473 * linux-arm-low.c (arm_hwcap): Remove it.
3474 (arm_read_description): New local variable arm_hwcap. Don't
3475 set arm_hwcap to zero.
3476
89abb039
YQ
34772015-07-30 Yao Qi <yao.qi@linaro.org>
3478
3479 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3480 Use regcache->tdesc instead.
3481 (arm_store_wmmxregset): Likewise.
3482 (arm_fill_vfpregset): Likewise.
3483 (arm_store_vfpregset): Likewise.
3484
deca266c
YQ
34852015-07-30 Yao Qi <yao.qi@linaro.org>
3486
3487 * linux-arm-low.c: Include arch/arm.h.
3488 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3489 (arm_store_gregset): Likewise.
3490
aa58a496
SM
34912015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3494 ptrace's 4th parameter.
3495
50904b25
YQ
34962015-07-27 Yao Qi <yao.qi@linaro.org>
3497
3498 * configure.srv (case aarch64*-*-linux*): Don't set
3499 srv_linux_usrregs.
3500
5826e159
PA
35012015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3502
3503 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3504 sys/ptrace.h.
3505 * linux-arm-low.c: Likewise.
3506 * linux-cris-low.c: Likewise.
3507 * linux-crisv32-low.c: Likewise.
3508 * linux-low.c: Likewise.
3509 * linux-m68k-low.c: Likewise.
3510 * linux-mips-low.c: Likewise.
3511 * linux-nios2-low.c: Likewise.
3512 * linux-s390-low.c: Likewise.
3513 * linux-sparc-low.c: Likewise.
3514 * linux-tic6x-low.c: Likewise.
3515 * linux-tile-low.c: Likewise.
3516 * linux-x86-low.c: Likewise.
3517
54019719
PA
35182015-07-24 Pedro Alves <palves@redhat.com>
3519
3520 * config.in: Regenerate.
3521 * configure: Regenerate.
3522
eb7aa561
PA
35232015-07-24 Pedro Alves <palves@redhat.com>
3524
3525 * acinclude.m4: Include ../ptrace.m4.
3526 * configure.ac: Call GDB_AC_PTRACE.
3527 * config.in, configure: Regenerate.
3528
55d7b841
YQ
35292015-07-24 Yao Qi <yao.qi@linaro.org>
3530
3531 * linux-low.c (linux_create_inferior): Remove setting to
3532 proc->priv->new_inferior.
3533 (linux_attach): Likewise.
3534 (linux_low_filter_event): Likewise.
3535 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3536
c06cbd92
YQ
35372015-07-24 Yao Qi <yao.qi@linaro.org>
3538
3539 * linux-low.c (linux_arch_setup): New function.
3540 (linux_low_filter_event): If proc->tdesc is NULL and
3541 proc->attached is true, call the_low_target.arch_setup.
3542 Otherwise, keep status pending, and return.
3543 (linux_resume_one_lwp_throw): Don't call get_pc if
3544 thread->while_stepping isn't NULL. Don't call
3545 get_thread_regcache if proc->tdesc is NULL.
3546 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3547 (linux_target_ops): Install arch_setup.
3548 * server.c (start_inferior): Call the_target->arch_setup.
3549 * target.h (struct target_ops) <arch_setup>: New field.
3550 (target_arch_setup): New marco.
3551 * lynx-low.c (lynx_target_ops): Update.
3552 * nto-low.c (nto_target_ops): Update.
3553 * spu-low.c (spu_target_ops): Update.
3554 * win32-low.c (win32_target_ops): Update.
3555
5ae3ebba
YQ
35562015-07-24 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-low.c (linux_add_process): Don't set
3559 proc->priv->new_inferior.
3560 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3561 (linux_attach): Likewise.
3562
eb97750b
YQ
35632015-07-24 Yao Qi <yao.qi@linaro.org>
3564
3565 * server.c (start_inferior): Code refactor.
3566
51aee833
YQ
35672015-07-24 Yao Qi <yao.qi@linaro.org>
3568
3569 * server.c (process_serial_event): Set general_thread.
3570
af1b22f3
YQ
35712015-07-21 Yao Qi <yao.qi@linaro.org>
3572
3573 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3574 aarch64_linux_get_debug_reg_capacity.
3575
554717a3
YQ
35762015-07-17 Yao Qi <yao.qi@linaro.org>
3577
3578 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3579 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3580 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3581 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3582 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3583 (AARCH64_HWP_ALIGNMENT): Likewise.
3584 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3585 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3586 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3587 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3588 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3589 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3590 (struct aarch64_debug_reg_state): Likewise.
3591 (struct arch_lwp_info): Likewise.
3592 (aarch64_align_watchpoint): Likewise.
3593 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3594 (aarch64_watchpoint_length): Likewise.
3595 (aarch64_point_encode_ctrl_reg): Likewise
3596 (aarch64_point_is_aligned): Likewise.
3597 (aarch64_align_watchpoint): Likewise.
3598 (aarch64_linux_set_debug_regs):
3599 (aarch64_dr_state_insert_one_point): Likewise.
3600 (aarch64_dr_state_remove_one_point): Likewise.
3601 (aarch64_handle_breakpoint): Likewise.
3602 (aarch64_handle_aligned_watchpoint): Likewise.
3603 (aarch64_handle_unaligned_watchpoint): Likewise.
3604 (aarch64_handle_watchpoint): Likewise.
3605
c67ca4de
YQ
36062015-07-17 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3609 and don't aarch64_get_debug_reg_state. All callers update.
3610 (aarch64_handle_aligned_watchpoint): Likewise.
3611 (aarch64_handle_unaligned_watchpoint): Likewise.
3612 (aarch64_handle_watchpoint): Likewise.
3613 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3614 (aarch64_remove_point): Likewise.
3615
25abf979
YQ
36162015-07-17 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3619 debug_printf.
3620 (aarch64_handle_unaligned_watchpoint): Likewise.
3621
db1ff28b
JK
36222015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3623
3624 Revert the previous 3 commits:
3625 Move gdb_regex* to common/
3626 Move linux_find_memory_regions_full & co.
3627 gdbserver build-id attribute generator
3628
700ca40f
JK
36292015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3630 Jan Kratochvil <jan.kratochvil@redhat.com>
3631
3632 gdbserver build-id attribute generator.
3633 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3634 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3635 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3636 (find_phdr): New.
3637 (get_dynamic): Use find_pdhr to traverse program headers.
3638 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3639 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3640 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3641 (get_hex_build_id): New.
3642 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3643 to reply XML document.
3644
9904185c
JK
36452015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3646 Jan Kratochvil <jan.kratochvil@redhat.com>
3647
3648 * target.c: Include target/target-utils.h and fcntl.h.
3649 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3650 (target_fileio_read_stralloc): New functions.
3651
6e5b4429
JK
36522015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3653
3654 * Makefile.in (OBS): Add gdb_regex.o.
3655 (gdb_regex.o): New.
3656 * config.in: Rebuilt.
3657 * configure: Rebuilt.
3658
ddc98fbf
JK
36592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3660 Jan Kratochvil <jan.kratochvil@redhat.com>
3661
3662 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3663 * Makefile.in (OBS): Add target-utils.o.
3664 (linux-maps.o, target-utils.o): New.
3665 * configure.srv (srv_linux_obj): Add linux-maps.o.
3666
e57bb7a0
PL
36672015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3668
3669 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3670 function, return 1.
3671 (the_low_target): Install it.
3672
586b02a9
PA
36732015-07-14 Pedro Alves <palves@redhat.com>
3674
3675 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3676 Instead, ignore ECHILD, and throw an error for other errnos.
3677
58c1b36c
PA
36782015-07-10 Pedro Alves <palves@redhat.com>
3679
3680 * event-loop.c (struct callback_event) <data>: Change type to
3681 gdb_client_data instance instead of gdb_client_data pointer.
3682 (append_callback_event): Adjust.
3683
421530db
PL
36842015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3685
3686 * linux-aarch64-low.c: Add comments for each linux_target_ops
3687 method. Remove comments already covered in target_ops and
3688 linux_target_ops definitions.
3689 (the_low_target): Add comments for each unimplemented method.
3690
c2d65f38
YQ
36912015-07-09 Yao Qi <yao.qi@linaro.org>
3692
3693 * linux-aarch64-low.c (aarch64_regmap): Remove.
3694 (aarch64_usrregs_info): Remove.
3695 (regs_info): Set field usrregs to NULL.
3696
b20a6524
MM
36972015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3698
3699 * linux-low.c: Include "rsp-low.h"
3700 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3701 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3702 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3703 (handle_btrace_enable_pt): New.
3704 (handle_btrace_general_set): Support "pt".
3705 (handle_btrace_conf_general_set): Support "pt:size".
3706
96c97461
PL
37072015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3708
3709 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3710 Z_PACKET_SW_BP.
3711
37d66942
PL
37122015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3713
3714 * linux-aarch64-low.c: Remove comment about endianness.
3715 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3716 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3717 memcmp.
3718
dc06243f
GB
37192015-06-24 Gary Benson <gbenson@redhat.com>
3720
3721 * linux-i386-ipa.c (stdint.h): Do not include.
3722 * lynx-i386-low.c (stdint.h): Likewise.
3723 * lynx-ppc-low.c (stdint.h): Likewise.
3724 * mem-break.c (stdint.h): Likewise.
3725 * thread-db.c (stdint.h): Likewise.
3726 * tracepoint.c (stdint.h): Likewise.
3727 * win32-low.c (stdint.h): Likewise.
3728
124e13d9
SM
37292015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3730
3731 * server.c (write_qxfer_response): Update call to
3732 remote_escape_output.
3733
909c2cda
JK
37342015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3735 Jan Kratochvil <jan.kratochvil@redhat.com>
3736
3737 Merge multiple hex conversions.
3738 * gdbreplay.c (tohex): Rename to 'fromhex'.
3739 (logchar): Use fromhex.
3740
24c05f46
JK
37412015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3742
3743 * server.c (handle_qxfer_libraries): Set `version' attribute for
3744 <library-list>.
3745
14d2069a
GB
37462015-06-10 Gary Benson <gbenson@redhat.com>
3747
3748 * target.h (struct target_ops) <multifs_open>: New field.
3749 <multifs_unlink>: Likewise.
3750 <multifs_readlink>: Likewise.
3751 * linux-low.c (nat/linux-namespaces.h): New include.
3752 (linux_target_ops): Initialize the_target->multifs_open,
3753 the_target->multifs_unlink and the_target->multifs_readlink.
3754 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3755 * hostio.c (hostio_fs_pid): New static variable.
3756 (hostio_handle_new_gdb_connection): New function.
3757 (handle_setfs): Likewise.
3758 (handle_open): Use the_target->multifs_open as appropriate.
3759 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3760 (handle_readlink): Use the_target->multifs_readlink as
3761 appropriate.
3762 (handle_vFile): Handle vFile:setfs packets.
3763 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3764 after target_handle_new_gdb_connection.
3765
4b8b5e72
GB
37662015-06-10 Gary Benson <gbenson@redhat.com>
3767
3768 * configure.ac (AC_CHECK_FUNCS): Add setns.
3769 * config.in: Regenerate.
3770 * configure: Likewise.
3771 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3772 (linux-namespaces.o): New rule.
3773 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3774
3ac2e371
GB
37752015-06-09 Gary Benson <gbenson@redhat.com>
3776
3777 * hostio.c (handle_open): Process mode argument with
3778 fileio_to_host_mode.
3779
ca9b78ce
YQ
37802015-06-01 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3783 * linux-x86-low.c: Likewise.
3784
bfacd19d
DB
37852015-05-28 Don Breazeal <donb@codesourcery.com>
3786
3787 * linux-low.c (handle_extended_wait): Initialize
3788 thread_info.last_resume_kind for new fork children.
3789
452003ef
PA
37902015-05-15 Pedro Alves <palves@redhat.com>
3791
3792 * target.h (target_handle_new_gdb_connection): Rewrite using if
3793 wrapped in do/while.
3794
1041a03c
JB
37952015-05-14 Joel Brobecker <brobecker@adacore.com>
3796
3797 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3798 * configure, config.in: Regenerate.
3799 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3800 Declare typedef.
3801
c269dbdb
DB
38022015-05-12 Don Breazeal <donb@codesourcery.com>
3803
3804 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3805 PTRACE_EVENT_VFORK_DONE.
3806 (linux_low_ptrace_options, extended_event_reported): Add vfork
3807 events.
3808 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3809 and "vforkdone" for RSP 'T' Stop Reply Packet.
3810 * server.h (report_vfork_events): Declare
3811 global variable.
3812
3a8a0396
DB
38132015-05-12 Don Breazeal <donb@codesourcery.com>
3814
3815 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3816 (the_low_target) <new_fork>: Initialize new member.
3817 * linux-arm-low.c (arm_new_fork): New function.
3818 (the_low_target) <new_fork>: Initialize new member.
3819 * linux-low.c (handle_extended_wait): Call new target function
3820 new_fork.
3821 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3822 * linux-mips-low.c (mips_add_watchpoint): New function
3823 extracted from mips_insert_point.
3824 (the_low_target) <new_fork>: Initialize new member.
3825 (mips_linux_new_fork): New function.
3826 (mips_insert_point): Call mips_add_watchpoint.
3827 * linux-x86-low.c (x86_linux_new_fork): New function.
3828 (the_low_target) <new_fork>: Initialize new member.
3829
de0d863e
DB
38302015-05-12 Don Breazeal <donb@codesourcery.com>
3831
3832 * linux-low.c (handle_extended_wait): Implement return value,
3833 rename argument 'event_child' to 'event_lwp', handle
3834 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3835 (linux_low_ptrace_options): New function.
3836 (linux_low_filter_event): Call linux_low_ptrace_options,
3837 use different argument fo linux_enable_event_reporting,
3838 use return value from handle_extended_wait.
3839 (extended_event_reported): New function.
3840 (linux_wait_1): Call extended_event_reported and set
3841 status to report fork events.
3842 (linux_write_memory): Add pid to debug message.
3843 (reset_lwp_ptrace_options_callback): New function.
3844 (linux_handle_new_gdb_connection): New function.
3845 (linux_target_ops): Initialize new structure member.
3846 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3847 * lynx-low.c: Initialize new structure member.
3848 * remote-utils.c (prepare_resume_reply): Implement stop reason
3849 "fork" for "T" stop message.
3850 * server.c (handle_query): Call handle_new_gdb_connection.
3851 * server.h (report_fork_events): Declare global flag.
3852 * target.h (struct target_ops) <handle_new_gdb_connection>:
3853 New member.
3854 (target_handle_new_gdb_connection): New macro.
3855 * win32-low.c: Initialize new structure member.
3856
ddcbc397
DB
38572015-05-12 Don Breazeal <donb@codesourcery.com>
3858
3859 * mem-break.c (APPEND_TO_LIST): Define macro.
3860 (clone_agent_expr): New function.
3861 (clone_one_breakpoint): New function.
3862 (clone_all_breakpoints): New function.
3863 * mem-break.h: Declare new functions.
3864
89245bc0
DB
38652015-05-12 Don Breazeal <donb@codesourcery.com>
3866
3867 * linux-low.c (linux_supports_fork_events): New function.
3868 (linux_supports_vfork_events): New function.
3869 (linux_target_ops): Initialize new structure members.
3870 (initialize_low): Call linux_check_ptrace_features.
3871 * lynx-low.c (lynx_target_ops): Initialize new structure
3872 members.
3873 * server.c (report_fork_events, report_vfork_events):
3874 New global flags.
3875 (handle_query): Add new features to qSupported packet and
3876 response.
3877 (captured_main): Initialize new global variables.
3878 * target.h (struct target_ops) <supports_fork_events>:
3879 New member.
3880 <supports_vfork_events>: New member.
3881 (target_supports_fork_events): New macro.
3882 (target_supports_vfork_events): New macro.
3883 * win32-low.c (win32_target_ops): Initialize new structure
3884 members.
3885
835205d0
GB
38862015-05-12 Gary Benson <gbenson@redhat.com>
3887
3888 * server.c (handle_qxfer_exec_file): Use current process
3889 if annex is empty.
3890
21e94bd9
SL
38912015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3892
3893 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3894 Remove HAVE_PTRACE_GETREGS conditionals.
3895 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3896 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3897
45614f15
YQ
38982015-05-08 Yao Qi <yao.qi@linaro.org>
3899
3900 * linux-low.c (linux_supports_conditional_breakpoints): New
3901 function.
3902 (linux_target_ops): Install new target method.
3903 * lynx-low.c (lynx_target_ops): Install NULL hook for
3904 supports_conditional_breakpoints.
3905 * nto-low.c (nto_target_ops): Likewise.
3906 * spu-low.c (spu_target_ops): Likewise.
3907 * win32-low.c (win32_target_ops): Likewise.
3908 * server.c (handle_query): Check
3909 target_supports_conditional_breakpoints.
3910 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3911 New field.
3912 (target_supports_conditional_breakpoints): New macro.
3913
80ad801e
PA
39142015-05-06 Pedro Alves <palves@redhat.com>
3915
3916 PR server/18081
3917 * server.c (start_inferior): If the process exits, mourn it.
3918
819843c7
GB
39192015-04-21 Gary Benson <gbenson@redhat.com>
3920
3921 * hostio.c (fileio_open_flags_to_host): Factored out to
3922 fileio_to_host_openflags in common/fileio.c. Single use
3923 updated.
3924
a2d5a9d7
MF
39252015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3926
3927 * linux-xtensa-low.c (xtensa_fill_gregset)
3928 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3929 XCHAL_HAVE_LOOP.
3930
deb44829
MF
39312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3932
3933 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3934 (regs_info): Replace usrregs pointer with NULL.
3935
e57f1de3
GB
39362015-04-17 Gary Benson <gbenson@redhat.com>
3937
3938 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3939 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3940 * server.c (handle_qxfer_exec_file): New function.
3941 (qxfer_packets): Add exec-file entry.
3942 (handle_query): Report qXfer:exec-file:read as supported packet.
3943
62828379
RN
39442015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3945
3946 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3947
b88bb450
GB
39482015-04-09 Gary Benson <gbenson@redhat.com>
3949
3950 * hostio-errno.c (errno_to_fileio_error): Remove function.
3951 Update caller to use remote_fileio_to_fio_error.
3952
c8f4bfdd
YQ
39532015-04-09 Yao Qi <yao.qi@linaro.org>
3954
3955 * linux-low.c (linux_insert_point): Call
3956 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3957 (linux_remove_point): Call remove_memory_breakpoint if type is
3958 raw_bkpt_type_sw.
3959 * linux-x86-low.c (x86_insert_point): Don't call
3960 insert_memory_breakpoint.
3961 (x86_remove_point): Don't call remove_memory_breakpoint.
3962
41f98f02
PA
39632015-04-01 Pedro Alves <palves@redhat.com>
3964 Cleber Rosa <crosa@redhat.com>
3965
3966 * server.c (gdbserver_usage): Reorganize and extend the usage
3967 message.
3968
2bf6fb9d
PA
39692015-03-24 Pedro Alves <palves@redhat.com>
3970
3971 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3972 output. Also dump TRAP_TRACE.
3973 (linux_low_filter_event): In debug output, distinguish a
3974 resume_stop SIGSTOP from a delayed SIGSTOP.
3975
369f6daa
GB
39762015-03-24 Gary Benson <gbenson@redhat.com>
3977
3978 * linux-x86-low.c (x86_linux_new_thread): Moved to
3979 nat/x86-linux.c.
3980 (x86_linux_prepare_to_resume): Likewise.
3981
8e5d4070
GB
39822015-03-24 Gary Benson <gbenson@redhat.com>
3983
3984 * Makefile.in (x86-linux-dregs.o): New rule.
3985 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3986 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3987 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3988 (x86_linux_dr_get): Likewise.
3989 (x86_linux_dr_set): Likewise.
3990 (update_debug_registers_callback): Likewise.
3991 (x86_linux_dr_set_addr): Likewise.
3992 (x86_linux_dr_get_addr): Likewise.
3993 (x86_linux_dr_set_control): Likewise.
3994 (x86_linux_dr_get_control): Likewise.
3995 (x86_linux_dr_get_status): Likewise.
3996 (x86_linux_update_debug_registers): Likewise.
3997
2b95d440
GB
39982015-03-24 Gary Benson <gbenson@redhat.com>
3999
4000 * linux-x86-low.c (x86_linux_update_debug_registers):
4001 New function, factored out from...
4002 (x86_linux_prepare_to_resume): ...this.
4003
14b0bc68
GB
40042015-03-24 Gary Benson <gbenson@redhat.com>
4005
4006 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4007 (x86_linux_dr_set): Likewise.
4008 (update_debug_registers_callback): Likewise.
4009 (x86_linux_dr_set_addr): Likewise.
4010 (x86_linux_dr_get_addr): Likewise.
4011 (x86_linux_dr_set_control): Likewise.
4012 (x86_linux_dr_get_control): Likewise.
4013 (x86_linux_dr_get_status): Likewise.
4014 (x86_linux_prepare_to_resume): Likewise.
4015
5dfe6ca8
GB
40162015-03-24 Gary Benson <gbenson@redhat.com>
4017
4018 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4019 Use perror_with_name. Pass string through gettext.
4020 (x86_linux_dr_set): Likewise.
4021
d33472ad
GB
40222015-03-24 Gary Benson <gbenson@redhat.com>
4023
4024 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4025 (x86_linux_dr_set_addr): ...this.
4026 (x86_dr_low_get_addr): Rename to...
4027 (x86_linux_dr_get_addr): ...this.
4028 (x86_dr_low_set_control): Rename to...
4029 (x86_linux_dr_set_control): ...this.
4030 (x86_dr_low_get_control): Rename to...
4031 (x86_linux_dr_get_control): ...this.
4032 (x86_dr_low_get_status): Rename to...
4033 (x86_linux_dr_get_status): ...this.
4034 (x86_dr_low): Update with new function names.
4035
4b134ca1
GB
40362015-03-24 Gary Benson <gbenson@redhat.com>
4037
4038 * Makefile.in (x86-linux.o): New rule.
4039 * configure.srv: Add x86-linux.o to relevant targets.
4040 * linux-low.c (lwp_set_arch_private_info): New function.
4041 (lwp_arch_private_info): Likewise.
4042 * linux-x86-low.c: Include nat/x86-linux.h.
4043 (arch_lwp_info): Removed structure.
4044 (update_debug_registers_callback):
4045 Use lwp_set_debug_registers_changed.
4046 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4047 and lwp_set_debug_registers_changed.
4048 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4049
34c703da
GB
40502015-03-24 Gary Benson <gbenson@redhat.com>
4051
4052 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4053 * linux-arm-low.c (arm_new_thread): Likewise.
4054 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4055 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4056 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4057 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4058
cff068da
GB
40592015-03-24 Gary Benson <gbenson@redhat.com>
4060
4061 * linux-low.c (ptid_of_lwp): New function.
4062 (lwp_is_stopped): Likewise.
4063 (lwp_stop_reason): Likewise.
4064 * linux-x86-low.c (update_debug_registers_callback):
4065 Use lwp_is_stopped.
4066 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4067 lwp_stop_reason.
4068
b2f7c7e8
GB
40692015-03-24 Gary Benson <gbenson@redhat.com>
4070
4071 * linux-low.h (linux_stop_lwp): Remove declaration.
4072
6d4ee8c6
GB
40732015-03-24 Gary Benson <gbenson@redhat.com>
4074
4075 * linux-low.h: Include nat/linux-nat.h.
4076 * linux-low.c (iterate_over_lwps_args): New structure.
4077 (iterate_over_lwps_filter): New function.
4078 (iterate_over_lwps): Likewise.
4079 * linux-x86-low.c (update_debug_registers_callback):
4080 Update signature to what iterate_over_lwps expects.
4081 Remove PID check that iterate_over_lwps now performs.
4082 (x86_dr_low_set_addr): Use iterate_over_lwps.
4083 (x86_dr_low_set_control): Likewise.
4084
70a0bb6b
GB
40852015-03-24 Gary Benson <gbenson@redhat.com>
4086
4087 * linux-x86-low.c (x86_debug_reg_state): New function.
4088 (x86_linux_prepare_to_resume): Use the above.
4089
7b669087
GB
40902015-03-24 Gary Benson <gbenson@redhat.com>
4091
4092 * linux-low.c (current_lwp_ptid): New function.
4093 * linux-x86-low.c: Include nat/linux-nat.h.
4094 (x86_dr_low_get_addr): Use current_lwp_ptid.
4095 (x86_dr_low_get_control): Likewise.
4096 (x86_dr_low_get_status): Likewise.
4097
eef49a3d
PA
40982015-03-20 Pedro Alves <palves@redhat.com>
4099
4100 * tracepoint.c (cmd_qtstatus): Make "str" const.
4101
b2333d22
PA
41022015-03-20 Pedro Alves <palves@redhat.com>
4103
4104 * server.c (handle_general_set): Make "req_str" const.
4105
23f238d3
PA
41062015-03-19 Pedro Alves <palves@redhat.com>
4107
4108 * linux-low.c (linux_resume_one_lwp): Rename to ...
4109 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4110 instead call perror_with_name.
4111 (check_ptrace_stopped_lwp_gone): New function.
4112 (linux_resume_one_lwp): Reimplement as wrapper around
4113 linux_resume_one_lwp_throw that swallows errors if the LWP is
4114 gone.
4115
91baf43f
PA
41162015-03-19 Pedro Alves <palves@redhat.com>
4117
4118 * linux-low.c (count_events_callback, select_event_lwp_callback):
4119 No longer check whether the thread has resume_stop as last resume
4120 kind.
4121
8bf3b159
PA
41222015-03-19 Pedro Alves <palves@redhat.com>
4123
4124 * linux-low.c (count_events_callback, select_event_lwp_callback):
4125 Use the lwp's status_pending_p field, not the thread's.
4126
b90fc188
PA
41272015-03-19 Pedro Alves <palves@redhat.com>
4128
4129 * linux-low.c (select_event_lwp_callback): Update comments to
4130 no longer mention SIGTRAP.
4131
464b0089
GB
41322015-03-18 Gary Benson <gbenson@redhat.com>
4133
4134 * server.c (handle_query): Do not report vFile:fstat as supported.
4135
aa9e327f
GB
41362015-03-11 Gary Benson <gbenson@redhat.com>
4137
4138 * hostio.c (sys/types.h): New include.
4139 (sys/stat.h): Likewise.
4140 (common-remote-fileio.h): Likewise.
4141 (handle_fstat): New function.
4142 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4143
791c0056
GB
41442015-03-11 Gary Benson <gbenson@redhat.com>
4145
4146 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4147 struct stat.st_blocks and struct stat.st_blksize.
4148 * configure: Regenerate.
4149 * config.in: Likewise.
4150 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4151 (OBS): Add common-remote-fileio.o.
4152 (common-remote-fileio.o): New rule.
4153
9a9df970
PA
41542015-03-09 Pedro Alves <palves@redhat.com>
4155
4156 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4157 'struct sockaddr' pointer in 'accept' call.
4158
9eb1356e
PA
41592015-03-09 Pedro Alves <palves@redhat.com>
4160
4161 Revert:
4162 2015-03-07 Pedro Alves <palves@redhat.com>
4163 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4164 or <winsock2.h> here. Instead include "gdb_socket.h".
4165 (remote_open): Use union gdb_sockaddr_u.
4166 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4167 or <winsock2.h> here. Instead include "gdb_socket.h".
4168 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4169 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4170 or <sys/un.h>.
4171 (init_named_socket, gdb_agent_helper_thread): Use union
4172 gdb_sockaddr_u.
4173
aac331e4
PA
41742015-03-07 Pedro Alves <palves@redhat.com>
4175
4176 * configure.ac (build_warnings): Move
4177 -Wdeclaration-after-statement to the C-specific set.
4178 * configure: Regenerate.
4179
366c75fc
PA
41802015-03-07 Pedro Alves <palves@redhat.com>
4181
4182 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4183 or <winsock2.h> here. Instead include "gdb_socket.h".
4184 (remote_open): Use union gdb_sockaddr_u.
4185 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4186 or <winsock2.h> here. Instead include "gdb_socket.h".
4187 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4188 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4189 or <sys/un.h>.
4190 (init_named_socket, gdb_agent_helper_thread): Use union
4191 gdb_sockaddr_u.
4192
492d29ea
PA
41932015-03-07 Pedro Alves <palves@redhat.com>
4194
4195 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4196 instead.
4197
60a191ed
YQ
41982015-03-06 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-aarch64-low.c (aarch64_insert_point): Use
4201 show_debug_regs as a boolean.
4202 (aarch64_remove_point): Likewise.
4203
f5771b1d
PA
42042015-03-05 Pedro Alves <palves@redhat.com>
4205
4206 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4207 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4208 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4209 * nto-low.c (nto_target_ops): Likewise.
4210 * spu-low.c (spu_target_ops): Likewise.
4211 * win32-low.c (win32_target_ops): Likewise.
4212
3e572f71
PA
42132015-03-04 Pedro Alves <palves@redhat.com>
4214
72f4393d 4215 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4216 Decide whether a breakpoint triggered based on the SIGTRAP's
4217 siginfo.si_code.
72f4393d
L
4218 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4219 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4220 (linux_low_filter_event): Check for breakpoints before checking
4221 watchpoints.
4222 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4223 siginfo.si_code.
72f4393d
L
4224 (linux_stopped_by_sw_breakpoint)
4225 (linux_supports_stopped_by_sw_breakpoint)
4226 (linux_stopped_by_hw_breakpoint)
4227 (linux_supports_stopped_by_hw_breakpoint): New functions.
4228 (linux_target_ops): Install new target methods.
3e572f71 4229
1ec68e26
PA
42302015-03-04 Pedro Alves <palves@redhat.com>
4231
4232 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4233 * server.c (swbreak_feature, hwbreak_feature): New globals.
4234 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4235 (captured_main): Clear swbreak_feature and hwbreak_feature.
4236 * server.h (swbreak_feature, hwbreak_feature): Declare.
4237 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4238 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4239 supports_stopped_by_hw_breakpoint>: New fields.
4240 (target_supports_stopped_by_sw_breakpoint)
4241 (target_stopped_by_sw_breakpoint)
4242 (target_supports_stopped_by_hw_breakpoint)
4243 (target_stopped_by_hw_breakpoint): Declare.
4244
15c66dd6
PA
42452015-03-04 Pedro Alves <palves@redhat.com>
4246
4247 enum lwp_stop_reason -> enum target_stop_reason
4248 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4249 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4250 (linux_wait_1, stuck_in_jump_pad_callback)
4251 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4252 (linux_stopped_by_watchpoint):
4253 * linux-low.h (enum lwp_stop_reason): Delete.
4254 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4255 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4256
98fc70d6
YQ
42572015-03-04 Yao Qi <yao.qi@linaro.org>
4258
4259 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4260
dd2ac174
GB
42612015-03-03 Gary Benson <gbenson@redhat.com>
4262
4263 * hostio.c (handle_vFile): Fix prefix lengths.
4264
d68e53f4
MM
42652015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4266
4267 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4268 ptr_bits.
4269
bf2d68ab
AA
42702015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4271
4272 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4273 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4274 (clean): Add "rm -f" for above C files.
4275 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4276 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4277 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4278 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4279 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4280 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4281 (init_registers_s390x_vx_linux64)
4282 (init_registers_s390x_tevx_linux64)
4283 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4284 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4285 declarations.
4286 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4287 (s390_store_vxrs_high): New functions.
4288 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4289 NT_S390_VXRS_HIGH.
4290 (s390_arch_setup): Add logic for selecting one of the new target
4291 descriptions. Activate the new vector regsets if applicable.
4292 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4293 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4294 and init_registers_s390x_tevx_linux64.
4295
c966a859
PA
42962015-03-01 Pedro Alves <palves@redhat.com>
4297
4298 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4299 parameter.
4300
4180215b
PA
43012015-02-27 Pedro Alves <palves@redhat.com>
4302
4303 * linux-x86-low.c (u_debugreg_offset): New function.
4304 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4305
749bab01
PA
43062015-02-27 Pedro Alves <palves@redhat.com>
4307
4308 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4309 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4310 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4311 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4312 (ps_lsetfpregs, ps_getpid)
4313 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4314 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4315 (ps_lsetxregs, ps_plog): Declare.
4316
3c14e5a3
PA
43172015-02-27 Pedro Alves <palves@redhat.com>
4318
4319 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4320 IP_AGENT_EXPORT_FUNC.
4321 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4322 IP_AGENT_EXPORT_FUNC.
4323 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4324 (IP_AGENT_EXPORT): Delete.
4325 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4326 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4327 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4328 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4329 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4330 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4331 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4332 (traceframe_read_count, traceframe_write_count)
4333 (traceframes_created, trace_state_variables, get_raw_reg)
4334 (get_trace_state_variable_value, set_trace_state_variable_value)
4335 (ust_loaded, helper_thread_id, cmd_buf): Use
4336 IPA_SYM_EXPORTED_NAME.
4337 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4338 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4339 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4340 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4341 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4342 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4343 EXTERN_C_PUSH/EXTERN_C_POP.
4344 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4345 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4346 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4347 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4348 (traceframe_write_count, traceframe_read_count)
4349 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4350 (about_to_request_buffer_space, get_trace_state_variable_value)
4351 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4352 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4353 EXTERN_C_PUSH/EXTERN_C_POP.
4354 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4355 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4356 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4357 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4358 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4359 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4360 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4361 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4362 Define.
4363 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4364 (IP_AGENT_EXPORT_VAR_DECL): Define.
4365 (tracing): Declare.
4366 (gdb_agent_get_raw_reg): Declare.
4367
fe978cb0
PA
43682015-02-27 Tom Tromey <tromey@redhat.com>
4369 Pedro Alves <palves@redhat.com>
4370
4371 Rename symbols whose names are reserved C++ keywords throughout.
4372
3bc3d82a
PA
43732015-02-27 Pedro Alves <palves@redhat.com>
4374
4375 * Makefile.in (COMPILER): New, get it from autoconf.
4376 (CXX): Get from autoconf instead.
4377 (COMPILE.pre): Use COMPILER.
4378 (CC-LD): Rename to ...
4379 (CC_LD): ... this. Use COMPILER.
4380 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4381 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4382 * acinclude.m4: Include build-with-cxx.m4.
4383 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4384 Disable -Werror by default if building in C++ mode.
4385 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4386 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4387 the C++ compiler. Save/restore CXXFLAGS too.
4388 * configure: Regenerate.
4389
07697489
PA
43902015-02-27 Pedro Alves <palves@redhat.com>
4391
4392 * acinclude.m4: Include libiberty.m4.
4393 * configure.ac: Call libiberty_INIT.
4394 * config.in, configure: Regenerate.
4395
9beb7c4e
PA
43962015-02-26 Pedro Alves <palves@redhat.com>
4397
4398 * linux-low.c (linux_wait_1): When incrementing the PC past a
4399 program breakpoint always use the_low_target.breakpoint_len as
4400 increment, rather than the maximum between that and
4401 the_low_target.decr_pc_after_break.
4402
8090aef2
PA
44032015-02-23 Pedro Alves <palves@redhat.com>
4404
4405 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4406 thread was doing a step-over; always adjust the PC if
4407 we stepped over a permanent breakpoint.
4408 (linux_wait_1): If we stepped over breakpoint that was on top of a
4409 permanent breakpoint, manually advance the PC past it.
4410
bc9540e8
PA
44112015-02-23 Pedro Alves <palves@redhat.com>
4412
4413 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4414 modes.
4415 (x86_fill_gregset, x86_store_gregset): Use it when handling
4416 $orig_eax.
4417
2db9a427
PA
44182015-02-20 Pedro Alves <palves@redhat.com>
4419
4420 * thread-db.c: Include "nat/linux-procfs.h".
4421 (thread_db_init): Skip listing new threads if the kernel supports
4422 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4423
afa8d396
PA
44242015-02-20 Pedro Alves <palves@redhat.com>
4425
4426 * linux-low.c (status_pending_p_callback): Use ptid_match.
4427
c9587f88
AT
44282015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4429
4430 PR breakpoints/16812
4431 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4432 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4433 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4434
b05ec7a5
AT
44352015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4436
4437 PR breakpoints/15956
4438 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4439
d33501a5
MM
44402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4441
4442 * linux-low.c (linux_low_btrace_conf): Print size.
4443 * server.c (handle_btrace_conf_general_set): New.
4444 (hanle_general_set): Call handle_btrace_conf_general_set.
4445 (handle_query): Report Qbtrace-conf:bts:size as supported.
4446
f4abbc16
MM
44472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4448
4449 * linux-low.c (linux_low_enable_btrace): Update parameters.
4450 (linux_low_btrace_conf): New.
4451 (linux_target_ops)<to_btrace_conf>: Initialize.
4452 * server.c (current_btrace_conf): New.
4453 (handle_btrace_enable): Rename to ...
4454 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4455 to target_enable_btrace. Update comment. Update users.
4456 (handle_qxfer_btrace_conf): New.
4457 (qxfer_packets): Add btrace-conf entry.
4458 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4459 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4460 (target_ops)<read_btrace_conf>: New.
4461 (target_enable_btrace): Update parameters.
4462 (target_read_btrace_conf): New.
4463
043c3577
MM
44642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4465
4466 * server.c (handle_btrace_general_set): Remove call to
4467 target_supports_btrace.
4468 (supported_btrace_packets): New.
4469 (handle_query): Call supported_btrace_packets.
4470 * target.h: include btrace-common.h.
4471 (btrace_target_info): Removed.
4472 (supports_btrace, target_supports_btrace): Update parameters.
4473
734b0e4b
MM
44742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4475
4476 * Makefile.in (SFILES): Add common/btrace-common.c.
4477 (OBS): Add common/btrace-common.o.
4478 (btrace-common.o): Add build rules.
4479 * linux-low: Include btrace-common.h.
4480 (linux_low_read_btrace): Use struct btrace_data. Call
4481 btrace_data_init and btrace_data_fini.
4482
d6c146e9
PA
44832015-02-06 Pedro Alves <palves@redhat.com>
4484
4485 * thread-db.c (find_new_threads_callback): Add debug output.
4486
20ba1ce6
PA
44872015-02-04 Pedro Alves <palves@redhat.com>
4488
4489 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4490 (resume_stopped_resumed_lwps): New function.
4491 (linux_wait_for_event_filtered): Use it.
4492
8cc73a39
SDJ
44932015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4494
4495 * Makefile.in (SFILES): Add linux-personality.c.
4496 (linux-personality.o): New rule.
4497 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4498 list of objects to be built.
4499 * linux-low.c: Include nat/linux-personality.h.
4500 (linux_create_inferior): Remove code to disable address space
4501 randomization (moved to ../nat/linux-personality.c). Create
4502 cleanup to disable address space randomization.
4503
fb23d554
SDJ
45042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4505
4506 * Makefile.in (posix-strerror.o): New rule.
4507 (mingw-strerror.o): Likewise.
4508 * configure: Regenerated.
4509 * configure.ac: Source file ../common/common.host. Initialize new
4510 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4511
cdf43629
YQ
45122015-01-14 Yao Qi <yao@codesourcery.com>
4513
4514 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4515 (ppc-linux.o): New rule.
4516 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4517 * configure.ac: AC_CHECK_FUNCS(getauxval).
4518 * config.in: Re-generated.
4519 * configure: Re-generated.
4520 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4521 ppc64_64bit_inferior_p
4522
514c5338
YQ
45232015-01-14 Yao Qi <yao@codesourcery.com>
4524
4525 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4526 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4527 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4528 (PT_ORIG_R3, PT_TRAP): Likewise.
4529 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4530 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4531 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4532
3368c1e5
JB
45332015-01-10 Joel Brobecker <brobecker@adacore.com>
4534
4535 * i387-fp.c (i387_cache_to_xsave): In look over
4536 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4537 zmmh_low_space field by use of zmmh_high_space.
4538
582511be
PA
45392015-01-09 Pedro Alves <palves@redhat.com>
4540
4541 * linux-low.c (step_over_bkpt): Move higher up in the file.
4542 (handle_extended_wait): Don't store the stop_pc here.
4543 (get_stop_pc): Adjust comments and rename to ...
4544 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4545 stopped for a software breakpoint or hardware breakpoint.
4546 (thread_still_has_status_pending_p): New function.
4547 (status_pending_p_callback): Use
4548 thread_still_has_status_pending_p. If the event is no longer
4549 interesting, resume the LWP.
4550 (handle_tracepoints): Add assert.
4551 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4552 (wstatus_maybe_breakpoint): New function.
4553 (cancel_breakpoint): Delete function.
4554 (check_stopped_by_watchpoint): New function, factored out from
4555 linux_low_filter_event.
4556 (lp_status_maybe_breakpoint): Delete function.
4557 (linux_low_filter_event): Remove filter_ptid argument.
4558 Leave thread group exits pending here. Store the LWP's stop PC.
4559 Always leave events pending.
4560 (linux_wait_for_event_filtered): Pull all events out of the
4561 kernel, and leave them all pending.
4562 (count_events_callback, select_event_lwp_callback): Consider all
4563 events.
4564 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4565 (select_event_lwp): Only give preference to the stepping LWP in
4566 all-stop mode. Adjust comments.
4567 (ignore_event): New function.
4568 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4569 references to cancel_breakpoints. Adjust to renames. Also give
4570 equal priority to all LWPs that have had events in non-stop mode.
4571 If reporting a software breakpoint event, unadjust the LWP's PC.
4572 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4573 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4574 Adjust.
4575 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4576 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4577 (linux_stopped_by_watchpoint): Adjust.
4578 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4579 * linux-low.h (enum lwp_stop_reason): New.
4580 (struct lwp_info) <stop_pc>: Adjust comment.
4581 <stopped_by_watchpoint>: Delete field.
4582 <stop_reason>: New field.
4583 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4584 * mem-break.c (software_breakpoint_inserted_here)
4585 (hardware_breakpoint_inserted_here): New function.
4586 * mem-break.h (software_breakpoint_inserted_here)
4587 (hardware_breakpoint_inserted_here): Declare.
4588 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4589 (cancel_breakpoints): Delete.
4590 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4591 (upload_fast_traceframes): Remove references to
4592 cancel_breakpoints.
4593
a33e3959
PA
45942015-01-09 Pedro Alves <palves@redhat.com>
4595
4596 * thread-db.c (find_new_threads_callback): Ignore thread if the
4597 kernel thread ID is -1.
4598
8784d563
PA
45992015-01-09 Pedro Alves <palves@redhat.com>
4600
4601 * linux-low.c (linux_attach_fail_reason_string): Move to
4602 nat/linux-ptrace.c, and rename.
4603 (linux_attach_lwp): Update comment.
4604 (attach_proc_task_lwp_callback): New function.
4605 (linux_attach): Adjust to rename and use
4606 linux_proc_attach_tgid_threads.
4607 (linux_attach_fail_reason_string): Delete declaration.
4608
76f2b779
JB
46092015-01-01 Joel Brobecker <brobecker@adacore.com>
4610
4611 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4612 * server.c (gdbserver_version): Likewise.
4613
fafcc06a
SDJ
46142014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4615
4616 * remote-utils.c: Include ctype.h.
4617 (input_interrupt): Explicitly handle the case when the char
4618 received is the NUL byte. Improve the printing of non-ASCII
4619 characters.
4620
beed38b8
JB
46212014-12-16 Joel Brobecker <brobecker@adacore.com>
4622
4623 * linux-low.c (linux_low_filter_event): Update call to
4624 linux_enable_event_reporting following the addition of
4625 a new parameter to that function.
4626
bf330350
CU
46272014-12-16 Catalin Udma <catalin.udma@freescale.com>
4628
4629 PR server/17457
4630 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4631 (AARCH64_FPCR_REGNO): Likewise.
4632 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4633 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4634 (aarch64_store_fpregset): Likewise.
4635
5227d625
JB
46362014-12-15 Joel Brobecker <brobecker@adacore.com>
4637
4638 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4639 Remove FIXME comment about assumption about N.
4640
f93b65a0
JB
46412014-12-13 Joel Brobecker <brobecker@adacore.com>
4642
4643 * configure.ac: If large-file support is disabled in GDBserver,
4644 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4645 * configure: Regenerate.
4646
e5a9158d
AA
46472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4648
4649 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4650 warning upon ENODATA from ptrace.
4651 * linux-s390-low.c (s390_store_tdb): New.
4652 (s390_regsets): Add regset for NT_S390_TDB.
4653
feea5f36
AA
46542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4655
4656 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4657 without a fill_function.
4658 * linux-s390-low.c (s390_fill_last_break): Remove.
4659 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4660 (s390_arch_setup): Use regset's size instead of fill_function for
4661 loop end condition.
4662
098dbe61
AA
46632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4664
4665 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4666 the regset's store function when ptrace returned an error.
4667 * regcache.c (get_thread_regcache): Invalidate register cache
4668 before fetching inferior's registers.
4669
28eef672
AA
46702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4671
4672 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4673 while-loop as for-loop.
4674 (regsets_store_inferior_registers): Likewise.
4675
bdca27a2
YQ
46762014-11-28 Yao Qi <yao@codesourcery.com>
4677
4678 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4679 * config.in, configure: Re-generate.
4680 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4681 is defined.
4682
9c232dda
YQ
46832014-11-21 Yao Qi <yao@codesourcery.com>
4684
4685 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4686 (AC_CHECK_HEADERS): Remove malloc.h.
4687 * configure: Re-generated.
4688 * config.in: Re-generated.
4689 * server.h: Don't include alloca.h and malloc.h.
4690 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4691 Don't include malloc.h.
4692
43968415
JB
46932014-11-17 Joel Brobecker <brobecker@adacore.com>
4694
4695 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4696 corresponding ERRNO check in same block.
4697
40e91bc7
PA
46982014-11-12 Pedro Alves <palves@redhat.com>
4699
4700 * server.c (cont_thread): Update comment.
4701 (start_inferior, attach_inferior): No longer clear cont_thread.
4702 (handle_v_cont): No longer set cont_thread.
4703 (captured_main): Clear cont_thread each time a GDB connects.
4704
c2c118cf
PA
47052014-11-12 Pedro Alves <palves@redhat.com>
4706
4707 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4708 thread, and don't resume all threads if the Hc thread has exited.
4709
78708b7c
PA
47102014-11-12 Pedro Alves <palves@redhat.com>
4711
4712 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4713 the process group instead of to a specific LWP.
4714
a2abc7de
PA
47152014-10-15 Pedro Alves <palves@redhat.com>
4716
4717 PR server/17487
4718 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4719 parameter.
4720 (arm_set_thread_context): Delete.
4721 (the_low_target): Adjust.
4722 * win32-i386-low.c (debug_registers_changed)
4723 (debug_registers_used): Delete.
4724 (update_debug_registers_callback): New function.
4725 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4726 needing to update their debug registers.
4727 (win32_get_current_dr): New function.
4728 (x86_dr_low_get_addr, x86_dr_low_get_control)
4729 (x86_dr_low_get_status): Fetch the debug register from the thread
4730 record's context.
4731 (i386_initial_stuff): Adjust.
4732 (i386_get_thread_context): Remove current_event parameter. Don't
4733 clear debug_registers_changed nor copy DR values to
4734 debug_reg_state.
4735 (i386_set_thread_context): Delete.
4736 (i386_prepare_to_resume): New function.
4737 (i386_thread_added): Mark the thread as needing to update irs
4738 debug registers.
4739 (the_low_target): Remove i386_set_thread_context and install
4740 i386_prepare_to_resume.
4741 * win32-low.c (win32_get_thread_context): Adjust.
4742 (win32_set_thread_context): Use SetThreadContext
4743 directly.
4744 (win32_prepare_to_resume): New function.
4745 (win32_require_context): New function, factored out from ...
4746 (thread_rec): ... this.
4747 (continue_one_thread): Call win32_prepare_to_resume on each thread
4748 we're about to continue.
4749 (win32_resume): Call win32_prepare_to_resume on the event thread.
4750 * win32-low.h (struct win32_thread_info)
4751 <debug_registers_changed>: New field.
4752 (struct win32_target_ops): Change prototype of set_thread_context,
4753 delete set_thread_context and add prepare_to_resume.
4754 (win32_require_context): New declaration.
4755
a442d071
GB
47562014-10-08 Gary Benson <gbenson@redhat.com>
4757
4758 * server.h: Do not include common-exceptions.h.
4759
6f1947e8
GB
47602014-10-08 Gary Benson <gbenson@redhat.com>
4761
4762 * server.h: Do not include cleanups.h.
4763
63b434a4
JH
47642014-09-30 James Hogan <james.hogan@imgtec.com>
4765
4766 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4767 mips64-dsp-linux.c.
4768
c4d9ceb6
YQ
47692014-09-23 Yao Qi <yao@codesourcery.com>
4770
4771 * linux-low.c (lp_status_maybe_breakpoint): New function.
4772 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4773 (count_events_callback): Likewise.
4774 (select_event_lwp_callback): Likewise.
4775 (cancel_breakpoints_callback): Likewise.
4776
89a5711c
DB
47772014-09-19 Don Breazeal <donb@codesourcery.com>
4778
4779 * linux-low.c (handle_extended_wait): Call
4780 linux_ptrace_get_extended_event.
4781 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4782 linux_is_extended_waitstatus.
4783
bffc0964
JB
47842014-09-16 Joel Brobecker <brobecker@adacore.com>
4785
4786 * Makefile.in (CPPFLAGS): Define.
4787 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4788 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4789
0bfdf32f
GB
47902014-09-16 Gary Benson <gbenson@redhat.com>
4791
4792 * inferiors.h (current_inferior): Renamed as...
4793 (current_thread): New variable. All uses updated.
4794 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4795 (maybe_move_out_of_jump_pad): Likewise.
4796 (cancel_breakpoint): Likewise.
4797 (linux_low_filter_event): Likewise.
4798 (wait_for_sigstop): Likewise.
4799 (linux_resume_one_lwp): Likewise.
4800 (need_step_over_p): Likewise.
4801 (start_step_over): Likewise.
4802 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4803 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4804 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4805 and save_inferior as saved_thread.
4806 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4807 saved_thread.
4808 (regcache_invalidate_thread): Likewise.
4809 * remote-utils.c (prepare_resume_reply): Likewise.
4810 * thread-db.c (thread_db_get_tls_address): Likewise.
4811 (disable_thread_event_reporting): Likewise.
4812 (remove_thread_event_breakpoints): Likewise.
4813 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4814 as saved_thread.
4815 * target.h (set_desired_inferior): Renamed as...
4816 (set_desired_thread): New declaration. All uses updated.
4817 * server.c (myresume): Updated comment to reference thread instead
4818 of inferior.
4819 (handle_serial_event): Likewise.
4820 (handle_target_event): Likewise.
4821
361c8ade
GB
48222014-09-12 Tom Tromey <tromey@redhat.com>
4823 Gary Benson <gbenson@redhat.com>
4824
4825 * regcache.h: Include common-regcache.h.
4826 (regcache_read_pc): Don't declare.
4827 * regcache.c (get_thread_regcache_for_ptid): New function.
4828
bd9269f7
GB
48292014-09-11 Tom Tromey <tromey@redhat.com>
4830 Gary Benson <gbenson@redhat.com>
4831
4832 * symbol.c: New file.
4833 * Makefile.in (SFILES): Add symbol.c.
4834 (OBS): Add symbol.o.
4835
f8c1d06b
GB
48362014-09-11 Gary Benson <gbenson@redhat.com>
4837
4838 * target.c (target_stop_ptid, target_continue_ptid): New
4839 functions.
4840
721ec300
GB
48412014-09-11 Tom Tromey <tromey@redhat.com>
4842 Gary Benson <gbenson@redhat.com>
4843
4844 * target.h: Include target/target.h.
4845 * target.c (target_read_memory, target_read_uint32)
4846 (target_write_memory): New functions.
4847
c5e92cca
GB
48482014-09-11 Gary Benson <gbenson@redhat.com>
4849
4850 * server.h (debug_hw_points): Don't declare.
4851 * server.c (debug_hw_points): Don't define. Replace all uses
4852 with show_debug_regs.
4853 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4854 all uses with show_debug_regs.
4855
2e4bb98a
EBM
48562014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4857
4858 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4859 endianness into account.
4860 (ppc_supply_ptrace_register): Likewise.
4861
ac740bc7
JH
48622014-09-03 James Hogan <james.hogan@imgtec.com>
4863
4864 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4865 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4866
97ea6506
GB
48672014-09-03 Gary Benson <gbenson@redhat.com>
4868
4869 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4870 ALL_DEBUG_ADDRESS_REGISTERS.
4871
df7e5265
GB
48722014-09-02 Gary Benson <gbenson@redhat.com>
4873
4874 * i386-low.h: Renamed as...
4875 * x86-low.h: New file. All type, function and variable name
4876 prefixes changed from "i386_" to "x86_". All references updated.
4877 * i386-low.c: Renamed as...
4878 * x86-low.c: New file. All type, function and variable name
4879 prefixes changed from "i386_" to "x86_". All references updated.
4880
ed859da7
GB
48812014-09-02 Gary Benson <gbenson@redhat.com>
4882
4883 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4884 (x86_linux_new_thread): Likewise.
4885
860789c7
GB
48862014-08-29 Gary Benson <gbenson@redhat.com>
4887
4888 * server.h (setjmp.h): Do not include.
4889 (toplevel): Do not declare.
4890 (common-exceptions.h): Include.
4891 (cleanups.h): Likewise.
4892 * server.c (toplevel): Do not define.
4893 (exit_code): New static global.
4894 (detach_or_kill_for_exit_cleanup): New function.
4895 (main): New function. Original main renamed to...
4896 (captured_main): New function.
4897 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4898
ff55e1b5
GB
48992014-08-29 Gary Benson <gbenson@redhat.com>
4900
4901 * Makefile.in (SFILES): Add common/common-exceptions.c.
4902 (OBS): Add common-exceptions.o.
4903 (common-exceptions.o): New rule.
4904 * utils.c (prepare_to_throw_exception): New function.
4905
e9bcb658
GB
49062014-08-29 Gary Benson <gbenson@redhat.com>
4907
4908 * config.in: Regenerate.
4909 * configure: Likewise.
4910
e3180625
GB
49112014-08-29 Gary Benson <gbenson@redhat.com>
4912
4913 * Makefile.in (SFILES): Add common/cleanups.c.
4914 (OBS): cleanups.o.
4915 (cleanups.o): New rule.
4916
e3d6ba5d
GB
49172014-08-29 Gary Benson <gbenson@redhat.com>
4918
4919 * utils.c (internal_vwarning): New function.
4920
7096e886
GB
49212014-08-28 Gary Benson <gbenson@redhat.com>
4922
4923 * utils.h (fatal): Remove declaration.
4924 * utils.c (fatal): Remove function.
4925
14ce3192
GB
49262014-08-28 Gary Benson <gbenson@redhat.com>
4927
4928 * tracepoint.c (gdb_agent_init): Replace fatal with
4929 perror_with_name.
4930 (initialize_tracepoint): Likewise.
4931
50278d59
GB
49322014-08-28 Gary Benson <gbenson@redhat.com>
4933
4934 * remote-utils.c (remote_prepare): Replace fatal with error.
4935
aa96c426
GB
49362014-08-28 Gary Benson <gbenson@redhat.com>
4937
4938 * linux-low.c (linux_async): Replace fatal with warning.
4939 Tidy up and return.
4940 (linux_start_non_stop): Return -1 if linux_async failed.
4941
f7160e97
GB
49422014-08-28 Gary Benson <gbenson@redhat.com>
4943
4944 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4945 gdb_assert.
4946 (i386_dr_low_get_addr): Remove vague comment.
4947 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4948 gdb_assert.
4949
38e08fca
GB
49502014-08-28 Gary Benson <gbenson@redhat.com>
4951
4952 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4953 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4954 internal_error.
4955 (linux_resume_one_lwp): Likewise.
4956 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4957 gdb_assert.
4958 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4959 with internal_error.
4960 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4961 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4962 (find_register_by_name): Replace fatal with internal_error.
4963 (find_regno): Likewise.
4964 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4965 * thread-db.c (thread_db_create_event): Likewise.
4966 (thread_db_load_search): Likewise.
4967 (try_thread_db_load_1): Likewise.
4968 * tracepoint.c (get_jump_space_head): Replace fatal with
4969 internal_error.
4970 (claim_trampoline_space): Likewise.
4971 (have_fast_tracepoint_trampoline_buffer): Likewise.
4972 (cmd_qtstart): Likewise.
4973 (stop_tracing): Likewise.
4974 (fast_tracepoint_collecting): Likewise.
4975 (target_malloc): Likewise.
4976 (download_tracepoint): Likewise.
4977 (download_trace_state_variables): Replace check with gdb_assert.
4978 (upload_fast_traceframes): Replace fatal with internal_error.
4979
34abf635
GB
49802014-08-19 Tom Tromey <tromey@redhat.com>
4981 Gary Benson <gbenson@redhat.com>
4982
4983 * Makefile.in (SFILES): Add common/common-debug.c.
4984 (OBS): Add common-debug.o.
4985 (common-debug.o): New rule.
4986 * debug.h (debug_printf): Don't declare.
4987 * debug.c (debug_printf): Renamed and rewritten as...
4988 (debug_vprintf): New function.
4989
f6e94d78
GB
49902014-08-19 Gary Benson <gbenson@redhat.com>
4991
4992 * utils.h: Do not include print-utils.h.
4993
9239eeab
GB
49942014-08-19 Tom Tromey <tromey@redhat.com>
4995 Gary Benson <gbenson@redhat.com>
4996
4997 * server.h: Add static assertion.
4998 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4999
ef87c8bb
GB
50002014-08-19 Tom Tromey <tromey@redhat.com>
5001 Gary Benson <gbenson@redhat.com>
5002
5003 * Makefile.in (SFILES): Add common/errors.c.
5004 (OBS): Add errors.o.
5005 (IPA_OBS): Add errors-ipa.o.
5006 (errors.o): New rule.
5007 (errors-ipa.o): Likewise.
5008 * utils.h (perror_with_name, error, warning): Don't declare.
5009 * utils.c (warning): Renamed and rewritten as...
5010 (vwarning): New function.
5011 (error): Renamed and rewritten as...
5012 (verror): New function.
5013 (internal_error): Renamed and rewritten as...
5014 (internal_verror): New function.
5015
bb974a24
GB
50162014-08-07 Gary Benson <gbenson@redhat.com>
5017
5018 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5019 * configure: Regenerate.
5020 * config.in: Likewise.
5021 * server.h: Do not include errno.h.
5022 * event-loop.c: Likewise.
5023 * hostio-errno.c: Likewise.
5024 * linux-low.c: Likewise.
5025 * remote-utils.c: Likewise.
5026 * spu-low.c: Likewise.
5027 * utils.c: Likewise.
5028 * gdbreplay.c: Unconditionally include errno.h.
5029
6d3d12eb
GB
50302014-08-07 Gary Benson <gbenson@redhat.com>
5031
5032 * server.h: Do not include string.h.
5033 * event-loop.c: Likewise.
5034 * linux-low.c: Likewise.
5035 * regcache.c: Likewise.
5036 * remote-utils.c: Likewise.
5037 * spu-low.c: Likewise.
5038 * utils.c: Likewise.
5039
dccbb609
GB
50402014-08-07 Gary Benson <gbenson@redhat.com>
5041
5042 * server.h: Do not include gdb_assert.h.
5043
e76df0d0
GB
50442014-08-07 Gary Benson <gbenson@redhat.com>
5045
5046 * server.h: Do not include common-utils.h.
5047
4cb9c816
GB
50482014-08-07 Gary Benson <gbenson@redhat.com>
5049
5050 * server.h: Do not include ptid.h.
5051 * notif.h: Likewise.
5052
3995eeee
GB
50532014-08-07 Gary Benson <gbenson@redhat.com>
5054
5055 * server.h: Do not include gdb_locale.h.
5056
cb9f1a9b
GB
50572014-08-07 Gary Benson <gbenson@redhat.com>
5058
5059 * server.h: Do not include gdb/signals.h.
5060 * win32-low.c: Likewise.
5061
a5fceff8
GB
50622014-08-07 Gary Benson <gbenson@redhat.com>
5063
5064 * server.h: Do not include pathmax.h.
5065
b9391142
GB
50662014-08-07 Gary Benson <gbenson@redhat.com>
5067
5068 * server.h: Do not include libiberty.h.
5069 * linux-bfin-low.c: Likewise.
5070
0e443c87
GB
50712014-08-07 Gary Benson <gbenson@redhat.com>
5072
5073 * server.h: Do not include ansidecl.h.
5074
8ebb3f56
GB
50752014-08-07 Gary Benson <gbenson@redhat.com>
5076
5077 * linux-x86-low.c: Do not include stddef.h.
5078 * lynx-ppc-low.c: Likewise.
5079 * tracepoint.c: Likewise.
5080
8980bdf6
GB
50812014-08-07 Gary Benson <gbenson@redhat.com>
5082
5083 * server.h: Do not include stdarg.h.
5084 * nto-low.c: Likewise.
5085
d7096f71
GB
50862014-08-07 Gary Benson <gbenson@redhat.com>
5087
5088 * server.h: Do not include stdlib.h.
5089 * inferiors.c: Likewise.
5090 * linux-low.c: Likewise.
5091 * regcache.c: Likewise.
5092 * spu-low.c: Likewise.
5093 * tracepoint.c: Likewise.
5094 * utils.c: Likewise.
5095
d02f550d
GB
50962014-08-07 Gary Benson <gbenson@redhat.com>
5097
5098 * server.h: Do not include stdio.h.
5099 * linux-low.c: Likewise.
5100 * remote-utils.c: Likewise.
5101 * spu-low.c: Likewise.
5102 * utils.c: Likewise.
5103 * wincecompat.c: Likewise.
5104
87f6c4e3
GB
51052014-08-06 Gary Benson <gbenson@redhat.com>
5106
5107 * regcache.c (init_register_cache): Move conditionals inside if.
5108
7089dca4
GB
51092014-08-06 Gary Benson <gbenson@redhat.com>
5110
5111 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5112
462f517e
GB
51132014-07-31 Gary Benson <gbenson@redhat.com>
5114
5115 * ax.h: Do not include server.h.
5116 * gdbthread.h: Likewise.
5117 * lynx-low.h: Likewise.
5118 * notif.h: Likewise.
5119
976411d6
GB
51202014-07-30 Gary Benson <gbenson@redhat.com>
5121
5122 * server.h: Include common-defs.h.
5123 Do not include config.h or build-gnulib-gdbserver/config.h.
5124
d41f6d8e
GB
51252014-07-30 Gary Benson <gbenson@redhat.com>
5126
5127 * hostio-errno.c: Move server.h to top of includes list.
5128 * inferiors.c: Likewise.
5129 * linux-x86-low.c: Likewise.
5130 * notif.c: Include server.h.
5131
314c6a35
TT
51322014-07-24 Tom Tromey <tromey@redhat.com>
5133 Gary Benson <gbenson@redhat.com>
5134
5135 * server.h (CORE_ADDR): Now unsigned.
5136
69ff6be5
PA
51372014-07-16 Pedro Alves <palves@redhat.com>
5138
5139 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5140
ce9e3fe7
PA
51412014-07-15 Pedro Alves <palves@redhat.com>
5142
5143 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5144 copy.
5145
e76126e8
PA
51462014-07-11 Pedro Alves <palves@redhat.com>
5147
5148 * linux-low.c (kill_wait_lwp): New function, based on
5149 kill_one_lwp_callback, but use my_waitpid directly.
5150 (kill_one_lwp_callback, linux_kill): Use it.
5151
8e9db26e
PA
51522014-06-23 Pedro Alves <palves@redhat.com>
5153
5154 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5155 before setting DR0..DR3.
5156
698b3e08
GB
51572014-06-20 Gary Benson <gbenson@redhat.com>
5158
5159 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5160 * configure: Regenerated.
5161 * config.in: Likewise.
5162
125f8a3d
GB
51632014-06-20 Gary Benson <gbenson@redhat.com>
5164
5165 * Makefile.in (SFILES): Update locations for files moved
5166 from common to nat.
5167 (object file files): Reordered.
5168
42995dbd
GB
51692014-06-20 Gary Benson <gbenson@redhat.com>
5170
5171 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5172 (i386_dr_low_set_addr): Likewise.
5173 (i386_dr_low_get_addr): Likewise.
5174 (i386_dr_low_can_set_control): Likewise.
5175 (i386_dr_low_set_control): Likewise.
5176 (i386_dr_low_get_control): Likewise.
5177 (i386_dr_low_get_status): Likewise.
5178 (i386_get_debug_register_length): Likewise.
5179 * linux-x86-low.c (i386_dr_low_set_addr):
5180 Changed signature. Made static.
5181 (i386_dr_low_get_addr): Likewise.
5182 (i386_dr_low_set_control): Likewise.
5183 (i386_dr_low_get_control): Likewise.
5184 (i386_dr_low_get_status): Likewise.
5185 (i386_dr_low): New global variable.
5186 * win32-i386-low.c (i386_dr_low_set_addr):
5187 Changed signature. Made static.
5188 (i386_dr_low_get_addr): Likewise.
5189 (i386_dr_low_set_control): Likewise.
5190 (i386_dr_low_get_control): Likewise.
5191 (i386_dr_low_get_status): Likewise.
5192 (i386_dr_low): New global variable.
5193
e1d2394b
MS
51942014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5195
5196 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5197 * Makefile.in (AR, AR_FLAGS): Define.
5198 * configure: Regenerate.
5199
3a8ee006
GB
52002014-06-19 Gary Benson <gbenson@redhat.com>
5201
5202 * Makefile.in (i386-dregs.o): New rule.
5203 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5204 * i386-low.c (target.h): Remove include.
5205 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5206 (DR_CONTROL_SHIFT): Likewise.
5207 (DR_CONTROL_SIZE): Likewise.
5208 (DR_RW_EXECUTE): Likewise.
5209 (DR_RW_WRITE): Likewise.
5210 (DR_RW_READ): Likewise.
5211 (DR_RW_IORW): Likewise.
5212 (DR_LEN_1): Likewise.
5213 (DR_LEN_2): Likewise.
5214 (DR_LEN_4): Likewise.
5215 (DR_LEN_8): Likewise.
5216 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5217 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5218 (DR_ENABLE_SIZE): Likewise.
5219 (DR_LOCAL_SLOWDOWN): Likewise.
5220 (DR_GLOBAL_SLOWDOWN): Likewise.
5221 (DR_CONTROL_RESERVED): Likewise.
5222 (I386_DR_CONTROL_MASK): Likewise.
5223 (I386_DR_VACANT): Likewise.
5224 (I386_DR_LOCAL_ENABLE): Likewise.
5225 (I386_DR_GLOBAL_ENABLE): Likewise.
5226 (I386_DR_DISABLE): Likewise.
5227 (I386_DR_SET_RW_LEN): Likewise.
5228 (I386_DR_GET_RW_LEN): Likewise.
5229 (I386_DR_WATCH_HIT): Likewise.
5230 (i386_wp_op_t): Likewise.
5231 (i386_show_dr): Likewise.
5232 (i386_length_and_rw_bits): Likewise.
5233 (i386_insert_aligned_watchpoint): Likewise.
5234 (i386_remove_aligned_watchpoint): Likewise.
5235 (i386_handle_nonaligned_watchpoint): Likewise.
5236 i386_update_inferior_debug_regs(): Likewise.
5237 (i386_dr_insert_watchpoint): Likewise.
5238 (i386_dr_remove_watchpoint): Likewise.
5239 (i386_dr_region_ok_for_watchpoint): Likewise.
5240 (i386_dr_stopped_data_address): Likewise.
5241 (i386_dr_stopped_by_watchpoint): Likewise.
5242
8f26655c
GB
52432014-06-19 Gary Benson <gbenson@redhat.com>
5244
5245 * i386-low.c (i386_dr_show): Renamed to
5246 i386_show_dr and made static. All uses updated.
5247 (i386_dr_length_and_rw_bits): Renamed to
5248 i386_length_and_rw_bits and made static.
5249 All uses updated.
5250 (i386_dr_insert_aligned_watchpoint): Renamed to
5251 i386_insert_aligned_watchpoint and made static.
5252 All uses updated.
5253 (i386_dr_remove_aligned_watchpoint): Renamed to
5254 i386_remove_aligned_watchpoint and made static.
5255 All uses updated.
5256 (i386_dr_update_inferior_debug_regs): Renamed to
5257 i386_update_inferior_debug_regs and made static.
5258 All uses updated.
5259
b9228891
GB
52602014-06-18 Gary Benson <gbenson@redhat.com>
5261
5171def3
GB
5262 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5263 (i386_dr_low_can_set_control): Likewise.
5264 (i386_get_debug_register_length): Likewise.
5265 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5266 (i386_dr_low_can_set_control): Likewise.
5267 (i386_get_debug_register_length): Likewise.
5268
52692014-06-17 Gary Benson <gbenson@redhat.com>
5270
b9228891
GB
5271 * i386-low.h (i386-dregs.h): New include.
5272 (DR_FIRSTADDR): Now in i386-dregs.h.
5273 (DR_LASTADDR): Likewise.
5274 (DR_NADDR): Likewise.
5275 (DR_STATUS): Likewise.
5276 (DR_CONTROL): Likewise.
5277 (i386_debug_reg_state): Likewise.
5278 (i386_dr_insert_watchpoint): Likewise.
5279 (i386_dr_remove_watchpoint): Likewise.
5280 (i386_dr_region_ok_for_watchpoint): Likewise.
5281 (i386_dr_stopped_data_address): Likewise.
5282 (i386_dr_stopped_by_watchpoint): Likewise.
5283 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5284
4be83cc2
GB
52852014-06-18 Gary Benson <gbenson@redhat.com>
5286
5287 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5288 i386_dr_insert_watchpoint.
5289 (i386_low_remove_watchpoint): Renamed to
5290 i386_dr_remove_watchpoint.
5291 (i386_low_region_ok_for_watchpoint): Renamed to
5292 i386_dr_region_ok_for_watchpoint.
5293 (i386_low_stopped_data_address): Renamed to
5294 i386_dr_stopped_data_address.
5295 (i386_low_stopped_by_watchpoint): Renamed to
5296 i386_dr_stopped_by_watchpoint.
5297 * i386-low.c (i386_show_dr): Renamed to
5298 i386_dr_show and made nonstatic. All uses updated.
5299 (i386_length_and_rw_bits): Renamed to
5300 i386_dr_length_and_rw_bits and made nonstatic.
5301 All uses updated.
5302 (i386_insert_aligned_watchpoint): Renamed to
5303 i386_dr_insert_aligned_watchpoint and made nonstatic.
5304 All uses updated.
5305 (i386_remove_aligned_watchpoint): Renamed to
5306 i386_dr_remove_aligned_watchpoint and made nonstatic.
5307 All uses updated.
5308 (i386_update_inferior_debug_regs): Renamed to
5309 i386_dr_update_inferior_debug_regs and made nonstatic.
5310 All uses updated.
5311 (i386_low_insert_watchpoint): Renamed to
5312 i386_dr_insert_watchpoint. All uses updated.
5313 (i386_low_remove_watchpoint): Renamed to
5314 i386_dr_remove_watchpoint. All uses updated.
5315 (i386_low_region_ok_for_watchpoint): Renamed to
5316 i386_dr_region_ok_for_watchpoint. All uses updated.
5317 (i386_low_stopped_data_address): Renamed to
5318 i386_dr_stopped_data_address. All uses updated.
5319 (i386_low_stopped_by_watchpoint): Renamed to
5320 i386_dr_stopped_by_watchpoint. All uses updated.
5321
131aa0d4
GB
53222014-06-18 Gary Benson <gbenson@redhat.com>
5323
5324 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5325 (i386_dr_low_can_set_control): Likewise.
5326 (i386_insert_aligned_watchpoint): New check.
5327
d9305f7f
GB
53282014-06-18 Gary Benson <gbenson@redhat.com>
5329
5330 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5331 Renamed to state.
5332
e927c9fc
GB
53332014-06-18 Gary Benson <gbenson@redhat.com>
5334
5335 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5336 instead of fatal and error.
5337 (i386_handle_nonaligned_watchpoint): Likewise.
5338
1b6d4134
GB
53392014-06-18 Gary Benson <gbenson@redhat.com>
5340
5341 * i386-low.c (i386_get_debug_register_length): New macro.
5342 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5343 (i386_show_dr): Use debug_printf instead of fprintf. Use
5344 phex to format values.
5345
6e62758f
GB
53462014-06-18 Gary Benson <gbenson@redhat.com>
5347
5348 * i386-low.h: Comment changes.
5349 * i386-low.c: Likewise.
5350
fc6e2f03
GB
53512014-06-18 Gary Benson <gbenson@redhat.com>
5352
5353 * i386-low.c: Whitespace changes.
5354
f9d1eeed
TT
53552014-06-12 Tom Tromey <tromey@redhat.com>
5356
5357 * utils.c (freeargv): Remove.
5358
0b04e523
TT
53592014-06-12 Tom Tromey <tromey@redhat.com>
5360
5361 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5362 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5363 (parse_debug_format_options): Likewise.
5364 (gdbserver_usage): Likewise.
5365 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5366 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5367 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5368 against libiberty.
5369 ($(LIBGNU)): Depend on libiberty.
5370 (all-lib): Recurse into all subdirs.
5371 (install-only): Invoke "install" target in subdirs.
5372 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5373 targets.
5374 * configure: Rebuild.
5375 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5376 for vasprintf, vsnprintf, or gettimeofday.
5377 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5378 srv_tgtobj.
5379
270c9937
JB
53802014-06-05 Joel Brobecker <brobecker@adacore.com>
5381
5382 * development.sh: Delete.
5383 * Makefile.in (config.status): Adjust dependency on development.sh.
5384 * configure.ac: Adjust development.sh source call.
5385 * configure: Regenerate.
5386
0a261ed8
PA
53872014-06-02 Pedro Alves <palves@redhat.com>
5388
5389 * ax.c (gdb_free_agent_expr): New function.
5390 * ax.h (gdb_free_agent_expr): New declaration.
5391 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5392 list.
5393 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5394 static.
5395 (clear_breakpoint_conditions_and_commands): New function.
5396 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5397 (clear_breakpoint_conditions_and_commands): New declaration.
5398
e9dae05e
RR
53992014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5400
5401 * linux-aarch64-low.c (asm/ptrace.h): Include.
5402
5876f503
JK
54032014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5404
5405 Fix TLS access for -static -pthread.
5406 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5407 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5408 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5409
802e8e6d
PA
54102014-05-20 Pedro Alves <palves@redhat.com>
5411
5412 * linux-aarch64-low.c (aarch64_insert_point)
5413 (aarch64_remove_point): No longer check whether the type is
5414 supported here. Adjust to new interface.
5415 (the_low_target): Install aarch64_supports_z_point_type as
5416 supports_z_point_type method.
5417 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5418 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5419 instead of a Z packet char. Adjust.
5420 (arm_supports_z_point_type): New function.
5421 (arm_insert_point, arm_remove_point): Adjust to new interface.
5422 (the_low_target): Install arm_supports_z_point_type.
5423 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5424 (cris_insert_point, cris_remove_point): Adjust to new interface.
5425 Don't check whether the type is supported here.
5426 (the_low_target): Install cris_supports_z_point_type.
5427 * linux-low.c (linux_supports_z_point_type): New function.
5428 (linux_insert_point, linux_remove_point): Adjust to new interface.
5429 * linux-low.h (struct linux_target_ops) <insert_point,
5430 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5431 raw_breakpoint pointer parameter.
5432 <supports_z_point_type>: New method.
5433 * linux-mips-low.c (mips_supports_z_point_type): New function.
5434 (mips_insert_point, mips_remove_point): Adjust to new interface.
5435 Use mips_supports_z_point_type.
5436 (the_low_target): Install mips_supports_z_point_type.
5437 * linux-ppc-low.c (the_low_target): Install NULL as
5438 supports_z_point_type method.
5439 * linux-s390-low.c (the_low_target): Install NULL as
5440 supports_z_point_type method.
5441 * linux-sparc-low.c (the_low_target): Install NULL as
5442 supports_z_point_type method.
5443 * linux-x86-low.c (x86_supports_z_point_type): New function.
5444 (x86_insert_point): Adjust to new insert_point interface. Use
5445 insert_memory_breakpoint. Adjust to new
5446 i386_low_insert_watchpoint interface.
5447 (x86_remove_point): Adjust to remove_point interface. Use
5448 remove_memory_breakpoint. Adjust to new
5449 i386_low_remove_watchpoint interface.
5450 (the_low_target): Install x86_supports_z_point_type.
5451 * lynx-low.c (lynx_target_ops): Install NULL as
5452 supports_z_point_type callback.
5453 * nto-low.c (nto_supports_z_point_type): New.
5454 (nto_insert_point, nto_remove_point): Adjust to new interface.
5455 (nto_target_ops): Install nto_supports_z_point_type.
5456 * mem-break.c: Adjust intro comment.
5457 (struct raw_breakpoint) <raw_type, size>: New fields.
5458 <inserted>: Update comment.
5459 <shlib_disabled>: Delete field.
5460 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5461 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5462 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5463 (raw_bkpt_type_to_target_hw_bp_type): New function.
5464 (find_enabled_raw_code_breakpoint_at): New function.
5465 (find_raw_breakpoint_at): New type and size parameters. Use them.
5466 (insert_memory_breakpoint): New function, based off
5467 set_raw_breakpoint_at.
5468 (remove_memory_breakpoint): New function.
5469 (set_raw_breakpoint_at): Reimplement.
5470 (set_breakpoint): New, based on set_breakpoint_at.
5471 (set_breakpoint_at): Reimplement.
5472 (delete_raw_breakpoint): Go through the_target->remove_point
5473 instead of assuming memory breakpoints.
5474 (find_gdb_breakpoint_at): Delete.
5475 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5476 (find_gdb_breakpoint): New function.
5477 (set_gdb_breakpoint_at): Delete.
5478 (z_type_supported): New function.
5479 (set_gdb_breakpoint_1): New function, loosely based off
5480 set_gdb_breakpoint_at.
5481 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5482 (delete_gdb_breakpoint_at): Delete.
5483 (delete_gdb_breakpoint_1): New function, loosely based off
5484 delete_gdb_breakpoint_at.
5485 (delete_gdb_breakpoint): New function.
5486 (clear_gdb_breakpoint_conditions): Rename to ...
5487 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5488 breakpoint.
5489 (add_condition_to_breakpoint): Make static.
5490 (add_breakpoint_condition): Take a struct breakpoint pointer
5491 instead of an address. Adjust.
5492 (gdb_condition_true_at_breakpoint): Rename to ...
5493 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5494 z_type parameter.
5495 (gdb_condition_true_at_breakpoint): Reimplement.
5496 (add_breakpoint_commands): Take a struct breakpoint pointer
5497 instead of an address. Adjust.
5498 (gdb_no_commands_at_breakpoint): Rename to ...
5499 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5500 parameter. Return true if no breakpoint was found. Change debug
5501 output.
5502 (gdb_no_commands_at_breakpoint): Reimplement.
5503 (run_breakpoint_commands): Rename to ...
5504 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5505 and change return type to boolean.
5506 (run_breakpoint_commands): New function.
5507 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5508 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5509 breakpoint. Go through the_target->remove_point instead of
5510 assuming memory breakpoint.
5511 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5512 software and hardware breakpoints.
5513 (reinsert_raw_breakpoint): Go through the_target->insert_point
5514 instead of assuming memory breakpoint.
5515 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5516 software and hardware breakpoints.
5517 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5518 Check both software and hardware breakpoints.
5519 (validate_inserted_breakpoint): Assert the breakpoint is a
5520 software breakpoint. Set the inserted flag to -1 instead of
5521 setting shlib_disabled.
5522 (delete_disabled_breakpoints): Adjust.
5523 (validate_breakpoints): Only validate software breakpoints.
5524 Adjust to inserted flag change.
5525 (check_mem_read, check_mem_write): Skip breakpoint types other
5526 than software breakpoints. Adjust to inserted flag change.
5527 * mem-break.h (enum raw_bkpt_type): New enum.
5528 (raw_breakpoint, struct process_info): Forward declare.
5529 (Z_packet_to_target_hw_bp_type): Delete declaration.
5530 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5531 (set_gdb_breakpoint, delete_gdb_breakpoint)
5532 (clear_breakpoint_conditions): New declarations.
5533 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5534 (breakpoint_inserted_here): Update comment.
5535 (add_breakpoint_condition, add_breakpoint_commands): Replace
5536 address parameter with a breakpoint pointer parameter.
5537 (gdb_breakpoint_here): Update comment.
5538 (delete_gdb_breakpoint_at): Delete.
5539 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5540 * server.c (process_point_options): Take a struct breakpoint
5541 pointer instead of an address. Adjust.
5542 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5543 delete_gdb_breakpoint.
5544 * spu-low.c (spu_target_ops): Install NULL as
5545 supports_z_point_type method.
5546 * target.h: Include mem-break.h.
5547 (struct target_ops) <prepare_to_access_memory>: Update comment.
5548 <supports_z_point_type>: New field.
5549 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5550 instead of a char. Also take a raw breakpoint pointer.
5551 * win32-arm-low.c (the_low_target): Install NULL as
5552 supports_z_point_type.
5553 * win32-i386-low.c (i386_supports_z_point_type): New function.
5554 (i386_insert_point, i386_remove_point): Adjust to new interface.
5555 (the_low_target): Install i386_supports_z_point_type.
5556 * win32-low.c (win32_supports_z_point_type): New function.
5557 (win32_insert_point, win32_remove_point): Adjust to new interface.
5558 (win32_target_ops): Install win32_supports_z_point_type.
5559 * win32-low.h (struct win32_target_ops):
5560 <supports_z_point_type>: New method.
5561 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5562 instead of a char. Also take a raw breakpoint pointer.
5563
932539e3
PA
55642014-05-20 Pedro Alves <palves@redhat.com>
5565
5566 * mem-break.h: Include break-common.h.
5567 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5568 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5569 (Z_packet_to_target_hw_bp_type): New declaration.
5570 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5571 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5572 (Z_PACKET_ACCESS_WP): Delete macros.
5573 (Z_packet_to_hw_type): Delete function.
5574 * i386-low.h: Don't include break-common.h here.
5575 (Z_packet_to_hw_type): Delete declaration.
5576 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5577 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5578 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5579 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5580 * linux-aarch64-low.c: Don't include break-common.h here.
5581 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5582 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5583 (Z_packet_to_target_hw_bp_type): Delete function.
5584 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5585 function.
5586 (mips_insert_point, mips_remove_point): Use
5587 Z_packet_to_target_hw_bp_type.
5588
4ff0d3d8
PA
55892014-05-20 Pedro Alves <palves@redhat.com>
5590
5591 * linux-aarch64-low.c: Include break-common.h.
5592 (enum target_point_type): Delete.
5593 (Z_packet_to_point_type): Rename to ...
5594 (Z_packet_to_target_hw_bp_type): ... this, and return a
5595 target_hw_bp_type instead.
5596 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5597 instead of an enum target_point_type.
5598 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5599 breakpoint type.
5600 (aarch64_dr_state_insert_one_point)
5601 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5602 (aarch64_handle_aligned_watchpoint)
5603 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5604 Take an enum target_hw_bp_type instead of an enum
5605 target_point_type.
5606 (aarch64_supports_z_point_type): New function.
5607 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5608 use Z_packet_to_target_hw_bp_type.
5609
786dc519
JB
56102014-05-20 Joel Brobecker <brobecker@adacore.com>
5611
5612 * configure.ac: Only use -Werror by default when DEVELOPMENT
5613 is true.
5614 * configure: Regenerate.
5615
9e0aa64f
JK
56162014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5617
5618 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5619 * linux-x86-low.c (X86_64_USER_REGS): New.
5620 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5621
2b577b92
YQ
56222014-04-28 Yao Qi <yao@codesourcery.com>
5623
5624 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5625 name.
5626
94611da2
PA
56272014-04-25 Pedro Alves <palves@redhat.com>
5628
5629 PR server/16255
5630 * linux-low.c (linux_attach_fail_reason_string): New function.
5631 (linux_attach_lwp): Delete.
5632 (linux_attach_lwp_1): Rename to ...
5633 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5634 argument. Remove "initial" parameter. Return int instead of
5635 void. Don't error or warn here.
5636 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5637 failure to attach to the tgid. Call warning when failing to
5638 attach to an lwp.
5639 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5640 argument. Remove "initial" parameter. Return int instead of
5641 void. Don't error or warn here.
5642 (linux_attach_fail_reason_string): New declaration.
5643 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5644 interface change. Use linux_attach_fail_reason_string.
5645
01f9f808
MS
56462014-04-24 Michael Sturm <michael.sturm@mintel.com>
5647 Walfred Tedeschi <walfred.tedeschi@intel.com>
5648
5649 * Makefile.in: Added rules to handle new files
5650 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5651 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5652 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5653 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5654 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5655 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5656 x32-avx512-linux.o.
5657 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5658 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5659 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5660 i386/x32-avx512.xml.
5661 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5662 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5663 i386/x32-avx512-linux.xml.
5664 * i387-fp.c (num_avx512_k_registers): New constant for number
5665 of K registers.
5666 (num_avx512_zmmh_low_registers): New constant for number of
5667 lower ZMM registers (0-15).
5668 (num_avx512_zmmh_high_registers): New constant for number of
5669 higher ZMM registers (16-31).
5670 (num_avx512_ymmh_registers): New contant for number of higher
5671 YMM registers (ymm16-31 added by avx521 on x86_64).
5672 (num_avx512_xmm_registers): New constant for number of higher
5673 XMM registers (xmm16-31 added by AVX512 on x86_64).
5674 (struct i387_xsave): Add space for AVX512 registers.
5675 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5676 Add code to handle AVX512 registers.
5677 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5678 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5679 prototypei from generated file.
5680 (tdesc_amd64_avx512_linux): Likewise.
5681 (init_registers_x32_avx512_linux): Likewise.
5682 (tdesc_x32_avx512_linux): Likewise.
5683 (init_registers_i386_avx512_linux): Likewise.
5684 (tdesc_i386_avx512_linux): Likewise.
5685 (x86_64_regmap): Add AVX512 registers.
5686 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5687 mask.
5688 (initialize_low_arch): Add code to initialize AVX512 registers.
5689
51aa91f9
PA
56902014-04-23 Pedro Alves <palves@redhat.com>
5691
5692 * mem-break.c (find_gdb_breakpoint_at): Make static.
5693 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5694
a4165e94
PA
56952014-04-23 Pedro Alves <palves@redhat.com>
5696
5697 * i386-low.c: Don't include break-common.h here.
5698 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5699 prototype to take target_hw_bp_type as argument instead of a Z
5700 packet char.
5701 * i386-low.h: Include break-common.h here.
5702 (Z_packet_to_hw_type): Declare.
5703 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5704 prototypes.
5705 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5706 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5707 (x86_remove_point): Convert the packet number to a
5708 target_hw_bp_type before calling i386_low_remove_watchpoint.
5709 * win32-i386-low.c (i386_insert_point): Convert the packet number
5710 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5711 (i386_remove_point): Convert the packet number to a
5712 target_hw_bp_type before calling i386_low_remove_watchpoint.
5713
b8acf843
PA
57142014-04-23 Pedro Alves <palves@redhat.com>
5715
5716 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5717
d708bcd1
PA
57182014-04-10 Pedro Alves <palves@redhat.com>
5719
5720 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5721 Check if the condition or command is NULL before checking if the
5722 breakpoint is known. On success, return true.
5723 * mem-break.h (add_breakpoint_condition): Document return.
5724 (add_breakpoint_commands): Add describing comment.
5725 * server.c (skip_to_semicolon): New function.
5726 (process_point_options): Use it.
5727
2eec7d5b
PA
57282014-04-09 Pedro Alves <palves@redhat.com>
5729
5730 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5731 to lwpid_of.
5732
fa96cb38
PA
57332014-02-27 Pedro Alves <palves@redhat.com>
5734
5735 PR 12702
5736 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5737 macros.
5738 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5739 output.
5740 (last_thread_of_process_p): Take a PID argument instead of a
5741 thread pointer.
5742 (linux_wait_for_lwp): Delete.
5743 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5744 functions.
5745 (linux_low_filter_event): New function, party factored out from
5746 linux_wait_for_event.
5747 (linux_wait_for_event): Rename to ...
5748 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5749 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5750 sigsuspend. Check for zombie leaders.
5751 (linux_wait_for_event): Reimplement as wrapper around
5752 linux_wait_for_event_filtered.
5753 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5754 a normal or signal exit is seen, it's the whole process exiting.
5755 (wait_for_sigstop): No longer a for_each_inferior callback.
5756 Rewrite on top of linux_wait_for_event_filtered.
5757 (stop_all_lwps): Call wait_for_sigstop directly.
5758 * server.c (resume, handle_target_event): Handle
5759 TARGET_WAITKIND_NO_RESUMED.
5760
d763de10
JB
57612014-02-26 Joel Brobecker <brobecker@adacore.com>
5762
5763 * win32-low.c (psapi_get_dll_name,
5764 * win32_CreateToolhelp32Snapshot): Delete.
5765 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5766 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5767 Delete.
5768 (handle_load_dll): Add function description.
5769 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5770
850a0f76
JB
57712014-02-26 Joel Brobecker <brobecker@adacore.com>
5772
5773 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5774 Add comment.
5775 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5776 base address when calling win32_add_one_solib.
5777 (handle_load_dll): Delete local variable load_addr.
5778 Remove 0x1000 offset applied to DLL base address when calling
5779 win32_add_one_solib.
5780 (handle_unload_dll): Add comment.
5781
f25b3fc3
JB
57822014-02-26 Joel Brobecker <brobecker@adacore.com>
5783
5784 * win32-low.c (win32_add_all_dlls): Renames
5785 win32_ensure_ntdll_loaded. Rewrite function documentation.
5786 Adjust implementation to always load all DLLs.
5787 Add 0x1000 offset to DLL base address when calling
5788 win32_add_one_solib.
5789 (child_initialization_done): New static global.
5790 (do_initial_child_stuff): Set child_initialization_done to
5791 zero during child initialization, and 1 after. Replace call
5792 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5793 Add comment.
5794 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5795 (handle_unload_dll): Add function documentation.
5796 (get_child_debug_event): Ignore load and unload DLL events
5797 during child initialization.
5798
d86d4aaf
DE
57992014-02-20 Doug Evans <dje@google.com>
5800
3bc32da3 5801 Remove global all_lwps.
d86d4aaf
DE
5802 * inferiors.h (ptid_of): Move here from linux-low.h.
5803 (pid_of, lwpid_of): Ditto.
5804 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5805 parameter is a struct thread_info * now.
5806 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5807 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5808 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5809 directly.
5810 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5811 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5812 * linux-arm-low.c (update_registers_callback): Update, "entry"
5813 parameter is a struct thread_info * now.
5814 Fetch lwpid from current_inferior directly.
5815 (arm_insert_point): Pass &all_threads to find_inferior instead of
5816 &all_lwps.
5817 (arm_remove_point): Ditto.
5818 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5819 (arm_prepare_to_resume): Fetch pid from thread.
5820 (arm_read_description): Fetch lwpid from current_inferior directly.
5821 * linux-low.c (all_lwps): Delete.
5822 (delete_lwp): Delete call to remove_inferior.
5823 (handle_extended_wait): Fetch lwpid from thread.
5824 (add_lwp): Don't set lwp->entry.id. Remove call to
5825 add_inferior_to_list.
5826 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5827 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5828 (kill_one_lwp_callback): Ditto.
5829 (linux_kill): Don't dereference NULL pointer.
5830 Fetch ptid,lwpid from thread.
5831 (get_detach_signal): Fetch ptid from thread.
5832 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5833 Simplify call to regcache_invalidate_thread.
5834 (delete_lwp_callback): Update, "entry" parameter is a
5835 struct thread_info * now. Fetch pid from thread.
5836 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5837 (status_pending_p_callback): Update, "entry" parameter is a
5838 struct thread_info * now. Fetch ptid from thread.
5839 (find_lwp_pid): Update, "entry" parameter is a
5840 struct thread_info * now.
5841 (linux_wait_for_lwp): Fetch pid from thread.
5842 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5843 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5844 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5845 (dequeue_one_deferred_signal): Ditto.
5846 (cancel_breakpoint): Fetch ptid from current_inferior.
5847 (linux_wait_for_event): Pass &all_threads to find_inferior,
5848 not &all_lwps. Fetch ptid, lwpid from thread.
5849 (count_events_callback): Update, "entry" parameter is a
5850 struct thread_info * now.
5851 (select_singlestep_lwp_callback): Ditto.
5852 (select_event_lwp_callback): Ditto.
5853 (cancel_breakpoints_callback): Ditto.
5854 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5855 not &all_lwps.
5856 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5857 (unsuspend_one_lwp): Update, "entry" parameter is a
5858 struct thread_info * now.
5859 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5860 not &all_lwps.
5861 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5862 Fetch lwpid from thread, not lwp.
5863 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5864 Pass &all_threads to find_inferior, not &all_lwps.
5865 (send_sigstop): Fetch lwpid from thread, not lwp.
5866 (send_sigstop_callback): Update, "entry" parameter is a
5867 struct thread_info * now.
5868 (suspend_and_send_sigstop_callback): Ditto.
5869 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5870 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5871 struct thread_info * now.
5872 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5873 from thread, lwp.
5874 (lwp_running): Update, "entry" parameter is a
5875 struct thread_info * now.
5876 (stop_all_lwps): Fetch ptid from thread.
5877 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5878 (linux_resume_one_lwp): Fetch lwpid from thread.
5879 (linux_set_resume_request): Update, "entry" parameter is a
5880 struct thread_info * now. Fetch pid, lwpid from thread.
5881 (resume_status_pending_p): Update, "entry" parameter is a
5882 struct thread_info * now.
5883 (need_step_over_p): Ditto. Fetch lwpid from thread.
5884 (start_step_over): Fetch lwpid from thread.
5885 (linux_resume_one_thread): Update, "entry" parameter is a
5886 struct thread_info * now. Fetch lwpid from thread.
5887 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5888 (proceed_one_lwp): Update, "entry" parameter is a
5889 struct thread_info * now. Fetch lwpid from thread.
5890 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5891 struct thread_info * now.
5892 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5893 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5894 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5895 directly.
5896 (regsets_store_inferior_registers): Ditto.
5897 (fetch_register, store_register): Ditto.
5898 (linux_read_memory, linux_write_memory): Ditto.
5899 (linux_request_interrupt): Ditto.
5900 (linux_read_auxv): Ditto.
5901 (linux_xfer_siginfo): Ditto.
5902 (linux_qxfer_spu): Ditto.
5903 (linux_qxfer_libraries_svr4): Ditto.
5904 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5905 moved to inferiors.h.
5906 (get_lwp): Delete.
5907 (get_thread_lwp): Update.
5908 (struct lwp_info): Delete member "entry". Simplify comment for
5909 member "thread".
5910 (all_lwps): Delete.
5911 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5912 current_inferior directly.
5913 (update_watch_registers_callback): Update, "entry" parameter is a
5914 struct thread_info * now. Fetch pid from thread.
5915 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5916 (mips_insert_point): Fetch lwpid from current_inferior.
5917 Pass &all_threads to find_inferior, not &all_lwps.
5918 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5919 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5920 directly.
5921 (mips_stopped_data_address): Ditto.
5922 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5923 directly.
5924 * linux-tile-low.c (tile_arch_setup): Ditto.
5925 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5926 (update_debug_registers_callback): Update, "entry" parameter is a
5927 struct thread_info * now. Fetch pid from thread.
5928 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5929 Pass &all_threads to find_inferior, not &all_lwps.
5930 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5931 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5932 Pass &all_threads to find_inferior, not &all_lwps.
5933 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5934 (i386_dr_low_get_status): Ditto.
5935 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5936 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5937 (x86_linux_read_description): Ditto.
5938 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5939
3b8361aa
DE
59402014-02-20 Doug Evans <dje@google.com>
5941
5942 * inferiors.c (get_first_inferior): Fix buglet.
5943
f7667f0d
DE
59442014-02-19 Doug Evans <dje@google.com>
5945
5946 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5947 * inferiors.c (add_thread): Change result type to struct thread_info *.
5948 All callers updated.
5949 (add_lwp): Call add_thread here instead of in callers.
5950 All callers updated.
5951 * linux-low.h (get_lwp_thread): Rewrite.
5952 (struct lwp_info): New member "thread".
5953
b3312d80
DE
59542014-02-19 Doug Evans <dje@google.com>
5955
5956 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5957 All callers updated.
5958
ecc6f45c
DE
59592014-02-19 Doug Evans <dje@google.com>
5960
5961 * inferiors.c (add_thread): Fix whitespace.
5962
649ebbca
DE
59632014-02-19 Doug Evans <dje@google.com>
5964
5965 * dll.c (clear_dlls): Replace accessing list implemention details
5966 with API function.
5967 * gdbthread.h (get_first_thread): Declare.
5968 * inferiors.c (for_each_inferior_with_data): New function.
5969 (get_first_thread): New function.
5970 (find_thread_ptid): Simplify.
5971 (get_first_inferior): New function.
5972 (clear_list): Delete.
5973 (one_inferior_p): New function.
5974 (clear_inferior_list): New function.
5975 (clear_inferiors): Update.
5976 * inferiors.h (for_each_inferior_with_data): Declare.
5977 (clear_inferior_list): Declare.
5978 (one_inferior_p): Declare.
5979 (get_first_inferior): Declare.
5980 * linux-low.c (linux_wait_for_event): Replace accessing list
5981 implemention details with API function.
5982 * server.c (target_running): Ditto.
5983 (accumulate_file_name_length): New function.
5984 (emit_dll_description): New function.
5985 (handle_qxfer_libraries): Replace accessing list implemention
5986 details with API function.
5987 (handle_qxfer_threads_worker): New function.
5988 (handle_qxfer_threads_proper): Replace accessing list implemention
5989 details with API function.
5990 (handle_query): Ditto.
5991 (visit_actioned_threads_callback_ftype): New typedef.
5992 (visit_actioned_threads_data): New struct.
5993 (visit_actioned_threads): Rewrite to be find_inferior callback.
5994 (resume): Call find_inferior.
5995 (handle_status): Replace accessing list implemention
5996 details with API function.
5997 (process_serial_event): Replace accessing list implemention details
5998 with API function.
5999 * target.c (set_desired_inferior): Replace accessing list implemention
6000 details with API function.
6001 * tracepoint.c (same_process_p): New function.
6002 (gdb_agent_about_to_close): Replace accessing list implemention
6003 details with API function.
6004 * win32-low.c (child_delete_thread): Replace accessing list
6005 implemention details with API function.
6006 (match_dll_by_basename): New function.
6007 (dll_is_loaded_by_basename): New function.
6008 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6009 details call to dll_is_loaded_by_basename.
6010
80894984
DE
60112014-02-19 Doug Evans <dje@google.com>
6012
6013 * dll.h (struct dll_info): Add comment.
6014 * gdbthread.h (struct thread_info): Add comment.
6015 (current_ptid): Simplify.
6016 * inferiors.c (add_process): Update.
6017 (remove_process): Update.
6018 * inferiors.h (struct process_info): Rename member "head" to "entry".
6019 * linux-low.c (delete_lwp): Update.
6020 (add_lwp): Update.
6021 (last_thread_of_process_p): Update.
6022 (kill_one_lwp_callback, linux_kill): Update.
6023 (status_pending_p_callback): Update.
6024 (wait_for_sigstop): Update. Simplify read of ptid.
6025 (start_step_over): Update.
6026 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6027 (get_lwp_thread): Update.
6028 (struct lwp_info): Rename member "head" to "entry".
6029 * regcache.h (inferior_list_entry): Delete.
6030 * server.c (kill_inferior_callback): Update.
6031 (detach_or_kill_inferior_callback): Update.
6032 (print_started_pid): Update.
6033 (print_attached_pid): Update.
6034 (process_serial_event): Simplify read of ptid.
6035 * thread-db.c (thread_db_create_event): Update.
6036 (thread_db_get_tls_address): Update.
6037 * win32-low.c (current_inferior_ptid): Simplify.
6038
46917d26
TT
60392014-02-19 Tom Tromey <tromey@redhat.com>
6040
6041 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6042 argument.
6043 (target_supports_btrace): Update.
6044
0759a81e
YQ
60452014-02-14 Yao Qi <yao@codesourcery.com>
6046
6047 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6048 (rsp-low-ipa.o): New target.
6049
a7191e8b
TT
60502014-02-12 Tom Tromey <tromey@redhat.com>
6051
6052 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6053 convert_ascii_to_int.
6054 * regcache.c (registers_to_string): Likewise.
6055 * remote-utils.c (decode_M_packet): Likewise.
6056 * server.c (process_serial_event): Likewise.
6057
ff0e980e
TT
60582014-02-12 Tom Tromey <tromey@redhat.com>
6059
6060 * server.c (handle_query, handle_v_run): Use hex2bin, not
6061 unhexify.
6062 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6063
e9371aff
TT
60642014-02-12 Tom Tromey <tromey@redhat.com>
6065
6066 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6067 convert_int_to_ascii.
6068 * regcache.c (registers_to_string, collect_register_as_string):
6069 Likewise.
6070 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6071 Likewise.
6072 * server.c (process_serial_event): Likewise.
6073 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6074 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6075
971dc0b8
TT
60762014-02-12 Tom Tromey <tromey@redhat.com>
6077
6078 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6079 bin2hex, not hexify.
6080 * tracepoint.c (cmd_qtstatus): Likewise.
6081
0a822afb
TT
60822014-02-12 Tom Tromey <tromey@redhat.com>
6083
6084 * remote-utils.c (monitor_output): Pass explicit length to
6085 hexify.
6086
9c3d6531
TT
60872014-02-12 Tom Tromey <tromey@redhat.com>
6088
6089 * tracepoint.c: Include rsp-low.h.
6090 * server.c: Include rsp-low.h.
6091 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6092 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6093 declare.
6094 * remote-utils.c: Include rsp-low.h.
6095 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6096 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6097 (convert_int_to_ascii, convert_ascii_to_int): Move to
6098 common/rsp-low.c.
6099 * regcache.c: Include rsp-low.h.
6100 * ax.c: Include rsp-low.h.
6101 * Makefile.in (SFILES): Add common/rsp-low.c.
6102 (OBS): Add rsp-low.o.
6103 (rsp-low.o): New target.
6104
01fd3ea5
TT
61052014-02-12 Tom Tromey <tromey@redhat.com>
6106
6107 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6108 Include print-utils.h.
6109 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6110 (plongest, thirty_two, phex_nz): Remove.
6111 * Makefile.in (SFILES): Add common/print-utils.c.
6112 (OBS): Add print-utils.o.
6113 (print-utils-ipa.o): New target.
6114 (print-utils.o): New target.
6115 (IPA_OBJS): Add print-utils-ipa.o.
6116
e99dc820
TT
61172014-02-06 Tom Tromey <tromey@redhat.com>
6118
6119 * Makefile.in (SFILES): Fix indentation.
6120
ee1e2d4f
DE
61212014-02-05 Doug Evans <dje@google.com>
6122
6123 * linux-low.c (linux_wait_for_event): Improve comment.
6124 (linux_wait_1): Keep current_inferior in sync with event_child.
6125
f5a02773
DE
61262014-01-22 Doug Evans <dje@google.com>
6127
6128 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6129
87ce2a04
DE
61302014-01-22 Doug Evans <dje@google.com>
6131
6132 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6133 * configure: Regenerate.
6134 * config.in: Regenerate.
6135 * Makefile.in (SFILES): Add debug.c.
6136 (OBS): Add debug.o.
6137 * debug.c: New file.
6138 * debug.h: New file.
6139 * linux-aarch64-low.c (*): Update all debugging printfs to use
6140 debug_printf instead of fprintf.
6141 * linux-arm-low.c (*): Ditto.
6142 * linux-cris-low.c (*): Ditto.
6143 * linux-crisv32-low.c (*): Ditto.
6144 * linux-m32r-low.c (*): Ditto.
6145 * linux-sparc-low.c (*): Ditto.
6146 * linux-x86.c (*): Ditto.
6147 * linux-low.c (*): Ditto.
6148 (linux_wait_1): Add calls to debug_enter, debug_exit.
6149 (linux_wait): Remove redundant debugging printf.
6150 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6151 (linux_resume, unstop_all_lwps): Ditto.
6152 * mem-break.c (*): Update all debugging printfs to use
6153 debug_printf instead of fprintf.
6154 * remote-utils.c (*): Ditto.
6155 * thread-db.c (*): Ditto.
6156 * server.c #include <ctype.h>, "gdb_vecs.h".
6157 (debug_threads): Moved to debug.c.
6158 (*): Update all debugging printfs to use debug_printf instead of
6159 fprintf.
6160 (start_inferior): Replace call to fflush with call to debug_flush.
6161 (monitor_show_help): Mention set debug-format.
6162 (parse_debug_format_options): New function.
6163 (handle_monitor_command): Handle "monitor set debug-format".
6164 (gdbserver_usage): Mention --debug-format.
6165 (main): Parse --debug-format.
6166 * server.h (debug_threads): Declaration moved to debug.h.
6167 #include "debug.h".
6168 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6169 trace_debug_1 that uses debug_printf.
6170 (tracepoint_look_up_symbols): Update all debugging printfs to use
6171 debug_printf instead of fprintf.
6172
e671835b
BS
61732014-01-20 Baruch Siach <baruch@tkos.co.il>
6174
6175 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6176 sys/ptrace.h.
6177
b5737fa9
PA
61782014-01-17 Pedro Alves <palves@redhat.com>
6179
ea38d2a9 6180 PR build/16445
c7faa97a
PA
6181 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6182 defined after including gdb_proc_service.h.
b5737fa9 6183
40ed484e
DE
61842014-01-16 Doug Evans <dje@google.com>
6185
6186 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6187 (match_dll): Use it.
6188
969c39fb
MM
61892014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6190
6191 * target.h (target_ops) <read_btrace>: Change parameters and
6192 return type to allow error reporting.
6193 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6194 trace reading errors on.
6195 * linux-low.c (linux_low_read_btrace): Pass trace reading
6196 errors on.
6197 (linux_low_disable_btrace): New.
6198
ab7f45ba
DE
61992014-01-15 Doug Evans <dje@google.com>
6200
6201 * inferiors.c (thread_id_to_gdb_id): Delete.
6202 * inferiors.h (thread_id_to_gdb_id): Delete.
6203
66af0f44
EZ
62042014-01-13 Eli Zaretskii <eliz@gnu.org>
6205
6206 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6207 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6208 versions.
6209
9939e131
PA
62102014-01-08 Pedro Alves <palves@redhat.com>
6211
6212 * server.c (handle_status): Don't discard previous queued stop
6213 replies or thread's pending status here.
6214 (main) <disconnection>: Do it here instead.
6215
b7ea362b
PA
62162014-01-08 Pedro Alves <palves@redhat.com>
6217
6218 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6219 * server.c (visit_actioned_threads, handle_pending_status): New
6220 function.
6221 (handle_v_cont): Factor out parts to ...
6222 (resume): ... this new function. If in all-stop, and a thread
6223 being resumed has a pending status, report it without actually
6224 resuming.
6225 (myresume): Adjust to use the new 'resume' function.
6226 (clear_pending_status_callback, set_pending_status_callback)
6227 (find_status_pending_thread_callback): New functions.
6228 (handle_status): Handle the case of multiple threads having
6229 interesting statuses to report. Report threads' real last signal
6230 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6231 with an interesting thread to report the status for, instead of
6232 always reporting the status of the first thread.
6233
28498c42
JB
62342014-01-01 Joel Brobecker <brobecker@adacore.com>
6235
6236 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6237 * gdbreplay.c (gdbreplay_version): Likewise.
6238
f45c82da
YZ
62392013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6240
6241 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6242 iov.iov_len with the real length in use.
6243
379a5e2d
JB
62442013-12-13 Joel Brobecker <brobecker@adacore.com>
6245
6246 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6247 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6248 for all targets that use win32-low.c.
6249 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6250 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6251
4210d83e
PA
62522013-12-13 Pedro Alves <palves@redhat.com>
6253
6254 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6255 if equal to TARGET_WAITKIND_LOADED.
6256 * win32-low.c (cached_status): New static global.
6257 (win32_wait): Add declaration.
6258 (do_initial_child_stuff): Flush all initial pending debug events
6259 up to the initial breakpoint.
6260 (win32_wait): If CACHED_STATUS was set, return that instead
6261 of doing a real wait. Remove the code resuming the execution
6262 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6263 during the initial phase. Also remove the code changing
6264 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6265 TARGET_WAITKIND_STOPPED.
6266
e7f0d979
YQ
62672013-12-11 Yao Qi <yao@codesourcery.com>
6268
6269 * notif.c (handle_notif_ack): Return 0 if no notification
6270 matches.
6271
ebcf782c
DE
62722013-11-20 Doug Evans <dje@google.com>
6273
6274 * linux-low.c (linux_set_resume_request): Fix comment.
6275
20ad9378
DE
62762013-11-20 Doug Evans <dje@google.com>
6277
6278 * linux-low.c (resume_status_pending_p): Tweak comment.
6279
a196ebeb
WT
62802013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6281
6282 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6283 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6284 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6285 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6286 (srv_amd64_regobj): Add amd64-mpx.o.
6287 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6288 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6289 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6290 * i387-fp.c (num_pl_bnd_register) Added constant.
6291 (num_pl_bnd_cfg_registers) Added constant.
6292 (struct i387_xsave) Added reserved area and MPX fields.
6293 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6294 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6295 function.
6296 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6297 (init_registers_amd64_mpx_linux): Declare new function.
6298 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6299 (x86_64_regmap): Add MPX registers.
6300 (x86_linux_read_description): Add MPX case.
6301 (initialize_low_arch): Initialize MPX targets.
6302
0080a2f6
TT
63032013-11-18 Tom Tromey <tromey@redhat.com>
6304
6305 * configure: Rebuild.
6306 * configure.ac: Don't check for stdlib.h.
6307 * gdbreplay.c: Unconditionally include stdlib.h.
6308
2978b111
TT
63092013-11-18 Tom Tromey <tromey@redhat.com>
6310
6311 * config.in: Rebuild.
6312 * configure: Rebuild.
6313 * configure.ac: Don't use AC_HEADER_DIRENT.
6314
a3d08894
TT
63152013-11-18 Tom Tromey <tromey@redhat.com>
6316
6317 * server.h: Don't check HAVE_STRING_H.
6318 * gdbreplay.c: Don't check HAVE_STRING_H.
6319 * configure: Rebuild.
6320
0a5dd17d
TT
63212013-11-18 Tom Tromey <tromey@redhat.com>
6322
6323 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6324 LIBGNU.
6325
1bd2f0ba
TT
63262013-11-08 Tom Tromey <tromey@redhat.com>
6327
6328 * configure, config.in: Rebuild.
6329 * configure.ac: Remove unused configury.
6330
3266f10b
TT
63312013-11-08 Tom Tromey <tromey@redhat.com>
6332
6333 * acinclude.m4: Include common.m4, codeset.m4.
6334 * configure, config.in: Rebuild.
6335 * configure.ac: Use GDB_AC_COMMON.
6336
6682d959
AA
63372013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6338
6339 * linux-s390-low.c (HWCAP_S390_TE): New define.
6340 (s390_arch_setup): Consider the TE field in the HWCAP for
6341 determining 'have_regset_tdb'.
6342
fd0a4d76
SDJ
63432013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6344
6345 PR gdb/16014
6346 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6347 call to sizeof.
6348
1a3d890b
PA
63492013-10-02 Pedro Alves <palves@redhat.com>
6350
6351 * server.c (process_serial_event): Don't output "GDBserver
6352 exiting" if GDB is connected through stdio.
6353 * target.c (mywait): Likewise, be silent if GDB is connected
6354 through stdio.
6355
97ad4581
JB
63562013-10-01 Joel Brobecker <brobecker@adacore.com>
6357
6358 * lynx-low.c (lynx_add_threads_after_attach): New function.
6359 (lynx_attach): Remove call to add_thread. Add call to
6360 lynx_add_threads_after_attach instead.
6361
5b4e221c
MF
63622013-09-28 Mike Frysinger <vapier@gentoo.org>
6363
6364 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6365 * config.in, configure: Regenerated.
6366
ee47b2f8
YQ
63672013-09-18 Yao Qi <yao@codesourcery.com>
6368
6369 PR server/15959
6370 * server.c (start_inferior): Clear 'resume_info'.
6371
d6707650 63722013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6373
d6707650
JW
6374 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6375 for each register.
6376
9243dd0e 63772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6378
9243dd0e
JW
6379 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6380 linux-tile-low.o to srv_tgtobj.
6381
c623a6ef
WN
63822013-09-16 Will Newton <will.newton@linaro.org>
6383
6384 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6385 out regs.
6386
fb71d39e
PA
63872013-09-06 Pedro Alves <palves@redhat.com>
6388
6389 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6390 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6391 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6392 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6393 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6394 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6395
8e7e9910
PA
63962013-09-06 Pedro Alves <palves@redhat.com>
6397
6398 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6399 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6400
7c3a12ca
PA
64012013-09-06 Pedro Alves <palves@redhat.com>
6402
6403 * linux-amd64-ipa.c: Include tracepoint.h.
6404 * linux-i386-ipa.c: Include tracepoint.h.
6405
8eb3d7b6
RW
64062013-09-06 Ricard Wanderlof <ricardw@axis.com>
6407
6408 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6409 (ps_get_thread_area): New function.
6410
eddddb9d
RW
64112013-09-06 Ricard Wanderlof <ricardw@axis.com>
6412
6413 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6414 (initialize_low_arch): Call init_registers_crisv32 rather than
6415 init_register_crisv32.
6416
533b0600
PA
64172013-09-05 Pedro Alves <palves@redhat.com>
6418
6419 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6420 to ...
6421 * hostio.h: ... this new file.
6422 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6423 win32-low.c: Include hostio.h.
6424
0ce3d3b5
PA
64252013-09-05 Pedro Alves <palves@redhat.com>
6426
6427 * server.h (gdb_client_data, handler_func, callback_handler_func)
6428 (delete_file_handler, add_file_handler, append_callback_event)
6429 (delete_callback_event, start_event_loop, initialize_event_loop):
6430 Move to event-loop.h and include it.
6431 * event-loop.h: New file.
6432
799cdc37
PA
64332013-09-05 Pedro Alves <palves@redhat.com>
6434
6435 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6436 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6437 (loaded_dll, unloaded_dll): Move to ...
6438 * dll.h: ... this new file.
6439 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6440
6a6bbd9d
PA
64412013-09-05 Pedro Alves <palves@redhat.com>
6442
6443 * server.h (current_process, get_thread_process, all_processes)
6444 (add_inferior_to_list, for_each_inferior, current_inferior)
6445 (remove_inferior, add_process, remove_process, find_process_pid)
6446 (have_started_inferiors_p, have_attached_inferiors_p)
6447 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6448 (clear_inferiors, find_inferior, find_inferior_id)
6449 (inferior_target_data, set_inferior_target_data)
6450 (inferior_regcache_data, set_inferior_regcache_data): Move to
6451 inferiors.h, and include it.
6452 * inferiors.h: New file.
6453
f699aaba
PA
64542013-09-05 Pedro Alves <palves@redhat.com>
6455
6456 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6457 Move ...
72f4393d 6458 * ax.h: ... here.
f699aaba 6459
c144c7a0
PA
64602013-09-05 Pedro Alves <palves@redhat.com>
6461
6462 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6463 tracepoint.h.
6464 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6465 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6466 (handle_tracepoint_general_set, handle_tracepoint_query)
6467 (tracepoint_finished_step, tracepoint_was_hit)
6468 (release_while_stepping_state_list, current_traceframe)
6469 (in_readonly_region, traceframe_read_mem)
6470 (fetch_traceframe_registers, traceframe_read_sdata)
6471 (traceframe_read_info, struct fast_tpoint_collect_status)
6472 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6473 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6474 (supply_fast_tracepoint_registers)
6475 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6476 (ipa_tdesc, claim_trampoline_space)
6477 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6478 (agent_mem_read, agent_get_trace_state_variable_value)
6479 (agent_set_trace_state_variable_value, agent_tsv_read)
6480 (agent_mem_read_string, get_raw_reg_func_addr)
6481 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6482 * tracepoint.h: ... this new file.
6483
ff42e6ab
PA
64842013-09-05 Pedro Alves <palves@redhat.com>
6485
6486 * server.h (perror_with_name, error, fatal, warning, paddress)
6487 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6488 include it.
6489 * utils.h: New file.
6490
541af0f4
PA
64912013-09-05 Pedro Alves <palves@redhat.com>
6492
6493 * server.h (remote_debug, noack_mode, transport_is_reliable)
6494 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6495 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6496 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6497 (write_enn, initialize_async_io, enable_async_io)
6498 (disable_async_io, check_remote_input_interrupt_request)
6499 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6500 (dead_thread_notify, prepare_resume_reply)
6501 (decode_address_to_semicolon, decode_address, decode_m_packet)
6502 (decode_M_packet, decode_X_packet, decode_xfer_write)
6503 (decode_search_memory_packet, unhexify, hexify)
6504 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6505 (look_up_one_symbol, relocate_instruction)
6506 (monitor_output): Move to remote-utils.h, and include it.
6507 * remote-utils.h: New file.
6508
eebdf26b
PA
65092013-09-05 Pedro Alves <palves@redhat.com>
6510
6511 * server.h (_): Delete.
6512
3aafd2ff
PA
65132013-09-02 Pedro Alves <palves@redhat.com>
6514
6515 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6516 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6517 allocated.
6518 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6519
cee83bcb
PM
65202013-09-02 Pierre Muller <muller@sourceware.org>
6521
6522 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6523 or WriteProcessMemory complete successfully and handle
6524 ERROR_PARTIAL_COPY error.
6525
9a13b2fa
PA
65262013-09-02 Pedro Alves <palves@redhat.com>
6527
6528 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6529 error instead of EIO.
6530
602e3198
JK
65312013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6532
6533 PR server/15604
6534 * linux-low.c: Include filestuff.h.
6535 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6536 * lynx-low.c: Include filestuff.h.
6537 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6538 * server.c: Include filestuff.h.
6539 (main): Call notice_open_fds.
6540 * spu-low.c: Include filestuff.h.
6541 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6542
96d7229d
LM
65432013-08-22 Luis Machado <lgustavo@codesourcery.com>
6544
6545 * Makefile.in: Explain why ../target and ../nat are not
6546 listed as include file search paths.
6547 (linux-waitpid.o): New object file rule.
6548 * configure.srv (srv_native_linux_obj): New variable.
6549 Replace all occurrences of linux native object files with
6550 $srv_native_linux_obj.
6551 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6552 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6553 (linux_enable_event_reporting): Remove declaration.
6554 (my_waitpid): Moved to common/linux-waitpid.c.
6555 (linux_wait_for_event): Pass ptid when calling
6556 linux_enable_event_reporting.
6557 (linux_supports_tracefork_flag): Remove.
6558 (linux_enable_event_reporting): Likewise.
6559 (linux_tracefork_grandchild): Remove.
6560 (STACK_SIZE): Moved to common/linux-ptrace.c.
6561 (linux_tracefork_child): Remove.
6562 (linux_test_for_tracefork): Remove.
6563 (linux_look_up_symbols): Call linux_supports_traceclone.
6564 (initialize_low): Remove call to linux_test_for_tracefork.
6565 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6566 common/linux-ptrace.h.
6567 (PTRACE_TYPE_ARG4): Likewise.
6568 Include linux-ptrace.h.
6569
32940073
PA
65702013-08-21 Pedro Alves <palves@redhat.com>
6571
6572 * config.in: Renegerate.
6573
33b60d58 65742013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6575
33b60d58
LM
6576 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6577 (SFILES): Remove $(srcdir)/common/target-common.c and
6578 add $(srcdir)/target/waitstatus.c.
6579 (OBS): Remove target-common.o and add waitstatus.o.
6580 (server_h): Remove $(srcdir)/../common/target-common.h and
6581 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6582 and $(srcdir)/../target/waitstatus.h.
6583 (target-common.o): Remove.
6584 (waitstatus.o): New target object file.
6585 * target.h: Do not include target-common.h and
6586 include target/resume.h, target/wait.h and
6587 target/waitstatus.h.
6588
b8e1b30e
LM
65892013-08-13 Luis Machado <lgustavo@codesourcery.com>
6590
6591 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6592 to PTRACE_TYPE_ARG3.
6593 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6594 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6595 PTRACE_TYPE_ARG4.
6596 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6597 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6598
7a60ad40
YQ
65992013-07-27 Jie Zhang <jie@codesourcery.com>
6600 Daniel Jacobowitz <dan@codesourcery.com>
6601 Yao Qi <yao@codesourcery.com>
6602
6603 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6604 (mips-linux-watch.o): New rule.
6605 (mips_linux_watch_h): New variable.
6606 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6607 srv_tgtobj.
6608 * linux-mips-low.c: Include mips-linux-watch.h.
6609 (struct arch_process_info, struct arch_lwp_info): New.
6610 (update_watch_registers_callback): New function.
6611 (mips_linux_new_process, mips_linux_new_thread) New functions.
6612 (mips_linux_prepare_to_resume, mips_insert_point): New
6613 functions.
6614 (mips_remove_point, mips_stopped_by_watchpoint): New
6615 functions.
6616 (rsp_bp_type_to_target_hw_bp_type): New function.
6617 (mips_stopped_data_address): New function.
6618 (the_low_target): Add watchpoint support functions.
6619
de6f69ad
YQ
66202013-07-27 Yao Qi <yao@codesourcery.com>
6621
6622 * i386-low.c: Include break-common.h.
6623 (enum target_hw_bp_type): Remove.
6624
3360c0bf
LM
66252013-07-24 Luis Machado <lgustavo@codesourcery.com>
6626
6627 * Makefile.in (SFILES): /common/target-common.c.
6628 (OBS): Add target-common.o.
6629 (server_h): Add $(srcdir)/../common/target-common.h.
6630 (target-common.o): New target.
6631 * server.c (queue_stop_reply_callback): Free
6632 status string after use.
6633 * target.c (target_waitstatus_to_string): Remove.
6634 * target.h: Include target-common.h.
6635 (resume_kind): Likewise.
6636 (target_waitkind): Likewise.
6637 (target_waitstatus): Likewise.
6638 (TARGET_WNOHANG): Likewise.
6639
bd885420
YQ
66402013-07-04 Yao Qi <yao@codesourcery.com>
6641
6642 * Makefile.in (host_alias): Use @host_noncanonical@.
6643 (target_alias): Use @target_noncanonical@.
6644 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6645 ACX_NONCANONICAL_HOST.
6646 * configure: Regenerated.
6647
6648 Revert:
6649 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6650
6651 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6652 * configure: Rebuild.
6653 * Makefile.in (version_host, version_target): Get from configure.
6654 (version.c): Use $(version_host) and $(version_target).
6655
17ef446e
PA
66562013-07-03 Pedro Alves <palves@redhat.com>
6657
6658 * Makefile.in (config.status): Depend on development.sh.
6659 * acinclude.m4: Include libmcheck.m4.
6660 * configure: Regenerate.
6661
7a9a7487
MG
66622013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6663
6664 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6665 attribute inside the parentheses.
6666 (winapi_DebugSetProcessKillOnExit): Ditto.
6667 (winapi_DebugBreakProcess): Ditto.
6668 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6669
49b64de6
MG
66702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6671
6672 * notif.h (notif_event): Add a dummy member to avoid compiler
6673 errors.
6674
d5749ee7
PA
66752013-07-01 Pedro Alves <palves@redhat.com>
6676
6677 * hostio.c (HOSTIO_PATH_MAX): Define.
6678 (require_filename, handle_open, handle_unlink, handle_readlink):
6679 Use it.
6680
d8d2a3ee
PA
66812013-07-01 Pedro Alves <palves@redhat.com>
6682
6683 * server.h: Include "pathmax.h".
6684 * linux-low.c: Don't include sys/param.h.
6685 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6686 MAXPATHLEN.
6687 * win32-low.c: Don't include sys/param.h.
6688 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6689
bc7dea8d
PA
66902013-07-01 Pedro Alves <palves@redhat.com>
6691
6692 * event-loop.c: Don't check HAVE_UNISTD_H before including
6693 <unistd.h>.
6694 * gdbreplay.c: Likewise.
6695 * remote-utils.c: Likewise.
6696 * server.c: Likewise.
6697 * configure.ac: Don't check for unistd.h.
6698 * configure: Regenerate.
6699
d6c2da54
TT
67002013-06-28 Tom Tromey <tromey@redhat.com>
6701
6702 * Makefile.in (version.c): Use version.in, not
6703 common/version.in.
6704
257b6bec
MG
67052013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6706
6707 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6708 * configure: Rebuild.
6709 * Makefile.in (version_host, version_target): Get from configure.
6710 (version.c): Use $(version_host) and $(version_target).
6711
86ebe149
DK
67122013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6713
6714 Fix trace-status to output user name without trailing colon.
6715 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6716
f30aa5af
DK
67172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6718
6719 Fix trace-status to output proper start-time and stop-time.
6720 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6721 output start time and stop time in hex as gdb expects.
6722
28a93511
YQ
67232013-06-26 Pedro Alves <pedro@codesourcery.com>
6724
6725 * tracepoint.c (build_traceframe_info_xml): Output trace state
6726 variables present in the trace buffer.
6727
01208463
TT
67282013-06-24 Tom Tromey <tromey@redhat.com>
6729
6730 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6731 create-version.sh.
6732 (version.o): Remove.
6733 * gdbreplay.c: Include version.h.
6734 (version, host_name): Don't declare.
6735 * server.h: Include version.h.
6736 (version, host_name): Don't declare.
6737
760256f9
PA
67382013-06-12 Pedro Alves <palves@redhat.com>
6739
6740 * linux-x86-low.c (linux_is_elf64): Delete global.
6741 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6742 with local linux_pid_exe_is_elf_64_file use.
6743
030031ee
PA
67442013-06-11 Pedro Alves <palves@redhat.com>
6745
6746 * linux-low.c (regset_disabled, disable_regset): New functions.
6747 (regsets_fetch_inferior_registers)
6748 (regsets_store_inferior_registers): Use them.
6749 (initialize_regsets_info); Don't allocate the disabled_regsets
6750 array here.
6751 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6752 comment.
6753
5da6eb0a
PA
67542013-06-11 Pedro Alves <palves@redhat.com>
6755
6756 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6757 xmalloc.
6758
7e5aaa09
PA
67592013-06-11 Pedro Alves <palves@redhat.com>
6760
6761 * linux-x86-low.c (initialize_low_arch): Call
6762 init_registers_x32_avx_linux.
6763
d878444c
JK
67642013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6765
6766 Fix compatibility with Android Bionic.
6767 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6768 it is not empty.
6769
3aee8918
PA
67702013-06-07 Pedro Alves <palves@redhat.com>
6771
5f2b57b5 6772 PR server/14823
3aee8918
PA
6773 * Makefile.in (OBS): Add tdesc.o.
6774 (IPA_OBJS): Add tdesc-ipa.o.
6775 (tdesc-ipa.o): New rule.
6776 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6777 interface.
6778 * linux-low.c (new_inferior): Delete.
6779 (disabled_regsets, num_regsets): Delete.
6780 (linux_add_process): Adjust to set the new per-process
6781 new_inferior flag.
6782 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6783 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6784 was a stop. When calling arch_setup, switch the current inferior
6785 to the thread that got an event.
6786 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6787 (regsets_fetch_inferior_registers)
6788 (regsets_store_inferior_registers): New regsets_info parameter.
6789 Adjust to use it.
6790 (linux_register_in_regsets): New regs_info parameter. Adjust to
6791 use it.
6792 (register_addr, fetch_register, store_register): New usrregs_info
6793 parameter. Adjust to use it.
6794 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6795 parameter regs_info. Adjust to use it.
6796 (linux_fetch_registers): Get the current inferior's regs_info, and
6797 adjust to use it.
6798 (linux_store_registers): Ditto.
6799 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6800 (initialize_low): Don't initialize the target_regsets here. Call
6801 initialize_low_arch.
6802 * linux-low.h (target_regsets): Delete declaration.
6803 (struct regsets_info): New.
6804 (struct usrregs_info): New.
6805 (struct regs_info): New.
6806 (struct process_info_private) <new_inferior>: New field.
6807 (struct linux_target_ops): Delete the num_regs, regmap, and
6808 regset_bitmap fields. New field regs_info.
6809 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6810 * i387-fp.c (num_xmm_registers): Delete.
6811 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6812 calls to new interface.
6813 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6814 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6815 Infer the number of xmm registers from the regcache's target
6816 description.
6817 * i387-fp.h (num_xmm_registers): Delete.
6818 * inferiors.c (add_thread): Don't install the thread's regcache
6819 here.
6820 * proc-service.c (gregset_info): Fetch the current inferior's
6821 regs_info. Adjust to use it.
6822 * regcache.c: Include tdesc.h.
6823 (register_bytes, reg_defs, num_registers)
6824 (gdbserver_expedite_regs): Delete.
6825 (get_thread_regcache): If the thread doesn't have a regcache yet,
6826 create one, instead of aborting gdbserver.
6827 (regcache_invalidate_one): Rename to ...
6828 (regcache_invalidate_thread): ... this.
6829 (regcache_invalidate_one): New.
6830 (regcache_invalidate): Only invalidate registers of the current
6831 process.
6832 (init_register_cache): Add target_desc parameter, and use it.
6833 (new_register_cache): Ditto. Assert the target description has a
6834 non zero registers_size.
6835 (regcache_cpy): Add assertions. Adjust.
6836 (realloc_register_cache, set_register_cache): Delete.
6837 (registers_to_string, registers_from_string): Adjust.
6838 (find_register_by_name, find_regno, find_register_by_number)
6839 (register_cache_size): Add target_desc parameter, and use it.
6840 (free_register_cache_thread, free_register_cache_thread_one)
6841 (regcache_release, register_cache_size): New.
6842 (register_size): Add target_desc parameter, and use it.
6843 (register_data, supply_register, supply_register_zeroed)
6844 (supply_regblock, supply_register_by_name, collect_register)
6845 (collect_register_as_string, collect_register_by_name): Adjust.
6846 * regcache.h (struct target_desc): Forward declare.
6847 (struct regcache) <tdesc>: New field.
6848 (init_register_cache, new_register_cache): Add target_desc
6849 parameter.
6850 (regcache_invalidate_thread): Declare.
6851 (regcache_invalidate_one): Delete declaration.
6852 (regcache_release): Declare.
6853 (find_register_by_number, register_cache_size, register_size)
6854 (find_regno): Add target_desc parameter.
6855 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6856 declarations.
6857 * remote-utils.c: Include tdesc.h.
6858 (outreg, prepare_resume_reply): Adjust.
6859 * server.c: Include tdesc.h.
6860 (gdbserver_xmltarget): Delete declaration.
6861 (get_features_xml, process_serial_event): Adjust.
6862 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6863 declare.
6864 (struct process_info) <tdesc>: New field.
6865 (ipa_tdesc): Declare.
6866 * tdesc.c: New file.
6867 * tdesc.h: New file.
6868 * tracepoint.c: Include tdesc.h.
6869 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6870 (get_context_regcache): Adjust to pass ipa_tdesc down.
6871 (do_action_at_tracepoint): Adjust to get the register cache size
6872 from the context regcache's description.
6873 (traceframe_walk_blocks): Adjust to get the register cache size
6874 from the current trace frame's description.
6875 (traceframe_get_pc): Adjust to get current trace frame's
6876 description and pass it down.
6877 (gdb_collect): Adjust to get the register cache size from the
6878 IPA's description.
6879 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6880 (gdbserver_xmltarget): Delete.
6881 (initialize_low_tracepoint): Set the ipa's target description.
6882 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6883 (initialize_low_tracepoint): Set the ipa's target description.
6884 * linux-x86-low.c: Include tdesc.h.
6885 [__x86_64__] (is_64bit_tdesc): New.
6886 (ps_get_thread_area, x86_get_thread_area): Use it.
6887 (i386_cannot_store_register): Rename to ...
6888 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6889 (i386_cannot_fetch_register): Rename to ...
6890 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6891 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6892 to new interface.
6893 (target_regsets): Rename to ...
6894 (x86_regsets): ... this.
6895 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6896 interface.
6897 (x86_siginfo_fixup): Use is_64bit_tdesc.
6898 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6899 (tdesc_x32_avx_linux, tdesc_x32_linux)
6900 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6901 Declare.
6902 (x86_linux_update_xmltarget): Delete.
6903 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6904 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6905 (AMD64_LINUX_USER64_CS): New.
6906 (x86_linux_read_description): New, based on
6907 x86_linux_update_xmltarget.
6908 (same_process_callback): New.
6909 (x86_arch_setup_process_callback): New.
6910 (x86_linux_update_xmltarget): New.
6911 (x86_regsets_info): New.
6912 (amd64_linux_regs_info): New.
6913 (i386_linux_usrregs_info): New.
6914 (i386_linux_regs_info): New.
6915 (x86_linux_regs_info): New.
6916 (x86_arch_setup): Reimplement.
6917 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6918 (x86_emit_ops): Ditto.
6919 (the_low_target): Adjust. Install x86_linux_regs_info,
6920 x86_cannot_fetch_register, and x86_cannot_store_register.
6921 (initialize_low_arch): New.
6922 * linux-ia64-low.c (tdesc_ia64): Declare.
6923 (ia64_fetch_register): Adjust.
6924 (ia64_usrregs_info, regs_info): New globals.
6925 (ia64_regs_info): New function.
6926 (the_low_target): Adjust.
6927 (initialize_low_arch): New function.
6928 * linux-sparc-low.c (tdesc_sparc64): Declare.
6929 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6930 Adjust.
6931 (sparc_arch_setup): New function.
6932 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6933 (the_low_target): Adjust.
6934 (initialize_low_arch): New function.
6935 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6936 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6937 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6938 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6939 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6940 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6941 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6942 (tdesc_powerpc_isa205_vsx64l): Declare.
6943 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6944 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6945 (ppc_set_pc, ppc_get_hwcap): Adjust.
6946 (ppc_usrregs_info): Forward declare.
6947 (!__powerpc64__) ppc_regmap_adjusted: New global.
6948 (ppc_arch_setup): Adjust to the current process'es target
6949 description.
6950 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6951 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6952 (ppc_store_evrregset): Adjust.
6953 (target_regsets): Rename to ...
6954 (ppc_regsets): ... this, and make static.
6955 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6956 (ppc_regs_info): New function.
6957 (the_low_target): Adjust.
6958 (initialize_low_arch): New function.
6959 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6960 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6961 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6962 (tdesc_s390x_linux64v2): Declare.
6963 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6964 (s390_fill_gregset, s390_store_last_break): Adjust.
6965 (target_regsets): Rename to ...
6966 (s390_regsets): ... this, and make static.
6967 (s390_get_pc, s390_set_pc): Adjust.
6968 (s390_get_hwcap): New target_desc parameter, and use it.
6969 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6970 (s390_arch_setup): Adjust to set the current process'es target
6971 description. Don't adjust the regmap.
6972 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6973 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6974 (regs_info_3264): New globals.
6975 (s390_regs_info): New function.
6976 (the_low_target): Adjust.
6977 (initialize_low_arch): New function.
6978 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6979 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6980 [__mips64] (init_registers_mips_linux)
6981 (init_registers_mips_dsp_linux): Delete defines.
6982 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6983 (have_dsp): New global.
6984 (mips_read_description): New, based on mips_arch_setup.
6985 (mips_arch_setup): Reimplement.
6986 (get_usrregs_info): New function.
6987 (mips_cannot_fetch_register, mips_cannot_store_register)
6988 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6989 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6990 (target_regsets): Rename to ...
6991 (mips_regsets): ... this, and make static.
6992 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6993 (dsp_regs_info, regs_info): New globals.
6994 (mips_regs_info): New function.
6995 (the_low_target): Adjust.
6996 (initialize_low_arch): New function.
6997 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6998 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6999 Declare.
7000 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7001 (arm_read_description): New, with bits factored from
7002 arm_arch_setup.
7003 (arm_arch_setup): Reimplement.
7004 (target_regsets): Rename to ...
7005 (arm_regsets): ... this, and make static.
7006 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7007 (arm_regs_info): New function.
7008 (the_low_target): Adjust.
7009 (initialize_low_arch): New function.
7010 * linux-m68k-low.c (tdesc_m68k): Declare.
7011 (target_regsets): Rename to ...
7012 (m68k_regsets): ... this, and make static.
7013 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7014 (m68k_regs_info): New function.
7015 (m68k_arch_setup): New function.
7016 (the_low_target): Adjust.
7017 (initialize_low_arch): New function.
7018 * linux-sh-low.c (tdesc_sharch): Declare.
7019 (target_regsets): Rename to ...
7020 (sh_regsets): ... this, and make static.
7021 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7022 (sh_regs_info, sh_arch_setup): New functions.
7023 (the_low_target): Adjust.
7024 (initialize_low_arch): New function.
7025 * linux-bfin-low.c (tdesc_bfin): Declare.
7026 (bfin_arch_setup): New function.
7027 (bfin_usrregs_info, regs_info): New globals.
7028 (bfin_regs_info): New function.
7029 (the_low_target): Adjust.
7030 (initialize_low_arch): New function.
7031 * linux-cris-low.c (tdesc_cris): Declare.
7032 (cris_arch_setup): New function.
7033 (cris_usrregs_info, regs_info): New globals.
7034 (cris_regs_info): New function.
7035 (the_low_target): Adjust.
7036 (initialize_low_arch): New function.
7037 * linux-cris-low.c (tdesc_crisv32): Declare.
7038 (cris_arch_setup): New function.
7039 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7040 (cris_regs_info): New function.
7041 (the_low_target): Adjust.
7042 (initialize_low_arch): New function.
7043 * linux-m32r-low.c (tdesc_m32r): Declare.
7044 (m32r_arch_setup): New function.
7045 (m32r_usrregs_info, regs_info): New globals.
7046 (m32r_regs_info): Adjust.
7047 (initialize_low_arch): New function.
7048 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7049 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7050 (tic6x_usrregs_info): Forward declare.
7051 (tic6x_read_description): New function, based on ...
7052 (tic6x_arch_setup): ... this. Reimplement.
7053 (target_regsets): Rename to ...
7054 (tic6x_regsets): ... this, and make static.
7055 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7056 (tic6x_regs_info): New function.
7057 (the_low_target): Adjust.
7058 (initialize_low_arch): New function.
7059 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7060 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7061 (target_regsets): Rename to ...
7062 (xtensa_regsets): ... this, and make static.
7063 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7064 globals.
7065 (xtensa_arch_setup, xtensa_regs_info): New functions.
7066 (the_low_target): Adjust.
7067 (initialize_low_arch): New function.
7068 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7069 (nios2_arch_setup): Set the current process'es tdesc.
7070 (target_regsets): Rename to ...
7071 (nios2_regsets): ... this.
7072 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7073 (nios2_regs_info): New function.
7074 (the_low_target): Adjust.
7075 (initialize_low_arch): New function.
a261b8f5
PA
7076 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7077 (aarch64_arch_setup): Set the current process'es tdesc.
7078 (target_regsets): Rename to ...
7079 (aarch64_regsets): ... this.
7080 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7081 (aarch64_regs_info): New function.
7082 (the_low_target): Adjust.
7083 (initialize_low_arch): New function.
3aee8918
PA
7084 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7085 globals.
7086 (target_regsets): Rename to ...
7087 (tile_regsets): ... this.
7088 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7089 (tile_regs_info): New function.
7090 (tile_arch_setup): Set the current process'es tdesc.
7091 (the_low_target): Adjust.
7092 (initialize_low_arch): New function.
7093 * spu-low.c (tdesc_spu): Declare.
7094 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7095 * win32-arm-low.c (tdesc_arm): Declare.
7096 (arm_arch_setup): New function.
7097 (the_low_target): Install arm_arch_setup instead of
7098 init_registers_arm.
7099 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7100 (init_windows_x86): Rename to ...
7101 (i386_arch_setup): ... this. Set `win32_tdesc'.
7102 (the_low_target): Adjust.
7103 * win32-low.c (win32_tdesc): New global.
7104 (child_add_thread): Don't create the thread cache here.
7105 (do_initial_child_stuff): Set the new process'es tdesc.
7106 * win32-low.h (struct target_desc): Forward declare.
7107 (win32_tdesc): Declare.
7108 * lynx-i386-low.c (tdesc_i386): Declare global.
7109 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7110 * lynx-low.c (lynx_tdesc): New global.
7111 (lynx_add_process): Set the new process'es tdesc.
7112 * lynx-low.h (struct target_desc): Forward declare.
7113 (lynx_tdesc): Declare global.
7114 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7115 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7116 * nto-low.c (nto_tdesc): New global.
7117 (do_attach): Set the new process'es tdesc.
7118 * nto-low.h (struct target_desc): Forward declare.
7119 (nto_tdesc): Declare.
7120 * nto-x86-low.c (tdesc_i386): Declare.
7121 (nto_x86_arch_setup): Set `nto_tdesc'.
7122
b1fbec62
GB
71232013-06-04 Gary Benson <gbenson@redhat.com>
7124
7125 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7126 to qSupported response when appropriate.
7127 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7128 with nonzero-length annex.
7129 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7130 arguments supplied in annex.
7131
d1ec4ce7
DE
71322013-05-31 Doug Evans <dje@google.com>
7133
ac44adcb 7134 PR server/15594
d1ec4ce7
DE
7135 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7136 64 bits in 64-cross-32 environment.
7137
9b25f2d3
PA
71382013-05-28 Pedro Alves <palves@redhat.com>
7139
7140 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7141 (aarch64-without-fpu.c): Delete rule.
7142 * configure.srv (aarch64*-*-linux*): Remove references to
7143 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7144 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7145 declaration.
7146
6740dc9c
PA
71472013-05-24 Pedro Alves <palves@redhat.com>
7148
7149 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7150 instead of strchr/decode_address. Error if the range isn't split
7151 with a ','. Don't assume there's be a ':' in the action.
7152
c2d6af84
PA
71532013-05-23 Yao Qi <yao@codesourcery.com>
7154 Pedro Alves <palves@redhat.com>
7155
7156 * linux-low.c (lwp_in_step_range): New function.
7157 (linux_wait_1): If the thread was range stepping and stopped
7158 outside the stepping range, report the stop to GDB. Otherwise,
7159 continue stepping. Add range stepping debug output.
7160 (linux_set_resume_request): Copy the step range from the resume
7161 request to the lwp.
7162 (linux_supports_range_stepping): New.
7163 (linux_target_ops) <supports_range_stepping>: Set to
7164 linux_supports_range_stepping.
7165 * linux-low.h (struct linux_target_ops)
7166 <supports_range_stepping>: New field.
7167 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7168 * linux-x86-low.c (x86_supports_range_stepping): New.
7169 (the_low_target) <supports_range_stepping>: Set to
7170 x86_supports_range_stepping.
7171 * server.c (handle_v_cont): Handle 'r' action.
7172 (handle_v_requests): Append ";r" if the target supports range
7173 stepping.
7174 * target.h (struct thread_resume) <step_range_start,
7175 step_range_end>: New fields.
7176 (struct target_ops) <supports_range_stepping>:
7177 New field.
7178 (target_supports_range_stepping): New macro.
7179
58794e1a
JB
71802013-05-17 Joel Brobecker <brobecker@adacore.com>
7181
7182 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7183 confusion in comment.
7184
d631c5a7
JB
71852013-05-17 Joel Brobecker <brobecker@adacore.com>
7186
7187 * lynx-low.c (struct process_info_private): New type.
7188 (lynx_add_process): New function.
7189 (lynx_create_inferior, lynx_attach): Replace calls to
7190 add_process by calls to lynx_add_process.
7191 (lynx_resume): If PTID is null, then try using
7192 current_process()->private->last_wait_event_ptid.
7193 Add comments.
7194 (lynx_clear_inferiors): Delete. The contents of that function
7195 has been inlined in lynx_mourn;
7196 (lynx_wait_1): Save the ptid in the process's private data.
7197 (lynx_mourn): Free the process' private data. Replace call
7198 to lynx_clear_inferiors by call to clear_inferiors.
7199
96f7a20f
YQ
72002013-05-17 Yao Qi <yao@codesourcery.com>
7201
7202 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7203 the right place.
7204
db0dfaa0
LM
72052013-05-16 Luis Machado <lgustavo@codesourcery.com>
7206
7207 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7208 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7209 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7210 PT_TEXT_END_ADDR guards. Update comments.
7211 (linux_target_op) <read_offsets>: Conditionally define to
7212 linux_read_offsets if the target is UCLIBC and if it defines
7213 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7214
68f5f838
SL
72152013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7216 Andrew Jenner <andrew@codesourcery.com>
7217
7218 * Makefile.in (SFILES): Add linux-nios2-low.c.
7219 (clean): Add action to delete nios2-linux.c.
7220 (nios2-linux.c): New rule.
7221 * configure.srv: Add nios2*-*-linux*.
7222 * linux-nios2-low.c: New.
7223
1ebff1fd
HAQ
72242013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7225
7226 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7227
f6150862
HZ
72282013-04-25 Hui Zhu <hui@codesourcery.com>
7229
7230 PR gdb/15186
f6150862
HZ
7231 * ax.c (ax_printf): Add fflush.
7232
614c279d
TT
72332013-04-22 Tom Tromey <tromey@redhat.com>
7234
7235 * Makefile.in (SFILES): Add filestuff.c.
7236 (OBS): Add filestuff.o.
7237 (filestuff.o): New target.
7238 * config.in, configure: Rebuild.
7239 * configure.ac: Check for fdwalk, pipe2.
7240
7d4e5717
PA
72412013-04-17 Pedro Alves <palves@redhat.com>
7242
7243 * configure.ac (USE_THREAD_DB): Delete variable.
7244 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7245 Don't AC_SUBST USE_THREAD_DB.
7246 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7247 * config.in, configure: Regenerate.
7248
d5c93e41
PA
72492013-04-16 Pedro Alves <palves@redhat.com>
7250
7251 * linux-low.h (struct lwp_info) <thread_known>: Move under
7252 the USE_THREAD_DB #ifdef.
7253
04f5fe89
PA
72542013-04-16 Pedro Alves <palves@redhat.com>
7255
7256 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7257 (linux-low.o): Delete rule.
7258 * linux-low.h: Always include "gdb_thread_db.h" instead of
7259 conditionally including thread_db.h.
7260 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7261 HAVE_THREAD_DB_H.
7262
480b27bf
JK
72632013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7264
7265 * Makefile.in (install-only): Fix make install regression.
7266
43662968
JK
72672013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7268
7269 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7270 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7271 installation.
7272 * gdbserver.1: Remove.
7273
3e74e146
PA
72742013-03-22 Pedro Alves <palves@redhat.com>
7275
7276 * linux-low.c (handle_extended_wait): Don't call
7277 linux_enable_event_reporting.
7278
a8347a2a
TT
72792013-03-15 Tony Theodore <tonyt@logyst.com>
7280
7281 PR build/9098:
7282 * Makefile.in (SHELL): Use @SHELL@.
7283
eeb56fa7
SDJ
72842013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7285
7286 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7287 compiler warning.
7288
4fa7e2ff
JB
72892013-03-13 Joel Brobecker <brobecker@adacore.com>
7290
7291 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7292 Remove extraneous NULL element.
7293
8ddb1965
YQ
72942013-03-13 Yao Qi <yao@codesourcery.com>
7295
7296 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7297 'V' block in trace frame.
7298
9accd112
MM
72992013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7300
7301 * target.h (struct target_ops): Add btrace ops.
7302 (target_supports_btrace): New macro.
7303 (target_enable_btrace): New macro.
7304 (target_disable_btrace): New macro.
7305 (target_read_btrace): New macro.
7306 * gdbthread.h (struct thread_info): Add btrace field.
7307 * server.c: Include btrace-common.h.
7308 (handle_btrace_general_set): New function.
7309 (handle_btrace_enable): New function.
7310 (handle_btrace_disable): New function.
7311 (handle_general_set): Call handle_btrace_general_set.
7312 (handle_qxfer_btrace): New function.
7313 (struct qxfer qxfer_packets[]): Add btrace entry.
7314 * inferiors.c (remove_thread): Disable btrace.
7315 * linux-low: Include linux-btrace.h.
7316 (linux_low_enable_btrace): New function.
7317 (linux_low_read_btrace): New function.
7318 (linux_target_ops): Add btrace ops.
7319 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7320 Add srv_linux_btrace=yes.
7321 (x86_64-*-linux*): Add linux-btrace.o.
7322 Add srv_linux_btrace=yes.
7323 * configure.ac: Define HAVE_LINUX_BTRACE.
7324 * config.in: Regenerated.
7325 * configure: Regenerated.
7326
5cc22e4c
MM
73272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7328
7329 * server.c (handle_qxfer): Preserve error message if -3 is
7330 returned.
7331 (qxfer): Document the -3 return value.
7332
7c97f91e
MM
73332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7334
7335 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7336 (linux_btrace_h): New variable.
7337 (linux-btrace.o): New rule.
7338
be9a119c 73392013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7340 Hafiz Abid Qadeer <abidh@codesourcery.com>
7341
7342 * tracepoint.c (trace_buffer_size): New global.
7343 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7344 (init_trace_buffer): Change to one-argument function. Allocate
7345 trace buffer memory.
7346 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7347 handle QTBuffer:size packet.
7348 (cmd_bigqtbuffer_size): New function.
7349 (initialize_tracepoint): Call init_trace_buffer with
7350 DEFAULT_TRACE_BUFFER_SIZE.
7351 * server.c (handle_query): Add QTBuffer:size in the
7352 supported packets.
7353
e64f7499
YQ
73542013-03-07 Yao Qi <yao@codesourcery.com>
7355
7356 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7357 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7358 of -1.
7359 (cmd_qtsp): Adjust condition. Do post increment.
7360 Set cur_action and cur_step_action back to 0.
7361
f0ae6fc3
PA
73622013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7363
7364 PR server/15236
7365 * linux-low.c (linux_write_memory): Return early success if LEN is
7366 zero.
7367
b5b0b0af
CV
73682013-03-05 Corinna Vinschen <vinschen@redhat.de>
7369
334ad4a8 7370 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7371
589bc927
TT
73722013-02-28 Tom Tromey <tromey@redhat.com>
7373
7374 * configure.ac: Invoke AC_SYS_LARGEFILE.
7375 * configure, config.in: Rebuild.
7376
dfe07582
CV
73772013-02-28 Corinna Vinschen <vinschen@redhat.com>
7378
7379 * win32-low.c: Throughout, fix format strings and casts of
7380 printf-like functions to avoid type related warnings on all
7381 platforms.
7382 (get_child_debug_event): Print dwDebugEventCode as hex since
7383 that's how it's usually documented.
7384
736cd585
YQ
73852013-02-28 Yao Qi <yao@codesourcery.com>
7386
7387 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7388 pulongest.
7389
e1f58301
JW
73902013-02-27 Jiong Wang <jiwang@tilera.com>
7391
7392 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7393 (reg-tilegx32.c): New rule.
7394 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7395 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7396 different register info initializer according to elf class.
7397 (init_registers_tilgx32): New function. The tilegx32 register info
7398 initializer.
7399 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7400 (tile_store_gregset): Likewise.
7401
d171ca78
YQ
74022013-02-27 Yao Qi <yao@codesourcery.com>
7403
7404 * server.c (process_point_options): Print debug message when
7405 debug_threads is true.
7406
282bbdf3
YQ
74072013-02-26 Yao Qi <yao@codesourcery.com>
7408
7409 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7410
aca22551
PA
74112013-02-19 Pedro Alves <palves@redhat.com>
7412 Kai Tietz <ktietz@redhat.com>
7413
7414 PR gdb/15161
7415
7416 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7417 instead of strtoul to extract address from packet.
7418 (process_serial_event) <'z'>: Likewise.
7419
4f3cee1c
YQ
74202013-02-18 Yao Qi <yao@codesourcery.com>
7421
7422 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7423
8e1d55a3
PA
74242013-02-14 Pedro Alves <palves@redhat.com>
7425
7426 Plug memory leak.
7427
7428 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7429 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7430
458820da
PA
74312013-02-14 Pedro Alves <palves@redhat.com>
7432
7433 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7434
baea0dae
PA
74352013-02-14 Pedro Alves <palves@redhat.com>
7436
7437 * tracepoint.c (save_string): Delete.
7438 (add_tracepoint_action): Use savestring instead of save_string.
7439
0b1afbb3
PA
74402013-02-12 Pedro Alves <palves@redhat.com>
7441
7442 * linux-xtensa-low.c: Ditto.
7443 * xtensa-xtregs.c: Ditto.
7444
8a4ac37e
PA
74452013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7446
7447 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7448 thread_db.
7449
148de6bb
MS
74502013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7451
7452 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7453 aarch64_num_wp_regs and aarch64_num_bp_regs to
7454 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7455
55fac6e0
MS
74562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7457
7458 * linux-aarch64-low.c (ps_get_thread_area): Replace
7459 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7460
176eb98c
MS
74612013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7462 Marcus Shawcroft <marcus.shawcroft@arm.com>
7463 Nigel Stephens <nigel.stephens@arm.com>
7464 Yufeng Zhang <yufeng.zhang@arm.com>
7465
7466 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7467 (aarch64.c, aarch64-without-fpu.c): New targets.
7468 * configure.srv (aarch64*-*-linux*): New.
7469 * linux-aarch64-low.c: New file.
7470
56f7af9c
MS
74712013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7472
43aaf8b6 7473 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7474 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7475 (dequeue_one_deferred_signal, linux_resume_one_thread)
7476 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7477 (linux_tracefork_grandchild, linux_test_for_tracefork)
7478 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7479 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7480 where the argument is 0.
7481
60f662b0
YQ
74822013-01-25 Yao Qi <yao@codesourcery.com>
7483
7484 * event-loop.c: Include "queue.h".
7485 (gdb_event_p): New typedef.
7486 (struct gdb_event) <next_event>: Remove.
7487 (event_queue): Change to QUEUE(gdb_event_p).
7488 (async_queue_event): Remove.
7489 (gdb_event_xfree): New.
7490 (initialize_event_loop): New.
7491 (process_event): Use API from QUEUE.
7492 (wait_for_event): Likewise.
7493 * server.c (main): Call initialize_event_loop.
7494 * server.h (initialize_event_loop): Declare.
7495
5ae4861a
YQ
74962013-01-18 Yao Qi <yao@codesourcery.com>
7497
7498 * ax.h (struct eval_agent_expr_context): New.
7499 (gdb_eval_agent_expr): Update declaration.
7500 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7501 TFRAME. Add new argument CTX.
7502 * server.h (struct eval_agent_expr_context): Declare.
7503 (agent_mem_read, agent_tsv_read): Update declaration.
7504 (agent_mem_read_string): Likewise.
7505 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7506 (add_traceframe_block): Add new argument TPOINT.
7507 Increase TPOINT->traceframe_usage.
7508 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7509 eval_tracepoint_agent_expr.
7510 (condition_true_at_tracepoint): Likewise.
7511 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7512 (agent_mem_read_string, agent_tsv_read): Likewise.
7513
85e00e85
YQ
75142013-01-16 Yao Qi <yao@codesourcery.com>
7515
7516 * linux-low.c (linux_resume_one_lwp): Don't check
7517 'lwp->bp_reinsert != 0'.
7518
4039cf45
JB
75192013-01-07 Joel Brobecker <brobecker@adacore.com>
7520 Pedro Alves <palves@redhat.com>
7521
7522 * lynx-low.c (ptrace_request_to_str): Define a temporary
7523 macro and use it to simplify this function's implementation.
7524
9044dee2
JB
75252013-01-07 Joel Brobecker <brobecker@adacore.com>
7526
7527 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7528 sets errno.
7529
e6352c8f
JB
75302013-01-07 Joel Brobecker <brobecker@adacore.com>
7531
7532 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7533
50681a27
JB
75342013-01-07 Joel Brobecker <brobecker@adacore.com>
7535
7536 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7537
3f6e77ef
JB
75382013-01-07 Joel Brobecker <brobecker@adacore.com>
7539
7540 * lynx-low.c (lynx_resume): Use the resume_info parameter
7541 to determine the ptid for the lynx_ptrace call, unless
7542 it is equal to minus_one_ptid, in which case we use the
7543 ptid of the current_inferior.
7544 (lynx_wait_1): After having received a thread create/exit
7545 event, resume the inferior's execution using the signaling
7546 thread's ptid, rather than the old ptid.
7547
7fda33ae
JB
75482013-01-07 Joel Brobecker <brobecker@adacore.com>
7549
7550 * lynx-low.c (lynx_resume): Delete variable ret.
7551
b9786c74
JB
75522013-01-01 Joel Brobecker <brobecker@adacore.com>
7553
7554 * gdbreplay.c (gdbreplay_version): Update copyright year.
7555 * server.c (gdbserver_version): Likewise.
7556
8b93d60f
JB
75572012-12-17 Joel Brobecker <brobecker@adacore.com>
7558
7559 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7560 new thread.
7561
037335a7
JB
75622012-12-17 Joel Brobecker <brobecker@adacore.com>
7563
7564 * lynx-low.c (ptrace_request_to_str): Add handling for
7565 PTRACE_GETTRACESIG.
7566
52d4cbd8
JB
75672012-12-17 Joel Brobecker <brobecker@adacore.com>
7568
7569 * lynx-low.c (lynx_attach): Delete variable new_process.
7570
ab8f6ca9
JB
75712012-12-17 Joel Brobecker <brobecker@adacore.com>
7572
7573 * lynx-low.c (lynx_create_inferior): Delete variable
7574 new_process.
7575
78cbc024
JB
75762012-12-17 Joel Brobecker <brobecker@adacore.com>
7577
7578 * lynx-low.c (ptrace_request_to_str): Do not handle
7579 PTRACE_GETTHREADLIST if this macro does not exist.
7580
14a00470
YQ
75812012-12-15 Yao Qi <yao@codesourcery.com>
7582
7583 * Makefile.in (OBS): Add notif.o.
7584 * notif.c, notif.h: New.
7585 * server.c: Include "notif.h".
7586 (struct vstop_notif) <next>: Remove.
7587 <base>: New field.
7588 (queue_stop_reply): Update.
7589 (push_event, send_next_stop_reply): Remove.
7590 (discard_queued_stop_replies): Update.
7591 (notif_stop): New variable.
7592 (handle_v_stopped): Remove.
7593 (handle_v_requests): Don't call handle_v_stopped. Call
7594 handle_ack_notif instead.
7595 (queue_stop_reply_callback): Call notif_event_enque instead
7596 of queue_stop_reply.
7597 (handle_status): Don't call send_next_stop_reply, call
7598 notif_write_event instead.
7599 (kill_inferior_callback): Likewise.
7600 (detach_or_kill_inferior_callback): Likewise.
7601 (main): Call initialize_notif.
7602 (process_serial_event): Call QUEUE_is_empty.
7603 (handle_target_event): Call notif_push instead of push event.
7604 * server.h (push_event): Remove declaration.
7605
61c125b9
TT
76062012-12-10 Tom Tromey <tromey@redhat.com>
7607
7608 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7609 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7610 macros.
7611 (.c.o): Rewrite.
7612 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7613 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7614 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7615 (amd64-linux-ipa.o, ax.o): Rewrite.
7616 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7617 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7618 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7619 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7620 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7621 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7622 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7623 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7624 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7625 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7626 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7627 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7628 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7629 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7630 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7631 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7632 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7633 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7634 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7635 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7636 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7637 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7638 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7639 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7640 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7641 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7642 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7643 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7644 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7645 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7646 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7647 (reg-tilegx.o): Remove.
7648 (all_object_files): New macro.
7649 Include .deps files.
7650 * aclocal.m4, configure: Rebuild.
7651 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7652 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7653 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7654
e90e9ad9
TT
76552012-12-05 Tom Tromey <tromey@redhat.com>
7656
7657 PR gdb/14917:
7658 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7659
02d403bf 76602012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7661
7662 * configure.ac: Check for linux/perf_event.h.
7663 * config.in: Regenerated.
7664 * configure: Regenerated.
7665
0270a750
PA
76662012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7667
7668 * hostio.c (handle_readlink): Decrease buffer size
7669 parameter passed to readlink by one byte.
7670
8c29b58e
YQ
76712012-11-26 Yao Qi <yao@codesourcery.com>
7672
7673 * configure.ac (build_warnings): Append '-Wempty-body'.
7674 * configure: Regenerated.
7675 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7676 body.
7677
8bdce1ff
PM
76782012-11-15 Pierre Muller <muller@sourceware.org>
7679
7680 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7681 * config.in: Regenerate.
7682 * configure: Regenerate.
7683 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7684 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7685 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7686 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7687 header.
7688 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7689 instead of <sys/wait.h> header.
7690 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7691
02d403bf 76922012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7693
7694 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7695 (various make rules): Remove -DGDBSERVER
7696
fbd5db48
YQ
76972012-11-09 Yao Qi <yao@codesourcery.com>
7698
7699 * spu-low.c (current_ptid): Move it to ..
7700 * gdbthread.h: ... here. New.
7701 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7702 * server.c (myresume, process_serial_event): Likewise.
7703 * thread-db.c (thread_db_find_new_threads): Likewise.
7704 * tracepoint.c (run_inferior_command): Likewise.
7705
b3dc46ff
AB
77062012-10-01 Andrew Burgess <aburgess@broadcom.com>
7707
7708 * server.c (handle_search_memory_1): Include access length in
7709 warning message.
7710
07c04788
HPN
77112012-09-05 Michael Brandt <michael.brandt@axis.com>
7712
7713 * linux-crisv32-low.c: Fix compile errors.
7714
918d227b
YQ
77152012-09-04 Yao Qi <yao@codesourcery.com>
7716
7717 * tracepoint.c (cmd_qtsv): Adjust debug message.
7718 Don't check CUR_TPOINT.
7719
18c1b81a
YQ
77202012-08-28 Yao Qi <yao@codesourcery.com>
7721
7722 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7723 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7724 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7725 Remove declarations of xmalloc, xreallloc, xstrdup and
7726 freeargv.
7727 * Makefile.in (libiberty_h): New.
7728 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7729 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7730
dc82f37b
YQ
77312012-08-23 Yao Qi <yao@codesourcery.com>
7732
7733 * server.h: Remove declaration of 'xsnprintf'.
7734
406b1477
KS
77352012-08-22 Keith Seitz <keiths@redhat.com>
7736
7737 * server.h: Include build-gnulib-gbserver/config.h.
7738 * gdbreplay.c: Likewise.
7739
e6712ff1
DE
77402012-08-08 Doug Evans <dje@google.com>
7741
7742 * Makefile.in (SFILES): Add gdb_vecs.c.
7743 (OBS): Add gdb_vecs.o.
7744 (gdb_vecs_h, host_defs_h): New variables.
7745 (thread-db.o): Add $(gdb_vecs_h) dependency.
7746 (gdb_vecs.o): New rule.
7747 * thread-db.c: #include "gdb_vecs.h".
7748 (thread_db_load_search): Use a vector to iterate over path elements.
7749 Handle text appearing after "$pdir".
7750
7751 * configure.ac: Add check for strstr.
7752 * config.in: Regenerate.
7753 * configure: Regenerate.
7754
7c3270ae
UW
77552012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7756
7757 * hostio.c (handle_pread): If pread fails, fall back to attempting
7758 lseek/read.
7759 (handle_pwrite): Likewise for pwrite.
7760
b62e2b27
UW
77612012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7762
7763 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7764 between unsupported TYPE and unimplementable ADDR/LEN combination.
7765 (arm_insert_point): Act on new return value.
7766
78a99e91
PA
77672012-07-31 Pedro Alves <palves@redhat.com>
7768
7769 * server.c (process_point_options): Only skip tokens if we find
7770 one that is unrecognized. Don't treat 'X' specially while
7771 skipping unrecognized tokens.
7772
fcf303ab
UW
77732012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7774
7775 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7776 to 4-byte-align HW breakpoint addresses for Thumb.
7777
7255706c
YQ
77782012-07-27 Yao Qi <yao@codesourcery.com>
7779
7780 PR remote/14161.
7781
7782 * server.h: Declare gdb_agent_about_to_close.
7783 * target.c (kill_inferior): Include "agent.h".
7784 New. Send command 'kill'.
7785 * target.h (kill_inferior): Removed macro.
7786 * tracepoint.c (gdb_agent_about_to_close): New.
7787 (gdb_agent_helper_thread): Handle command 'close'.
7788 Wait endlessly until the inferior stops.
7789 Install gdb_agent_remove_socket to atexit hook.
7790 (agent_socket_name): New static variable.
7791 (gdb_agent_socket_init): Replace local variable 'name' with
7792 'agent_socket_name'.
7793 (gdb_agent_remove_socket): New.
7794
5a3f286f
YQ
77952012-07-27 Yao Qi <yao@codesourcery.com>
7796
7797 * server.c (process_point_options): Stop at 'X' when parsing.
7798
961bd387
ME
77992012-07-19 Michael Eager <eager@eagercon.com>
7800
a261b8f5 7801 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7802 to hw_execute.
7803 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7804 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7805 hardware breakpoint.
7806
aa7c7447
JK
78072012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7808
7809 * gdbserver/linux-low.c (initialize_low): Call
7810 linux_ptrace_init_warnings.
7811
7f216e7c
DE
78122012-07-02 Doug Evans <dje@google.com>
7813
7814 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7815 pointer to int.
7816
d3ce09f5
SS
78172012-07-02 Stan Shebs <stan@codesourcery.com>
7818
7819 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7820 (ax.o): Add it to build rule.
7821 (ax-ipa.o): Ditto.
7822 (OBS): Add format.o.
7823 (IPA_OBS): Add format.o.
7824 * server.c (handle_query): Claim support for breakpoint commands.
7825 (process_point_options): Add command case.
7826 (process_serial_event): Leave running if there are printfs in
7827 effect.
7828 * mem-break.h (any_persistent_commands): Declare.
7829 (add_breakpoint_commands): Declare.
7830 (gdb_no_commands_at_breakpoint): Declare.
7831 (run_breakpoint_commands): Declare.
7832 * mem-break.c (struct point_command_list): New struct.
7833 (struct breakpoint): New field command_list.
7834 (any_persistent_commands): New function.
7835 (add_commands_to_breakpoint): New function.
7836 (add_breakpoint_commands): New function.
7837 (gdb_no_commands_at_breakpoint): New function.
7838 (run_breakpoint_commands): New function.
7839 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7840 locally.
7841 * ax.c: Include format.h.
7842 (ax_printf): New function.
7843 (gdb_eval_agent_expr): Add printf opcode.
7844
2f8f6aed
YQ
78452012-06-13 Yao Qi <yao@codesourcery.com>
7846
7847 * server.c (start_inferior): Remove duplicated writes to fields
7848 'last_resume_kind' and 'last_status' of 'current_inferior'.
7849
0c9070b3
YQ
78502012-06-12 Yao Qi <yao@codesourcery.com>
7851 Pedro Alves <palves@redhat.com>
7852
7853 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7854 comment.
7855 * server.c (handle_v_cont): Extend comment.
7856
c52daf70
YQ
78572012-06-11 Yao Qi <yao@codesourcery.com>
7858
7859 * linux-low.c (linux_attach): Add 'static'.
7860
d38bbb0a
YQ
78612012-06-06 Yao Qi <yao@codesourcery.com>
7862
7863 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7864
89dc0afd
JK
78652012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7866
7867 Fix gcc -flto compilation warning.
7868 * server.c (main): Make variable multi_mode and attach volatile.
7869
75f62ce7
TJB
78702012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7871
7872 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7873 if the platform doesn't know about it.
7874
65f479b6
PA
78752012-05-30 Jeff Kenton <jkenton@tilera.com>
7876
7877 * Makefile.in (SFILES): Add linux-tile-low.c.
7878 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7879 * configure.srv: Handle tilegx-*-linux*.
7880 * linux-tile-low.c: New file.
7881
0c5bf5a9
JK
78822012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7883
7884 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7885
a493e3e2
PA
78862012-05-24 Pedro Alves <palves@redhat.com>
7887
7888 PR gdb/7205
7889
43aaf8b6 7890 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7891
2ea28649
PA
78922012-05-24 Pedro Alves <palves@redhat.com>
7893
7894 PR gdb/7205
7895
7896 Replace target_signal with gdb_signal throughout.
7897
8d409d16
MR
78982012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7899
7900 * linux-low.c (linux_store_registers): Avoid the copying sequence
7901 when no data has been retrieved by ptrace.
7902
23512c01
MGD
79032012-05-22 Will Deacon <will.deacon@arm.com>
7904
7905 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7906 Include asm/ptrace.h.
7907 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7908 already defined.
7909
4934b29e
MR
79102012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7911
7912 * linux-low.c (linux_store_registers): Don't re-retrieve data
7913 with ptrace that has already been obtained from /proc. Always
7914 copy any data retrieved with ptrace to the buffer supplied.
7915
bde24c0a
PA
79162012-05-11 Yao Qi <yao@codesourcery.com>
7917 Pedro Alves <palves@redhat.com>
7918
7919 * linux-low.c (enum stopping_threads_kind): New.
7920 (stopping_threads): Change type to `enum stopping_threads_kind'.
7921 (handle_extended_wait): If stopping and suspending threads, leave
7922 the new_lwp suspended too.
7923 (linux_wait_for_event): Adjust.
7924 (stop_all_lwps): Set `stopping_threads' to
7925 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7926 whether we're suspending threads or just stopping them. Assert no
7927 recursion happens.
7928
623b6bdf
YQ
79292012-04-29 Yao Qi <yao@codesourcery.com>
7930
7931 * server.h: Move some code to ...
7932 * gdbthread.h: ... here. New.
7933 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7934 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7935 (nto-low.o, win32-low.o): Likewise.
7936 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7937 * regcache.c, remote-utils.c, server.c: Likewise.
7938 * target.c, tracepoint.c, win32-low.c: Likewise.
7939
f15f9948
TJB
79402012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7941
7942 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7943 (PTRACE_ARG4_TYPE): Likewise.
7944 (PTRACE_XFER_TYPE): Likewise.
7945 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7946 ptrace to PTRACE_ARG3_TYPE.
7947 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7948 (PTRACE_ARG4_TYPE): Likewise.
7949 (PTRACE_XFER_TYPE): Likewise.
7950 (linux_detach_one_lwp): Cast fourth argument of
7951 ptrace to long then PTRACE_ARG4_TYPE.
7952 (regsets_fetch_inferior_registers): Cast third argument of
7953 ptrace to long then PTRACE_ARG3_TYPE.
7954 (regsets_store_inferior_registers): Likewise.
7955
38ea300a
PA
79562012-04-20 Pedro Alves <palves@redhat.com>
7957
7958 * configure: Regenerate.
7959
c971b7fa
PA
79602012-04-19 Pedro Alves <palves@redhat.com>
7961
43aaf8b6 7962 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7963 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7964 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7965 (all, install-only, uninstall, clean-info, all-lib, clean): No
7966 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7967 (maintainer-clean realclean distclean): Use subdir_do.
7968 (subdir_do): New.
7969 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7970 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7971 * acinclude.m4: Include acx_configure_dir.m4.
7972 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7973 calls. Call AC_PROG_RANLIB. Configure gnulib using
7974 ACX_CONFIGURE_DIR.
7975 (GNULIB): New.
7976 (GNULIB_STDINT_H): Adjust.
7977 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7978 * gdbreplay.c: Include build-gnulib/config.h.
7979 * server.h: Likewise.
7980 * aclocal.m4: Regenerate.
7981 * config.in: Regenerate.
7982 * configure: Regenerate.
c971b7fa 7983
809277f8
PA
79842012-04-19 Pedro Alves <palves@redhat.com>
7985
7986 * Makefile.in (LIBGNU, INCGNU): Adjust.
7987 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7988 (all, install-only, uninstall, clean-info, all-lib, clean)
7989 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7990 * configure.ac: Adjust AC_OUTPUT output.
7991 * aclocal.m4: Regenerate.
7992 * configure: Regenerate.
7993
fd9bb8b8
PA
79942012-04-19 Pedro Alves <palves@redhat.com>
7995
7996 * Makefile.in (generated_files): New.
7997 (server_h): Remove the explicit dependency on config.h, and depend
7998 on $generated_files.
7999
1c298c66
PA
80002012-04-19 Pedro Alves <palves@redhat.com>
8001
8002 * Makefile.in (INCGNU): Add -Ignulib.
8003
57c4b50b
PA
80042012-04-19 Pedro Alves <palves@redhat.com>
8005
8006 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8007 (INCGNU): ... this, and spell out -I here.
8008 (GNULIB_LIB): Rename to ...
8009 (LIBGNU): ... this.
8010 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8011
1030e047
PA
80122012-04-19 Pedro Alves <palves@redhat.com>
8013
8014 * config.in: Regenerate.
8015
447d4319
PA
80162012-04-19 Pedro Alves <palves@redhat.com>
8017
8018 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8019 * server.h (memmem): Remove declaration.
8020 * config.in: Regenerate.
8021 * configure: Regenerate.
8022
aad9eab9
YQ
80232012-04-19 Yao Qi <yao@codesourcery.com>
8024
8025 * Makefile.in (SFILES): Add common/vec.c.
8026 (OBS): Add vec.o.
8027 (vec.o): New rule.
8028
3e10640f
YQ
80292012-04-19 Yao Qi <yao@codesourcery.com>
8030
8031 * remote-utils.c (prepare_resume_reply): Replace with macro
8032 target_core_of_thread.
8033 * server.c (handle_qxfer_threads_proper): Likewise.
8034 * target.h (traget_core_of_thread): New macro.
8035
71622373
PA
80362012-04-18 Pedro Alves <palves@redhat.com>
8037
8038 * aclocal.m4: Regenerate.
8039 * configure: Regenerate.
8040
80d26939
YQ
80412012-04-16 Yao Qi <yao@codesourcery.com>
8042
8043 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8044 duplicated on address.
8045
42476b70
YQ
80462012-04-16 Yao Qi <yao@codesourcery.com>
8047
8048 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8049 (struct tracepoint_action_ops) <send>: New field.
8050 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8051 (agent_expr_send, x_tracepoint_action_send): New.
8052 (l_tracepoint_action_send): New.
8053 (cmd_qtdp): Download and install tracepoint
8054 according to `use_agent'.
8055 (run_inferior_command): Add one more parameter `len'.
8056 Update callers.
8057 (tracepoint_send_agent): New.
8058 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8059
7bc83639
YQ
80602012-04-16 Yao Qi <yao@codesourcery.com>
8061
8062 * tracepoint.c (download_tracepoints): Moved to ...
8063 (cmd_qtstart): ... here.
8064
5f18041e
YQ
80652012-04-14 Yao Qi <yao@codesourcery.com>
8066
8067 * tracepoint.c: Include inttypes.h.
8068 (struct collect_memory_action): Use sized types.
8069 (struct tracepoint): Likewise.
8070 (cmd_qtdp, stop_tracing): Update print specifiers.
8071 (cmd_qtp, response_tracepoint): Likewise.
8072 (collect_data_at_tracepoint): Likewise.
8073 (collect_data_at_step): Likewise.
8074
55a8c076
YQ
80752012-04-14 Yao Qi <yao@codesourcery.com>
8076
8077 Import gnulib module inttypes.
8078 * aclocal.m4, config.in, configure: Regenerated.
8079
dc750257
YQ
80802012-04-14 Yao Qi <yao@codesourcery.com>
8081
8082 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8083 Makefile and config.status at last.
8084
0ab5faf9
YQ
80852012-04-13 Yao Qi <yao@codesourcery.com>
8086
8087 * tracepoint.c: Include stdint.h unconditionally.
8088
18f5fd81
TJB
80892012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8090
8091 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8092 on BFD_HAVE_SYS_PROCFS_TYPE.
8093 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8094 * configure: Regenerate.
8095 * config.in: Likewise.
8096
4d47af5c
L
80972012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8098
8099 * Makefile.in (clean): Also remove x32.c x32-linux.c
8100 x32-avx.c x32-avx-linux.c.
8101 (x32.o): New target.
8102 (x32.c): Likewise.
8103 (x32-linux.o): Likewise.
8104 (x32-linux.c): Likewise.
8105 (x32-avx.o): Likewise.
8106 (x32-avx.c): Likewise.
8107 (x32-avx-linux.o): Likewise.
8108 (x32-avx-linux.c): Likewise.
8109
8110 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8111 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8112 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8113 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8114 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8115 i386/x32-avx-linux.xml.
8116
8117 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8118 (init_registers_x32_avx_linux): Likwise.
8119 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8120 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8121
ecedbe58
PA
81222012-04-13 Pedro Alves <palves@redhat.com>
8123
8124 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8125 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8126 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8127 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8128 the sub-make.
8129
c92b5177
L
81302012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8131
8132 * linux-x86-low.c (compat_x32_clock_t): New.
8133 (compat_x32_siginfo_t): Likewise.
8134 (compat_x32_siginfo_from_siginfo): Likewise.
8135 (siginfo_from_compat_x32_siginfo): Likewise.
8136 (linux_is_elf64): Likewise.
8137 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8138 and siginfo_from_compat_x32_siginfo for x32.
8139 (x86_arch_setup): Set linux_is_elf64.
8140
214d508e
L
81412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8142
8143 PR gdb/13969
8144 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8145 e_machine field.
8146 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8147 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8148 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8149 compatible with process.
8150
c9a1864a
YQ
81512012-04-12 Yao Qi <yao@codesourcery.com>
8152
8153 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8154 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8155 (install-only, install-info, clean): Handle sub dir gnulib.
8156 (all-lib, am--refresh): New targets.
8157 (memmem.o): Remove target.
8158 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8159 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8160 (AC_REPLACE_FUNCS): Remove memmem.
8161 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8162 (AC_OUTPUT): Generate Makefile in gnulib/.
8163 * aclocal.m4, config.in, configure: Regenerated.
8164
367ba2c2
MR
81652012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8166
8167 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8168
9d236627
PA
81692012-04-05 Pedro Alves <palves@redhat.com>
8170
8171 -Werror=strict-aliasing
8172
8173 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8174 pointer.
8175
111217b3
PA
81762012-04-04 Pedro Alves <palves@redhat.com>
8177
8178 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8179 (sparc_store_gregset_from_stack, sparc_store_gregset)
8180 (sparc_breakpoint_at): Fix formatting.
8181
8365dcf5
TJB
81822012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8183
8184 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8185 are available.
8186 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8187 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8188 * config.in: Regenerate.
8189 * configure: Likewise.
8190
689cc2ae
PA
81912012-03-29 Pedro Alves <palves@redhat.com>
8192
8193 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8194 Correct ptrace arguments.
8195
c14dfd32
PA
81962012-03-28 Pedro Alves <palves@redhat.com>
8197
8198 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8199 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8200 (IA64_FR1_REGNUM): New defines.
8201 (ia64_fetch_register): New.
8202 (the_low_target): Install it.
8203 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8204 field.
8205 * linux-low.c (linux_fetch_registers): Try the
8206 the_low_target.fetch_register hook first.
8207
8208 * linux-arm-low.c (the_low_target): Adjust.
8209 * linux-bfin-low.c (the_low_target): Adjust.
8210 * linux-cris-low.c (the_low_target): Adjust.
8211 * linux-crisv32-low.c (the_low_target): Adjust.
8212 * linux-m32r-low.c (the_low_target): Adjust.
8213 * linux-m68k-low.c (the_low_target): Adjust.
8214 * linux-mips-low.c (the_low_target): Adjust.
8215 * linux-ppc-low.c (the_low_target): Adjust.
8216 * linux-s390-low.c (the_low_target): Adjust.
8217 * linux-sh-low.c (the_low_target): Adjust.
8218 * linux-sparc-low.c (the_low_target): Adjust.
8219 * linux-tic6x-low.c (the_low_target): Adjust.
8220 * linux-x86-low.c (the_low_target): Adjust.
8221 * linux-xtensa-low.c (the_low_target): Adjust.
8222
63c88e13
PA
82232012-03-26 Pedro Alves <palves@redhat.com>
8224
8225 * server.c (handle_qxfer_libraries): Don't bail early if
8226 the_target->qxfer_libraries_svr4 is not NULL.
8227
fb723180
PA
82282012-03-26 Pedro Alves <palves@redhat.com>
8229
8230 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8231
0afae3cf
PA
82322012-03-23 Pedro Alves <palves@redhat.com>
8233
8234 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8235 "library-list-svr4" element's start tag when the the DSO list is
8236 empty.
8237
485f1ee4
PA
82382012-03-23 Pedro Alves <palves@redhat.com>
8239
8240 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8241 a variable whose type size is the same as the inferior's pointer
8242 size.
8243
a5362b9a
TS
82442012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8245
8246 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8247 struct siginfo.
8248 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8249 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8250 * linux-low.h: Include <signal.h>.
8251 (struct siginfo): Remove forward declaration.
8252 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8253 struct siginfo.
8254
d226c142
MF
82552012-03-21 Mike Frysinger <vapier@gentoo.org>
8256
8257 * .gitignore: Ignore more files.
8258
122f36ef
PA
82592012-03-19 Pedro Alves <palves@redhat.com>
8260 Jan Kratochvil <jan.kratochvil@redhat.com>
8261
8262 * server.c (cont_thread, general_thread): Add describing comments.
8263 (start_inferior): Clear `cont_thread'.
8264 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8265 of a process.
8266
fc3e5175
YQ
82672012-03-15 Yao Qi <yao@codesourcery.com>
8268
8269 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8270 handling to ...
8271 (cmd_qtdp): ... here.
8272
8d0d92cd
YQ
82732012-03-15 Yao Qi <yao@codesourcery.com>
8274
8275 * tracepoint.c (struct tracepoint_action_ops): New.
8276 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8277 (m_tracepoint_action_download): New.
8278 (r_tracepoint_action_download): New.
8279 (x_tracepoint_action_download): New.
8280 (l_tracepoint_action_download): New.
8281 (add_tracepoint_action): Install `action->ops' according type.
8282 (download_tracepoint_1): Move code `download' function pointer
8283 of various tracepoint_action_ops.
8284
87b0bb13
JK
82852012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8286
8287 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8288 linux_ptrace_attach_warnings.
8289
5f572dec
JK
82902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8291
8292 * Makefile.in (linux-ptrace.o): New.
8293 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8294 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8295 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8296 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8297 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8298 of these targets.
8299 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8300
f4647387
YQ
83012012-03-08 Yao Qi <yao@codesourcery.com>
8302 Pedro Alves <palves@redhat.com>
8303
8304 Fix PR server/13392.
8305 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8306 offset of JMP insn.
8307 * tracepoint.c (remove_tracepoint): New.
8308 (cmd_qtdp): Call remove_tracepoint when failed to install.
8309
9b224c5e
PA
83102012-03-07 Pedro Alves <palves@redhat.com>
8311
8312 * linux-low.c (get_detach_signal): New.
8313 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8314 Pass on pending signals to PTRACE_DETACH. Check the result of the
8315 ptrace call.
8316 * server.c (program_signals, program_signals_p): New.
8317 (handle_general_set): Handle QProgramSignals.
8318 * server.h (program_signals, program_signals_p): Declare.
8319
e237a7e2
JK
83202012-03-05 Pedro Alves <palves@redhat.com>
8321 Jan Kratochvil <jan.kratochvil@redhat.com>
8322
8323 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8324 New comment why.
8325
5808517f
YQ
83262012-03-03 Yao Qi <yao@codesourcery.com>
8327
8328 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8329 agent_look_up_symbols.
8330
58b4daa5
YQ
83312012-03-03 Yao Qi <yao@codesourcery.com>
8332
8333 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8334 (linux-x86-low.o): Likewise.
8335 * server.h: Remove in_process_agent_loaded.
8336 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8337 common/agent.c.
8338 Update callers.
8339
8ffcbaaf
YQ
83402012-03-03 Yao Qi <yao@codesourcery.com>
8341
8342 * tracepoint.c (gdb_agent_capability): New global.
8343 (in_process_agent_loaded_ust): Renamed to
8344 `in_process_agent_supports_ust'.
8345 Update callers.
8346 (in_process_agent_supports_ust): Call agent_capability_check.
8347 (clear_installed_tracepoints): Assert that agent supports
8348 agent.
8349
d1feda86
YQ
83502012-03-03 Yao Qi <yao@codesourcery.com>
8351
8352 * linux-low.c (linux_supports_agent): New.
8353 (linux_target_ops): Initialize field `supports_agent' with
8354 linux_supports_agent.
8355 * target.h (struct target_ops) <supports_agent>: New.
8356 (target_supports_agent): New macro.
8357 * server.c (handle_general_set): Handle packet 'QAgent'.
8358 (handle_query): Send `QAgent+'.
8359 * Makefile.in (server.o): Depends on agent.h.
8360
2fa291ac
YQ
83612012-03-03 Yao Qi <yao@codesourcery.com>
8362
8363 * Makefile.in (OBS): Add agent.o.
8364 Add new rule for agent.o.
8365 Track dependence of tracepoint.c on agent.h.
8366 * tracepoint.c (run_inferior_command_1):
8367 (run_inferior_command): Call agent_run_command.
8368 (gdb_ust_connect_sync_socket): Deleted. Move it to
8369 common/agent.c.
8370 (resume_thread, stop_thread): Likewise.
8371 (gdb_ust_socket_init): Renamed to ...
8372 (gdb_agent_socket_init): ... New.
8373 (gdb_ust_thread): Renamed to ...
8374 (gdb_agent_helper_thread): ... New.
8375 (gdb_ust_init): Move some code to ...
8376 (gdb_agent_init): ... here. New.
8377 [HAVE_UST]: Call gdb_ust_init.
8378 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8379 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8380 * config.in, configure: Regenerated.
8381
05044653
PA
83822012-03-02 Pedro Alves <palves@redhat.com>
8383
8384 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8385 * linux-low.c (struct simple_pid_list): New.
8386 (stopped_pids): New a struct simple_pid_list pointer.
8387 (add_to_pid_list, pull_pid_from_list): New.
8388 (handle_extended_wait): Don't assume the first signal new children
8389 report is SIGSTOP. Adjust call to pull_pid_from_list.
8390 (linux_wait_for_lwp): Adjust.
8391
8d00225b
YQ
83922012-03-02 Yao Qi <yao@codesourcery.com>
8393
8394 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8395 debug log.
8396
19560ba5
YQ
83972012-03-02 Yao Qi <yao@codesourcery.com>
8398
8399 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8400 `stop_pc' and `tpoint'. Update caller.
8401
1faeff08
MR
84022012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8403
8404 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8405 * linux-low.c (use_linux_regsets): New macro.
8406 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8407 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8408 (linux_register_in_regsets): New function.
8409 (usr_fetch_inferior_registers): Skip registers covered by
8410 regsets.
8411 (usr_store_inferior_registers): Likewise.
8412 (usr_fetch_inferior_registers): New macro.
8413 (usr_store_inferior_registers): Likewise.
8414 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8415 (linux_store_registers): Likewise.
8416 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8417 prototype.
8418 (init_registers_mips64_dsp_linux): Likewise.
8419 (init_registers_mips_linux): New macro.
8420 (init_registers_mips_dsp_linux): Likewise.
8421 (mips_dsp_num_regs): Likewise.
8422 (DSP_BASE, DSP_CONTROL): New fallback macros.
8423 (mips_base_regs): New macro.
8424 (mips_regmap): Use it. Fix the size.
8425 (mips_dsp_regmap): New variable.
8426 (mips_dsp_regset_bitmap): Likewise.
8427 (mips_arch_setup): New function.
8428 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8429 than mips_regmap.
8430 (mips_cannot_store_register): Likewise.
8431 (the_low_target): Update .arch_setup, .num_regs and .regmap
8432 initializers. Add .regset_bitmap initializer.
8433 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8434 initializer.
8435 * linux-bfin-low.c (the_low_target): Likewise.
8436 * linux-cris-low.c (the_low_target): Likewise.
8437 * linux-crisv32-low.c (the_low_target): Likewise.
8438 * linux-ia64-low.c (the_low_target): Likewise.
8439 * linux-m32r-low.c (the_low_target): Likewise.
8440 * linux-m68k-low.c (the_low_target): Likewise.
8441 * linux-ppc-low.c (the_low_target): Likewise.
8442 * linux-s390-low.c (the_low_target): Likewise.
8443 * linux-sh-low.c (the_low_target): Likewise.
8444 * linux-sparc-low.c (the_low_target): Likewise.
8445 * linux-tic6x-low.c (the_low_target): Likewise.
8446 * linux-x86-low.c (the_low_target): Likewise.
8447 * linux-xtensa-low.c (the_low_target): Likewise.
8448 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8449 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8450 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8451 srv_xmlfiles.
8452 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8453 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8454
c03e6ccc
YQ
84552012-02-29 Yao Qi <yao@codesourcery.com>
8456 Pedro Alves <palves@redhat.com>
8457
8458 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8459 `step_over_finished' is true.
8460
644cebc9
PA
84612012-02-27 Pedro Alves <palves@redhat.com>
8462
8463 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8464 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8465
c14d7ab2
PA
84662012-02-27 Pedro Alves <palves@redhat.com>
8467
8468 PR server/9684
8469 * linux-low.c (pid_is_stopped): New.
8470 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8471
412c89dd
LM
84722012-02-25 Luis Machado <lgustavo@codesourcery.com>
8473
8474 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8475 of conditions.
8476
b745defe
MR
84772012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8478
8479 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8480
9f3a5c85
LM
84812012-02-24 Luis Machado <lgustavo@codesourcery>
8482
8483 * server.c (handle_query): Advertise support for target-side
8484 breakpoint condition evaluation.
8485 (process_point_options): New function.
8486 (process_serial_event): When inserting a breakpoint, check for
8487 a target-side condition that should be evaluated.
8488
8489 * mem-break.c: Include regcache.h and ax.h.
8490 (point_cond_list_t): New data structure.
8491 (breakpoint) <cond_list>: New field.
8492 (find_gdb_breakpoint_at): Make non-static.
8493 (delete_gdb_breakpoint_at): Clear any target-side
8494 conditions.
8495 (clear_gdb_breakpoint_conditions): New function.
8496 (add_condition_to_breakpoint): Likewise.
8497 (add_breakpoint_condition): Likewise.
8498 (gdb_condition_true_at_breakpoint): Likewise.
8499 (gdb_breakpoint_here): Return result directly instead
8500 of going through a local variable.
8501
8502 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8503 (clear_gdb_breakpoint_conditions): Likewise.
8504 (add_breakpoint_condition): Likewise.
8505 (gdb_condition_true_at_breakpoint): Likewise.
8506
8507 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8508 (need_step_over_p): Take target-side breakpoint condition into
8509 consideration.
8510
5e1dc496
LM
85112012-02-24 Luis Machado <lgustavo@codesourcery>
8512
8513 * server.h: Include tracepoint.h.
8514 (agent_mem_read, agent_get_trace_state_variable_value,
8515 agent_set_trace_state_variable_value,
8516 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8517 get_set_tsv_func_addr): New prototypes.
8518
8519 * ax.h: New include file.
8520 * ax.c: New source file.
8521
8522 * tracepoint.c: Include ax.h.
8523 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8524 agent_expr, eval_result_type): Move to ax.h.
8525 (parse_agent_expr): Rename to ...
8526 (gdb_parse_agent_expr): ... this, make it non-static and move
8527 to ax.h.
8528 (unparse_agent_expr) Rename to ...
8529 (gdb_unparse_agent_expr): ... this, make it non-static and move
8530 to ax.h.
8531 (eval_agent_expr): Rename to ...
8532 (eval_tracepoint_agent_expr): ... this.
8533 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8534 forward declarations.
8535 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8536 (agent_get_trace_state_variable_value): New function.
8537 (agent_set_trace_state_variable_value): New function.
8538 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8539 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8540 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8541 (condition_true_at_tracepoint): Likewise.
8542 (parse_agent_expr): Rename to ...
8543 (gdb_parse_agent_expr): ... this and move to ax.c.
8544 (unparse_agent_expr): Rename to ...
8545 (gdb_unparse_agent_expr): ... this and move to ax.c.
8546 (gdb_agent_op_name): Move to ax.c.
8547 (eval_agent_expr): Rename to ...
8548 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8549 and move to ax.c.
8550 (eval_tracepoint_agent_expr): New function.
8551 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8552 non-static.
5e1dc496
LM
8553 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8554 ax.c.
8555 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8556 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8557 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8558 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8559 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8560 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8561 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8562 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8563 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8564 (compile_bytecodes): Remove forward declaration.
8565 (is_goto_target): Move to ax.c.
8566 (compile_bytecodes): Move to ax.c and call
8567 agent_get_trace_state_variable_value (...) and
8568 agent_set_trace_state_variable_value (...).
8569
8570 * Makefile.in: Update ax.c and IPA dependencies.
8571
277e4e52
PA
85722012-02-24 Pedro Alves <palves@redhat.com>
8573
8574 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8575 (cmd_bigqtbuffer_circular): ... this. Only handle
8576 'QTBuffer:circular:'.
8577 (handle_tracepoint_general_set): Adjust.
8578
bf4c19f7
YQ
85792012-02-16 Yao Qi <yao@codesourcery.com>
8580
8581 * inferiors.c: Move code to ...
8582 * dll.c: .... here. New.
8583 * server.h: Declare clear_dlls.
8584 * Makefile.in (SFILES): Add dll.c.
8585 (OBS): Add dll.o
8586 (dll.o): New rule.
8587
d73f2619
YQ
85882012-02-11 Yao Qi <yao@codesourcery.com>
8589
8590 * server.c: (handle_monitor_command): Add a new parameter
8591 `own_buf'.
8592 (handle_query): Update caller.
8593
f8255c2a
JB
85942012-02-09 Joel Brobecker <brobecker@adacore.com>
8595
8596 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8597 * configure, config.in: Regenerate.
8598 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8599 is not defined.
8600
da84f473
PA
86012012-02-02 Pedro Alves <palves@redhat.com>
8602
8603 Try SIGKILL first, then PTRACE_KILL.
8604 * linux-low.c (linux_kill_one_lwp): New.
8605 (linux_kill_one_lwp): Rename to ...
8606 (kill_one_lwp_callback): ... this. Use the new
8607 linux_kill_one_lwp.
8608
e886a173
PA
86092012-02-02 Pedro Alves <palves@redhat.com>
8610
8611 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8612 inferior.
8613
be07f1a2
PA
86142012-01-27 Pedro Alves <palves@redhat.com>
8615
8616 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8617 (elf_64_file_p): Make static.
8618 (linux_pid_exe_is_elf_64_file): New.
8619 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8620 Delete declarations.
8621 (linux_pid_exe_is_elf_64_file): Declare.
8622 * linux-x86-low.c (x86_arch_setup): Use
8623 linux_pid_exe_is_elf_64_file.
8624
d8301ad1
JK
86252012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8626
8627 * linux-low.c (linux_wait_for_event_1): Rename to ...
8628 (linux_wait_for_event): ... here and merge it with former
8629 linux_wait_for_event - new variable wait_ptid, use it.
8630 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8631
01b17894
PA
86322012-01-23 Pedro Alves <palves@redhat.com>
8633
8634 * server.c (main): Avoid yet another case of infinite loop while
8635 detaching/killing after a longjmp.
8636
e825046f
JK
86372012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8638
8639 Code cleanup.
8640 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8641
b9e7b9c3
UW
86422012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8643
8644 * hostio.c (handle_readlink): New function.
8645 (handle_vFile): Call it to handle "vFile:readlink" packets.
8646
901f9912
UW
86472012-01-20 Pedro Alves <palves@redhat.com>
8648 Ulrich Weigand <ulrich.weigand@linaro.org>
8649
8650 * server.c (handle_v_requests): Only support vAttach and vRun to
8651 start multiple processes when in extended protocol mode.
8652
fc1ab1a0
PA
86532012-01-17 Pedro Alves <palves@redhat.com>
8654
8655 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8656 memalign plus mprotect to allocate the scratch buffer.
8657
7d5d4e98
PA
86582012-01-13 Pedro Alves <palves@redhat.com>
8659
8660 * server.c (attach_inferior): Clear `cont_thread'.
8661
f128d5e9
PA
86622012-01-13 Pedro Alves <palves@redhat.com>
8663
8664 * server.c (main): Avoid infinite loop while detaching/killing
8665 after a longjmp.
8666
06db92f0
DE
86672012-01-09 Doug Evans <dje@google.com>
8668
8669 * server.c (start_inferior): Set last_ptid in --wrapper case.
8670
32d92999
YQ
86712012-01-06 Yao Qi <yao@codesourcery.com>
8672
8673 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8674 defined.
8675 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8676
5e0a92a9
YQ
86772012-01-04 Yao Qi <yao@codesourcery.com>
8678
8679 * tracepoint.c (cmd_qtdp): Print debug message
8680 for static tracepoint.
8681
ae639e8c
YQ
86822012-01-04 Yao Qi <yao@codesourcery.com>
8683
8684 * tracepoint.c (trace_vdebug): Differentiate debug message
8685 between gdbserver and IPA.
8686
f72429c5
YQ
86872012-01-03 Yao Qi <yao@codesourcery.com>
8688
8689 * tracepoint.c (tracepoint_was_hit): Don't collect for
8690 static tracepoint.
8691
12c3e59c
JB
86922012-01-02 Joel Brobecker <brobecker@adacore.com>
8693
8694 * terminal.h: Reformat copyright header.
8695
67827812
JB
86962012-01-02 Joel Brobecker <brobecker@adacore.com>
8697
8698 * server.c (gdbserver_version): Update copyright year.
8699 * gdbreplay.c (gdbreplay_version): Likewise.
8700
3e52c33d
JK
87012011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8702
8703 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8704
8705 Revert:
8706 2011-12-18 Hui Zhu <teawater@gmail.com>
8707 * linux-low.c (linux_create_inferior): Save return value to ret.
8708
66f1260e
HZ
87092011-12-18 Hui Zhu <teawater@gmail.com>
8710
8711 * linux-low.c (linux_create_inferior): Save return value to ret.
8712
e77616d7
DE
87132011-12-16 Doug Evans <dje@google.com>
8714
e7b06c57
DE
8715 * linux-low.c (linux_create_inferior): If stdio connection,
8716 redirect stdin from /dev/null, stdout to stderr.
8717 * remote-utils.c (remote_is_stdio): New static global.
8718 (remote_connection_is_stdio): New function.
8719 (remote_prepare): Handle stdio connection.
8720 (remote_open): Ditto.
8721 (remote_close): Don't close stdin for stdio connections.
8722 (read_prim,write_prim): New functions. Replace all calls to
8723 read/write to these.
8724 * server.c (main): Watch for "-" argument. Move call to
8725 remote_prepare before start_inferior.
8726 * server.h (STDIO_CONNECTION_NAME): New macro.
8727 (remote_connection_is_stdio): Declare.
8728
e77616d7
DE
8729 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8730 in debugging output.
8731
82067193
YQ
87322011-12-15 Yao Qi <yao@codesourcery.com>
8733
8734 * tracepoint.c: Include sys/syscall.h.
8735 (gdb_ust_thread): Remove preprocessor conditional.
8736
82bfbe7e
PA
87372011-12-14 Pedro Alves <pedro@codesourcery.com>
8738
8739 * linux-low.c (linux_detach_one_lwp): Call
8740 the_low_target.prepare_to_resume before detaching.
8741
712c6575
YQ
87422011-12-14 Yao Qi <yao@codesourcery.com>
8743
8744 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8745 of write.
8746
d54d1edf
YQ
87472011-12-14 Yao Qi <yao@codesourcery.com>
8748
8749 * i386-low.c (i386_low_stopped_data_address): Initialize local
8750 variable `control'.
8751
6210a125
PA
87522011-12-13 Pedro Alves <pedro@codesourcery.com>
8753
8754 PR remote/13492
8755
8756 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8757 DR_CONTROL unless necessary. Extend comments.
8758 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8759 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8760
2ece8244
YQ
87612011-12-13 Yao Qi <yao@codesourcery.com>
8762
8763 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8764 macros.
8765 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8766
784867a5
JK
87672011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8768
8769 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8770 Print new debug message for such case.
8771
6bf36717
JK
87722011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8773
8774 Fix overlapping memcpy.
8775 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8776 the read_inferior_memory transfer.
8777 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8778 write_inferior_memory transfer.
8779 (set_fast_tracepoint_jump): New variable buf. Use it for the
8780 read_inferior_memory and write_inferior_memory transfers.
8781 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8782 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8783 Use it for the write_inferior_memory transfer.
8784 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8785 buffers.
8786
50275556
MR
87872011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8788
8789 * linux-low.c (fetch_register, store_register): Make code
8790 consistent, fix formatting.
8791
7325beb4
MR
87922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8793
8794 * linux-low.c (usr_store_inferior_registers): Factor out code
8795 to handle individual registers into...
8796 (store_register): ... this new function.
8797
c642a434
UW
87982011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8799
8800 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8801 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8802 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8803 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8804 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8805 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8806 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8807 (srv_xmlfiles): Add new XML files.
8808
8809 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8810 and <sys/uio.h>.
8811 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8812 (init_registers_s390_linux32v1): Add prototype.
8813 (init_registers_s390_linux32v2): Likewise.
8814 (init_registers_s390_linux64v1): Likewise.
8815 (init_registers_s390_linux64v2): Likewise.
8816 (init_registers_s390x_linux64v1): Likewise.
8817 (init_registers_s390x_linux64v2): Likewise.
8818 (s390_num_regs): Increment to 52.
8819 (s390_regmap): Add orig_r2 register.
8820 (s390_num_regs_3264): Increment to 68.
8821 (s390_regmap_3264): Add orig_r2 register.
8822 (s390_collect_ptrace_register): Handle orig_r2 register.
8823 (s390_supply_ptrace_register): Likewise.
8824 (s390_fill_last_break): New function.
8825 (s390_store_last_break): Likewise.
8826 (s390_fill_system_call): New function.
8827 (s390_store_system_call): Likewise.
8828 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8829 register sets.
8830 (s390_check_regset): New function.
8831 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8832 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8833 Update target_regsets for available register sets.
8834
2268b414
JK
88352011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8836 Jan Kratochvil <jan.kratochvil@redhat.com>
8837
8838 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8839 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8840 New.
8841 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8842 * linux-low.h (struct process_info_private): New member r_debug.
8843 * server.c (handle_qxfer_libraries): Call
8844 the_target->qxfer_libraries_svr4.
8845 (handle_qxfer_libraries_svr4): New function.
8846 (qxfer_packets): New entry "libraries-svr4".
8847 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8848 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8849 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8850 PACKET_qXfer_libraries_svr4.
8851
d6db1fab
UW
88522011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8853
8854 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8855 PSW address/mask between 8-byte and 16-byte formats.
8856 (s390_supply_ptrace_register): Likewise.
8857 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8858 basic addressing mode bit.
8859
242f5f1c
SS
88602011-11-24 Stan Shebs <stan@codesourcery.com>
8861
8862 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8863
f196051f
SS
88642011-11-17 Stan Shebs <stan@codesourcery.com>
8865
8866 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8867 (tracing_start_time): New global.
8868 (tracing_stop_time): New global.
8869 (tracing_user_name): New global.
8870 (tracing_notes): New global.
8871 (tracing_stop_note): New global.
8872 (cmd_qtstart): Set traceframe_usage, start_time.
8873 (stop_tracing): Set stop_time.
8874 (cmd_qtstatus): Report additional status.
8875 (cmd_qtp): New function.
8876 (handle_tracepoint_query): Call it.
8877 (cmd_qtnotes): New function.
8878 (handle_tracepoint_general_set): Call it.
8879 (get_timestamp): Rename from tsv_get_timestamp.
8880
405f8e94
SS
88812011-11-14 Stan Shebs <stan@codesourcery.com>
8882 Kwok Cheung Yeung <kcy@codesourcery.com>
8883
8884 * linux-x86-low.c (small_jump_insn): New.
8885 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8886 trampoline and error message, build a trampoline and issue a small
8887 jump instruction to it.
8888 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8889 trampoline and error message.
8890 (x86_get_min_fast_tracepoint_insn_len): New.
8891 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8892 * linux-low.h (struct linux_target_ops): Add arguments to
8893 install_fast_tracepoint_jump_pad operation, add new operation.
8894 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8895 arguments.
8896 (linux_get_min_fast_tracepoint_insn_len): New function.
8897 (linux_target_op): Add new operation.
8898 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8899 (gdb_trampoline_buffer_end): Ditto.
8900 (gdb_trampoline_buffer_error): Ditto.
8901 (struct ipa_sym_addresses): Add fields for new IPA variables.
8902 (symbol_list): Add entries for new IPA variables.
8903 (struct tracepoint): Add fields to hold the address range of the
8904 trampoline used by the tracepoint.
8905 (trampoline_buffer_head): New static variable.
8906 (trampoline_buffer_tail): Ditto.
8907 (claim_trampoline_space): New function.
8908 (have_fast_tracepoint_trampoline_buffer): New function.
8909 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8910 structure.
8911 (install_fast_tracepoint): Ditto, also add error buffer argument.
8912 (cmd_qtminftpilen): New function.
8913 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8914 (fast_tracepoint_from_trampoline_address): New function.
8915 (fast_tracepoint_collecting): Handle trampoline as part of jump
8916 pad space.
8917 (set_trampoline_buffer_space): New function.
8918 (initialize_tracepoint): Initialize new IPA variables.
8919 * target.h (struct target_ops): Add arguments to
8920 install_fast_tracepoint_jump_pad operation, add new
8921 get_min_fast_tracepoint_insn_len operation.
8922 (target_get_min_fast_tracepoint_insn_len): New.
8923 (install_fast_tracepoint_jump_pad): Add arguments.
8924 * server.h (IPA_BUFSIZ): Define.
8925 * linux-i386-ipa.c: Include extra header files.
8926 (initialize_fast_tracepoint_trampoline_buffer): New function.
8927 (initialize_low_tracepoint): Call it.
8928 * server.h (set_trampoline_buffer_space): Declare.
8929 (claim_trampoline_space): Ditto.
8930 (have_fast_tracepoint_trampoline_buffer): Ditto.
8931
1e4d1764
YQ
89322011-11-14 Yao Qi <yao@codesourcery.com>
8933
8934 * server.c (handle_query): Handle InstallInTrace for qSupported.
8935 * tracepoint.c (add_tracepoint): Sort list.
8936 (install_tracepoint, download_tracepoint): New.
8937 (cmd_qtdp): Call them to install and download tracepoints.
8938 (sort_tracepoints): Removed.
8939 (cmd_qtstart): Update.
8940
5c73ff4e
YQ
89412011-11-14 Yao Qi <yao@codesourcery.com>
8942
8943 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8944 * mem-break.h: Declare.
8945 * tracepoint.c (cmd_qtstart): Move some code to ...
8946 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8947 New.
8948 (download_tracepoints): Move some code to ...
8949 (download_tracepoint_1): ... here. New.
8950
86a30030
YQ
89512011-11-08 Yao Qi <yao@codesourcery.com>
8952
8953 * remote-utils.c (relocate_instruction): A comment fix.
8954
8d26e50c
JB
89552011-11-07 Joel Brobecker <brobecker@adacore.com>
8956
8957 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8958 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8959 dr_status_mirror and dr_control_mirror from debug_reg_state.
8960 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8961 (i386_initial_stuff): Remove use of deleted globals.
8962 (i386_get_thread_context, i386_set_thread_context,
8963 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8964 from debug_reg_state.
8965
a59306a3
YQ
89662011-11-05 Yao Qi <yao@codesourcery.com>
8967
8968 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8969 address as TPOINT's.
8970
3065dfb6
SS
89712011-11-02 Stan Shebs <stan@codesourcery.com>
8972
8973 * tracepoint.c (agent_mem_read_string): New function.
8974 (eval_agent_expr): Call it for tracenz.
8975 * server.c (handle_query): Report support for tracenz.
8976
fd0d8c7c
YQ
89772011-11-02 Yao Qi <yao@codesourcery.com>
8978
8979 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8980
609086b1
YQ
89812011-11-02 Yao Qi <yao@codesourcery.com>
8982
8983 * target.h: Fix a typo in comment.
8984
b9fd1791
PA
89852011-10-31 Pedro Alves <pedro@codesourcery.com>
8986
8987 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8988 clobber the breakpoints' shadows with fast tracepoint jumps.
8989 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8990 * target.c (write_inferior_memory): Also pass MYADDR down to
8991 check_mem_write.
8992
03583c20
UW
89932011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8994
8995 * configure.ac: Check support for personality routine.
8996 * configure: Regenerate.
8997 * config.in: Likewise.
8998 * linux-low.c: Include <sys/personality.h>.
8999 Define ADDR_NO_RANDOMIZE if necessary.
9000 (linux_create_inferior): Disable address space randomization when
9001 forking inferior, if requested.
9002 (linux_supports_disable_randomization): New function.
9003 (linux_target_ops): Install it.
9004 * server.h (disable_randomization): Declare.
9005 * server.c (disable_randomization): New global variable.
9006 (handle_general_set): Handle QDisableRandomization.
9007 (handle_query): Likewise for qSupported.
9008 (main): Support --disable-randomization and --no-disable-randomization
9009 command line arguments.
9010 * target.h (struct target_ops): Add supports_disable_randomization.
9011 (target_supports_disable_randomization): New macro.
9012
723b724b
MF
90132011-09-29 Mike Frysinger <vapier@gentoo.org>
9014
9015 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9016 ifdef check.
9017 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9018 [!PT_GETDSBT] (target_loadmap): New definition.
9019 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9020 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9021 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9022 and PT_GETDSBT to LINUX_LOADMAP.
9023 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9024 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9025
55329a5c 90262011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9027
9028 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9029 (arm_linux_hwbp_cap): New static variable.
9030 (arm_linux_get_hwbp_cap): Replace by ...
9031 (arm_linux_init_hwbp_cap): ... this new function.
9032 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9033 (arm_linux_get_hw_watchpoint_count): Likewise.
9034 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9035 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9036 (arm_prepare_to_resume): Use perror_with_name instead of error.
9037
55329a5c 90382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9039
9040 * linux-arm-low.c: Include <signal.h>.
9041 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9042 (struct arm_linux_hwbp_cap): New data type.
9043 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9044 (struct arm_linux_hw_breakpoint): New data type.
9045 (MAX_BPTS, MAX_WPTS): Define.
9046 (struct arch_process_info, struct arch_lwp_info): New data types.
9047 (arm_linux_get_hwbp_cap): New function.
9048 (arm_linux_get_hw_breakpoint_count): Likewise.
9049 (arm_linux_get_hw_watchpoint_count): Likewise.
9050 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9051 (arm_hwbp_control_initialize): Likewise.
9052 (arm_hwbp_control_is_enabled): Likewise.
9053 (arm_hwbp_control_is_initialized): Likewise.
9054 (arm_hwbp_control_disable): Likewise.
9055 (arm_linux_hw_breakpoint_equal): Likewise.
9056 (arm_linux_hw_point_initialize): Likewise.
9057 (struct update_registers_data): New data structure.
9058 (update_registers_callback: New function.
9059 (arm_insert_point): Likewise.
9060 (arm_remove_point): Likewise.
9061 (arm_stopped_by_watchpoint): Likewise.
9062 (arm_stopped_data_address): Likewise.
9063 (arm_new_process): Likewise.
9064 (arm_new_thread): Likewise.
9065 (arm_prepare_to_resume): Likewise.
9066 (the_low_target): Register arm_insert_point, arm_remove_point,
9067 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9068 arm_new_thread, and arm_prepare_to_resume.
9069
6b9801d4
SS
90702011-09-15 Stan Shebs <stan@codesourcery.com>
9071
9072 * server.h (struct emit_ops): Add compare-goto fields.
9073 * tracepoint.c (gdb_agent_op_sizes): New table.
9074 (emit_eq_goto): New function.
9075 (emit_ne_goto): New function.
9076 (emit_lt_goto): New function.
9077 (emit_le_goto): New function.
9078 (emit_gt_goto): New function.
9079 (emit_ge_goto): New function.
9080 (is_goto_target): New function.
9081 (compile_bytecodes): Recognize special cases of compare-goto
9082 combinations and call specialized emitters for them.
9083 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9084 (amd64_emit_ne_goto): New function.
9085 (amd64_emit_lt_goto): New function.
9086 (amd64_emit_le_goto): New function.
9087 (amd64_emit_gt_goto): New function.
9088 (amd64_emit_ge_goto): New function.
9089 (amd64_emit_ops): Add the new functions.
9090 (i386_emit_eq_goto): New function.
9091 (i386_emit_ne_goto): New function.
9092 (i386_emit_lt_goto): New function.
9093 (i386_emit_le_goto): New function.
9094 (i386_emit_gt_goto): New function.
9095 (i386_emit_ge_goto): New function.
9096 (i386_emit_ops): Add the new functions.
9097
bf15cbda
SS
90982011-09-08 Stan Shebs <stan@codesourcery.com>
9099
9100 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9101 (i386_emit_epilogue): Restore %ebx.
9102
943ca1dd
JZ
91032011-08-31 Jie Zhang <jzhang918@gmail.com>
9104
9105 * server.c (step_thread): Remove definition.
9106 (process_serial_event): Don't handle Hs.
9107 * server.h (step_thread): Remove declaration.
9108 * target.c (set_desired_inferior): Remove use of step_thread.
9109
e3deef73
LM
91102011-08-24 Luis Machado <lgustavo@codesourcery.com>
9111
9112 * linux-low.c: Include linux-procfs.h.
9113 (linux_attach_lwp_1): Update comments.
9114 (linux_attach): Scan for existing threads when attaching to a
9115 process that is the tgid.
9116 * Makefile.in: Update dependencies.
9117
13da1c97
LM
91182011-08-24 Luis Machado <lgustavo@codesourcery.com>
9119
9120 * configure.srv: Add linux-procfs.o dependencies.
9121
881127c9
YQ
91222011-08-14 Yao Qi <yao@codesourcery.com>
9123
9124 * target.h (struct target_ops): Fix indent.
9125 * win32-low.c (win32_target_ops): Fix comment.
9126
58dbd541
YQ
91272011-08-14 Andrew Jenner <andrew@codesourcery.com>
9128 Yao Qi <yao@codesourcery.com>
9129
9130 * Makefile.in (clean): Remove tic6x-*.c files.
9131 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9132 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9133 (tic6x-c64xp-linux.c): Likewise.
9134 * configure.srv: Add support for tic6x-*-uclinux.
9135 * linux-tic6x-low.c: New.
9136 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9137
78d85199
YQ
91382011-08-14 Andrew Stubbs <ams@codesourcery.com>
9139 Yao Qi <yao@codesourcery.com>
9140
9141 * target.h (struct target_ops): Add read_loadmap.
9142 * linux-low.c (struct target_loadseg): New type.
9143 (struct target_loadmap): New type.
9144 (linux_read_loadmap): New function.
9145 (linux_target_ops): Add linux_read_loadmap.
9146 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9147 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9148 to NULL.
78d85199 9149
a959a88d
EZ
91502011-08-05 Eli Zaretskii <eliz@gnu.org>
9151
9152 * win32-low.c: Include <stdint.h>.
9153
1ced966e
PA
91542011-07-22 Pedro Alves <pedro@codesourcery.com>
9155
9156 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9157 to the inferior here.
9158 (i386_remove_aligned_watchpoint): Ditto.
9159 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9160 fit part of the watchpoint in the debug registers.
9161 (i386_update_inferior_debug_regs): New.
9162 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9163 registers, and only update the inferior on success.
9164 (i386_low_remove_watchpoint): Ditto.
9165
d26e3629
KY
91662011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9167
9168 * linux-low.c (compare_ints, unique, list_threads, show_process,
9169 linux_core_of_thread): Delete.
9170 (linux_target_ops): Change linux_core_of_thread to
9171 linux_common_core_of_thread.
9172 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9173 * utils.c (malloc_failure): Change type of argument.
9174 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9175 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9176 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9177 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9178 (IPA_OBJS): Add common-utils-ipa.o.
9179 (ptid_h, linux_osdata_h): New macros.
9180 (server_h): Add common/common-utils.h, common/xml-utils.h,
9181 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9182 common/ptid.h.
9183 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9184 ptid.o, buffer.o): New rules.
9185 (linux-low.o): Add common/linux-osdata.h as a dependency.
9186 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9187 * configure.ac: Add AC_HEADER_DIRENT check.
9188 * config.in: Regenerate.
9189 * configure: Regenerate.
9190 * remote-utils.c (xml_escape_text): Delete.
9191 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9192 buffer_xml_printf): Move to common/buffer.c.
9193 * server.c (main): Remove call to initialize_inferiors.
9194 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9195 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9196 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9197 internal_error, gdb_assert, gdb_assert_fail): Delete.
9198 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9199 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9200 common/buffer.h.
9201 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9202 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9203 initialize_inferiors): Delete.
9204
2275a1a7
PA
92052011-07-20 Pedro Alves <pedro@codesourcery.com>
9206
9207 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9208 symbol error.
9209
0a5b1e09
PA
92102011-05-31 Pedro Alves <pedro@codesourcery.com>
9211
9212 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9213 assertion.
9214 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9215
6938fd34
YQ
92162011-05-26 Yao Qi <yao@codesourcery.com>
9217
9218 * Makefile.in (thread-db.o): Track dependence to
9219 common/gdb_thread_db.h.
9220 * thread-db.c: include gdb_thread_db.h from right place.
9221
b481f9e0
TT
92222011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9223
9224 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9225 __FILE__ and __LINE__ to internal_error.
9226
98a5dd13
DE
92272011-05-13 Doug Evans <dje@google.com>
9228
9229 * thread-db.c (try_thread_db_load_from_sdir): New function.
9230 (try_thread_db_load_from_dir): New function.
9231 (thread_db_load_search): Handle $sdir, ignore $pdir.
9232 Remove trying of system directories if search of
9233 libthread-db-search-path fails, that is now done via $sdir.
9234
d248b706
KY
92352011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9236
9237 * server.c (handle_query): Add EnableDisableTracepoints to the list
9238 of supported features.
43aaf8b6 9239 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9240 tracepoints.
43aaf8b6
PA
9241 (cmd_qtenable_disable): New.
9242 (cmd_qtstart): Install tracepoints even if disabled.
9243 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9244 receiving a QTEnable or QTDisable packet.
9245 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9246 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9247 tracepoints.
9248 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9249
84e578fb
DE
92502011-05-10 Doug Evans <dje@google.com>
9251
9252 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9253
71f55dd8
DE
92542011-05-04 Doug Evans <dje@google.com>
9255
9256 * linux-low.c (linux_join): Skip process lookup.
9257 * spu-low.c (spu_join): Ditto.
9258 * server.c (join_inferiors_callback): Delete.
9259 (process_serial_event): For 'D' packet (detach) call join_inferior
9260 directly.
9261
4d393d60
JM
92622011-05-04 Joseph Myers <joseph@codesourcery.com>
9263
9264 * README: Don't mention xscale*-*-linux*.
9265 * configure.srv (xscale*-*-linux*): Don't handle target.
9266
b00ad6ff
NF
92672011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9268
9269 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9270 casting pointers.
9271 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9272 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9273 (i386_emit_void_call_2): Likewise.
9274
af96c192
YQ
92752011-04-26 Yao Qi <yao@codesourcery.com>
9276
43aaf8b6
PA
9277 * linux-low.c: Move common macros to linux-ptrace.h.
9278 Include linux-ptrace.h.
af96c192
YQ
9279 * Makefile.in (linux_ptrace_h): New.
9280 (linux-low.o): Depends on linux-ptrace.h.
9281
03f2bd59
JK
92822011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9283
9284 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9285 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9286 (remote_prepare): New function with most of the TCP code from ...
9287 (remote_open): ... here. Detect PORT here unconditionally. Move also
9288 setting transport_is_reliable.
9289 * server.c (run_once): New variable.
9290 (gdbserver_usage): Document it.
9291 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9292 the first run if RUN_ONCE.
9293 * server.h (run_once, remote_prepare): New declarations.
9294
7a9dd1b2
TT
92952011-04-19 Tom Tromey <tromey@redhat.com>
9296
9297 * win32-low.c (handle_load_dll): Remove duplicate "the".
9298
81239425
PM
92992011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9300
9301 Remove support for old Cygwin 1.5 versions.
9302 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9303 function to avoid warning.
9304 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9305 warning.
9306
9e0627f1
PM
93072011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9308
9309 * gdbserver/server.h (Macro _): Define it if not available.
9310
588eebee
MS
93112011-03-14 Michael Snyder <msnyder@vmware.com>
9312
348af9f7 9313 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9314
43f70d4c
JB
93152011-03-10 Joel Brobecker <brobecker@adacore.com>
9316
9317 * Makefile.in (maintainer-clean realclean distclean): Remove
9318 "make ... subdir_do" command.
9319
348af9f7
MS
93202011-03-10 Michael Snyder <msnyder@vmware.com>
9321
9322 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9323
9324 * server.c (handle_v_run): Free alloced buffer on early return.
9325
e637a4f5
YQ
93262011-03-09 Yao Qi <yao@codesourcery.com>
9327
9328 Revert:
9329 2011-03-04 Yao Qi <yao@codesourcery.com>
9330
9331 * Makefile.in: Remove GNU make feature --directory.
9332
9333 2011-03-05 Yao Qi <yao@codesourcery.com>
9334
9335 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9336 (subdir_do): New make target. Copied from gdb/Makefile.
9337 (maintainer-clean, realclean, distclean, clean): Call corresponding
9338 make targets in common/Makefile.
9339
9340 2011-02-11 Yao Qi <yao@codesourcery.com>
9341
9342 * configure.ac: Call AC_PROG_RANLIB.
9343 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9344 * configure: Regenerate.
9345
e6edda56
JK
93462011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9347
9348 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9349
e5141119
JB
93502011-03-06 Yao Qi <yao@codesourcery.com>
9351
9352 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9353
64794aa4
JB
93542011-03-05 Yao Qi <yao@codesourcery.com>
9355
9356 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9357 (subdir_do): New make target. Copied from gdb/Makefile.
9358 (maintainer-clean, realclean, distclean, clean): Call corresponding
9359 make targets in common/Makefile.
9360
7a762829
YQ
93612011-03-04 Yao Qi <yao@codesourcery.com>
9362
9363 * Makefile.in: Remove GNU make feature --directory.
9364
348af9f7
MS
93652011-03-04 Michael Snyder <msnyder@vmware.com>
9366
9367 * server.c (queue_stop_reply): Call xmalloc not malloc.
9368
93692011-03-02 Michael Snyder <msnyder@vmware.com>
9370
9371 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9372
9f72fee2
MS
93732011-02-28 Michael Snyder <msnyder@vmware.com>
9374
588eebee
MS
9375 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9376 (cmd_qtframe): Ditto.
9377 (cmd_qtbuffer): Ditto.
9378 (cmd_bigqtbuffer): Ditto.
9379
9f72fee2
MS
9380 * utils.c (decimal2str): Initialize 'width' to nine, then
9381 don't mess with it.
9382
8040bd49
UW
93832011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9384
9385 * hostio.c (require_data): Free *data, not data.
9386
7e52cbd0
JK
93872011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9388
9389 * hostio.c (require_data): Use free, not xfree.
9390
9130f83e
MS
93912011-02-27 Michael Snyder <msnyder@vmware.com>
9392
4b812f4e
MS
9393 * server.c (handle_query): Discard unused value.
9394
9130f83e
MS
9395 * hostio.c (require_data): Free malloc memory before returning
9396 error.
9397
69d37113
MS
93982011-02-26 Michael Snyder <msnyder@vmware.com>
9399
9400 * linux-low.c (list_threads): Call closedir for dirent.
9401
35f5825a
MS
94022011-02-27 Michael Snyder <msnyder@vmware.com>
9403
2a589cef
MS
9404 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9405 a case statement falls through.
9406
0adea5f7
MS
9407 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9408
35f5825a
MS
9409 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9410 in comparison.
9411
238f1c74
MS
94122011-02-26 Michael Snyder <msnyder@vmware.com>
9413
9414 * utils.c (decimal2str): Eliminate dead code and dead param.
9415 (pulongest): Drop dead param from call to decimal2str.
9416 (plongest): Ditto.
9417
633ff500
JB
94182011-02-24 Joel Brobecker <brobecker@adacore.com>
9419
9420 Revert the following patch (not approved yet):
9421 2011-02-21 Hui Zhu <teawater@gmail.com>
9422 * tracepoint.c (tp_printf): New function.
9423 (eval_agent_expr): Handle gdb_agent_op_printf.
9424
f9c6ff72
HZ
94252011-02-21 Hui Zhu <teawater@gmail.com>
9426
9427 * tracepoint.c (tp_printf): New function.
9428 (eval_agent_expr): Handle gdb_agent_op_printf.
9429
94d5e490
TT
94302011-02-18 Tom Tromey <tromey@redhat.com>
9431
9432 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9433 (tracepoint.o): Likewise.
9434 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9435 (gdb_agent_op_names): Likewise.
9436
c7f96d2b
TT
94372011-02-18 Tom Tromey <tromey@redhat.com>
9438
9439 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9440 gdb_agent_op_rot>: New constants.
9441 (gdb_agent_op_names): Add pick and roll.
9442 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9443 cases.
9444
0feedb2c
JK
94452011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9446
9447 * aclocal.m4: Regenerated with aclocal-1.11.1.
9448
b3b9301e
PA
94492011-02-14 Pedro Alves <pedro@codesourcery.com>
9450
9451 * server.c (handle_qxfer_traceframe_info): New.
9452 (qxfer_packets): Register "traceframe-info".
9453 (handle_query): Report support for qXfer:traceframe-info:read+.
9454 * tracepoint.c (match_blocktype): New.
9455 (traceframe_find_block_type): Rename to ...
9456 (traceframe_walk_blocks): ... this. Add callback filter argument,
9457 and use it.
9458 (traceframe_find_block_type): New, reimplemented on top of
9459 traceframe_walk_blocks.
9460 (build_traceframe_info_xml): New.
9461 (traceframe_read_info): New.
9462 * server.h (traceframe_read_info): Declare.
9463
4f3e6fb7
YQ
94642011-02-11 Yao Qi <yao@codesourcery.com>
9465
9466 * configure.ac: Call AC_PROG_RANLIB.
9467 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9468 * configure: Regenerate.
9469
764880b7
PA
94702011-02-07 Pedro Alves <pedro@codesourcery.com>
9471
9472 * server.c (gdb_read_memory): Change return semantics to allow
9473 partial transfers.
9474 (handle_search_memory_1): Adjust.
9475 (process_serial_event) <'m' packet>: Handle partial transfers.
9476 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9477
1c79eb8a
PA
94782011-01-28 Pedro Alves <pedro@codesourcery.com>
9479
9480 * regcache.c (init_register_cache): Initialize
9481 regcache->register_status.
9482 (free_register_cache): Release regcache->register_status.
9483 (regcache_cpy): Copy register_status.
9484 (registers_to_string): Print 'x's for unavailable registers.
9485 (supply_register): Mark the register's status valid or
9486 unavailable, depending on whether a buffer was passed in or not.
9487 (supply_register_zeroed): New.
9488 (supply_regblock): Mark the registers' status valid or
9489 unavailable, depending on whether a buffer was passed in or not.
9490 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9491 (struct regcache): New `register_status' field.
9492 (supply_register_zeroed): Declare.
9493 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9494 supply_register_zeroed, rather than passing a NULL buffer to
9495 supply_register.
9496 * tracepoint.c (fetch_traceframe_registers): Update comment.
9497
85724a0e
PA
94982011-01-28 Pedro Alves <pedro@codesourcery.com>
9499
9500 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9501 buffer explicit.
9502
d08aafef
PA
95032011-01-25 Pedro Alves <pedro@codesourcery.com>
9504
9505 * server.h (decode_xfer_write): Change prototype.
9506 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9507 and don't extract the annex here.
9508 * server.c (decode_xfer_read): Remove `annex' parameter,
9509 and don't extract the annex here.
9510 (decode_xfer): New.
9511 (struct qxfer): New.
9512 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9513 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9514 (handle_qxfer_statictrace): New functions, abstracted out from
9515 handle_query, and made to use the struct qxfer interface.
9516 (handle_threads_qxfer_proper): Rename to ...
9517 (handle_qxfer_threads_proper): ... this.
9518 (handle_threads_qxfer): Rename to ...
9519 (handle_qxfer_threads): ... this. Adjust.
9520 (qxfer_packets): New array.
9521 (handle_qxfer): New function.
9522 (handle_query): Use handle_qxfer.
9523
493e2a69
MS
95242011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9525
9526 * gdbreplay.c: Shorten lines of >= 80 columns.
9527 * linux-low.c: Ditto.
9528 * linux-ppc-low.c: Ditto.
9529 * linux-s390-low.c: Ditto.
9530 * linux-sparc-low.c: Ditto.
9531 * linux-x86-low.c: Ditto.
9532 * linux-xtensa-low.c: Ditto.
9533 * mem-break.c: Ditto.
9534 * nto-low.c: Ditto.
9535 * regcache.h: Ditto.
9536 * remote-utils.c: Ditto.
9537 * server.c: Ditto.
9538 * server.h: Ditto.
9539 * thread-db.c: Ditto.
9540 * tracepoint.c: Ditto.
9541 * utils.c: Ditto.
9542 * win32-low.h: Ditto.
9543
44944448
JB
95442011-01-05 Joel Brobecker <brobecker@adacore.com>
9545
9546 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9547 update.
9548
71ce852c
JB
95492011-01-01 Joel Brobecker <brobecker@adacore.com>
9550
9551 * server.c (gdbserver_version): Update copyright year in version
9552 output.
9553 * gdbreplay.c (gdbreplay_version): Ditto.
9554
eb826dc6
MF
95552010-12-29 Jie Zhang <jie.zhang@analog.com>
9556
9557 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9558 * linux-bfin-low.c: New file.
9559 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9560 PT_DATA_ADDR for BFIN targets.
9561 * Makefile.in (SFILES): Add linux-bfin-low.c.
9562 (clean): Remove reg-bfin.c.
9563 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9564 * README: Mention supported Blackfin targets.
9565
39ab222a
MF
95662010-12-23 Mike Frysinger <vapier@gentoo.org>
9567
9568 * .gitignore: New file.
9569
a1f2ce7d
MF
95702010-11-16 Mike Frysinger <vapier@gentoo.org>
9571
9572 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9573
f474844c
JZ
95742010-10-22 Jie Zhang <jie@codesourcery.com>
9575
9576 * Makefile.in: Add FLAGS_TO_PASS variable.
9577 (install): Remove dependency of install-only and recursively
9578 invoke make for install-only.
9579
f1048712
DE
95802010-10-04 Doug Evans <dje@google.com>
9581
9582 * Makefile.in (uninstall): Use $(DESTDIR).
9583
b53a1623
PA
95842010-09-24 Pedro Alves <pedro@codesourcery.com>
9585
e6ee044d
PA
9586 PR gdb/11842
9587
b53a1623
PA
9588 * linux-x86-low.c (compat_siginfo_from_siginfo)
9589 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9590 si_code is < 0. Check for si_code == SI_TIMER before checking for
9591 si_code < 0.
9592
fa1bd1e4
JB
95932010-09-13 Joel Brobecker <brobecker@adacore.com>
9594
9595 * lynx-i386-low.c: New file.
9596 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9597
47fac8f8
JB
95982010-09-13 Joel Brobecker <brobecker@adacore.com>
9599
9600 * lynx-low.c (ptrace_request_to_str): Remove handling for
9601 request values that have been removed in LynxOS 5.x.
9602
1adfc54d
JB
96032010-09-13 Joel Brobecker <brobecker@adacore.com>
9604
9605 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9606 <ptrace.h>
9607
c2a66c29
NS
96082010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9609
9610 * configure.ac: Add --enable-inprocess-agent option.
9611 * configure: Rebuilt.
9612
32fcada3
YQ
96132010-09-06 Yao Qi <yao@codesourcery.com>
9614
9615 * linux-low.c (linux_kill): Remove unused variable.
9616 (linux_stabilize_threads): Likewise.
9617 * server.c (start_inferior): Likewise.
9618 (queue_stop_reply_callback): Likewise.
9619 * tracepoint.c (do_action_at_tracepoint): Likewise.
9620
0cccb683
YQ
96212010-09-06 Yao Qi <yao@codesourcery.com>
9622
9623 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9624 on return.
9625
423ec54c
JK
96262010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9627
9628 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9629
12ac6819
PA
96302010-09-06 Pedro Alves <pedro@codesourcery.com>
9631
9632 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9633 "$(IPA_DEPFILES)".
9634
8ed54b31
JB
96352010-09-01 Joel Brobecker <brobecker@adacore.com>
9636
9637 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9638 gdbserver/lynx-ppc-low.c: New files.
9639 * Makefile.in (lynx_low_h): New variable.
9640 (lynx-low.o, lynx-ppc-low.o): New rules.
9641 * configure.ac: On LynxOS, link with -lnetinet.
9642 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9643 * configure: regenerate.
9644
bb0116a4
JB
96452010-09-01 Joel Brobecker <brobecker@adacore.com>
9646
9647 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9648 * configure.ac: Add check for vasprintf and vsnprintf.
9649 * configure, config.in: Regenerate.
9650 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9651
a778ab81 96522010-09-01 Joel Brobecker <brobecker@adacore.com>
9653
9654 * gdbreplay.c: Move include of alloca.h up, next to include of
9655 malloc.h.
9656 * server.h: Add include of malloc.h.
9657 * mem-break.c: Remove include of malloc.h.
9658 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9659
8b034a19 96602010-09-01 Joel Brobecker <brobecker@adacore.com>
9661
9662 * Makefile.in (memmem.o): Build with -Wno-error.
9663
96642010-09-01 Joel Brobecker <brobecker@adacore.com>
9665
9666 * utils.c (xsnprintf): Make non-static.
9667 * server.h: Add xsnprintf declaration.
9668 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9669 replace calls to snprintf by calls to xsnprintf throughout.
9670
96712010-09-01 Joel Brobecker <brobecker@adacore.com>
9672
9673 * configure.ac: Add configure check for alloca.
9674 * configure, config.in: Regenerate.
9675 * server.h: Include alloca.h if it exists.
9676 * gdbreplay.c: Include alloca.h if it exists.
9677
1a981360
PA
96782010-08-28 Pedro Alves <pedro@codesourcery.com>
9679
9680 * linux-low.c (__SIGRTMIN): Define if not already defined.
9681 (linux_create_inferior): Check for __ANDROID__ rather than
9682 __SIGRTMIN.
9683 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9684 are already deferred.
9685 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9686 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9687 stopped and already has a pending signal to report.
9688 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9689 a pending signal to report or is moving out of a jump pad.
9690 (linux_init_signals): Check for __ANDROID__ rather than
9691 __SIGRTMIN.
9692
b4d51a55
PA
96932010-08-28 Pedro Alves <pedro@codesourcery.com>
9694
9695 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9696 debug_threads check. Avoid a linear search when not doing debug
9697 output.
9698
ec48365d
PA
96992010-08-27 Pedro Alves <pedro@codesourcery.com>
9700
9701 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9702 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9703 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9704 (process_event): Change local fd's type to gdb_fildes_t.
9705 (create_file_handler): Adjust prototype.
9706 (delete_file_handler): Adjust prototype.
9707 (handle_file_event): Adjust prototype. Use pfildes.
9708 (create_file_event): Adjsut prototype.
9709 * remote-utils.c (remote_desc, listen_desc): Change type to
9710 gdb_fildes_t.
9711 * server.h: New gdb_fildes_t typedef.
9712 [USE_WIN32API]: Include winsock2.h.
9713 (delete_file_handler, add_file_handler): Adjust prototypes.
9714 (pfildes): Declare.
9715 * utils.c (pfildes): New.
9716
854d88f0
PA
97172010-08-27 Pedro Alves <pedro@codesourcery.com>
9718
9719 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9720 * configure: Regenerate.
9721
0146f85b
PA
97222010-08-27 Pedro Alves <pedro@codesourcery.com>
9723
9724 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9725 (linux_done_accessing_memory): ... this.
9726 (linux_target_ops): Adjust.
9727 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9728 * nto-low.c (nto_target_ops): Adjust comment.
9729 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9730 * spu-low.c (spu_target_ops): Adjust comment.
9731 * target.h (target_ops): Rename unprepare_to_access_memory field
9732 to done_accessing_memory.
9733 (unprepare_to_access_memory): Rename to ...
9734 (done_accessing_memory): ... this.
9735
90d74c30
PA
97362010-08-26 Pedro Alves <pedro@codesourcery.com>
9737
9738 * linux-low.c (linux_prepare_to_access_memory): New.
9739 (linux_unprepare_to_access_memory): New.
9740 (linux_target_ops): Install them.
9741 * server.c (read_memory): Rename to ...
9742 (gdb_read_memory): ... this. Use
9743 prepare_to_access_memory/prepare_to_access_memory.
9744 (write_memory): Rename to ...
9745 (gdb_write_memory): ... this. Use
9746 prepare_to_access_memory/prepare_to_access_memory.
9747 (handle_search_memory_1): Adjust.
9748 (process_serial_event): Adjust.
9749 * target.h (struct target_ops): New fields
9750 prepare_to_access_memory and unprepare_to_access_memory.
9751 (prepare_to_access_memory, unprepare_to_access_memory): New.
9752 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9753 prepare_to_access_memory/prepare_to_access_memory.
9754 * nto-low.c (nto_target_ops): Adjust.
9755 * spu-low.c (spu_target_ops): Adjust.
9756 * win32-low.c (win32_target_ops): Adjust.
9757
fd467969
PA
97582010-08-26 Pedro Alves <pedro@codesourcery.com>
9759
9760 * Makefile.in (WARN_CFLAGS): Get it from configure.
9761 (WERROR_CFLAGS): New.
9762 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9763 * configure.ac: Introduce --enable-werror, which adds -Werror to
9764 the compiler command line. Enabled by default. Disable with
9765 --disable-werror. Add -Wdeclaration-after-statement
9766 Wpointer-arith and -Wformat-nonliteral to warning flags.
9767 * configure: Regenerate.
9768
331e2f5f
PA
97692010-08-26 Pedro Alves <pedro@codesourcery.com>
9770
9771 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9772
e581f2b4
PA
97732010-08-26 Pedro Alves <pedro@codesourcery.com>
9774
9775 * gdbreplay.c (remote_error): New.
9776 (gdbchar): New.
9777 (expect): Use gdbchar. Check for error reading from GDB.
9778 Clarify sync error output.
9779 (play): Check for errors writing to GDB.
9780 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9781 * remote-utils.c (getpkt): Check for errors writing to the remote
9782 descriptor.
9783
3c11dd79
PA
97842010-08-25 Pedro Alves <pedro@codesourcery.com>
9785
9786 * linux-low.c (linux_wait_1): Move non-debugging code out of
9787 `debug_threads' control.
9788
d20a8ad9
PA
97892010-08-25 Pedro Alves <pedro@codesourcery.com>
9790
9791 * linux-low.c (linux_wait_1): Don't set last_status here.
9792 * server.c (push_event, queue_stop_reply_callback): Assert we're
9793 not pushing a TARGET_WAITKIND_IGNORE event.
9794 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9795 (myresume, handle_target_event): Set the thread's last_resume_kind
9796 and last_status from the target returned status.
9797
964e4306
PA
97982010-08-25 Pedro Alves <pedro@codesourcery.com>
9799
9800 PR threads/10729
9801
9802 * linux-x86-low.c (update_debug_registers_callback): New.
9803 (i386_dr_low_set_addr): Use it.
9804 (i386_dr_low_get_addr): New.
9805 (i386_dr_low_set_control): Use update_debug_registers_callback.
9806 (i386_dr_low_get_control): New.
9807 (i386_dr_low_get_status): Adjust.
9808 * linux-low.c (linux_stop_lwp): New.
9809 * linux-low.h (linux_stop_lwp): Declare.
9810
9811 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9812 argument instead of a i386_debug_reg_state.
9813 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9814 a i386_debug_reg_state.
9815 (i386_insert_aligned_watchpoint): Adjust.
9816 (i386_remove_aligned_watchpoint): Adjust.
9817 (i386_low_stopped_data_address): Read the debug registers from the
9818 inferior instead of from the mirrors.
9819 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9820 (i386_dr_low_get_addr): Declare.
9821 (i386_dr_low_get_control): Declare.
9822 (i386_dr_low_get_status): Change prototype.
9823
9824 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9825 (i386_dr_low_get_addr): New.
9826 (i386_dr_low_get_control): New.
9827 (i386_dr_low_get_status): Adjust prototype. Return
9828 dr_status_mirror.
9829 (i386_initial_stuff): Clear dr_status_mirror and
9830 dr_control_mirror.
9831 (i386_get_thread_context): Adjust.
9832 (i386_set_thread_context): Adjust.
9833 (i386_thread_added): Adjust.
9834
5f21a75b
PA
98352010-08-24 Pedro Alves <pedro@codesourcery.com>
9836
9837 * linux-low.h (linux_thread_area): Delete declaration.
9838
3e4c1235
TS
98392010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9840
9841 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9842 after its termination.
9843
1971b033
PA
98442010-08-09 Pedro Alves <pedro@codesourcery.com>
9845
9846 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9847 (gdb_wants_all_stopped): Delete.
9848 (linux_wait_1): Don't call them.
9849 * server.c (handle_v_cont): Tag all threads as want-stopped.
9850 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9851 stopped as "client-wants-stopped".
9852
310444ac
PA
98532010-07-31 Pedro Alves <pedro@codesourcery.com>
9854
9855 * Makefile.in (signals_h): New.
9856 (server_h): Depend on it.
9857 (server.o): Don't depend on $(signals_def).
9858 (signals.o): Depend on $(signals_def).
9859
a19cae16
JK
98602010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9861
9862 * Makefile.in (signals_def): New.
9863 (server_h): Append include/gdb/signals.h and signals_def.
9864 (server.o): Append signals_def.
9865
30d50328
JK
98662010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9867
9868 * server.c (handle_target_event): Use target_signal_to_host for
9869 resume_info.sig initialization.
9870 * target.h (struct thread_resume) <sig>: New comment.
9871
5c3216e2
OS
98722010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9873
c6f46ca0
OS
9874 * server.c (handle_query): strcpy() the returned string from paddress()
9875 instead of sprintf().
5c3216e2
OS
9876 * utils.c (paddress): Return phex_nz().
9877
6bd31874
JB
98782010-07-07 Joel Brobecker <brobecker@adacore.com>
9879
9880 * server.c (handle_v_cont): Call mourn_inferior if process
9881 just exited.
9882 (myresume): Likewise.
9883
0fb4aa4b
PA
98842010-07-01 Pedro Alves <pedro@codesourcery.com>
9885
9886 Static tracepoints, and integration with UST.
9887
9888 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9889 * mem-break.c (uninsert_all_breakpoints)
9890 (reinsert_all_breakpoints): New.
9891 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9892 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9893 (gdb_agent_ust_loaded, helper_thread_id)
9894 (gdb_agent_helper_thread_id): New macros.
9895 (struct ipa_sym_addresses): Add addr_ust_loaded,
9896 addr_helper_thread_id, addr_cmd_buf.
9897 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9898 (in_process_agent_loaded_ust): New.
9899 (write_e_ust_not_loaded): New.
9900 (maybe_write_ipa_ust_not_loaded): New.
9901 (struct collect_static_trace_data_action): New.
9902 (enum tracepoint_type) <static_tracepoint>: New.
9903 (struct tracepoint) <handle>: Mention static tracepoints.
9904 (struct static_tracepoint_ctx): New.
9905 (CMD_BUF_SIZE): New.
9906 (add_tracepoint_action): Handle static tracepoint actions.
9907 (unprobe_marker_at): New.
9908 (clear_installed_tracepoints): Handle static tracepoints.
9909 (cmd_qtdp): Handle static tracepoints.
9910 (probe_marker_at): New.
9911 (cmd_qtstart): Handle static tracepoints.
9912 (response_tracepoint): Handle static tracepoints.
9913 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9914 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9915 (get_context_regcache): Handle static tracepoints.
9916 (do_action_at_tracepoint): Handle static tracepoint actions.
9917 (traceframe_find_block_type): Handle static trace data blocks.
9918 (traceframe_read_sdata): New.
9919 (download_tracepoints): Download static tracepoint actions.
9920 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9921 (GDB_PROBE_NAME): New.
9922 (ust_ops): New.
9923 (GET_UST_SYM): New.
9924 (USTF): New.
9925 (dlsym_ust): New.
9926 (ust_marker_to_static_tracepoint): New.
9927 (gdb_probe): New.
9928 (collect_ust_data_at_tracepoint): New.
9929 (gdb_ust_probe): New.
9930 (UNIX_PATH_MAX, SOCK_DIR): New.
9931 (gdb_ust_connect_sync_socket): New.
9932 (resume_thread, stop_thread): New.
9933 (run_inferior_command): New.
9934 (init_named_socket): New.
9935 (gdb_ust_socket_init): New.
9936 (cstr_to_hexstr): New.
9937 (next_st): New.
9938 (first_marker, next_marker): New.
9939 (response_ust_marker): New.
9940 (cmd_qtfstm, cmd_qtsstm): New.
9941 (unprobe_marker_at, probe_marker_at): New.
9942 (cmd_qtstmat, gdb_ust_thread): New.
9943 (gdb_ust_init): New.
9944 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9945 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9946 (ST_REGENTRY): New.
9947 (x86_64_st_collect_regmap): New.
9948 (X86_64_NUM_ST_COLLECT_GREGS): New.
9949 (AMD64_RIP_REGNUM): New.
9950 (supply_static_tracepoint_registers): New.
9951 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9952 (ST_REGENTRY): New.
9953 (i386_st_collect_regmap): New.
9954 (i386_NUM_ST_COLLECT_GREGS): New.
9955 (supply_static_tracepoint_registers): New.
9956 * server.c (handle_query): Handle qXfer:statictrace:read.
9957 <qSupported>: Report support for StaticTracepoints, and
9958 qXfer:statictrace:read features.
9959 * server.h (traceframe_read_sdata)
9960 (supply_static_tracepoint_registers): Declare.
9961 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9962 (unpack_varlen_hex): Include in IPA build.
9963 * Makefile.in (ustlibs, ustinc): New.
9964 (IPA_OBJS): Add remote-utils-ipa.o.
9965 ($(IPA_LIB)): Link -ldl and -lpthread.
9966 (UST_CFLAGS): New.
9967 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9968 * config.in, configure: Regenerate.
9969
9e4344e5
PA
99702010-06-20 Ian Lance Taylor <iant@google.com>
9971 Pedro Alves <pedro@codesourcery.com>
9972
9973 * linux-x86-low.c (always_true): Delete.
9974 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9975 trying to fool the compiler with always_true.
9976
c6beb2cb
PA
99772010-06-20 Pedro Alves <pedro@codesourcery.com>
9978
9979 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9980 conditions in gdbserver.
9981
d2ed6730
UW
99822010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9983
9984 * spu-low.c (spu_read_memory): Wrap around local store limit.
9985 (spu_write_memory): Likewise.
9986
4e29fb54
PA
99872010-06-15 Pedro Alves <pedro@codesourcery.com>
9988
9989 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9990 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9991 LONGEST uses.
9992 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9993 uses.
9994 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9995 uses with LONGEST uses.
9996
6a271cae
PA
99972010-06-14 Stan Shebs <stan@codesourcery.com>
9998 Pedro Alves <pedro@codesourcery.com>
9999
10000 Bytecode compiler.
10001
10002 * linux-x86-low.c: Include limits.h.
10003 (add_insns): New.
10004 (always_true): New.
10005 (EMIT_ASM): New.
10006 (EMIT_ASM32): New.
10007 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10008 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10009 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10010 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10011 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10012 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10013 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10014 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10015 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10016 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10017 (amd64_emit_void_call_2): New.
10018 (amd64_emit_ops): New.
10019 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10020 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10021 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10022 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10023 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10024 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10025 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10026 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10027 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10028 (i386_emit_stack_adjust, i386_emit_int_call_1)
10029 (i386_emit_void_call_2): New.
10030 (i386_emit_ops): New.
10031 (x86_emit_ops): New.
10032 (the_low_target): Install x86_emit_ops.
10033 * server.h (struct emit_ops): New.
10034 (get_raw_reg_func_addr): Declare.
10035 (current_insn_ptr, emit_error): Declare.
10036 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10037 (set_trace_state_variable_value): New defines.
10038 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10039 addr_get_trace_state_variable_value and
10040 addr_set_trace_state_variable_value.
10041 (symbol_list): New fields for get_raw_reg,
10042 get_trace_state_variable_value and set_trace_state_variable_value.
10043 (condfn): New typedef.
10044 (struct tracepoint): New field `compiled_cond'.
10045 (do_action_at_tracepoint): Clear compiled_cond.
10046 (get_trace_state_variable_value, set_trace_state_variable_value):
10047 Export in the IPA.
10048 (condition_true_at_tracepoint): If there's a compiled condition,
10049 run that.
10050 (current_insn_ptr, emit_error): New globals.
10051 (struct bytecode_address): New.
10052 (get_raw_reg_func_addr): New.
10053 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10054 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10055 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10056 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10057 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10058 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10059 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10060 (compile_tracepoint_condition, compile_bytecodes): New.
10061 * target.h (emit_ops): Forward declare.
10062 (struct target_ops): New field emit_ops.
10063 (target_emit_ops): New.
10064 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10065 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10066 * linux-low.c (linux_emit_ops): New.
10067 (linux_target_ops): Install it.
10068 * linux-low.h (struct linux_target_ops): New field emit_ops.
10069
92b72907
UW
100702010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10071
10072 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10073 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10074
fa593d66
PA
100752010-06-01 Pedro Alves <pedro@codesourcery.com>
10076 Stan Shebs <stan@codesourcery.com>
10077
10078 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10079 (all): Depend on $(extra_libraries).
10080 (install-only): Install the IPA.
10081 (IPA_OBJS, IPA_LIB): New.
10082 (clean): Remove the IPA lib.
10083 (IPAGENT_CFLAGS): New.
10084 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10085 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10086 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10087 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10088 * configure.ac: Check for atomic builtins support in the compiler.
10089 (IPA_DEPFILES, extra_libraries): Define.
10090 * configure.srv (ipa_obj): Add description.
10091 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10092 (i[34567]86-*-linux*): Set ipa_obj.
10093 (x86_64-*-linux*): Set ipa_obj.
10094 * linux-low.c (stabilizing_threads): New.
10095 (supports_fast_tracepoints): New.
10096 (linux_detach): Stabilize threads before detaching.
10097 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10098 the lwp is either not stabilizing, or is moving out of a jump pad.
10099 (linux_fast_tracepoint_collecting): New.
10100 (maybe_move_out_of_jump_pad): New.
10101 (enqueue_one_deferred_signal): New.
10102 (dequeue_one_deferred_signal): New.
10103 (linux_wait_for_event_1): If moving out of a jump pad, defer
10104 pending signals to later.
10105 (linux_stabilize_threads): New.
10106 (linux_wait_1): Check if threads need moving out of jump pads, and
10107 do it if so.
10108 (stuck_in_jump_pad_callback): New.
10109 (move_out_of_jump_pad_callback): New.
10110 (lwp_running): New.
10111 (linux_resume_one_lwp): Handle moving out of jump pads.
10112 (linux_set_resume_request): Dequeue deferred signals.
10113 (need_step_over_p): Also step over fast tracepoint jumps.
10114 (start_step_over): Also uninsert fast tracepoint jumps.
10115 (finish_step_over): Also reinsert fast tracepoint jumps.
10116 (linux_install_fast_tracepoint_jump): New.
10117 (linux_target_ops): Install linux_stabilize_threads and
10118 linux_install_fast_tracepoint_jump_pad.
10119 * linux-low.h (linux_target_ops) <get_thread_area,
10120 install_fast_tracepoint_jump_pad>: New fields.
10121 (struct lwp_info) <collecting_fast_tracepoint,
10122 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10123 (linux_get_thread_area): Declare.
10124 * linux-x86-low.c (jump_insn): New.
10125 (x86_get_thread_area): New.
10126 (append_insns): New.
10127 (push_opcode): New.
10128 (amd64_install_fast_tracepoint_jump_pad): New.
10129 (i386_install_fast_tracepoint_jump_pad): New.
10130 (x86_install_fast_tracepoint_jump_pad): New.
10131 (the_low_target): Install x86_get_thread_area and
10132 x86_install_fast_tracepoint_jump_pad.
10133 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10134 (struct fast_tracepoint_jump): New.
10135 (fast_tracepoint_jump_insn): New.
10136 (fast_tracepoint_jump_shadow): New.
10137 (find_fast_tracepoint_jump_at): New.
10138 (fast_tracepoint_jump_here): New.
10139 (delete_fast_tracepoint_jump): New.
10140 (set_fast_tracepoint_jump): New.
10141 (uninsert_fast_tracepoint_jumps_at): New.
10142 (reinsert_fast_tracepoint_jumps_at): New.
10143 (set_breakpoint_at): Use write_inferior_memory.
10144 (uninsert_raw_breakpoint): Use write_inferior_memory.
10145 (check_mem_read): Mask out fast tracepoint jumps.
10146 (check_mem_write): Mask out fast tracepoint jumps.
10147 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10148 (set_fast_tracepoint_jump): Declare.
10149 (delete_fast_tracepoint_jump)
10150 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10151 (reinsert_fast_tracepoint_jumps_at): Declare.
10152 * regcache.c: Don't compile many functions when building the
10153 in-process agent library.
10154 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10155 the register buffer in the heap.
10156 (free_register_cache): If the register buffer isn't owned by the
10157 regcache, don't free it.
10158 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10159 pre-existing register caches.
10160 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10161 type.
10162 (convert_ascii_to_int): : Constify `from' parameter type.
10163 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10164 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10165 the needed buffer in-place.
10166 (relocate_instruction): New.
10167 * server.c (handle_query) <qSymbols>: If the target supports
10168 tracepoints, give it a chance of looking up symbols. Report
10169 support for fast tracepoints.
10170 (handle_status): Stabilize threads.
10171 (process_serial_event): Adjust.
10172 * server.h (struct fast_tracepoint_jump): Forward declare.
10173 (struct process_info) <fast_tracepoint_jumps>: New field.
10174 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10175 (decode_X_packet, decode_M_packet): Adjust.
10176 (relocate_instruction): Declare.
10177 (in_process_agent_loaded): Declare.
10178 (tracepoint_look_up_symbols): Declare.
10179 (struct fast_tpoint_collect_status): Declare.
10180 (fast_tracepoint_collecting): Declare.
10181 (force_unlock_trace_buffer): Declare.
10182 (handle_tracepoint_bkpts): Declare.
10183 (initialize_low_tracepoint)
10184 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10185 * target.h (struct target_ops) <stabilize_threads,
10186 install_fast_tracepoint_jump_pad>: New fields.
10187 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10188 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10189 [HAVE_STDINT_H]: Include stdint.h.
10190 (trace_debug_1): Rename to ...
10191 (trace_vdebug): ... this.
10192 (trace_debug): Rename to ...
10193 (trace_debug_1): ... this. Add `level' parameter.
10194 (trace_debug): New.
10195 (ATTR_USED, ATTR_NOINLINE): New.
10196 (IP_AGENT_EXPORT): New.
10197 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10198 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10199 (about_to_request_buffer_space, trace_buffer_is_full)
10200 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10201 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10202 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10203 (traceframe_write_count, traceframes_created)
10204 (trace_state_variables)
10205 New renaming defines.
10206 (struct ipa_sym_addresses): New.
10207 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10208 (symbol_list): New.
10209 (ipa_sym_addrs): New.
10210 (all_tracepoint_symbols_looked_up): New.
10211 (in_process_agent_loaded): New.
10212 (write_e_ipa_not_loaded): New.
10213 (maybe_write_ipa_not_loaded): New.
10214 (tracepoint_look_up_symbols): New.
10215 (debug_threads) [IN_PROCESS_AGENT]: New.
10216 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10217 (UNKNOWN_SIDE_EFFECTS): New.
10218 (stop_tracing): New.
10219 (flush_trace_buffer): New.
10220 (stop_tracing_bkpt): New.
10221 (flush_trace_buffer_bkpt): New.
10222 (read_inferior_integer): New.
10223 (read_inferior_uinteger): New.
10224 (read_inferior_data_pointer): New.
10225 (write_inferior_data_pointer): New.
10226 (write_inferior_integer): New.
10227 (write_inferior_uinteger): New.
10228 (struct collect_static_trace_data_action): Delete.
10229 (enum tracepoint_type): New.
10230 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10231 <actions_str, step_actions, step_actions_str>: Only include in
10232 GDBserver.
fa593d66
PA
10233 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10234 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10235 (tracepoints): Use IP_AGENT_EXPORT.
10236 (last_tracepoint): Don't include in the IPA.
10237 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10238 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10239 (alloced_trace_state_variables): New.
10240 (trace_state_variables): Use IP_AGENT_EXPORT.
10241 (traceframe_t): Delete unused variable.
10242 (circular_trace_buffer): Don't include in the IPA.
10243 (trace_buffer_start): Delete.
10244 (struct trace_buffer_control): New.
10245 (trace_buffer_free): Delete.
10246 (struct ipa_trace_buffer_control): New.
10247 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10248 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10249 New.
10250 (trace_buffer_ctrl): New.
10251 (TRACE_BUFFER_CTRL_CURR): New.
10252 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10253 Reimplement as macros.
10254 (trace_buffer_wrap): Delete.
10255 (traceframe_write_count, traceframe_read_count)
10256 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10257 (struct tracepoint_hit_ctx) <type>: New field.
10258 (struct fast_tracepoint_ctx): New.
10259 (memory_barrier): New.
10260 (cmpxchg): New.
10261 (record_tracepoint_error): Update atomically in the IPA.
10262 (clear_inferior_trace_buffer): New.
10263 (about_to_request_buffer_space): New.
10264 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10265 updating the same buffer.
10266 (add_tracepoint): Default the tracepoint's type to trap
10267 tracepoint, and orig_size to -1.
10268 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10269 internal variables.
10270 (create_trace_state_variable): New parameter `gdb'. Handle it.
10271 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10272 (cmd_qtdp): Handle fast tracepoints.
10273 (cmd_qtdv): Adjust.
10274 (max_jump_pad_size): New.
10275 (gdb_jump_pad_head): New.
10276 (get_jump_space_head): New.
10277 (claim_jump_space): New.
10278 (sort_tracepoints): New.
10279 (MAX_JUMP_SIZE): New.
10280 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10281 IPA.
10282 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10283 support. Upload fast traceframes, and delete internal IPA
10284 breakpoints.
10285 (stop_tracing_handler): New.
10286 (flush_trace_buffer_handler): New.
10287 (cmd_qtstop): Upload fast tracepoints.
10288 (response_tracepoint): Handle fast tracepoints.
10289 (tracepoint_finished_step): Upload fast traceframes. Set the
10290 tracepoint hit context's tracepoint type.
10291 (handle_tracepoint_bkpts): New.
10292 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10293 type. Add comment about fast tracepoints.
10294 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10295 non-existing action_str field.
10296 (get_context_regcache): Handle fast tracepoints.
10297 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10298 to the regcache.
10299 (fast_tracepoint_from_jump_pad_address): New.
10300 (fast_tracepoint_from_ipa_tpoint_address): New.
10301 (collecting_t): New.
10302 (force_unlock_trace_buffer): New.
10303 (fast_tracepoint_collecting): New.
10304 (collecting): New.
10305 (gdb_collect): New.
10306 (write_inferior_data_ptr): New.
10307 (target_tp_heap): New.
10308 (target_malloc): New.
10309 (download_agent_expr): New.
10310 (UALIGN): New.
10311 (download_tracepoints): New.
10312 (download_trace_state_variables): New.
10313 (upload_fast_traceframes): New.
10314 (IPA_FIRST_TRACEFRAME): New.
10315 (IPA_NEXT_TRACEFRAME_1): New.
10316 (IPA_NEXT_TRACEFRAME): New.
10317 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10318 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10319 (gdb_jump_pad_buffer_end): New.
10320 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10321 (initialize_tracepoint): Adjust.
10322 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10323 buffer. Initialize the low module.
10324 * utils.c (PREFIX, TOOLNAME): New.
10325 (malloc_failure): Use PREFIX.
10326 (error): In the IPA, an error causes an exit.
10327 (fatal, warning): Use PREFIX.
10328 (internal_error): Use TOOLNAME.
10329 (NUMCELLS): Increase to 10.
10330 * configure, config.in: Regenerate.
10331
d149dd1d
PA
103322010-06-01 Pedro Alves <pedro@codesourcery.com>
10333
10334 * server.c (handle_query) <qSupported>: Do two passes over the
10335 qSupported string to avoid nesting strtok.
10336
f6528abd
JK
103372010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10338
10339 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10340 (CDEPS): New.
10341 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10342 -Wl,--dynamic-list.
10343 * configure: Regenerate.
10344 * proc-service.list: New.
10345
ca2a87a0
JK
103462010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10347
10348 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10349 New comment.
10350
363a6e9f
OS
103512010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10352
10353 * gdbreplay.c (remote_open): Check error return from socket() call by
10354 its equality to -1 not by it being negative.
10355 * remote-utils.c (remote_open): Likewise.
10356
d23b6cb1
PA
103572010-05-23 Pedro Alves <pedro@codesourcery.com>
10358
10359 * config.h: Regenerate.
10360
28d3cf85
MK
103612010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10362
10363 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10364 doesn't provide PTRACE_GET_THREAD_AREA.
10365
fea36a59
MK
103662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10367
10368 * linux-m68k-low.c: Include <asm/ptrace.h>
10369 (ps_get_thread_area): Implement.
10370
24b066ba
DE
103712010-05-03 Doug Evans <dje@google.com>
10372
10373 * event-loop.c (struct callback_event): New struct.
10374 (callback_list): New global.
10375 (append_callback_event, delete_callback_event): New functions.
10376 (process_callback): New function.
10377 (start_event_loop): Call it.
10378 * remote-utils.c (NOT_SCHEDULED): Define.
10379 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10380 moved out of readchar.
10381 (readchar): Rewrite. Call reschedule before returning.
10382 (reset_readchar): New function.
10383 (remote_close): Call it.
10384 (process_remaining, reschedule): New functions.
10385 * server.h (callback_handler_func): New typedef.
10386 (append_callback_event, delete_callback_event): Declare.
10387
9836d6ea
PA
103882010-05-03 Pedro Alves <pedro@codesourcery.com>
10389
10390 * proc-service.c (ps_pglobal_lookup): Use
10391 thread_db_look_up_one_symbol.
10392 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10393 parameter. Use it instead of all_symbols_looked_up.
10394 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10395 field.
10396 (all_symbols_looked_up): Don't declare.
10397 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10398 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10399 field.
10400 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10401 Set all_symbols_looked_up here.
10402 (thread_db_look_up_one_symbol): New.
10403 (thread_db_get_tls_address): Adjust.
10404 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10405 thread_db object on the heap, and tentatively set it in the
10406 process structure.
10407 (thread_db_init): Don't set all_symbols_looked_up here.
10408 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10409
7984d532
PA
104102010-05-03 Pedro Alves <pedro@codesourcery.com>
10411
10412 * linux-low.c (linux_kill, linux_detach): Adjust.
10413 (status_pending_p_callback): Remove redundant statement. Check
10414 for !TARGET_WAITIKIND_IGNORE, instead of
10415 TARGET_WAITKIND_STOPPED.
10416 (handle_tracepoints): Make sure LWP is locked. Adjust.
10417 (linux_wait_for_event_1): Adjust.
10418 (linux_cancel_breakpoints): New.
10419 (unsuspend_one_lwp): New.
10420 (unsuspend_all_lwps): New.
10421 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10422 (send_sigstop_callback): Change return type to int, add new
10423 `except' parameter and handle it.
10424 (suspend_and_send_sigstop_callback): New.
10425 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10426 pass them down. If SUSPEND, also increment the lwp's suspend
10427 count.
10428 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10429 (need_step_over_p): Don't consider suspended LWPs.
10430 (start_step_over): Adjust.
10431 (proceed_one_lwp): Change return type to int, add new `except'
10432 parameter and handle it.
10433 (unsuspend_and_proceed_one_lwp): New.
10434 (proceed_all_lwps): Use find_inferior instead of
10435 for_each_inferior.
10436 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10437 also decrement the suspend count of LWPs. Pass `except' down,
10438 instead of hacking its suspend count.
10439 (linux_pause_all): Add `freeze' parameter. Adjust.
10440 (linux_unpause_all): New.
10441 (linux_target_ops): Install linux_unpause_all.
10442 * server.c (handle_status): Adjust.
10443 * target.h (struct target_ops): New fields `unpause_all' and
10444 `cancel_breakpoints'. Add new parameter to `pause_all'.
10445 (pause_all): Add new `freeze' parameter.
10446 (unpause_all): New.
10447 (cancel_breakpoints): New.
10448 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10449 cancel breakpoints.
10450 (cmd_qtstart): Pause threads.
10451 (stop_tracing): Pause threads, and cancel breakpoints.
10452 * win32-low.c (win32_target_ops): Adjust.
10453
e471f25b
PA
104542010-05-03 Pedro Alves <pedro@codesourcery.com>
10455
10456 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10457 the inferior right away from here...
10458 (linux_wait_1): ... to here, and adjust to check the thread's
10459 last_resume_kind instead of the lwp's step or stop_expected flags.
10460
1915ef4f
PA
104612010-05-02 Pedro Alves <pedro@codesourcery.com>
10462
10463 * README: Use consistent `GDB' and `GDBserver' spellings.
10464
f9e39928
PA
104652010-05-02 Pedro Alves <pedro@codesourcery.com>
10466
10467 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10468 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10469 (linux_detach_one_lwp): Assume the lwp is stopped.
10470 (any_thread_of): Delete.
10471 (linux_detach): Stop all lwps here. Don't blindly delete all
10472 breakpoints.
10473 (delete_lwp_callback): New.
10474 (linux_mourn): Delete all lwps of the process that is gone.
10475 (linux_wait_1): Don't delete the last lwp of the process here.
10476 * mem-break.h (mark_breakpoints_out): Declare.
10477 * mem-break.c (mark_breakpoints_out): New.
10478 (free_all_breakpoints): Use it.
10479 * server.c (handle_target_event): If the process is gone, mark
10480 breakpoints out.
10481 * thread-db.c (struct thread_db) <create_bp>: New field.
10482 (thread_db_enable_reporting): Fix prototype. Store a thread event
10483 breakpoint reference in the thread_db struct.
10484 (thread_db_load_search): Clear the thread_db object.
10485 (try_thread_db_load_1): Ditto.
10486 (switch_to_process): New.
10487 (disable_thread_event_reporting): Use it.
10488 (remove_thread_event_breakpoints): New.
10489 (thread_db_detach, thread_db_mourn): Use it.
10490
1e7fc18c
PA
104912010-05-01 Pedro Alves <pedro@codesourcery.com>
10492
10493 * linux-low.c (linux_enable_event_reporting): New.
10494 (linux_wait_for_event_1, handle_extended_wait): Use it.
10495
02fc4de7
PA
104962010-04-30 Pedro Alves <pedro@codesourcery.com>
10497
10498 * linux-low.c (linux_kill_one_lwp, linux_kill)
10499 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10500 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10501 SIGSTOP even if the LWP is stopped.
10502 (send_sigstop_callback): New.
10503 (stop_all_lwps): Use send_sigstop_callback instead.
10504 (linux_resume_one_thread): Adjust.
10505 (proceed_one_lwp): Still proceed an LWP that the client has
10506 requested to stop, if we haven't reported it as stopped yet. Make
10507 sure that LWPs the client want stopped, have a pending SIGSTOP.
10508
bc3b5632
DE
105092010-04-26 Doug Evans <dje@google.com>
10510
ae1ada35
DE
10511 * server.c (handle_general_set): Make static.
10512
bc3b5632
DE
10513 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10514 Print received char after testing for error/eof instead of before.
10515 (input_interrupt): Tweak comment.
10516
65730243
DE
105172010-04-23 Doug Evans <dje@google.com>
10518
10519 * server.c (start_inferior): Print inferior argv if --debug.
10520
a8ae7dc0
AR
105212010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10522
10523 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10524 * nto-x86-low.c: Include server.h
10525
1c07cc19
PM
105262010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10527
10528 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10529 be consistent with other sources of this directory.
10530 (init_registers_amd64): Correct name of source file of this function
10531 in the comment.
10532
e0a61e09
PM
105332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10534
10535 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10536 64-bit executables.
10537
54709339
PM
105382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10539
10540 * win32-i386-low.c: Add 64-bit support.
10541 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10542 (init_registers_amd64): Declare.
10543 (mappings): Add 64-bit version of array.
10544 (init_windows_x86): New function.
10545 (the_low_target): Change init_arch field to init_windows_x86.
10546
e8f0053d
PM
105472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10548
10549 * win32-low.c: Adapt to support also 64-bit architecture.
10550 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10551 (get_image_name): Use SIZE_T type for local variable `done'.
10552 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10553 (toolhelp_get_dll_name): Idem.
10554 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10555 Use uintptr_t typecast to avoid warning.
10556 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10557 (handle_exception): Use phex_nz to avoid warning.
10558 (win32_wait): Remove unused local variable `process'.
10559
c481e77e
PM
105602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10561
10562 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10563 `amd64-avx.o'.
10564
12ea4b69
PM
105652010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10566
10567 * configure.ac: Use `ws2_32' library for srv_mingw.
10568 * configure: Regenerate.
10569 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10570 * remote-utils.c: Likewise.
10571
f6d1620c
L
105722010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10573
10574 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10575 if __x86_64__ is defined.
10576
8e642873
PM
105772010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10578
10579 * configure: Regenerate.
10580
711e434b
PM
105812010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10582
10583 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10584 * target.h (target_ops): New get_tib_address field.
10585 * win32-low.h (win32_thread_info): Add thread_local_base field.
10586 * win32-low.c (child_add_thread): Add tlb argument.
10587 Set thread_local_base field to TLB.
10588 (get_child_debug_event): Adapt to child_add_thread change.
10589 (win32_get_tib_address): New function.
10590 (win32_target_ops): Set get_tib_address field to
10591 win32_get_tib_address.
10592 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10593
505106cd
PA
105942010-04-12 Pedro Alves <pedro@codesourcery.com>
10595
505106cd
PA
10596 * linux-low.c (linux_mourn): Also remove the process.
10597 * server.c (handle_target_event): Don't remove the process here.
10598 * nto-low.c (nto_mourn): New.
10599 (nto_target_ops): Install it.
10600 * spu-low.c (spu_mourn): New.
10601 (spu_target_ops): Install it.
10602 * win32-low.c (win32_mourn): New.
10603 (win32_target_ops): Install it.
10604
e8470a06
PA
106052010-04-12 Pedro Alves <pedro@codesourcery.com>
10606
10607 * server.h (buffer_xml_printf): Remove redundant `;'.
10608
45ba0d02
PA
106092010-04-12 Pedro Alves <pedro@codesourcery.com>
10610
10611 * regcache.c (set_register_cache): Invalidate regcaches before
10612 changing the register cache layout.
10613 (regcache_invalidate_one): Allow a NULL regcache.
10614 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10615 regcaches before changing the register cache layout or the target
10616 regsets.
10617
59e04013
L
106182010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10619
10620 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10621 variable warning on Linux/x86-64.
10622
8336d594
PA
106232010-04-11 Pedro Alves <pedro@codesourcery.com>
10624
10625 GDBserver disconnected tracing support.
10626
10627 * linux-low.c (linux_remove_process): Delete.
10628 (add_lwp): Don't set last_resume_kind here.
10629 (linux_kill): Use `mourn'.
10630 (linux_detach): Use `thread_db_detach', and `mourn'.
10631 (linux_mourn): New.
10632 (linux_attach_lwp_1): Adjust comment.
10633 (linux_attach): last_resume_kind moved the thread_info; adjust.
10634 (status_pending_p_callback): Adjust.
10635 (linux_wait_for_event_1): Adjust.
10636 (count_events_callback, select_singlestep_lwp_callback)
10637 (select_event_lwp_callback, cancel_breakpoints_callback)
10638 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10639 (proceed_one_lwp): Adjust.
10640 (linux_async): Add debug output.
10641 (linux_thread_stopped): New.
10642 (linux_pause_all): New.
10643 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10644 linux_pause_all.
10645 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10646 (thread_db_free): Delete declaration.
10647 (thread_db_detach, thread_db_mourn): Declare.
10648 * thread-db.c (thread_db_init): Use thread_db_mourn.
10649 (thread_db_free): Delete, split in two.
10650 (disable_thread_event_reporting): New.
10651 (thread_db_detach): New.
10652 (thread_db_mourn): New.
10653
10654 * server.h (struct thread_info) <last_resume_kind>: New field.
10655 <attached>: Add comment.
10656 <gdb_detached>: New field.
10657 (handler_func): Change return type to int.
10658 (handle_serial_event, handle_target_event): Ditto.
10659 (gdb_connected): Declare.
10660 (tracing): Delete.
10661 (disconnected_tracing): Declare.
10662 (stop_tracing): Declare.
10663
10664 * server.c (handle_query) <qSupported>: Report support for
10665 disconnected tracing.
10666 (queue_stop_reply_callback): Account for running threads.
10667 (gdb_wants_thread_stopped): New.
10668 (gdb_wants_all_threads_stopped): New.
10669 (gdb_reattached_process): New.
10670 (handle_status): Clear the `gdb_detached' flag of all processes.
10671 In all-stop, stop all threads.
10672 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10673 (process_serial_event): If the remote connection breaks, or if an
10674 exit was forced with "monitor exit", force an event loop exit.
10675 Handle disconnected tracing on detach.
10676 (handle_serial_event): Adjust.
10677 (handle_target_event): If GDB isn't connected, forward events back
10678 to the inferior, unless the last process exited, in which case,
10679 exit gdbserver. Adjust interface.
10680
10681 * remote-utils.c (remote_open): Don't block in accept. Instead
10682 register an event loop source on the listen socket file
10683 descriptor. Refactor bits into ...
10684 (listen_desc): ... this new global.
10685 (gdb_connected): ... this new function.
10686 (enable_async_notification): ... this new function.
10687 (handle_accept_event): ... this new function.
10688 (remote_close): Clear remote_desc.
10689
10690 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10691
10692 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10693 New fields.
10694 (mourn_inferior): Define.
10695 (target_process_qsupported): Avoid the dangling else problem.
10696 (thread_stopped): Define.
10697 (pause_all): Define.
10698 (target_waitstatus_to_string): Declare.
10699 * target.c (target_waitstatus_to_string): New.
10700
10701 * tracepoint.c (tracing): Make extern.
10702 (disconnected_tracing): New.
10703 (stop_tracing): Make extern. Handle tracing stops due to GDB
10704 disconnecting.
10705 (cmd_qtdisconnected): New.
10706 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10707 (handle_tracepoint_general_set): Handle QTDisconnected.
10708
10709 * event-loop.c (event_handler_func): Change return type to int.
10710 (process_event): Bail out if the event handler wants the event
10711 loop to stop.
10712 (handle_file_event): Ditto.
10713 (start_event_loop): Bail out if the event handler wants the event
10714 loop to stop.
10715
10716 * nto-low.c (nto_target_ops): Adjust.
10717 * spu-low.c (spu_wait): Don't remove the process here.
10718 (spu_target_ops): Adjust.
10719 * win32-low.c (win32_wait): Don't remove the process here.
10720 (win32_target_ops): Adjust.
10721
5d267c4c
PA
107222010-04-11 Pedro Alves <pedro@codesourcery.com>
10723
10724 * regcache.c (realloc_register_cache): Invalidate inferior's
10725 regcache before recreating it.
10726
623ccd72
PA
107272010-04-09 Pedro Alves <pedro@codesourcery.com>
10728
10729 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10730
219f2f23
PA
107312010-04-09 Stan Shebs <stan@codesourcery.com>
10732 Pedro Alves <pedro@codesourcery.com>
10733
10734 * server.h (LONGEST): New.
10735 (struct thread_info) <while_stepping>: New field.
10736 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10737 Declare.
10738 (initialize_tracepoint, handle_tracepoint_general_set)
10739 (handle_tracepoint_query, tracepoint_finished_step)
10740 (tracepoint_was_hit, release_while_stepping_state_list):
10741 (current_traceframe): Declare.
10742 * server.c (handle_general_set): Handle tracepoint packets.
10743 (read_memory): New.
10744 (write_memory): New.
10745 (handle_search_memory_1): Use read_memory.
10746 (handle_query): Report support for conditional tracepoints, trace
10747 state variables, and tracepoint sources. Handle tracepoint
10748 queries.
10749 (main): Initialize the tracepoints module.
10750 (process_serial_event): Handle traceframe reads/writes.
10751
10752 * linux-low.c (handle_tracepoints): New.
10753 (linux_wait_1): Call it.
10754 (linux_resume_one_lwp): Handle while-stepping.
10755 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10756 (linux_target_ops): Install them.
10757 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10758 New field.
10759 * linux-x86-low.c (x86_supports_tracepoints): New.
10760 (the_low_target). Install it.
10761
10762 * mem-break.h (delete_breakpoint): Declare.
10763 * mem-break.c (delete_breakpoint): Make external.
10764
10765 * target.h (struct target_ops): Add `supports_tracepoints',
10766 `read_pc', and `write_pc' fields.
10767 (target_supports_tracepoints): Define.
10768 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10769 (phex_nz): New.
10770
10771 * regcache.h (struct regcache) <registers_owned>: New field.
10772 (init_register_cache, regcache_cpy): Declare.
10773 (regcache_read_pc, regcache_write_pc): Declare.
10774 (register_cache_size): Declare.
10775 (supply_regblock): Declare.
10776 * regcache.c (init_register_cache): New.
10777 (new_register_cache): Use it.
10778 (regcache_cpy): New.
10779 (register_cache_size): New.
10780 (supply_regblock): New.
10781 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10782
219f2f23
PA
10783 * tracepoint.c: New.
10784
10785 * Makefile.in (OBS): Add tracepoint.o.
10786 (tracepoint.o): New rule.
10787
3a13a53b
L
107882010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10789
10790 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10791 (i386-mmx.o): New.
10792 (i386-mmx.c): Likewise.
10793 (i386-mmx-linux.o): Likewise.
10794 (i386-mmx-linux.c): Likewise.
10795
10796 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10797 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10798 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10799 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10800
10801 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10802 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10803 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10804
1570b33e
L
108052010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10806
10807 * Makefile.in (clean): Updated.
10808 (i386-avx.o): New.
10809 (i386-avx.c): Likewise.
10810 (i386-avx-linux.o): Likewise.
10811 (i386-avx-linux.c): Likewise.
10812 (amd64-avx.o): Likewise.
10813 (amd64-avx.c): Likewise.
10814 (amd64-avx-linux.o): Likewise.
10815 (amd64-avx-linux.c): Likewise.
10816
10817 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10818 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10819 (srv_amd64_regobj): Add amd64-avx.o.
10820 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10821 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10822 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10823 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10824 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10825 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10826 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10827
10828 * i387-fp.c: Include "i386-xstate.h".
10829 (i387_xsave): New.
10830 (i387_cache_to_xsave): Likewise.
10831 (i387_xsave_to_cache): Likewise.
10832 (x86_xcr0): Likewise.
10833
10834 * i387-fp.h (i387_cache_to_xsave): Likewise.
10835 (i387_xsave_to_cache): Likewise.
10836 (x86_xcr0): Likewise.
10837
10838 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10839 * linux-crisv32-low.c (target_regsets): Likewise.
10840 * linux-m68k-low.c (target_regsets): Likewise.
10841 * linux-mips-low.c (target_regsets): Likewise.
10842 * linux-ppc-low.c (target_regsets): Likewise.
10843 * linux-s390-low.c (target_regsets): Likewise.
10844 * linux-sh-low.c (target_regsets): Likewise.
10845 * linux-sparc-low.c (target_regsets): Likewise.
10846 * linux-xtensa-low.c (target_regsets): Likewise.
10847
10848 * linux-low.c: Include <sys/uio.h>.
10849 (regsets_fetch_inferior_registers): Support nt_type.
10850 (regsets_store_inferior_registers): Likewise.
10851 (linux_process_qsupported): New.
10852 (linux_target_ops): Add linux_process_qsupported.
10853
10854 * linux-low.h (regset_info): Add nt_type.
10855 (linux_target_ops): Add process_qsupported.
10856
10857 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10858 and <sys/uio.h>.
10859 (init_registers_i386_avx_linux): New.
10860 (init_registers_amd64_avx_linux): Likewise.
10861 (xmltarget_i386_linux_no_xml): Likewise.
10862 (xmltarget_amd64_linux_no_xml): Likewise.
10863 (PTRACE_GETREGSET): Likewise.
10864 (PTRACE_SETREGSET): Likewise.
10865 (x86_fill_xstateregset): Likewise.
10866 (x86_store_xstateregset): Likewise.
10867 (use_xml): Likewise.
10868 (x86_linux_update_xmltarget): Likewise.
10869 (x86_linux_process_qsupported): Likewise.
10870 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10871 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10872 init_registers_i386_linux here. Call
10873 x86_linux_update_xmltarget.
10874 (the_low_target): Add x86_linux_process_qsupported.
10875
10876 * server.c (handle_query): Call target_process_qsupported.
10877
10878 * target.h (target_ops): Add process_qsupported.
10879 (target_process_qsupported): New.
10880
fc7238bb
PA
108812010-04-03 Pedro Alves <pedro@codesourcery.com>
10882
10883 * inferiors.c (add_thread): Set last_status kind to
10884 TARGET_WAITKIND_IGNORE.
10885 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10886 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10887 (linux_wait_1): Move `thread' local definition to block that uses
10888 it. Don't NULL initialize `event_child'.
10889 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10890 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10891 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10892
bdabb078
PA
108932010-04-01 Pedro Alves <pedro@codesourcery.com>
10894
10895 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10896 an extended waitstatus, or by a watchpoint.
10897 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10898 thread was stepping or has been stopped by a watchpoint.
10899
d3bbe7a0
PA
109002010-04-01 Pedro Alves <pedro@codesourcery.com>
10901
10902 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10903 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10904 of another, then delete the previous, and validate all
10905 breakpoints.
10906 (validate_inserted_breakpoint): New.
10907 (delete_disabled_breakpoints): New.
10908 (validate_breakpoints): New.
10909 (check_mem_read): Validate breakpoints before trusting their
10910 shadow. Delete disabled breakpoints.
10911 (check_mem_write): Validate breakpoints before trusting they
10912 should be inserted. Delete disabled breakpoints.
10913 * mem-break.h (validate_breakpoints):
10914 * server.c (handle_query): Validate breakpoints when we see a
10915 qSymbol query.
10916
8b07ae33
PA
109172010-04-01 Pedro Alves <pedro@codesourcery.com>
10918
10919 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10920 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10921 if we could tell there's a GDB breakpoint at stop_pc.
10922 (need_step_over_p): Don't do a step over if we find a GDB
10923 breakpoint at the resume PC.
10924
10925 * mem-break.c (struct raw_breakpoint): New.
10926 (enum bkpt_type): New type `gdb_breakpoint'.
10927 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10928 fields. New field `raw'.
10929 (find_raw_breakpoint_at): New.
10930 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10931 breakpoint instead.
10932 (set_breakpoint_at): Adjust.
10933 (delete_raw_breakpoint): New.
10934 (release_breakpoint): New.
10935 (delete_breakpoint): Rename to...
10936 (delete_breakpoint_1): ... this. Add proc parameter. Use
10937 release_breakpoint. Return ENOENT.
10938 (delete_breakpoint): Reimplement.
10939 (find_breakpoint_at): Delete.
10940 (find_gdb_breakpoint_at): New.
10941 (delete_breakpoint_at): Delete.
10942 (set_gdb_breakpoint_at): New.
10943 (delete_gdb_breakpoint_at): New.
10944 (gdb_breakpoint_here): New.
10945 (set_reinsert_breakpoint): Use release_breakpoint.
10946 (uninsert_breakpoint): Rename to ...
10947 (uninsert_raw_breakpoint): ... this.
10948 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10949 (reinsert_raw_breakpoint): Change parameter type to
10950 raw_breakpoint.
10951 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10952 instead.
10953 (check_breakpoints): Adjust. Use release_breakpoint.
10954 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10955 (breakpoint_inserted_here): Ditto.
10956 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10957 Don't trust the breakpoint's shadow if it is not inserted.
10958 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10959 (delete_all_breakpoints): Adjust.
10960 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10961 use delete_breakpoint_1.
10962
10963 * mem-break.h (breakpoints_supported): Delete declaration.
10964 (set_gdb_breakpoint_at): Declare.
10965 (gdb_breakpoint_here): Declare.
10966 (delete_breakpoint_at): Delete.
10967 (delete_gdb_breakpoint_at): Declare.
10968
10969 * server.h (struct raw_breakpoint): Forward declare.
10970 (struct process_info): New field `raw_breakpoints'.
10971
10972 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10973 breakpoints.
10974
6bf5e0ba
PA
109752010-03-24 Pedro Alves <pedro@codesourcery.com>
10976
10977 * linux-low.c (status_pending_p_callback): Fix comment.
10978 (linux_wait_for_event_1): Move most of the internal breakpoint
10979 handling from here...
10980 (linux_wait_1): ... to here.
10981 (count_events_callback): New.
10982 (select_singlestep_lwp_callback): New.
10983 (select_event_lwp_callback): New.
10984 (cancel_breakpoints_callback): New.
10985 (select_event_lwp): New.
10986 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10987 priority to all LWPs that have had events that should be reported
10988 to the client. Cancel breakpoints when about to reporting the
10989 event to the client, not while stopping lwps. No longer cancel
10990 finished single-steps here.
10991 (cancel_finished_single_step): Delete.
10992 (cancel_finished_single_steps): Delete.
10993
414a389f
PA
109942010-03-24 Pedro Alves <pedro@codesourcery.com>
10995
10996 * mem-break.c (enum bkpt_type): New.
10997 (struct breakpoint): New field `type'.
10998 (set_breakpoint_at): Change return type to struct breakpoint
10999 pointer. Set type to `other_breakpoint' by default.
11000 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11001 in the breakpoint list.
11002 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11003 (reinsert_breakpoint): Rename to ...
11004 (reinsert_raw_breakpoint): ... this.
11005 (reinsert_breakpoints_at): Adjust.
11006 * mem-break.h (struct breakpoint): Declare.
11007 (set_breakpoint_at): Change return type to struct breakpoint
11008 pointer.
11009
2280c721
PA
110102010-03-24 Pedro Alves <pedro@codesourcery.com>
11011
11012 * server.c (handle_query): Assign, not compare.
11013
d50171e4
PA
110142010-03-24 Pedro Alves <pedro@codesourcery.com>
11015
11016 Teach linux gdbserver to step-over-breakpoints.
11017
11018 * linux-low.c (can_hardware_single_step): New.
11019 (supports_breakpoints): New.
11020 (handle_extended_wait): If stopping threads, read the stop pc of
11021 the new cloned LWP.
11022 (get_pc): New.
11023 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11024 low target doesn't support retrieving the PC.
11025 (add_lwp): Set last_resume_kind to resume_continue.
11026 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11027 (linux_attach): Don't clear stop_expected. Set the lwp's
11028 last_resume_kind to resume_stop.
11029 (linux_detach_one_lwp): Don't check for removed breakpoints.
11030 (check_removed_breakpoint): Delete.
11031 (status_pending_p): Rename to ...
11032 (status_pending_p_callback): ... this. Don't check for removed
11033 breakpoints. Don't consider threads that are stopped from GDB's
11034 perspective.
11035 (linux_wait_for_lwp): Always read the stop_pc here.
11036 (cancel_breakpoint): New.
11037 (step_over_bkpt): New global.
11038 (linux_wait_for_event_1): Implement stepping over breakpoints.
11039 (gdb_wants_lwp_stopped): New.
11040 (gdb_wants_all_stopped): New.
11041 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11042 single-step traps here. Store the thread's last reported target
11043 wait status.
11044 (send_sigstop): Don't clear stop_expected. Always set it,
11045 instead.
11046 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11047 (cancel_finished_single_step): New.
11048 (cancel_finished_single_steps): New.
11049 (wait_for_sigstop): Don't cancel finished single-step traps here.
11050 (linux_resume_one_lwp): Don't check for removed breakpoints.
11051 Don't set `step' on non-hardware step archs.
11052 (linux_set_resume_request): Ignore resume_stop requests if already
11053 stopping or stopped. Set the lwp's last_resume_kind.
11054 (resume_status_pending_p): Don't check for removed breakpoints.
11055 (need_step_over_p): New.
11056 (start_step_over): New.
11057 (finish_step_over): New.
11058 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11059 requests. Clear the thread's last reported target waitstatus.
11060 Don't use the `suspended' flag. Don't consider pending breakpoints.
11061 (linux_resume): Start a step-over if necessary.
11062 (proceed_one_lwp): New.
11063 (proceed_all_lwps): New.
11064 (unstop_all_lwps): New.
11065 * linux-low.h (struct lwp_info): Rewrite comment for the
11066 `suspended' flag. Add the `stop_pc' field. Delete the
11067 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11068 Add `'last_resume_kind' and `need_step_over' fields.
11069 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11070 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11071 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11072 (set_raw_breakpoint_at): New.
11073 (set_breakpoint_at): Rewrite to use it.
11074 (reinsert_breakpoint_handler): Delete.
11075 (set_reinsert_breakpoint): New.
11076 (reinsert_breakpoint_by_bp): Delete.
11077 (delete_reinsert_breakpoints): New.
11078 (uninsert_breakpoint): Rewrite.
11079 (uninsert_breakpoints_at): New.
11080 (reinsert_breakpoint): Rewrite.
11081 (reinsert_breakpoints_at): New.
11082 (check_breakpoints): Rewrite.
11083 (breakpoint_here): New.
11084 (breakpoint_inserted_here): New.
11085 (check_mem_read): Adjust.
11086 * mem-break.h (breakpoints_supported, breakpoint_here)
11087 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11088 (reinsert_breakpoint_by_bp): Delete declaration.
11089 (delete_reinsert_breakpoints): Declare.
11090 (reinsert_breakpoint): Delete declaration.
11091 (reinsert_breakpoints_at): Declare.
11092 (uninsert_breakpoint): Delete declaration.
11093 (uninsert_breakpoints_at): Declare.
11094 (check_breakpoints): Adjust prototype.
11095 * server.h: Adjust include order.
11096 (struct thread_info): Declare here. Add a `last_status' field.
11097
30ba68cb
MS
110982010-03-23 Michael Snyder <msnyder@vmware.com>
11099
11100 * server.c (crc32): New function.
11101 (handle_query): Add handling for 'qCRC:' request.
11102
b9a881c2
PA
111032010-03-23 Pedro Alves <pedro@codesourcery.com>
11104
11105 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11106 lwp had been stopped by a watchpoint.
11107
e92d13d5
PA
111082010-03-16 Pedro Alves <pedro@codesourcery.com>
11109
11110 * server.h (internal_error): Declare.
11111 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11112 * utils.c (internal_error): New function.
11113
64daa791
AS
111142010-03-15 Andreas Schwab <schwab@redhat.com>
11115
11116 * configure.srv: Fix typo setting srv_regobj.
11117
f52cd8cd
PA
111182010-03-15 Pedro Alves <pedro@codesourcery.com>
11119
11120 * linux-low.c (fetch_register): Avoid passing a non string literal
11121 format to `error'.
11122 (usr_store_inferior_registers): Ditto.
11123
93ae6fdc
PA
111242010-03-14 Pedro Alves <pedro@codesourcery.com>
11125
11126 * linux-low.c (linux_write_memory): Bail out early if peeking
11127 memory failed.
11128
c3adc08c
PA
111292010-03-14 Pedro Alves <pedro@codesourcery.com>
11130
11131 * linux-low.h (struct lwp_info): New fields
11132 `stopped_by_watchpoint' and `stopped_data_address'.
11133 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11134 here, and cache them in the lwp object.
11135 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11136 directly.
11137 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11138 field.
11139 (linux_stopped_by_watchpoint): Rewrite.
11140 (linux_stopped_data_address): Rewrite.
11141
bce522a2
PA
111422010-03-06 Simo Melenius <simo.melenius@iki.fi>
11143
11144 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11145 switching the current inferior, not before.
11146
90884b2b
L
111472010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11148
11149 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11150 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11151 i386-linux.c and amd64-linux.c.
11152 (reg-i386.o): Removed.
11153 (reg-i386.c): Likewise.
11154 (reg-i386-linux.o): Likewise.
11155 (reg-i386-linux.c): Likewise.
11156 (reg-x86-64.o): Likewise.
11157 (reg-x86-64.c): Likewise.
11158 (reg-x86-64-linux.o): Likewise.
11159 (reg-x86-64-linux.c): Likewise.
11160 (i386.o): New.
11161 (i386.c): Likewise.
11162 (i386-linux.o): Likewise.
11163 (i386-linux.c): Likewise.
11164 (amd64.o): Likewise.
11165 (amd64.c): Likewise.
11166 (amd64-linux.o): Likewise.
11167 (amd64-linux.c): Likewise.
11168
11169 * configure.srv (srv_i386_regobj): New.
11170 (srv_i386_linux_regobj): Likewise.
11171 (srv_amd64_regobj): Likewise.
11172 (srv_amd64_linux_regobj): Likewise.
11173 (srv_i386_32bit_xmlfiles): Likewise.
11174 (srv_i386_64bit_xmlfiles): Likewise.
11175 (srv_i386_xmlfiles): Likewise.
11176 (srv_amd64_xmlfiles): Likewise.
11177 (srv_i386_linux_xmlfiles): Likewise.
11178 (srv_amd64_linux_xmlfiles): Likewise.
11179 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11180 srv_xmlfiles to $srv_i386_xmlfiles.
11181 (i[34567]86-*-mingw32ce*): Likewise.
11182 (i[34567]86-*-mingw*): Likewise.
11183 (i[34567]86-*-nto*): Likewise.
11184 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11185 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11186 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11187 (x86_64-*-linux*): Likewise.
11188
11189 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11190 (init_registers_amd64_linux): New.
11191 (x86_arch_setup): Replace init_registers_x86_64_linux with
11192 init_registers_amd64_linux.
11193
193f13e6
MK
111942010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11195
11196 * configure.ac: Check for libdl. If it is not available link against
11197 static libthread_db.
11198 * configure: Regenerate.
11199
85d721b8
PA
112002010-02-22 Pedro Alves <pedro@codesourcery.com>
11201
11202 PR9605
11203
11204 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11205 handing a read watchpoint.
11206 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11207
6076632b
DE
112082010-02-12 Doug Evans <dje@google.com>
11209
11210 * linux-low.c (linux_supports_tracefork_flag): Document.
11211 (linux_look_up_symbols): Add comment.
11212
3327ccf7
L
112132010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11214
11215 * regcache.c (supply_register): Clear regcache if buf is NULL.
11216
0718675c 112172010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11218 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11219
11220 * inferiors.c (find_inferior): Add function documentation.
11221 (unloaded_dll): Handle the case where the unloaded dll has not
11222 been previously registered in the dll list.
11223
177321bd
DJ
112242010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11225
11226 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11227 (thumb2_breakpoint): New.
11228 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11229
2b009048
DJ
112302010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11231
11232 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11233 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11234 breakpoints.
11235
3be029c7
PA
112362010-01-21 Pedro Alves <pedro@codesourcery.com>
11237
11238 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11239
18f5de3b
JK
112402010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11241
11242 * linux-s390-low.c (s390_collect_ptrace_register)
11243 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11244
3743bb4f
DE
112452010-01-21 Doug Evans <dje@google.com>
11246
14ce3065
DE
11247 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11248 (PTRACE_ARG4_TYPE): New macro.
11249 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11250 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11251 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11252 (usr_store_inferior_registers): Ditto.
11253 (linux_read_memory, linux_write_memory): Ditto.
11254 (linux_test_for_tracefork): Ditto.
11255
3743bb4f
DE
11256 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11257 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11258
8b315be5
PA
112592010-01-21 Pedro Alves <pedro@codesourcery.com>
11260
11261 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11262 target.
11263
85492558
PA
112642010-01-21 Pedro Alves <pedro@codesourcery.com>
11265
11266 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11267 prototype to take a regcache. Adjust.
11268
442ea881
PA
112692010-01-20 Pedro Alves <pedro@codesourcery.com>
11270
11271 * regcache.h (struct thread_info): Forward declare.
11272 (struct regcache): New.
11273 (new_register_cache): Adjust prototype.
11274 (get_thread_regcache): Declare.
11275 (free_register_cache): Adjust prototype.
11276 (registers_to_string, registers_from_string): Ditto.
11277 (supply_register, supply_register_by_name, collect_register)
11278 (collect_register_as_string, collect_register_by_name): Ditto.
11279 * regcache.c (struct inferior_regcache_data): Delete.
11280 (get_regcache): Rename to ...
11281 (get_thread_regcache): ... this. Adjust. Switch inferior before
11282 fetching registers.
11283 (regcache_invalidate_one): Adjust.
11284 (regcache_invalidate): Fix prototype.
11285 (new_register_cache): Return the new register cache.
11286 (free_register_cache): Change prototype.
11287 (realloc_register_cache): Adjust.
11288 (registers_to_string): Change prototype to take a regcache. Adjust.
11289 (registers_from_string): Ditto.
11290 (register_data): Ditto.
11291 (supply_register): Ditto.
11292 (supply_register_by_name): Ditto.
11293 (collect_register): Ditto.
11294 (collect_register_as_string): Ditto.
11295 (collect_register_by_name): Ditto.
11296 * server.c (process_serial_event): Adjust.
11297 * linux-low.h (regset_fill_func, regset_store_func): Change
11298 prototype.
11299 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11300 Change prototype.
11301 * linux-low.c (get_stop_pc): Adjust.
11302 (check_removed_breakpoint): Adjust.
11303 (linux_wait_for_event): Adjust.
11304 (linux_resume_one_lwp): Adjust.
11305 (fetch_register): Add regcache parameter. Adjust.
11306 (usr_store_inferior_registers): Ditto.
11307 (regsets_fetch_inferior_registers): Ditto.
11308 (regsets_store_inferior_registers): Ditto.
11309 (linux_fetch_registers, linux_store_registers): Ditto.
11310 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11311 regcache. Adjust.
43aaf8b6
PA
11312 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11313 Ditto.
442ea881
PA
11314 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11315 prototype to take a regcache.
11316 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11317 * remote-utils.c (convert_ascii_to_int, outreg)
11318 (prepare_resume_reply): Change prototype to take a regcache.
11319 Adjust.
11320 * target.h (struct target_ops) <fetch_registers, store_registers>:
11321 Change prototype to take a regcache.
11322 (fetch_inferior_registers, store_inferior_registers): Change
11323 prototype to take a regcache. Adjust.
11324 * proc-service.c (ps_lgetregs): Adjust.
11325 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11326 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11327 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11328 take a regcache. Adjust.
11329 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11330 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11331 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11332 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11333 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11334 (cris_cannot_fetch_register):
11335 (cris_breakpoint_at): Change prototype to take a regcache.
11336 Adjust.
11337 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11338 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11339 to take a regcache. Adjust.
11340 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11341 Adjust.
11342 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11343 take a regcache. Adjust.
11344 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11345 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11346 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11347 * linux-mips-low.c (mips_get_pc):
11348 (mips_set_pc): Change prototype to take a regcache. Adjust.
11349 (mips_reinsert_addr): Adjust.
11350 (mips_collect_register): Change prototype to take a regcache.
11351 Adjust.
11352 (mips_supply_register):
11353 (mips_collect_register_32bit, mips_supply_register_32bit)
11354 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11355 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11356 * linux-ppc-low.c (ppc_supply_ptrace_register)
11357 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11358 (parse_spufs_run): Adjust.
11359 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11360 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11361 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11362 take a regcache. Adjust.
11363 * linux-s390-low.c (s390_collect_ptrace_register)
11364 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11365 (s390_set_pc): Change prototype to take a regcache. Adjust.
11366 (s390_arch_setup): Adjust.
11367 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11368 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11369 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11370 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11371 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11372 regcache. Adjust.
11373 (sparc_breakpoint_at): Adjust.
11374 * linux-xtensa-low.c (xtensa_fill_gregset):
11375 (xtensa_store_gregset):
11376 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11377 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11378 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11379 prototype to take a regcache. Adjust.
11380 * win32-arm-low.c (arm_fetch_inferior_register)
11381 (arm_store_inferior_register): Change prototype to take a
11382 regcache. Adjust.
11383 * win32-i386-low.c (i386_fetch_inferior_register)
11384 (i386_store_inferior_register): Change prototype to take a
11385 regcache. Adjust.
11386 * win32-low.c (child_fetch_inferior_registers)
11387 (child_store_inferior_registers): Change prototype to take a
11388 regcache. Adjust.
11389 (win32_wait): Adjust.
11390 (win32_fetch_inferior_registers): Change prototype to take a
11391 regcache. Adjust.
11392 (win32_store_inferior_registers): Adjust.
11393 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11394 store_inferior_register>: Change prototype to take a regcache.
11395
60c3d7b0
DE
113962010-01-20 Doug Evans <dje@google.com>
11397
11398 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11399 #ifdef.
11400 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11401 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11402
dc146f7c
VP
114032010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11404
11405 * linux-low.c (linux_core_of_thread): New.
11406 (compare_ints, show_process, list_threads): New.
11407 (linux_qxfer_osdata): Report threads and cores.
11408 (linux_target_op): Register linux_core_of_thread.
11409 * remote-utils.c (prepare_resume_reply): Report the core.
11410 (buffer_xml_printf): Support %d specifier.
11411 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11412 New.
11413 (handle_query): Handle qXfer:threads. Announce availability
11414 thereof.
11415 * target.h (struct target_ops): New field core_of_thread.
11416
7803799a
UW
114172010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11418
11419 * Makefile.in (clean): Remove new generated files.
11420 (reg-s390.o, reg-s390.c): Remove rules.
11421 (reg-s390x.o, reg-s390x.c): Likewise.
11422 (s390-linux32.o, s390-linux32.c): Add rules.
11423 (s390-linux64.o, s390-linux64.c): Likewise.
11424 (s390x-linux64.o, s390x-linux64.c): Likewise.
11425 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11426 * linux-s390-low.c: Include <elf.h>.
11427 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11428 (init_registers_s390): Remove prototype.
11429 (init_registers_s390x): Likewise.
11430 (init_registers_s390_linux32): Add prototype.
11431 (init_registers_s390_linux64): Likewise.
11432 (init_registers_s390x_linux64): Likewise.
11433 (s390_num_regs_3264): New define.
11434 (s390_regmap_3264): New global variable.
11435 (s390_cannot_fetch_register): Remove obsolete check.
11436 (s390_cannot_store_register): Likewise.
11437 (s390_collect_ptrace_register): Handle upper/lower register halves.
11438 (s390_supply_ptrace_register): Likewise.
11439 (s390_fill_gregset): Update to register number changes.
11440 (s390_get_hwcap): New routine.
11441 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11442 Install appropriate regmap and register set.
11443
6e7ffa39
JB
114442010-01-01 Joel Brobecker <brobecker@adacore.com>
11445
11446 * server.c (gdbserver_version): Update copyright year to 2010.
11447 * gdbreplay.c (gdbreplay_version): Likewise.
11448
957f3f49
DE
114492009-12-28 Doug Evans <dje@google.com>
11450
11451 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11452 elf/external.h. Include <elf.h> instead but only if necessary.
11453
ca5c370d
PA
114542009-12-28 Pedro Alves <pedro@codesourcery.com>
11455
11456 * linux-low.c (linux_remove_process): Remove `detaching'
11457 parameter. Don't release/detach from thread_db here.
11458 (linux_kill): Release/detach from thread_db here, ...
11459 (linux_detach): ... and here, before actually detaching.
11460 (linux_wait_1): ... and here, when a process exits.
11461 * thread-db.c (any_thread_of): New.
11462 (thread_db_free): Switch the current inferior to a thread of the
11463 passed in process.
11464
4ee62156
DE
114652009-12-21 Doug Evans <dje@google.com>
11466
d90e6a88
DE
11467 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11468
c5f62d5f
DE
11469 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11470 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11471 warning ifndef __NR_tkill. Move setting of errno there too.
11472 Delete unnecessary resetting of errno after syscall.
11473 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11474
10e86dd7
DE
11475 * configure.ac: Check for dladdr.
11476 * config.in: Regenerate.
11477 * configure: Regenerate.
11478 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11479 (try_thread_db_load): Update.
11480
4ee62156
DE
11481 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11482
00f515da
DE
114832009-12-18 Doug Evans <dje@google.com>
11484
e9464885
DE
11485 * event-loop.c: Include unistd.h if it exists.
11486
07d4f67e
DE
11487 * linux-low.c (my_waitpid): Move definition away from being in
11488 between linux_tracefork_child/linux_test_for_tracefork.
11489
00f515da
DE
11490 * gdb_proc_service.h (psaddr_t): Fix type.
11491 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11492 signature to match glibc.
11493
1de1badb
DE
114942009-12-16 Doug Evans <dje@google.com>
11495
11496 * linux-low.c (linux_read_memory): Fix argument to read.
11497
aeeb81d1
PA
114982009-11-26 Pedro Alves <pedro@codesourcery.com>
11499
11500 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11501 events, don't leave current_inferior pointing at null.
11502
10357975
PA
115032009-11-26 Pedro Alves <pedro@codesourcery.com>
11504
11505 * win32-low.c (LOG): Delete.
11506 (OUTMSG): Output to stderr.
11507 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11508 on compile time LOG macro.
11509 (win32_wait): Fix debug output.
11510
cf6e3471
PA
115112009-11-26 Pedro Alves <pedro@codesourcery.com>
11512
11513 * win32-low.c (win32_add_one_solib): If the dll name is
11514 "ntdll.dll", prepend the system directory to the dll path.
11515
0c85e18e
MK
115162009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11519
9ac544ce 115202009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11521 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11522
11523 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11524 * configure.ac: Check for __mcoldfire__ and set
11525 gdb_cv_m68k_is_coldfire.
11526 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11527 reg-cf.o and reg-m68k.o.
11528 * configure: Regenerated.
11529
fd7dd3e6
PA
115302009-11-16 Pedro Alves <pedro@codesourcery.com>
11531
11532 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11533 Pass it to thread_db_free.
11534 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11535 proper `detaching' argument to linux_remove_process.
11536 * linux-low.h (thread_db_free): Add `detaching' parameter.
11537 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11538 to thread_db_free.
11539 (thread_db_free): Add `detaching' parameter. Only
11540 call td_ta_clear_event if detaching from process.
11541
75aa492e
MK
115422009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11543
11544 * thread-db.c (thread_db_free): Fix typo.
11545
21e1bee4
PP
115462009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11547
11548 PR gdb/10838
11549 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11550
8838b45e
NS
115512009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11552
11553 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11554 with an i686 compiler.
11555 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11556 needed.
11557 * configure: Rebuilt.
11558
8a35fb51
SL
115592009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11560
11561 PR gdb/10783
11562
11563 * server.c (handle_search_memory_1): Correct read_addr initialization
11564 in loop for searching subsequent chunks.
11565
96f15937
PP
115662009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11567
11568 * configure.ac: New --with-libthread-db option.
11569 * thread-db.c: Allow direct dependence on libthread_db.
11570 (thread_db_free): Adjust.
11571 * config.in: Regenerate.
11572 * configure: Likewise.
889bf7c5 11573
5f7d1694
PP
115742009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11575
11576 PR gdb/10757
11577 * thread-db.c (attach_thread): New function.
11578 (maybe_attach_thread): Return success/failure.
11579 (find_new_threads_callback): Adjust.
889bf7c5
PA
11580 (thread_db_find_new_threads): Loop until no new threads.
11581
88e3b899
PA
115822009-10-13 Pedro Alves <pedro@codesourcery.com>
11583
11584 * proc-service.c (ps_lgetregs): Formatting.
11585
cdbfd419
PP
115862009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11587
11588 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11589 * configure.ac: Adjust.
11590 * linux-low.h (struct process_info_private): Move members to struct
11591 thread_db.
11592 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11593 * linux-low.c (linux_remove_process): Adjust.
11594 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11595 * server.c (handle_query): Move code ...
11596 (handle_monitor_command): ... here. New function.
11597 * target.h (struct target_ops): New member.
11598 * thread-db.c (struct thread_db): New.
11599 (libthread_db_search_path): New variable.
11600 (thread_db_create_event, thread_db_enable_reporting)
11601 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11602 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11603 (try_thread_db_load_1, dladdr_to_soname): New functions.
11604 (try_thread_db_load, thread_db_load_search): New functions.
11605 (thread_db_init): Search for libthread_db.
11606 (thread_db_free): New function.
11607 (thread_db_handle_monitor_command): Likewise.
11608 * config.in: Regenerate.
11609 * configure: Regenerate.
889bf7c5 11610
4168d2d6
UW
116112009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11612
11613 * spu-low.c (spu_kill): Wait for inferior to terminate.
11614 Call clear_inferiors.
11615 (spu_detach): Call clear_inferiors.
11616
81ecdfbb
RW
116172009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11618
11619 * aclocal.m4: Regenerate.
11620 * config.in: Likewise.
11621 * configure: Likewise.
11622
0b9ff2c0
UW
116232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11624
11625 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11626 (parse_spufs_run): New function.
11627 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11628 (ppc_breakpoint_at): Handle SPU breakpoints.
11629
efcbbd14
UW
116302009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11631
11632 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11633 (SPUFS_MAGIC): Define.
11634 (spu_enumerate_spu_ids): New function.
11635 (linux_qxfer_spu): New function.
11636 (linux_target_ops): Install linux_qxfer_spu.
11637
f4d9bade
UW
116382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11639
11640 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11641 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11642 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11643 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11644 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11645 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11646 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11647 (init_registers_powerpc_cell32l): Add prototype.
11648 (init_registers_powerpc_cell64l): Likewise.
11649 (ppc_arch_setup): Detect Cell/B.E. architecture.
11650
96e946ca
RW
116512009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11652
11653 * Makefile.in (datarootdir): New variable.
11654
58d6951d
DJ
116552009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11656
11657 * linux-low.c (linux_write_memory): Update debugging output.
11658 * Makefile.in (clean): Add new descriptions.
11659 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11660 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11661 * configure.srv: Add new files for arm*-*-linux*.
11662 * linux-arm-low.c: Add new declarations.
11663 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11664 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11665 (HWCAP_VFPv3D16): New.
11666 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11667 instead of __IWMMXT__.
11668 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11669 (arm_arch_setup): New.
11670 (target_regsets): Remove #ifdef. Add VFP regset.
11671 (the_low_target): Use arm_arch_setup.
11672
12b42a12
DJ
116732009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11674
11675 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11676 the main thread again.
11677
ac8c974e
AR
116782009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11679
11680 Adding Neutrino gdbserver.
11681 * configure: Regenerated.
11682 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11683 * configure.srv (i[34567]86-*-nto*): New target.
11684 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11685 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11686 (nto_comctrl) [__QNX__]: New function.
11687 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11688
4424e0c3 116892009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11690
11691 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11692 srv_tgtobj.
11693
912cf4ba
PA
116942009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11695 Pedro Alves <pedro@codesourcery.com>
11696
11697 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11698 don't support CONTEXT_EXTENDED_REGISTERS.
11699 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11700 (the_low_target): Install them.
11701 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11702 failing with ERROR_PIPE_NOT_CONNECTED.
11703
aa5ca48f
DE
117042009-06-30 Doug Evans <dje@google.com>
11705 Pierre Muller <muller@ics.u-strasbg.fr>
11706
11707 Add h/w watchpoint support to x86-linux, win32-i386.
11708 * Makefile.in (SFILES): Add i386-low.c
11709 (i386_low_h): Define.
11710 (i386-low.o): Add dependencies.
11711 (linux-x86-low.o): Add i386-low.h dependency.
11712 (win32-i386-low.o): Ditto.
11713 * i386-low.c: New file.
11714 * i386-low.h: New file.
11715 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11716 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11717 * linux-low.c (linux_add_process): Initialize arch_private.
11718 (linux_remove_process): Free arch_private.
11719 (add_lwp): Initialize arch_private.
11720 (delete_lwp): Free arch_private.
11721 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11722 provided.
11723 * linux-low.h (process_info_private): New member arch_private.
11724 (lwp_info): New member arch_private.
11725 (linux_target_ops): New members new_process, new_thread,
11726 prepare_to_resume.
11727 (ptid_of): New macro.
11728 * linux-x86-low.c: Include stddef.h, i386-low.h.
11729 (arch_process_info): New struct.
11730 (arch_lwp_info): New struct.
11731 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11732 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11733 (i386_dr_low_get_status): New function.
11734 (x86_insert_point, x86_remove_point): New functions.
11735 (x86_stopped_by_watchpoint): New function.
11736 (x86_stopped_data_address): New function.
11737 (x86_linux_new_process, x86_linux_new_thread): New functions.
11738 (x86_linux_prepare_to_resume): New function.
11739 (the_low_target): Add entries for insert_point, remove_point,
11740 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11741 prepare_to_resume.
11742 * server.c (debug_hw_points): New global.
11743 (monitor_show_help): Document set debug-hw-points.
11744 (handle_query): Process "set debug-hw-points".
11745 * server.h (debug_hw_points): Declare.
11746 (paddress): Declare.
11747 * utils.c (NUMCELLS, CELLSIZE): New macros.
11748 (get_sell, xsnprintf, paddress): New functions.
11749 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11750 remove_point, stopped_by_watchpoint, stopped_data_address.
11751 * win32-i386-low.c: Include i386-low.h.
11752 (debug_reg_state): Replaces dr.
11753 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11754 (i386_dr_low_get_status): New function.
11755 (i386_insert_point, i386_remove_point): New functions.
11756 (i386_stopped_by_watchpoint): New function.
11757 (i386_stopped_data_address): New function.
11758 (i386_initial_stuff): Update.
11759 (get_thread_context,set_thread_context,i386_thread_added): Update.
11760 (the_low_target): Add entries for insert_point,
11761 remove_point, stopped_by_watchpoint, stopped_data_address.
11762 * win32-low.c (win32_insert_watchpoint): New function.
11763 (win32_remove_watchpoint): New function.
11764 (win32_stopped_by_watchpoint): New function.
11765 (win32_stopped_data_address): New function.
11766 (win32_target_ops): Add entries for insert_watchpoint,
11767 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11768 * win32-low.h (win32_target_ops): New members insert_point,
11769 remove_point, stopped_by_watchpoint, stopped_data_address.
11770
d993e290
PA
117712009-06-25 Pedro Alves <pedro@codesourcery.com>
11772
11773 * server.c (process_serial_event): Re-return unsupported, not
11774 error, if the type isn't recognized. Re-allow supporting only
11775 insert or remove packets. Also call require_running for
11776 breakpoints. Add missing break statement to default case. Tidy.
11777 * target.h (struct target_ops): Rename insert_watchpoint to
11778 insert_point, and remove_watchpoint to remove_point.
11779
11780 * linux-low.h (struct linux_target_ops): Likewise.
11781 * linux-low.c (linux_insert_watchpoint): Rename to ...
11782 (linux_insert_point): ... this. Adjust.
11783 (linux_remove_watchpoint): Rename to ...
11784 (linux_remove_point): ... this. Adjust.
11785 (linux_target_ops): Adjust.
11786 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11787 (cris_insert_point): ... this.
11788 (cris_remove_watchpoint): Rename to ...
11789 (cris_remove_point): ... this.
11790 (the_low_target): Adjust.
11791
0f54c268
PM
117922009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11793
11794 * server.c (handle_v_kill): Pass signal_pid to
11795 kill_inferior if multi_process is zero.
11796
c6314022
AR
117972009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11798
11799 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11800 * target.h (target_ops): Comment for *_watchpoint to make it clear
11801 the functions can get types '0' and '1'.
11802
4463ce24
AR
118032009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11804
11805 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11806 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11807 * regcache.c (get_regcache): Likewise.
11808 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11809 * win32-low.c (child_fetch_inferior_registers): Remove check for
11810 regno 0.
11811
cf8fd78b
PA
118122009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11813 Pedro Alves <pedro@codesourcery.com>
11814
11815 * target.h (struct target_ops) <supports_multi_process>: New
11816 callback.
11817 (target_supports_multi_process): New.
11818 * server.c (handle_query): Even if GDB reports support, only
11819 enable multi-process if the target also supports it. Report
11820 multi-process support only if the target backend supports it.
11821 * linux-low.c (linux_supports_multi_process): New function.
11822 (linux_target_ops): Install it as target_supports_multi_process
11823 callback.
11824
47c0c975
DE
118252009-05-24 Doug Evans <dje@google.com>
11826
e09875d4
DE
11827 Global renaming of find_thread_pid to find_thread_ptid.
11828 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11829 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11830 All callers updated.
11831
e27d73f6
DE
11832 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11833 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11834 directly.
11835
47c0c975
DE
11836 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11837 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11838 (linux_resume_one_lwp): Ditto.
11839
2acc282a
DE
118402009-05-23 Doug Evans <dje@google.com>
11841
11842 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11843 from struct inferior_list_entry * to struct lwp_info *.
11844 All callers updated.
11845
9f1036c1
DE
118462009-05-13 Doug Evans <dje@google.com>
11847
11848 * linux-x86-low.c: Don't include assert.h.
11849 (x86_siginfo_fixup): Use fatal, not assert.
11850 (x86_arch_setup): Fix comment.
11851
d0722149
DE
118522009-05-12 Doug Evans <dje@google.com>
11853
11854 Biarch support for i386/amd64 gdbserver.
11855 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11856 Add linux-x86-low.c.
11857 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11858 (linux-x86-low.o): Add.
11859 * linux-x86-64-low.c: Delete.
11860 * linux-i386-low.c: Delete.
11861 * linux-x86-low.c: New file.
11862 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11863 linux-x86-low.o.
11864 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11865 linux-x86-low.o.
11866 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11867 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11868 (linux_child_pid_to_exec_file): New function.
11869 (elf_64_header_p, elf_64_file_p): New functions.
11870 (siginfo_fixup): New function.
11871 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11872 give target a chance to convert layout.
11873 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11874 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11875
fdeb2a12
DE
118762009-05-07 Doug Evans <dje@google.com>
11877
11878 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11879 (regsets_store_inferior_registers): Ditto.
11880
a6dbe5df
PA
118812009-05-06 Pedro Alves <pedro@codesourcery.com>
11882
11883 PR server/10048
11884
11885 * linux-low.c (must_set_ptrace_flags): Delete.
11886 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11887 of the global.
11888 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11889 `lwp->must_set_ptrace_flags' instead.
ba42693b 11890 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11891 (linux_wait_1): ... not here.
11892
5091eb23
DE
118932009-04-30 Doug Evans <dje@google.com>
11894
9f767825
DE
11895 * inferiors.c (started_inferior_callback): New function.
11896 (attached_inferior_callback): New function.
11897 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11898 * server.c (print_started_pid, print_attached_pid): New functions.
11899 (detach_or_kill_for_exit): New function.
11900 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11901 * server.h (have_started_inferiors_p): Declare.
11902 (have_attached_inferiors_p): Declare.
11903
5091eb23
DE
11904 * inferiors.c (remove_process): Fix memory leak, free process.
11905 * linux-low.c (linux_remove_process): New function.
11906 (linux_kill): Call it instead of remove_process.
11907 (linux_detach, linux_wait_1): Ditto.
11908
155c8968
PA
119092009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11910
11911 * configure.srv: Add x86 Windows CE target.
11912
7fe519cb
UW
119132009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11914
11915 * inferiors.c (get_thread_process): Make global.
11916 * server.h (get_thread_process): Add prototype.
11917 * thread-db.c (find_one_thread): Use get_thread_process
11918 instead of current_process.
11919 (thread_db_get_tls_address): Do not crash if called when
11920 thread layer is not yet initialized.
11921
5472f405
UW
119222009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11923
11924 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11925 * spu-low.c (current_tid): Rename to ...
11926 (current_ptid): ... this.
11927 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11928 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11929 ptid_get_lwp (current_ptid) instead of current_tid.
11930 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11931 instead of current_tid. Use find_process_pid to verify pid
11932 argument is valid. Pass proper argument to remove_process.
11933 (spu_thread_alive): Compare current_ptid instead of current_tid.
11934 (spu_resume): Likewise.
11935
55ac2b99
PA
119362009-04-02 Pedro Alves <pedro@codesourcery.com>
11937
11938 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11939 variable.
11940
95954743
PA
119412009-04-01 Pedro Alves <pedro@codesourcery.com>
11942
11943 Implement the multiprocess extensions, and add linux multiprocess
11944 support.
11945
11946 * server.h (ULONGEST): Declare.
11947 (struct ptid, ptid_t): New.
11948 (minus_one_ptid, null_ptid): Declare.
11949 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11950 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11951 (struct inferior_list_entry): Change `id' type from unsigned from
11952 to ptid_t.
11953 (struct sym_cache, struct breakpoint, struct
11954 process_info_private): Forward declare.
11955 (struct process_info): Declare.
11956 (current_process): Declare.
11957 (all_processes): Declare.
11958 (initialize_inferiors): Declare.
11959 (add_thread): Adjust to use ptid_t.
11960 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11961 (add_process, remove_process, find_thread_pid): Declare.
11962 (find_inferior_id): Adjust to use ptid_t.
11963 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11964 (multi_process): Declare.
11965 (push_event): Adjust to use ptid_t.
11966 (read_ptid, write_ptid): Declare.
11967 (prepare_resume_reply): Adjust to use ptid_t.
11968 (clear_symbol_cache): Declare.
11969 * inferiors.c (all_processes): New.
11970 (null_ptid, minus_one_ptid): New.
11971 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11972 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11973 (add_thread): Change unsigned long to ptid. Remove gdb_id
11974 parameter. Adjust.
11975 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11976 (gdb_id_to_thread): Rename to ...
11977 (find_thread_pid): ... this. Change unsigned long to ptid.
11978 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11979 (loaded_dll, pull_pid_from_list): Adjust.
11980 (add_process, remove_process, find_process_pid)
11981 (get_thread_process, current_process, initialize_inferiors): New.
11982 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11983 (struct target_waitstatus) <related_pid>: Ditto.
11984 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11985 return type to int.
11986 (struct target_ops) <join>: Add `pid' argument.
11987 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11988 (struct target_ops) <wait>: Add `ptid' field. Change return type
11989 to ptid.
11990 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11991 (mywait): Add `ptid' argument. Change return type to ptid_t.
11992 (target_pid_to_str): Declare.
11993 * target.c (set_desired_inferior): Adjust to use ptids.
11994 (mywait): Add new `ptid' argument. Adjust.
11995 (target_pid_to_str): New.
11996 * mem-break.h (free_all_breakpoints): Declare.
11997 * mem-break.c (breakpoints): Delelete.
11998 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11999 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12000 to use per-process breakpoint list.
12001 (free_all_breakpoints): New.
12002 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12003 (symbol_cache, all_symbols_looked_up): Delete.
12004 (hexchars): New.
12005 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12006 read_ptid): New.
12007 (prepare_resume_reply): Change ptid argument's type from unsigned
12008 long to ptid_t. Adjust. Implement W;process and X;process.
12009 (free_sym_cache, clear_symbol_cache): New.
12010 (look_up_one_symbol): Adjust to per-process symbol cache. *
12011 * server.c (cont_thread, general_thread, step_thread): Change type
12012 to ptid_t.
12013 (attached): Delete.
12014 (multi_process): New.
12015 (last_ptid): Change type to ptid_t.
12016 (struct vstop_notif) <ptid>: Change type to ptid_t.
12017 (queue_stop_reply, push_event): Change `ptid' argument's type to
12018 ptid_t.
12019 (discard_queued_stop_replies): Add `pid' argument.
12020 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12021 changes. Don't reference the `attached' global.
12022 (attach_inferior): Adjust to mywait interface changes.
12023 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12024 features. Handle and report "multiprocess+". Handle
12025 "qAttached:PID".
12026 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12027 changes.
12028 (handle_v_kill): New.
12029 (handle_v_stopped): Adjust to use target_pid_to_str.
12030 (handle_v_requests): Allow multiple attaches and runs when
12031 multiprocess extensions are in effect. Handle "vKill".
12032 (myresume): Adjust to use ptids.
12033 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12034 (handle_status): Adjust to discard_queued_stop_replies interface
12035 change.
12036 (first_thread_of, kill_inferior_callback)
12037 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12038 (main): Call initialize_inferiors. Adjust to use ptids, killing
12039 and detaching from all inferiors. Handle multiprocess packet
12040 variants.
12041 * linux-low.h: Include gdb_proc_service.h.
12042 (struct process_info_private): New.
12043 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12044 <lwpid_of>: Use ptid_get_lwp.
12045 (get_lwp_thread): Adjust.
12046 (struct lwp_info): Add `dead' member.
12047 (find_lwp_pid): Declare.
12048 * linux-low.c (thread_db_active): Delete.
12049 (new_inferior): Adjust comment.
12050 (inferior_pid): Delete.
12051 (linux_add_process): New.
12052 (handle_extended_wait): Adjust.
12053 (add_lwp): Change unsigned long to ptid.
12054 (linux_create_inferior): Add process to processes table. Adjust
12055 to use ptids. Don't set new_inferior here.
12056 (linux_attach_lwp): Rename to ...
12057 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12058 it. Adjust to use ptids.
12059 (linux_attach_lwp): New.
12060 (linux_attach): Add process to processes table. Don't set
12061 new_inferior here.
12062 (struct counter): New.
12063 (second_thread_of_pid_p, last_thread_of_process_p): New.
12064 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12065 multiple processes.
12066 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12067 processes. Remove process from process table.
12068 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12069 to multiple processes.
12070 (any_thread_of): New.
12071 (linux_detach): Add `pid' argument, and handle it. Remove process
12072 from processes table.
12073 (linux_join): Add `pid' argument. Handle it.
12074 (linux_thread_alive): Change unsighed long argument to ptid_t.
12075 Consider dead lwps as not being alive.
12076 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12077 threads we're not interested in.
12078 (same_lwp, find_lwp_pid): New.
12079 (linux_wait_for_lwp): Change `pid' argument's type from int to
12080 ptid_t. Adjust.
12081 (linux_wait_for_event): Rename to ...
12082 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12083 from int to ptid_t. Adjust.
12084 (linux_wait_for_event): New.
12085 (linux_wait_1): Add `ptid' argument. Change return type to
12086 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12087 that exit from the process table.
12088 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12089 Adjust.
12090 (mark_lwp_dead): New.
12091 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12092 stopping all threads, mark its main lwp as dead.
12093 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12094 ptids.
12095 (fetch_register, usr_store_inferior_registers)
12096 (regsets_fetch_inferior_registers)
12097 (regsets_store_inferior_registers, linux_read_memory)
12098 (linux_write_memory): Inline `inferior_pid'.
12099 (linux_look_up_symbols): Adjust to use per-process
12100 `thread_db_active'.
12101 (linux_request_interrupt): Adjust to use ptids.
12102 (linux_read_auxv): Inline `inferior_pid'.
12103 (initialize_low): Don't reference thread_db_active.
12104 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12105 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12106 (ps_getpid): Return the pid of the current inferior.
12107 * thread-db.c (proc_handle, thread_agent): Delete.
12108 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12109 per-process data.
12110 (find_one_thread): Change argument type to ptid_t. Adjust to
12111 per-process data.
12112 (maybe_attach_thread): Adjust to per-process data and ptids.
12113 (thread_db_find_new_threads): Ditto.
12114 (thread_db_init): Ditto.
12115 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12116 processes table. Adjust to use ptids.
12117 (spu_kill, spu_detach): Adjust interface. Remove process from
12118 processes table.
12119 (spu_join, spu_thread_alive): Adjust interface.
12120 (spu_wait): Adjust interface. Remove process from processes
12121 table. Adjust to use ptids.
12122 * win32-low.c (current_inferior_tid): Delete.
12123 (current_inferior_ptid): New.
12124 (debug_event_ptid): New.
12125 (thread_rec): Take a ptid. Adjust.
12126 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12127 (child_delete_thread): Ditto.
12128 (do_initial_child_stuff): Add `attached' argument. Add process to
12129 processes table.
12130 (child_fetch_inferior_registers, child_store_inferior_registers):
12131 Adjust.
12132 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12133 (win32_attach): Pass 1 to do_initial_child_stuff.
12134 (win32_kill): Adjust interface. Remove process from processes
12135 table.
12136 (win32_detach): Ditto.
12137 (win32_join): Adjust interface.
12138 (win32_thread_alive): Take a ptid.
12139 (win32_resume): Adjust to use ptids.
12140 (get_child_debug_event): Ditto.
12141 (win32_wait): Adjust interface. Remove exiting process from
12142 processes table.
12143
bd99dc85
PA
121442009-04-01 Pedro Alves <pedro@codesourcery.com>
12145
12146 Non-stop mode support.
12147
12148 * server.h (non_stop): Declare.
12149 (gdb_client_data, handler_func): Declare.
12150 (delete_file_handler, add_file_handler, start_event_loop):
12151 Declare.
12152 (handle_serial_event, handle_target_event, push_event)
12153 (putpkt_notif): Declare.
12154 * target.h (enum resume_kind): New.
12155 (struct thread_resume): Replace `step' field by `kind' field.
12156 (TARGET_WNOHANG): Define.
12157 (struct target_ops) <wait>: Add `options' argument.
12158 <supports_non_stop, async, start_non_stop>: New fields.
12159 (target_supports_non_stop, target_async): New.
12160 (start_non_stop): Declare.
12161 (mywait): Add `options' argument.
12162 * target.c (mywait): Add `options' argument. Print child exit
12163 notifications here.
12164 (start_non_stop): New.
12165 * server.c (non_stop, own_buf, mem_buf): New globals.
12166 (struct vstop_notif): New.
12167 (notif_queue): New global.
12168 (queue_stop_reply, push_event, discard_queued_stop_replies)
12169 (send_next_stop_reply): New.
12170 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12171 interface changes.
12172 (attach_inferior): In non-stop mode, don't wait for the target
12173 here.
12174 (handle_general_set): Handle QNonStop.
12175 (handle_query): When handling qC, return the current general
12176 thread, instead of the first thread of the list.
12177 (handle_query): If the backend supports non-stop mode, include
12178 QNonStop+ in the qSupported query response.
12179 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12180 and non-stop mode.
12181 (handle_v_attach, handle_v_run): Handle non-stop mode.
12182 (handle_v_stopped): New.
12183 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12184 (myresume): Adjust to use resume_kind. Handle non-stop.
12185 (queue_stop_reply_callback): New.
12186 (handle_status): Handle non-stop mode.
12187 (main): Clear non_stop flag on reconnection. Use the event-loop.
12188 Refactor serial protocol handling from here ...
12189 (process_serial_event): ... to this new function. When GDB
12190 selects any thread, select one here. In non-stop mode, wait until
12191 GDB acks all pending events before exiting.
12192 (handle_serial_event, handle_target_event): New.
12193 * remote-utils.c (remote_open): Install remote_desc in the event
12194 loop.
12195 (remote_close): Remove remote_desc from the event loop.
12196 (putpkt_binary): Rename to...
12197 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12198 (putpkt_binary): New as wrapper around putpkt_binary_1.
12199 (putpkt_notif): New.
12200 (prepare_resume_reply): In non-stop mode, don't change the
12201 general_thread.
12202 * event-loop.c: New.
12203 * Makefile.in (OBJ): Add event-loop.o.
12204 (event-loop.o): New rule.
12205
12206 * linux-low.h (pid_of): Moved here.
12207 (lwpid_of): New.
12208 (get_lwp_thread): Use lwpid_of.
12209 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12210 * linux-low.c (pid_of): Delete.
12211 (inferior_pid): Use lwpid_of.
12212 (linux_event_pipe): New.
12213 (target_is_async_p): New.
12214 (delete_lwp): New.
12215 (handle_extended_wait): Use lwpid_of.
12216 (add_lwp): Don't set lwpid field.
12217 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12218 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12219 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12220 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12221 first. Adjust to linux_wait_for_event interface changes. Use
12222 lwpid_of.
12223 (linux_detach): Don't delete the main lwp here.
12224 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12225 (status_pending_p): Don't consider explicitly suspended lwps.
12226 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12227 pointer. Add OPTIONS argument. Change return type to int. Use
12228 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12229 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12230 pointer. Add status pointer argument. Return a pid instead of a
12231 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12232 changes. In non-stop mode, don't switch to a random thread.
12233 (linux_wait): Rename to...
12234 (linux_wait_1): ... this. Add target_options argument, and handle
12235 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12236 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12237 clean exit and signal exit code. Don't stop all threads in
12238 non-stop mode. In all-stop mode, only stop all threads when
12239 reporting a stop to GDB. Handle explicit thread stop requests.
12240 (async_file_flush, async_file_mark): New.
12241 (linux_wait): New.
12242 (send_sigstop): Use lwpid_of.
12243 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12244 interface changes. In non-stop mode, don't switch to a random
12245 thread.
12246 (linux_resume_one_lwp): Use lwpid_of.
12247 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12248 (linux_resume_one_thread): ... this. Handle resume_stop. In
12249 non-stop mode, don't look for pending flag in all threads.
12250 (resume_status_pending_p): Don't consider explicitly suspended
12251 threads.
12252 (my_waitpid): Reimplement. Emulate __WALL.
12253 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12254 Use lwpid_of.
12255 (sigchld_handler, linux_supports_non_stop, linux_async)
12256 (linux_start_non_stop): New.
12257 (linux_target_ops): Register linux_supports_non_stop, linux_async
12258 and linux_start_non_stop.
12259 (initialize_low): Install SIGCHLD handler.
12260 * thread-db.c (thread_db_create_event, find_one_thread)
12261 (thread_db_get_tls_address): Use lwpid_of.
12262 * win32-low.c (win32_detach): Adjust to use resume_kind.
12263 (win32_wait): Add `options' argument.
12264 * spu-low.c (spu_resume): Adjust to use resume_kind.
12265 (spu_wait): Add `options' argument.
12266
5b1c542e
PA
122672009-04-01 Pedro Alves <pedro@codesourcery.com>
12268
12269 Decouple target code from remote protocol.
12270
12271 * target.h (enum target_waitkind): New.
12272 (struct target_waitstatus): New.
12273 (struct target_ops) <wait>: Return an unsigned long. Take a
12274 target_waitstatus pointer instead of a char pointer.
12275 (mywait): Likewise.
12276 * target.c (mywait): Change prototype to return an unsigned long.
12277 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12278 * server.h (thread_from_wait, old_thread_from_wait): Delete
12279 declarations.
12280 (prepare_resume_reply): Change prototype to take a
12281 target_waitstatus.
12282 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12283 (last_status, last_ptid): New.
12284 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12285 pid instead of a signal.
12286 (attach_inferior): Remove "status" and "signal" parameters.
12287 Adjust.
12288 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12289 not as an address.
12290 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12291 (handle_v_requests, myresume): Remove "status" and "signal"
12292 parameters. Adjust.
12293 (handle_status): New.
12294 (main): Delete local `status'. Adjust.
12295 * remote-utils.c: Include target.h.
12296 (prepare_resume_reply): Change prototype to take a
12297 target_waitstatus. Adjust.
12298
12299 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12300 interface.
12301 * spu-low.c (spu_wait): Adjust.
12302 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12303 Delete.
12304 (win32_wait): Adjust.
12305
2bd7c093
PA
123062009-04-01 Pedro Alves <pedro@codesourcery.com>
12307
12308 * target.h (struct thread_resume): Delete leave_stopped member.
12309 (struct target_ops): Add a `n' argument to the `resume' callback.
12310 * server.c (start_inferior): Adjust.
12311 (handle_v_cont, myresume): Adjust.
12312 * linux-low.c (check_removed_breakpoint): Adjust to resume
12313 interface change, and to removed leave_stopped field.
12314 (resume_ptr): Delete.
12315 (struct thread_resume_array): New.
12316 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12317 resume interface change.
12318 (linux_continue_one_thread, linux_queue_one_thread)
12319 (resume_status_pending_p): Check if the resume field is NULL
12320 instead of checking the leave_stopped member.
12321 (linux_resume): Adjust to the target resume interface change.
12322 * spu-low.c (spu_resume): Adjust to the target resume interface
12323 change.
12324 * win32-low.c (win32_detach, win32_resume): Ditto.
12325
c35fafde
PA
123262009-04-01 Pedro Alves <pedro@codesourcery.com>
12327
12328 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12329 flag.
12330 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12331 pending.
12332 (linux_continue_one_thread): Only preserve the stepping flag if
12333 there's a pending breakpoint.
12334
0a59d50b
PA
123352009-03-31 Pedro Alves <pedro@codesourcery.com>
12336
12337 * server.c (main): After the inferior having exited, call
12338 remote_close before exiting gdbserver.
12339
f04c6d38
TJB
123402009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12341
12342 Fix size of FPSCR in Power 7 processors.
12343 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12344 (PPC_FEATURE_HAS_DFP): New #define.
12345 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12346 size of the FPSCR.
12347
78e5cee6
PA
123482009-03-23 Pedro Alves <pedro@codesourcery.com>
12349
12350 * server.c (handle_query) Whitespace and formatting.
12351
1b3f6016
PA
123522009-03-22 Pedro Alves <pedro@codesourcery.com>
12353
12354 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12355 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12356 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12357 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12358 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12359 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12360 Makefile.in, configure.ac: Fix whitespace throughout.
12361 * configure: Regenerate.
12362
a07b2135
PA
123632009-03-22 Pedro Alves <pedro@codesourcery.com>
12364
12365 * inferiors.c (find_inferior): Make it safe for the callback
12366 function to delete the currently iterated inferior.
12367
67cc2626
PA
123682009-03-22 Pedro Alves <pedro@codesourcery.com>
12369
12370 * Makefile.in (linuw_low_h): Move higher.
12371 (thread-db.o): Depend on $(linux_low_h).
12372
54a0b537
PA
123732009-03-17 Pedro Alves <pedro@codesourcery.com>
12374
12375 Rename "process" to "lwp" throughout.
12376
12377 * linux-low.c (all_processes): Rename to...
12378 (all_lwps): ... this.
12379 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12380 (add_process): Rename to ...
12381 (add_lwp): ... this. Adjust.
12382 (linux_create_inferior): Adjust.
12383 (linux_attach_lwp): Adjust.
12384 (linux_attach): Adjust.
12385 (linux_kill_one_process): Rename to ...
12386 (linux_kill_one_lwp): ... this. Adjust.
12387 (linux_kill): Adjust.
12388 (linux_detach_one_process): Rename to ...
12389 (linux_detach_one_lwp): ... this. Adjust.
12390 (linux_detach): Adjust.
12391 (check_removed_breakpoint): Adjust.
12392 (status_pending_p): Adjust.
12393 (linux_wait_for_process): Rename to ...
12394 (linux_wait_for_lwp): ... this. Adjust.
12395 (linux_wait_for_event): Adjust.
12396 (send_sigstop): Adjust.
12397 (wait_for_sigstop): Adjust.
12398 (stop_all_processes): Rename to ...
12399 (stop_all_lwps): ... this.
12400 (linux_resume_one_process): Rename to ...
12401 (linux_resume_one_lwp): ... this. Adjust.
12402 (linux_set_resume_request, linux_continue_one_thread)
12403 (linux_queue_one_thread, resume_status_pending_p)
12404 (usr_store_inferior_registers, regsets_store_inferior_registers)
12405 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12406 Adjust.
12407 * linux-low.h (get_process): Rename to ...
12408 (get_lwp): ... this. Adjust.
12409 (get_thread_process): Rename to ...
12410 (get_thread_lwp): ... this. Adjust.
12411 (get_process_thread): Rename to ...
12412 (get_lwp_thread): ... this. Adjust.
12413 (struct process_info): Rename to ...
12414 (struct lwp_info): ... this.
12415 (all_processes): Rename to ...
12416 (all_lwps): ... this.
12417 * proc-service.c (ps_lgetregs): Adjust.
12418 * thread-db.c (thread_db_create_event, find_one_thread)
12419 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12420
0b16c5cf
PA
124212009-03-14 Pedro Alves <pedro@codesourcery.com>
12422
12423 * server.c (handle_query): Handle "qAttached".
12424
32de4b9d
NS
124252009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12426
12427 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12428 GPLv3, update license URL.
12429
2aecd87f
DE
124302009-03-01 Doug Evans <dje@google.com>
12431
93efd302 12432 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12433 (server_h): Add gdb_signals.h.
12434 (signals.o): Update.
12435 * server.h (target_signal_from_host,target_signal_to_host_p)
12436 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12437
86b1f9c5
PM
124382009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12439
12440 * remote-utils.c (getpkt): Also generate remote-debug
12441 information if noack_mode is set.
12442
4aa995e1
PA
124432009-02-06 Pedro Alves <pedro@codesourcery.com>
12444
12445 * server.c (handle_query): Report qXfer:siginfo:read and
12446 qXfer:siginfo:write as supported and handle them.
12447 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12448 * linux-low.c (linux_xfer_siginfo): New.
12449 (linux_target_ops): Set it.
12450
62709adf
PA
124512009-01-26 Pedro Alves <pedro@codesourcery.com>
12452
12453 * server.c (gdbserver_usage): Mention --remote-debug.
12454 (main): Accept '--remote-debug' switch.
12455
aef93bd7
DE
124562009-01-18 Doug Evans <dje@google.com>
12457
12458 * regcache.c (new_register_cache): No need to check result of xcalloc.
12459 * server.c (handle_search_memory): Back out calls to xmalloc,
12460 result is checked and error is returned to user upon failure.
12461 (handle_query): Ditto. Add more checks for result of malloc.
12462 (handle_v_cont): Check result of malloc, report error back to
12463 user upon failure.
12464 (handle_v_run): Ditto. Call freeargv.
12465 * server.h (freeargv): Declare.
12466 * utils.c (freeargv): New fn.
12467
54363045
DE
124682009-01-15 Doug Evans <dje@google.com>
12469
f626972c
DE
12470 * gdbreplay.c (perror_with_name): Make arg const char *.
12471 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12472 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12473 * utils.c (perror_with_name): Make arg const char *.
54363045 12474
18aae699
PA
124752009-01-14 Pedro Alves <pedro@codesourcery.com>
12476
12477 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12478 when handling a EXIT_PROCESS_DEBUG_EVENT.
12479
ff703abe
JB
124802009-01-06 Joel Brobecker <brobecker@adacore.com>
12481
12482 * gdbreplay.c (gdbreplay_version): Update copyright year.
12483 * server.c (gdbserver_version): Likewise.
12484
f21cc1a2 124852009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12486
12487 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12488 (handle_extended_wait): Improve comment.
0e21c1ec 12489
bca929d3
DE
124902008-12-13 Doug Evans <dje@google.com>
12491
12492 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12493 * server.h (ATTR_MALLOC): New macro.
12494 (xmalloc,xcalloc,xstrdup): Declare.
12495 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12496 * inferiors.c: Ditto.
12497 * linux-low.c: Ditto.
12498 * mem-break.c: Ditto.
12499 * regcache.c: Ditto.
12500 * remote-utils.c: Ditto.
12501 * server.c: Ditto.
12502 * target.c: Ditto.
12503 * win32-low.c: Ditto.
12504
97438e3f
DE
125052008-12-12 Doug Evans <dje@google.com>
12506
896c7fbb
DE
12507 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12508 in debugging printf.
12509
97438e3f
DE
12510 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12511
e3b886f8
DE
125122008-12-09 Doug Evans <dje@google.com>
12513
12514 * linux-low.h (struct process_info): Delete member tid, unused.
12515 * thread-db.c (find_one_thread): Update.
12516 (maybe_attach_thread): Update.
12517
07e059b5
VP
125182008-12-02 Pedro Alves <pedro@codesourcery.com>
12519
889bf7c5
PA
12520 * target.h (struct target_ops): Add qxfer_osdata member.
12521 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12522 and dirent.h.
12523 (linux_qxfer_osdata): New functions.
12524 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12525 callback.
12526 * server.c (handle_query): Handle "qXfer:osdata:read:".
12527 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12528 (buffer_xml_printf): New functions.
12529 * server.h (struct buffer): New.
12530 (buffer_grow_str, buffer_grow_str0): New macros.
12531 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12532 (buffer_xml_printf): Declare.
07e059b5 12533
4cab47ab
DE
125342008-11-24 Doug Evans <dje@google.com>
12535
12536 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12537
f142445f
DJ
125382008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12539
12540 * server.c (handle_v_run): Always use the supplied argument list.
12541
d0107bb6 125422008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12543
d0107bb6
BW
12544 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12545 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12546
2c4ad781
TJB
125472008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12548
12549 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12550 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12551 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12552 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12553 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12554 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12555 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12556 XML target descriptions.
12557 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12558 when inferior is running on an ISA 2.05 or later processor. Add
12559 special case to return offset for full 64-bit slot of FPSCR when
12560 in 32-bits.
12561
dfb64f85
DJ
125622008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12563
12564 * Makefile.in (SFILES, clean): Added sparc64 files.
12565 (reg-sparc64.o, reg-sparc64.c): New.
12566 * configure.srv (sparc*-*-linux*): New configuration.
12567 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12568 syscall arguments for SPARC.
12569 (regsets_store_inferior_registers): Likewise.
12570 * linux-sparc-low.c: New file.
12571
66b6e1dd
DE
125722008-10-21 Doug Evans <dje@google.com>
12573
12574 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12575 (READLINE_DIR,READLINE_DEP): Delete.
12576 (INTERNAL_CFLAGS): Update.
12577 (LINTFLAGS): Update.
12578
9b710a42
PA
125792008-10-10 Pedro Alves <pedro@codesourcery.com>
12580
12581 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12582 whole argv from the last run, not just argv[0].
12583
5822d809
PA
125842008-09-08 Pedro Alves <pedro@codesourcery.com>
12585
12586 * regcache.c (new_register_cache): Return NULL if the register
12587 cache size isn't known yet.
12588 (free_register_cache): Avoid dereferencing a NULL regcache.
12589
74aac56f
DJ
125902008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12591
12592 * configure.srv: Merge MIPS and MIPS64.
12593
400b20f5
MR
125942008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12595
12596 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12597
677c5bb1
LM
125982008-08-18 Luis Machado <luisgpm@br.ibm.com>
12599
12600 * Makefile.in: Add required vsx dependencies.
12601
12602 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12603 Declare init_registers_powerpc_vsx32l.
12604 Declare init_registers_powerpc_vsx64l.
12605 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12606 (ppc_arch_setup): Check for VSX in hwcap.
12607 (ppc_fill_vsxregset): New function.
12608 (ppc_store_vsxregset): New function.
12609 Add new VSX entry in regset_info target_regsets.
12610
12611 * configure.srv: Add new VSX dependencies.
12612
a6f3e723
SL
126132008-08-12 Pedro Alves <pedro@codesourcery.com>
12614
12615 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12616 (remote_open): Set or clear transport_is_reliable.
12617 (putpkt_binary): Don't expect acks in noack mode.
12618 (getpkt): Don't send ack/nac in noack mode.
12619 * server.c (handle_general_set): Handle QStartNoAckMode.
12620 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12621 qSupported.
12622 (main): Reset noack_mode on every connection.
12623 * server.h (noack_mode): Declare.
12624
a417dc56
RW
126252008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12626
12627 * Makefile.in (GDBREPLAY_OBS): New variable.
12628 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12629
3221518c
UW
126302008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12631 Daniel Jacobowitz <dan@codesourcery.com>
12632
12633 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12634 (usr_store_inferior_registers): Likewise.
12635 (regsets_store_inferior_registers): Likewise.
12636
ec56be1b
PA
126372008-07-31 Rolf Jansen <rj@surtec.com>
12638 Pedro Alves <pedro@codesourcery.com>
12639
12640 * configure.ac: Check for memmem declaration.
12641 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12642 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12643 (disable_packet_qfThreadInfo): Unconditionally compile.
12644 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12645 * configure, config.in: Regenerate.
12646
2fe5e3ff
DE
126472008-07-28 Doug Kwan <dougkwan@google.com>
12648
12649 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12650 (linux_write_memory): Remove declaration of errno.
12651
836acd6d
UW
126522008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12653
12654 * linux-low.c (handle_extended_wait): Do not use "status"
12655 variable uninitialized.
12656
aeba519e
PA
126572008-07-07 Pedro Alves <pedro@codesourcery.com>
12658
12659 * server.c (handle_v_attach): Inhibit reporting dll changes.
12660
db42f210
PA
126612008-06-27 Pedro Alves <pedro@codesourcery.com>
12662
12663 * remote-utils.c (prepare_resume_reply): If requested, don't
12664 output "thread:TID" in the T stop reply.
12665
12666 * server.c (disable_packet_vCont, disable_packet_Tthread)
12667 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12668 (handle_query): If requested, disable support for qC, qfThreadInfo
12669 and qsThreadInfo.
12670 (handle_v_requests): If requested, disable support for vCont.
12671 (gdbserver_show_disableable): New.
12672 (main): Handle --disable-packet and --disable-packet=LIST.
12673
12674 * server.h (disable_packet_vCont, disable_packet_Tthread)
12675 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12676
8e4c5421
CD
126772008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12678
12679 * server.c (gdbserver_usage): Mention --version.
12680
6e23a804
DJ
126812008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12682
12683 * Makefile.in (gdbreplay.o): New rule.
12684
90aa6a40
JM
126852008-06-06 Joseph Myers <joseph@codesourcery.com>
12686
12687 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12688 message, not gdbserver.
12689
c16158bc 126902008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12691 Nathan Sidwell <nathan@codesourcery.com>
12692 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12693
12694 * acinclude.m4: Include ../../config/acx.m4.
12695 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12696 * configure, config.in: Regenerate.
12697 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12698 * server.c (gdbserver_version): Print PKGVERSION.
12699 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12700 (main): Adjust gdbserver_usage calls.
12701 * gdbreplay.c (version, host_name): Add declarations.
12702 (gdbreplay_version, gdbreplay_usage): New.
12703 (main): Accept --version and --help options.
12704
aeb75bf5
DJ
127052008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12706
12707 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12708 (arm_breakpoint_at): Handle Thumb.
12709 (the_low_target): Add comment.
12710
76b233dd
UW
127112008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12712
12713 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12714
08388c79
DE
127152008-05-09 Doug Evans <dje@google.com>
12716
a3c83fae
DE
12717 * server.h (decode_search_memory_packet): Declare.
12718 * remote-utils.c (decode_search_memory_packet): New fn.
12719 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12720 (handle_search_memory): New fn.
12721 (handle_query): Process qSearch:memory packets.
12722
bb9c3d36
UW
127232008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12724
12725 * regcache.c (registers_length): Remove.
12726 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12727 full register packet.
12728 * regcache.h (registers_length): Remove prototype.
12729 * server.h (PBUFSIZ): Define to 16384.
12730
7284e1be
UW
127312008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12732
12733 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12734 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12735 powerpc-64l.o, and powerpc-altivec64l.o.
12736 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12737 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12738 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12739 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12740 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12741 to srv_xmlfiles.
12742
12743 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12744 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12745 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12746 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12747 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12748 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12749 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12750 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12751 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12752 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12753 (clean): Update.
12754
12755 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12756 (init_registers_powerpc_32l): ... this new prototype.
12757 (init_registers_powerpc_32): Remove, replace by ...
12758 (init_registers_powerpc_altivec32l): ... this new prototype.
12759 (init_registers_powerpc_e500): Remove, replace by ...
12760 (init_registers_powerpc_e500l): ... this new prototype.
12761 (init_registers_ppc64): Remove, replace by ...
12762 (init_registers_powerpc_64l): ... this new prototype.
12763 (init_registers_powerpc_64): Remove, replace by ...
12764 (init_registers_powerpc_altivec64l): ... this new prototype.
12765 (ppc_num_regs): Set to 73.
12766 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12767 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12768 (ppc_cannot_store_register): Handle orig_r3 and trap.
12769 (ppc_arch_setup): Update init_registers_... calls.
12770 (ppc_fill_gregset): Handle orig_r3 and trap.
12771
12772 * inferiors.c (clear_inferiors): Reset current_inferior.
12773
fdc59709
PB
127742008-04-23 Paolo Bonzini <bonzini@gnu.org>
12775
889bf7c5
PA
12776 * acinclude.m4: Add override.m4.
12777 * configure: Regenerate.
fdc59709 12778
c9b2f845
UW
127792008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12780
12781 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12782 initial call to init_register_ppc64.
12783
550512b8
UW
127842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12785
43aaf8b6
PA
12786 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12787 single powerpc*-*-linux* case.
550512b8
UW
12788 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12789
b6430ec3
UW
127902008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12791
12792 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12793 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12794 from reg_xmlfiles.
12795 * linux-ppc-low.c: Include <elf.h>.
12796 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12797 (ppc_hwcap): New global variable.
12798 (ppc_regmap): Remove __SPE__ #ifdef sections.
12799 (ppc_regmap_e500): New global variable.
12800 (ppc_cannot_store_register): Update __SPE__ special case.
12801 (ppc_get_hwcap): New function.
12802 (ppc_arch_setup): Use it to determine whether inferior supports
12803 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12804 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12805 Do not access registers if target does not support AltiVec.
12806 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12807 Do not access registers if target does not support SPE.
12808 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12809
52fa2412
UW
128102008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12811
12812 * linux-low.c (disabled_regsets, num_regsets): New.
12813 (use_regsets_p): Delete.
12814 (linux_wait_for_process): Clear disabled_regsets.
12815 (regsets_fetch_inferior_registers): Check and set it.
12816 (regsets_store_inferior_registers): Likewise.
12817 (linux_fetch_registers, linux_store_registers): Do not use
12818 use_regsets_p.
12819 (initialize_low): Allocate disabled_regsets.
12820
e28b3332
DJ
128212008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12822
12823 * Makefile.in (LIBOBJS): New.
12824 (OBS): Use LIBOBJS.
12825 (memmem.o): New rule.
12826 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12827 * configure: Regenerated.
12828
4536995d
UW
128292008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12830
12831 * server.c (handle_query): Never return "unsupported" for
12832 qXfer:features:read queries.
12833
221c031f
UW
128342008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12835
12836 * server.c (get_features_xml): Fix inverted condition.
12837 (handle_query): Always support qXfer:feature:read.
12838
ccd213ac
DJ
128392008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12840
12841 * server.c (wrapper_argv): New.
12842 (start_inferior): Handle wrapper_argv. If set, expect an extra
12843 trap.
12844 (gdbserver_usage): Document --wrapper.
12845 (main): Parse --wrapper.
12846
6fe305f7
UW
128472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12848
12849 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12850 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12851 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12852 (ppc_set_pc): Likewise.
12853 (ppc_arch_setup): New function.
12854 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12855 of collect_register.
889bf7c5 12856 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12857
5b0a002e
UW
128582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12859
12860 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12861 instead of linux-ppc64-low.o.
12862 * linux-ppc64-low.c: Remove file.
12863 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12864 (linux-ppc64-low.o): Remove rule.
12865
12866 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12867 (init_registers_powerpc_64): Likewise.
12868 (ppc_regmap): Conditionally define depending on __powerpc64__.
12869 (ppc_cannot_store_register): Do not special-case "fpscr" when
12870 compiled on __powerpc64__.
12871 (ppc_collect_ptrace_register): New function.
12872 (ppc_supply_ptrace_register): New function.
12873 (ppc_breakpoint): Change type to "unsigned int".
12874 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12875 (the_low_target): Conditionally provide initializers for the
889bf7c5 12876 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12877 collect_ptrace_register and supply_ptrace_register members.
12878
9b4b61c8
UW
128792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12880
12881 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12882 * server.c (gdbserver_xmltarget): Define.
12883 (get_features_xml): Use it to replace "target.xml" and arch_string.
12884
12885 * configure.srv: Remove srv_xmltarget. Add XML files that were
12886 mentioned there to srv_xmlfiles instead. Remove conditional tests
12887 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12888 srv_xmlfiles and srv_regobj to include all possible choices.
12889 * configure.ac (srv_xmltarget): Remove.
12890 (srv_xmlfiles): Do not add "target.xml".
12891 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12892 checks for supplementary target information.
12893 * configure: Regenerate.
12894 * Makefile.in (XML_TARGET): Remove.
12895 (target.xml): Remove rule.
12896 (clean): Do not clean up target.xml.
12897 (.PRECIOUS): Do not mention target.xml.
12898
12899 * target.h (struct target_ops): Remove arch_string member.
12900 * linux-low.c (linux_arch_string): Remove.
12901 (linux_target_ops): Remove arch_string initializer.
12902 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12903 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12904 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12905 * spu-low.c (spu_arch_string): Remove.
12906 (spu_target_ops): Remove arch_string initializer.
12907 * win32-low.c (win32_arch_string): Remove.
12908 (win32_target_ops): Remove arch_string initializer.
12909 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12910 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12911 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12912
ee1a7ae4
UW
129132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12914
12915 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12916 by collect_ptrace_register and supply_ptrace_register hooks.
12917 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12918 instead of checking for the_low_target.left_pad_xfer.
12919 (usr_store_inferior_registers): Use collect_ptrace_register callback
12920 instead of checking for the_low_target.left_pad_xfer.
12921
12922 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12923 (s390_supply_ptrace_register): Likewise.
12924 (s390_fill_gregset): Call s390_collect_ptrace_register.
12925 (the_low_target): Update.
12926
12927 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12928 (ppc_supply_ptrace_register): Likewise.
12929 (the_low_target): Update.
12930
12931 * linux-i386-low.c (the_low_target): Update.
12932 * linux-x86-64-low.c (the_low_target): Update.
12933
d61ddec4
UW
129342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12935
12936 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12937 reg-s390.o and reg-s390x.o.
12938
12939 * linux-low.c (new_inferior): New global variable.
12940 (linux_create_inferior, linux_attach): Set it.
12941 (linux_wait_for_process): Call the_low_target.arch_setup after the
12942 target has stopped for the first time.
12943 (initialize_low): Do not call the_low_target.arch_setup.
12944
12945 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12946 (s390_set_pc): Likewise.
12947 (s390_arch_setup): New function.
12948 (the_low_target): Use s390_arch_setup as arch_setup routine.
12949
12950 * regcache.c (realloc_register_cache): New function.
12951 (set_register_cache): Call it for each existing regcache.
12952
d05b4ac3
UW
129532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12954
12955 * server.h (init_registers): Remove prototype.
12956
12957 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12958 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12959 instead of init_registers ().
12960 * linux-arm-low.c (init_registers_arm): Add prototype.
12961 (init_registers_arm_with_iwmmxt): Likewise.
12962 (the_low_target): Add initializer for arch_setup field.
12963 * linux-cris-low.c (init_registers_cris): Add prototype.
12964 (the_low_target): Add initializer for arch_setup field.
12965 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12966 (the_low_target): Add initializer for arch_setup field.
12967 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12968 (the_low_target): Add initializer for arch_setup field.
12969 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12970 (the_low_target): Add initializer for arch_setup field.
12971 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12972 (the_low_target): Add initializer for arch_setup field.
12973 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12974 (the_low_target): Add initializer for arch_setup field.
12975 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12976 (init_registers_mips64_linux): Likewise.
12977 (the_low_target): Add initializer for arch_setup field.
12978 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12979 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12980 (the_low_target): Add initializer for arch_setup field.
12981 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12982 (init_registers_powerpc_64): Likewise.
12983 (the_low_target): Add initializer for arch_setup field.
12984 * linux-s390-low.c (init_registers_s390): Add prototype.
12985 (init_registers_s390x): Likewise.
12986 (the_low_target): Add initializer for arch_setup field.
12987 * linux-sh-low.c (init_registers_sh): Add prototype.
12988 (the_low_target): Add initializer for arch_setup field.
12989 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12990 (the_low_target): Add initializer for arch_setup field.
12991 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12992 (the_low_target): Add initializer for arch_setup field.
12993
12994 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12995 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12996 instead of init_registers ().
12997 * win32-arm-low.c (init_registers_arm): Add prototype.
12998 (the_low_target): Add initializer for arch_setup field.
12999 * win32-i386-low.c (init_registers_i386): Add prototype.
13000 (the_low_target): Add initializer for arch_setup field.
13001
13002 * spu-low.c (init_registers_spu): Add prototype.
13003 (initialize_low): Call initialie_registers_spu () instead of
13004 initialize_registers ().
13005
fd96d250
PA
130062008-02-19 Pedro Alves <pedro@codesourcery.com>
13007
13008 * server.c (handle_v_requests): When handling the vRun and vAttach
13009 packets, if already debugging a process, don't kill it. Return an
13010 error instead.
13011
d41b6bb4
DJ
130122008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13013
13014 * server.c (handle_query): Correct length check.
13015
5ac588cf
PA
130162008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13017
13018 * win32-low.c (do_initial_child_stuff): Add process handle
13019 parameter. Set current_process_handle and current_process_id from the
13020 parameters. Clear globals.
13021 (win32_create_inferior): Don't set current_process_handle and
13022 current_process_id here. Instead pass them on the call to
13023 do_initial_child_stuff.
13024 (win32_attach): Likewise.
13025 (win32_clear_inferiors): New.
13026 (win32_kill): Don't close the current process handle or the
13027 current thread handle here. Instead call win32_clear_inferiors.
13028 (win32_detach): Don't open a new handle to the process. Call
13029 win32_clear_inferiors.
13030 (win32_join): Don't rely on current_process_handle; open a new
13031 handle using the process id.
13032 (win32_wait): Call win32_clear_inferiors when the inferior process
13033 has exited.
13034
ecd7ecbc
DJ
130352008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13036
13037 * server.c (monitor_show_help): Add "exit".
13038
1525d545
MG
130392008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13040
ecd7ecbc 13041 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13042 (clean): Add reg-xtensa.c.
13043 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13044 * configure.srv (xtensa*-*-linux*) New target.
13045 * linux-xtensa-low.c: New.
13046 * xtensa-xtregs.c: New.
1525d545 13047
59a016f0
PA
130482008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13049
13050 * hostio.c: Don't include errno.h.
13051 (errno_to_fileio_errno): Move to hostio-errno.
13052 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13053 error number outputting to the target->hostio_last_error callback.
13054 (hostio_packet_error): Use FILEIO_EINVAL directly.
13055 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13056 calls to hostio_error.
13057 * hostio-errno.c: New.
13058 * server.h (hostio_last_error_from_errno): Declare.
13059 * target.h (target_ops): Add hostio_last_error member.
13060 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13061 as hostio_last_error handler.
889bf7c5 13062 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13063 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13064 (wince_hostio_last_error): New functions.
13065 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13066 as hostio_last_error handler.
13067 (win32_target_ops) [!_WIN32_WCE]: Register
13068 hostio_last_error_from_errno as hostio_last_error handler.
13069 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13070 (hostio-errno.o): New rule.
13071 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13072 * configure.srv (srv_hostio_err_objs): New variable. Default to
13073 hostio-errno.o.
13074 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13075 * configure: Regenerate.
13076
2d717e4f
DJ
130772008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13078
13079 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13080 (linux_kill, linux_detach): Clean up the process list.
13081 * remote-utils.c (remote_open): Improve port number parsing.
13082 (putpkt_binary, input_interrupt): Only send interrupts if the target
13083 is running.
13084 * server.c (extended_protocol): Make static.
13085 (attached): Define earlier.
13086 (exit_requested, response_needed, program_argv): New variables.
13087 (target_running): New.
13088 (start_inferior): Clear attached here.
13089 (attach_inferior): Set attached here.
13090 (require_running): Define.
13091 (handle_query): Use require_running and target_running. Implement
13092 "monitor exit".
13093 (handle_v_attach, handle_v_run): New.
13094 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13095 (gdbserver_usage): Update.
13096 (main): Redo argument parsing. Handle --debug and --multi. Handle
13097 --attach along with other options or after the port. Save
13098 program_argv. Support no initial program. Resynchronize
13099 communication with GDB after an error. Handle "monitor exit".
13100 Use require_running and target_running. Always allow the extended
13101 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13102 restart in extended mode.
13103 * README: Refer to the GDB manual. Update --attach usage.
13104
7407e2de
AS
131052007-12-20 Andreas Schwab <schwab@suse.de>
13106
13107 * linux-low.c (STACK_SIZE): Define.
13108 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13109 (linux_test_for_tracefork): Likewise.
13110
b65d95c5
DJ
131112007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13112
13113 * linux-low.c (linux_wait_for_event): Update messages. Do not
13114 reinsert auto-delete breakpoints.
13115 * mem-break.c (struct breakpoint): Change return type of handler to
13116 int.
13117 (set_breakpoint_at): Update handler type.
13118 (reinsert_breakpoint_handler): Return 1 instead of calling
13119 delete_breakpoint.
13120 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13121 setting a new one.
13122 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13123 * mem-break.h (set_breakpoint_at): Update handler type.
13124 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13125 * win32-low.c (auto_delete_breakpoint): New.
13126 (get_child_debug_event): Use it.
13127
4e799345
DJ
131282007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13129
13130 * configure.ac: Check for pread and pwrite.
13131 * hostio.c (handle_pread): Fall back to lseek and read.
13132 (handle_pwrite): Fall back to lseek and write.
13133 * config.in, configure: Regenerated.
13134
27524b67
DJ
131352007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13136
13137 * server.c (myresume): Add own_buf argument.
13138 (main): Update calls.
13139
a20d5e98
DJ
131402007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13141
13142 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13143 * remote-utils.c (remote_open): Do not call disable_async_io.
13144 (block_async_io): Delete.
13145 (unblock_async_io): Make static.
13146 (initialize_async_io): New.
13147 * server.c (handle_v_cont): Handle async I/O here.
13148 (myresume): Likewise. Move other common resume tasks here...
13149 (main): ... from here. Call initialize_async_io. Disable async
13150 I/O before the main loop.
13151 * server.h (initialize_async_io): Declare.
13152 (block_async_io, unblock_async_io): Delete prototypes.
13153 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13154
b79d787e
DJ
131552007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13156
13157 * remote-utils.c (readchar): Allow binary data in received messages.
13158
d97903b2
PA
131592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13160
13161 * win32-low.c (attaching): New global.
13162 (win32_create_inferior): Clear the `attaching' global.
13163 (win32_attach): Set the `attaching' global.
13164 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13165 attaching. Only set a breakpoint at the entry point if not
13166 attaching.
13167
311de423
PA
131682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13169
13170 * server.c (main): Don't report dll events on the initial
13171 connection on attaches.
13172
6c2d16d2
PA
131732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13174
13175 * server.c (main): Relax numerical bases supported for the pid of
13176 the --attach command line argument.
13177
5ca906e6
PA
131782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13179
13180 * win32-low.c (win32_attach): Call OpenProcess before
13181 DebugActiveProcess, not after. Add last error output to error
13182 call.
13183
9c6c8194
PA
131842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13185
13186 * win32-low.c (win32_get_thread_context)
13187 (win32_set_thread_context): New functions.
13188 (thread_rec): Use win32_get_thread_context.
13189 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13190 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13191 field.
13192
4d5d1aaa
PA
131932007-12-03 Leo Zayas
13194 Pedro Alves <pedro_alves@portugalmail.pt>
13195
13196 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13197 global variables.
13198 (child_add_thread): Minor cleanup.
13199 (child_continue): Resume artificially suspended threads before
13200 calling ContinueDebugEvent.
13201 (suspend_one_thread): New.
13202 (fake_breakpoint_event): New.
13203 (get_child_debug_event): Change return type to int. Check here if
13204 gdb sent an interrupt request. If a soft interrupt was requested,
13205 fake a breakpoint event. Return 0 if there is no event to handle,
13206 and 1 otherwise.
13207 (win32_wait): Don't check here if gdb sent an interrupt request.
13208 Ensure there is a valid event to handle.
13209 (win32_request_interrupt): Add soft interruption method as last
13210 resort.
13211
c436e841
PA
132122007-12-03 Leo Zayas
13213 Pedro Alves <pedro_alves@portugalmail.pt>
13214
13215 * win32-low.h (win32_thread_info): Add descriptions to the
13216 structure members. Replace `suspend_count' counter by a
13217 `suspended' flag.
13218 * win32-low.c (thread_rec): Update condition of when to get the
13219 context from the inferior. Rely on ContextFlags being set if it
13220 has already been retrieved. Only suspend the inferior thread if
13221 we haven't already. Warn if that fails.
13222 (continue_one_thread): s/suspend_count/suspended/. Only call
13223 ResumeThread once. Warn if that fails.
13224
e7b5fa67
PA
132252007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13226
13227 * win32-low.c (win32_wait): Don't read from the inferior when it
13228 has already exited.
13229
a385171d
PA
132302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13231
13232 * Makefile.in (win32_low_h): New variable.
13233 (win32-low.o): Add dependency on $(win32_low_h).
13234 (win32-arm-low.o, win32-i386-low.o): New rules.
13235
f80c84b3
DJ
132362007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13237
13238 * hostio.c: Correct copyright year.
13239
a6b151f1
DJ
132402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13241
13242 * Makefile.in (OBS): Add hostio.o.
13243 (hostio.o): New rule.
13244 * server.h (handle_vFile): Declare.
13245 * hostio.c: New file.
13246 * server.c (handle_v_requests): Take packet_len and new_packet_len
13247 for binary packets. Call handle_vFile.
13248 (main): Update call to handle_v_requests.
13249
f9387fc3
DJ
132502007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13251
13252 * linux-low.c: Include <sched.h>.
13253
51c2684e
DJ
132542007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13255
13256 * linux-low.c (linux_tracefork_grandchild): New.
13257 (linux_tracefork_child): Use clone.
13258 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13259
75f83163
JB
132602007-10-31 Joel Brobecker <brobecker@adacore.com>
13261
13262 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13263
da5898ce
DJ
132642007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13265
13266 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13267
24a09b5f
DJ
132682007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13269
13270 * inferiors.c (change_inferior_id): Delete.
13271 (add_pid_to_list, pull_pid_from_list): New.
13272 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13273 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13274 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13275 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13276 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13277 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13278 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13279 (using_threads): Always set to 1.
13280 (handle_extended_wait): New.
13281 (add_process): Do not set TID.
13282 (linux_create_inferior): Set must_set_ptrace_flags.
13283 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13284 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13285 (linux_thread_alive): Rename TID argument to LWPID.
13286 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13287 (linux_wait_for_event): Do not use TID or check using_threads. Update
13288 call to dead_thread_notify. Call handle_extended_wait.
13289 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13290 (send_sigstop): Delete sigstop_sent.
13291 (wait_for_sigstop): Avoid TID.
13292 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13293 (linux_test_for_tracefork): New.
13294 (linux_lookup_signals): Use thread_db_active and
13295 linux_supports_tracefork_flag.
13296 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13297 * linux-low.h (get_process_thread): Avoid TID.
13298 (struct process_ifo): Move thread_known and tid to the end. Remove
13299 sigstop_sent.
13300 (linux_attach_lwp, thread_db_init): Update prototypes.
13301 * server.h (change_inferior_id): Delete prototype.
13302 (add_pid_to_list, pull_pid_from_list): New prototypes.
13303 * thread-db.c (thread_db_use_events): New.
13304 (find_first_thread): Rename to...
13305 (find_one_thread): ...this. Update callers and messages. Do not
13306 call fatal. Check thread_db_use_events. Do not call
13307 change_inferior_id or new_thread_notify.
13308 (maybe_attach_thread): Update. Do not call new_thread_notify.
13309 (thread_db_init): Set thread_db_use_events. Check use_events.
13310 * utils.c (fatal, warning): Correct message prefix.
13311
30ed0a8f
DJ
133122007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13313
13314 * Makefile.in (clean): Remove new files.
13315 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13316 (powerpc-64.o, powerpc-64.c): New rules.
13317 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13318 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13319 with SPE.
13320 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13321 SPE targets.
13322 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13323 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13324 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13325 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13326 (target_regsets): Add AltiVec and SPE register sets.
13327 * configure.ac: Check for AltiVec and SPE.
13328 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13329 (ppc_fill_vrregset, ppc_store_vrregset): New.
13330 (target_regsets): Add AltiVec register set.
13331 * configure: Regenerated.
13332
fd462a61
DJ
133332007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13334
13335 * linux-low.c (O_LARGEFILE): Define.
13336 (linux_read_memory): Use /proc/PID/mem.
13337 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13338 * configure, config.in: Regenerated.
13339
69f223ed
DJ
133402007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13341
13342 * linux-low.c (linux_wait_for_event): Do not pass signals while
13343 single-stepping.
13344
aec18585
PA
133452007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13346
13347 * win32-low.c (create_process): New.
13348 (win32_create_inferior): Use create_process instead of
13349 CreateProcess. If create_process failed retry appending an ".exe"
13350 suffix. Store the GetLastError result immediatelly after
13351 create_process calls and use it on the call to error.
13352
34d86ddd
PA
133532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13354
13355 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13356
5a0e3bd0
JB
133572007-08-23 Joel Brobecker <brobecker@adacore.com>
13358
13359 * configure.ac: Switch license to GPLv3.
13360
f88c79e6
MS
133612007-08-01 Michael Snyder <msnyder@access-company.com>
13362
13363 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13364
6b3d9b83
PA
133652007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13366
13367 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13368 typedef.
13369 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13370 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13371 CloseToolhelp32Snapshot.
13372 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13373 CloseToolhelp32Snapshot.
13374
c588c53c
MS
133752007-07-27 Michael Snyder <michael.snyder@access-company.com>
13376
13377 * server.c (main): Check for inferior exit before main loop.
13378
aa0403d9
PA
133792007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13380
13381 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13382 instead of on tmp_desc.
13383
255e7678
DJ
133842007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13385 Daniel Jacobowitz <dan@codesourcery.com>
13386
13387 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13388 (add_thread): Minor cleanups.
13389 (clear_inferiors): Move lower in the file. Clear the DLL
13390 list.
13391 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13392 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13393 (xml_escape_text): New.
13394 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13395 for qSupported.
13396 (handle_v_cont): Report errors.
13397 (gdbserver_version): Update.
13398 (main): Correct size of own_buf. Do not report initial DLL events.
13399 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13400 (unloaded_dll, xml_escape_text): New.
13401 * win32-low.c (enum target_waitkind): Update comments.
13402 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13403 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13404 (win32_EnumProcessModules, win32_GetModuleInformation)
13405 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13406 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13407 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13408 (win32_Module32First, win32_Module32Next, load_toolhelp)
13409 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13410 (get_child_debug_event): Handle DLL events.
13411 (win32_wait): Likewise.
13412
0d37add9
DJ
134132007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13414
13415 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13416 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13417
45e2715e
PA
134182007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13419
13420 * win32-low.c (handle_output_debug_string): Ignore event if not
13421 waiting.
13422
c5674cf1
PA
134232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13424
13425 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13426
2bbe3cc1
DJ
134272007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13428
13429 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13430
ae13219e
DJ
134312007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13432
13433 * inferiors.c (change_inferior_id): Add comment.
13434 * linux-low.c (check_removed_breakpoint): Add an early
13435 prototype. Improve debug output.
13436 (linux_attach): Doc update.
13437 (linux_detach_one_process, linux_detach): Clean up before releasing
13438 each process.
13439 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13440 * linux-low.h (struct process_info): Doc improvement.
13441 * mem-break.c (delete_all_breakpoints): New.
13442 * mem-break.h (delete_all_breakpoints): New prototype.
13443 * thread-db.c (find_first_thread): New.
13444 (thread_db_create_event): Call it instead of
13445 thread_db_find_new_threads. Clean up unused variables.
13446 (maybe_attach_thread): Remove first thread handling.
13447 (thread_db_find_new_threads): Use find_first_thread.
13448 (thread_db_get_tls_address): Likewise.
13449
4105de34
DJ
134502007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13451
13452 * thread-db.c (thread_db_find_new_threads): Add prototype.
13453 (thread_db_create_event): Check for the main thread before adding
13454 a new thread.
13455 (maybe_attach_thread): Only enable event reporting if TID == 0.
13456 (thread_db_get_tls_address): Check for new threads.
13457
2b876972
DJ
134582007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13459
13460 * linux-low.c (linux_create_inferior): Try execv before execvp.
13461 * spu-low.c (spu_create_inferior): Likewise.
13462
7a245884
DJ
134632007-06-13 Mike Frysinger <vapier@gentoo.org>
13464
13465 * linux-low.c (linux_create_inferior): Change execv to execvp.
13466 * spu-low.c (spu_create_inferior): Likewies.
13467
117ce543
DJ
134682007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13469
13470 * Makefile.in (clean): Clean new files instead of deleted ones.
13471 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13472 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13473 rules.
13474 * configure.srv: Specify XML files and new regformats for MIPS and
13475 MIPS64 GNU/Linux.
13476 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13477 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13478 an entry for the restart register.
13479 (mips_cannot_fetch_register, mips_cannot_store_register)
13480 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13481 register names to match the XML descriptions.
13482 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13483 restart register instead of $0.
13484
0e7f50da
UW
134852007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13486 Markus Deuling <deuling@de.ibm.com>
13487
13488 * remote-utils.c (decode_xfer_write): New function.
13489 * server.h (decode_xfer_write): Add prototype.
13490 * server.c (handle_query): Add PACKET_LEN argument. Support
13491 qXfer:spu:read and qXfer:spu:write packets.
13492 (main): Pass packet_len to handle_query.
13493 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13494 * target.h (target_ops): Add qxfer_spu.
13495
374c1d38
UW
134962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13497
13498 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13499 accessing non-seekable spufs files.
13500
bb63802a
UW
135012007-05-16 Markus Deuling <deuling@de.ibm.com>
13502
889bf7c5 13503 * server.c (handle_query): Add reply for qC packet.
bb63802a 13504
7390519e
PA
135052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13506 Leo Zayas <lerele@champenstudios@com>
13507
13508 * server.h (check_remote_input_interrupt_request): New function.
13509 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13510 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13511 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13512 (check_remote_input_interrupt_request): New function.
13513 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13514 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13515 winapi_GenerateConsoleCtrlEvent): New typedefs.
13516 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13517 to 250 ms.
13518 (win32_wait): Check for remote interrupt request
13519 with check_remote_input_interrupt_request.
13520 (win32_request_interrupt): New function.
13521 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13522
34b34921
PA
135232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13524
13525 * win32-low.c (debug_registers_changed,
13526 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13527 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13528 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13529 (thread_rec): Get context using the low target.
13530 (child_add_thread): Call thread_added on the low target,
13531 which does the same thing.
13532 (regptr): Delete.
13533 (do_initial_child_stuff): Remove debug registers references.
13534 Set context using the low target. Resume threads after
13535 setting the contexts.
13536 (child_continue): Remove dead variable. Remove debug
13537 registers references.
13538 (child_fetch_inferior_registers): Go through the low target.
13539 (do_child_store_inferior_registers): Remove.
13540 (child_store_inferior_registers): Go through the low target.
13541 (win32_resume): Remove debug registers references.
13542 Set context using the low target.
13543 (handle_exception): Change return type to void. Don't record
13544 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13545 first chance exception.
889bf7c5 13546 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13547 goto loop. Always return after waiting for debug event.
13548 (win32_wait): Convert to switch statement. Handle spurious
13549 events.
13550
13551 * win32-i386-low.c (debug_registers_changed,
13552 debug_registers_used): New.
13553 (initial_stuff): Rename to ...
13554 (i386_initial_stuff): ... this. Clear debug registers
13555 state variables.
13556 (store_debug_registers): Delete.
13557 (i386_get_thread_context): New.
13558 (load_debug_registers): Delete.
13559 (i386_set_thread_context): New.
13560 (i386_thread_added): New.
13561 (single_step): Rename to ...
13562 (i386_single_step): ... this.
13563 (do_fetch_inferior_registers): Rename to ...
13564 (i386_fetch_inferior_register): ... this.
13565 (i386_store_inferior_register): New.
13566 (the_low_target): Adapt to new interface.
13567
13568 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13569 (arm_get_thread_context): New.
13570 (arm_set_thread_context): New.
13571 (regptr): New.
13572 (do_fetch_inferior_registers): Rename to ...
13573 (arm_fetch_inferior_register): ... this.
13574 (arm_store_inferior_register): New.
13575 (arm_wince_breakpoint): Reimplement as unsigned long.
13576 (arm_wince_breakpoint_len): Define.
13577 (the_low_target): Adapt to new interface.
13578
13579 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13580 load_debug_registers. Add get_thread_context, set_thread_context,
13581 thread_added and store_inferior_register. Rename
13582 fetch_inferior_registers to fetch_inferior_register.
13583 (regptr): Remove declaration.
13584
dd6953e1
PA
135852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13586
13587 * linux-low.c (linux_detach): Change return type to int. Return 0.
13588 * spu-low.c (spu_detach): Likewise.
13589
444d6139
PA
135902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13591
13592 * target.h (target_ops): Change return type of detach to int.
13593 Add join.
13594 (join_inferior): New.
13595 * server.c (main): Don't skip detach support on mingw32.
13596 If the inferior doesn't support detaching return error.
13597 Call join_inferior instead of using waitpid.
13598 * linux-low.c (linux_join): New.
13599 (linux_target_op): Add linux_join.
13600 * spu-low.c (spu_join): New.
13601 (spu_target_ops): Add spu_join.
13602 * win32-low.c (win32_detach): Adapt to new interface.
13603 Reopen current_process_handle before detaching. Issue a child
13604 resume before detaching.
13605 (win32_join): New.
13606 (win32_target_op): Add win32_join.
13607
1d5315fe
PA
136082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13609
13610 * win32-low.c (win32-attach): Fix return value.
13611 * target.h (target_ops): Describe ATTACH return values.
13612
bf914831
PA
136132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13614
13615 * win32-low.c (GETPROCADDRESS): Define.
13616 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13617 (winapi_DebugSetProcessKillOnExit): Likewise.
13618 (win32_create_inferior): Force usage of ansi CreateProcessA.
13619 (win32_attach): Use GETPROCADDRESS.
13620 (win32_detach): Likewise.
13621
f72f3e60
PA
136222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13623
13624 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13625
ed50f18f
PA
136262007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13627
13628 * win32-low.c: Commit leftover changes from 2007-03-29.
13629
0c2ead7e
DJ
136302007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13631
13632 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13633 fields short instead of int. Add explicit padding.
13634 (i387_cache_to_fsave): Remove unnecessary casts.
13635 (i387_fsave_to_cache): Doc fix.
13636 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13637
73725ff3
DJ
136382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13639
13640 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13641 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13642
d99f33d8
PA
136432007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13644
13645 * configure.srv (arm*-*-mingw32ce*): Move near the other
13646 arm targets.
13647
68070c10
PA
136482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13649
2482afc6 13650 * configure.ac: Add errno checking.
68070c10
PA
13651 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13652 sys/file.h and malloc.h.
13653 (AC_CHECK_DECLS): Add perror.
13654 (srv_mingwce): Handle.
2482afc6 13655 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13656 win32-i386-low.o to srv_tgtobj.
13657 (i[34567]86-*-mingw*): Likewise.
13658 (arm*-*-mingw32ce*): Add case.
13659 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13660 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13661 [__MINGW32CE__] (strerror): New function.
13662 [__MINGW32CE__] (errno): Define to GetLastError.
13663 [__MINGW32CE__] (COUNTOF): New macro.
13664 (remote_open): Remove extra close call.
13665 * mem-break.c (delete_breakpoint_at): New function.
13666 * mem-break.h (delete_breakpoint_at): Declare.
13667 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13668 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13669 [USE_WIN32API] (read, write): Add char* casts.
13670 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13671 * server.h: Include wincecompat.h on Windows CE.
13672 [HAVE_ERRNO_H]: Check.
13673 (perror): Declare if not declared.
13674 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13675 (perror_with_name): Remove errno declaration.
13676 * wincecompat.h: New.
13677 * wincecompat.c: New.
13678 * win32-low.h: New.
13679 * win32-arm-low.c: New.
13680 * win32-i386-low.c: New.
13681 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13682 (OUTMSG2): Make it safe.
13683 (_T): New macro.
13684 (COUNTOF): New macro.
13685 (NUM_REGS): Get it from the low target.
13686 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13687 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13688 (thread_rec): Let low target handle debug registers.
13689 (child_add_thread): Likewise.
13690 (child_init_thread_list): Likewise.
13691 (continue_one_thread): Likewise.
13692 (regptr): New.
13693 (do_child_fetch_inferior_registers): Move to ...
13694 * win32-i386-low.c: ... here, and rename to ...
13695 (do_fetch_inferior_registers): ... this.
889bf7c5 13696 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13697 Go through the low target.
13698 (do_child_store_inferior_registers): Use regptr.
13699 (strwinerror): New function.
13700 (win32_create_inferior): Handle Windows CE.
13701 Use strwinerror instead of strerror on Windows error
13702 codes. Add program to the error output.
13703 Don't close the main thread handle on Windows CE.
13704 (win32_attach): Use coredll.dll on Windows CE.
13705 (win32_kill): Close current process and current
13706 thread handles.
13707 (win32_detach): Use coredll.dll on Windows CE.
13708 (win32_resume): Let low target handle debug registers, and
13709 step request.
13710 (handle_exception): Add/Remove initial breakpoint. Avoid
13711 non-existant WSTOPSIG on Windows CE.
13712 (win32_read_inferior_memory): Cast to remove warning.
13713 (win32_arch_string): Go through the low target.
13714 (initialize_low): Call set_breakpoint_data with the low
13715 target's breakpoint.
13716 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13717 FOP_REGNUM, mappings): Move to ...
13718 * win32-i386-low.c: ... here.
13719 * win32-low.c (win32_thread_info): Move to ...
13720 * win32-low.h: ... here.
13721 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13722 win32-arm-low.c and wincecompat.c.
13723 (all:): Add $EXEEXT.
13724 (install-only:): Likewise.
13725 (gdbserver:): Likewise.
13726 (gdbreplay:): Likewise.
13727 * config.in: Regenerate.
13728 * configure: Regenerate.
13729
41093d81
PA
137302007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13731
13732 * win32-low.c: Rename typedef thread_info to
13733 win32_thread_info throughout.
13734
544afa54
PA
137352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13736
13737 * win32-i386-low.c: Rename to ...
13738 * win32-low.c: ... this.
13739 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13740 * Makefile.in: Likewise.
13741
bce7165d
PA
137422007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13743
13744 * remote-utils.c (monitor_output): Constify msg parameter.
13745 * server.h (monitor_output): Likewise.
13746 * win32-i386-low.c (handle_output_debug_string): New.
13747 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13748 handle_output_debug_string.
13749 (get_child_debug_event): Likewise.
13750
506c7aa0
DJ
137512007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13752
13753 * server.c (main): Correct strtoul check.
13754
42c81e2a
DJ
137552007-03-27 Jon Ringle <jon@ringle.org>
13756
13757 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13758
9453113a
DJ
137592007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13760
13761 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13762
64a69107
DJ
137632007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13764
13765 * terminal.h: Check HAVE_SGTTY_H.
13766
137672007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13768
13769 * remote-utils.c (remote_open): Print out the assigned port number.
13770
c74d0ad8
DJ
137712007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13772
13773 * remote-utils.c (monitor_output): New function.
13774 * server.c (debug_threads): Define here.
13775 (monitor_show_help): New function.
13776 (handle_query): Handle qRcmd.
13777 (main): Do not handle 'd' packet.
13778 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13779 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13780 of debug_threads.
13781
de7c3b4a
PA
137822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13783
13784 * Makefile.in (EXEEXT): New.
13785 (clean): Use $(EXEEXT).
13786
ef57601b
PA
137872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13788
13789 * target.h (target_ops): Rename send_signal to request_interrupt,
13790 and remove enum target_signal parameter.
13791 * linux-low.c (linux_request_interrupt): Rename from
13792 linux_send_signal, and always send SIGINT.
13793 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13794 and always send SIGINT.
13795 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13796 of send_signal.
13797 (input_interrupt): Likewise.
13798
820f2bda
PA
137992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13800
13801 * server.c (get_features_xml): Check if target implemented
13802 arch_string.
13803 * win32-i386-low.c (win32_arch_string): New.
13804 (win32_target_ops): Add win32_arch_string as arch_string member.
13805
ab39bf24
UW
138062007-02-22 Markus Deuling <deuling@de.ibm.com>
13807
13808 * spu-low.c (spu_arch_string): New.
13809 (spu_target_ops): Add spu_arch_string.
13810
61ff6e04
DJ
138112007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13812
13813 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13814 * configure.ac: Do not check for terminal.h.
13815 * configure, config.in: Regenerated.
13816
fb1e4ffc
DJ
138172007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13818
13819 * Makefile.in (OBS): Add $(XML_BUILTIN).
13820 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13821 (clean): Update.
13822 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13823 (arm-with-iwmmxt.c): New.
13824 * config.in, configure: Regenerate.
13825 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13826 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13827 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13828 (arm*-*-linux*): Add iWMMXt and regset support.
13829 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13830 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13831 (arm_store_wmmxregset, target_regsets): New.
13832 * server.c (get_features_xml): Take annex argument. Check builtin
13833 XML documents.
13834 (handle_query): Handle multiple annexes.
13835
0f48aa01
DJ
138362007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13837
13838 * remote-utils.c [USE_WIN32API] (read, write): Define.
13839 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13840 write.
13841
23181151
DJ
138422007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13843
13844 * linux-i386-low.c (the_low_target): Set arch_string.
13845 * linux-x86-64-low.c (the_low_target): Likewise.
13846 * linux-low.c (linux_arch_string): New.
13847 (linux_target_ops): Add it.
13848 * linux-low.h (struct linux_target_ops): Add arch_string.
13849 * server.c (write_qxfer_response): Use const void * for DATA.
13850 (get_features_xml): New.
13851 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13852 * target.h (struct target_ops): Add arch_string method.
13853
9d606399
DJ
138542007-01-03 Denis Pilat <denis.pilat@st.com>
13855 Daniel Jacobowitz <dan@codesourcery.com>
13856
13857 * linux-low.c (linux_kill): Handle being called with no threads.
13858 * win32-i386-low.c (win32_kill): Likewise.
13859 (get_child_debug_event): Clear current_process_handle.
13860
138612006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13862 Daniel Jacobowitz <dan@codesourcery.com>
13863
13864 * remote-utils.c (remote_open): Check the type of specified
13865 serial port devices before opening them.
13866 * server.c (main): Kill the inferior if an error occurs during
13867 the first remote_open.
13868
a5e13d24
DJ
138692006-12-05 Markus Deuling <deuling@de.ibm.com>
13870
13871 * README: Update supported targets.
13872
186947f7
DJ
138732006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13874
13875 * Makefile.in (clean): Remove reg-mips64.c.
13876 (reg-mips64.c, reg-mips64.o): New rules.
13877 * configure.srv: Handle mips64. Include regset support for mips.
13878 * linux-mips-low.c (union mips_register): New.
13879 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13880 (mips_breakpoint, mips_breakpoint_at): Use int.
13881 (mips_collect_register, mips_supply_register)
13882 (mips_collect_register_32bit, mips_supply_register_32bit)
13883 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13884 (mips_store_fpregset, target_regsets): New.
13885 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13886
a13e2c95
UW
138872006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13888
13889 * configure.srv: Add target "spu*-*-*".
13890 * Makefile.in (clean): Remove reg-spu.c.
13891 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13892 * spu-low.c: New file.
13893
cb7283db
DJ
138942006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13895
13896 * configure.ac: Correct td_thr_tls_get_addr test.
13897 * configure: Regenerated.
13898
89be2091
DJ
138992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13900
13901 * linux-low.c (linux_wait_for_event): Reformat. Use the
13902 pass_signals array.
13903 * remote-utils.c (decode_address_to_semicolon): New.
13904 * server.c (pass_signals, handle_general_set): New.
13905 (handle_query): Mention QPassSignals for qSupported.
13906 (main): Call handle_general_set.
13907 * server.h (pass_signals, decode_address_to_semicolon): New.
13908
000ef4f0
DJ
139092006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * server.c (handle_query): Correct error handling for read_auxv.
13912
b7149293
UW
139132005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13914
13915 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13916 and srv_linux_thread_db to yes.
13917 * linux-s390-low.c (s390_fill_gregset): New function.
13918 (target_regsets): Define data structure.
13919
dae5f5cf
DJ
139202006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13923 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13924 * config.in, configure: Regenerated.
13925 * inferiors.c (gdb_id_to_thread): New function.
13926 (gdb_id_to_thread_id): Use it.
13927 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13928 * linux-low.h (struct process_info): Add th member.
13929 (thread_db_get_tls_address): New prototype.
13930 * remote-utils.c (decode_address): Make non-static.
13931 * server.c (handle_query): Handle qGetTLSAddr.
13932 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13933 * target.h (struct target_ops): Add get_tls_address.
13934 * thread-db.c (maybe_attach_thread): Save the thread handle.
13935 (thread_db_get_tls_address): New.
13936
32ca6d61
DJ
139372006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13940 (linux_resume_one_process): Take a siginfo_t *. Update all
13941 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13942 (struct pending_signals): Add a siginfo_t.
13943 (linux_wait_for_process): Always set last_status.
13944 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13945 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13946 * linux-low.h (struct process_info): Add last_status.
13947
5ffff7c1
DJ
139482006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13949
13950 * remote-utils.c (try_rle): New function.
13951 (putpkt_binary): Use it.
13952
8695c747
DJ
139532006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13954
13955 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13956 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13957 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13958 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13959 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13960 point registers.
13961
290fadea
RS
139622006-08-08 Richard Sandiford <richard@codesourcery.com>
13963
13964 * server.c (terminal_fd): New variable.
13965 (old_foreground_pgrp): Likewise.
13966 (restore_old_foreground_pgrp): New function.
13967 (start_inferior): Record the terminal file descriptor in terminal_fd
13968 and its original foreground group in old_foreground_pgrp. Register
13969 restore_old_foreground_pgrp with atexit().
13970
9f2e1e63
DJ
139712006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13972
13973 * server.c (handle_query): Correct qPart to qXfer.
13974
b80864fb
DJ
139752006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13976
13977 * configure.ac: Check for more headers which are missing on
13978 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13979 * configure.srv: Add Cygwin and mingw32.
13980 * remote-utils.c: Don't include headers unconditionally which
13981 are missing on mingw32. Include <winsock.h> for mingw32.
13982 (remote_open): Adjust for mingw32 support. Flush
13983 standard error after writing to it.
13984 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13985 (unblock_async_io, enable_async_io, disable_async_io)
13986 (readchar, getpkt): Update for Winsock support.
13987 (prepare_resume_reply): Expect a protocol signal number.
13988 * server.c: Disable <sys/wait.h> on mingw32.
13989 (start_inferior): Adjust for mingw32 support. Flush
13990 standard error after writing to it.
13991 (attach_inferior): Likewise. Use protocol signal
13992 numbers.
13993 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13994 and names.
13995 * win32-i386-low.c: New file.
13996 * Makefile.in (XM_CLIBS): Set.
13997 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13998 (win32-i386-low.o): New dependency rule.
13999 * linux-low.c (linux_wait): Use target signal numbers.
14000 * target.h (struct target_ops): Doc fix.
14001 * server.h (target_signal_to_name): New prototype.
14002 * gdbreplay.c: Don't include headers unconditionally which
14003 are missing on mingw32. Include <winsock.h> for mingw32.
14004 (remote_close, remote_open): Adjust for Winsock support.
14005 * configure, config.in: Regenerated.
14006
0876f84a
DJ
140072006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14008
14009 * server.c (decode_xfer_read, write_qxfer_response): New.
14010 (handle_query): Take a packet length argument. Handle
14011 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14012 the qSupported response.
14013 (main): Update call to handle_query.
14014
01f9e8fa
DJ
140152006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14016
14017 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14018 (putpkt_binary): Renamed from putpkt and adjusted for binary
14019 data.
14020 (putpkt): New wrapper for putpkt_binary.
14021 (readchar): Don't mask off the high bit.
14022 (decode_X_packet): New function.
14023 * server.c (main): Call putpkt_binary if a handler sets the packet
14024 length. Save the length of the incoming packet. Handle 'X'.
14025 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14026
be2a5f71
DJ
140272006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14028
14029 * server.c (handle_query): Handle qSupported.
14030
ea025f5f
DJ
140312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14032
14033 * remote-utils.c (all_symbols_looked_up): New variable.
14034 (look_up_one_symbol): Check it.
14035 * server.h (look_up_one_symbol): New declaration.
14036 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14037
9308fc88
DJ
140382006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14039
14040 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14041 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14042 (PTRACE_GET_THREAD_AREA): Define.
14043 (ps_get_thread_area): New function.
14044
52fb6437
NS
140452006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14046
14047 * configure.srv (m68k*-*-uclinux*): New target.
14048 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14049 (linux_resume_one_process): Remove extraneous cast.
14050 (linux_read_offsets): New.
14051 (linux_target_op): Add linux_read_offsets on mmuless systems.
14052 * server.c (handle_query): Add qOffsets logic.
14053 * target.h (struct target_ops): Add read_offsets.
14054
21b0f40c
DJ
140552006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14056
14057 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14058 (PTRACE_GET_THREAD_AREA): Define.
14059 (ps_get_thread_area): New function.
14060 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14061 (linux-x86-64-low.o): Update.
14062
0050a760
DJ
140632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14064
14065 * configure.ac: Remove checks for prfpregset_t.
14066 * gdb_proc_service.h: New file.
14067 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14068 new "gdb_proc_service.h".
14069 * proc-service.c: Likewise.
14070 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14071 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14072 * Makefile.in (gdb_proc_service_h): Updated.
14073 * configure, config.in: Regenerated.
14074
b92a518e
DJ
140752006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14076
14077 * remote-utils.c (prepare_resume_reply): Move declaration
14078 of gdb_id_from_wait to the top of the block.
14079
545587ee
DJ
140802006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14081
14082 * linux-low.c (regsets_store_inferior_registers): Read the regset
14083 from the target before filling it.
14084
9db87ebd
DJ
140852006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14086
14087 * server.c (attach_inferior): Return SIGTRAP for a successful
14088 attach.
14089
dd24457d
DJ
140902006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14091
14092 * Makefile.in (OBS): Add version.o.
14093 (STAGESTUFF): Delete.
14094 (version.o): Add dependencies.
14095 (version.c): Replace rule.
14096 (clean): Remove version.c.
14097 * server.c (gdbserver_version): New.
14098 (gdbserver_usage): Use printf.
14099 (main): Handle --version and --help.
14100 * server.h (version, host_name): Add declarations.
14101
6f0f660e
EZ
141022005-12-23 Eli Zaretskii <eliz@gnu.org>
14103
889bf7c5
PA
14104 * linux-arm-low.c:
14105 * linux-arm-low.c:
14106 * inferiors.c:
14107 * i387-fp.h:
14108 * i387-fp.c:
14109 * gdbreplay.c:
14110 * regcache.c:
14111 * proc-service.c:
14112 * mem-break.h:
14113 * mem-break.c:
14114 * linux-x86-64-low.c:
14115 * linux-sh-low.c:
14116 * linux-s390-low.c:
14117 * linux-ppc64-low.c:
14118 * linux-ppc-low.c:
14119 * linux-mips-low.c:
14120 * linux-m68k-low.c:
14121 * linux-m32r-low.c:
14122 * linux-low.h:
14123 * linux-low.c:
14124 * linux-ia64-low.c:
14125 * linux-i386-low.c:
14126 * linux-crisv32-low.c:
14127 * thread-db.c:
14128 * terminal.h:
14129 * target.h:
14130 * target.c:
14131 * server.h:
14132 * server.c:
14133 * remote-utils.c:
14134 * regcache.h:
14135 * utils.c:
14136 * Makefile.in:
14137 * configure.ac:
6f0f660e
EZ
14138 * gdbserver.1: Add (C) after Copyright. Update the FSF
14139 address.
14140
9d1fb177
DJ
141412005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14142
14143 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14144 (arm_breakpoint_at): Recognize both breakpoints.
14145 (the_low_target): Use the correct breakpoint instruction.
14146
011a70c2
DJ
141472005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14150 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14151 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14152 (the_low_target): Update.
14153
7fb85e41
AS
141542005-10-25 Andreas Schwab <schwab@suse.de>
14155
14156 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14157
14158 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14159 (ia64_num_regs): Reduce to 462.
14160
3db0444b
DJ
141612005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * acinclude.m4: Correct quoting.
14164 * aclocal.m4: Regenerated.
14165
14166 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14167 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14168 (thread_db_init): Call thread_db_err_str.
14169 * configure.ac: Check for TD_VERSION.
14170 * config.in, configure: Regenerated.
14171
bee0189a
DJ
141722005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14173
14174 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14175
e9d25b98
DJ
141762005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14179 is not available. Define HAVE_PTRACE_GETREGS if it is.
14180 * config.in, configure: Regenerated.
14181 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14182 * linux-i386-low.c, linux-m68k-low.c: Update to use
14183 HAVE_PTRACE_GETREGS.
14184 * linux-low.c (regsets_fetch_inferior_registers)
14185 (regsets_store_inferior_registers): Only return 0 if we processed
14186 GENERAL_REGS.
14187 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14188 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14189
a06660f7
DJ
141902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * inferiors.c (struct thread_info): Add gdb_id.
14193 (add_thread): Add gdb_id argument.
14194 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14195 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14196 calls to add_thread.
14197 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14198 * server.c (handle_query): Use thread_to_gdb_id.
14199 (handle_v_cont, main): Use gdb_id_to_thread_id.
14200 * server.h (add_thread): Update prototype.
14201 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14202 prototypes.
14203
5a1f5858
DJ
142042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14207 left-padded registers.
14208 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14209 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14210
e122f1f5
SE
142112005-07-01 Steve Ellcey <sje@cup.hp.com>
14212
14213 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14214 * configure: Regenerate.
14215 * config.in: Regenerate.
14216 * server.h (NEED_DECLARATION_STRERROR):
14217 Replace with !HAVE_DECL_STRERROR.
14218
d592fa2f
DJ
142192005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * linux-low.c (linux_wait, linux_send_signal): Don't test
14222 an unsigned long variable for > 0 if it could be MAX_ULONG.
14223 * server.c (myresume): Likewise.
14224 * target.c (set_desired_inferior): Likewise.
14225
ccbd4912
MK
142262005-06-13 Mark Kettenis <kettenis@gnu.org>
14227
14228 * configure.ac: Simplify and improve check for socklen_t.
14229 * configure, config.in: Regenerate.
14230
f450004a
DJ
142312005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14232
14233 * acconfig.h: Remove.
14234 * configure.ac: Add a test for socklen_t. Use three-argument
14235 AC_DEFINE throughout.
14236 * config.in: Regenerated using autoheader 2.59.
14237 * configure: Regenerated.
14238
14239 * gdbreplay.c (socklen_t): Provide a default.
14240 (remote_open): Use socklen_t.
14241 * remote-utils.c (socklen_t): Provide a default.
14242 (remote_open): Use socklen_t.
14243 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14244 unsigned char.
14245
14246 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14247 char for buffers.
14248 * linux-low.c (linux_read_memory, linux_write_memory)
14249 (linux_read_auxv): Likewise.
14250 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14251 (check_mem_write): Likewise.
14252 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14253 Likewise.
14254 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14255 (registers_from_string, register_data): Likewise.
14256 * server.c (handle_query, main): Likewise.
14257 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14258 (decode_M_packet): Likewise.
14259 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14260 * target.h (struct target_ops): Update read_memory, write_memory,
14261 and read_auxv.
14262 (read_inferior_memory, write_inferior_memory): Update.
14263 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14264 to unsigned char *.
14265 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14266 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14267 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14268 linux-s390-low.c, linux-sh-low.c: Update for changes in
14269 read_inferior_memory and the_low_target->breakpoint.
14270
eee84df1
DJ
142712005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14274 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14275 * configure.srv: Add powerpc64-*-linux*.
14276 * linux-ppc64-low.c: New file.
14277
45b134e5
OF
142782005-05-23 Orjan Friberg <orjanf@axis.com>
14279
14280 * linux-cris-low.c: New file with support for CRIS.
14281 * linux-crisv32-low.c: Ditto for CRISv32.
14282 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14283 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14284 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14285 reg-crisv32.o, and reg-crisv32.c to make rules.
14286 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14287 recognized targets.
14288
48d93c75
UW
142892005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14292 of sizeof (PTRACE_XFER_TYPE).
14293 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14294
e013ee27
OF
142952005-05-12 Orjan Friberg <orjanf@axis.com>
14296
889bf7c5 14297 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14298 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14299 pointers for hardware watchpoint support.
14300 * linux-low.h (struct linux_target_ops): Ditto.
14301 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14302 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14303 to linux_target_ops.
14304 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14305 reply packet.
14306 * server.c (main): Recognize 'Z' and 'z' packets.
14307
b0ded00b
UW
143082005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14309
14310 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14311 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14312 (the_low_target): Add new members.
14313
8643e2ad
DJ
143142005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14315
14316 * proc-service.c (ps_lgetregs): Search all_processes instead of
14317 all_threads.
14318
fc620387
DJ
143192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * server.c (start_inferior): Change return type to int.
14322 (attach_inferior): Change sigptr to int *.
14323 (handle_v_cont, handle_v_requests): Change signal to int *.
14324 (main): Change signal to int.
14325
143262005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14327
14328 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14329 * configure.srv: Add m32r*-*-linux*.
14330 * linux-m32r-low.c: New file.
14331
e0e76420
DJ
143322005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14333
14334 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14335
a1928bad
DJ
143362005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14339 Take unsigned long arguments for PIDs.
14340 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14341 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14342 (wait_for_sigstop, linux_resume_one_process)
14343 (regsets_fetch_inferior_registers, linux_send_signal)
14344 (linux_read_auxv): Likewise. Update the types of variables holding
14345 PIDs. Update format string specifiers.
14346 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14347 * remote-utils.c (prepare_resume_reply): Likewise.
14348 * server.c (cont_thread, general_thread, step_thread)
14349 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14350 unsigned long.
14351 (handle_query): Update format specifiers.
14352 (handle_v_cont, main): Use strtoul for thread IDs.
14353 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14354 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14355 (general_thread, step_thread, thread_from_wait)
14356 (old_thread_from_wait): Update.
14357 * target.h (struct thread_resume): Use unsigned long for THREAD.
14358 (struct target_ops): Use unsigned long for arguments to attach and
14359 thread_alive.
14360
dcdb98d2
DJ
143612005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * acinclude.m4: Include bfd/bfd.m4 directly.
14364 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14365 <agriffis@toolchain.org>.
14366 * aclocal.m4, configure: Regenerated.
14367
bec39cab
AC
143682005-01-07 Andrew Cagney <cagney@gnu.org>
14369
14370 * configure.ac: Rename configure.in, require autoconf 2.59.
14371 * configure: Re-generate.
14372
434c4c77
DJ
143732004-12-08 Daniel Jacobowitz <dan@debian.org>
14374
14375 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14376 LIBS when finished.
14377 * aclocal.m4: Regenerated.
14378 * configure: Regenerated.
14379
db1d3e1b
AS
143802004-11-21 Andreas Schwab <schwab@suse.de>
14381
14382 * linux-m68k-low.c (m68k_num_gregs): Define.
14383 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14384 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14385 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14386 (m68k_breakpoint_at): New. Add to the_low_target.
14387
14388 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14389 srv_linux_thread_db to yes.
14390
43360365
JB
143912004-10-20 Joel Brobecker <brobecker@gnat.com>
14392
14393 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14394 (ARCH_SET_FS): Likewise.
14395 (ARCH_GET_FS): Likewise.
14396 (ARCH_GET_GS): Likewise.
14397
fd500816
DJ
143982004-10-16 Daniel Jacobowitz <dan@debian.org>
14399
14400 * linux-i386-low.c (ps_get_thread_area): New.
14401 * linux-x86-64-low.c (ps_get_thread_area): New.
14402 * linux-low.c: Include <sys/syscall.h>.
14403 (linux_kill_one_process): Don't kill the first thread here.
14404 (linux_kill): Kill the first thread here.
14405 (kill_lwp): New function.
14406 (send_sigstop, linux_send_signal): Use it.
14407 * proc-service.c: Clean up #ifdefs.
14408 (fpregset_info): Delete.
14409 (ps_lgetregs): Update and enable implementation.
14410 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14411 implementations.
14412 * remote-utils.c (struct sym_cache, symbol_cache): New.
14413 (input_interrupt): Print a clearer message.
14414 (async_io_enabled): New variable.
14415 (enable_async_io, disable_async_io): Use it. Update comments.
14416 (look_up_one_symbol): Use the symbol cache.
14417 * thread-db.c (thread_db_look_up_symbols): New function.
14418 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14419
f6de3c42
DJ
144202004-10-16 Daniel Jacobowitz <dan@debian.org>
14421
14422 * configure.in: Test for -rdynamic.
14423 * configure: Regenerated.
14424 * Makefile (INTERNAL_LDFLAGS): New.
14425 (gdbserver, gdbreplay): Use it.
14426
2c0fc042
AC
144272004-09-02 Andrew Cagney <cagney@gnu.org>
14428
14429 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14430
075b3282
DJ
144312004-03-23 Daniel Jacobowitz <drow@mvista.com>
14432
14433 * linux-low.c (linux_wait): Clear all_processes list also.
14434
fa6a77dc
DJ
144352004-03-12 Daniel Jacobowitz <drow@mvista.com>
14436
14437 * linux-low.c: Include <errno.h>. Remove extern declaration of
14438 errno.
14439
6d782a97
DJ
144402004-03-12 Daniel Jacobowitz <drow@mvista.com>
14441
14442 * gdbreplay.c, server.h, utils.c: Update copyright years.
14443
3a7fb99b
DJ
144442004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14445
14446 * server.c (main): Print child status or termination signal from
14447 variable 'signal', not 'sig'.
14448
c3e735a6
DJ
144492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14450
14451 * linux-low.c (linux_read_memory): Change return type to
14452 int. Check for and return error from ptrace().
14453 * target.c (read_inferior_memory): Change return type to int. Pass
14454 back return status from the_target->read_memory().
14455 * target.h (struct target_ops): Adapt *read_memory() prototype.
14456 Update comment.
14457 (read_inferior_memory): Adapt prototype.
14458 * server.c (main): Return an error packet if
14459 read_inferior_memory() returns an error.
14460
a59d1c82
DJ
144612004-03-04 Daniel Jacobowitz <drow@mvista.com>
14462
14463 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14464 Unify with other clean targets.
14465
dc3f8883
DJ
144662004-02-29 Daniel Jacobowitz <drow@mvista.com>
14467
14468 * server.c (handle_v_cont): Call set_desired_inferior.
14469
89a208da
DJ
144702004-02-29 Daniel Jacobowitz <drow@mvista.com>
14471
14472 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14473
62ea82f5
DJ
144742004-02-29 Daniel Jacobowitz <drow@mvista.com>
14475
14476 * linux-low.c (linux_wait): Unblock async I/O.
14477 (linux_resume): Block and enable async I/O.
14478 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14479 * server.h (block_async_io, unblock_async_io): Add prototypes.
14480
6910d122
DJ
144812004-02-29 Daniel Jacobowitz <drow@mvista.com>
14482
14483 * remote-utils.c (remote_open): Print a status notice after
14484 opening a TCP port.
14485 * server.c (attach_inferior): Print a status notice after
14486 attaching.
14487
144882004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14489
14490 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14491
c89dc5d4
DJ
144922004-02-26 Daniel Jacobowitz <drow@mvista.com>
14493
14494 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14495 error packet.
14496 * server.c, target.h: Update copyright years.
14497
4b8dad4a
RM
144982004-02-25 Roland McGrath <roland@redhat.com>
14499
14500 * target.h (struct target_ops): New member `read_auxv'.
14501 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14502 * linux-low.c (linux_read_auxv): New function.
14503 (linux_target_ops): Initialize `read_auxv' member to that.
14504
d7446758
JB
145052004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14506
14507 Committed by Jim Blandy <jimb@redhat.com>.
14508
14509 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14510 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14511 instead of GPR_SIZE to distiguish s390 and s390x targets.
14512
5544ad89
DJ
145132004-01-31 Daniel Jacobowitz <drow@mvista.com>
14514
14515 * linux-low.c: Update copyright year.
14516 (check_removed_breakpoint): Clear pending_is_breakpoint.
14517 (linux_set_resume_request, linux_queue_one_thread)
14518 (resume_status_pending_p): New functions.
14519 (linux_continue_one_thread): Use process->resume.
14520 (linux_resume): Only resume threads if there are no pending events.
14521 * linux-low.h (struct process_info): Add resume request
14522 pointer.
14523
2a68b70e
DJ
145242004-01-30 Daniel Jacobowitz <drow@mvista.com>
14525
14526 * regcache.c (new_register_cache): Clear the allocated register
14527 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14528
64386c31
DJ
145292003-10-13 Daniel Jacobowitz <drow@mvista.com>
14530
14531 * linux-low.c (linux_resume): Take a struct thread_resume *
14532 argument.
14533 (linux_wait): Update call.
14534 (resume_ptr): New static variable.
14535 (linux_continue_one_thread): Renamed from
14536 linux_continue_one_process. Use resume_ptr.
14537 (linux_resume): Use linux_continue_one_thread.
14538 * server.c (handle_v_cont, handle_v_requests): New functions.
14539 (myresume): New function.
14540 (main): Handle 'v' case.
14541 * target.h (struct thread_resume): New type.
14542 (struct target_ops): Change argument of "resume" to struct
14543 thread_resume *.
14544 (myresume): Delete macro.
14545
c938e9b0
L
145462003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14547
14548 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14549 (uninstall): Support DESTDIR.
14550
7f313d07
BC
14551Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14552
14553 * configure.srv: Add xscale*linux copy of arm*linux entry.
14554
3b2fc2ea
DJ
145552003-07-24 Daniel Jacobowitz <drow@mvista.com>
14556
14557 * linux-arm-low.c (arm_reinsert_addr): New function.
14558 (the_low_target): Add arm_reinsert_addr.
14559
1c0a559e
MK
145602003-07-08 Mark Kettenis <kettenis@gnu.org>
14561
14562 * mem-break.c: Remove whitespace at end of file.
14563
43d5792c
DJ
145642003-06-28 Daniel Jacobowitz <drow@mvista.com>
14565
14566 * configure.in: Check whether we need to prototype strerror.
14567 * server.h: Optionally prototype strerror.
14568 * gdbreplay.c (perror_with_name): Use strerror.
14569 * linux-low.c (linux_attach_lwp): Use strerror.
14570 * utils.c (perror_with_name): Use strerror.
14571 * config.in, configure: Regenerated.
14572
c8a86edf
DJ
145732003-06-28 Daniel Jacobowitz <drow@mvista.com>
14574
14575 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14576 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14577
73d37363
DJ
145782003-06-20 Daniel Jacobowitz <drow@mvista.com>
14579
14580 * Makefile.in (SFILES): Update.
14581 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14582 low-sun3.c: Remove files.
14583
6ad8ae5c
DJ
145842003-06-17 Daniel Jacobowitz <drow@mvista.com>
14585
14586 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14587 (linux_detach_one_process, linux_detach): New functions.
14588 (linux_target_ops): Add linux_detach.
14589 * server.c (main): Handle 'D' packet.
14590 * target.h (struct target_ops): Add "detach" member.
14591 (detach_inferior): Define.
14592
1581182a
MK
145932003-06-13 Mark Kettenis <kettenis@gnu.org>
14594
14595 From Kelley Cook <kelleycook@wideopenwest.com>:
14596 * configure.srv: Accept i[34567]86 variants.
14597
e5379b03
DJ
145982003-06-05 Daniel Jacobowitz <drow@mvista.com>
14599
14600 * linux-low.c (linux_wait_for_event): Correct comment typos.
14601 (linux_resume_one_process): Call check_removed_breakpoint.
14602 (linux_send_signal): New function.
14603 (linux_target_ops): Add linux_send_signal.
14604 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14605 of kill.
14606 * target.h (struct target_ops): Add send_signal.
14607
2ff29de4
JB
146082003-05-29 Jim Blandy <jimb@redhat.com>
14609
14610 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14611 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14612 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14613 away part of the register's value.
14614
254787d4
DJ
146152003-03-26 Daniel Jacobowitz <drow@mvista.com>
14616
14617 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14618 (linux_wait_for_event, linux_init_signals): Likewise.
14619
94e10508
DJ
146202003-03-17 Daniel Jacobowitz <drow@mvista.com>
14621
14622 * configure.in: Check for stdlib.h.
14623 * configure: Regenerated.
14624 * config.in: Regenerated.
14625
4c0711e0
DJ
146262003-01-04 Andreas Schwab <schwab@suse.de>
14627
14628 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14629
ef66e766
AC
146302003-01-02 Andrew Cagney <ac131313@redhat.com>
14631
14632 * Makefile.in: Remove obsolete code.
14633
a1358604
DJ
146342002-11-20 Daniel Jacobowitz <drow@mvista.com>
14635
14636 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14637 defined(PT_FPR0_HI).
14638
23ce3b1c
DJ
146392002-11-17 Stuart Hughes <seh@zee2.com>
14640
14641 * linux-arm-low.c (arm_num_regs): Increase.
14642 (arm_regmap): Include status register.
14643
146442002-11-17 Daniel Jacobowitz <drow@mvista.com>
14645
14646 * linux-low.c (register_addr): Remove incorrect -1 check.
14647
a9fa9f7d
DJ
146482002-08-29 Daniel Jacobowitz <drow@mvista.com>
14649
14650 * linux-low.c (linux_create_inferior): Call setpgid. Return
14651 the new PID.
14652 (unstopped_p, linux_signal_pid): Remove.
14653 (linux_target_ops): Remove linux_signal_pid.
14654 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14655 global instead of target method.
14656 * target.h (struct target_ops): Remove signal_pid. Update comment
14657 for create_inferior.
14658 * server.c (signal_pid): New variable.
14659 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14660 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14661 (attach_inferior): Set signal_pid.
14662
17574093
DJ
146632002-08-23 Daniel Jacobowitz <drow@mvista.com>
14664
14665 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14666
146672002-08-20 Jim Blandy <jimb@redhat.com>
14668
14669 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14670 default for this.
14671
146722002-08-01 Andrew Cagney <cagney@redhat.com>
14673
14674 * Makefile.in: Make chill references obsolete.
14675
146762002-07-24 Kevin Buettner <kevinb@redhat.com>
14677
14678 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14679 * configure: Regenerate.
14680 * config.in: Regenerate.
14681
146822002-07-09 David O'Brien <obrien@FreeBSD.org>
14683
14684 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14685 (perror_with_name, remote_close, remote_open, expect, play): Static.
14686
146872002-07-04 Michal Ludvig <mludvig@suse.cz>
14688
4b8dad4a 14689 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14690 byte offsets instead of an array of indexes.
14691 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14692
146932002-06-13 Daniel Jacobowitz <drow@mvista.com>
14694
14695 * regcache.c: Add comment.
14696
146972002-06-11 Daniel Jacobowitz <drow@mvista.com>
14698
14699 * thread-db.c: New file.
14700 * proc-service.c: New file.
14701 * acinclude.m4: New file.
14702 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14703 proc-service.o, and thread-db.o.
14704 (linux-low.o): Add USE_THREAD_DB.
14705 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14706 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14707 * aclocal.m4: Regenerated.
14708 * config.in: Regenerated.
14709 * configure: Regenerated.
14710 * configure.in: Check for proc_service.h, sys/procfs.h,
14711 thread_db.h, and linux/elf.h headrs.
14712 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14713 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14714 Check for -lthread_db and thread support.
14715 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14716 PowerPC, and SuperH.
14717 * i387-fp.c: Constify arguments.
14718 * i387-fp.h: Likewise.
14719 * inferiors.c: (struct thread_info): Renamed from
14720 `struct inferior_info'. Remove PID member. Use generic inferior
14721 list header. All uses updated.
14722 (inferiors, signal_pid): Removed.
14723 (all_threads): New variable.
14724 (get_thread): Define.
14725 (add_inferior_to_list): New function.
14726 (for_each_inferior): New function.
14727 (change_inferior_id): New function.
14728 (add_inferior): Removed.
14729 (remove_inferior): New function.
14730 (add_thread): New function.
14731 (free_one_thread): New function.
14732 (remove_thread): New function.
14733 (clear_inferiors): Use for_each_inferior and free_one_thread.
14734 (find_inferior): New function.
14735 (find_inferior_id): New function.
14736 (inferior_target_data): Update argument type.
14737 (set_inferior_target_data): Likewise.
14738 (inferior_regcache_data): Likewise.
14739 (set_inferior_regcache_data): Likewise.
14740 * linux-low.c (linux_bp_reinsert): Remove.
14741 (all_processes, stopping_threads, using_thrads)
14742 (struct pending_signals, debug_threads, pid_of): New.
14743 (inferior_pid): Replace with macro.
14744 (struct inferior_linux_data): Remove.
14745 (get_stop_pc, add_process): New functions.
14746 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14747 Use add_process and add_thread.
14748 (linux_attach_lwp): New function, based on old linux_attach. Use
14749 add_process and add_thread. Set stop_expected for new threads.
14750 (linux_attach): New function.
14751 (linux_kill_one_process): New function.
14752 (linux_kill): Kill all LWPs.
14753 (linux_thread_alive): Use find_inferior_id.
14754 (check_removed_breakpoints, status_pending_p): New functions.
14755 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14756 Update. Use WNOHANG. Wait for cloned processes also. Update process
14757 struct for the found process.
14758 (linux_wait_for_event): New function.
14759 (linux_wait): Use it. Support LWPs.
14760 (send_sigstop, wait_for_sigstop, stop_all_processes)
14761 (linux_resume_one_process, linux_continue_one_process): New functions.
14762 (linux_resume): Support LWPs.
14763 (REGISTER_RAW_SIZE): Remove.
14764 (fetch_register): Use register_size instead. Call supply_register.
14765 (usr_store_inferior_registers): Likewise. Call collect_register.
14766 Fix recursive case.
14767 (regsets_fetch_inferior_registers): Improve error message.
14768 (regsets_store_inferior_registers): Add debugging.
14769 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14770 (unstopped_p, linux_signal_pid): New functions.
14771 (linux_target_ops): Add linux_signal_pid.
14772 (linux_init_signals): New function.
14773 (initialize_low): Call it. Initialize using_threads.
14774 * regcache.c (inferior_regcache_data): Add valid
14775 flag.
14776 (get_regcache): Fetch registers lazily. Add fetch argument
14777 and update all callers.
14778 (regcache_invalidate_one, regcache_invalidate): New
14779 functions.
14780 (new_register_cache): Renamed from create_register_cache.
14781 Return the new regcache.
14782 (free_register_cache): Change argument to a void *.
14783 (registers_to_string, registers_from_string): Call get_regcache
14784 with fetch flag set.
14785 (register_data): Make static. Pass fetch flag to get_regcache.
14786 (supply_register): Call get_regcache with fetch flag clear.
14787 (collect_register): Call get_regcache with fetch flag set.
14788 (collect_register_as_string): New function.
14789 * regcache.h: Update.
14790 * remote-utils.c (putpkt): Flush after debug output and use
14791 stderr.
14792 Handle input interrupts while waiting for an ACK.
14793 (input_interrupt): Use signal_pid method.
14794 (getpkt): Flush after debug output and use stderr.
14795 (outreg): Use collect_register_as_string.
14796 (new_thread_notify, dead_thread_notify): New functions.
14797 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14798 and general_thread.
14799 (look_up_one_symbol): Flush after debug output.
14800 * server.c (step_thread, server_waiting): New variables.
14801 (start_inferior): Don't use signal_pid. Update call to mywait.
14802 (attach_inferior): Update call to mywait.
14803 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14804 (main): Don't fetch/store registers explicitly. Use
14805 set_desired_inferior. Support proposed ``Hs'' packet. Update
14806 calls to mywait.
14807 * server.h: Update.
14808 (struct inferior_list, struct_inferior_list_entry): New.
14809 * target.c (set_desired_inferior): New.
14810 (write_inferior_memory): Constify.
14811 (mywait): New function.
14812 * target.h: Update.
14813 (struct target_ops): New signal_pid method.
14814 (mywait): Removed macro, added prototype.
14815
14816 * linux-low.h (regset_func): Removed.
14817 (regset_fill_func, regset_store_func): New.
14818 (enum regset_type): New.
14819 (struct regset_info): Add type field. Use new operation types.
14820 (struct linux_target_ops): stop_pc renamed to get_pc.
14821 Add decr_pc_after_break and breakpoint_at.
14822 (get_process, get_thread_proess, get_process_thread)
14823 (strut process_info, all_processes, linux_attach_lwp)
14824 (thread_db_init): New.
14825
14826 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14827 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14828 (the_low_target): Add new members.
14829 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14830 (i386_store_fpxregset): Constify.
14831 (target_regsets): Add new kind identifier.
14832 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14833 (i386_set_pc): Add debugging.
14834 (i386_breakpoint_at): New function.
14835 (the_low_target): Add new members.
14836 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14837 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14838 (mips_breakpoint_at): New.
14839 (the_low_target): Add new members.
14840 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14841 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14842 (the_low_target): Add new members.
14843 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14844 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14845 (the_low_target): Add new members.
14846 * linux-x86-64-low.c (target_regsets): Add new kind
14847 identifier.
14848
148492002-05-15 Daniel Jacobowitz <drow@mvista.com>
14850
14851 From Martin Pool <mbp@samba.org>:
14852 * server.c (gdbserver_usage): New function.
14853 (main): Call it.
14854
148552002-05-14 Daniel Jacobowitz <drow@mvista.com>
14856
14857 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14858 stop_at -> stop_pc.
14859
148602002-05-04 Andrew Cagney <ac131313@redhat.com>
14861
14862 * Makefile.in: Remove obsolete code.
14863
148642002-04-24 Michal Ludvig <mludvig@suse.cz>
14865
14866 * linux-low.c (regsets_fetch_inferior_registers),
14867 (regsets_store_inferior_registers): Removed cast to int from
14868 ptrace() calls.
14869 * regcache.h: Added declaration of struct inferior_info.
14870
148712002-04-20 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * inferiors.c (struct inferior_info): Add regcache_data.
14874 (add_inferior): Call create_register_cache.
14875 (clear_inferiors): Call free_register_cache.
14876 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14877 * regcache.c (struct inferior_regcache_data): New.
14878 (registers): Remove.
14879 (get_regcache): New function.
14880 (create_register_cache, free_register_cache): New functions.
14881 (set_register_cache): Don't initialize the register cache here.
14882 (registers_to_string, registers_from_string, register_data): Call
14883 get_regcache.
14884 * regcache.h: Add prototypes.
14885 * server.h: Likewise.
14886
148872002-04-20 Daniel Jacobowitz <drow@mvista.com>
14888
14889 * mem-break.c: New file.
14890 * mem-break.h: New file.
14891 * Makefile.in: Add mem-break.o rule; update server.h
14892 dependencies.
14893 * inferiors.c (struct inferior_info): Add target_data
14894 member.
14895 (clear_inferiors): Free target_data member if set.
14896 (inferior_target_data, set_inferior_target_data): New functions.
14897 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14898 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14899 * linux-low.c (linux_bp_reinsert): New variable.
14900 (struct inferior_linux_data): New.
14901 (linux_create_inferior): Use set_inferior_target_data.
14902 (linux_attach): Likewise. Call add_inferior.
14903 (linux_wait_for_one_inferior): New function.
14904 (linux_wait): Call it.
14905 (linux_write_memory): Add const.
14906 (initialize_low): Call set_breakpoint_data.
14907 * linux-low.h (struct linux_target_ops): Add breakpoint
14908 handling members.
14909 * server.c (attach_inferior): Remove extra add_inferior
14910 call.
14911 * server.h: Include mem-break.h. Update inferior.c
14912 prototypes.
14913 * target.c (read_inferior_memory)
14914 (write_inferior_memory): New functions.
14915 * target.h (read_inferior_memory)
14916 (write_inferior_memory): Change macros to prototypes.
14917 (struct target_ops): Update comments. Add const to write_memory
14918 definition.
14919
149202002-04-11 Daniel Jacobowitz <drow@mvista.com>
14921
14922 * linux-low.c (usr_store_inferior_registers): Support
14923 registers which are allowed to fail to store.
14924 * linux-low.h (linux_target_ops): Likewise.
14925 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14926 (ppc_cannot_store_register): FPSCR may not be storable.
14927
149282002-04-09 Daniel Jacobowitz <drow@mvista.com>
14929
14930 * server.h: Include <string.h> if HAVE_STRING_H.
14931 * ChangeLog: Correct paths in last ChangeLog entry.
14932
149332002-04-09 Daniel Jacobowitz <drow@mvista.com>
14934
14935 * linux-low.h: Remove obsolete prototypes.
14936 (struct linux_target_ops): New.
14937 (extern the_low_target): New.
14938 * linux-low.c (num_regs, regmap): Remove declarations.
14939 (register_addr): Use the_low_target explicitly.
14940 (fetch_register): Likewise.
14941 (usr_fetch_inferior_registers): Likewise.
14942 (usr_store_inferior_registers): Likewise.
14943 * linux-arm-low.c (num_regs): Remove.
14944 (arm_num_regs): Define.
14945 (arm_regmap): Renamed from regmap, made static.
14946 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14947 made static.
14948 (arm_cannot_store_register): Renamed from cannot_store_register,
14949 made static.
14950 (the_low_target): New.
14951 * linux-i386-low.c (num_regs): Remove.
14952 (i386_num_regs): Define.
14953 (i386_regmap): Renamed from regmap, made static.
14954 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14955 made static.
14956 (i386_cannot_store_register): Renamed from cannot_store_register,
14957 made static.
14958 (the_low_target): New.
14959 * linux-ia64-low.c (num_regs): Remove.
14960 (ia64_num_regs): Define.
14961 (ia64_regmap): Renamed from regmap, made static.
14962 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14963 made static.
14964 (ia64_cannot_store_register): Renamed from cannot_store_register,
14965 made static.
14966 (the_low_target): New.
14967 * linux-m68k-low.c (num_regs): Remove.
14968 (m68k_num_regs): Define.
14969 (m68k_regmap): Renamed from regmap, made static.
14970 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14971 made static.
14972 (m68k_cannot_store_register): Renamed from cannot_store_register,
14973 made static.
14974 (the_low_target): New.
14975 * linux-mips-low.c (num_regs): Remove.
14976 (mips_num_regs): Define.
14977 (mips_regmap): Renamed from regmap, made static.
14978 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14979 made static.
14980 (mips_cannot_store_register): Renamed from cannot_store_register,
14981 made static.
14982 (the_low_target): New.
14983 * linux-ppc-low.c (num_regs): Remove.
14984 (ppc_num_regs): Define.
14985 (ppc_regmap): Renamed from regmap, made static.
14986 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14987 made static.
14988 (ppc_cannot_store_register): Renamed from cannot_store_register,
14989 made static.
14990 (the_low_target): New.
14991 * linux-s390-low.c (num_regs): Remove.
14992 (s390_num_regs): Define.
14993 (s390_regmap): Renamed from regmap, made static.
14994 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14995 made static.
14996 (s390_cannot_store_register): Renamed from cannot_store_register,
14997 made static.
14998 (the_low_target): New.
14999 * linux-sh-low.c (num_regs): Remove.
15000 (sh_num_regs): Define.
15001 (sh_regmap): Renamed from regmap, made static.
15002 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15003 made static.
15004 (sh_cannot_store_register): Renamed from cannot_store_register,
15005 made static.
15006 (the_low_target): New.
15007 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15008 (the_low_target): New.
15009
150102002-04-09 Daniel Jacobowitz <drow@mvista.com>
15011
15012 * Makefile.in: Add stamp-h target.
15013 * configure.in: Create stamp-h.
15014 * configure: Regenerated.
15015
150162002-04-09 Daniel Jacobowitz <drow@mvista.com>
15017
15018 * inferiors.c: New file.
15019 * target.c: New file.
15020 * target.h: New file.
15021 * Makefile.in: Add target.o and inferiors.o. Update
15022 dependencies.
15023 * linux-low.c (inferior_pid): New static variable,
15024 moved from server.c.
15025 (linux_create_inferior): Renamed from create_inferior.
15026 Call add_inferior. Return 0 on success instead of a PID.
15027 (linux_attach): Renamed from myattach.
15028 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15029 (linux_thread_alive): Renamed from mythread_alive.
15030 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15031 child dies.
15032 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15033 (regsets_store_inferior_registers): Correct error message.
15034 Add missing ``return 0''.
15035 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15036 (linux_store_registers): Renamed from store_inferior_registers.
15037 (linux_read_memory): Renamed from read_inferior_memory.
15038 (linux_write_memory): Renamed from write_inferior_memory.
15039 (linux_target_ops): New structure.
15040 (initialize_low): Call set_target_ops ().
15041 * remote-utils.c (unhexify): New function.
15042 (hexify): New function.
15043 (input_interrupt): Send signals to ``signal_pid''.
15044 * server.c (inferior_pid): Remove.
15045 (start_inferior): Update create_inferior call.
15046 (attach_inferior): Call add_inferior.
15047 (handle_query): New function.
15048 (main): Call handle_query for `q' packets.
15049 * server.h: Include "target.h". Remove obsolete prototypes.
15050 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15051
150522002-04-09 Daniel Jacobowitz <drow@mvista.com>
15053
15054 * Makefile.in: Add WARN_CFLAGS. Update configury
15055 dependencies.
15056 * configure.in: Check for <string.h>
15057 * configure: Regenerate.
15058 * config.in: Regenerate.
15059 * gdbreplay.c: Include needed system headers.
15060 (remote_open): Remove strchr prototype.
15061 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15062 * regcache.c (supply_register): Change buf argument to const void *.
15063 (supply_register_by_name): Likewise.
15064 (collect_register): Change buf argument to void *.
15065 (collect_register_by_name): Likewise.
15066 * regcache.h: Add missing prototypes.
15067 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15068 * server.c (handle_query): New function.
15069 (attached): New static variable, moved out of main.
15070 (main): Quiet longjmp clobber warnings.
15071 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15072 * utils.c (error): Remove NORETURN.
15073 (fatal): Likewise.
This page took 1.845621 seconds and 4 git commands to generate.