]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Share fork_inferior et al with gdbserver
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
2090129c
SDJ
12017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2 Pedro Alves <palves@redhat.com>
3
4 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
5 * configure: Regenerate.
6 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7 "fork-inferior.o".
8 (i[34567]86-*-lynxos*): Likewise.
9 (spu*-*-*): Likewise.
10 * fork-child.c: New file.
11 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
12 and "environ.h".
13 (linux_ptrace_fun): New function.
14 (linux_create_inferior): Adjust function prototype to reflect
15 change on "target.h". Adjust function code to use
16 "fork_inferior".
17 (linux_request_interrupt): Delete "signal_pid".
18 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
19 (lynx_ptrace_fun): New function.
20 (lynx_create_inferior): Adjust function prototype to reflect
21 change on "target.h". Adjust function code to use
22 "fork_inferior".
23 * nto-low.c (nto_create_inferior): Adjust function prototype and
24 code to reflect change on "target.h". Update comments.
25 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
26 "common-terminal.h" and "environ.h".
27 (terminal_fd): Moved to fork-child.c.
28 (old_foreground_pgrp): Likewise.
29 (restore_old_foreground_pgrp): Likewise.
30 (last_status): Make it global.
31 (last_ptid): Likewise.
32 (our_environ): New variable.
33 (startup_with_shell): Likewise.
34 (program_name): Likewise.
35 (program_argv): Rename to...
36 (program_args): ...this.
37 (wrapper_argv): New variable.
38 (start_inferior): Delete function.
39 (get_exec_wrapper): New function.
40 (get_exec_file): Likewise.
41 (get_environ): Likewise.
42 (prefork_hook): Likewise.
43 (post_fork_inferior): Likewise.
44 (postfork_hook): Likewise.
45 (postfork_child_hook): Likewise.
46 (handle_v_run): Update code to deal with arguments coming from the
47 remote host. Update calls from "start_inferior" to
48 "create_inferior".
49 (captured_main): Likewise. Initialize environment variable. Call
50 "have_job_control".
51 * server.h (post_fork_inferior): New prototype.
52 (get_environ): Likewise.
53 (last_status): Declare.
54 (last_ptid): Likewise.
55 (signal_pid): Likewise.
56 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
57 (spu_ptrace_fun): New function.
58 (spu_create_inferior): Adjust function prototype to reflect change
59 on "target.h". Adjust function code to use "fork_inferior".
60 * target.c (target_terminal_init): New function.
61 (target_terminal_inferior): Likewise.
62 (target_terminal_ours): Likewise.
63 * target.h: Include <vector>.
64 (struct target_ops) <create_inferior>: Update prototype.
65 (create_inferior): Update macro.
66 * utils.c (gdb_flush_out_err): New function.
67 * win32-low.c (win32_create_inferior): Adjust function prototype
68 and code to reflect change on "target.h".
69
043a4934
SDJ
702017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
71
72 * inferiors.c (switch_to_thread): New function.
73
15652511
SDJ
742017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
75
76 * Makefile.in (SFILE): Add "common/job-control.c".
77 (OBS): Add "job-control.o".
78
21ea5acd
SDJ
792017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
80
81 * Makefile: Remove "@host_makefile_frag@".
82
e13cb306
PA
832017-05-05 Pedro Alves <palves@redhat.com>
84
85 * configure: Regenerate.
86
c94fee56
SDJ
872017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
88
89 * configure: Regenerate.
90
a0ff9e1a
SM
912017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
92
93 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
94 software_single_step change of return type to
95 std::vector<CORE_ADDR>.
96 * linux-low.c (install_software_single_step_breakpoints):
97 Likewise.
98 * linux-low.h (install_software_single_step_breakpoints):
99 Likewise.
100
be628ab8
SDJ
1012017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
102
103 * remote-utils.c: Include "gdb_termios.h" instead of
104 "terminal.h".
105 * terminal.h: Delete file.
106
7c5ded6a
SDJ
1072017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
108
109 * server.c: Include <vector>.
110 <program_argv, wrapper_argv>: Convert to std::vector.
111 (start_inferior): Rewrite function to use C++.
112 (handle_v_run): Likewise. Update code that calculates the argv
113 based on the vRun packet; use C++.
114 (captured_main): Likewise.
115
436252de
SM
1162017-04-06 Simon Marchi <simon.marchi@ericsson.com>
117
118 * server.c (handle_v_cont): Initialize thread_resume::thread
119 with null_ptid.
120
9bf2a700
PA
1212017-04-05 Pedro Alves <palves@redhat.com>
122
123 * configure: Regenerate.
124
a121b7c1
PA
1252017-04-05 Pedro Alves <palves@redhat.com>
126
127 * gdbreplay.c (sync_error): Constify.
128 * linux-x86-low.c (push_opcode): Constify.
129
21c8a587
PA
1302017-04-05 Pedro Alves <palves@redhat.com>
131
132 * win32-low.c (get_child_debug_event)
133 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
134 Report TARGET_WAITKIND_SPURIOUS instead.
135
fb32b4f7
PA
1362017-04-05 Pedro Alves <palves@redhat.com>
137
138 * remote-utils.c (remote_prepare, remote_open): Constify.
139 * remote-utils.h (remote_prepare, remote_open): Constify.
140 * server.c (captured_main): Constify 'port' handling.
141
65dd1e59
SM
1422017-04-04 Simon Marchi <simon.marchi@ericsson.com>
143
144 * Makefile.in (clean): Clear .deps.
145
8fa5b777
SM
1462017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
147
148 * .gitignore: Remove generated files, replace with wildcard.
149 * (clean): Replace removal of generated files with wildcard.
150 (version.c): Replace with...
151 (version-generated.c): ...this.
152 (xml-builtin.c): Replace with...
153 (xml-builtin-generated.c): ...this.
154 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
155 (%.c: *regformats*): Replace with...
156 (%-generated.c: *regformats*): ...this.
157
a12e714b
MF
1582017-03-27 Max Filippov <jcmvbkbc@gmail.com>
159
160 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
161 (xtensa_fill_gregset): Call collect_register_by_name for
162 threadptr register.
163 (xtensa_store_gregset): Call supply_register_by_name for
164 threadptr register.
165
1a09b50a
MF
1662017-03-27 Max Filippov <jcmvbkbc@gmail.com>
167
168 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
169 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
170 (xtensa_store_gregset): Call supply_register for all registers in
171 a0_regnum..a0_regnum + C0_NREGS range.
172
1a01e7c6
SM
1732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
174
175 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
176 (ax-ipa.o: ax.c): Remove.
177 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
178 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
179 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
180 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
181 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
182
36bc18a8
SM
1832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
184
185 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
186 (print-utils-ipa.o: ../common/print-utils.c): Remove.
187 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
188 (errors-ipa.o: ../common/errors.c): Remove.
189 (format-ipa.o: ../common/format.c): Remove.
190 (common-utils-ipa.o: ../common/common-utils.c): Remove.
191
a8ebe3d5
SM
1922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
193
194 * Makefile.in (%-ipa.o: %.c): New rule.
195 (tracepoint-ipa.o: tracepoint.c): Remove.
196 (utils-ipa.o: utils.c): Remove.
197 (remote-utils-ipa.o: remote-utils.c): Remove.
198 (regcache-ipa.o: regcache.c): Remove.
199 (i386-linux-ipa.o: i386-linux.c): Remove.
200 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
201 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
202 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
203 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
204 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
205 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
206 (amd64-linux-ipa.o: amd64-linux.c): Remove.
207 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
208 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
209 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
210 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
211 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
212 (aarch64-ipa.o: aarch64.c): Remove.
213 (s390-linux32-ipa.o: s390-linux32.c): Remove.
214 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
215 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
216 (s390-linux64-ipa.o: s390-linux64.c): Remove.
217 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
218 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
219 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
220 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
221 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
222 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
223 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
224 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
225 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
226 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
227 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
228 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
229 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
230 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
231 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
232 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
233 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
234 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
235 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
236 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
237 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
238 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
239 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
240 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
241 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
242 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
243 (tdesc-ipa.o: tdesc.c): Remove.
244 (x32-linux-ipa.o: x32-linux.c): Remove.
245 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
246 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
247
50cfacb7
SM
2482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
249
250 * Makefile.in (%.o: ../arch/%.c): New rule.
251 (arm.o: ../arch/arm.c): Remove.
252 (arm-linux.o: ../arch/arm-linux.c): Remove.
253 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
254 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
255
c5a22423
SM
2562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
257
258 * Makefile.in (%.o: ../nat/%.c): New rule.
259 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
260 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
261 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
262 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
263 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
264 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
265 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
266 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
267 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
268 (linux-personality.o: ../nat/linux-personality.c): Remove.
269 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
270 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
271 (x86-linux.o: ../nat/x86-linux.c): Remove.
272 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
273 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
274
6bda016b
SM
2752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
276
277 * Makefile.in (%.o: ../common/%.c): New rule.
278 (signals.o: ../common/signals.c): Remove.
279 (print-utils.o: ../common/print-utils.c): Remove.
280 (rsp-low.o: ../common/rsp-low.c): Remove.
281 (common-utils.o: ../common/common-utils.c): Remove.
282 (posix-strerror.o: ../common/posix-strerror.c): Remove.
283 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
284 (vec.o: ../common/vec.c): Remove.
285 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
286 (xml-utils.o: ../common/xml-utils.c): Remove.
287 (ptid.o: ../common/ptid.c): Remove.
288 (buffer.o: ../common/buffer.c): Remove.
289 (format.o: ../common/format.c): Remove.
290 (filestuff.o: ../common/filestuff.c): Remove.
291 (agent.o: ../common/agent.c): Remove.
292 (errors.o: ../common/errors.c): Remove.
293 (environ.o: ../common/environ.c): Remove.
294 (common-debug.o: ../common/common-debug.c): Remove.
295 (cleanups.o: ../common/cleanups.c): Remove.
296 (common-exceptions.o: ../common/common-exceptions.c): Remove.
297 (fileio.o: ../common/fileio.c): Remove.
298 (common-regcache.o: ../common/common-regcache.c): Remove.
299 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
300 (new-op.o: ../common/new-op.c): Remove.
301 (btrace-common.o: ../common/btrace-common.c): Remove.
302
21122961
SM
3032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
304
305 * Makefile.in (%.o: ../target/%.c): New rule.
306 (waitstatus.o: ../target/waitstatus.c): Remove.
307
c362e621
SM
3082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
309
310 * Makefile.in
311 (%.c: ../regformats/%.dat,
312 (%.c: ../regformats/arm/%.dat,
313 (%.c: ../regformats/i386/%.dat,
314 (%.c: ../regformats/rs6000/%.dat): New rules.
315 (aarch64.c): Remove.
316 (reg-arm.c): Remove.
317 (arm-with-iwmmxt.c): Remove.
318 (arm-with-vfpv2.c): Remove.
319 (arm-with-vfpv3.c): Remove.
320 (arm-with-neon.c): Remove.
321 (reg-bfin.c): Remove.
322 (reg-cris.c): Remove.
323 (reg-crisv32.c): Remove.
324 (i386.c): Remove.
325 (i386-linux.c): Remove.
326 (i386-avx.c): Remove.
327 (i386-avx-linux.c): Remove.
328 (i386-avx-avx512.c): Remove.
329 (i386-avx-avx512-linux.c): Remove.
330 (i386-mpx.c): Remove.
331 (i386-mpx-linux.c): Remove.
332 (i386-avx-mpx-avx512-pku.c): Remove.
333 (i386-avx-mpx-avx512-pku-linux.c): Remove.
334 (i386-avx-mpx.c): Remove.
335 (i386-avx-mpx-linux.c): Remove.
336 (i386-mmx.c): Remove.
337 (i386-mmx-linux.c): Remove.
338 (reg-ia64.c): Remove.
339 (reg-m32r.c): Remove.
340 (reg-m68k.c): Remove.
341 (reg-cf.c): Remove.
342 (mips-linux.c): Remove.
343 (mips-dsp-linux.c): Remove.
344 (mips64-linux.c): Remove.
345 (mips64-dsp-linux.c): Remove.
346 (nios2-linux.c): Remove.
347 (powerpc-32.c): Remove.
348 (powerpc-32l.c): Remove.
349 (powerpc-altivec32l.c): Remove.
350 (powerpc-cell32l.c): Remove.
351 (powerpc-vsx32l.c): Remove.
352 (powerpc-isa205-32l.c): Remove.
353 (powerpc-isa205-altivec32l.c): Remove.
354 (powerpc-isa205-vsx32l.c): Remove.
355 (powerpc-e500l.c): Remove.
356 (powerpc-64l.c): Remove.
357 (powerpc-altivec64l.c): Remove.
358 (powerpc-cell64l.c): Remove.
359 (powerpc-vsx64l.c): Remove.
360 (powerpc-isa205-64l.c): Remove.
361 (powerpc-isa205-altivec64l.c): Remove.
362 (powerpc-isa205-vsx64l.c): Remove.
363 (s390-linux32.c): Remove.
364 (s390-linux32v1.c): Remove.
365 (s390-linux32v2.c): Remove.
366 (s390-linux64.c): Remove.
367 (s390-linux64v1.c): Remove.
368 (s390-linux64v2.c): Remove.
369 (s390-te-linux64.c): Remove.
370 (s390-vx-linux64.c): Remove.
371 (s390-tevx-linux64.c): Remove.
372 (s390x-linux64.c): Remove.
373 (s390x-linux64v1.c): Remove.
374 (s390x-linux64v2.c): Remove.
375 (s390x-te-linux64.c): Remove.
376 (s390x-vx-linux64.c): Remove.
377 (s390x-tevx-linux64.c): Remove.
378 (tic6x-c64xp-linux.c): Remove.
379 (tic6x-c64x-linux.c): Remove.
380 (tic6x-c62x-linux.c): Remove.
381 (reg-sh.c): Remove.
382 (reg-sparc64.c): Remove.
383 (reg-spu.c): Remove.
384 (amd64.c): Remove.
385 (amd64-linux.c): Remove.
386 (amd64-avx.c): Remove.
387 (amd64-avx-linux.c): Remove.
388 (amd64-avx-avx512.c): Remove.
389 (amd64-avx-avx512-linux.c): Remove.
390 (amd64-mpx.c): Remove.
391 (amd64-mpx-linux.c): Remove.
392 (amd64-avx-mpx-avx512-pku.c): Remove.
393 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
394 (amd64-avx-mpx.c): Remove.
395 (amd64-avx-mpx-linux.c): Remove.
396 (x32.c): Remove.
397 (x32-linux.c): Remove.
398 (x32-avx.c): Remove.
399 (x32-avx-linux.c): Remove.
400 (x32-avx-avx512.c): Remove.
401 (x32-avx-avx512-linux.c): Remove.
402 (reg-xtensa.c): Remove.
403 (reg-tilegx.c): Remove.
404 (reg-tilegx32.c): Remove.
405
1672e0d9
SDJ
4062017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
407
408 * Makefile.in (SFILES): Add "common/environ.c".
409 (OBJS): Add "common/environ.h".
410
239b6d10
WT
4112017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
412
413 * configure.ac: Check if the fs_base and gs_base members of
414 `struct user_regs_struct' exist.
415 * config.in: Regenerated.
416 * configure: Likewise.
417
694b382c
AT
4182017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
419
420 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
421 target_read_memory.
422 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
423 (get_next_pcs_syscall_next_pc): Likewise.
424
7dc53023
LM
4252016-12-23 Luis Machado <lgustavo@codesourcery.com>
426
427 * win32-i386-low.c: Fix incorrect reference to a couple source files.
428 * nto-x86-low.c: Likewise.
429
ad02e4fe
SM
4302016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
431
432 * Makefile.in: Include disable-implicit-rules.mk.
433
dcb07cfa
PA
4342016-11-23 Pedro Alves <palves@redhat.com>
435
436 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
437 (debug_vprintf): Use std::chrono::steady_clock instead of
438 gettimeofday. Use '.' instead of ':'.
439 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
440 (get_timestamp): Use std::chrono::steady_clock instead of
441 gettimeofday.
442
8629c02c
SM
4432016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
444
445 * Makefile.in: Fix whitespace formatting.
446
b593ecca
SM
4472016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
448
449 * Makefile.in (SFILES, OBS): Flatten list and order
450 alphabetically.
451
9986ba08
PA
4522016-11-23 Pedro Alves <palves@redhat.com>
453
454 * event-loop.c (handle_file_event): Use warning.
455 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
456 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
457 Use warning.
458
4eefa7bc
PA
4592016-11-23 Pedro Alves <palves@redhat.com>
460
461 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
462 output.
463 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
464 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
465 debug_printf and debug_flush for debug output.
466 * server.c (handle_general_set): Likewise.
467 * thread-db.c (try_thread_db_load): Use debug_printf for debug
468 output.
469
5443506e
SM
4702016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
471
472 * Makefile.in (.c.o): Replace rule with ...
473 (%.o: %.c): ... this one.
474
3b165252
SM
4752016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
476
477 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
478 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
479 make.
480 * configure.ac: Remove checks for the make program.
481 * configure: Re-generate.
482
0bcda685
PA
4832016-10-28 Pedro Alves <palves@redhat.com>
484
485 * Makefile.in (CXX_DIALECT): Get from configure.
486 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
487 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
488 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
489 * config.in: Regenerate.
490 * configure: Regenerate.
491
c3805894
YQ
4922016-10-27 Yao Qi <yao.qi@linaro.org>
493
494 * linux-low.c (linux_supports_range_stepping): Return true if
495 can_software_single_step return true.
496
89342618
YQ
4972016-10-27 Yao Qi <yao.qi@linaro.org>
498
499 * inferiors.c (find_inferior_in_random): New function.
500 * inferiors.h (find_inferior_in_random): Declare.
501 * linux-low.c (linux_wait_for_event_filtered): Call
502 find_inferior_in_random instead of find_inferior.
503
e3652c84
YQ
5042016-10-27 Yao Qi <yao.qi@linaro.org>
505
506 * linux-low.c (linux_wait_1): If single-step breakpoints are
507 inserted, remove them.
508
5a04c4cf
PA
5092016-10-26 Pedro Alves <palves@redhat.com>
510
511 * linux-low.c (handle_extended_wait): Link parent/child fork
512 threads.
513 (linux_wait_1): Unlink them.
514 (linux_set_resume_request): Ignore resume requests for
515 already-resumed and unhandled fork child threads.
516 * linux-low.h (struct lwp_info) <fork_relative>: New field.
517 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
518 New functions.
519 (handle_v_requests) <vCont>: Don't call require_running.
520 * server.h (in_queued_stop_replies): New declaration.
521
cb93dc7f
YQ
5222016-10-24 Yao Qi <yao.qi@linaro.org>
523
524 PR server/20733
525 * linux-aarch64-low.c (append_insns): Cast the return value to
526 'uint32_t *'.
527
a1078bea
YQ
5282016-10-10 Yao Qi <yao.qi@linaro.org>
529
530 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
531
1fb77080
SDJ
5322016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
533
534 * target.c (target_supports_multi_process): New function, moved
535 from...
536 * target.h (target_supports_multi_process): ... here. Remove
537 macro.
538
39b5a3b9
TT
5392016-10-05 Tom Tromey <tom@tromey.com>
540
541 PR remote/20655:
542 * tracepoint.c (handle_tracepoint_bkpts): Check
543 ipa_error_tracepoint, not ipa_stopping_tracepoint.
544
c1d0b70a
YQ
5452016-10-05 Yao Qi <yao.qi@linaro.org>
546
547 * configure.srv: Update the path of arm-*.xml files.
548
0a69eedb
YQ
5492016-10-05 Terry Guo <terry.guo@arm.com>
550 Yao Qi <yao.qi@linaro.org>
551
552 * Makefile.in: Adjust the path of rules.
553 * configure.srv: Update the path of xml files.
554 * regformats/arm-with-iwmmxt.dat: Regenerated.
555 * regformats/arm-with-neon.dat: Likewise.
556 * regformats/arm-with-vfpv2.dat: Likewise.
557 * regformats/arm-with-vfpv3.dat Likewise.
558
17e16485
YQ
5592016-09-30 Yao Qi <yao.qi@linaro.org>
560
561 PR gdbserver/20627
562 * target.c (target_stop_and_wait): Don't call
563 target_continue_no_signal, use resume_stop instead.
564
edeeb602
YQ
5652016-09-26 Yao Qi <yao.qi@linaro.org>
566
567 * linux-low.c (linux_wait_1): Call debug_exit.
568
503b1c39
PA
5692016-09-23 Pedro Alves <palves@redhat.com>
570
571 * Makefile.in (SFILES): Add common/new-op.c.
572 (OBS): Add common/new-op.o.
573 (new-op.o): New rule.
574
74172ecf
SM
5752016-09-21 Simon Marchi <simon.marchi@ericsson.com>
576
577 * .gitinore: Ignore more files.
578
fc6cda2e
YQ
5792016-09-21 Yao Qi <yao.qi@linaro.org>
580
581 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
582 23.
583
bc1e6c81
SDJ
5842016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
585
586 * server.c (start_inferior): Call target_mourn_inferior instead of
587 mourn_inferior; pass ptid_t argument to it.
588 (resume): Likewise.
589 (handle_target_event): Likewise.
590 * target.c (target_mourn_inferior): New function.
591 * target.h (mourn_inferior): Delete macro.
592
0e00e962
AA
5932016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
594
595 * linux-low.c (lwp_is_stepping): New function.
596
1d8cb77d
CL
5972016-09-06 Carl Love <cel@us.ibm.com>
598
599 * server.c (start_inferior): Fixed comment, requested comment change
600 didn't get updated correctly. Removed reference to ptrace () call as
601 it is only true on Linux systems.
602
7313bced
CL
6032016-09-06 Carl Love <cel@us.ibm.com>
604
605 * server.c (start_inferior): Do not call
606 function target_post_create_inferior () if the
607 inferior process has already exited.
608
cf6de44d
PA
6092016-09-05 Pedro Alves <palves@redhat.com>
610
611 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
612 (COMPILE.pre, CC_LD): Use CXX directly.
613 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
614 * acinclude.m4: Don't include build-with-cxx.m4.
615 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
616 * configure: Regenerate.
617
c1da6748
AT
6182016-09-02 Akash Trehan <akash.trehan123@gmail.com>
619
620 PR gdb/19495
621 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
622 call writing data to own_buf.
623
f2b9e3df
SDJ
6242016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
625
626 * target.c (mywait): Call target_wait instead of
627 the_target->wait.
628 (target_wait): New function.
629
049a8570
SDJ
6302016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
631
632 * server.c (start_inferior): New variable 'ptid'. Replace calls
633 to the_target->resume by target_continue{,_no_signal}, depending
634 on the case.
635 * target.c (target_stop_and_wait): Call target_continue_no_signal
636 instead of the_target->resume.
637 (target_continue): New function.
638
3aa5cfa0
AT
6392016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
640
641 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
642
754653a7
AZ
6432016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
644
645 PR server/20491
646 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
647 ps_prochandle.
648 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
649 * linux-arm-low.c (ps_get_thread_area): Likewise.
650 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
651 * linux-m68k-low.c (ps_get_thread_area): Likewise.
652 * linux-mips-low.c (ps_get_thread_area): Likewise.
653 * linux-nios2-low.c (ps_get_thread_area): Likewise.
654 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
655 * linux-x86-low.c (ps_get_thread_area): Likewise.
656 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
657
ed036b40
PA
6582016-08-19 Pedro Alves <palves@redhat.com>
659
660 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
661
c8ef42ee
PA
6622016-08-19 Pedro Alves <palves@redhat.com>
663
664 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
665 comment. Use memcpy instead of casting through unsigned long.
666
9c235a72
PA
6672016-08-19 Pedro Alves <palves@redhat.com>
668
669 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
670 allocating around 0x80000000.
671
201506da
PA
6722016-08-19 Pedro Alves <palves@redhat.com>
673
674 PR gdb/20415
675 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
676 (x32-avx512-linux-ipa.o): New rules.
677 * configure.ac (x86_64-*-linux*): New x32 check.
678 * configure.srv (ipa_x32_linux_regobj): New.
679 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
680 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
681 descriptions.
682 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
683 descriptions.
684 * configure: Regenerate.
685
f348d89a
PA
6862016-08-09 Pedro Alves <palves@redhat.com>
687
688 PR gdb/18653
689 * Makefile.in (OBS): Add signals-state-save-restore.o.
690 (signals-state-save-restore.o): New rule.
691 * config.in: Regenerate.
692 * configure: Regenerate.
693 * linux-low.c: Include "signals-state-save-restore.h".
694 (linux_create_inferior): Call
695 restore_original_signals_state.
696 * server.c: Include "dispositions-save-restore.h".
697 (captured_main): Call save_original_signals_state.
698
1baf5149
PA
6992016-08-05 Pedro Alves <palves@redhat.com>
700
701 * configure: Regenerate.
702
fcd4a73d
YQ
7032016-08-04 Yao Qi <yao.qi@linaro.org>
704
705 * linux-low.c (regsets_fetch_inferior_registers): Check
706 errno is ESRCH or not.
707
979659d0
YQ
7082016-08-02 Yao Qi <yao.qi@linaro.org>
709
710 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
711 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
712 (thread_db_load_search): Update.
713 (try_thread_db_load_1): Don't look for td_ta_event_addr,
714 td_ta_set_event and td_ta_event_getmsg.
715
6598661d
PA
7162016-07-26 Pedro Alves <palves@redhat.com>
717
718 PR server/20414
719 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
720 of unsigned long for 64-bit registers and use uint32_t instead of
721 unsigned int for 32-bit registers.
722
9cf12d57
PA
7232016-07-26 Pedro Alves <palves@redhat.com>
724
725 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
726 to 'ptrace'.
727
305450ed
TT
7282016-07-21 Tom Tromey <tom@tromey.com>
729
730 * configure: Rebuild.
731
2583da7c
YQ
7322016-07-21 Yao Qi <yao.qi@linaro.org>
733
734 * mem-break.c (find_gdb_breakpoint): Cast bp to
735 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
736
21536b36
YQ
7372016-07-21 Yao Qi <yao.qi@linaro.org>
738
739 * server.c (handle_v_requests): Support s and S actions
740 if target_supports_software_single_step return true.
741
8901d193
YQ
7422016-07-21 Yao Qi <yao.qi@linaro.org>
743
744 * linux-low.c (resume_stopped_resumed_lwps): If resume request
745 is resume_step, call maybe_hw_step.
746 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
747 and unstop them.
748 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
749 breakpoints or not.
750 (proceed_one_lwp): If resume request is resume_step, install
751 reinsert breakpoints and call maybe_hw_step.
752
0e9a339e
YQ
7532016-07-21 Yao Qi <yao.qi@linaro.org>
754
755 * linux-low.c (proceed_one_lwp): Declare.
756 (linux_resume_one_thread): Remove local variable 'step'.
757 Lift code enqueue signal. Call proceed_one_lwp instead of
758 linux_resume_one_lwp.
759
4281b351
YQ
7602016-07-21 Yao Qi <yao.qi@linaro.org>
761
762 * linux-low.c (linux_resume_one_thread): Call
763 enqueue_pending_signal.
764
984a2c04
YQ
7652016-07-21 Yao Qi <yao.qi@linaro.org>
766
767 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
768 * inferiors.c (do_restore_current_thread_cleanup): New function.
769 (make_cleanup_restore_current_thread): Likewise.
770 * linux-low.c (install_software_single_step_breakpoints): Call
771 make_cleanup_restore_current_thread. Switch current_thread to
772 thread.
773
bec903c9
YQ
7742016-07-21 Yao Qi <yao.qi@linaro.org>
775
776 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
777 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
778 (clone_one_breakpoint): Likewise.
779 (delete_reinsert_breakpoints): Change parameter to thread.
780 Callers updated.
781 (has_reinsert_breakpoints): Likewise.
782 (uninsert_reinsert_breakpoints): Likewise.
783 (reinsert_reinsert_breakpoints): Likewise.
784 * mem-break.h (set_reinsert_breakpoint): Update declaration.
785 (delete_reinsert_breakpoints): Likewise.
786 (reinsert_reinsert_breakpoints): Likewise.
787 (uninsert_reinsert_breakpoints): Likewise.
788 (has_reinsert_breakpoints): Likewise.
789
63c40ec7
YQ
7902016-07-21 Yao Qi <yao.qi@linaro.org>
791
792 * inferiors.c (get_thread_process): Make parameter const.
793 * inferiors.h (get_thread_process): Update declaration.
794 * mem-break.c (clone_all_breakpoints): Remove all parameters.
795 Add new parameters child_thread and parent_thread. Callers
796 updated.
797 * mem-break.h (clone_all_breakpoints): Update declaration.
798
9aa76cd0
YQ
7992016-07-21 Yao Qi <yao.qi@linaro.org>
800
801 * mem-break.c (struct breakpoint) <cond_list>: Remove.
802 <command_list, handler>: Remove.
803 (struct gdb_breakpoint): New.
804 (struct other_breakpoint): New.
805 (struct reinsert_breakpoint): New.
806 (is_gdb_breakpoint): New function.
807 (any_persistent_commands): Update command_list if
808 is_gdb_breakpoint returns true.
809 (set_breakpoint): Create breakpoints according to their types.
810 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
811 (set_gdb_breakpoint_1): Likewise.
812 (set_gdb_breakpoint): Likewise.
813 (clear_breakpoint_conditions): Change parameter type to
814 'struct gdb_breakpoint *'.
815 (clear_breakpoint_commands): Likewise.
816 (clear_breakpoint_conditions_and_commands): Likewise.
817 (add_condition_to_breakpoint): Likewise.
818 (add_breakpoint_condition): Likewise.
819 (add_commands_to_breakpoint): Likewise.
820 (check_breakpoints): Check other_breakpoint.
821 (clone_one_breakpoint): Clone breakpopint according to its type.
822 * mem-break.h (struct gdb_breakpoint): Declare.
823 (set_gdb_breakpoint): Update declaration.
824 (clear_breakpoint_conditions_and_commands): Likewise.
825 (add_breakpoint_condition): Likewise.
826 (add_breakpoint_commands): Likewise.
827 * server.c (process_point_options): Change parameter type to
828 'struct gdb_breakpoint *'.
829
811f8301
YQ
8302016-07-21 Yao Qi <yao.qi@linaro.org>
831
832 * mem-break.c (set_breakpoint_at): Rename it to ...
833 (set_breakpoint_type_at): ... it.
834 (set_breakpoint_at): Call set_breakpoint_type_at.
835 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
836 * mem-break.h (set_breakpoint_at): Update comments.
837
b1c51e36
CLT
8382016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
839
840 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
841 to buf parameter.
842 (nios2_store_gregset): Likewise.
843
ced2dffb
PA
8442016-07-01 Pedro Alves <palves@redhat.com>
845 Antoine Tremblay <antoine.tremblay@ericsson.com>
846
847 * linux-low.c: Change interface to take the target lwp_info
848 pointer directly and return void. Handle detaching from a zombie
849 thread.
850 (linux_detach_lwp_callback): New function.
851 (linux_detach): Detach from the leader thread after detaching from
852 the clone threads.
853
2ac09a5b
YQ
8542016-06-28 Yao Qi <yao.qi@linaro.org>
855
856 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
857 for variable new_offset.
858 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
859 (aarch64_ftrace_insn_reloc_cb): Likewise.
860 (aarch64_ftrace_insn_reloc_tb): Likewise.
861 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
862 PRIx64 instead of PRIx32.
863
79e7fd4f
YQ
8642016-06-28 Yao Qi <yao.qi@linaro.org>
865
866 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
867 (the_low_target): Install arm_get_syscall_trapinfo.
868
061fc021
YQ
8692016-06-28 Yao Qi <yao.qi@linaro.org>
870
871 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
872 function.
873 (the_low_target): Install aarch64_get_syscall_trapinfo.
874
4cc32bec
YQ
8752016-06-28 Yao Qi <yao.qi@linaro.org>
876
877 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
878 Callers updated.
879 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
880 Remove parameter sysno.
881 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
882 sysret.
883
782c1122
AA
8842016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
885
886 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
887 (s390_emit_ne_goto): Likewise.
888 (s390_emit_lt_goto): Likewise.
889 (s390_emit_le_goto): Likewise.
890 (s390_emit_gt_goto): Likewise.
891 (s390_emit_ge_goto): Likewise.
892 (s390x_emit_eq_goto): Likewise.
893 (s390x_emit_ne_goto): Likewise.
894 (s390x_emit_lt_goto): Likewise.
895 (s390x_emit_le_goto): Likewise.
896 (s390x_emit_gt_goto): Likewise.
897 (s390x_emit_ge_goto): Likewise.
898 (s390_emit_ops_impl): Mark variable static.
899 (s390x_emit_ops): Likewise.
900
2e7b624b
YQ
9012016-06-17 Yao Qi <yao.qi@linaro.org>
902
903 * linux-low.c (handle_extended_wait): Call
904 uninsert_reinsert_breakpoints for the parent process. Remove
905 reinsert breakpoints from the child process. Reinsert them to
906 the parent process when vfork is done.
907 * mem-break.c (uninsert_reinsert_breakpoints): New function.
908 (reinsert_reinsert_breakpoints): New function.
909 * mem-break.h (uninsert_reinsert_breakpoints): Declare
910 (reinsert_reinsert_breakpoints): Declare.
911
8a81c5d7
YQ
9122016-06-17 Yao Qi <yao.qi@linaro.org>
913
914 * linux-low.c (handle_extended_wait): If the parent is doing
915 step-over, remove the reinsert breakpoints from the forked child.
916
f50bf8e5
YQ
9172016-06-17 Yao Qi <yao.qi@linaro.org>
918
919 * linux-low.c (unsuspend_all_lwps): Declare.
920 (linux_low_filter_event): If thread exited, call finish_step_over.
921 If step-over is finished, unsuspend other threads.
922
8376a3cb
YQ
9232016-06-17 Yao Qi <yao.qi@linaro.org>
924
925 * linux-low.c (linux_resume_one_lwp_throw): Assert
926 has_reinsert_breakpoints returns false.
927 * mem-break.c (delete_disabled_breakpoints): Assert
928 bp type isn't reinsert_breakpoint.
929
f79b145d
YQ
9302016-06-17 Yao Qi <yao.qi@linaro.org>
931
932 * linux-low.c (maybe_hw_step): New function.
933 (linux_resume_one_lwp_throw): Call maybe_hw_step.
934 (finish_step_over): Switch current_thread to lwp temporarily,
935 and assert has_reinsert_breakpoints returns true.
936 (proceed_one_lwp): Call maybe_hw_step.
937 * mem-break.c (has_reinsert_breakpoints): New function.
938 * mem-break.h (has_reinsert_breakpoints): Declare.
939
0ae534d2
JT
9402016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
941
942 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
943
fcdad592
YQ
9442016-05-17 Yao Qi <yao.qi@linaro.org>
945
946 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
947 instead of find_inferior.
948
9e784964
YQ
9492016-05-05 Yao Qi <yao.qi@linaro.org>
950
951 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
952 Initialize res to zero.
953
cf2ebb6e
YQ
9542016-05-05 Yao Qi <yao.qi@linaro.org>
955
956 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
957 to uint32_t.
958
c1aebf87
UW
9592016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
960
961 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
962 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
963 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
964
35fd2deb 9652016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 966 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
967
968 * tracepoint.c (write_inferior_int8): New function.
969 (cmd_qtenable_disable): Write enable flag using
970 write_inferior_int8.
971
484b3c32
YQ
9722016-04-25 Yao Qi <yao.qi@linaro.org>
973
974 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
975 (need_step_over_p): Return zero if the LWP has pending signals
976 can be delivered on software single step target.
977
85ba7d86
YQ
9782016-04-25 Yao Qi <yao.qi@linaro.org>
979
980 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
981 return instead of error.
982
3539aa13
YQ
9832016-04-22 Yao Qi <yao.qi@linaro.org>
984
985 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
986 to 23.
987
5b061e98
YQ
9882016-04-22 Yao Qi <yao.qi@linaro.org>
989
990 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
991 signal when stepping over breakpoint with software single
992 step.
993
3451269c
PA
9942016-04-21 Pedro Alves <palves@redhat.com>
995
996 * linux-s390-low.c (s390_collect_ptrace_register)
997 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
998 add casts.
999 (s390_check_regset): Use void * instead of gdb_byte *.
1000
a2358508
PA
10012016-04-20 Pedro Alves <palves@redhat.com>
1002
1003 * configure: Renegerate.
1004
6885166d
YQ
10052016-04-20 Yao Qi <yao.qi@linaro.org>
1006
1007 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1008 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1009 number 16.
1010 (arm_store_gregset): Likewise.
1011
2b863f51
WT
10122016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1013
1014 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1015 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1016 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1017 (amd64-avx-mpx-linux.c): New rules.
1018 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1019 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1020 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1021 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1022 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1023 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1024 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1025 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1026 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1027 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1028 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1029 * linux-x86-low.c (x86_linux_read_description): Add case for
1030 X86_XSTATE_AVX_MPX_MASK.
1031 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1032 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1033 init_registers_i386_avx_mpx_linux.
1034 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1035 (initialize_low_tracepoint): Call
1036 init_registers_i386_avx_mpx_linux.
1037 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1038 (initialize_low_tracepoint): Call
1039 init_registers_amd64_avx_mpx_linux.
1040 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1041 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1042 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1043 declarations.
1044
9b30624b
PA
10452016-04-18 Pedro Alves <palves@redhat.com>
1046
1047 * configure: Regenerate.
1048
45e3745e
AT
10492016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1050
1051 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1052 (aarch64_emit_sub): Likewise.
1053
2afc13ff
PA
10542016-04-12 Pedro Alves <palves@redhat.com>
1055
1056 * utils.c (prepare_to_throw_exception): Delete.
1057
6e774b13
SM
10582016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1059
1060 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1061
4dca19f8
MK
10622016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1063
1064 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1065
d0a9981f
MK
10662016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1067
1068 * linux-aarch64-ipa.c: Add <elf.h> include.
1069 * linux-ppc-ipa.c: Add <elf.h> include.
1070 * linux-s390-ipa.c: Add <elf.h> include.
1071
252db07e
MK
10722016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1073
1074 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1075 (get_raw_reg_ptr): Likewise.
1076 (get_trace_state_variable_value_ptr): Likewise.
1077 (set_trace_state_variable_value_ptr): Likewise.
1078 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1079 char *.
1080
14e2b6d9
MK
10812016-03-31 Wei-cheng Wang <cole945@gmail.com>
1082 Marcin Kościelnicki <koriakin@0x04.net>
1083
1084 PR/17221
1085 * linux-ppc-low.c (emit_insns): New function.
1086 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1087 (ppc_emit_prologue): New function.
1088 (ppc_emit_epilogue): New function.
1089 (ppc_emit_add): New function.
1090 (ppc_emit_sub): New function.
1091 (ppc_emit_mul): New function.
1092 (ppc_emit_lsh): New function.
1093 (ppc_emit_rsh_signed): New function.
1094 (ppc_emit_rsh_unsigned): New function.
1095 (ppc_emit_ext): New function.
1096 (ppc_emit_zero_ext): New function.
1097 (ppc_emit_log_not): New function.
1098 (ppc_emit_bit_and): New function.
1099 (ppc_emit_bit_or): New function.
1100 (ppc_emit_bit_xor): New function.
1101 (ppc_emit_bit_not): New function.
1102 (ppc_emit_equal): New function.
1103 (ppc_emit_less_signed): New function.
1104 (ppc_emit_less_unsigned): New function.
1105 (ppc_emit_ref): New function.
1106 (ppc_emit_const): New function.
1107 (ppc_emit_reg): New function.
1108 (ppc_emit_pop): New function.
1109 (ppc_emit_stack_flush): New function.
1110 (ppc_emit_swap): New function.
1111 (ppc_emit_stack_adjust): New function.
1112 (ppc_emit_call): New function.
1113 (ppc_emit_int_call_1): New function.
1114 (ppc_emit_void_call_2): New function.
1115 (ppc_emit_if_goto): New function.
1116 (ppc_emit_goto): New function.
1117 (ppc_emit_eq_goto): New function.
1118 (ppc_emit_ne_goto): New function.
1119 (ppc_emit_lt_goto): New function.
1120 (ppc_emit_le_goto): New function.
1121 (ppc_emit_gt_goto): New function.
1122 (ppc_emit_ge_goto): New function.
1123 (ppc_write_goto_address): New function.
1124 (ppc_emit_ops_impl): New static variable.
1125 (ppc64v1_emit_prologue): New function.
1126 (ppc64v2_emit_prologue): New function.
1127 (ppc64_emit_epilogue): New function.
1128 (ppc64_emit_add): New function.
1129 (ppc64_emit_sub): New function.
1130 (ppc64_emit_mul): New function.
1131 (ppc64_emit_lsh): New function.
1132 (ppc64_emit_rsh_signed): New function.
1133 (ppc64_emit_rsh_unsigned): New function.
1134 (ppc64_emit_ext): New function.
1135 (ppc64_emit_zero_ext): New function.
1136 (ppc64_emit_log_not): New function.
1137 (ppc64_emit_bit_and): New function.
1138 (ppc64_emit_bit_or): New function.
1139 (ppc64_emit_bit_xor): New function.
1140 (ppc64_emit_bit_not): New function.
1141 (ppc64_emit_equal): New function.
1142 (ppc64_emit_less_signed): New function.
1143 (ppc64_emit_less_unsigned): New function.
1144 (ppc64_emit_ref): New function.
1145 (ppc64_emit_const): New function.
1146 (ppc64v1_emit_reg): New function.
1147 (ppc64v2_emit_reg): New function.
1148 (ppc64_emit_pop): New function.
1149 (ppc64_emit_stack_flush): New function.
1150 (ppc64_emit_swap): New function.
1151 (ppc64v1_emit_call): New function.
1152 (ppc64v2_emit_call): New function.
1153 (ppc64v1_emit_int_call_1): New function.
1154 (ppc64v2_emit_int_call_1): New function.
1155 (ppc64v1_emit_void_call_2): New function.
1156 (ppc64v2_emit_void_call_2): New function.
1157 (ppc64_emit_if_goto): New function.
1158 (ppc64_emit_eq_goto): New function.
1159 (ppc64_emit_ne_goto): New function.
1160 (ppc64_emit_lt_goto): New function.
1161 (ppc64_emit_le_goto): New function.
1162 (ppc64_emit_gt_goto): New function.
1163 (ppc64_emit_ge_goto): New function.
1164 (ppc64v1_emit_ops_impl): New static variable.
1165 (ppc64v2_emit_ops_impl): New static variable.
1166 (ppc_emit_ops): New function.
1167 (linux_low_target): Wire in ppc_emit_ops.
1168
a2174ba4
MK
11692016-03-31 Wei-cheng Wang <cole945@gmail.com>
1170 Marcin Kościelnicki <koriakin@0x04.net>
1171
1172 PR/17221
1173 * Makefile.in: Add powerpc-*-ipa.o
1174 * configure.srv: Add ipa_obj for powerpc*-linux.
1175 * linux-ppc-ipa.c: New file.
1176 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1177 includes.
1178 (PPC_FIELD): New macro.
1179 (PPC_SEXT): New macro.
1180 (PPC_OP6): New macro.
1181 (PPC_BO): New macro.
1182 (PPC_LI): New macro.
1183 (PPC_BD): New macro.
1184 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1185 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1186 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1187 (ppc_get_thread_area): New function.
1188 (is_elfv2_inferior): New function.
1189 (gen_ds_form): New function.
1190 (GEN_STD): New macro.
1191 (GEN_STDU): New macro.
1192 (GEN_LD): New macro.
1193 (GEN_LDU): New macro.
1194 (gen_d_form): New function.
1195 (GEN_ADDI): New macro.
1196 (GEN_ADDIS): New macro.
1197 (GEN_LI): New macro.
1198 (GEN_LIS): New macro.
1199 (GEN_ORI): New macro.
1200 (GEN_ORIS): New macro.
1201 (GEN_LWZ): New macro.
1202 (GEN_STW): New macro.
1203 (GEN_STWU): New macro.
1204 (gen_xfx_form): New function.
1205 (GEN_MFSPR): New macro.
1206 (GEN_MTSPR): New macro.
1207 (GEN_MFCR): New macro.
1208 (GEN_MTCR): New macro.
1209 (GEN_SYNC): New macro.
1210 (GEN_LWSYNC): New macro.
1211 (gen_x_form): New function.
1212 (GEN_OR): New macro.
1213 (GEN_MR): New macro.
1214 (GEN_LWARX): New macro.
1215 (GEN_STWCX): New macro.
1216 (GEN_CMPW): New macro.
1217 (gen_md_form): New function.
1218 (GEN_RLDICL): New macro.
1219 (GEN_RLDICR): New macro.
1220 (gen_i_form): New function.
1221 (GEN_B): New macro.
1222 (GEN_BL): New macro.
1223 (gen_b_form): New function.
1224 (GEN_BNE): New macro.
1225 (GEN_LOAD): New macro.
1226 (GEN_STORE): New macro.
1227 (gen_limm): New function.
1228 (gen_atomic_xchg): New function.
1229 (gen_call): New function.
1230 (ppc_relocate_instruction): New function.
1231 (ppc_install_fast_tracepoint_jump_pad): New function.
1232 (ppc_get_min_fast_tracepoint_insn_len): New function.
1233 (ppc_get_ipa_tdesc_idx): New function.
1234 (the_low_target): Wire in the new functions.
1235 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1236 tdescs.
1237 * linux-ppc-tdesc.h: New file.
1238
a13c4696
MK
12392016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1240
1241 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1242 (alloc_jump_pad_buffer): New function.
1243 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1244 (alloc_jump_pad_buffer): New function.
1245 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1246 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1247 (alloc_jump_pad_buffer): New function.
1248 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1249 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1250 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1251 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1252
1cda1512
MK
12532016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1254
1255 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1256 * linux-amd64-ipa.c: Likewise.
1257 * linux-i386-ipa.c: Likewise.
1258 * linux-s390-ipa.c: Likewise.
1259 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1260 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1261 set_trace_state_variable_value_ptr.
1262 (struct ipa_sym_addresses): Likewise.
1263 (symbol_list): Likewise.
1264 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1265 accessing gdb_collect directly.
1266 (gdb_collect_ptr_type): New typedef.
1267 (get_raw_reg_ptr_type): New typedef.
1268 (get_trace_state_variable_value_ptr_type): New typedef.
1269 (set_trace_state_variable_value_ptr_type): New typedef.
1270 (gdb_collect_ptr): New global.
1271 (get_raw_reg_ptr): New global.
1272 (get_trace_state_variable_value_ptr): New global.
1273 (set_trace_state_variable_value_ptr): New global.
1274 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1275 accessing get_raw_reg directly.
1276 (get_get_tsv_func_addr): Likewise for
1277 get_trace_state_variable_value_ptr.
1278 (get_set_tsv_func_addr): Likewise for
1279 set_trace_state_variable_value_ptr.
1280 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1281
72fb5488
SM
12822016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1285
28170b88
MK
12862016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1287
1288 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1289 packets.
1290 (relocate_instruction): Remove own_buf.
1291 * server.c (own_buf): Make global.
1292 (handle_v_requests): Make global.
1293 * server.h (own_buf): New declaration.
1294 (handle_v_requests): New prototype.
1295
f39e8743
MK
12962016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1297
1298 PR 18377
1299 * linux-s390-low.c (add_insns): New function.
1300 (s390_emit_prologue): New function.
1301 (s390_emit_epilogue): New function.
1302 (s390_emit_add): New function.
1303 (s390_emit_sub): New function.
1304 (s390_emit_mul): New function.
1305 (s390_emit_lsh): New function.
1306 (s390_emit_rsh_signed): New function.
1307 (s390_emit_rsh_unsigned): New function.
1308 (s390_emit_ext): New function.
1309 (s390_emit_log_not): New function.
1310 (s390_emit_bit_and): New function.
1311 (s390_emit_bit_or): New function.
1312 (s390_emit_bit_xor): New function.
1313 (s390_emit_bit_not): New function.
1314 (s390_emit_equal): New function.
1315 (s390_emit_less_signed): New function.
1316 (s390_emit_less_unsigned): New function.
1317 (s390_emit_ref): New function.
1318 (s390_emit_if_goto): New function.
1319 (s390_emit_goto): New function.
1320 (s390_write_goto_address): New function.
1321 (s390_emit_litpool): New function.
1322 (s390_emit_const): New function.
1323 (s390_emit_call): New function.
1324 (s390_emit_reg): New function.
1325 (s390_emit_pop): New function.
1326 (s390_emit_stack_flush): New function.
1327 (s390_emit_zero_ext): New function.
1328 (s390_emit_swap): New function.
1329 (s390_emit_stack_adjust): New function.
1330 (s390_emit_set_r2): New function.
1331 (s390_emit_int_call_1): New function.
1332 (s390_emit_void_call_2): New function.
1333 (s390_emit_eq_goto): New function.
1334 (s390_emit_ne_goto): New function.
1335 (s390_emit_lt_goto): New function.
1336 (s390_emit_le_goto): New function.
1337 (s390_emit_gt_goto): New function.
1338 (s390_emit_ge_goto): New function.
1339 (s390x_emit_prologue): New function.
1340 (s390x_emit_epilogue): New function.
1341 (s390x_emit_add): New function.
1342 (s390x_emit_sub): New function.
1343 (s390x_emit_mul): New function.
1344 (s390x_emit_lsh): New function.
1345 (s390x_emit_rsh_signed): New function.
1346 (s390x_emit_rsh_unsigned): New function.
1347 (s390x_emit_ext): New function.
1348 (s390x_emit_log_not): New function.
1349 (s390x_emit_bit_and): New function.
1350 (s390x_emit_bit_or): New function.
1351 (s390x_emit_bit_xor): New function.
1352 (s390x_emit_bit_not): New function.
1353 (s390x_emit_equal): New function.
1354 (s390x_emit_less_signed): New function.
1355 (s390x_emit_less_unsigned): New function.
1356 (s390x_emit_ref): New function.
1357 (s390x_emit_if_goto): New function.
1358 (s390x_emit_const): New function.
1359 (s390x_emit_call): New function.
1360 (s390x_emit_reg): New function.
1361 (s390x_emit_pop): New function.
1362 (s390x_emit_stack_flush): New function.
1363 (s390x_emit_zero_ext): New function.
1364 (s390x_emit_swap): New function.
1365 (s390x_emit_stack_adjust): New function.
1366 (s390x_emit_int_call_1): New function.
1367 (s390x_emit_void_call_2): New function.
1368 (s390x_emit_eq_goto): New function.
1369 (s390x_emit_ne_goto): New function.
1370 (s390x_emit_lt_goto): New function.
1371 (s390x_emit_le_goto): New function.
1372 (s390x_emit_gt_goto): New function.
1373 (s390x_emit_ge_goto): New function.
1374 (s390_emit_ops): New function.
1375 (struct linux_target_ops): Fill in emit_ops hook.
1376
abd9baf9
MK
13772016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1378
1379 PR 18377
1380 * Makefile.in: Add s390 IPA files.
1381 * configure.srv: Build IPA for s390.
1382 * linux-s390-ipa.c: New file.
1383 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1384 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1385 (tdesc_s390_linux32): Likewise.
1386 (init_registers_s390_linux32v1): Likewise.
1387 (tdesc_s390_linux32v1): Likewise.
1388 (init_registers_s390_linux32v2): Likewise.
1389 (tdesc_s390_linux32v2): Likewise.
1390 (init_registers_s390_linux64): Likewise.
1391 (tdesc_s390_linux64): Likewise.
1392 (init_registers_s390_linux64v1): Likewise.
1393 (tdesc_s390_linux64v1): Likewise.
1394 (init_registers_s390_linux64v2): Likewise.
1395 (tdesc_s390_linux64v2): Likewise.
1396 (init_registers_s390_te_linux64): Likewise.
1397 (tdesc_s390_te_linux64): Likewise.
1398 (init_registers_s390_vx_linux64): Likewise.
1399 (tdesc_s390_vx_linux64): Likewise.
1400 (init_registers_s390_tevx_linux64): Likewise.
1401 (tdesc_s390_tevx_linux64): Likewise.
1402 (init_registers_s390x_linux64): Likewise.
1403 (tdesc_s390x_linux64): Likewise.
1404 (init_registers_s390x_linux64v1): Likewise.
1405 (tdesc_s390x_linux64v1): Likewise.
1406 (init_registers_s390x_linux64v2): Likewise.
1407 (tdesc_s390x_linux64v2): Likewise.
1408 (init_registers_s390x_te_linux64): Likewise.
1409 (tdesc_s390x_te_linux64): Likewise.
1410 (init_registers_s390x_vx_linux64): Likewise.
1411 (tdesc_s390x_vx_linux64): Likewise.
1412 (init_registers_s390x_tevx_linux64): Likewise.
1413 (tdesc_s390x_tevx_linux64): Likewise.
1414 (have_hwcap_s390_vx): New static variable.
1415 (s390_arch_setup): Fill have_hwcap_s390_vx.
1416 (s390_get_thread_area): New function.
1417 (s390_ft_entry_gpr_esa): New const.
1418 (s390_ft_entry_gpr_zarch): New const.
1419 (s390_ft_entry_misc): New const.
1420 (s390_ft_entry_fr): New const.
1421 (s390_ft_entry_vr): New const.
1422 (s390_ft_main_31): New const.
1423 (s390_ft_main_64): New const.
1424 (s390_ft_exit_fr): New const.
1425 (s390_ft_exit_vr): New const.
1426 (s390_ft_exit_misc): New const.
1427 (s390_ft_exit_gpr_esa): New const.
1428 (s390_ft_exit_gpr_zarch): New const.
1429 (append_insns): New function.
1430 (s390_relocate_instruction): New function.
1431 (s390_install_fast_tracepoint_jump_pad): New function.
1432 (s390_get_min_fast_tracepoint_insn_len): New function.
1433 (s390_get_ipa_tdesc_idx): New function.
1434 (struct linux_target_ops): Wire in the above functions.
1435 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1436 * linux-s390-tdesc.h: New file.
1437
a4105d04
MK
14382016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1439
1440 * linux-s390-low.c (s390_supports_tracepoints): New function.
1441 (struct linux_target_ops): Fill supports_tracepoints hook.
1442
35ac8b3e
YQ
14432016-03-18 Yao Qi <yao.qi@linaro.org>
1444
1445 * linux-low.c (lwp_signal_can_be_delivered): New function.
1446 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1447
94610ec4
YQ
14482016-03-18 Yao Qi <yao.qi@linaro.org>
1449
1450 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1451 0 if signal is enqueued. Remove 'signal' from one debugging
1452 message. Move one debugging message to some lines below.
1453 Remove code setting 'signal' to 0.
1454
80aea927
YQ
14552016-03-18 Yao Qi <yao.qi@linaro.org>
1456
1457 * linux-low.c (linux_low_filter_event): Remove redundant
1458 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1459
b04fd3be
MK
14602016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1461
1462 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1463 (struct linux_target_ops): Wire in the above.
1464
c40c8d4b
YQ
14652016-03-03 Yao Qi <yao.qi@linaro.org>
1466
1467 * linux-low.c: Update comments to start_step_over.
1468
0f8288ae
YQ
14692016-03-03 Yao Qi <yao.qi@linaro.org>
1470
1471 PR server/19736
1472 * linux-low.c (handle_extended_wait): Set child suspended
1473 if event_lwp->bp_reinsert isn't zero.
1474
fdbd04a8
YQ
14752016-03-02 Yao Qi <yao.qi@linaro.org>
1476
1477 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1478 enqueue_pending_signal.
1479
6896a8fa
MK
14802016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1481
1482 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1483 is actually loaded.
1484
ab503087
MK
14852016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1486
1487 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1488 (s390_regmap_3264) [!__s390x__]: New global.
1489 (s390_collect_ptrace_register): Skip map entries containing -1.
1490 (s390_supply_ptrace_register): Ditto.
1491 (s390_fill_gprs_high): New function.
1492 (s390_store_gprs_high): New function.
1493 (s390_regsets): Add NT_S390_HIGH_GPRS.
1494 (s390_get_hwcap): Enable on 31-bit.
1495 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1496 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1497 Detect NT_S390_HIGH_GPRS.
1498 (s390_usrregs_info_3264): Enable on 31-bit.
1499 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1500 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1501
ae91f625
MK
15022016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1503
1504 PR gdb/13808
1505 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1506 * configure.srv: Ditto.
1507 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1508 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1509 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1510 (init_registers_amd64_linux): Remove prototype.
1511 (tdesc_amd64_linux): Remove declaration.
1512 (get_ipa_tdesc): New function.
1513 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1514 initialize remaining tdescs.
1515 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1516 (init_registers_i386_linux): Remove prototype.
1517 (tdesc_i386_linux): Remove declaration.
1518 (get_ipa_tdesc): New function.
1519 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1520 initialize remaining tdescs.
1521 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1522 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1523 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1524 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1525 (x86_get_ipa_tdesc_idx): New function.
1526 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1527 * linux-x86-tdesc.h: New file.
1528 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1529 (target_get_ipa_tdesc_idx): New macro.
1530 * tracepoint.c (ipa_tdesc_idx): New macro.
1531 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1532 (symbol_list): Add ipa_tdesc_idx.
1533 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1534 (ipa_tdesc): Remove.
1535 (ipa_tdesc_idx): New variable.
1536 (get_context_regcache): Use get_ipa_tdesc.
1537 (gdb_collect): Ditto.
1538 (gdb_probe): Ditto.
1539 * tracepoint.h (get_ipa_tdesc): New prototype.
1540 (ipa_tdesc): Remove.
1541
e7ad2f14
PA
15422016-02-24 Pedro Alves <palves@redhat.com>
1543
1544 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1545 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1546 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1547 Factor out common code between the USE_SIGTRAP_SIGINFO and
1548 !USE_SIGTRAP_SIGINFO blocks.
1549 (linux_low_filter_event): Call save_stop_reason instead of
1550 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1551 Update comments.
1552 (linux_wait_1): Update comments.
1553
657f9cde
WW
15542016-02-24 Wei-cheng Wang <cole945@gmail.com>
1555
1556 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1557 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1558 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1559 ppc_insert_point, ppc_remove_point.
1560
b00b61e1
MK
15612016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1562
1563 * linux-s390-low.c (s390_supports_z_point_type): New function.
1564 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1565
553cb527
YQ
15662016-02-16 Yao Qi <yao.qi@linaro.org>
1567
1568 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1569 PC. Get pc from regcache_read_pc.
1570
a5652c21
YQ
15712016-02-12 Yao Qi <yao.qi@linaro.org>
1572
1573 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1574 or linux_get_pc_32bit.
1575 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1576
ed443b61
YQ
15772016-02-12 Yao Qi <yao.qi@linaro.org>
1578
1579 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1580 arm_linux_get_next_pcs_fixup.
1581
020ecd38
MK
15822016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1583
1584 * tracepoint.c (x_tracepoint_action_download): Change
1585 write_inferior_data_ptr to write_inferior_data_pointer.
1586 (cmd_qtstart): Likewise.
1587 (write_inferior_data_ptr): Remove.
1588 (download_agent_expr): Change write_inferior_data_ptr to
1589 write_inferior_data_pointer.
1590 (download_tracepoint_1): Likewise.
1591 (download_tracepoint): Likewise.
1592 (download_trace_state_variables): Likewise.
1593
7cae9051
WW
15942016-02-11 Wei-cheng Wang <cole945@gmail.com>
1595 Marcin Kościelnicki <koriakin@0x04.net>
1596
1597 * tracepoint.c (struct tracepoint_action_ops): Remove.
1598 (struct tracepoint_action): Remove ops.
1599 (m_tracepoint_action_download, r_tracepoint_action_download)
1600 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1601 size and offset accordingly.
1602 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1603 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1604 (tracepoint_action_send, tracepoint_action_download): New functions.
1605 Helpers for trace action handlers.
1606 (add_tracepoint_action): Remove setup actions ops.
1607 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1608
9f6a71b4
YQ
16092016-02-10 Yao Qi <yao.qi@linaro.org>
1610
1611 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1612
1e94266c
SM
16132016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1614
1615 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1616 to AC_OUTPUT.
1617 * configure: Regenerate.
1618
8adce034
SM
16192016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1620
1621 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1622 void * to gdb_byte *.
1623 * linux-low.c (siginfo_fixup): Likewise.
1624 (linux_xfer_siginfo): Likewise.
1625 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1626 Likewise.
1627 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1628
93813b37
WT
16292016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1630
1631 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1632 to srv_tgtobj.
1633 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1634 to srv_tgtobj.
1635 * linux-x86-low.c [__x86_64__]: Include
1636 "nat/amd64-linux-siginfo.h".
1637 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1638 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1639 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1640 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1641 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1642 (cpt_si_fd, si_timerid, si_overrun): Move from
1643 nat/amd64-linux-siginfo.c.
1644 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1645
8424cc97
SM
16462016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1647
1648 * server.c (skip_to_semicolon): Remove.
1649 (process_point_options): Use strchrnul instead of
1650 skip_to_semicolon.
1651
4d18591b
YQ
16522016-01-26 Yao Qi <yao.qi@linaro.org>
1653
1654 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1655 * linux-low.c (install_software_single_step_breakpoints): Don't
1656 call regcache_read_pc.
1657 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1658 argument pc.
1659
d8020970
YQ
16602016-01-26 Yao Qi <yao.qi@linaro.org>
1661
1662 * linux-low.c (install_software_single_step_breakpoints): Call
1663 regcache_read_pc instead of get_pc.
1664
8b207339
YQ
16652016-01-26 Yao Qi <yao.qi@linaro.org>
1666
1667 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1668 (unblock_async_io): Rename to ...
1669 (block_unblock_async_io): ... it. New function.
1670 (enable_async_io): Don't install SIGIO handler. Unblock it
1671 instead.
1672 (disable_async_io): Don't ignore SIGIO. Block it instead.
1673 (initialize_async_io): Install SIGIO handler. Don't call
1674 unblock_async_io.
1675
18879fef
YQ
16762016-01-26 Yao Qi <yao.qi@linaro.org>
1677
1678 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1679 first character is '\003', call *the_target->request_interrupt.
1680
a0f8e08a
YQ
16812016-01-25 Yao Qi <yao.qi@linaro.org>
1682
1683 * remote-utils.c (new_thread_notify): Remove.
1684 (dead_thread_notify): Likewise.
1685 * remote-utils.h (new_thread_notify): Remove declaration.
1686 (dead_thread_notify): Likewise.
1687
cc5fd9ab
MK
16882016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1689
1690 * gdb.trace/pending.exp: Fix expected message on continue.
1691
99e8eb11
MK
16922016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1693
1694 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1695 it works properly on big-endian machines where sizeof (CORE_ADDR)
1696 != sizeof (void *).
1697
a994041d
PA
16982016-01-21 Pedro Alves <palves@redhat.com>
1699
1700 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1701 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1702 * configure: Regenerate.
1703
f7a6a40d
YQ
17042016-01-21 Yao Qi <yao.qi@linaro.org>
1705
1706 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1707 is_thumb and set it according to CPSR saved on the stack.
1708 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1709 arm_sigreturn_next_pc.
1710
6f69e520
YQ
17112016-01-18 Yao Qi <yao.qi@linaro.org>
1712
1713 * linux-low.c (linux_set_pc_64bit): New function.
1714 (linux_get_pc_64bit): New function.
1715 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1716 Declare.
1717 * linux-sparc-low.c (debug_threads): Remove declaration.
1718 (sparc_get_pc): Remove.
1719 (the_low_target): Use linux_get_pc_64bit instead of
1720 sparc_get_pc.
1721 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1722 (the_low_target): Use linux_get_pc_64bit and
1723 linux_set_pc_64bit.
1724
276d4552
YQ
17252016-01-18 Yao Qi <yao.qi@linaro.org>
1726
1727 * linux-arm-low.c (debug_threads): Remove declaration.
1728 (arm_get_pc, arm_set_pc): Remove.
1729 (the_low_target): Use linux_get_pc_32bit and
1730 linux_set_pc_32bit.
1731 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1732 (the_low_target): Use linux_get_pc_32bit and
1733 linux_set_pc_32bit.
1734 * linux-cris-low.c (debug_threads): Remove declaration.
1735 (cris_get_pc, cris_set_pc,): Remove.
1736 (the_low_target): Use linux_get_pc_32bit and
1737 linux_set_pc_32bit.
1738 * linux-crisv32-low.c (debug_threads): Remove declaration.
1739 (cris_get_pc, cris_set_pc): Remove.
1740 (the_low_target): Use linux_get_pc_32bit and
1741 linux_set_pc_32bit.
1742 * linux-low.c: Include inttypes.h.
1743 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1744 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1745 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1746 (the_low_target): Use linux_get_pc_32bit and
1747 linux_set_pc_32bit.
1748 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1749 (the_low_target): Use linux_get_pc_32bit and
1750 linux_set_pc_32bit.
1751 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1752 (the_low_target): Use linux_get_pc_32bit and
1753 linux_set_pc_32bit.
1754 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1755 (the_low_target): Use linux_get_pc_32bit and
1756 linux_set_pc_32bit.
1757 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1758 (the_low_target): Use linux_get_pc_32bit and
1759 linux_set_pc_32bit.
1760
eb0edac8
GB
17612016-01-18 Gary Benson <gbenson@redhat.com>
1762
1763 * configure.ac (AC_FUNC_FORK): New check.
1764 * config.in: Regenerate.
1765 * configure: Likewise.
1766
1b451dda
YQ
17672016-01-14 Yao Qi <yao.qi@linaro.org>
1768
1769 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1770 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1771 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1772 arm_get_next_pcs_ctor.
1773
82075af2
JS
17742016-01-12 Josh Stone <jistone@redhat.com>
1775 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1776
1777 * inferiors.h: Include "gdb_vecs.h".
1778 (struct process_info): Add syscalls_to_catch.
1779 * inferiors.c (remove_process): Free syscalls_to_catch.
1780 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1781 syscall_return stops.
1782 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1783 * server.c (handle_general_set): Handle QCatchSyscalls.
1784 (handle_query): Report support for QCatchSyscalls.
1785 * target.h (struct target_ops): Add supports_catch_syscall.
1786 (target_supports_catch_syscall): New macro.
1787 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1788 (struct lwp_info): Add syscall_state.
1789 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1790 Maintain syscall_state and syscalls_to_catch across exec.
1791 (get_syscall_trapinfo): New function, proxy to the_low_target.
1792 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1793 (linux_low_filter_event): Toggle syscall_state entry/return for
1794 syscall traps, and set it ignored for all others.
1795 (gdb_catching_syscalls_p): New function.
1796 (gdb_catch_this_syscall_p): New function.
1797 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1798 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1799 (linux_supports_catch_syscall): New function.
1800 (linux_target_ops): Install it.
1801 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1802 (the_low_target): Install it.
1803
8f13a3ce
MF
18042016-01-12 Mike Frysinger <vapier@gentoo.org>
1805
1806 * acinclude.m4: Include new ../warning.m4 file.
1807 * configure: Regenerated.
1808 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1809
5b3da067
MF
18102016-01-12 Mike Frysinger <vapier@gentoo.org>
1811
1812 * ax.c (is_goto_target): Mark static.
1813 * linux-low.c (register_addr): Likewise.
1814 (linux_fetch_registers, linux_store_registers): Likewise.
1815 * mem-break.c (any_persistent_commands): Fix old prototype.
1816 (add_commands_to_breakpoint): Mark static.
1817 * regcache.c (find_register_by_name): Delete unused func.
1818 * remote-utils.c (hex_or_minus_one): Mark static.
1819 * server.c (monitor_show_help): Mark static.
1820 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1821 handle_v_requests): Likewise.
1822
bc504a31
PA
18232016-01-12 Pedro Alves <palves@redhat.com>
1824
1825 Remove use of the registered trademark symbol throughout.
1826
5a0dd67a
YQ
18272016-01-08 Yao Qi <yao.qi@linaro.org>
1828
1829 * remote-utils.c (getpkt): If c is '\003', call target hook
1830 request_interrupt.
1831
b2ca446f
YQ
18322016-01-06 Yao Qi <yao.qi@linaro.org>
1833
1834 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1835 linux-aarch32-low.c.
1836 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1837 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1838 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1839 (thumb2_breakpoint): Declare.
1840 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1841 linux-aarch32-low.h.
1842 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1843 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1844 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1845
edd88788
JB
18462016-01-01 Joel Brobecker <brobecker@adacore.com>
1847
1848 * gdbreplay.c (gdbreplay_version): Change copyright year in
1849 version message.
1850 * server.c (gdbserver_version): Likewise.
1851
65da7f14
PP
18522015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1853
1854 * server.c (crc32_table): Delete.
1855 (crc32): Use libiberty's xcrc32 function.
1856
4abd5ed2
JB
18572015-12-22 Joel Brobecker <brobecker@adacore.com>
1858
1859 * lynx-low.c (lynx_delete_thread_callback): New function.
1860 (lynx_mourn): Properly delete our process and all of its
1861 threads. Remove call to clear_inferiors.
1862
0e50fe5c
JB
18632015-12-22 Joel Brobecker <brobecker@adacore.com>
1864
1865 * target.c (thread_search_callback): Add check that
1866 the thread_stopped target callback is not NULL before
1867 calling it.
1868
35adc03f
YQ
18692015-12-21 Yao Qi <yao.qi@linaro.org>
1870
1871 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1872 arm breakpoint.
1873
bd2b2909
AT
18742015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1875
1876 * server.c (handle_query): Call target_supports_software_single_step.
1877
7fe5e27e
AT
18782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1879
1880 * linux-low.c (single_step): New function.
1881 (linux_resume_one_lwp_throw): Call single_step.
1882 (start_step_over): Likewise.
1883
d9311bfa
AT
18842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1885
1886 * Makefile.in (SFILES): Append arch/arm-linux.c,
1887 arch/arm-get-next-pcs.c.
1888 (arm-linux.o): New rule.
1889 (arm-get-next-pcs.o): New rule.
1890 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1891 arm-linux.o.
1892 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1893 to linux-aarch32-low.c.
1894 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1895 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1896 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1897 (thumb2_breakpoint_len): Likewise.
1898 (arm_is_thumb_mode): Make non-static.
1899 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1900 from linux-aarch32-low.c.
1901 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1902 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1903 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1904 (thumb2_breakpoint_len): Likewise.
1905 (arm_is_thumb_mode): New declaration.
1906 * linux-arm-low.c: Include arch/arm-linux.h
1907 aarch/arm-get-next-pcs.h, sys/syscall.h.
1908 (get_next_pcs_ops): New struct.
1909 (get_next_pcs_addr_bits_remove): New function.
1910 (get_next_pcs_is_thumb): New function.
1911 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1912 (arm_sigreturn_next_pc): Likewise.
1913 (get_next_pcs_syscall_next_pc): Likewise.
1914 (arm_gdbserver_get_next_pcs): Likewise.
1915 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1916 Initialize.
1917 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1918 * server.h: Include gdb_vecs.h.
1919
68ce2059
AT
19202015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1921
1922 * Makefile.in (SFILES): Append common/common-regcache.c.
1923 (OBS): Append common-regcache.o.
1924 (common-regcache.o): New rule.
1925 * regcache.c (init_register_cache): Initialize cache to
1926 REG_UNAVAILABLE.
1927 (regcache_raw_read_unsigned): New function.
1928 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1929 register_status enum.
1930
fa5308bd
AT
19312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1932
1933 * linux-aarch64-low.c (the_low_targets): Rename
1934 breakpoint_reinsert_addr to get_next_pcs.
1935 * linux-arm-low.c (the_low_targets): Likewise.
1936 * linux-bfin-low.c (the_low_targets): Likewise.
1937 * linux-cris-low.c (the_low_targets): Likewise.
1938 * linux-crisv32-low.c (the_low_targets): Likewise.
1939 * linux-low.c (can_software_single_step): Likewise.
1940 (install_software_single_step_breakpoints): New function.
1941 (start_step_over): Use install_software_single_step_breakpoints.
1942 * linux-low.h: New CORE_ADDR vector.
1943 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1944 get_next_pcs.
1945 * linux-mips-low.c (the_low_targets): Likewise.
1946 * linux-nios2-low.c (the_low_targets): Likewise.
1947 * linux-sparc-low.c (the_low_targets): Likewise.
1948
4a6ed09b
PA
19492015-12-17 Pedro Alves <palves@redhat.com>
1950
1951 * linux-low.c (linux_kill_one_lwp): Remove references to
1952 LinuxThreads.
1953 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1954 to 'kill'.
1955 (linux_init_signals): Delete.
1956 (initialize_low): Adjust.
1957 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1958
7544db95
PA
19592015-12-16 Pedro Alves <palves@redhat.com>
1960
1961 * configure.ac (compiler warning flags): When testing a
1962 -Wno-foo option, check whether -Wfoo works instead.
1963 * configure: Regenerate.
1964
8020350c
DB
19652015-12-11 Don Breazeal <donb@codesourcery.com>
1966
1967 * server.c (process_serial_event): Don't exit from gdbserver
1968 in remote mode if there are still active inferiors.
1969
db91f502
YQ
19702015-12-11 Yao Qi <yao.qi@linaro.org>
1971
1972 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1973 arm_breakpoint_at if the process is 32-bit.
1974
b37a6290
YQ
19752015-12-11 Yao Qi <yao.qi@linaro.org>
1976
1977 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1978 arm breakpoint.
1979
17b1509a
YQ
19802015-12-07 Yao Qi <yao.qi@linaro.org>
1981
1982 * configure.srv: Append arm.o to srv_tgtobj for
1983 aarch64*-*-linux* target.
1984 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1985 from linux-arm-low.c.
1986 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1987 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1988 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1989 (thumb2_breakpoint_len): Likewise.
1990 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1991 (arm_breakpoint_kinds): Likewise.
1992 (arm_breakpoint_kind_from_pc): Likewise.
1993 (arm_sw_breakpoint_from_kind): Likewise.
1994 (arm_breakpoint_kind_from_current_state): Likewise.
1995 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1996 (arm_sw_breakpoint_from_kind): Declare.
1997 (arm_breakpoint_kind_from_current_state): Declare.
1998 (arm_breakpoint_at): Declare.
1999 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2000 arm_sw_breakpoint_from_kind if process is 32-bit.
2001 (aarch64_breakpoint_kind_from_pc): New function.
2002 (aarch64_breakpoint_kind_from_current_state): New function.
2003 (the_low_target): Initialize fields breakpoint_kind_from_pc
2004 and breakpoint_kind_from_current_state.
2005 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2006 linux-aarch32-low.c.
2007 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2008 (arm_breakpoint, arm_breakpoint_len): Likewise.
2009 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2010 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2011 (arm_is_thumb_mode): Likewise.
2012 (arm_breakpoint_at): Likewise.
2013 (arm_breakpoint_kind_from_pc): Likewise.
2014 (arm_sw_breakpoint_from_kind): Likewise.
2015 (arm_breakpoint_kind_from_current_state): Likewise.
2016
2017 Revert:
2018 2015-08-04 Yao Qi <yao.qi@linaro.org>
2019
2020 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2021 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2022 * server.c (extended_protocol): Remove "static".
2023 * server.h (extended_protocol): Declare it.
2024
ece66d65
JS
20252015-12-04 Josh Stone <jistone@redhat.com>
2026
2027 * target.h (struct target_ops) <arch_setup>: Rename to ...
2028 (struct target_ops) <post_create_inferior>: ... this.
2029 (target_arch_setup): Rename to ...
2030 (target_post_create_inferior): ... this, calling post_create_inferior.
2031 * server.c (start_inferior): Update target_arch_setup calls to
2032 target_post_create_inferior.
2033 * linux-low.c (linux_low_ptrace_options): Forward declare.
2034 (linux_arch_setup): Update its comment for general use.
2035 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2036 (struct linux_target_ops): Use linux_post_create_inferior.
2037 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2038 to post_create_inferior.
2039 * nto-low.c (struct nto_target_ops): Likewise.
2040 * spu-low.c (struct spu_target_ops): Likewise.
2041 * win32-low.c (struct win32_target_ops): Likewise.
2042
e58c48b4
AT
20432015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2044
2045 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2046
fbec8956
AT
20472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2048
2049 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2050 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2051 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2052 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2053 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2054 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2055 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2056 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2057 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2058 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2059 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2060 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2061
9b4c5f87
AT
20622015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2063
2064 * linux-low.c (linux_look_up_symbols): Don't call
2065 linux_supports_traceclone.
2066 * linux-low.h (thread_db_init): Remove use_events argument.
2067 * thread-db.c (thread_db_use_event): Remove global variable.
2068 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2069 (struct thread_db) <td_create_bp>: Remove field.
2070 (thread_db_create_event): Remove function.
2071 (thread_db_enable_reporting): Likewise.
2072 (find_one_thread): Don't check for thread_db_use_events.
2073 (attach_thread): Likewise.
2074 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2075 (try_thread_db_load_1): Don't check for thread_db_use_events.
2076 (thread_db_init): Remove use_events argument and thread events
2077 handling.
2078 (remove_thread_event_breakpoints): Remove function.
2079 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2080
7d00775e
AT
20812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2082
2083 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2084 New function.
2085 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2086 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2087 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2088 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2089 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2090 Initialize.
2091 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2092 New function.
2093 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2094 * linux-low.c (can_hardware_single_step): Use
2095 supports_hardware_single_step.
2096 (can_software_single_step): New function.
2097 (start_step_over): Call can_software_single_step.
2098 (linux_supports_hardware_single_step): New function.
2099 (struct target_ops) <supports_software_single_step>: Initialize.
2100 * linux-low.h (struct linux_target_ops)
2101 <supports_hardware_single_step>: Initialize.
2102 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2103 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2104 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2105 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2106 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2107 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2108 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2110 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2111 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2112 Initialize.
2113 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2114 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2115 Initialize.
2116 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2117 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2118 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2119 New function.
2120 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2121 * target.h (struct target_ops): <supports_software_single_step>:
2122 New field.
2123 (target_supports_software_single_step): New macro.
2124
2d97cd35
AT
21252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2126
2127 * linux-low.c (linux_wait_1): Fix pc advance condition.
2128 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2129 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2130
769ef81f
AT
21312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2132
2133 * linux-arm-low.c (arm_is_thumb_mode): New function.
2134 (arm_breakpoint_at): Use arm_is_thumb_mode.
2135 (arm_breakpoint_kind_from_current_state): New function.
2136 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2137 Initialize.
2138 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2139 (linux_breakpoint_kind_from_current_state): New function.
2140 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2141 * linux-low.h (struct linux_target_ops)
2142 <breakpoint_kind_from_current_state>: New field.
2143 * target.h (struct target_ops): Likewise.
2144 (target_breakpoint_kind_from_current_state): New macro.
2145
1bebeeca
PA
21462015-11-30 Pedro Alves <palves@redhat.com>
2147
2148 * linux-low.c (linux_resume): Wake up the event loop before
2149 returning.
2150
a67a9fae
PA
21512015-11-30 Pedro Alves <palves@redhat.com>
2152
2153 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2154 check.
2155 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2156 to -1.
2157 * target.c (struct thread_search): New structure.
2158 (thread_search_callback): New function.
2159 (prev_general_thread): New global.
2160 (prepare_to_access_memory, done_accessing_memory): New functions.
2161 * target.h (prepare_to_access_memory, done_accessing_memory):
2162 Replace macros with function declarations.
2163
f2faf941
PA
21642015-11-30 Pedro Alves <palves@redhat.com>
2165
2166 PR 14618
2167 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2168 report TARGET_WAITKIND_NO_RESUMED.
2169 * remote-utils.c (prepare_resume_reply): Handle
2170 TARGET_WAITKIND_NO_RESUMED.
2171 * server.c (report_no_resumed): New global.
2172 (handle_query) <qSupported>: Handle "no-resumed+". Report
2173 "no-resumed+" support.
2174 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2175 return error if the client doesn't support no-resumed events.
2176 (push_stop_notification): New function.
2177 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2178 events if the client supports them.
2179
a681f9c9
PA
21802015-11-30 Pedro Alves <palves@redhat.com>
2181
2182 * linux-low.c (thread_still_has_status_pending_p): Don't check
2183 vCont;t here.
2184 (lwp_resumed): New function.
2185 (status_pending_p_callback): Return early if the LWP is not
2186 supposed to be resumed.
2187
65706a29
PA
21882015-11-30 Pedro Alves <palves@redhat.com>
2189
2190 * linux-low.c (handle_extended_wait): Assert that the LWP's
2191 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2192 thread create events, leave the new child's status pending.
2193 (linux_low_filter_event): If GDB wants to hear about thread exit
2194 events, leave the LWP marked dead and don't delete it.
2195 (linux_wait_for_event_filtered): Don't check for thread exit.
2196 (filter_exit_event): New function.
2197 (linux_wait_1): Use it, when returning an exit event.
2198 (linux_resume_one_lwp_throw): Assert that the LWP's
2199 waitstatus is TARGET_WAITKIND_IGNORE.
2200 * remote-utils.c (prepare_resume_reply): Handle
2201 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2202 * server.c (report_thread_events): New global.
2203 (handle_general_set): Handle QThreadEvents.
2204 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2205 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2206 TARGET_WAITKIND_THREAD_EXITED.
2207 * server.h (report_thread_events): Declare.
2208
56cf4bed
PA
22092015-11-30 Pedro Alves <palves@redhat.com>
2210
2211 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2212 the thread's last_resume_kind was resume_stop.
2213
500c1d85
PA
22142015-11-30 Pedro Alves <palves@redhat.com>
2215
2216 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2217 before returning.
2218
de979965
PA
22192015-11-30 Pedro Alves <palves@redhat.com>
2220
2221 * server.c (handle_v_requests): Handle vCtrlC.
2222
34c65914
PA
22232015-11-30 Pedro Alves <palves@redhat.com>
2224
2225 * gdbthread.h (find_any_thread_of_pid): Declare.
2226 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2227 functions.
2228 * server.c (handle_query): If current_thread is NULL, look for
2229 another thread of the selected process.
2230
79efa585 22312015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2232 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2233
2234 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2235 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2236 name in reply.
2237 * target.h (struct target_ops) <thread_name>: New field.
2238 (target_thread_name): New macro.
2239
80d82c19
JB
22402015-11-23 Joel Brobecker <brobecker@adacore.com>
2241
2242 * regcache.h (regcache_invalidate_pid): Add declaration.
2243 * regcache.c (regcache_invalidate_pid): New function, extracted
2244 from regcache_invalidate.
2245 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2246 Add trivial documentation comment.
2247 * lynx-low.c: Use regcache_invalidate_pid instead of
2248 regcache_invalidate.
2249
64da5dd5
JB
22502015-11-23 Joel Brobecker <brobecker@adacore.com>
2251
2252 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2253 and Elf64_auxv_t if the target is Android.
2254
37ce4055
DE
22552015-11-22 Doug Evans <xdje42@gmail.com>
2256
2257 * target.h: #include <sys/types.h>.
2258
06e03fff
PA
22592015-11-19 Pedro Alves <palves@redhat.com>
2260
2261 * linux-low.c (linux_process_qsupported): Change prototype.
2262 Adjust.
2263 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2264 Change prototype.
2265 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2266 and adjust to loop over all features.
2267 * server.c (handle_query) <qSupported>: Adjust to call
2268 target_process_qsupported once, passing it a vector of unprocessed
2269 features.
2270 * target.h (struct target_ops) <process_qsupported>: Change
2271 prototype.
2272 (target_process_qsupported): Adjust.
2273
9a084706
PA
22742015-11-19 Pedro Alves <palves@redhat.com>
2275
2276 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2277 mode.
2278 * configure: Regenerate.
2279
dad44a1f
PA
22802015-11-19 Pedro Alves <palves@redhat.com>
2281
2282 * configure: Regenerate.
2283
231c0592
YQ
22842015-11-19 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2287 type to uint32_t.
2288
6c1c9a8b
YQ
22892015-11-19 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2292 (struct aarch64_operand): Move enum out.
2293
9caa3311
YQ
22942015-11-19 Yao Qi <yao.qi@linaro.org>
2295
2296 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2297 struct user_fpsimd_state *.
2298 (aarch64_store_fpregset): Likewise.
2299
6a69a054
YQ
23002015-11-19 Yao Qi <yao.qi@linaro.org>
2301
2302 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2303 struct user_pt_regs *.
2304 (aarch64_store_gregset): Likewise.
2305
1798301e
PA
23062015-11-18 Pedro Alves <palves@redhat.com>
2307
2308 * Makefile.in (all_object_files): Add $IPA_OBJS.
2309
ce7715e2
PA
23102015-11-17 Pedro Alves <palves@redhat.com>
2311
2312 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2313 GDB_SIGNAL_0 and gdb_signal_to_string.
2314
c0879059
PA
23152015-11-17 Pedro Alves <palves@redhat.com>
2316
2317 * win32-low.c (handle_output_debug_string): Remove parameter.
2318 (win32_kill): Remove our_status local and adjust call to
2319 handle_output_debug_string.
2320 (get_child_debug_event): Adjust call to
2321 handle_output_debug_string.
2322
1996e237
SM
23232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2324
2325 * linux-mips-low.c (mips_fill_gregset): Add cast.
2326 (mips_store_gregset): Likewise.
2327 (mips_fill_fpregset): Likewise.
2328 (mips_store_fpregset): Likewise.
2329
cbec665b
SM
23302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2331
2332 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2333 priv.
2334
eb3e3c67
SM
23352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2336
2337 * linux-mips-low.c (mips_linux_new_thread): Change type of
2338 watch_type to enum target_hw_bp_type.
2339
171de4b8
SM
23402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2341
2342 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2343 Change return type to arm_hwbp_type.
2344
04248ead
SM
23452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2346
2347 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2348 (arm_store_gregset): Likewise.
2349 * linux-arm-low.c (arm_get_hwcap): Likewise.
2350 (arm_read_description): Likewise.
2351
04b3479c
SM
23522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2353
2354 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2355
2bc84e8a
SM
23562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2357
2358 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2359 (ppc_fill_vsxregset): Likewise.
2360 (ppc_store_vsxregset): Likewise.
2361 (ppc_fill_vrregset): Likewise.
2362 (ppc_store_vrregset): Likewise.
2363 (ppc_fill_evrregset): Likewise.
2364 (ppc_store_evrregset): Likewise.
2365
e6c5bb05
SM
23662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2367
2368 * linux-ppc-low.c (ppc_usrregs_info): Remove
2369 forward-declaration.
2370 (ppc_arch_setup): Move lower in file.
2371
7ea45d72
SM
23722015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2373
2374 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2375 (ps_pdwrite): Likewise.
2376
69291610
HW
23772015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2378
2379 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2380 to after assert checks.
2381
b42945fd
SM
23822015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2383
2384 * proc-service.c (ps_pdread): Add/adjust casts.
2385 (ps_pdwrite): Add/adjust casts.
2386
d6f85c84
SM
23872015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2388
2389 * server.c (handle_search_memory_1): Cast return value of
2390 memmem.
2391
f98cd059
SM
23922015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2393
2394 * server.c (write_qxfer_response): Change type of data to
2395 gdb_byte *.
2396
d2412fa5
PA
23972015-10-29 Pedro Alves <palves@redhat.com>
2398
2399 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2400
c17414a2
PA
24012015-10-29 Pedro Alves <palves@redhat.com>
2402
2403 * tracepoint.c (clear_installed_tracepoints): Add casts.
2404
e053fbc4
PA
24052015-10-29 Pedro Alves <palves@redhat.com>
2406
2407 * server.c (handle_v_cont, process_serial_event): Add enum
2408 gdb_signal casts to signal parsing code.
2409
add67df8
PA
24102015-10-29 Pedro Alves <palves@redhat.com>
2411
2412 * linux-low.h (NULL_REGSET): Define.
2413 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2414 * linux-arm-low.c (arm_regsets): Likewise.
2415 * linux-crisv32-low.c (cris_regsets): Likewise.
2416 * linux-m68k-low.c (m68k_regsets): Likewise.
2417 * linux-mips-low.c (mips_regsets): Likewise.
2418 * linux-nios2-low.c (nios2_regsets): Likewise.
2419 * linux-ppc-low.c (ppc_regsets): Likewise.
2420 * linux-s390-low.c (s390_regsets): Likewise.
2421 * linux-sh-low.c (sh_regsets): Likewise.
2422 * linux-sparc-low.c (sparc_regsets): Likewise.
2423 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2424 * linux-tile-low.c (tile_regsets): Likewise.
2425 * linux-x86-low.c (x86_regsets): Likewise.
2426 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2427
50bc912a
PA
24282015-10-29 Pedro Alves <palves@redhat.com>
2429
2430 * linux-low.h (NULL_REGSET): Define.
2431 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2432 * linux-arm-low.c (arm_regsets): Likewise.
2433 * linux-crisv32-low.c (cris_regsets): Likewise.
2434 * linux-m68k-low.c (m68k_regsets): Likewise.
2435 * linux-mips-low.c (mips_regsets): Likewise.
2436 * linux-nios2-low.c (nios2_regsets): Likewise.
2437 * linux-ppc-low.c (ppc_regsets): Likewise.
2438 * linux-s390-low.c (s390_regsets): Likewise.
2439 * linux-sh-low.c (sh_regsets): Likewise.
2440 * linux-sparc-low.c (sparc_regsets): Likewise.
2441 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2442 * linux-tile-low.c (tile_regsets): Likewise.
2443 * linux-x86-low.c (x86_regsets): Likewise.
2444 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2445
682b2546
DE
24462015-10-26 Doug Evans <dje@google.com>
2447
2448 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2449
963843d4
DE
24502015-10-26 Doug Evans <dje@google.com>
2451
2452 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2453
d41401ac
DE
24542015-10-26 Doug Evans <dje@google.com>
2455
2456 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2457 for debug_printf.
2458 (attach_thread, find_new_threads_callback): Ditto.
2459
3db28855
AT
24602015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2461
2462 * mem-break.h (set_breakpoint_data): Remove.
2463
fb78e89c
AT
24642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2465
2466 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2467 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2468 (initialize_low): Remove set_breakpoint_data call.
2469 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2470 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2471 (initialize_low): Remove set_breakpoint_data call.
2472 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2473 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2474 (initialize_low): Remove set_breakpoint_data call.
2475
2e6ee069
AT
24762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2477
2478 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2479 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2480 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2481 * target.h (target_breakpoint_kind_from_pc): New macro.
2482
1652a986
AT
24832015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2484
2485 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2486 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2487 the default breakpoint kind.
2488
abeead09
AT
24892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2490
2491 * linux-arm-low.c (arm_supports_z_point_type): Add software
2492 breakpoint support.
2493
b0b4b501
AT
24942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2495
2496 * linux-arm-low.c: Refactor breakpoint definitions.
2497 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2498 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2499
8689682c
AT
25002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2501
2502 * Makefile.in: Add arm.c/o.
2503 * configure.srv: Likewise.
2504 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2505 (arm_breakpoint_kind_from_pc): New function.
2506 (arm_sw_breakpoint_from_kind): Return proper kind.
2507 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2508
27165294
AT
25092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2512 removal.
2513 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2514 (struct raw_breakpoint) <size>: Remove.
2515 (struct raw_breakpoint) <kind>: Add.
2516 (bp_size): New function.
2517 (bp_opcode): Likewise.
2518 (find_raw_breakpoint_at): Adjust for kind.
2519 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2520 (remove_memory_breakpoint): Adjust for kind call bp_size.
2521 (set_raw_breakpoint_at): Adjust for kind.
2522 (set_breakpoint): Likewise.
2523 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2524 (delete_raw_breakpoint): Adjust for kind.
2525 (delete_breakpoint): Likewise.
2526 (find_gdb_breakpoint): Likewise.
2527 (set_gdb_breakpoint_1): Likewise.
2528 (set_gdb_breakpoint): Likewise.
2529 (delete_gdb_breakpoint_1): Likewise.
2530 (delete_gdb_breakpoint): Likewise.
2531 (uninsert_raw_breakpoint): Likewise.
2532 (reinsert_raw_breakpoint): Likewise.
2533 (set_breakpoint_data): Remove.
2534 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2535 (check_mem_read): Adjust for kind call bp_size.
2536 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2537 (clone_one_breakpoint): Adjust for kind.
2538 * mem-break.h (set_gdb_breakpoint): Likewise.
2539 (delete_gdb_breakpoint): Likewise.
2540 * server.c (process_serial_event): Likewise.
2541
dd373349
AT
25422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2543
2544 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2545 (struct linux_target_ops) <breakpoint>: Remove.
2546 (struct linux_target_ops) <breakpoint_len>: Remove.
2547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2548 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2549 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2550 (arm_sw_breakpoint_from_kind): New function.
2551 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2552 (struct linux_target_ops) <breakpoint>: Remove.
2553 (struct linux_target_ops) <breakpoint_len>: Remove.
2554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2556 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2557 (struct linux_target_ops) <breakpoint>: Remove.
2558 (struct linux_target_ops) <breakpoint_len>: Remove.
2559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2561 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2562 (struct linux_target_ops) <breakpoint>: Remove.
2563 (struct linux_target_ops) <breakpoint_len>: Remove.
2564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2566 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2567 and sw_breakpoint_from_kind to increment the pc.
2568 (linux_breakpoint_kind_from_pc): New function.
2569 (linux_sw_breakpoint_from_kind): New function.
2570 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2571 (initialize_low): Call breakpoint_kind_from_pc and
2572 sw_breakpoint_from_kind to replace breakpoint_data/len.
2573 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2574 New field.
2575 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2576 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2577 (struct linux_target_ops) <breakpoint>: Remove.
2578 (struct linux_target_ops) <breakpoint_len>: Remove.
2579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2581 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2582 (struct linux_target_ops) <breakpoint>: Remove.
2583 (struct linux_target_ops) <breakpoint_len>: Remove.
2584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2586 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2587 (struct linux_target_ops) <breakpoint>: Remove.
2588 (struct linux_target_ops) <breakpoint_len>: Remove.
2589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2591 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2592 (struct linux_target_ops) <breakpoint>: Remove.
2593 (struct linux_target_ops) <breakpoint_len>: Remove.
2594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2596 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2597 (struct linux_target_ops) <breakpoint>: Remove.
2598 (struct linux_target_ops) <breakpoint_len>: Remove.
2599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2601 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2602 (struct linux_target_ops) <breakpoint>: Remove.
2603 (struct linux_target_ops) <breakpoint_len>: Remove.
2604 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2605 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2606 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2607 (struct linux_target_ops) <breakpoint>: Remove.
2608 (struct linux_target_ops) <breakpoint_len>: Remove.
2609 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2610 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2611 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2612 (struct linux_target_ops) <breakpoint>: Remove.
2613 (struct linux_target_ops) <breakpoint_len>: Remove.
2614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2616 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2617 (struct linux_target_ops) <breakpoint>: Remove.
2618 (struct linux_target_ops) <breakpoint_len>: Remove.
2619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2621 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2622 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2623 (struct linux_target_ops) <breakpoint>: Remove.
2624 (struct linux_target_ops) <breakpoint_len>: Remove.
2625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2627 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2628 (struct linux_target_ops) <breakpoint>: Remove.
2629 (struct linux_target_ops) <breakpoint_len>: Remove.
2630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2632
4cd98a19
AT
26332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2634
2635 * linux-cris-low.c (cris_get_pc): Remove void arg.
2636
774ee6d2
AR
26372015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2638
2639 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2640 variable name.
2641
833dcd29
AR
26422015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2643
2644 * inferiors.c (thread_pid_matches_callback): New function.
2645 (find_thread_process): New function.
2646 (remove_thread): Reset current_thread.
2647 (remove_process): Assert threads have been removed first.
2648
8d689ee5
YQ
26492015-10-15 Yao Qi <yao.qi@linaro.org>
2650
2651 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2652 if it is 3.
2653 (aarch64_remove_point): Likewise.
2654 * regcache.c (regcache_register_size): New function.
2655
1c2e1515
YQ
26562015-10-12 Yao Qi <yao.qi@linaro.org>
2657
2658 * linux-aarch64-low.c: Update all callers as emit_load_store
2659 is renamed to aarch64_emit_load_store.
2660
e1c587c3
YQ
26612015-10-12 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-aarch64-low.c: Update all callers of function renaming
2664 from emit_insn to aarch64_emit_insn.
2665
b6542f81
YQ
26662015-10-12 Yao Qi <yao.qi@linaro.org>
2667
2668 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2669 arch/aarch64-insn.h.
2670 (struct aarch64_memory_operand): Likewise.
2671 (ENCODE): Likewise.
2672 (emit_insn): Move to arch/aarch64-insn.c.
2673 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2674 (emit_load_store): Move to arch/aarch64-insn.c.
2675 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2676 (can_encode_int32): Remove.
2677
246994ce
YQ
26782015-10-12 Yao Qi <yao.qi@linaro.org>
2679
2680 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2681 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2682 (aarch64_relocate_instruction): Likewise.
2683 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2684 (struct aarch64_insn_visitor): Likewise.
2685
0badd99f
YQ
26862015-10-12 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2689 (struct aarch64_insn_visitor): New.
2690 (struct aarch64_insn_relocation_data): New.
2691 (aarch64_ftrace_insn_reloc_b): New function.
2692 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2693 (aarch64_ftrace_insn_reloc_cb): Likewise.
2694 (aarch64_ftrace_insn_reloc_tb): Likewise.
2695 (aarch64_ftrace_insn_reloc_adr): Likewise.
2696 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2697 (aarch64_ftrace_insn_reloc_others): Likewise.
2698 (visitor): New.
2699 (aarch64_relocate_instruction): Use visitor.
2700
dfaffe9d
YQ
27012015-10-12 Yao Qi <yao.qi@linaro.org>
2702
2703 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2704 int. Add argument buf.
2705 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2706 aarch64_relocate_instruction.
2707
70b439f0
YQ
27082015-10-12 Yao Qi <yao.qi@linaro.org>
2709
2710 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2711 argument insn. Remove local variable insn. Don't call
2712 target_read_uint32.
2713 (aarch64_install_fast_tracepoint_jump_pad): Call
2714 target_read_uint32.
2715
7781c06f
YQ
27162015-09-30 Yao Qi <yao.qi@linaro.org>
2717
2718 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2719 (emit_load_store_pair): Likewise.
2720
9a3c8263
SM
27212015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * dll.c (match_dll): Add cast(s).
2724 (unloaded_dll): Likewise.
2725 * linux-low.c (second_thread_of_pid_p): Likewise.
2726 (delete_lwp_callback): Likewise.
2727 (count_events_callback): Likewise.
2728 (select_event_lwp_callback): Likewise.
2729 (linux_set_resume_request): Likewise.
2730 * server.c (accumulate_file_name_length): Likewise.
2731 (emit_dll_description): Likewise.
2732 (handle_qxfer_threads_worker): Likewise.
2733 (visit_actioned_threads): Likewise.
2734 * thread-db.c (any_thread_of): Likewise.
2735 * tracepoint.c (same_process_p): Likewise.
2736 (match_blocktype): Likewise.
2737 (build_traceframe_info_xml): Likewise.
2738
224c3ddb
SM
27392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2740
2741 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2742 assignment.
2743 (gdb_unparse_agent_expr): Likewise.
2744 * hostio.c (require_data): Likewise.
2745 (handle_pread): Likewise.
2746 * linux-low.c (disable_regset): Likewise.
2747 (fetch_register): Likewise.
2748 (store_register): Likewise.
2749 (get_dynamic): Likewise.
2750 (linux_qxfer_libraries_svr4): Likewise.
2751 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2752 (set_fast_tracepoint_jump): Likewise.
2753 (uninsert_fast_tracepoint_jumps_at): Likewise.
2754 (reinsert_fast_tracepoint_jumps_at): Likewise.
2755 (validate_inserted_breakpoint): Likewise.
2756 (clone_agent_expr): Likewise.
2757 * regcache.c (init_register_cache): Likewise.
2758 * remote-utils.c (putpkt_binary_1): Likewise.
2759 (decode_M_packet): Likewise.
2760 (decode_X_packet): Likewise.
2761 (look_up_one_symbol): Likewise.
2762 (relocate_instruction): Likewise.
2763 (monitor_output): Likewise.
2764 * server.c (handle_search_memory): Likewise.
2765 (handle_qxfer_exec_file): Likewise.
2766 (handle_qxfer_libraries): Likewise.
2767 (handle_qxfer): Likewise.
2768 (handle_query): Likewise.
2769 (handle_v_cont): Likewise.
2770 (handle_v_run): Likewise.
2771 (captured_main): Likewise.
2772 * target.c (write_inferior_memory): Likewise.
2773 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2774 * tracepoint.c (init_trace_buffer): Likewise.
2775 (add_tracepoint_action): Likewise.
2776 (add_traceframe): Likewise.
2777 (add_traceframe_block): Likewise.
2778 (cmd_qtdpsrc): Likewise.
2779 (cmd_qtdv): Likewise.
2780 (cmd_qtstatus): Likewise.
2781 (response_source): Likewise.
2782 (response_tsv): Likewise.
2783 (cmd_qtnotes): Likewise.
2784 (gdb_collect): Likewise.
2785 (initialize_tracepoint): Likewise.
2786
afbe19f8
PL
27872015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2788
2789 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2790 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2791 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2792 <NOP>: New.
2793 (enum aarch64_condition_codes): New enum.
2794 (w0): New static global.
2795 (fp): Likewise.
2796 (lr): Likewise.
2797 (struct aarch64_memory_operand) <type>: New
2798 MEMORY_OPERAND_POSTINDEX type.
2799 (postindex_memory_operand): New helper function.
2800 (emit_ret): New function.
2801 (emit_load_store_pair): New function, factored out of emit_stp
2802 with support for MEMORY_OPERAND_POSTINDEX.
2803 (emit_stp): Rewrite using emit_load_store_pair.
2804 (emit_ldp): New function.
2805 (emit_load_store): Likewise.
2806 (emit_ldr): Mention post-index instruction in comment.
2807 (emit_ldrh): New function.
2808 (emit_ldrb): New function.
2809 (emit_ldrsw): Mention post-index instruction in comment.
2810 (emit_str): Likewise.
2811 (emit_subs): New function.
2812 (emit_cmp): Likewise.
2813 (emit_and): Likewise.
2814 (emit_orr): Likewise.
2815 (emit_orn): Likewise.
2816 (emit_eor): Likewise.
2817 (emit_mvn): Likewise.
2818 (emit_lslv): Likewise.
2819 (emit_lsrv): Likewise.
2820 (emit_asrv): Likewise.
2821 (emit_mul): Likewise.
2822 (emit_sbfm): Likewise.
2823 (emit_sbfx): Likewise.
2824 (emit_ubfm): Likewise.
2825 (emit_ubfx): Likewise.
2826 (emit_csinc): Likewise.
2827 (emit_cset): Likewise.
2828 (emit_nop): Likewise.
2829 (emit_ops_insns): New helper function.
2830 (emit_pop): Likewise.
2831 (emit_push): Likewise.
2832 (aarch64_emit_prologue): New function.
2833 (aarch64_emit_epilogue): Likewise.
2834 (aarch64_emit_add): Likewise.
2835 (aarch64_emit_sub): Likewise.
2836 (aarch64_emit_mul): Likewise.
2837 (aarch64_emit_lsh): Likewise.
2838 (aarch64_emit_rsh_signed): Likewise.
2839 (aarch64_emit_rsh_unsigned): Likewise.
2840 (aarch64_emit_ext): Likewise.
2841 (aarch64_emit_log_not): Likewise.
2842 (aarch64_emit_bit_and): Likewise.
2843 (aarch64_emit_bit_or): Likewise.
2844 (aarch64_emit_bit_xor): Likewise.
2845 (aarch64_emit_bit_not): Likewise.
2846 (aarch64_emit_equal): Likewise.
2847 (aarch64_emit_less_signed): Likewise.
2848 (aarch64_emit_less_unsigned): Likewise.
2849 (aarch64_emit_ref): Likewise.
2850 (aarch64_emit_if_goto): Likewise.
2851 (aarch64_emit_goto): Likewise.
2852 (aarch64_write_goto_address): Likewise.
2853 (aarch64_emit_const): Likewise.
2854 (aarch64_emit_call): Likewise.
2855 (aarch64_emit_reg): Likewise.
2856 (aarch64_emit_pop): Likewise.
2857 (aarch64_emit_stack_flush): Likewise.
2858 (aarch64_emit_zero_ext): Likewise.
2859 (aarch64_emit_swap): Likewise.
2860 (aarch64_emit_stack_adjust): Likewise.
2861 (aarch64_emit_int_call_1): Likewise.
2862 (aarch64_emit_void_call_2): Likewise.
2863 (aarch64_emit_eq_goto): Likewise.
2864 (aarch64_emit_ne_goto): Likewise.
2865 (aarch64_emit_lt_goto): Likewise.
2866 (aarch64_emit_le_goto): Likewise.
2867 (aarch64_emit_gt_goto): Likewise.
2868 (aarch64_emit_ge_got): Likewise.
2869 (aarch64_emit_ops_impl): New static global variable.
2870 (aarch64_emit_ops): New target function, return
2871 &aarch64_emit_ops_impl.
2872 (struct linux_target_ops): Install it.
2873
bb903df0
PL
28742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2875
2876 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2877 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2878 aarch64-ipa.o.
2879 * linux-aarch64-ipa.c: New file.
2880 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2881 and endian.h.
2882 (aarch64_get_thread_area): New target method.
2883 (extract_signed_bitfield): New helper function.
2884 (aarch64_decode_ldr_literal): New function.
2885 (enum aarch64_opcodes): New enum.
2886 (struct aarch64_register): New struct.
2887 (struct aarch64_operand): New struct.
2888 (x0): New static global.
2889 (x1): Likewise.
2890 (x2): Likewise.
2891 (x3): Likewise.
2892 (x4): Likewise.
2893 (w2): Likewise.
2894 (ip0): Likewise.
2895 (sp): Likewise.
2896 (xzr): Likewise.
2897 (aarch64_register): New helper function.
2898 (register_operand): Likewise.
2899 (immediate_operand): Likewise.
2900 (struct aarch64_memory_operand): New struct.
2901 (offset_memory_operand): New helper function.
2902 (preindex_memory_operand): Likewise.
2903 (enum aarch64_system_control_registers): New enum.
2904 (ENCODE): New macro.
2905 (emit_insn): New helper function.
2906 (emit_b): New function.
2907 (emit_bcond): Likewise.
2908 (emit_cb): Likewise.
2909 (emit_tb): Likewise.
2910 (emit_blr): Likewise.
2911 (emit_stp): Likewise.
2912 (emit_ldp_q_offset): Likewise.
2913 (emit_stp_q_offset): Likewise.
2914 (emit_load_store): Likewise.
2915 (emit_ldr): Likewise.
2916 (emit_ldrsw): Likewise.
2917 (emit_str): Likewise.
2918 (emit_ldaxr): Likewise.
2919 (emit_stxr): Likewise.
2920 (emit_stlr): Likewise.
2921 (emit_data_processing_reg): Likewise.
2922 (emit_data_processing): Likewise.
2923 (emit_add): Likewise.
2924 (emit_sub): Likewise.
2925 (emit_mov): Likewise.
2926 (emit_movk): Likewise.
2927 (emit_mov_addr): Likewise.
2928 (emit_mrs): Likewise.
2929 (emit_msr): Likewise.
2930 (emit_sevl): Likewise.
2931 (emit_wfe): Likewise.
2932 (append_insns): Likewise.
2933 (can_encode_int32_in): New helper function.
2934 (aarch64_relocate_instruction): New function.
2935 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2936 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2937 (struct linux_target_ops): Install aarch64_get_thread_area,
2938 aarch64_install_fast_tracepoint_jump_pad and
2939 aarch64_get_min_fast_tracepoint_insn_len.
2940
787749ea
PL
29412015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2942
2943 * Makefile.in (aarch64-insn.o): New rule.
2944 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2945
9812b2e6
YQ
29462015-09-21 Yao Qi <yao.qi@linaro.org>
2947
2948 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2949
18fe412b
YQ
29502015-09-21 Yao Qi <yao.qi@linaro.org>
2951
2952 * tracepoint.c (max_jump_pad_size): Remove.
2953
a0cc84cd
YQ
29542015-09-18 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-aarch64-low.c: Don't include sys/uio.h.
2957 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2958
d78908cf
WW
29592015-09-16 Wei-cheng Wang <cole945@gmail.com>
2960
2961 * tracepoint.c (eval_result_type): Change prototype.
2962 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2963
d57e0d50
PA
29642015-09-15 Pedro Alves <palves@redhat.com>
2965
2966 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2967 Check whether to report exec events instead of checking whether
2968 multiprocess is enabled.
2969
5a676acc
PA
29702015-09-15 Pedro Alves <palves@redhat.com>
2971
2972 PR remote/18965
2973 * remote-utils.c (prepare_resume_reply): Merge
2974 TARGET_WAITKIND_VFORK_DONE switch case with the
2975 TARGET_WAITKIND_FORKED case.
2976
7c5d0fad
YQ
29772015-09-15 Yao Qi <yao.qi@linaro.org>
2978
2979 * server.c (handle_query): Check string comparison using
2980 "else if" instead of "if".
2981
750ce8d1
YQ
29822015-09-15 Yao Qi <yao.qi@linaro.org>
2983
2984 * server.c (vCont_supported): New global variable.
2985 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2986 matches. Append ";vContSupported+" to own_buf.
2987 (handle_v_requests): Append ";s;S" to own_buf if target supports
2988 hardware single step or vCont_supported is false.
2989 (capture_main): Set vCont_supported to zero.
2990
70b90b91
YQ
29912015-09-15 Yao Qi <yao.qi@linaro.org>
2992
2993 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2994 it to ...
2995 (linux_supports_hardware_single_step): ... New function.
2996 (linux_target_ops): Update.
2997 * lynx-low.c (lynx_target_ops): Set field
2998 supports_hardware_single_step to target_can_do_hardware_single_step.
2999 * nto-low.c (nto_target_ops): Likewise.
3000 * spu-low.c (spu_target_ops): Likewise.
3001 * win32-low.c (win32_target_ops): Likewise.
3002 * target.c (target_can_do_hardware_single_step): New function.
3003 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3004 Remove. <supports_hardware_single_step>: New field.
3005 (target_supports_conditional_breakpoints): Remove.
3006 (target_supports_hardware_single_step): New macro.
3007 (target_can_do_hardware_single_step): Declare.
3008 * server.c (handle_query): Use target_supports_hardware_single_step
3009 instead of target_supports_conditional_breakpoints.
3010
ade90bde
YQ
30112015-09-15 Yao Qi <yao.qi@linaro.org>
3012
3013 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3014 function.
3015 (struct linux_target_ops the_low_target): Install
3016 aarch64_linux_siginfo_fixup.
3017
94585166
DB
30182015-09-11 Don Breazeal <donb@codesourcery.com>
3019 Luis Machado <lgustavo@codesourcery.com>
3020
3021 * linux-low.c (linux_mourn): Static declaration.
3022 (linux_arch_setup): Move in front of
3023 handle_extended_wait.
3024 (linux_arch_setup_thread): New function.
3025 (handle_extended_wait): Handle exec events. Call
3026 linux_arch_setup_thread. Make event_lwp argument a
3027 pointer-to-a-pointer.
3028 (check_zombie_leaders): Do not check stopped threads.
3029 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3030 (linux_low_filter_event): Add lwp and thread for exec'ing
3031 non-leader thread if leader thread has been deleted.
3032 Refactor code into linux_arch_setup_thread and call it.
3033 Pass child lwp pointer by reference to handle_extended_wait.
3034 (linux_wait_for_event_filtered): Update comment.
3035 (linux_wait_1): Prevent clobbering exec event status.
3036 (linux_supports_exec_events): New function.
3037 (linux_target_ops) <supports_exec_events>: Initialize new member.
3038 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3039 new member.
3040 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3041 * server.c (report_exec_events): New global variable.
3042 (handle_query): Handle qSupported query for exec-events feature.
3043 (captured_main): Initialize report_exec_events.
3044 * server.h (report_exec_events): Declare new global variable.
3045 * target.h (struct target_ops) <supports_exec_events>: New
3046 member.
3047 (target_supports_exec_events): New macro.
3048 * win32-low.c (win32_target_ops) <supports_exec_events>:
3049 Initialize new member.
3050
0568462b
MM
30512015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3052
3053 * linux-low.c (linux_low_enable_btrace): Remove.
3054 (linux_target_ops): Replace linux_low_enable_btrace with
3055 linux_enable_btrace.
3056
39edd165
YQ
30572015-09-03 Yao Qi <yao.qi@linaro.org>
3058
3059 * linux-aarch64-low.c (aarch64_insert_point): Call
3060 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3061 returns true.
3062
1db33b5a
UW
30632015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3064
3065 * linux-low.c (check_stopped_by_breakpoint): Use
3066 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3067
ab290430
PA
30682015-08-27 Pedro Alves <palves@redhat.com>
3069
3070 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3071
8d749320
SM
30722015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3073
6711b7f8
SM
3074 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3075 the XNEW-family equivalent.
8d749320
SM
3076 (compile_bytecodes): Likewise.
3077 * dll.c (loaded_dll): Likewise.
3078 * event-loop.c (append_callback_event): Likewise.
3079 (create_file_handler): Likewise.
3080 (create_file_event): Likewise.
3081 * hostio.c (handle_open): Likewise.
3082 * inferiors.c (add_thread): Likewise.
3083 (add_process): Likewise.
3084 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3085 * linux-arm-low.c (arm_new_process): Likewise.
3086 (arm_new_thread): Likewise.
3087 * linux-low.c (add_to_pid_list): Likewise.
3088 (linux_add_process): Likewise.
3089 (handle_extended_wait): Likewise.
3090 (add_lwp): Likewise.
3091 (enqueue_one_deferred_signal): Likewise.
3092 (enqueue_pending_signal): Likewise.
3093 (linux_resume_one_lwp_throw): Likewise.
3094 (linux_resume_one_thread): Likewise.
3095 (linux_read_memory): Likewise.
3096 (linux_write_memory): Likewise.
3097 * linux-mips-low.c (mips_linux_new_process): Likewise.
3098 (mips_linux_new_thread): Likewise.
3099 (mips_add_watchpoint): Likewise.
3100 * linux-x86-low.c (initialize_low_arch): Likewise.
3101 * lynx-low.c (lynx_add_process): Likewise.
3102 * mem-break.c (set_raw_breakpoint_at): Likewise.
3103 (set_breakpoint): Likewise.
3104 (add_condition_to_breakpoint): Likewise.
3105 (add_commands_to_breakpoint): Likewise.
3106 (clone_agent_expr): Likewise.
3107 (clone_one_breakpoint): Likewise.
3108 * regcache.c (new_register_cache): Likewise.
3109 * remote-utils.c (look_up_one_symbol): Likewise.
3110 * server.c (queue_stop_reply): Likewise.
3111 (start_inferior): Likewise.
3112 (queue_stop_reply_callback): Likewise.
3113 (handle_target_event): Likewise.
3114 * spu-low.c (fetch_ppc_memory): Likewise.
3115 (store_ppc_memory): Likewise.
3116 * target.c (set_target_ops): Likewise.
3117 * thread-db.c (thread_db_load_search): Likewise.
3118 (try_thread_db_load_1): Likewise.
3119 * tracepoint.c (add_tracepoint): Likewise.
3120 (add_tracepoint_action): Likewise.
3121 (create_trace_state_variable): Likewise.
3122 (cmd_qtdpsrc): Likewise.
3123 (cmd_qtro): Likewise.
3124 (add_while_stepping_state): Likewise.
3125 * win32-low.c (child_add_thread): Likewise.
3126 (get_image_name): Likewise.
3127
ed8b7b42
YQ
31282015-08-25 Yao Qi <yao.qi@linaro.org>
3129
3130 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3131
db3cb7cb
YQ
31322015-08-25 Yao Qi <yao.qi@linaro.org>
3133
3134 * Makefile.in (aarch64-linux.o): New rule.
3135 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3136 srv_tgtobj.
3137 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3138 (aarch64_init_debug_reg_state): Make it extern.
3139 (aarch64_linux_prepare_to_resume): Remove.
3140
f6011a1c
YQ
31412015-08-25 Yao Qi <yao.qi@linaro.org>
3142
3143 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3144 lwp_arch_private_info and ptid_of_lwp.
3145
88e2cf7e
YQ
31462015-08-25 Yao Qi <yao.qi@linaro.org>
3147
3148 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3149 Find proc_info by find_process_pid. All callers updated.
3150
5e35436e
YQ
31512015-08-25 Yao Qi <yao.qi@linaro.org>
3152
3153 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3154 Remove.
3155 (debug_reg_change_callback): Remove.
3156 (aarch64_notify_debug_reg_change): Remove.
3157
4a8a7965
YQ
31582015-08-25 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3161 Call current_lwp_ptid.
3162
32a271ee
YQ
31632015-08-25 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-aarch64-low.c (debug_reg_change_callback): Use
3166 debug_printf.
3167
0d51c8d7
YQ
31682015-08-25 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3171
31a43dd5
YQ
31722015-08-25 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3175
8ee52567
YQ
31762015-08-25 Yao Qi <yao.qi@linaro.org>
3177
3178 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3179 the code.
3180
ff3f0f45
YQ
31812015-08-25 Yao Qi <yao.qi@linaro.org>
3182
3183 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3184 Remove.
3185 (debug_reg_change_callback): Remove argument entry and add argument
3186 lwp. Remove local variable thread. Don't print thread id in the
3187 debugging output. Don't check whether pid of thread equals to pid.
3188 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3189 iterate_over_lwps instead find_inferior.
3190
3d40fbb5
PA
31912015-08-24 Pedro Alves <palves@redhat.com>
3192
3193 * inferiors.c (get_first_process): New function.
3194 * inferiors.h (get_first_process): New declaration.
3195 * remote-utils.c (read_ptid): Default to the first process in the
3196 list, instead of to the current thread's process.
3197
438e1e42
PA
31982015-08-24 Pedro Alves <palves@redhat.com>
3199
3200 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3201 * event-loop.c: Likewise.
3202 * remote-utils.c: Likewise.
3203 * tracepoint.c: Likewise.
3204
a8c6d4fc
PA
32052015-08-24 Pedro Alves <palves@redhat.com>
3206
3207 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3208 ptid_get_lwp.
3209
99b0bb12
PA
32102015-08-21 Pedro Alves <palves@redhat.com>
3211
3212 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3213 instead of literal 1.
3214
f8904751
PA
32152015-08-21 Pedro Alves <palves@redhat.com>
3216
3217 * tdesc.c (default_description): Explicitly zero-initialize.
3218
465a859e
PA
32192015-08-21 Pedro Alves <palves@redhat.com>
3220
3221 PR gdb/18749
3222 * inferiors.c (remove_thread): Discard any pending stop reply for
3223 this thread.
3224 * server.c (remove_all_on_match_pid): Rename to ...
3225 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3226 instead of a pid.
3227 (discard_queued_stop_replies): Change parameter to a ptid. Now
3228 extern.
3229 (handle_v_kill, kill_inferior_callback, captured_main)
3230 (process_serial_event): Adjust.
3231 * server.h (discard_queued_stop_replies): Declare.
3232
f0db101d
PA
32332015-08-21 Pedro Alves <palves@redhat.com>
3234
3235 * linux-low.c (wait_for_sigstop): Always switch to no thread
3236 selected if the previously current thread dies.
3237 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3238 process instead of the current thread's.
3239 * remote-utils.c (input_interrupt): Don't check if there's no
3240 current thread.
3241 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3242 current thread to the general thread fails, error out.
3243 (handle_qxfer_auxv, handle_qxfer_libraries)
3244 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3245 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3246 (handle_query): Check if there's a thread selected instead of
3247 checking whether there's any thread in the thread list.
3248 (handle_qxfer_threads, handle_qxfer_btrace)
3249 (handle_qxfer_btrace_conf): Don't error out early if there's no
3250 thread in the thread list.
3251 (handle_v_cont, myresume): Don't set the current thread to the
3252 continue thread.
3253 (process_serial_event) <Hg handling>: Also set thread_id if the
3254 previous general thread is still alive.
3255 (process_serial_event) <g/G handling>: If setting the current
3256 thread to the general thread fails, error out.
3257 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3258 thread's lwp instead of the current thread's.
3259 * target.c (set_desired_thread): If the desired thread was not
3260 found, leave the current thread pointing to NULL. Return an int
3261 (boolean) indicating success.
3262 * target.h (set_desired_thread): Change return type to int.
3263
40045d91
MF
32642015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3265
3266 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3267 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3268 #includes.
3269 (ps_get_thread_area): New function.
3270
45face3b
GB
32712015-08-19 Gary Benson <gbenson@redhat.com>
3272
3273 * hostio.c (handle_pread): Do not attempt to read more data
3274 than hostio_reply_with_data can fit in a packet.
3275
16d5f642
JB
32762015-08-18 Joel Brobecker <brobecker@adacore.com>
3277
3278 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3279
a738da3a
MF
32802015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3281
3282 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3283
33ebda9d
PA
32842015-08-06 Pedro Alves <palves@redhat.com>
3285
3286 * tracepoint.c (expr_eval_result): Now an int.
3287
a44892be
PA
32882015-08-06 Pedro Alves <palves@redhat.com>
3289
3290 * gdbthread.h (struct regcache): Forward declare.
3291 (struct thread_info) <regcache_data>: Now a struct regcache
3292 pointer.
3293 * inferiors.c (inferior_regcache_data)
3294 (set_inferior_regcache_data): Now work with struct regcache
3295 pointers.
3296 * inferiors.h (struct regcache): Forward declare.
3297 (inferior_regcache_data, set_inferior_regcache_data): Now work
3298 with struct regcache pointers.
3299 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3300 (free_register_cache_thread): Remove struct regcache pointer
3301 casts.
3302
608a1e46
PA
33032015-08-06 Pedro Alves <palves@redhat.com>
3304
3305 * server.c (captured_main): On error, print the exception message
3306 to stderr, and if run_once is set, throw a quit.
3307
f0ce0d3a
PA
33082015-08-06 Pedro Alves <palves@redhat.com>
3309
3310 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3311 the current thread.
3312
bf47e248
PA
33132015-08-06 Pedro Alves <palves@redhat.com>
3314
3315 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3316 reading beyond the passed in buffer length.
3317
b6b9ffcc
PL
33182015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3319
3320 * tracepoint.c (symbol_list) <required>: Remove.
3321
863d01bd
PA
33222015-08-06 Pedro Alves <palves@redhat.com>
3323
3324 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3325 count if stopping and suspending threads.
3326 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3327 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3328 (linux_detach): Complete an ongoing step-over.
3329 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3330 throughout.
3331 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3332 (linux_wait_1): If passing a signal to the inferior after
3333 finishing a step-over, unsuspend and re-resume all lwps. If we
3334 see a single-step event but the thread should be continuing, don't
3335 pass the trap to gdb.
3336 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3337 internal_error instead of gdb_assert.
3338 (enqueue_pending_signal): New function.
3339 (check_ptrace_stopped_lwp_gone): Add debug output.
3340 (start_step_over): Use internal_error instead of gdb_assert.
3341 (complete_ongoing_step_over): New function.
3342 (linux_resume_one_thread): Don't resume a suspended thread.
3343 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3344 it stepping.
3345
00db26fa
PA
33462015-08-06 Pedro Alves <palves@redhat.com>
3347
3348 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3349 (linux_thread_alive): Use lwp_is_marked_dead.
3350 (extended_event_reported): Delete.
3351 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3352 instead of extended_event_reported.
3353 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3354 as well.
3355 (lwp_is_marked_dead): New function.
3356 (lwp_running): Use lwp_is_marked_dead.
3357 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3358 comment.
3359
ad071a30
PA
33602015-08-06 Pedro Alves <palves@redhat.com>
3361
3362 * linux-low.c (linux_wait_1): Move fork event output out of the
3363 !report_to_gdb check. Pass event_child->waitstatus to
3364 target_waitstatus_to_string instead of ourstatus.
3365
524b57e6
YQ
33662015-08-04 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3369 if current_thread is 32 bit.
3370
6085d6f6
YQ
33712015-08-04 Yao Qi <yao.qi@linaro.org>
3372
3373 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3374 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3375 * server.c (extended_protocol): Remove "static".
3376 * server.h (extended_protocol): Declare it.
3377
8a7e4587
YQ
33782015-08-04 Yao Qi <yao.qi@linaro.org>
3379
3380 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3381 both aarch64 and aarch32.
3382 (aarch64_set_pc): Likewise.
3383
3b53ae99
YQ
33842015-08-04 Yao Qi <yao.qi@linaro.org>
3385
3386 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3387 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3388 arm-with-neon.xml to srv_xmlfiles.
3389 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3390 (is_64bit_tdesc): New function.
3391 (aarch64_linux_read_description): New function.
3392 (aarch64_arch_setup): Call aarch64_linux_read_description.
3393 (regs_info): Rename to regs_info_aarch64.
3394 (aarch64_regs_info): Return right regs_info.
3395 (initialize_low_arch): Call initialize_low_arch_aarch32.
3396
bd9e6534
YQ
33972015-08-04 Yao Qi <yao.qi@linaro.org>
3398
3399 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3400 * linux-aarch32-low.c: New file.
3401 * linux-aarch32-low.h: New file.
3402 * linux-arm-low.c (arm_fill_gregset): Move it to
3403 linux-aarch32-low.c.
3404 (arm_store_gregset): Likewise.
3405 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3406 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3407 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3408 (regs_info): Rename to regs_info_arm.
3409 (arm_regs_info): Return regs_info_aarch32 if
3410 have_ptrace_getregset is 1 and target description is
3411 arm_with_neon or arm_with_vfpv3.
3412 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3413 Call initialize_low_arch_aarch32 instead.
3414
ded48a5e
YQ
34152015-08-04 Yao Qi <yao.qi@linaro.org>
3416
3417 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3418 * linux-low.c: ... here.
3419 * linux-low.h (have_ptrace_getregset): Declare it.
3420
96e9210f
PA
34212015-08-04 Pedro Alves <palves@redhat.com>
3422
3423 * thread-db.c (struct thread_db): Use new typedefs.
3424 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3425 CHK calls.
3426 (disable_thread_event_reporting): Cast result of dlsym to
3427 destination function pointer type.
3428 (thread_db_mourn): Use td_ta_delete_ftype.
3429
af60a1ef
SL
34302015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3431
3432 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3433 arch variant.
3434 (CDX_BREAKPOINT): Define for R2.
3435 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3436 (the_low_target): Add comments.
3437
e8b41681
YQ
34382015-07-30 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-arm-low.c (arm_hwcap): Remove it.
3441 (arm_read_description): New local variable arm_hwcap. Don't
3442 set arm_hwcap to zero.
3443
89abb039
YQ
34442015-07-30 Yao Qi <yao.qi@linaro.org>
3445
3446 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3447 Use regcache->tdesc instead.
3448 (arm_store_wmmxregset): Likewise.
3449 (arm_fill_vfpregset): Likewise.
3450 (arm_store_vfpregset): Likewise.
3451
deca266c
YQ
34522015-07-30 Yao Qi <yao.qi@linaro.org>
3453
3454 * linux-arm-low.c: Include arch/arm.h.
3455 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3456 (arm_store_gregset): Likewise.
3457
aa58a496
SM
34582015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3459
3460 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3461 ptrace's 4th parameter.
3462
50904b25
YQ
34632015-07-27 Yao Qi <yao.qi@linaro.org>
3464
3465 * configure.srv (case aarch64*-*-linux*): Don't set
3466 srv_linux_usrregs.
3467
5826e159
PA
34682015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3469
3470 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3471 sys/ptrace.h.
3472 * linux-arm-low.c: Likewise.
3473 * linux-cris-low.c: Likewise.
3474 * linux-crisv32-low.c: Likewise.
3475 * linux-low.c: Likewise.
3476 * linux-m68k-low.c: Likewise.
3477 * linux-mips-low.c: Likewise.
3478 * linux-nios2-low.c: Likewise.
3479 * linux-s390-low.c: Likewise.
3480 * linux-sparc-low.c: Likewise.
3481 * linux-tic6x-low.c: Likewise.
3482 * linux-tile-low.c: Likewise.
3483 * linux-x86-low.c: Likewise.
3484
54019719
PA
34852015-07-24 Pedro Alves <palves@redhat.com>
3486
3487 * config.in: Regenerate.
3488 * configure: Regenerate.
3489
eb7aa561
PA
34902015-07-24 Pedro Alves <palves@redhat.com>
3491
3492 * acinclude.m4: Include ../ptrace.m4.
3493 * configure.ac: Call GDB_AC_PTRACE.
3494 * config.in, configure: Regenerate.
3495
55d7b841
YQ
34962015-07-24 Yao Qi <yao.qi@linaro.org>
3497
3498 * linux-low.c (linux_create_inferior): Remove setting to
3499 proc->priv->new_inferior.
3500 (linux_attach): Likewise.
3501 (linux_low_filter_event): Likewise.
3502 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3503
c06cbd92
YQ
35042015-07-24 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-low.c (linux_arch_setup): New function.
3507 (linux_low_filter_event): If proc->tdesc is NULL and
3508 proc->attached is true, call the_low_target.arch_setup.
3509 Otherwise, keep status pending, and return.
3510 (linux_resume_one_lwp_throw): Don't call get_pc if
3511 thread->while_stepping isn't NULL. Don't call
3512 get_thread_regcache if proc->tdesc is NULL.
3513 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3514 (linux_target_ops): Install arch_setup.
3515 * server.c (start_inferior): Call the_target->arch_setup.
3516 * target.h (struct target_ops) <arch_setup>: New field.
3517 (target_arch_setup): New marco.
3518 * lynx-low.c (lynx_target_ops): Update.
3519 * nto-low.c (nto_target_ops): Update.
3520 * spu-low.c (spu_target_ops): Update.
3521 * win32-low.c (win32_target_ops): Update.
3522
5ae3ebba
YQ
35232015-07-24 Yao Qi <yao.qi@linaro.org>
3524
3525 * linux-low.c (linux_add_process): Don't set
3526 proc->priv->new_inferior.
3527 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3528 (linux_attach): Likewise.
3529
eb97750b
YQ
35302015-07-24 Yao Qi <yao.qi@linaro.org>
3531
3532 * server.c (start_inferior): Code refactor.
3533
51aee833
YQ
35342015-07-24 Yao Qi <yao.qi@linaro.org>
3535
3536 * server.c (process_serial_event): Set general_thread.
3537
af1b22f3
YQ
35382015-07-21 Yao Qi <yao.qi@linaro.org>
3539
3540 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3541 aarch64_linux_get_debug_reg_capacity.
3542
554717a3
YQ
35432015-07-17 Yao Qi <yao.qi@linaro.org>
3544
3545 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3546 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3547 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3548 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3549 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3550 (AARCH64_HWP_ALIGNMENT): Likewise.
3551 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3552 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3553 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3554 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3555 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3556 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3557 (struct aarch64_debug_reg_state): Likewise.
3558 (struct arch_lwp_info): Likewise.
3559 (aarch64_align_watchpoint): Likewise.
3560 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3561 (aarch64_watchpoint_length): Likewise.
3562 (aarch64_point_encode_ctrl_reg): Likewise
3563 (aarch64_point_is_aligned): Likewise.
3564 (aarch64_align_watchpoint): Likewise.
3565 (aarch64_linux_set_debug_regs):
3566 (aarch64_dr_state_insert_one_point): Likewise.
3567 (aarch64_dr_state_remove_one_point): Likewise.
3568 (aarch64_handle_breakpoint): Likewise.
3569 (aarch64_handle_aligned_watchpoint): Likewise.
3570 (aarch64_handle_unaligned_watchpoint): Likewise.
3571 (aarch64_handle_watchpoint): Likewise.
3572
c67ca4de
YQ
35732015-07-17 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3576 and don't aarch64_get_debug_reg_state. All callers update.
3577 (aarch64_handle_aligned_watchpoint): Likewise.
3578 (aarch64_handle_unaligned_watchpoint): Likewise.
3579 (aarch64_handle_watchpoint): Likewise.
3580 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3581 (aarch64_remove_point): Likewise.
3582
25abf979
YQ
35832015-07-17 Yao Qi <yao.qi@linaro.org>
3584
3585 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3586 debug_printf.
3587 (aarch64_handle_unaligned_watchpoint): Likewise.
3588
db1ff28b
JK
35892015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3590
3591 Revert the previous 3 commits:
3592 Move gdb_regex* to common/
3593 Move linux_find_memory_regions_full & co.
3594 gdbserver build-id attribute generator
3595
700ca40f
JK
35962015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3597 Jan Kratochvil <jan.kratochvil@redhat.com>
3598
3599 gdbserver build-id attribute generator.
3600 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3601 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3602 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3603 (find_phdr): New.
3604 (get_dynamic): Use find_pdhr to traverse program headers.
3605 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3606 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3607 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3608 (get_hex_build_id): New.
3609 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3610 to reply XML document.
3611
9904185c
JK
36122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3613 Jan Kratochvil <jan.kratochvil@redhat.com>
3614
3615 * target.c: Include target/target-utils.h and fcntl.h.
3616 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3617 (target_fileio_read_stralloc): New functions.
3618
6e5b4429
JK
36192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3620
3621 * Makefile.in (OBS): Add gdb_regex.o.
3622 (gdb_regex.o): New.
3623 * config.in: Rebuilt.
3624 * configure: Rebuilt.
3625
ddc98fbf
JK
36262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3627 Jan Kratochvil <jan.kratochvil@redhat.com>
3628
3629 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3630 * Makefile.in (OBS): Add target-utils.o.
3631 (linux-maps.o, target-utils.o): New.
3632 * configure.srv (srv_linux_obj): Add linux-maps.o.
3633
e57bb7a0
PL
36342015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3635
3636 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3637 function, return 1.
3638 (the_low_target): Install it.
3639
586b02a9
PA
36402015-07-14 Pedro Alves <palves@redhat.com>
3641
3642 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3643 Instead, ignore ECHILD, and throw an error for other errnos.
3644
58c1b36c
PA
36452015-07-10 Pedro Alves <palves@redhat.com>
3646
3647 * event-loop.c (struct callback_event) <data>: Change type to
3648 gdb_client_data instance instead of gdb_client_data pointer.
3649 (append_callback_event): Adjust.
3650
421530db
PL
36512015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3652
3653 * linux-aarch64-low.c: Add comments for each linux_target_ops
3654 method. Remove comments already covered in target_ops and
3655 linux_target_ops definitions.
3656 (the_low_target): Add comments for each unimplemented method.
3657
c2d65f38
YQ
36582015-07-09 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c (aarch64_regmap): Remove.
3661 (aarch64_usrregs_info): Remove.
3662 (regs_info): Set field usrregs to NULL.
3663
b20a6524
MM
36642015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3665
3666 * linux-low.c: Include "rsp-low.h"
3667 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3668 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3669 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3670 (handle_btrace_enable_pt): New.
3671 (handle_btrace_general_set): Support "pt".
3672 (handle_btrace_conf_general_set): Support "pt:size".
3673
96c97461
PL
36742015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3675
3676 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3677 Z_PACKET_SW_BP.
3678
37d66942
PL
36792015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3680
3681 * linux-aarch64-low.c: Remove comment about endianness.
3682 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3683 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3684 memcmp.
3685
dc06243f
GB
36862015-06-24 Gary Benson <gbenson@redhat.com>
3687
3688 * linux-i386-ipa.c (stdint.h): Do not include.
3689 * lynx-i386-low.c (stdint.h): Likewise.
3690 * lynx-ppc-low.c (stdint.h): Likewise.
3691 * mem-break.c (stdint.h): Likewise.
3692 * thread-db.c (stdint.h): Likewise.
3693 * tracepoint.c (stdint.h): Likewise.
3694 * win32-low.c (stdint.h): Likewise.
3695
124e13d9
SM
36962015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3697
3698 * server.c (write_qxfer_response): Update call to
3699 remote_escape_output.
3700
909c2cda
JK
37012015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3702 Jan Kratochvil <jan.kratochvil@redhat.com>
3703
3704 Merge multiple hex conversions.
3705 * gdbreplay.c (tohex): Rename to 'fromhex'.
3706 (logchar): Use fromhex.
3707
24c05f46
JK
37082015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3709
3710 * server.c (handle_qxfer_libraries): Set `version' attribute for
3711 <library-list>.
3712
14d2069a
GB
37132015-06-10 Gary Benson <gbenson@redhat.com>
3714
3715 * target.h (struct target_ops) <multifs_open>: New field.
3716 <multifs_unlink>: Likewise.
3717 <multifs_readlink>: Likewise.
3718 * linux-low.c (nat/linux-namespaces.h): New include.
3719 (linux_target_ops): Initialize the_target->multifs_open,
3720 the_target->multifs_unlink and the_target->multifs_readlink.
3721 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3722 * hostio.c (hostio_fs_pid): New static variable.
3723 (hostio_handle_new_gdb_connection): New function.
3724 (handle_setfs): Likewise.
3725 (handle_open): Use the_target->multifs_open as appropriate.
3726 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3727 (handle_readlink): Use the_target->multifs_readlink as
3728 appropriate.
3729 (handle_vFile): Handle vFile:setfs packets.
3730 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3731 after target_handle_new_gdb_connection.
3732
4b8b5e72
GB
37332015-06-10 Gary Benson <gbenson@redhat.com>
3734
3735 * configure.ac (AC_CHECK_FUNCS): Add setns.
3736 * config.in: Regenerate.
3737 * configure: Likewise.
3738 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3739 (linux-namespaces.o): New rule.
3740 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3741
3ac2e371
GB
37422015-06-09 Gary Benson <gbenson@redhat.com>
3743
3744 * hostio.c (handle_open): Process mode argument with
3745 fileio_to_host_mode.
3746
ca9b78ce
YQ
37472015-06-01 Yao Qi <yao.qi@linaro.org>
3748
3749 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3750 * linux-x86-low.c: Likewise.
3751
bfacd19d
DB
37522015-05-28 Don Breazeal <donb@codesourcery.com>
3753
3754 * linux-low.c (handle_extended_wait): Initialize
3755 thread_info.last_resume_kind for new fork children.
3756
452003ef
PA
37572015-05-15 Pedro Alves <palves@redhat.com>
3758
3759 * target.h (target_handle_new_gdb_connection): Rewrite using if
3760 wrapped in do/while.
3761
1041a03c
JB
37622015-05-14 Joel Brobecker <brobecker@adacore.com>
3763
3764 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3765 * configure, config.in: Regenerate.
3766 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3767 Declare typedef.
3768
c269dbdb
DB
37692015-05-12 Don Breazeal <donb@codesourcery.com>
3770
3771 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3772 PTRACE_EVENT_VFORK_DONE.
3773 (linux_low_ptrace_options, extended_event_reported): Add vfork
3774 events.
3775 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3776 and "vforkdone" for RSP 'T' Stop Reply Packet.
3777 * server.h (report_vfork_events): Declare
3778 global variable.
3779
3a8a0396
DB
37802015-05-12 Don Breazeal <donb@codesourcery.com>
3781
3782 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3783 (the_low_target) <new_fork>: Initialize new member.
3784 * linux-arm-low.c (arm_new_fork): New function.
3785 (the_low_target) <new_fork>: Initialize new member.
3786 * linux-low.c (handle_extended_wait): Call new target function
3787 new_fork.
3788 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3789 * linux-mips-low.c (mips_add_watchpoint): New function
3790 extracted from mips_insert_point.
3791 (the_low_target) <new_fork>: Initialize new member.
3792 (mips_linux_new_fork): New function.
3793 (mips_insert_point): Call mips_add_watchpoint.
3794 * linux-x86-low.c (x86_linux_new_fork): New function.
3795 (the_low_target) <new_fork>: Initialize new member.
3796
de0d863e
DB
37972015-05-12 Don Breazeal <donb@codesourcery.com>
3798
3799 * linux-low.c (handle_extended_wait): Implement return value,
3800 rename argument 'event_child' to 'event_lwp', handle
3801 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3802 (linux_low_ptrace_options): New function.
3803 (linux_low_filter_event): Call linux_low_ptrace_options,
3804 use different argument fo linux_enable_event_reporting,
3805 use return value from handle_extended_wait.
3806 (extended_event_reported): New function.
3807 (linux_wait_1): Call extended_event_reported and set
3808 status to report fork events.
3809 (linux_write_memory): Add pid to debug message.
3810 (reset_lwp_ptrace_options_callback): New function.
3811 (linux_handle_new_gdb_connection): New function.
3812 (linux_target_ops): Initialize new structure member.
3813 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3814 * lynx-low.c: Initialize new structure member.
3815 * remote-utils.c (prepare_resume_reply): Implement stop reason
3816 "fork" for "T" stop message.
3817 * server.c (handle_query): Call handle_new_gdb_connection.
3818 * server.h (report_fork_events): Declare global flag.
3819 * target.h (struct target_ops) <handle_new_gdb_connection>:
3820 New member.
3821 (target_handle_new_gdb_connection): New macro.
3822 * win32-low.c: Initialize new structure member.
3823
ddcbc397
DB
38242015-05-12 Don Breazeal <donb@codesourcery.com>
3825
3826 * mem-break.c (APPEND_TO_LIST): Define macro.
3827 (clone_agent_expr): New function.
3828 (clone_one_breakpoint): New function.
3829 (clone_all_breakpoints): New function.
3830 * mem-break.h: Declare new functions.
3831
89245bc0
DB
38322015-05-12 Don Breazeal <donb@codesourcery.com>
3833
3834 * linux-low.c (linux_supports_fork_events): New function.
3835 (linux_supports_vfork_events): New function.
3836 (linux_target_ops): Initialize new structure members.
3837 (initialize_low): Call linux_check_ptrace_features.
3838 * lynx-low.c (lynx_target_ops): Initialize new structure
3839 members.
3840 * server.c (report_fork_events, report_vfork_events):
3841 New global flags.
3842 (handle_query): Add new features to qSupported packet and
3843 response.
3844 (captured_main): Initialize new global variables.
3845 * target.h (struct target_ops) <supports_fork_events>:
3846 New member.
3847 <supports_vfork_events>: New member.
3848 (target_supports_fork_events): New macro.
3849 (target_supports_vfork_events): New macro.
3850 * win32-low.c (win32_target_ops): Initialize new structure
3851 members.
3852
835205d0
GB
38532015-05-12 Gary Benson <gbenson@redhat.com>
3854
3855 * server.c (handle_qxfer_exec_file): Use current process
3856 if annex is empty.
3857
21e94bd9
SL
38582015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3859
3860 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3861 Remove HAVE_PTRACE_GETREGS conditionals.
3862 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3863 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3864
45614f15
YQ
38652015-05-08 Yao Qi <yao.qi@linaro.org>
3866
3867 * linux-low.c (linux_supports_conditional_breakpoints): New
3868 function.
3869 (linux_target_ops): Install new target method.
3870 * lynx-low.c (lynx_target_ops): Install NULL hook for
3871 supports_conditional_breakpoints.
3872 * nto-low.c (nto_target_ops): Likewise.
3873 * spu-low.c (spu_target_ops): Likewise.
3874 * win32-low.c (win32_target_ops): Likewise.
3875 * server.c (handle_query): Check
3876 target_supports_conditional_breakpoints.
3877 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3878 New field.
3879 (target_supports_conditional_breakpoints): New macro.
3880
80ad801e
PA
38812015-05-06 Pedro Alves <palves@redhat.com>
3882
3883 PR server/18081
3884 * server.c (start_inferior): If the process exits, mourn it.
3885
819843c7
GB
38862015-04-21 Gary Benson <gbenson@redhat.com>
3887
3888 * hostio.c (fileio_open_flags_to_host): Factored out to
3889 fileio_to_host_openflags in common/fileio.c. Single use
3890 updated.
3891
a2d5a9d7
MF
38922015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3893
3894 * linux-xtensa-low.c (xtensa_fill_gregset)
3895 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3896 XCHAL_HAVE_LOOP.
3897
deb44829
MF
38982015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3899
3900 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3901 (regs_info): Replace usrregs pointer with NULL.
3902
e57f1de3
GB
39032015-04-17 Gary Benson <gbenson@redhat.com>
3904
3905 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3906 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3907 * server.c (handle_qxfer_exec_file): New function.
3908 (qxfer_packets): Add exec-file entry.
3909 (handle_query): Report qXfer:exec-file:read as supported packet.
3910
62828379
RN
39112015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3912
3913 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3914
b88bb450
GB
39152015-04-09 Gary Benson <gbenson@redhat.com>
3916
3917 * hostio-errno.c (errno_to_fileio_error): Remove function.
3918 Update caller to use remote_fileio_to_fio_error.
3919
c8f4bfdd
YQ
39202015-04-09 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-low.c (linux_insert_point): Call
3923 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3924 (linux_remove_point): Call remove_memory_breakpoint if type is
3925 raw_bkpt_type_sw.
3926 * linux-x86-low.c (x86_insert_point): Don't call
3927 insert_memory_breakpoint.
3928 (x86_remove_point): Don't call remove_memory_breakpoint.
3929
41f98f02
PA
39302015-04-01 Pedro Alves <palves@redhat.com>
3931 Cleber Rosa <crosa@redhat.com>
3932
3933 * server.c (gdbserver_usage): Reorganize and extend the usage
3934 message.
3935
2bf6fb9d
PA
39362015-03-24 Pedro Alves <palves@redhat.com>
3937
3938 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3939 output. Also dump TRAP_TRACE.
3940 (linux_low_filter_event): In debug output, distinguish a
3941 resume_stop SIGSTOP from a delayed SIGSTOP.
3942
369f6daa
GB
39432015-03-24 Gary Benson <gbenson@redhat.com>
3944
3945 * linux-x86-low.c (x86_linux_new_thread): Moved to
3946 nat/x86-linux.c.
3947 (x86_linux_prepare_to_resume): Likewise.
3948
8e5d4070
GB
39492015-03-24 Gary Benson <gbenson@redhat.com>
3950
3951 * Makefile.in (x86-linux-dregs.o): New rule.
3952 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3953 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3954 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3955 (x86_linux_dr_get): Likewise.
3956 (x86_linux_dr_set): Likewise.
3957 (update_debug_registers_callback): Likewise.
3958 (x86_linux_dr_set_addr): Likewise.
3959 (x86_linux_dr_get_addr): Likewise.
3960 (x86_linux_dr_set_control): Likewise.
3961 (x86_linux_dr_get_control): Likewise.
3962 (x86_linux_dr_get_status): Likewise.
3963 (x86_linux_update_debug_registers): Likewise.
3964
2b95d440
GB
39652015-03-24 Gary Benson <gbenson@redhat.com>
3966
3967 * linux-x86-low.c (x86_linux_update_debug_registers):
3968 New function, factored out from...
3969 (x86_linux_prepare_to_resume): ...this.
3970
14b0bc68
GB
39712015-03-24 Gary Benson <gbenson@redhat.com>
3972
3973 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3974 (x86_linux_dr_set): Likewise.
3975 (update_debug_registers_callback): Likewise.
3976 (x86_linux_dr_set_addr): Likewise.
3977 (x86_linux_dr_get_addr): Likewise.
3978 (x86_linux_dr_set_control): Likewise.
3979 (x86_linux_dr_get_control): Likewise.
3980 (x86_linux_dr_get_status): Likewise.
3981 (x86_linux_prepare_to_resume): Likewise.
3982
5dfe6ca8
GB
39832015-03-24 Gary Benson <gbenson@redhat.com>
3984
3985 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3986 Use perror_with_name. Pass string through gettext.
3987 (x86_linux_dr_set): Likewise.
3988
d33472ad
GB
39892015-03-24 Gary Benson <gbenson@redhat.com>
3990
3991 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3992 (x86_linux_dr_set_addr): ...this.
3993 (x86_dr_low_get_addr): Rename to...
3994 (x86_linux_dr_get_addr): ...this.
3995 (x86_dr_low_set_control): Rename to...
3996 (x86_linux_dr_set_control): ...this.
3997 (x86_dr_low_get_control): Rename to...
3998 (x86_linux_dr_get_control): ...this.
3999 (x86_dr_low_get_status): Rename to...
4000 (x86_linux_dr_get_status): ...this.
4001 (x86_dr_low): Update with new function names.
4002
4b134ca1
GB
40032015-03-24 Gary Benson <gbenson@redhat.com>
4004
4005 * Makefile.in (x86-linux.o): New rule.
4006 * configure.srv: Add x86-linux.o to relevant targets.
4007 * linux-low.c (lwp_set_arch_private_info): New function.
4008 (lwp_arch_private_info): Likewise.
4009 * linux-x86-low.c: Include nat/x86-linux.h.
4010 (arch_lwp_info): Removed structure.
4011 (update_debug_registers_callback):
4012 Use lwp_set_debug_registers_changed.
4013 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4014 and lwp_set_debug_registers_changed.
4015 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4016
34c703da
GB
40172015-03-24 Gary Benson <gbenson@redhat.com>
4018
4019 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4020 * linux-arm-low.c (arm_new_thread): Likewise.
4021 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4022 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4023 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4024 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4025
cff068da
GB
40262015-03-24 Gary Benson <gbenson@redhat.com>
4027
4028 * linux-low.c (ptid_of_lwp): New function.
4029 (lwp_is_stopped): Likewise.
4030 (lwp_stop_reason): Likewise.
4031 * linux-x86-low.c (update_debug_registers_callback):
4032 Use lwp_is_stopped.
4033 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4034 lwp_stop_reason.
4035
b2f7c7e8
GB
40362015-03-24 Gary Benson <gbenson@redhat.com>
4037
4038 * linux-low.h (linux_stop_lwp): Remove declaration.
4039
6d4ee8c6
GB
40402015-03-24 Gary Benson <gbenson@redhat.com>
4041
4042 * linux-low.h: Include nat/linux-nat.h.
4043 * linux-low.c (iterate_over_lwps_args): New structure.
4044 (iterate_over_lwps_filter): New function.
4045 (iterate_over_lwps): Likewise.
4046 * linux-x86-low.c (update_debug_registers_callback):
4047 Update signature to what iterate_over_lwps expects.
4048 Remove PID check that iterate_over_lwps now performs.
4049 (x86_dr_low_set_addr): Use iterate_over_lwps.
4050 (x86_dr_low_set_control): Likewise.
4051
70a0bb6b
GB
40522015-03-24 Gary Benson <gbenson@redhat.com>
4053
4054 * linux-x86-low.c (x86_debug_reg_state): New function.
4055 (x86_linux_prepare_to_resume): Use the above.
4056
7b669087
GB
40572015-03-24 Gary Benson <gbenson@redhat.com>
4058
4059 * linux-low.c (current_lwp_ptid): New function.
4060 * linux-x86-low.c: Include nat/linux-nat.h.
4061 (x86_dr_low_get_addr): Use current_lwp_ptid.
4062 (x86_dr_low_get_control): Likewise.
4063 (x86_dr_low_get_status): Likewise.
4064
eef49a3d
PA
40652015-03-20 Pedro Alves <palves@redhat.com>
4066
4067 * tracepoint.c (cmd_qtstatus): Make "str" const.
4068
b2333d22
PA
40692015-03-20 Pedro Alves <palves@redhat.com>
4070
4071 * server.c (handle_general_set): Make "req_str" const.
4072
23f238d3
PA
40732015-03-19 Pedro Alves <palves@redhat.com>
4074
4075 * linux-low.c (linux_resume_one_lwp): Rename to ...
4076 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4077 instead call perror_with_name.
4078 (check_ptrace_stopped_lwp_gone): New function.
4079 (linux_resume_one_lwp): Reimplement as wrapper around
4080 linux_resume_one_lwp_throw that swallows errors if the LWP is
4081 gone.
4082
91baf43f
PA
40832015-03-19 Pedro Alves <palves@redhat.com>
4084
4085 * linux-low.c (count_events_callback, select_event_lwp_callback):
4086 No longer check whether the thread has resume_stop as last resume
4087 kind.
4088
8bf3b159
PA
40892015-03-19 Pedro Alves <palves@redhat.com>
4090
4091 * linux-low.c (count_events_callback, select_event_lwp_callback):
4092 Use the lwp's status_pending_p field, not the thread's.
4093
b90fc188
PA
40942015-03-19 Pedro Alves <palves@redhat.com>
4095
4096 * linux-low.c (select_event_lwp_callback): Update comments to
4097 no longer mention SIGTRAP.
4098
464b0089
GB
40992015-03-18 Gary Benson <gbenson@redhat.com>
4100
4101 * server.c (handle_query): Do not report vFile:fstat as supported.
4102
aa9e327f
GB
41032015-03-11 Gary Benson <gbenson@redhat.com>
4104
4105 * hostio.c (sys/types.h): New include.
4106 (sys/stat.h): Likewise.
4107 (common-remote-fileio.h): Likewise.
4108 (handle_fstat): New function.
4109 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4110
791c0056
GB
41112015-03-11 Gary Benson <gbenson@redhat.com>
4112
4113 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4114 struct stat.st_blocks and struct stat.st_blksize.
4115 * configure: Regenerate.
4116 * config.in: Likewise.
4117 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4118 (OBS): Add common-remote-fileio.o.
4119 (common-remote-fileio.o): New rule.
4120
9a9df970
PA
41212015-03-09 Pedro Alves <palves@redhat.com>
4122
4123 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4124 'struct sockaddr' pointer in 'accept' call.
4125
9eb1356e
PA
41262015-03-09 Pedro Alves <palves@redhat.com>
4127
4128 Revert:
4129 2015-03-07 Pedro Alves <palves@redhat.com>
4130 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4131 or <winsock2.h> here. Instead include "gdb_socket.h".
4132 (remote_open): Use union gdb_sockaddr_u.
4133 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4134 or <winsock2.h> here. Instead include "gdb_socket.h".
4135 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4136 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4137 or <sys/un.h>.
4138 (init_named_socket, gdb_agent_helper_thread): Use union
4139 gdb_sockaddr_u.
4140
aac331e4
PA
41412015-03-07 Pedro Alves <palves@redhat.com>
4142
4143 * configure.ac (build_warnings): Move
4144 -Wdeclaration-after-statement to the C-specific set.
4145 * configure: Regenerate.
4146
366c75fc
PA
41472015-03-07 Pedro Alves <palves@redhat.com>
4148
4149 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4150 or <winsock2.h> here. Instead include "gdb_socket.h".
4151 (remote_open): Use union gdb_sockaddr_u.
4152 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4153 or <winsock2.h> here. Instead include "gdb_socket.h".
4154 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4155 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4156 or <sys/un.h>.
4157 (init_named_socket, gdb_agent_helper_thread): Use union
4158 gdb_sockaddr_u.
4159
492d29ea
PA
41602015-03-07 Pedro Alves <palves@redhat.com>
4161
4162 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4163 instead.
4164
60a191ed
YQ
41652015-03-06 Yao Qi <yao.qi@linaro.org>
4166
4167 * linux-aarch64-low.c (aarch64_insert_point): Use
4168 show_debug_regs as a boolean.
4169 (aarch64_remove_point): Likewise.
4170
f5771b1d
PA
41712015-03-05 Pedro Alves <palves@redhat.com>
4172
4173 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4174 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4175 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4176 * nto-low.c (nto_target_ops): Likewise.
4177 * spu-low.c (spu_target_ops): Likewise.
4178 * win32-low.c (win32_target_ops): Likewise.
4179
3e572f71
PA
41802015-03-04 Pedro Alves <palves@redhat.com>
4181
72f4393d 4182 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4183 Decide whether a breakpoint triggered based on the SIGTRAP's
4184 siginfo.si_code.
72f4393d
L
4185 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4186 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4187 (linux_low_filter_event): Check for breakpoints before checking
4188 watchpoints.
4189 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4190 siginfo.si_code.
72f4393d
L
4191 (linux_stopped_by_sw_breakpoint)
4192 (linux_supports_stopped_by_sw_breakpoint)
4193 (linux_stopped_by_hw_breakpoint)
4194 (linux_supports_stopped_by_hw_breakpoint): New functions.
4195 (linux_target_ops): Install new target methods.
3e572f71 4196
1ec68e26
PA
41972015-03-04 Pedro Alves <palves@redhat.com>
4198
4199 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4200 * server.c (swbreak_feature, hwbreak_feature): New globals.
4201 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4202 (captured_main): Clear swbreak_feature and hwbreak_feature.
4203 * server.h (swbreak_feature, hwbreak_feature): Declare.
4204 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4205 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4206 supports_stopped_by_hw_breakpoint>: New fields.
4207 (target_supports_stopped_by_sw_breakpoint)
4208 (target_stopped_by_sw_breakpoint)
4209 (target_supports_stopped_by_hw_breakpoint)
4210 (target_stopped_by_hw_breakpoint): Declare.
4211
15c66dd6
PA
42122015-03-04 Pedro Alves <palves@redhat.com>
4213
4214 enum lwp_stop_reason -> enum target_stop_reason
4215 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4216 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4217 (linux_wait_1, stuck_in_jump_pad_callback)
4218 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4219 (linux_stopped_by_watchpoint):
4220 * linux-low.h (enum lwp_stop_reason): Delete.
4221 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4222 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4223
98fc70d6
YQ
42242015-03-04 Yao Qi <yao.qi@linaro.org>
4225
4226 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4227
dd2ac174
GB
42282015-03-03 Gary Benson <gbenson@redhat.com>
4229
4230 * hostio.c (handle_vFile): Fix prefix lengths.
4231
d68e53f4
MM
42322015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4233
4234 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4235 ptr_bits.
4236
bf2d68ab
AA
42372015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4238
4239 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4240 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4241 (clean): Add "rm -f" for above C files.
4242 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4243 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4244 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4245 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4246 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4247 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4248 (init_registers_s390x_vx_linux64)
4249 (init_registers_s390x_tevx_linux64)
4250 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4251 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4252 declarations.
4253 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4254 (s390_store_vxrs_high): New functions.
4255 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4256 NT_S390_VXRS_HIGH.
4257 (s390_arch_setup): Add logic for selecting one of the new target
4258 descriptions. Activate the new vector regsets if applicable.
4259 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4260 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4261 and init_registers_s390x_tevx_linux64.
4262
c966a859
PA
42632015-03-01 Pedro Alves <palves@redhat.com>
4264
4265 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4266 parameter.
4267
4180215b
PA
42682015-02-27 Pedro Alves <palves@redhat.com>
4269
4270 * linux-x86-low.c (u_debugreg_offset): New function.
4271 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4272
749bab01
PA
42732015-02-27 Pedro Alves <palves@redhat.com>
4274
4275 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4276 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4277 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4278 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4279 (ps_lsetfpregs, ps_getpid)
4280 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4281 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4282 (ps_lsetxregs, ps_plog): Declare.
4283
3c14e5a3
PA
42842015-02-27 Pedro Alves <palves@redhat.com>
4285
4286 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4287 IP_AGENT_EXPORT_FUNC.
4288 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4289 IP_AGENT_EXPORT_FUNC.
4290 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4291 (IP_AGENT_EXPORT): Delete.
4292 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4293 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4294 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4295 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4296 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4297 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4298 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4299 (traceframe_read_count, traceframe_write_count)
4300 (traceframes_created, trace_state_variables, get_raw_reg)
4301 (get_trace_state_variable_value, set_trace_state_variable_value)
4302 (ust_loaded, helper_thread_id, cmd_buf): Use
4303 IPA_SYM_EXPORTED_NAME.
4304 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4305 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4306 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4307 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4308 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4309 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4310 EXTERN_C_PUSH/EXTERN_C_POP.
4311 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4312 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4313 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4314 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4315 (traceframe_write_count, traceframe_read_count)
4316 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4317 (about_to_request_buffer_space, get_trace_state_variable_value)
4318 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4319 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4320 EXTERN_C_PUSH/EXTERN_C_POP.
4321 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4322 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4323 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4324 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
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): Use IP_AGENT_EXPORT_VAR.
4328 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4329 Define.
4330 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4331 (IP_AGENT_EXPORT_VAR_DECL): Define.
4332 (tracing): Declare.
4333 (gdb_agent_get_raw_reg): Declare.
4334
fe978cb0
PA
43352015-02-27 Tom Tromey <tromey@redhat.com>
4336 Pedro Alves <palves@redhat.com>
4337
4338 Rename symbols whose names are reserved C++ keywords throughout.
4339
3bc3d82a
PA
43402015-02-27 Pedro Alves <palves@redhat.com>
4341
4342 * Makefile.in (COMPILER): New, get it from autoconf.
4343 (CXX): Get from autoconf instead.
4344 (COMPILE.pre): Use COMPILER.
4345 (CC-LD): Rename to ...
4346 (CC_LD): ... this. Use COMPILER.
4347 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4348 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4349 * acinclude.m4: Include build-with-cxx.m4.
4350 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4351 Disable -Werror by default if building in C++ mode.
4352 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4353 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4354 the C++ compiler. Save/restore CXXFLAGS too.
4355 * configure: Regenerate.
4356
07697489
PA
43572015-02-27 Pedro Alves <palves@redhat.com>
4358
4359 * acinclude.m4: Include libiberty.m4.
4360 * configure.ac: Call libiberty_INIT.
4361 * config.in, configure: Regenerate.
4362
9beb7c4e
PA
43632015-02-26 Pedro Alves <palves@redhat.com>
4364
4365 * linux-low.c (linux_wait_1): When incrementing the PC past a
4366 program breakpoint always use the_low_target.breakpoint_len as
4367 increment, rather than the maximum between that and
4368 the_low_target.decr_pc_after_break.
4369
8090aef2
PA
43702015-02-23 Pedro Alves <palves@redhat.com>
4371
4372 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4373 thread was doing a step-over; always adjust the PC if
4374 we stepped over a permanent breakpoint.
4375 (linux_wait_1): If we stepped over breakpoint that was on top of a
4376 permanent breakpoint, manually advance the PC past it.
4377
bc9540e8
PA
43782015-02-23 Pedro Alves <palves@redhat.com>
4379
4380 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4381 modes.
4382 (x86_fill_gregset, x86_store_gregset): Use it when handling
4383 $orig_eax.
4384
2db9a427
PA
43852015-02-20 Pedro Alves <palves@redhat.com>
4386
4387 * thread-db.c: Include "nat/linux-procfs.h".
4388 (thread_db_init): Skip listing new threads if the kernel supports
4389 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4390
afa8d396
PA
43912015-02-20 Pedro Alves <palves@redhat.com>
4392
4393 * linux-low.c (status_pending_p_callback): Use ptid_match.
4394
c9587f88
AT
43952015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4396
4397 PR breakpoints/16812
4398 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4399 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4400 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4401
b05ec7a5
AT
44022015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4403
4404 PR breakpoints/15956
4405 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4406
d33501a5
MM
44072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4408
4409 * linux-low.c (linux_low_btrace_conf): Print size.
4410 * server.c (handle_btrace_conf_general_set): New.
4411 (hanle_general_set): Call handle_btrace_conf_general_set.
4412 (handle_query): Report Qbtrace-conf:bts:size as supported.
4413
f4abbc16
MM
44142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4415
4416 * linux-low.c (linux_low_enable_btrace): Update parameters.
4417 (linux_low_btrace_conf): New.
4418 (linux_target_ops)<to_btrace_conf>: Initialize.
4419 * server.c (current_btrace_conf): New.
4420 (handle_btrace_enable): Rename to ...
4421 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4422 to target_enable_btrace. Update comment. Update users.
4423 (handle_qxfer_btrace_conf): New.
4424 (qxfer_packets): Add btrace-conf entry.
4425 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4426 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4427 (target_ops)<read_btrace_conf>: New.
4428 (target_enable_btrace): Update parameters.
4429 (target_read_btrace_conf): New.
4430
043c3577
MM
44312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4432
4433 * server.c (handle_btrace_general_set): Remove call to
4434 target_supports_btrace.
4435 (supported_btrace_packets): New.
4436 (handle_query): Call supported_btrace_packets.
4437 * target.h: include btrace-common.h.
4438 (btrace_target_info): Removed.
4439 (supports_btrace, target_supports_btrace): Update parameters.
4440
734b0e4b
MM
44412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4442
4443 * Makefile.in (SFILES): Add common/btrace-common.c.
4444 (OBS): Add common/btrace-common.o.
4445 (btrace-common.o): Add build rules.
4446 * linux-low: Include btrace-common.h.
4447 (linux_low_read_btrace): Use struct btrace_data. Call
4448 btrace_data_init and btrace_data_fini.
4449
d6c146e9
PA
44502015-02-06 Pedro Alves <palves@redhat.com>
4451
4452 * thread-db.c (find_new_threads_callback): Add debug output.
4453
20ba1ce6
PA
44542015-02-04 Pedro Alves <palves@redhat.com>
4455
4456 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4457 (resume_stopped_resumed_lwps): New function.
4458 (linux_wait_for_event_filtered): Use it.
4459
8cc73a39
SDJ
44602015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4461
4462 * Makefile.in (SFILES): Add linux-personality.c.
4463 (linux-personality.o): New rule.
4464 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4465 list of objects to be built.
4466 * linux-low.c: Include nat/linux-personality.h.
4467 (linux_create_inferior): Remove code to disable address space
4468 randomization (moved to ../nat/linux-personality.c). Create
4469 cleanup to disable address space randomization.
4470
fb23d554
SDJ
44712015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4472
4473 * Makefile.in (posix-strerror.o): New rule.
4474 (mingw-strerror.o): Likewise.
4475 * configure: Regenerated.
4476 * configure.ac: Source file ../common/common.host. Initialize new
4477 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4478
cdf43629
YQ
44792015-01-14 Yao Qi <yao@codesourcery.com>
4480
4481 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4482 (ppc-linux.o): New rule.
4483 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4484 * configure.ac: AC_CHECK_FUNCS(getauxval).
4485 * config.in: Re-generated.
4486 * configure: Re-generated.
4487 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4488 ppc64_64bit_inferior_p
4489
514c5338
YQ
44902015-01-14 Yao Qi <yao@codesourcery.com>
4491
4492 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4493 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4494 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4495 (PT_ORIG_R3, PT_TRAP): Likewise.
4496 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4497 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4498 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4499
3368c1e5
JB
45002015-01-10 Joel Brobecker <brobecker@adacore.com>
4501
4502 * i387-fp.c (i387_cache_to_xsave): In look over
4503 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4504 zmmh_low_space field by use of zmmh_high_space.
4505
582511be
PA
45062015-01-09 Pedro Alves <palves@redhat.com>
4507
4508 * linux-low.c (step_over_bkpt): Move higher up in the file.
4509 (handle_extended_wait): Don't store the stop_pc here.
4510 (get_stop_pc): Adjust comments and rename to ...
4511 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4512 stopped for a software breakpoint or hardware breakpoint.
4513 (thread_still_has_status_pending_p): New function.
4514 (status_pending_p_callback): Use
4515 thread_still_has_status_pending_p. If the event is no longer
4516 interesting, resume the LWP.
4517 (handle_tracepoints): Add assert.
4518 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4519 (wstatus_maybe_breakpoint): New function.
4520 (cancel_breakpoint): Delete function.
4521 (check_stopped_by_watchpoint): New function, factored out from
4522 linux_low_filter_event.
4523 (lp_status_maybe_breakpoint): Delete function.
4524 (linux_low_filter_event): Remove filter_ptid argument.
4525 Leave thread group exits pending here. Store the LWP's stop PC.
4526 Always leave events pending.
4527 (linux_wait_for_event_filtered): Pull all events out of the
4528 kernel, and leave them all pending.
4529 (count_events_callback, select_event_lwp_callback): Consider all
4530 events.
4531 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4532 (select_event_lwp): Only give preference to the stepping LWP in
4533 all-stop mode. Adjust comments.
4534 (ignore_event): New function.
4535 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4536 references to cancel_breakpoints. Adjust to renames. Also give
4537 equal priority to all LWPs that have had events in non-stop mode.
4538 If reporting a software breakpoint event, unadjust the LWP's PC.
4539 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4540 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4541 Adjust.
4542 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4543 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4544 (linux_stopped_by_watchpoint): Adjust.
4545 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4546 * linux-low.h (enum lwp_stop_reason): New.
4547 (struct lwp_info) <stop_pc>: Adjust comment.
4548 <stopped_by_watchpoint>: Delete field.
4549 <stop_reason>: New field.
4550 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4551 * mem-break.c (software_breakpoint_inserted_here)
4552 (hardware_breakpoint_inserted_here): New function.
4553 * mem-break.h (software_breakpoint_inserted_here)
4554 (hardware_breakpoint_inserted_here): Declare.
4555 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4556 (cancel_breakpoints): Delete.
4557 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4558 (upload_fast_traceframes): Remove references to
4559 cancel_breakpoints.
4560
a33e3959
PA
45612015-01-09 Pedro Alves <palves@redhat.com>
4562
4563 * thread-db.c (find_new_threads_callback): Ignore thread if the
4564 kernel thread ID is -1.
4565
8784d563
PA
45662015-01-09 Pedro Alves <palves@redhat.com>
4567
4568 * linux-low.c (linux_attach_fail_reason_string): Move to
4569 nat/linux-ptrace.c, and rename.
4570 (linux_attach_lwp): Update comment.
4571 (attach_proc_task_lwp_callback): New function.
4572 (linux_attach): Adjust to rename and use
4573 linux_proc_attach_tgid_threads.
4574 (linux_attach_fail_reason_string): Delete declaration.
4575
76f2b779
JB
45762015-01-01 Joel Brobecker <brobecker@adacore.com>
4577
4578 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4579 * server.c (gdbserver_version): Likewise.
4580
fafcc06a
SDJ
45812014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4582
4583 * remote-utils.c: Include ctype.h.
4584 (input_interrupt): Explicitly handle the case when the char
4585 received is the NUL byte. Improve the printing of non-ASCII
4586 characters.
4587
beed38b8
JB
45882014-12-16 Joel Brobecker <brobecker@adacore.com>
4589
4590 * linux-low.c (linux_low_filter_event): Update call to
4591 linux_enable_event_reporting following the addition of
4592 a new parameter to that function.
4593
bf330350
CU
45942014-12-16 Catalin Udma <catalin.udma@freescale.com>
4595
4596 PR server/17457
4597 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4598 (AARCH64_FPCR_REGNO): Likewise.
4599 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4600 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4601 (aarch64_store_fpregset): Likewise.
4602
5227d625
JB
46032014-12-15 Joel Brobecker <brobecker@adacore.com>
4604
4605 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4606 Remove FIXME comment about assumption about N.
4607
f93b65a0
JB
46082014-12-13 Joel Brobecker <brobecker@adacore.com>
4609
4610 * configure.ac: If large-file support is disabled in GDBserver,
4611 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4612 * configure: Regenerate.
4613
e5a9158d
AA
46142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4615
4616 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4617 warning upon ENODATA from ptrace.
4618 * linux-s390-low.c (s390_store_tdb): New.
4619 (s390_regsets): Add regset for NT_S390_TDB.
4620
feea5f36
AA
46212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4622
4623 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4624 without a fill_function.
4625 * linux-s390-low.c (s390_fill_last_break): Remove.
4626 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4627 (s390_arch_setup): Use regset's size instead of fill_function for
4628 loop end condition.
4629
098dbe61
AA
46302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4631
4632 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4633 the regset's store function when ptrace returned an error.
4634 * regcache.c (get_thread_regcache): Invalidate register cache
4635 before fetching inferior's registers.
4636
28eef672
AA
46372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4638
4639 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4640 while-loop as for-loop.
4641 (regsets_store_inferior_registers): Likewise.
4642
bdca27a2
YQ
46432014-11-28 Yao Qi <yao@codesourcery.com>
4644
4645 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4646 * config.in, configure: Re-generate.
4647 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4648 is defined.
4649
9c232dda
YQ
46502014-11-21 Yao Qi <yao@codesourcery.com>
4651
4652 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4653 (AC_CHECK_HEADERS): Remove malloc.h.
4654 * configure: Re-generated.
4655 * config.in: Re-generated.
4656 * server.h: Don't include alloca.h and malloc.h.
4657 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4658 Don't include malloc.h.
4659
43968415
JB
46602014-11-17 Joel Brobecker <brobecker@adacore.com>
4661
4662 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4663 corresponding ERRNO check in same block.
4664
40e91bc7
PA
46652014-11-12 Pedro Alves <palves@redhat.com>
4666
4667 * server.c (cont_thread): Update comment.
4668 (start_inferior, attach_inferior): No longer clear cont_thread.
4669 (handle_v_cont): No longer set cont_thread.
4670 (captured_main): Clear cont_thread each time a GDB connects.
4671
c2c118cf
PA
46722014-11-12 Pedro Alves <palves@redhat.com>
4673
4674 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4675 thread, and don't resume all threads if the Hc thread has exited.
4676
78708b7c
PA
46772014-11-12 Pedro Alves <palves@redhat.com>
4678
4679 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4680 the process group instead of to a specific LWP.
4681
a2abc7de
PA
46822014-10-15 Pedro Alves <palves@redhat.com>
4683
4684 PR server/17487
4685 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4686 parameter.
4687 (arm_set_thread_context): Delete.
4688 (the_low_target): Adjust.
4689 * win32-i386-low.c (debug_registers_changed)
4690 (debug_registers_used): Delete.
4691 (update_debug_registers_callback): New function.
4692 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4693 needing to update their debug registers.
4694 (win32_get_current_dr): New function.
4695 (x86_dr_low_get_addr, x86_dr_low_get_control)
4696 (x86_dr_low_get_status): Fetch the debug register from the thread
4697 record's context.
4698 (i386_initial_stuff): Adjust.
4699 (i386_get_thread_context): Remove current_event parameter. Don't
4700 clear debug_registers_changed nor copy DR values to
4701 debug_reg_state.
4702 (i386_set_thread_context): Delete.
4703 (i386_prepare_to_resume): New function.
4704 (i386_thread_added): Mark the thread as needing to update irs
4705 debug registers.
4706 (the_low_target): Remove i386_set_thread_context and install
4707 i386_prepare_to_resume.
4708 * win32-low.c (win32_get_thread_context): Adjust.
4709 (win32_set_thread_context): Use SetThreadContext
4710 directly.
4711 (win32_prepare_to_resume): New function.
4712 (win32_require_context): New function, factored out from ...
4713 (thread_rec): ... this.
4714 (continue_one_thread): Call win32_prepare_to_resume on each thread
4715 we're about to continue.
4716 (win32_resume): Call win32_prepare_to_resume on the event thread.
4717 * win32-low.h (struct win32_thread_info)
4718 <debug_registers_changed>: New field.
4719 (struct win32_target_ops): Change prototype of set_thread_context,
4720 delete set_thread_context and add prepare_to_resume.
4721 (win32_require_context): New declaration.
4722
a442d071
GB
47232014-10-08 Gary Benson <gbenson@redhat.com>
4724
4725 * server.h: Do not include common-exceptions.h.
4726
6f1947e8
GB
47272014-10-08 Gary Benson <gbenson@redhat.com>
4728
4729 * server.h: Do not include cleanups.h.
4730
63b434a4
JH
47312014-09-30 James Hogan <james.hogan@imgtec.com>
4732
4733 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4734 mips64-dsp-linux.c.
4735
c4d9ceb6
YQ
47362014-09-23 Yao Qi <yao@codesourcery.com>
4737
4738 * linux-low.c (lp_status_maybe_breakpoint): New function.
4739 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4740 (count_events_callback): Likewise.
4741 (select_event_lwp_callback): Likewise.
4742 (cancel_breakpoints_callback): Likewise.
4743
89a5711c
DB
47442014-09-19 Don Breazeal <donb@codesourcery.com>
4745
4746 * linux-low.c (handle_extended_wait): Call
4747 linux_ptrace_get_extended_event.
4748 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4749 linux_is_extended_waitstatus.
4750
bffc0964
JB
47512014-09-16 Joel Brobecker <brobecker@adacore.com>
4752
4753 * Makefile.in (CPPFLAGS): Define.
4754 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4755 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4756
0bfdf32f
GB
47572014-09-16 Gary Benson <gbenson@redhat.com>
4758
4759 * inferiors.h (current_inferior): Renamed as...
4760 (current_thread): New variable. All uses updated.
4761 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4762 (maybe_move_out_of_jump_pad): Likewise.
4763 (cancel_breakpoint): Likewise.
4764 (linux_low_filter_event): Likewise.
4765 (wait_for_sigstop): Likewise.
4766 (linux_resume_one_lwp): Likewise.
4767 (need_step_over_p): Likewise.
4768 (start_step_over): Likewise.
4769 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4770 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4771 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4772 and save_inferior as saved_thread.
4773 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4774 saved_thread.
4775 (regcache_invalidate_thread): Likewise.
4776 * remote-utils.c (prepare_resume_reply): Likewise.
4777 * thread-db.c (thread_db_get_tls_address): Likewise.
4778 (disable_thread_event_reporting): Likewise.
4779 (remove_thread_event_breakpoints): Likewise.
4780 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4781 as saved_thread.
4782 * target.h (set_desired_inferior): Renamed as...
4783 (set_desired_thread): New declaration. All uses updated.
4784 * server.c (myresume): Updated comment to reference thread instead
4785 of inferior.
4786 (handle_serial_event): Likewise.
4787 (handle_target_event): Likewise.
4788
361c8ade
GB
47892014-09-12 Tom Tromey <tromey@redhat.com>
4790 Gary Benson <gbenson@redhat.com>
4791
4792 * regcache.h: Include common-regcache.h.
4793 (regcache_read_pc): Don't declare.
4794 * regcache.c (get_thread_regcache_for_ptid): New function.
4795
bd9269f7
GB
47962014-09-11 Tom Tromey <tromey@redhat.com>
4797 Gary Benson <gbenson@redhat.com>
4798
4799 * symbol.c: New file.
4800 * Makefile.in (SFILES): Add symbol.c.
4801 (OBS): Add symbol.o.
4802
f8c1d06b
GB
48032014-09-11 Gary Benson <gbenson@redhat.com>
4804
4805 * target.c (target_stop_ptid, target_continue_ptid): New
4806 functions.
4807
721ec300
GB
48082014-09-11 Tom Tromey <tromey@redhat.com>
4809 Gary Benson <gbenson@redhat.com>
4810
4811 * target.h: Include target/target.h.
4812 * target.c (target_read_memory, target_read_uint32)
4813 (target_write_memory): New functions.
4814
c5e92cca
GB
48152014-09-11 Gary Benson <gbenson@redhat.com>
4816
4817 * server.h (debug_hw_points): Don't declare.
4818 * server.c (debug_hw_points): Don't define. Replace all uses
4819 with show_debug_regs.
4820 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4821 all uses with show_debug_regs.
4822
2e4bb98a
EBM
48232014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4824
4825 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4826 endianness into account.
4827 (ppc_supply_ptrace_register): Likewise.
4828
ac740bc7
JH
48292014-09-03 James Hogan <james.hogan@imgtec.com>
4830
4831 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4832 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4833
97ea6506
GB
48342014-09-03 Gary Benson <gbenson@redhat.com>
4835
4836 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4837 ALL_DEBUG_ADDRESS_REGISTERS.
4838
df7e5265
GB
48392014-09-02 Gary Benson <gbenson@redhat.com>
4840
4841 * i386-low.h: Renamed as...
4842 * x86-low.h: New file. All type, function and variable name
4843 prefixes changed from "i386_" to "x86_". All references updated.
4844 * i386-low.c: Renamed as...
4845 * x86-low.c: New file. All type, function and variable name
4846 prefixes changed from "i386_" to "x86_". All references updated.
4847
ed859da7
GB
48482014-09-02 Gary Benson <gbenson@redhat.com>
4849
4850 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4851 (x86_linux_new_thread): Likewise.
4852
860789c7
GB
48532014-08-29 Gary Benson <gbenson@redhat.com>
4854
4855 * server.h (setjmp.h): Do not include.
4856 (toplevel): Do not declare.
4857 (common-exceptions.h): Include.
4858 (cleanups.h): Likewise.
4859 * server.c (toplevel): Do not define.
4860 (exit_code): New static global.
4861 (detach_or_kill_for_exit_cleanup): New function.
4862 (main): New function. Original main renamed to...
4863 (captured_main): New function.
4864 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4865
ff55e1b5
GB
48662014-08-29 Gary Benson <gbenson@redhat.com>
4867
4868 * Makefile.in (SFILES): Add common/common-exceptions.c.
4869 (OBS): Add common-exceptions.o.
4870 (common-exceptions.o): New rule.
4871 * utils.c (prepare_to_throw_exception): New function.
4872
e9bcb658
GB
48732014-08-29 Gary Benson <gbenson@redhat.com>
4874
4875 * config.in: Regenerate.
4876 * configure: Likewise.
4877
e3180625
GB
48782014-08-29 Gary Benson <gbenson@redhat.com>
4879
4880 * Makefile.in (SFILES): Add common/cleanups.c.
4881 (OBS): cleanups.o.
4882 (cleanups.o): New rule.
4883
e3d6ba5d
GB
48842014-08-29 Gary Benson <gbenson@redhat.com>
4885
4886 * utils.c (internal_vwarning): New function.
4887
7096e886
GB
48882014-08-28 Gary Benson <gbenson@redhat.com>
4889
4890 * utils.h (fatal): Remove declaration.
4891 * utils.c (fatal): Remove function.
4892
14ce3192
GB
48932014-08-28 Gary Benson <gbenson@redhat.com>
4894
4895 * tracepoint.c (gdb_agent_init): Replace fatal with
4896 perror_with_name.
4897 (initialize_tracepoint): Likewise.
4898
50278d59
GB
48992014-08-28 Gary Benson <gbenson@redhat.com>
4900
4901 * remote-utils.c (remote_prepare): Replace fatal with error.
4902
aa96c426
GB
49032014-08-28 Gary Benson <gbenson@redhat.com>
4904
4905 * linux-low.c (linux_async): Replace fatal with warning.
4906 Tidy up and return.
4907 (linux_start_non_stop): Return -1 if linux_async failed.
4908
f7160e97
GB
49092014-08-28 Gary Benson <gbenson@redhat.com>
4910
4911 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4912 gdb_assert.
4913 (i386_dr_low_get_addr): Remove vague comment.
4914 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4915 gdb_assert.
4916
38e08fca
GB
49172014-08-28 Gary Benson <gbenson@redhat.com>
4918
4919 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4920 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4921 internal_error.
4922 (linux_resume_one_lwp): Likewise.
4923 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4924 gdb_assert.
4925 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4926 with internal_error.
4927 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4928 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4929 (find_register_by_name): Replace fatal with internal_error.
4930 (find_regno): Likewise.
4931 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4932 * thread-db.c (thread_db_create_event): Likewise.
4933 (thread_db_load_search): Likewise.
4934 (try_thread_db_load_1): Likewise.
4935 * tracepoint.c (get_jump_space_head): Replace fatal with
4936 internal_error.
4937 (claim_trampoline_space): Likewise.
4938 (have_fast_tracepoint_trampoline_buffer): Likewise.
4939 (cmd_qtstart): Likewise.
4940 (stop_tracing): Likewise.
4941 (fast_tracepoint_collecting): Likewise.
4942 (target_malloc): Likewise.
4943 (download_tracepoint): Likewise.
4944 (download_trace_state_variables): Replace check with gdb_assert.
4945 (upload_fast_traceframes): Replace fatal with internal_error.
4946
34abf635
GB
49472014-08-19 Tom Tromey <tromey@redhat.com>
4948 Gary Benson <gbenson@redhat.com>
4949
4950 * Makefile.in (SFILES): Add common/common-debug.c.
4951 (OBS): Add common-debug.o.
4952 (common-debug.o): New rule.
4953 * debug.h (debug_printf): Don't declare.
4954 * debug.c (debug_printf): Renamed and rewritten as...
4955 (debug_vprintf): New function.
4956
f6e94d78
GB
49572014-08-19 Gary Benson <gbenson@redhat.com>
4958
4959 * utils.h: Do not include print-utils.h.
4960
9239eeab
GB
49612014-08-19 Tom Tromey <tromey@redhat.com>
4962 Gary Benson <gbenson@redhat.com>
4963
4964 * server.h: Add static assertion.
4965 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4966
ef87c8bb
GB
49672014-08-19 Tom Tromey <tromey@redhat.com>
4968 Gary Benson <gbenson@redhat.com>
4969
4970 * Makefile.in (SFILES): Add common/errors.c.
4971 (OBS): Add errors.o.
4972 (IPA_OBS): Add errors-ipa.o.
4973 (errors.o): New rule.
4974 (errors-ipa.o): Likewise.
4975 * utils.h (perror_with_name, error, warning): Don't declare.
4976 * utils.c (warning): Renamed and rewritten as...
4977 (vwarning): New function.
4978 (error): Renamed and rewritten as...
4979 (verror): New function.
4980 (internal_error): Renamed and rewritten as...
4981 (internal_verror): New function.
4982
bb974a24
GB
49832014-08-07 Gary Benson <gbenson@redhat.com>
4984
4985 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4986 * configure: Regenerate.
4987 * config.in: Likewise.
4988 * server.h: Do not include errno.h.
4989 * event-loop.c: Likewise.
4990 * hostio-errno.c: Likewise.
4991 * linux-low.c: Likewise.
4992 * remote-utils.c: Likewise.
4993 * spu-low.c: Likewise.
4994 * utils.c: Likewise.
4995 * gdbreplay.c: Unconditionally include errno.h.
4996
6d3d12eb
GB
49972014-08-07 Gary Benson <gbenson@redhat.com>
4998
4999 * server.h: Do not include string.h.
5000 * event-loop.c: Likewise.
5001 * linux-low.c: Likewise.
5002 * regcache.c: Likewise.
5003 * remote-utils.c: Likewise.
5004 * spu-low.c: Likewise.
5005 * utils.c: Likewise.
5006
dccbb609
GB
50072014-08-07 Gary Benson <gbenson@redhat.com>
5008
5009 * server.h: Do not include gdb_assert.h.
5010
e76df0d0
GB
50112014-08-07 Gary Benson <gbenson@redhat.com>
5012
5013 * server.h: Do not include common-utils.h.
5014
4cb9c816
GB
50152014-08-07 Gary Benson <gbenson@redhat.com>
5016
5017 * server.h: Do not include ptid.h.
5018 * notif.h: Likewise.
5019
3995eeee
GB
50202014-08-07 Gary Benson <gbenson@redhat.com>
5021
5022 * server.h: Do not include gdb_locale.h.
5023
cb9f1a9b
GB
50242014-08-07 Gary Benson <gbenson@redhat.com>
5025
5026 * server.h: Do not include gdb/signals.h.
5027 * win32-low.c: Likewise.
5028
a5fceff8
GB
50292014-08-07 Gary Benson <gbenson@redhat.com>
5030
5031 * server.h: Do not include pathmax.h.
5032
b9391142
GB
50332014-08-07 Gary Benson <gbenson@redhat.com>
5034
5035 * server.h: Do not include libiberty.h.
5036 * linux-bfin-low.c: Likewise.
5037
0e443c87
GB
50382014-08-07 Gary Benson <gbenson@redhat.com>
5039
5040 * server.h: Do not include ansidecl.h.
5041
8ebb3f56
GB
50422014-08-07 Gary Benson <gbenson@redhat.com>
5043
5044 * linux-x86-low.c: Do not include stddef.h.
5045 * lynx-ppc-low.c: Likewise.
5046 * tracepoint.c: Likewise.
5047
8980bdf6
GB
50482014-08-07 Gary Benson <gbenson@redhat.com>
5049
5050 * server.h: Do not include stdarg.h.
5051 * nto-low.c: Likewise.
5052
d7096f71
GB
50532014-08-07 Gary Benson <gbenson@redhat.com>
5054
5055 * server.h: Do not include stdlib.h.
5056 * inferiors.c: Likewise.
5057 * linux-low.c: Likewise.
5058 * regcache.c: Likewise.
5059 * spu-low.c: Likewise.
5060 * tracepoint.c: Likewise.
5061 * utils.c: Likewise.
5062
d02f550d
GB
50632014-08-07 Gary Benson <gbenson@redhat.com>
5064
5065 * server.h: Do not include stdio.h.
5066 * linux-low.c: Likewise.
5067 * remote-utils.c: Likewise.
5068 * spu-low.c: Likewise.
5069 * utils.c: Likewise.
5070 * wincecompat.c: Likewise.
5071
87f6c4e3
GB
50722014-08-06 Gary Benson <gbenson@redhat.com>
5073
5074 * regcache.c (init_register_cache): Move conditionals inside if.
5075
7089dca4
GB
50762014-08-06 Gary Benson <gbenson@redhat.com>
5077
5078 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5079
462f517e
GB
50802014-07-31 Gary Benson <gbenson@redhat.com>
5081
5082 * ax.h: Do not include server.h.
5083 * gdbthread.h: Likewise.
5084 * lynx-low.h: Likewise.
5085 * notif.h: Likewise.
5086
976411d6
GB
50872014-07-30 Gary Benson <gbenson@redhat.com>
5088
5089 * server.h: Include common-defs.h.
5090 Do not include config.h or build-gnulib-gdbserver/config.h.
5091
d41f6d8e
GB
50922014-07-30 Gary Benson <gbenson@redhat.com>
5093
5094 * hostio-errno.c: Move server.h to top of includes list.
5095 * inferiors.c: Likewise.
5096 * linux-x86-low.c: Likewise.
5097 * notif.c: Include server.h.
5098
314c6a35
TT
50992014-07-24 Tom Tromey <tromey@redhat.com>
5100 Gary Benson <gbenson@redhat.com>
5101
5102 * server.h (CORE_ADDR): Now unsigned.
5103
69ff6be5
PA
51042014-07-16 Pedro Alves <palves@redhat.com>
5105
5106 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5107
ce9e3fe7
PA
51082014-07-15 Pedro Alves <palves@redhat.com>
5109
5110 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5111 copy.
5112
e76126e8
PA
51132014-07-11 Pedro Alves <palves@redhat.com>
5114
5115 * linux-low.c (kill_wait_lwp): New function, based on
5116 kill_one_lwp_callback, but use my_waitpid directly.
5117 (kill_one_lwp_callback, linux_kill): Use it.
5118
8e9db26e
PA
51192014-06-23 Pedro Alves <palves@redhat.com>
5120
5121 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5122 before setting DR0..DR3.
5123
698b3e08
GB
51242014-06-20 Gary Benson <gbenson@redhat.com>
5125
5126 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5127 * configure: Regenerated.
5128 * config.in: Likewise.
5129
125f8a3d
GB
51302014-06-20 Gary Benson <gbenson@redhat.com>
5131
5132 * Makefile.in (SFILES): Update locations for files moved
5133 from common to nat.
5134 (object file files): Reordered.
5135
42995dbd
GB
51362014-06-20 Gary Benson <gbenson@redhat.com>
5137
5138 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5139 (i386_dr_low_set_addr): Likewise.
5140 (i386_dr_low_get_addr): Likewise.
5141 (i386_dr_low_can_set_control): Likewise.
5142 (i386_dr_low_set_control): Likewise.
5143 (i386_dr_low_get_control): Likewise.
5144 (i386_dr_low_get_status): Likewise.
5145 (i386_get_debug_register_length): Likewise.
5146 * linux-x86-low.c (i386_dr_low_set_addr):
5147 Changed signature. Made static.
5148 (i386_dr_low_get_addr): Likewise.
5149 (i386_dr_low_set_control): Likewise.
5150 (i386_dr_low_get_control): Likewise.
5151 (i386_dr_low_get_status): Likewise.
5152 (i386_dr_low): New global variable.
5153 * win32-i386-low.c (i386_dr_low_set_addr):
5154 Changed signature. Made static.
5155 (i386_dr_low_get_addr): Likewise.
5156 (i386_dr_low_set_control): Likewise.
5157 (i386_dr_low_get_control): Likewise.
5158 (i386_dr_low_get_status): Likewise.
5159 (i386_dr_low): New global variable.
5160
e1d2394b
MS
51612014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5162
5163 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5164 * Makefile.in (AR, AR_FLAGS): Define.
5165 * configure: Regenerate.
5166
3a8ee006
GB
51672014-06-19 Gary Benson <gbenson@redhat.com>
5168
5169 * Makefile.in (i386-dregs.o): New rule.
5170 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5171 * i386-low.c (target.h): Remove include.
5172 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5173 (DR_CONTROL_SHIFT): Likewise.
5174 (DR_CONTROL_SIZE): Likewise.
5175 (DR_RW_EXECUTE): Likewise.
5176 (DR_RW_WRITE): Likewise.
5177 (DR_RW_READ): Likewise.
5178 (DR_RW_IORW): Likewise.
5179 (DR_LEN_1): Likewise.
5180 (DR_LEN_2): Likewise.
5181 (DR_LEN_4): Likewise.
5182 (DR_LEN_8): Likewise.
5183 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5184 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5185 (DR_ENABLE_SIZE): Likewise.
5186 (DR_LOCAL_SLOWDOWN): Likewise.
5187 (DR_GLOBAL_SLOWDOWN): Likewise.
5188 (DR_CONTROL_RESERVED): Likewise.
5189 (I386_DR_CONTROL_MASK): Likewise.
5190 (I386_DR_VACANT): Likewise.
5191 (I386_DR_LOCAL_ENABLE): Likewise.
5192 (I386_DR_GLOBAL_ENABLE): Likewise.
5193 (I386_DR_DISABLE): Likewise.
5194 (I386_DR_SET_RW_LEN): Likewise.
5195 (I386_DR_GET_RW_LEN): Likewise.
5196 (I386_DR_WATCH_HIT): Likewise.
5197 (i386_wp_op_t): Likewise.
5198 (i386_show_dr): Likewise.
5199 (i386_length_and_rw_bits): Likewise.
5200 (i386_insert_aligned_watchpoint): Likewise.
5201 (i386_remove_aligned_watchpoint): Likewise.
5202 (i386_handle_nonaligned_watchpoint): Likewise.
5203 i386_update_inferior_debug_regs(): Likewise.
5204 (i386_dr_insert_watchpoint): Likewise.
5205 (i386_dr_remove_watchpoint): Likewise.
5206 (i386_dr_region_ok_for_watchpoint): Likewise.
5207 (i386_dr_stopped_data_address): Likewise.
5208 (i386_dr_stopped_by_watchpoint): Likewise.
5209
8f26655c
GB
52102014-06-19 Gary Benson <gbenson@redhat.com>
5211
5212 * i386-low.c (i386_dr_show): Renamed to
5213 i386_show_dr and made static. All uses updated.
5214 (i386_dr_length_and_rw_bits): Renamed to
5215 i386_length_and_rw_bits and made static.
5216 All uses updated.
5217 (i386_dr_insert_aligned_watchpoint): Renamed to
5218 i386_insert_aligned_watchpoint and made static.
5219 All uses updated.
5220 (i386_dr_remove_aligned_watchpoint): Renamed to
5221 i386_remove_aligned_watchpoint and made static.
5222 All uses updated.
5223 (i386_dr_update_inferior_debug_regs): Renamed to
5224 i386_update_inferior_debug_regs and made static.
5225 All uses updated.
5226
b9228891
GB
52272014-06-18 Gary Benson <gbenson@redhat.com>
5228
5171def3
GB
5229 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5230 (i386_dr_low_can_set_control): Likewise.
5231 (i386_get_debug_register_length): Likewise.
5232 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5233 (i386_dr_low_can_set_control): Likewise.
5234 (i386_get_debug_register_length): Likewise.
5235
52362014-06-17 Gary Benson <gbenson@redhat.com>
5237
b9228891
GB
5238 * i386-low.h (i386-dregs.h): New include.
5239 (DR_FIRSTADDR): Now in i386-dregs.h.
5240 (DR_LASTADDR): Likewise.
5241 (DR_NADDR): Likewise.
5242 (DR_STATUS): Likewise.
5243 (DR_CONTROL): Likewise.
5244 (i386_debug_reg_state): Likewise.
5245 (i386_dr_insert_watchpoint): Likewise.
5246 (i386_dr_remove_watchpoint): Likewise.
5247 (i386_dr_region_ok_for_watchpoint): Likewise.
5248 (i386_dr_stopped_data_address): Likewise.
5249 (i386_dr_stopped_by_watchpoint): Likewise.
5250 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5251
4be83cc2
GB
52522014-06-18 Gary Benson <gbenson@redhat.com>
5253
5254 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5255 i386_dr_insert_watchpoint.
5256 (i386_low_remove_watchpoint): Renamed to
5257 i386_dr_remove_watchpoint.
5258 (i386_low_region_ok_for_watchpoint): Renamed to
5259 i386_dr_region_ok_for_watchpoint.
5260 (i386_low_stopped_data_address): Renamed to
5261 i386_dr_stopped_data_address.
5262 (i386_low_stopped_by_watchpoint): Renamed to
5263 i386_dr_stopped_by_watchpoint.
5264 * i386-low.c (i386_show_dr): Renamed to
5265 i386_dr_show and made nonstatic. All uses updated.
5266 (i386_length_and_rw_bits): Renamed to
5267 i386_dr_length_and_rw_bits and made nonstatic.
5268 All uses updated.
5269 (i386_insert_aligned_watchpoint): Renamed to
5270 i386_dr_insert_aligned_watchpoint and made nonstatic.
5271 All uses updated.
5272 (i386_remove_aligned_watchpoint): Renamed to
5273 i386_dr_remove_aligned_watchpoint and made nonstatic.
5274 All uses updated.
5275 (i386_update_inferior_debug_regs): Renamed to
5276 i386_dr_update_inferior_debug_regs and made nonstatic.
5277 All uses updated.
5278 (i386_low_insert_watchpoint): Renamed to
5279 i386_dr_insert_watchpoint. All uses updated.
5280 (i386_low_remove_watchpoint): Renamed to
5281 i386_dr_remove_watchpoint. All uses updated.
5282 (i386_low_region_ok_for_watchpoint): Renamed to
5283 i386_dr_region_ok_for_watchpoint. All uses updated.
5284 (i386_low_stopped_data_address): Renamed to
5285 i386_dr_stopped_data_address. All uses updated.
5286 (i386_low_stopped_by_watchpoint): Renamed to
5287 i386_dr_stopped_by_watchpoint. All uses updated.
5288
131aa0d4
GB
52892014-06-18 Gary Benson <gbenson@redhat.com>
5290
5291 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5292 (i386_dr_low_can_set_control): Likewise.
5293 (i386_insert_aligned_watchpoint): New check.
5294
d9305f7f
GB
52952014-06-18 Gary Benson <gbenson@redhat.com>
5296
5297 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5298 Renamed to state.
5299
e927c9fc
GB
53002014-06-18 Gary Benson <gbenson@redhat.com>
5301
5302 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5303 instead of fatal and error.
5304 (i386_handle_nonaligned_watchpoint): Likewise.
5305
1b6d4134
GB
53062014-06-18 Gary Benson <gbenson@redhat.com>
5307
5308 * i386-low.c (i386_get_debug_register_length): New macro.
5309 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5310 (i386_show_dr): Use debug_printf instead of fprintf. Use
5311 phex to format values.
5312
6e62758f
GB
53132014-06-18 Gary Benson <gbenson@redhat.com>
5314
5315 * i386-low.h: Comment changes.
5316 * i386-low.c: Likewise.
5317
fc6e2f03
GB
53182014-06-18 Gary Benson <gbenson@redhat.com>
5319
5320 * i386-low.c: Whitespace changes.
5321
f9d1eeed
TT
53222014-06-12 Tom Tromey <tromey@redhat.com>
5323
5324 * utils.c (freeargv): Remove.
5325
0b04e523
TT
53262014-06-12 Tom Tromey <tromey@redhat.com>
5327
5328 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5329 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5330 (parse_debug_format_options): Likewise.
5331 (gdbserver_usage): Likewise.
5332 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5333 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5334 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5335 against libiberty.
5336 ($(LIBGNU)): Depend on libiberty.
5337 (all-lib): Recurse into all subdirs.
5338 (install-only): Invoke "install" target in subdirs.
5339 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5340 targets.
5341 * configure: Rebuild.
5342 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5343 for vasprintf, vsnprintf, or gettimeofday.
5344 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5345 srv_tgtobj.
5346
270c9937
JB
53472014-06-05 Joel Brobecker <brobecker@adacore.com>
5348
5349 * development.sh: Delete.
5350 * Makefile.in (config.status): Adjust dependency on development.sh.
5351 * configure.ac: Adjust development.sh source call.
5352 * configure: Regenerate.
5353
0a261ed8
PA
53542014-06-02 Pedro Alves <palves@redhat.com>
5355
5356 * ax.c (gdb_free_agent_expr): New function.
5357 * ax.h (gdb_free_agent_expr): New declaration.
5358 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5359 list.
5360 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5361 static.
5362 (clear_breakpoint_conditions_and_commands): New function.
5363 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5364 (clear_breakpoint_conditions_and_commands): New declaration.
5365
e9dae05e
RR
53662014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5367
5368 * linux-aarch64-low.c (asm/ptrace.h): Include.
5369
5876f503
JK
53702014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5371
5372 Fix TLS access for -static -pthread.
5373 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5374 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5375 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5376
802e8e6d
PA
53772014-05-20 Pedro Alves <palves@redhat.com>
5378
5379 * linux-aarch64-low.c (aarch64_insert_point)
5380 (aarch64_remove_point): No longer check whether the type is
5381 supported here. Adjust to new interface.
5382 (the_low_target): Install aarch64_supports_z_point_type as
5383 supports_z_point_type method.
5384 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5385 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5386 instead of a Z packet char. Adjust.
5387 (arm_supports_z_point_type): New function.
5388 (arm_insert_point, arm_remove_point): Adjust to new interface.
5389 (the_low_target): Install arm_supports_z_point_type.
5390 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5391 (cris_insert_point, cris_remove_point): Adjust to new interface.
5392 Don't check whether the type is supported here.
5393 (the_low_target): Install cris_supports_z_point_type.
5394 * linux-low.c (linux_supports_z_point_type): New function.
5395 (linux_insert_point, linux_remove_point): Adjust to new interface.
5396 * linux-low.h (struct linux_target_ops) <insert_point,
5397 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5398 raw_breakpoint pointer parameter.
5399 <supports_z_point_type>: New method.
5400 * linux-mips-low.c (mips_supports_z_point_type): New function.
5401 (mips_insert_point, mips_remove_point): Adjust to new interface.
5402 Use mips_supports_z_point_type.
5403 (the_low_target): Install mips_supports_z_point_type.
5404 * linux-ppc-low.c (the_low_target): Install NULL as
5405 supports_z_point_type method.
5406 * linux-s390-low.c (the_low_target): Install NULL as
5407 supports_z_point_type method.
5408 * linux-sparc-low.c (the_low_target): Install NULL as
5409 supports_z_point_type method.
5410 * linux-x86-low.c (x86_supports_z_point_type): New function.
5411 (x86_insert_point): Adjust to new insert_point interface. Use
5412 insert_memory_breakpoint. Adjust to new
5413 i386_low_insert_watchpoint interface.
5414 (x86_remove_point): Adjust to remove_point interface. Use
5415 remove_memory_breakpoint. Adjust to new
5416 i386_low_remove_watchpoint interface.
5417 (the_low_target): Install x86_supports_z_point_type.
5418 * lynx-low.c (lynx_target_ops): Install NULL as
5419 supports_z_point_type callback.
5420 * nto-low.c (nto_supports_z_point_type): New.
5421 (nto_insert_point, nto_remove_point): Adjust to new interface.
5422 (nto_target_ops): Install nto_supports_z_point_type.
5423 * mem-break.c: Adjust intro comment.
5424 (struct raw_breakpoint) <raw_type, size>: New fields.
5425 <inserted>: Update comment.
5426 <shlib_disabled>: Delete field.
5427 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5428 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5429 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5430 (raw_bkpt_type_to_target_hw_bp_type): New function.
5431 (find_enabled_raw_code_breakpoint_at): New function.
5432 (find_raw_breakpoint_at): New type and size parameters. Use them.
5433 (insert_memory_breakpoint): New function, based off
5434 set_raw_breakpoint_at.
5435 (remove_memory_breakpoint): New function.
5436 (set_raw_breakpoint_at): Reimplement.
5437 (set_breakpoint): New, based on set_breakpoint_at.
5438 (set_breakpoint_at): Reimplement.
5439 (delete_raw_breakpoint): Go through the_target->remove_point
5440 instead of assuming memory breakpoints.
5441 (find_gdb_breakpoint_at): Delete.
5442 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5443 (find_gdb_breakpoint): New function.
5444 (set_gdb_breakpoint_at): Delete.
5445 (z_type_supported): New function.
5446 (set_gdb_breakpoint_1): New function, loosely based off
5447 set_gdb_breakpoint_at.
5448 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5449 (delete_gdb_breakpoint_at): Delete.
5450 (delete_gdb_breakpoint_1): New function, loosely based off
5451 delete_gdb_breakpoint_at.
5452 (delete_gdb_breakpoint): New function.
5453 (clear_gdb_breakpoint_conditions): Rename to ...
5454 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5455 breakpoint.
5456 (add_condition_to_breakpoint): Make static.
5457 (add_breakpoint_condition): Take a struct breakpoint pointer
5458 instead of an address. Adjust.
5459 (gdb_condition_true_at_breakpoint): Rename to ...
5460 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5461 z_type parameter.
5462 (gdb_condition_true_at_breakpoint): Reimplement.
5463 (add_breakpoint_commands): Take a struct breakpoint pointer
5464 instead of an address. Adjust.
5465 (gdb_no_commands_at_breakpoint): Rename to ...
5466 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5467 parameter. Return true if no breakpoint was found. Change debug
5468 output.
5469 (gdb_no_commands_at_breakpoint): Reimplement.
5470 (run_breakpoint_commands): Rename to ...
5471 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5472 and change return type to boolean.
5473 (run_breakpoint_commands): New function.
5474 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5475 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5476 breakpoint. Go through the_target->remove_point instead of
5477 assuming memory breakpoint.
5478 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5479 software and hardware breakpoints.
5480 (reinsert_raw_breakpoint): Go through the_target->insert_point
5481 instead of assuming memory breakpoint.
5482 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5483 software and hardware breakpoints.
5484 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5485 Check both software and hardware breakpoints.
5486 (validate_inserted_breakpoint): Assert the breakpoint is a
5487 software breakpoint. Set the inserted flag to -1 instead of
5488 setting shlib_disabled.
5489 (delete_disabled_breakpoints): Adjust.
5490 (validate_breakpoints): Only validate software breakpoints.
5491 Adjust to inserted flag change.
5492 (check_mem_read, check_mem_write): Skip breakpoint types other
5493 than software breakpoints. Adjust to inserted flag change.
5494 * mem-break.h (enum raw_bkpt_type): New enum.
5495 (raw_breakpoint, struct process_info): Forward declare.
5496 (Z_packet_to_target_hw_bp_type): Delete declaration.
5497 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5498 (set_gdb_breakpoint, delete_gdb_breakpoint)
5499 (clear_breakpoint_conditions): New declarations.
5500 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5501 (breakpoint_inserted_here): Update comment.
5502 (add_breakpoint_condition, add_breakpoint_commands): Replace
5503 address parameter with a breakpoint pointer parameter.
5504 (gdb_breakpoint_here): Update comment.
5505 (delete_gdb_breakpoint_at): Delete.
5506 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5507 * server.c (process_point_options): Take a struct breakpoint
5508 pointer instead of an address. Adjust.
5509 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5510 delete_gdb_breakpoint.
5511 * spu-low.c (spu_target_ops): Install NULL as
5512 supports_z_point_type method.
5513 * target.h: Include mem-break.h.
5514 (struct target_ops) <prepare_to_access_memory>: Update comment.
5515 <supports_z_point_type>: New field.
5516 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5517 instead of a char. Also take a raw breakpoint pointer.
5518 * win32-arm-low.c (the_low_target): Install NULL as
5519 supports_z_point_type.
5520 * win32-i386-low.c (i386_supports_z_point_type): New function.
5521 (i386_insert_point, i386_remove_point): Adjust to new interface.
5522 (the_low_target): Install i386_supports_z_point_type.
5523 * win32-low.c (win32_supports_z_point_type): New function.
5524 (win32_insert_point, win32_remove_point): Adjust to new interface.
5525 (win32_target_ops): Install win32_supports_z_point_type.
5526 * win32-low.h (struct win32_target_ops):
5527 <supports_z_point_type>: New method.
5528 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5529 instead of a char. Also take a raw breakpoint pointer.
5530
932539e3
PA
55312014-05-20 Pedro Alves <palves@redhat.com>
5532
5533 * mem-break.h: Include break-common.h.
5534 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5535 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5536 (Z_packet_to_target_hw_bp_type): New declaration.
5537 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5538 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5539 (Z_PACKET_ACCESS_WP): Delete macros.
5540 (Z_packet_to_hw_type): Delete function.
5541 * i386-low.h: Don't include break-common.h here.
5542 (Z_packet_to_hw_type): Delete declaration.
5543 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5544 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5545 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5546 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5547 * linux-aarch64-low.c: Don't include break-common.h here.
5548 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5549 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5550 (Z_packet_to_target_hw_bp_type): Delete function.
5551 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5552 function.
5553 (mips_insert_point, mips_remove_point): Use
5554 Z_packet_to_target_hw_bp_type.
5555
4ff0d3d8
PA
55562014-05-20 Pedro Alves <palves@redhat.com>
5557
5558 * linux-aarch64-low.c: Include break-common.h.
5559 (enum target_point_type): Delete.
5560 (Z_packet_to_point_type): Rename to ...
5561 (Z_packet_to_target_hw_bp_type): ... this, and return a
5562 target_hw_bp_type instead.
5563 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5564 instead of an enum target_point_type.
5565 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5566 breakpoint type.
5567 (aarch64_dr_state_insert_one_point)
5568 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5569 (aarch64_handle_aligned_watchpoint)
5570 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5571 Take an enum target_hw_bp_type instead of an enum
5572 target_point_type.
5573 (aarch64_supports_z_point_type): New function.
5574 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5575 use Z_packet_to_target_hw_bp_type.
5576
786dc519
JB
55772014-05-20 Joel Brobecker <brobecker@adacore.com>
5578
5579 * configure.ac: Only use -Werror by default when DEVELOPMENT
5580 is true.
5581 * configure: Regenerate.
5582
9e0aa64f
JK
55832014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5584
5585 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5586 * linux-x86-low.c (X86_64_USER_REGS): New.
5587 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5588
2b577b92
YQ
55892014-04-28 Yao Qi <yao@codesourcery.com>
5590
5591 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5592 name.
5593
94611da2
PA
55942014-04-25 Pedro Alves <palves@redhat.com>
5595
5596 PR server/16255
5597 * linux-low.c (linux_attach_fail_reason_string): New function.
5598 (linux_attach_lwp): Delete.
5599 (linux_attach_lwp_1): Rename to ...
5600 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5601 argument. Remove "initial" parameter. Return int instead of
5602 void. Don't error or warn here.
5603 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5604 failure to attach to the tgid. Call warning when failing to
5605 attach to an lwp.
5606 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5607 argument. Remove "initial" parameter. Return int instead of
5608 void. Don't error or warn here.
5609 (linux_attach_fail_reason_string): New declaration.
5610 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5611 interface change. Use linux_attach_fail_reason_string.
5612
01f9f808
MS
56132014-04-24 Michael Sturm <michael.sturm@mintel.com>
5614 Walfred Tedeschi <walfred.tedeschi@intel.com>
5615
5616 * Makefile.in: Added rules to handle new files
5617 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5618 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5619 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5620 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5621 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5622 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5623 x32-avx512-linux.o.
5624 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5625 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5626 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5627 i386/x32-avx512.xml.
5628 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5629 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5630 i386/x32-avx512-linux.xml.
5631 * i387-fp.c (num_avx512_k_registers): New constant for number
5632 of K registers.
5633 (num_avx512_zmmh_low_registers): New constant for number of
5634 lower ZMM registers (0-15).
5635 (num_avx512_zmmh_high_registers): New constant for number of
5636 higher ZMM registers (16-31).
5637 (num_avx512_ymmh_registers): New contant for number of higher
5638 YMM registers (ymm16-31 added by avx521 on x86_64).
5639 (num_avx512_xmm_registers): New constant for number of higher
5640 XMM registers (xmm16-31 added by AVX512 on x86_64).
5641 (struct i387_xsave): Add space for AVX512 registers.
5642 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5643 Add code to handle AVX512 registers.
5644 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5645 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5646 prototypei from generated file.
5647 (tdesc_amd64_avx512_linux): Likewise.
5648 (init_registers_x32_avx512_linux): Likewise.
5649 (tdesc_x32_avx512_linux): Likewise.
5650 (init_registers_i386_avx512_linux): Likewise.
5651 (tdesc_i386_avx512_linux): Likewise.
5652 (x86_64_regmap): Add AVX512 registers.
5653 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5654 mask.
5655 (initialize_low_arch): Add code to initialize AVX512 registers.
5656
51aa91f9
PA
56572014-04-23 Pedro Alves <palves@redhat.com>
5658
5659 * mem-break.c (find_gdb_breakpoint_at): Make static.
5660 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5661
a4165e94
PA
56622014-04-23 Pedro Alves <palves@redhat.com>
5663
5664 * i386-low.c: Don't include break-common.h here.
5665 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5666 prototype to take target_hw_bp_type as argument instead of a Z
5667 packet char.
5668 * i386-low.h: Include break-common.h here.
5669 (Z_packet_to_hw_type): Declare.
5670 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5671 prototypes.
5672 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5673 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5674 (x86_remove_point): Convert the packet number to a
5675 target_hw_bp_type before calling i386_low_remove_watchpoint.
5676 * win32-i386-low.c (i386_insert_point): Convert the packet number
5677 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5678 (i386_remove_point): Convert the packet number to a
5679 target_hw_bp_type before calling i386_low_remove_watchpoint.
5680
b8acf843
PA
56812014-04-23 Pedro Alves <palves@redhat.com>
5682
5683 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5684
d708bcd1
PA
56852014-04-10 Pedro Alves <palves@redhat.com>
5686
5687 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5688 Check if the condition or command is NULL before checking if the
5689 breakpoint is known. On success, return true.
5690 * mem-break.h (add_breakpoint_condition): Document return.
5691 (add_breakpoint_commands): Add describing comment.
5692 * server.c (skip_to_semicolon): New function.
5693 (process_point_options): Use it.
5694
2eec7d5b
PA
56952014-04-09 Pedro Alves <palves@redhat.com>
5696
5697 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5698 to lwpid_of.
5699
fa96cb38
PA
57002014-02-27 Pedro Alves <palves@redhat.com>
5701
5702 PR 12702
5703 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5704 macros.
5705 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5706 output.
5707 (last_thread_of_process_p): Take a PID argument instead of a
5708 thread pointer.
5709 (linux_wait_for_lwp): Delete.
5710 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5711 functions.
5712 (linux_low_filter_event): New function, party factored out from
5713 linux_wait_for_event.
5714 (linux_wait_for_event): Rename to ...
5715 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5716 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5717 sigsuspend. Check for zombie leaders.
5718 (linux_wait_for_event): Reimplement as wrapper around
5719 linux_wait_for_event_filtered.
5720 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5721 a normal or signal exit is seen, it's the whole process exiting.
5722 (wait_for_sigstop): No longer a for_each_inferior callback.
5723 Rewrite on top of linux_wait_for_event_filtered.
5724 (stop_all_lwps): Call wait_for_sigstop directly.
5725 * server.c (resume, handle_target_event): Handle
5726 TARGET_WAITKIND_NO_RESUMED.
5727
d763de10
JB
57282014-02-26 Joel Brobecker <brobecker@adacore.com>
5729
5730 * win32-low.c (psapi_get_dll_name,
5731 * win32_CreateToolhelp32Snapshot): Delete.
5732 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5733 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5734 Delete.
5735 (handle_load_dll): Add function description.
5736 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5737
850a0f76
JB
57382014-02-26 Joel Brobecker <brobecker@adacore.com>
5739
5740 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5741 Add comment.
5742 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5743 base address when calling win32_add_one_solib.
5744 (handle_load_dll): Delete local variable load_addr.
5745 Remove 0x1000 offset applied to DLL base address when calling
5746 win32_add_one_solib.
5747 (handle_unload_dll): Add comment.
5748
f25b3fc3
JB
57492014-02-26 Joel Brobecker <brobecker@adacore.com>
5750
5751 * win32-low.c (win32_add_all_dlls): Renames
5752 win32_ensure_ntdll_loaded. Rewrite function documentation.
5753 Adjust implementation to always load all DLLs.
5754 Add 0x1000 offset to DLL base address when calling
5755 win32_add_one_solib.
5756 (child_initialization_done): New static global.
5757 (do_initial_child_stuff): Set child_initialization_done to
5758 zero during child initialization, and 1 after. Replace call
5759 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5760 Add comment.
5761 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5762 (handle_unload_dll): Add function documentation.
5763 (get_child_debug_event): Ignore load and unload DLL events
5764 during child initialization.
5765
d86d4aaf
DE
57662014-02-20 Doug Evans <dje@google.com>
5767
3bc32da3 5768 Remove global all_lwps.
d86d4aaf
DE
5769 * inferiors.h (ptid_of): Move here from linux-low.h.
5770 (pid_of, lwpid_of): Ditto.
5771 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5772 parameter is a struct thread_info * now.
5773 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5774 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5775 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5776 directly.
5777 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5778 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5779 * linux-arm-low.c (update_registers_callback): Update, "entry"
5780 parameter is a struct thread_info * now.
5781 Fetch lwpid from current_inferior directly.
5782 (arm_insert_point): Pass &all_threads to find_inferior instead of
5783 &all_lwps.
5784 (arm_remove_point): Ditto.
5785 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5786 (arm_prepare_to_resume): Fetch pid from thread.
5787 (arm_read_description): Fetch lwpid from current_inferior directly.
5788 * linux-low.c (all_lwps): Delete.
5789 (delete_lwp): Delete call to remove_inferior.
5790 (handle_extended_wait): Fetch lwpid from thread.
5791 (add_lwp): Don't set lwp->entry.id. Remove call to
5792 add_inferior_to_list.
5793 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5794 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5795 (kill_one_lwp_callback): Ditto.
5796 (linux_kill): Don't dereference NULL pointer.
5797 Fetch ptid,lwpid from thread.
5798 (get_detach_signal): Fetch ptid from thread.
5799 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5800 Simplify call to regcache_invalidate_thread.
5801 (delete_lwp_callback): Update, "entry" parameter is a
5802 struct thread_info * now. Fetch pid from thread.
5803 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5804 (status_pending_p_callback): Update, "entry" parameter is a
5805 struct thread_info * now. Fetch ptid from thread.
5806 (find_lwp_pid): Update, "entry" parameter is a
5807 struct thread_info * now.
5808 (linux_wait_for_lwp): Fetch pid from thread.
5809 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5810 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5811 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5812 (dequeue_one_deferred_signal): Ditto.
5813 (cancel_breakpoint): Fetch ptid from current_inferior.
5814 (linux_wait_for_event): Pass &all_threads to find_inferior,
5815 not &all_lwps. Fetch ptid, lwpid from thread.
5816 (count_events_callback): Update, "entry" parameter is a
5817 struct thread_info * now.
5818 (select_singlestep_lwp_callback): Ditto.
5819 (select_event_lwp_callback): Ditto.
5820 (cancel_breakpoints_callback): Ditto.
5821 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5822 not &all_lwps.
5823 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5824 (unsuspend_one_lwp): Update, "entry" parameter is a
5825 struct thread_info * now.
5826 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5827 not &all_lwps.
5828 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5829 Fetch lwpid from thread, not lwp.
5830 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5831 Pass &all_threads to find_inferior, not &all_lwps.
5832 (send_sigstop): Fetch lwpid from thread, not lwp.
5833 (send_sigstop_callback): Update, "entry" parameter is a
5834 struct thread_info * now.
5835 (suspend_and_send_sigstop_callback): Ditto.
5836 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5837 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5838 struct thread_info * now.
5839 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5840 from thread, lwp.
5841 (lwp_running): Update, "entry" parameter is a
5842 struct thread_info * now.
5843 (stop_all_lwps): Fetch ptid from thread.
5844 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5845 (linux_resume_one_lwp): Fetch lwpid from thread.
5846 (linux_set_resume_request): Update, "entry" parameter is a
5847 struct thread_info * now. Fetch pid, lwpid from thread.
5848 (resume_status_pending_p): Update, "entry" parameter is a
5849 struct thread_info * now.
5850 (need_step_over_p): Ditto. Fetch lwpid from thread.
5851 (start_step_over): Fetch lwpid from thread.
5852 (linux_resume_one_thread): Update, "entry" parameter is a
5853 struct thread_info * now. Fetch lwpid from thread.
5854 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5855 (proceed_one_lwp): Update, "entry" parameter is a
5856 struct thread_info * now. Fetch lwpid from thread.
5857 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5858 struct thread_info * now.
5859 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5860 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5861 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5862 directly.
5863 (regsets_store_inferior_registers): Ditto.
5864 (fetch_register, store_register): Ditto.
5865 (linux_read_memory, linux_write_memory): Ditto.
5866 (linux_request_interrupt): Ditto.
5867 (linux_read_auxv): Ditto.
5868 (linux_xfer_siginfo): Ditto.
5869 (linux_qxfer_spu): Ditto.
5870 (linux_qxfer_libraries_svr4): Ditto.
5871 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5872 moved to inferiors.h.
5873 (get_lwp): Delete.
5874 (get_thread_lwp): Update.
5875 (struct lwp_info): Delete member "entry". Simplify comment for
5876 member "thread".
5877 (all_lwps): Delete.
5878 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5879 current_inferior directly.
5880 (update_watch_registers_callback): Update, "entry" parameter is a
5881 struct thread_info * now. Fetch pid from thread.
5882 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5883 (mips_insert_point): Fetch lwpid from current_inferior.
5884 Pass &all_threads to find_inferior, not &all_lwps.
5885 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5886 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5887 directly.
5888 (mips_stopped_data_address): Ditto.
5889 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5890 directly.
5891 * linux-tile-low.c (tile_arch_setup): Ditto.
5892 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5893 (update_debug_registers_callback): Update, "entry" parameter is a
5894 struct thread_info * now. Fetch pid from thread.
5895 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5896 Pass &all_threads to find_inferior, not &all_lwps.
5897 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5898 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5899 Pass &all_threads to find_inferior, not &all_lwps.
5900 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5901 (i386_dr_low_get_status): Ditto.
5902 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5903 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5904 (x86_linux_read_description): Ditto.
5905 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5906
3b8361aa
DE
59072014-02-20 Doug Evans <dje@google.com>
5908
5909 * inferiors.c (get_first_inferior): Fix buglet.
5910
f7667f0d
DE
59112014-02-19 Doug Evans <dje@google.com>
5912
5913 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5914 * inferiors.c (add_thread): Change result type to struct thread_info *.
5915 All callers updated.
5916 (add_lwp): Call add_thread here instead of in callers.
5917 All callers updated.
5918 * linux-low.h (get_lwp_thread): Rewrite.
5919 (struct lwp_info): New member "thread".
5920
b3312d80
DE
59212014-02-19 Doug Evans <dje@google.com>
5922
5923 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5924 All callers updated.
5925
ecc6f45c
DE
59262014-02-19 Doug Evans <dje@google.com>
5927
5928 * inferiors.c (add_thread): Fix whitespace.
5929
649ebbca
DE
59302014-02-19 Doug Evans <dje@google.com>
5931
5932 * dll.c (clear_dlls): Replace accessing list implemention details
5933 with API function.
5934 * gdbthread.h (get_first_thread): Declare.
5935 * inferiors.c (for_each_inferior_with_data): New function.
5936 (get_first_thread): New function.
5937 (find_thread_ptid): Simplify.
5938 (get_first_inferior): New function.
5939 (clear_list): Delete.
5940 (one_inferior_p): New function.
5941 (clear_inferior_list): New function.
5942 (clear_inferiors): Update.
5943 * inferiors.h (for_each_inferior_with_data): Declare.
5944 (clear_inferior_list): Declare.
5945 (one_inferior_p): Declare.
5946 (get_first_inferior): Declare.
5947 * linux-low.c (linux_wait_for_event): Replace accessing list
5948 implemention details with API function.
5949 * server.c (target_running): Ditto.
5950 (accumulate_file_name_length): New function.
5951 (emit_dll_description): New function.
5952 (handle_qxfer_libraries): Replace accessing list implemention
5953 details with API function.
5954 (handle_qxfer_threads_worker): New function.
5955 (handle_qxfer_threads_proper): Replace accessing list implemention
5956 details with API function.
5957 (handle_query): Ditto.
5958 (visit_actioned_threads_callback_ftype): New typedef.
5959 (visit_actioned_threads_data): New struct.
5960 (visit_actioned_threads): Rewrite to be find_inferior callback.
5961 (resume): Call find_inferior.
5962 (handle_status): Replace accessing list implemention
5963 details with API function.
5964 (process_serial_event): Replace accessing list implemention details
5965 with API function.
5966 * target.c (set_desired_inferior): Replace accessing list implemention
5967 details with API function.
5968 * tracepoint.c (same_process_p): New function.
5969 (gdb_agent_about_to_close): Replace accessing list implemention
5970 details with API function.
5971 * win32-low.c (child_delete_thread): Replace accessing list
5972 implemention details with API function.
5973 (match_dll_by_basename): New function.
5974 (dll_is_loaded_by_basename): New function.
5975 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5976 details call to dll_is_loaded_by_basename.
5977
80894984
DE
59782014-02-19 Doug Evans <dje@google.com>
5979
5980 * dll.h (struct dll_info): Add comment.
5981 * gdbthread.h (struct thread_info): Add comment.
5982 (current_ptid): Simplify.
5983 * inferiors.c (add_process): Update.
5984 (remove_process): Update.
5985 * inferiors.h (struct process_info): Rename member "head" to "entry".
5986 * linux-low.c (delete_lwp): Update.
5987 (add_lwp): Update.
5988 (last_thread_of_process_p): Update.
5989 (kill_one_lwp_callback, linux_kill): Update.
5990 (status_pending_p_callback): Update.
5991 (wait_for_sigstop): Update. Simplify read of ptid.
5992 (start_step_over): Update.
5993 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5994 (get_lwp_thread): Update.
5995 (struct lwp_info): Rename member "head" to "entry".
5996 * regcache.h (inferior_list_entry): Delete.
5997 * server.c (kill_inferior_callback): Update.
5998 (detach_or_kill_inferior_callback): Update.
5999 (print_started_pid): Update.
6000 (print_attached_pid): Update.
6001 (process_serial_event): Simplify read of ptid.
6002 * thread-db.c (thread_db_create_event): Update.
6003 (thread_db_get_tls_address): Update.
6004 * win32-low.c (current_inferior_ptid): Simplify.
6005
46917d26
TT
60062014-02-19 Tom Tromey <tromey@redhat.com>
6007
6008 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6009 argument.
6010 (target_supports_btrace): Update.
6011
0759a81e
YQ
60122014-02-14 Yao Qi <yao@codesourcery.com>
6013
6014 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6015 (rsp-low-ipa.o): New target.
6016
a7191e8b
TT
60172014-02-12 Tom Tromey <tromey@redhat.com>
6018
6019 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6020 convert_ascii_to_int.
6021 * regcache.c (registers_to_string): Likewise.
6022 * remote-utils.c (decode_M_packet): Likewise.
6023 * server.c (process_serial_event): Likewise.
6024
ff0e980e
TT
60252014-02-12 Tom Tromey <tromey@redhat.com>
6026
6027 * server.c (handle_query, handle_v_run): Use hex2bin, not
6028 unhexify.
6029 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6030
e9371aff
TT
60312014-02-12 Tom Tromey <tromey@redhat.com>
6032
6033 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6034 convert_int_to_ascii.
6035 * regcache.c (registers_to_string, collect_register_as_string):
6036 Likewise.
6037 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6038 Likewise.
6039 * server.c (process_serial_event): Likewise.
6040 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6041 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6042
971dc0b8
TT
60432014-02-12 Tom Tromey <tromey@redhat.com>
6044
6045 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6046 bin2hex, not hexify.
6047 * tracepoint.c (cmd_qtstatus): Likewise.
6048
0a822afb
TT
60492014-02-12 Tom Tromey <tromey@redhat.com>
6050
6051 * remote-utils.c (monitor_output): Pass explicit length to
6052 hexify.
6053
9c3d6531
TT
60542014-02-12 Tom Tromey <tromey@redhat.com>
6055
6056 * tracepoint.c: Include rsp-low.h.
6057 * server.c: Include rsp-low.h.
6058 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6059 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6060 declare.
6061 * remote-utils.c: Include rsp-low.h.
6062 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6063 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6064 (convert_int_to_ascii, convert_ascii_to_int): Move to
6065 common/rsp-low.c.
6066 * regcache.c: Include rsp-low.h.
6067 * ax.c: Include rsp-low.h.
6068 * Makefile.in (SFILES): Add common/rsp-low.c.
6069 (OBS): Add rsp-low.o.
6070 (rsp-low.o): New target.
6071
01fd3ea5
TT
60722014-02-12 Tom Tromey <tromey@redhat.com>
6073
6074 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6075 Include print-utils.h.
6076 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6077 (plongest, thirty_two, phex_nz): Remove.
6078 * Makefile.in (SFILES): Add common/print-utils.c.
6079 (OBS): Add print-utils.o.
6080 (print-utils-ipa.o): New target.
6081 (print-utils.o): New target.
6082 (IPA_OBJS): Add print-utils-ipa.o.
6083
e99dc820
TT
60842014-02-06 Tom Tromey <tromey@redhat.com>
6085
6086 * Makefile.in (SFILES): Fix indentation.
6087
ee1e2d4f
DE
60882014-02-05 Doug Evans <dje@google.com>
6089
6090 * linux-low.c (linux_wait_for_event): Improve comment.
6091 (linux_wait_1): Keep current_inferior in sync with event_child.
6092
f5a02773
DE
60932014-01-22 Doug Evans <dje@google.com>
6094
6095 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6096
87ce2a04
DE
60972014-01-22 Doug Evans <dje@google.com>
6098
6099 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6100 * configure: Regenerate.
6101 * config.in: Regenerate.
6102 * Makefile.in (SFILES): Add debug.c.
6103 (OBS): Add debug.o.
6104 * debug.c: New file.
6105 * debug.h: New file.
6106 * linux-aarch64-low.c (*): Update all debugging printfs to use
6107 debug_printf instead of fprintf.
6108 * linux-arm-low.c (*): Ditto.
6109 * linux-cris-low.c (*): Ditto.
6110 * linux-crisv32-low.c (*): Ditto.
6111 * linux-m32r-low.c (*): Ditto.
6112 * linux-sparc-low.c (*): Ditto.
6113 * linux-x86.c (*): Ditto.
6114 * linux-low.c (*): Ditto.
6115 (linux_wait_1): Add calls to debug_enter, debug_exit.
6116 (linux_wait): Remove redundant debugging printf.
6117 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6118 (linux_resume, unstop_all_lwps): Ditto.
6119 * mem-break.c (*): Update all debugging printfs to use
6120 debug_printf instead of fprintf.
6121 * remote-utils.c (*): Ditto.
6122 * thread-db.c (*): Ditto.
6123 * server.c #include <ctype.h>, "gdb_vecs.h".
6124 (debug_threads): Moved to debug.c.
6125 (*): Update all debugging printfs to use debug_printf instead of
6126 fprintf.
6127 (start_inferior): Replace call to fflush with call to debug_flush.
6128 (monitor_show_help): Mention set debug-format.
6129 (parse_debug_format_options): New function.
6130 (handle_monitor_command): Handle "monitor set debug-format".
6131 (gdbserver_usage): Mention --debug-format.
6132 (main): Parse --debug-format.
6133 * server.h (debug_threads): Declaration moved to debug.h.
6134 #include "debug.h".
6135 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6136 trace_debug_1 that uses debug_printf.
6137 (tracepoint_look_up_symbols): Update all debugging printfs to use
6138 debug_printf instead of fprintf.
6139
e671835b
BS
61402014-01-20 Baruch Siach <baruch@tkos.co.il>
6141
6142 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6143 sys/ptrace.h.
6144
b5737fa9
PA
61452014-01-17 Pedro Alves <palves@redhat.com>
6146
ea38d2a9 6147 PR build/16445
c7faa97a
PA
6148 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6149 defined after including gdb_proc_service.h.
b5737fa9 6150
40ed484e
DE
61512014-01-16 Doug Evans <dje@google.com>
6152
6153 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6154 (match_dll): Use it.
6155
969c39fb
MM
61562014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6157
6158 * target.h (target_ops) <read_btrace>: Change parameters and
6159 return type to allow error reporting.
6160 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6161 trace reading errors on.
6162 * linux-low.c (linux_low_read_btrace): Pass trace reading
6163 errors on.
6164 (linux_low_disable_btrace): New.
6165
ab7f45ba
DE
61662014-01-15 Doug Evans <dje@google.com>
6167
6168 * inferiors.c (thread_id_to_gdb_id): Delete.
6169 * inferiors.h (thread_id_to_gdb_id): Delete.
6170
66af0f44
EZ
61712014-01-13 Eli Zaretskii <eliz@gnu.org>
6172
6173 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6174 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6175 versions.
6176
9939e131
PA
61772014-01-08 Pedro Alves <palves@redhat.com>
6178
6179 * server.c (handle_status): Don't discard previous queued stop
6180 replies or thread's pending status here.
6181 (main) <disconnection>: Do it here instead.
6182
b7ea362b
PA
61832014-01-08 Pedro Alves <palves@redhat.com>
6184
6185 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6186 * server.c (visit_actioned_threads, handle_pending_status): New
6187 function.
6188 (handle_v_cont): Factor out parts to ...
6189 (resume): ... this new function. If in all-stop, and a thread
6190 being resumed has a pending status, report it without actually
6191 resuming.
6192 (myresume): Adjust to use the new 'resume' function.
6193 (clear_pending_status_callback, set_pending_status_callback)
6194 (find_status_pending_thread_callback): New functions.
6195 (handle_status): Handle the case of multiple threads having
6196 interesting statuses to report. Report threads' real last signal
6197 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6198 with an interesting thread to report the status for, instead of
6199 always reporting the status of the first thread.
6200
28498c42
JB
62012014-01-01 Joel Brobecker <brobecker@adacore.com>
6202
6203 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6204 * gdbreplay.c (gdbreplay_version): Likewise.
6205
f45c82da
YZ
62062013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6207
6208 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6209 iov.iov_len with the real length in use.
6210
379a5e2d
JB
62112013-12-13 Joel Brobecker <brobecker@adacore.com>
6212
6213 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6214 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6215 for all targets that use win32-low.c.
6216 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6217 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6218
4210d83e
PA
62192013-12-13 Pedro Alves <palves@redhat.com>
6220
6221 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6222 if equal to TARGET_WAITKIND_LOADED.
6223 * win32-low.c (cached_status): New static global.
6224 (win32_wait): Add declaration.
6225 (do_initial_child_stuff): Flush all initial pending debug events
6226 up to the initial breakpoint.
6227 (win32_wait): If CACHED_STATUS was set, return that instead
6228 of doing a real wait. Remove the code resuming the execution
6229 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6230 during the initial phase. Also remove the code changing
6231 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6232 TARGET_WAITKIND_STOPPED.
6233
e7f0d979
YQ
62342013-12-11 Yao Qi <yao@codesourcery.com>
6235
6236 * notif.c (handle_notif_ack): Return 0 if no notification
6237 matches.
6238
ebcf782c
DE
62392013-11-20 Doug Evans <dje@google.com>
6240
6241 * linux-low.c (linux_set_resume_request): Fix comment.
6242
20ad9378
DE
62432013-11-20 Doug Evans <dje@google.com>
6244
6245 * linux-low.c (resume_status_pending_p): Tweak comment.
6246
a196ebeb
WT
62472013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6248
6249 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6250 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6251 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6252 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6253 (srv_amd64_regobj): Add amd64-mpx.o.
6254 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6255 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6256 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6257 * i387-fp.c (num_pl_bnd_register) Added constant.
6258 (num_pl_bnd_cfg_registers) Added constant.
6259 (struct i387_xsave) Added reserved area and MPX fields.
6260 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6261 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6262 function.
6263 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6264 (init_registers_amd64_mpx_linux): Declare new function.
6265 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6266 (x86_64_regmap): Add MPX registers.
6267 (x86_linux_read_description): Add MPX case.
6268 (initialize_low_arch): Initialize MPX targets.
6269
0080a2f6
TT
62702013-11-18 Tom Tromey <tromey@redhat.com>
6271
6272 * configure: Rebuild.
6273 * configure.ac: Don't check for stdlib.h.
6274 * gdbreplay.c: Unconditionally include stdlib.h.
6275
2978b111
TT
62762013-11-18 Tom Tromey <tromey@redhat.com>
6277
6278 * config.in: Rebuild.
6279 * configure: Rebuild.
6280 * configure.ac: Don't use AC_HEADER_DIRENT.
6281
a3d08894
TT
62822013-11-18 Tom Tromey <tromey@redhat.com>
6283
6284 * server.h: Don't check HAVE_STRING_H.
6285 * gdbreplay.c: Don't check HAVE_STRING_H.
6286 * configure: Rebuild.
6287
0a5dd17d
TT
62882013-11-18 Tom Tromey <tromey@redhat.com>
6289
6290 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6291 LIBGNU.
6292
1bd2f0ba
TT
62932013-11-08 Tom Tromey <tromey@redhat.com>
6294
6295 * configure, config.in: Rebuild.
6296 * configure.ac: Remove unused configury.
6297
3266f10b
TT
62982013-11-08 Tom Tromey <tromey@redhat.com>
6299
6300 * acinclude.m4: Include common.m4, codeset.m4.
6301 * configure, config.in: Rebuild.
6302 * configure.ac: Use GDB_AC_COMMON.
6303
6682d959
AA
63042013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6305
6306 * linux-s390-low.c (HWCAP_S390_TE): New define.
6307 (s390_arch_setup): Consider the TE field in the HWCAP for
6308 determining 'have_regset_tdb'.
6309
fd0a4d76
SDJ
63102013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6311
6312 PR gdb/16014
6313 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6314 call to sizeof.
6315
1a3d890b
PA
63162013-10-02 Pedro Alves <palves@redhat.com>
6317
6318 * server.c (process_serial_event): Don't output "GDBserver
6319 exiting" if GDB is connected through stdio.
6320 * target.c (mywait): Likewise, be silent if GDB is connected
6321 through stdio.
6322
97ad4581
JB
63232013-10-01 Joel Brobecker <brobecker@adacore.com>
6324
6325 * lynx-low.c (lynx_add_threads_after_attach): New function.
6326 (lynx_attach): Remove call to add_thread. Add call to
6327 lynx_add_threads_after_attach instead.
6328
5b4e221c
MF
63292013-09-28 Mike Frysinger <vapier@gentoo.org>
6330
6331 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6332 * config.in, configure: Regenerated.
6333
ee47b2f8
YQ
63342013-09-18 Yao Qi <yao@codesourcery.com>
6335
6336 PR server/15959
6337 * server.c (start_inferior): Clear 'resume_info'.
6338
d6707650 63392013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6340
d6707650
JW
6341 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6342 for each register.
6343
9243dd0e 63442013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6345
9243dd0e
JW
6346 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6347 linux-tile-low.o to srv_tgtobj.
6348
c623a6ef
WN
63492013-09-16 Will Newton <will.newton@linaro.org>
6350
6351 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6352 out regs.
6353
fb71d39e
PA
63542013-09-06 Pedro Alves <palves@redhat.com>
6355
6356 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6357 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6358 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6359 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6360 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6361 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6362
8e7e9910
PA
63632013-09-06 Pedro Alves <palves@redhat.com>
6364
6365 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6366 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6367
7c3a12ca
PA
63682013-09-06 Pedro Alves <palves@redhat.com>
6369
6370 * linux-amd64-ipa.c: Include tracepoint.h.
6371 * linux-i386-ipa.c: Include tracepoint.h.
6372
8eb3d7b6
RW
63732013-09-06 Ricard Wanderlof <ricardw@axis.com>
6374
6375 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6376 (ps_get_thread_area): New function.
6377
eddddb9d
RW
63782013-09-06 Ricard Wanderlof <ricardw@axis.com>
6379
6380 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6381 (initialize_low_arch): Call init_registers_crisv32 rather than
6382 init_register_crisv32.
6383
533b0600
PA
63842013-09-05 Pedro Alves <palves@redhat.com>
6385
6386 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6387 to ...
6388 * hostio.h: ... this new file.
6389 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6390 win32-low.c: Include hostio.h.
6391
0ce3d3b5
PA
63922013-09-05 Pedro Alves <palves@redhat.com>
6393
6394 * server.h (gdb_client_data, handler_func, callback_handler_func)
6395 (delete_file_handler, add_file_handler, append_callback_event)
6396 (delete_callback_event, start_event_loop, initialize_event_loop):
6397 Move to event-loop.h and include it.
6398 * event-loop.h: New file.
6399
799cdc37
PA
64002013-09-05 Pedro Alves <palves@redhat.com>
6401
6402 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6403 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6404 (loaded_dll, unloaded_dll): Move to ...
6405 * dll.h: ... this new file.
6406 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6407
6a6bbd9d
PA
64082013-09-05 Pedro Alves <palves@redhat.com>
6409
6410 * server.h (current_process, get_thread_process, all_processes)
6411 (add_inferior_to_list, for_each_inferior, current_inferior)
6412 (remove_inferior, add_process, remove_process, find_process_pid)
6413 (have_started_inferiors_p, have_attached_inferiors_p)
6414 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6415 (clear_inferiors, find_inferior, find_inferior_id)
6416 (inferior_target_data, set_inferior_target_data)
6417 (inferior_regcache_data, set_inferior_regcache_data): Move to
6418 inferiors.h, and include it.
6419 * inferiors.h: New file.
6420
f699aaba
PA
64212013-09-05 Pedro Alves <palves@redhat.com>
6422
6423 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6424 Move ...
72f4393d 6425 * ax.h: ... here.
f699aaba 6426
c144c7a0
PA
64272013-09-05 Pedro Alves <palves@redhat.com>
6428
6429 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6430 tracepoint.h.
6431 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6432 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6433 (handle_tracepoint_general_set, handle_tracepoint_query)
6434 (tracepoint_finished_step, tracepoint_was_hit)
6435 (release_while_stepping_state_list, current_traceframe)
6436 (in_readonly_region, traceframe_read_mem)
6437 (fetch_traceframe_registers, traceframe_read_sdata)
6438 (traceframe_read_info, struct fast_tpoint_collect_status)
6439 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6440 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6441 (supply_fast_tracepoint_registers)
6442 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6443 (ipa_tdesc, claim_trampoline_space)
6444 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6445 (agent_mem_read, agent_get_trace_state_variable_value)
6446 (agent_set_trace_state_variable_value, agent_tsv_read)
6447 (agent_mem_read_string, get_raw_reg_func_addr)
6448 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6449 * tracepoint.h: ... this new file.
6450
ff42e6ab
PA
64512013-09-05 Pedro Alves <palves@redhat.com>
6452
6453 * server.h (perror_with_name, error, fatal, warning, paddress)
6454 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6455 include it.
6456 * utils.h: New file.
6457
541af0f4
PA
64582013-09-05 Pedro Alves <palves@redhat.com>
6459
6460 * server.h (remote_debug, noack_mode, transport_is_reliable)
6461 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6462 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6463 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6464 (write_enn, initialize_async_io, enable_async_io)
6465 (disable_async_io, check_remote_input_interrupt_request)
6466 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6467 (dead_thread_notify, prepare_resume_reply)
6468 (decode_address_to_semicolon, decode_address, decode_m_packet)
6469 (decode_M_packet, decode_X_packet, decode_xfer_write)
6470 (decode_search_memory_packet, unhexify, hexify)
6471 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6472 (look_up_one_symbol, relocate_instruction)
6473 (monitor_output): Move to remote-utils.h, and include it.
6474 * remote-utils.h: New file.
6475
eebdf26b
PA
64762013-09-05 Pedro Alves <palves@redhat.com>
6477
6478 * server.h (_): Delete.
6479
3aafd2ff
PA
64802013-09-02 Pedro Alves <palves@redhat.com>
6481
6482 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6483 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6484 allocated.
6485 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6486
cee83bcb
PM
64872013-09-02 Pierre Muller <muller@sourceware.org>
6488
6489 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6490 or WriteProcessMemory complete successfully and handle
6491 ERROR_PARTIAL_COPY error.
6492
9a13b2fa
PA
64932013-09-02 Pedro Alves <palves@redhat.com>
6494
6495 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6496 error instead of EIO.
6497
602e3198
JK
64982013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6499
6500 PR server/15604
6501 * linux-low.c: Include filestuff.h.
6502 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6503 * lynx-low.c: Include filestuff.h.
6504 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6505 * server.c: Include filestuff.h.
6506 (main): Call notice_open_fds.
6507 * spu-low.c: Include filestuff.h.
6508 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6509
96d7229d
LM
65102013-08-22 Luis Machado <lgustavo@codesourcery.com>
6511
6512 * Makefile.in: Explain why ../target and ../nat are not
6513 listed as include file search paths.
6514 (linux-waitpid.o): New object file rule.
6515 * configure.srv (srv_native_linux_obj): New variable.
6516 Replace all occurrences of linux native object files with
6517 $srv_native_linux_obj.
6518 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6519 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6520 (linux_enable_event_reporting): Remove declaration.
6521 (my_waitpid): Moved to common/linux-waitpid.c.
6522 (linux_wait_for_event): Pass ptid when calling
6523 linux_enable_event_reporting.
6524 (linux_supports_tracefork_flag): Remove.
6525 (linux_enable_event_reporting): Likewise.
6526 (linux_tracefork_grandchild): Remove.
6527 (STACK_SIZE): Moved to common/linux-ptrace.c.
6528 (linux_tracefork_child): Remove.
6529 (linux_test_for_tracefork): Remove.
6530 (linux_look_up_symbols): Call linux_supports_traceclone.
6531 (initialize_low): Remove call to linux_test_for_tracefork.
6532 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6533 common/linux-ptrace.h.
6534 (PTRACE_TYPE_ARG4): Likewise.
6535 Include linux-ptrace.h.
6536
32940073
PA
65372013-08-21 Pedro Alves <palves@redhat.com>
6538
6539 * config.in: Renegerate.
6540
33b60d58 65412013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6542
33b60d58
LM
6543 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6544 (SFILES): Remove $(srcdir)/common/target-common.c and
6545 add $(srcdir)/target/waitstatus.c.
6546 (OBS): Remove target-common.o and add waitstatus.o.
6547 (server_h): Remove $(srcdir)/../common/target-common.h and
6548 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6549 and $(srcdir)/../target/waitstatus.h.
6550 (target-common.o): Remove.
6551 (waitstatus.o): New target object file.
6552 * target.h: Do not include target-common.h and
6553 include target/resume.h, target/wait.h and
6554 target/waitstatus.h.
6555
b8e1b30e
LM
65562013-08-13 Luis Machado <lgustavo@codesourcery.com>
6557
6558 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6559 to PTRACE_TYPE_ARG3.
6560 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6561 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6562 PTRACE_TYPE_ARG4.
6563 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6564 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6565
7a60ad40
YQ
65662013-07-27 Jie Zhang <jie@codesourcery.com>
6567 Daniel Jacobowitz <dan@codesourcery.com>
6568 Yao Qi <yao@codesourcery.com>
6569
6570 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6571 (mips-linux-watch.o): New rule.
6572 (mips_linux_watch_h): New variable.
6573 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6574 srv_tgtobj.
6575 * linux-mips-low.c: Include mips-linux-watch.h.
6576 (struct arch_process_info, struct arch_lwp_info): New.
6577 (update_watch_registers_callback): New function.
6578 (mips_linux_new_process, mips_linux_new_thread) New functions.
6579 (mips_linux_prepare_to_resume, mips_insert_point): New
6580 functions.
6581 (mips_remove_point, mips_stopped_by_watchpoint): New
6582 functions.
6583 (rsp_bp_type_to_target_hw_bp_type): New function.
6584 (mips_stopped_data_address): New function.
6585 (the_low_target): Add watchpoint support functions.
6586
de6f69ad
YQ
65872013-07-27 Yao Qi <yao@codesourcery.com>
6588
6589 * i386-low.c: Include break-common.h.
6590 (enum target_hw_bp_type): Remove.
6591
3360c0bf
LM
65922013-07-24 Luis Machado <lgustavo@codesourcery.com>
6593
6594 * Makefile.in (SFILES): /common/target-common.c.
6595 (OBS): Add target-common.o.
6596 (server_h): Add $(srcdir)/../common/target-common.h.
6597 (target-common.o): New target.
6598 * server.c (queue_stop_reply_callback): Free
6599 status string after use.
6600 * target.c (target_waitstatus_to_string): Remove.
6601 * target.h: Include target-common.h.
6602 (resume_kind): Likewise.
6603 (target_waitkind): Likewise.
6604 (target_waitstatus): Likewise.
6605 (TARGET_WNOHANG): Likewise.
6606
bd885420
YQ
66072013-07-04 Yao Qi <yao@codesourcery.com>
6608
6609 * Makefile.in (host_alias): Use @host_noncanonical@.
6610 (target_alias): Use @target_noncanonical@.
6611 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6612 ACX_NONCANONICAL_HOST.
6613 * configure: Regenerated.
6614
6615 Revert:
6616 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6617
6618 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6619 * configure: Rebuild.
6620 * Makefile.in (version_host, version_target): Get from configure.
6621 (version.c): Use $(version_host) and $(version_target).
6622
17ef446e
PA
66232013-07-03 Pedro Alves <palves@redhat.com>
6624
6625 * Makefile.in (config.status): Depend on development.sh.
6626 * acinclude.m4: Include libmcheck.m4.
6627 * configure: Regenerate.
6628
7a9a7487
MG
66292013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6630
6631 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6632 attribute inside the parentheses.
6633 (winapi_DebugSetProcessKillOnExit): Ditto.
6634 (winapi_DebugBreakProcess): Ditto.
6635 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6636
49b64de6
MG
66372013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6638
6639 * notif.h (notif_event): Add a dummy member to avoid compiler
6640 errors.
6641
d5749ee7
PA
66422013-07-01 Pedro Alves <palves@redhat.com>
6643
6644 * hostio.c (HOSTIO_PATH_MAX): Define.
6645 (require_filename, handle_open, handle_unlink, handle_readlink):
6646 Use it.
6647
d8d2a3ee
PA
66482013-07-01 Pedro Alves <palves@redhat.com>
6649
6650 * server.h: Include "pathmax.h".
6651 * linux-low.c: Don't include sys/param.h.
6652 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6653 MAXPATHLEN.
6654 * win32-low.c: Don't include sys/param.h.
6655 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6656
bc7dea8d
PA
66572013-07-01 Pedro Alves <palves@redhat.com>
6658
6659 * event-loop.c: Don't check HAVE_UNISTD_H before including
6660 <unistd.h>.
6661 * gdbreplay.c: Likewise.
6662 * remote-utils.c: Likewise.
6663 * server.c: Likewise.
6664 * configure.ac: Don't check for unistd.h.
6665 * configure: Regenerate.
6666
d6c2da54
TT
66672013-06-28 Tom Tromey <tromey@redhat.com>
6668
6669 * Makefile.in (version.c): Use version.in, not
6670 common/version.in.
6671
257b6bec
MG
66722013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6673
6674 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6675 * configure: Rebuild.
6676 * Makefile.in (version_host, version_target): Get from configure.
6677 (version.c): Use $(version_host) and $(version_target).
6678
86ebe149
DK
66792013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6680
6681 Fix trace-status to output user name without trailing colon.
6682 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6683
f30aa5af
DK
66842013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6685
6686 Fix trace-status to output proper start-time and stop-time.
6687 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6688 output start time and stop time in hex as gdb expects.
6689
28a93511
YQ
66902013-06-26 Pedro Alves <pedro@codesourcery.com>
6691
6692 * tracepoint.c (build_traceframe_info_xml): Output trace state
6693 variables present in the trace buffer.
6694
01208463
TT
66952013-06-24 Tom Tromey <tromey@redhat.com>
6696
6697 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6698 create-version.sh.
6699 (version.o): Remove.
6700 * gdbreplay.c: Include version.h.
6701 (version, host_name): Don't declare.
6702 * server.h: Include version.h.
6703 (version, host_name): Don't declare.
6704
760256f9
PA
67052013-06-12 Pedro Alves <palves@redhat.com>
6706
6707 * linux-x86-low.c (linux_is_elf64): Delete global.
6708 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6709 with local linux_pid_exe_is_elf_64_file use.
6710
030031ee
PA
67112013-06-11 Pedro Alves <palves@redhat.com>
6712
6713 * linux-low.c (regset_disabled, disable_regset): New functions.
6714 (regsets_fetch_inferior_registers)
6715 (regsets_store_inferior_registers): Use them.
6716 (initialize_regsets_info); Don't allocate the disabled_regsets
6717 array here.
6718 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6719 comment.
6720
5da6eb0a
PA
67212013-06-11 Pedro Alves <palves@redhat.com>
6722
6723 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6724 xmalloc.
6725
7e5aaa09
PA
67262013-06-11 Pedro Alves <palves@redhat.com>
6727
6728 * linux-x86-low.c (initialize_low_arch): Call
6729 init_registers_x32_avx_linux.
6730
d878444c
JK
67312013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6732
6733 Fix compatibility with Android Bionic.
6734 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6735 it is not empty.
6736
3aee8918
PA
67372013-06-07 Pedro Alves <palves@redhat.com>
6738
5f2b57b5 6739 PR server/14823
3aee8918
PA
6740 * Makefile.in (OBS): Add tdesc.o.
6741 (IPA_OBJS): Add tdesc-ipa.o.
6742 (tdesc-ipa.o): New rule.
6743 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6744 interface.
6745 * linux-low.c (new_inferior): Delete.
6746 (disabled_regsets, num_regsets): Delete.
6747 (linux_add_process): Adjust to set the new per-process
6748 new_inferior flag.
6749 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6750 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6751 was a stop. When calling arch_setup, switch the current inferior
6752 to the thread that got an event.
6753 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6754 (regsets_fetch_inferior_registers)
6755 (regsets_store_inferior_registers): New regsets_info parameter.
6756 Adjust to use it.
6757 (linux_register_in_regsets): New regs_info parameter. Adjust to
6758 use it.
6759 (register_addr, fetch_register, store_register): New usrregs_info
6760 parameter. Adjust to use it.
6761 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6762 parameter regs_info. Adjust to use it.
6763 (linux_fetch_registers): Get the current inferior's regs_info, and
6764 adjust to use it.
6765 (linux_store_registers): Ditto.
6766 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6767 (initialize_low): Don't initialize the target_regsets here. Call
6768 initialize_low_arch.
6769 * linux-low.h (target_regsets): Delete declaration.
6770 (struct regsets_info): New.
6771 (struct usrregs_info): New.
6772 (struct regs_info): New.
6773 (struct process_info_private) <new_inferior>: New field.
6774 (struct linux_target_ops): Delete the num_regs, regmap, and
6775 regset_bitmap fields. New field regs_info.
6776 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6777 * i387-fp.c (num_xmm_registers): Delete.
6778 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6779 calls to new interface.
6780 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6781 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6782 Infer the number of xmm registers from the regcache's target
6783 description.
6784 * i387-fp.h (num_xmm_registers): Delete.
6785 * inferiors.c (add_thread): Don't install the thread's regcache
6786 here.
6787 * proc-service.c (gregset_info): Fetch the current inferior's
6788 regs_info. Adjust to use it.
6789 * regcache.c: Include tdesc.h.
6790 (register_bytes, reg_defs, num_registers)
6791 (gdbserver_expedite_regs): Delete.
6792 (get_thread_regcache): If the thread doesn't have a regcache yet,
6793 create one, instead of aborting gdbserver.
6794 (regcache_invalidate_one): Rename to ...
6795 (regcache_invalidate_thread): ... this.
6796 (regcache_invalidate_one): New.
6797 (regcache_invalidate): Only invalidate registers of the current
6798 process.
6799 (init_register_cache): Add target_desc parameter, and use it.
6800 (new_register_cache): Ditto. Assert the target description has a
6801 non zero registers_size.
6802 (regcache_cpy): Add assertions. Adjust.
6803 (realloc_register_cache, set_register_cache): Delete.
6804 (registers_to_string, registers_from_string): Adjust.
6805 (find_register_by_name, find_regno, find_register_by_number)
6806 (register_cache_size): Add target_desc parameter, and use it.
6807 (free_register_cache_thread, free_register_cache_thread_one)
6808 (regcache_release, register_cache_size): New.
6809 (register_size): Add target_desc parameter, and use it.
6810 (register_data, supply_register, supply_register_zeroed)
6811 (supply_regblock, supply_register_by_name, collect_register)
6812 (collect_register_as_string, collect_register_by_name): Adjust.
6813 * regcache.h (struct target_desc): Forward declare.
6814 (struct regcache) <tdesc>: New field.
6815 (init_register_cache, new_register_cache): Add target_desc
6816 parameter.
6817 (regcache_invalidate_thread): Declare.
6818 (regcache_invalidate_one): Delete declaration.
6819 (regcache_release): Declare.
6820 (find_register_by_number, register_cache_size, register_size)
6821 (find_regno): Add target_desc parameter.
6822 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6823 declarations.
6824 * remote-utils.c: Include tdesc.h.
6825 (outreg, prepare_resume_reply): Adjust.
6826 * server.c: Include tdesc.h.
6827 (gdbserver_xmltarget): Delete declaration.
6828 (get_features_xml, process_serial_event): Adjust.
6829 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6830 declare.
6831 (struct process_info) <tdesc>: New field.
6832 (ipa_tdesc): Declare.
6833 * tdesc.c: New file.
6834 * tdesc.h: New file.
6835 * tracepoint.c: Include tdesc.h.
6836 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6837 (get_context_regcache): Adjust to pass ipa_tdesc down.
6838 (do_action_at_tracepoint): Adjust to get the register cache size
6839 from the context regcache's description.
6840 (traceframe_walk_blocks): Adjust to get the register cache size
6841 from the current trace frame's description.
6842 (traceframe_get_pc): Adjust to get current trace frame's
6843 description and pass it down.
6844 (gdb_collect): Adjust to get the register cache size from the
6845 IPA's description.
6846 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6847 (gdbserver_xmltarget): Delete.
6848 (initialize_low_tracepoint): Set the ipa's target description.
6849 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6850 (initialize_low_tracepoint): Set the ipa's target description.
6851 * linux-x86-low.c: Include tdesc.h.
6852 [__x86_64__] (is_64bit_tdesc): New.
6853 (ps_get_thread_area, x86_get_thread_area): Use it.
6854 (i386_cannot_store_register): Rename to ...
6855 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6856 (i386_cannot_fetch_register): Rename to ...
6857 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6858 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6859 to new interface.
6860 (target_regsets): Rename to ...
6861 (x86_regsets): ... this.
6862 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6863 interface.
6864 (x86_siginfo_fixup): Use is_64bit_tdesc.
6865 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6866 (tdesc_x32_avx_linux, tdesc_x32_linux)
6867 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6868 Declare.
6869 (x86_linux_update_xmltarget): Delete.
6870 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6871 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6872 (AMD64_LINUX_USER64_CS): New.
6873 (x86_linux_read_description): New, based on
6874 x86_linux_update_xmltarget.
6875 (same_process_callback): New.
6876 (x86_arch_setup_process_callback): New.
6877 (x86_linux_update_xmltarget): New.
6878 (x86_regsets_info): New.
6879 (amd64_linux_regs_info): New.
6880 (i386_linux_usrregs_info): New.
6881 (i386_linux_regs_info): New.
6882 (x86_linux_regs_info): New.
6883 (x86_arch_setup): Reimplement.
6884 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6885 (x86_emit_ops): Ditto.
6886 (the_low_target): Adjust. Install x86_linux_regs_info,
6887 x86_cannot_fetch_register, and x86_cannot_store_register.
6888 (initialize_low_arch): New.
6889 * linux-ia64-low.c (tdesc_ia64): Declare.
6890 (ia64_fetch_register): Adjust.
6891 (ia64_usrregs_info, regs_info): New globals.
6892 (ia64_regs_info): New function.
6893 (the_low_target): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-sparc-low.c (tdesc_sparc64): Declare.
6896 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6897 Adjust.
6898 (sparc_arch_setup): New function.
6899 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6900 (the_low_target): Adjust.
6901 (initialize_low_arch): New function.
6902 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6903 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6904 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6905 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6906 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6907 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6908 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6909 (tdesc_powerpc_isa205_vsx64l): Declare.
6910 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6911 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6912 (ppc_set_pc, ppc_get_hwcap): Adjust.
6913 (ppc_usrregs_info): Forward declare.
6914 (!__powerpc64__) ppc_regmap_adjusted: New global.
6915 (ppc_arch_setup): Adjust to the current process'es target
6916 description.
6917 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6918 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6919 (ppc_store_evrregset): Adjust.
6920 (target_regsets): Rename to ...
6921 (ppc_regsets): ... this, and make static.
6922 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6923 (ppc_regs_info): New function.
6924 (the_low_target): Adjust.
6925 (initialize_low_arch): New function.
6926 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6927 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6928 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6929 (tdesc_s390x_linux64v2): Declare.
6930 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6931 (s390_fill_gregset, s390_store_last_break): Adjust.
6932 (target_regsets): Rename to ...
6933 (s390_regsets): ... this, and make static.
6934 (s390_get_pc, s390_set_pc): Adjust.
6935 (s390_get_hwcap): New target_desc parameter, and use it.
6936 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6937 (s390_arch_setup): Adjust to set the current process'es target
6938 description. Don't adjust the regmap.
6939 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6940 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6941 (regs_info_3264): New globals.
6942 (s390_regs_info): New function.
6943 (the_low_target): Adjust.
6944 (initialize_low_arch): New function.
6945 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6946 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6947 [__mips64] (init_registers_mips_linux)
6948 (init_registers_mips_dsp_linux): Delete defines.
6949 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6950 (have_dsp): New global.
6951 (mips_read_description): New, based on mips_arch_setup.
6952 (mips_arch_setup): Reimplement.
6953 (get_usrregs_info): New function.
6954 (mips_cannot_fetch_register, mips_cannot_store_register)
6955 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6956 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6957 (target_regsets): Rename to ...
6958 (mips_regsets): ... this, and make static.
6959 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6960 (dsp_regs_info, regs_info): New globals.
6961 (mips_regs_info): New function.
6962 (the_low_target): Adjust.
6963 (initialize_low_arch): New function.
6964 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6965 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6966 Declare.
6967 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6968 (arm_read_description): New, with bits factored from
6969 arm_arch_setup.
6970 (arm_arch_setup): Reimplement.
6971 (target_regsets): Rename to ...
6972 (arm_regsets): ... this, and make static.
6973 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6974 (arm_regs_info): New function.
6975 (the_low_target): Adjust.
6976 (initialize_low_arch): New function.
6977 * linux-m68k-low.c (tdesc_m68k): Declare.
6978 (target_regsets): Rename to ...
6979 (m68k_regsets): ... this, and make static.
6980 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6981 (m68k_regs_info): New function.
6982 (m68k_arch_setup): New function.
6983 (the_low_target): Adjust.
6984 (initialize_low_arch): New function.
6985 * linux-sh-low.c (tdesc_sharch): Declare.
6986 (target_regsets): Rename to ...
6987 (sh_regsets): ... this, and make static.
6988 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6989 (sh_regs_info, sh_arch_setup): New functions.
6990 (the_low_target): Adjust.
6991 (initialize_low_arch): New function.
6992 * linux-bfin-low.c (tdesc_bfin): Declare.
6993 (bfin_arch_setup): New function.
6994 (bfin_usrregs_info, regs_info): New globals.
6995 (bfin_regs_info): New function.
6996 (the_low_target): Adjust.
6997 (initialize_low_arch): New function.
6998 * linux-cris-low.c (tdesc_cris): Declare.
6999 (cris_arch_setup): New function.
7000 (cris_usrregs_info, regs_info): New globals.
7001 (cris_regs_info): New function.
7002 (the_low_target): Adjust.
7003 (initialize_low_arch): New function.
7004 * linux-cris-low.c (tdesc_crisv32): Declare.
7005 (cris_arch_setup): New function.
7006 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7007 (cris_regs_info): New function.
7008 (the_low_target): Adjust.
7009 (initialize_low_arch): New function.
7010 * linux-m32r-low.c (tdesc_m32r): Declare.
7011 (m32r_arch_setup): New function.
7012 (m32r_usrregs_info, regs_info): New globals.
7013 (m32r_regs_info): Adjust.
7014 (initialize_low_arch): New function.
7015 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7016 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7017 (tic6x_usrregs_info): Forward declare.
7018 (tic6x_read_description): New function, based on ...
7019 (tic6x_arch_setup): ... this. Reimplement.
7020 (target_regsets): Rename to ...
7021 (tic6x_regsets): ... this, and make static.
7022 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7023 (tic6x_regs_info): New function.
7024 (the_low_target): Adjust.
7025 (initialize_low_arch): New function.
7026 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7027 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7028 (target_regsets): Rename to ...
7029 (xtensa_regsets): ... this, and make static.
7030 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7031 globals.
7032 (xtensa_arch_setup, xtensa_regs_info): New functions.
7033 (the_low_target): Adjust.
7034 (initialize_low_arch): New function.
7035 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7036 (nios2_arch_setup): Set the current process'es tdesc.
7037 (target_regsets): Rename to ...
7038 (nios2_regsets): ... this.
7039 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7040 (nios2_regs_info): New function.
7041 (the_low_target): Adjust.
7042 (initialize_low_arch): New function.
a261b8f5
PA
7043 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7044 (aarch64_arch_setup): Set the current process'es tdesc.
7045 (target_regsets): Rename to ...
7046 (aarch64_regsets): ... this.
7047 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7048 (aarch64_regs_info): New function.
7049 (the_low_target): Adjust.
7050 (initialize_low_arch): New function.
3aee8918
PA
7051 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7052 globals.
7053 (target_regsets): Rename to ...
7054 (tile_regsets): ... this.
7055 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7056 (tile_regs_info): New function.
7057 (tile_arch_setup): Set the current process'es tdesc.
7058 (the_low_target): Adjust.
7059 (initialize_low_arch): New function.
7060 * spu-low.c (tdesc_spu): Declare.
7061 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7062 * win32-arm-low.c (tdesc_arm): Declare.
7063 (arm_arch_setup): New function.
7064 (the_low_target): Install arm_arch_setup instead of
7065 init_registers_arm.
7066 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7067 (init_windows_x86): Rename to ...
7068 (i386_arch_setup): ... this. Set `win32_tdesc'.
7069 (the_low_target): Adjust.
7070 * win32-low.c (win32_tdesc): New global.
7071 (child_add_thread): Don't create the thread cache here.
7072 (do_initial_child_stuff): Set the new process'es tdesc.
7073 * win32-low.h (struct target_desc): Forward declare.
7074 (win32_tdesc): Declare.
7075 * lynx-i386-low.c (tdesc_i386): Declare global.
7076 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7077 * lynx-low.c (lynx_tdesc): New global.
7078 (lynx_add_process): Set the new process'es tdesc.
7079 * lynx-low.h (struct target_desc): Forward declare.
7080 (lynx_tdesc): Declare global.
7081 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7082 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7083 * nto-low.c (nto_tdesc): New global.
7084 (do_attach): Set the new process'es tdesc.
7085 * nto-low.h (struct target_desc): Forward declare.
7086 (nto_tdesc): Declare.
7087 * nto-x86-low.c (tdesc_i386): Declare.
7088 (nto_x86_arch_setup): Set `nto_tdesc'.
7089
b1fbec62
GB
70902013-06-04 Gary Benson <gbenson@redhat.com>
7091
7092 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7093 to qSupported response when appropriate.
7094 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7095 with nonzero-length annex.
7096 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7097 arguments supplied in annex.
7098
d1ec4ce7
DE
70992013-05-31 Doug Evans <dje@google.com>
7100
ac44adcb 7101 PR server/15594
d1ec4ce7
DE
7102 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7103 64 bits in 64-cross-32 environment.
7104
9b25f2d3
PA
71052013-05-28 Pedro Alves <palves@redhat.com>
7106
7107 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7108 (aarch64-without-fpu.c): Delete rule.
7109 * configure.srv (aarch64*-*-linux*): Remove references to
7110 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7111 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7112 declaration.
7113
6740dc9c
PA
71142013-05-24 Pedro Alves <palves@redhat.com>
7115
7116 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7117 instead of strchr/decode_address. Error if the range isn't split
7118 with a ','. Don't assume there's be a ':' in the action.
7119
c2d6af84
PA
71202013-05-23 Yao Qi <yao@codesourcery.com>
7121 Pedro Alves <palves@redhat.com>
7122
7123 * linux-low.c (lwp_in_step_range): New function.
7124 (linux_wait_1): If the thread was range stepping and stopped
7125 outside the stepping range, report the stop to GDB. Otherwise,
7126 continue stepping. Add range stepping debug output.
7127 (linux_set_resume_request): Copy the step range from the resume
7128 request to the lwp.
7129 (linux_supports_range_stepping): New.
7130 (linux_target_ops) <supports_range_stepping>: Set to
7131 linux_supports_range_stepping.
7132 * linux-low.h (struct linux_target_ops)
7133 <supports_range_stepping>: New field.
7134 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7135 * linux-x86-low.c (x86_supports_range_stepping): New.
7136 (the_low_target) <supports_range_stepping>: Set to
7137 x86_supports_range_stepping.
7138 * server.c (handle_v_cont): Handle 'r' action.
7139 (handle_v_requests): Append ";r" if the target supports range
7140 stepping.
7141 * target.h (struct thread_resume) <step_range_start,
7142 step_range_end>: New fields.
7143 (struct target_ops) <supports_range_stepping>:
7144 New field.
7145 (target_supports_range_stepping): New macro.
7146
58794e1a
JB
71472013-05-17 Joel Brobecker <brobecker@adacore.com>
7148
7149 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7150 confusion in comment.
7151
d631c5a7
JB
71522013-05-17 Joel Brobecker <brobecker@adacore.com>
7153
7154 * lynx-low.c (struct process_info_private): New type.
7155 (lynx_add_process): New function.
7156 (lynx_create_inferior, lynx_attach): Replace calls to
7157 add_process by calls to lynx_add_process.
7158 (lynx_resume): If PTID is null, then try using
7159 current_process()->private->last_wait_event_ptid.
7160 Add comments.
7161 (lynx_clear_inferiors): Delete. The contents of that function
7162 has been inlined in lynx_mourn;
7163 (lynx_wait_1): Save the ptid in the process's private data.
7164 (lynx_mourn): Free the process' private data. Replace call
7165 to lynx_clear_inferiors by call to clear_inferiors.
7166
96f7a20f
YQ
71672013-05-17 Yao Qi <yao@codesourcery.com>
7168
7169 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7170 the right place.
7171
db0dfaa0
LM
71722013-05-16 Luis Machado <lgustavo@codesourcery.com>
7173
7174 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7175 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7176 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7177 PT_TEXT_END_ADDR guards. Update comments.
7178 (linux_target_op) <read_offsets>: Conditionally define to
7179 linux_read_offsets if the target is UCLIBC and if it defines
7180 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7181
68f5f838
SL
71822013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7183 Andrew Jenner <andrew@codesourcery.com>
7184
7185 * Makefile.in (SFILES): Add linux-nios2-low.c.
7186 (clean): Add action to delete nios2-linux.c.
7187 (nios2-linux.c): New rule.
7188 * configure.srv: Add nios2*-*-linux*.
7189 * linux-nios2-low.c: New.
7190
1ebff1fd
HAQ
71912013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7192
7193 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7194
f6150862
HZ
71952013-04-25 Hui Zhu <hui@codesourcery.com>
7196
7197 PR gdb/15186
f6150862
HZ
7198 * ax.c (ax_printf): Add fflush.
7199
614c279d
TT
72002013-04-22 Tom Tromey <tromey@redhat.com>
7201
7202 * Makefile.in (SFILES): Add filestuff.c.
7203 (OBS): Add filestuff.o.
7204 (filestuff.o): New target.
7205 * config.in, configure: Rebuild.
7206 * configure.ac: Check for fdwalk, pipe2.
7207
7d4e5717
PA
72082013-04-17 Pedro Alves <palves@redhat.com>
7209
7210 * configure.ac (USE_THREAD_DB): Delete variable.
7211 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7212 Don't AC_SUBST USE_THREAD_DB.
7213 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7214 * config.in, configure: Regenerate.
7215
d5c93e41
PA
72162013-04-16 Pedro Alves <palves@redhat.com>
7217
7218 * linux-low.h (struct lwp_info) <thread_known>: Move under
7219 the USE_THREAD_DB #ifdef.
7220
04f5fe89
PA
72212013-04-16 Pedro Alves <palves@redhat.com>
7222
7223 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7224 (linux-low.o): Delete rule.
7225 * linux-low.h: Always include "gdb_thread_db.h" instead of
7226 conditionally including thread_db.h.
7227 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7228 HAVE_THREAD_DB_H.
7229
480b27bf
JK
72302013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7231
7232 * Makefile.in (install-only): Fix make install regression.
7233
43662968
JK
72342013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7235
7236 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7237 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7238 installation.
7239 * gdbserver.1: Remove.
7240
3e74e146
PA
72412013-03-22 Pedro Alves <palves@redhat.com>
7242
7243 * linux-low.c (handle_extended_wait): Don't call
7244 linux_enable_event_reporting.
7245
a8347a2a
TT
72462013-03-15 Tony Theodore <tonyt@logyst.com>
7247
7248 PR build/9098:
7249 * Makefile.in (SHELL): Use @SHELL@.
7250
eeb56fa7
SDJ
72512013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7252
7253 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7254 compiler warning.
7255
4fa7e2ff
JB
72562013-03-13 Joel Brobecker <brobecker@adacore.com>
7257
7258 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7259 Remove extraneous NULL element.
7260
8ddb1965
YQ
72612013-03-13 Yao Qi <yao@codesourcery.com>
7262
7263 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7264 'V' block in trace frame.
7265
9accd112
MM
72662013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7267
7268 * target.h (struct target_ops): Add btrace ops.
7269 (target_supports_btrace): New macro.
7270 (target_enable_btrace): New macro.
7271 (target_disable_btrace): New macro.
7272 (target_read_btrace): New macro.
7273 * gdbthread.h (struct thread_info): Add btrace field.
7274 * server.c: Include btrace-common.h.
7275 (handle_btrace_general_set): New function.
7276 (handle_btrace_enable): New function.
7277 (handle_btrace_disable): New function.
7278 (handle_general_set): Call handle_btrace_general_set.
7279 (handle_qxfer_btrace): New function.
7280 (struct qxfer qxfer_packets[]): Add btrace entry.
7281 * inferiors.c (remove_thread): Disable btrace.
7282 * linux-low: Include linux-btrace.h.
7283 (linux_low_enable_btrace): New function.
7284 (linux_low_read_btrace): New function.
7285 (linux_target_ops): Add btrace ops.
7286 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7287 Add srv_linux_btrace=yes.
7288 (x86_64-*-linux*): Add linux-btrace.o.
7289 Add srv_linux_btrace=yes.
7290 * configure.ac: Define HAVE_LINUX_BTRACE.
7291 * config.in: Regenerated.
7292 * configure: Regenerated.
7293
5cc22e4c
MM
72942013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7295
7296 * server.c (handle_qxfer): Preserve error message if -3 is
7297 returned.
7298 (qxfer): Document the -3 return value.
7299
7c97f91e
MM
73002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7301
7302 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7303 (linux_btrace_h): New variable.
7304 (linux-btrace.o): New rule.
7305
be9a119c 73062013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7307 Hafiz Abid Qadeer <abidh@codesourcery.com>
7308
7309 * tracepoint.c (trace_buffer_size): New global.
7310 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7311 (init_trace_buffer): Change to one-argument function. Allocate
7312 trace buffer memory.
7313 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7314 handle QTBuffer:size packet.
7315 (cmd_bigqtbuffer_size): New function.
7316 (initialize_tracepoint): Call init_trace_buffer with
7317 DEFAULT_TRACE_BUFFER_SIZE.
7318 * server.c (handle_query): Add QTBuffer:size in the
7319 supported packets.
7320
e64f7499
YQ
73212013-03-07 Yao Qi <yao@codesourcery.com>
7322
7323 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7324 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7325 of -1.
7326 (cmd_qtsp): Adjust condition. Do post increment.
7327 Set cur_action and cur_step_action back to 0.
7328
f0ae6fc3
PA
73292013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7330
7331 PR server/15236
7332 * linux-low.c (linux_write_memory): Return early success if LEN is
7333 zero.
7334
b5b0b0af
CV
73352013-03-05 Corinna Vinschen <vinschen@redhat.de>
7336
334ad4a8 7337 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7338
589bc927
TT
73392013-02-28 Tom Tromey <tromey@redhat.com>
7340
7341 * configure.ac: Invoke AC_SYS_LARGEFILE.
7342 * configure, config.in: Rebuild.
7343
dfe07582
CV
73442013-02-28 Corinna Vinschen <vinschen@redhat.com>
7345
7346 * win32-low.c: Throughout, fix format strings and casts of
7347 printf-like functions to avoid type related warnings on all
7348 platforms.
7349 (get_child_debug_event): Print dwDebugEventCode as hex since
7350 that's how it's usually documented.
7351
736cd585
YQ
73522013-02-28 Yao Qi <yao@codesourcery.com>
7353
7354 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7355 pulongest.
7356
e1f58301
JW
73572013-02-27 Jiong Wang <jiwang@tilera.com>
7358
7359 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7360 (reg-tilegx32.c): New rule.
7361 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7362 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7363 different register info initializer according to elf class.
7364 (init_registers_tilgx32): New function. The tilegx32 register info
7365 initializer.
7366 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7367 (tile_store_gregset): Likewise.
7368
d171ca78
YQ
73692013-02-27 Yao Qi <yao@codesourcery.com>
7370
7371 * server.c (process_point_options): Print debug message when
7372 debug_threads is true.
7373
282bbdf3
YQ
73742013-02-26 Yao Qi <yao@codesourcery.com>
7375
7376 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7377
aca22551
PA
73782013-02-19 Pedro Alves <palves@redhat.com>
7379 Kai Tietz <ktietz@redhat.com>
7380
7381 PR gdb/15161
7382
7383 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7384 instead of strtoul to extract address from packet.
7385 (process_serial_event) <'z'>: Likewise.
7386
4f3cee1c
YQ
73872013-02-18 Yao Qi <yao@codesourcery.com>
7388
7389 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7390
8e1d55a3
PA
73912013-02-14 Pedro Alves <palves@redhat.com>
7392
7393 Plug memory leak.
7394
7395 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7396 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7397
458820da
PA
73982013-02-14 Pedro Alves <palves@redhat.com>
7399
7400 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7401
baea0dae
PA
74022013-02-14 Pedro Alves <palves@redhat.com>
7403
7404 * tracepoint.c (save_string): Delete.
7405 (add_tracepoint_action): Use savestring instead of save_string.
7406
0b1afbb3
PA
74072013-02-12 Pedro Alves <palves@redhat.com>
7408
7409 * linux-xtensa-low.c: Ditto.
7410 * xtensa-xtregs.c: Ditto.
7411
8a4ac37e
PA
74122013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7413
7414 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7415 thread_db.
7416
148de6bb
MS
74172013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7418
7419 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7420 aarch64_num_wp_regs and aarch64_num_bp_regs to
7421 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7422
55fac6e0
MS
74232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7424
7425 * linux-aarch64-low.c (ps_get_thread_area): Replace
7426 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7427
176eb98c
MS
74282013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7429 Marcus Shawcroft <marcus.shawcroft@arm.com>
7430 Nigel Stephens <nigel.stephens@arm.com>
7431 Yufeng Zhang <yufeng.zhang@arm.com>
7432
7433 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7434 (aarch64.c, aarch64-without-fpu.c): New targets.
7435 * configure.srv (aarch64*-*-linux*): New.
7436 * linux-aarch64-low.c: New file.
7437
56f7af9c
MS
74382013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7439
43aaf8b6 7440 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7441 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7442 (dequeue_one_deferred_signal, linux_resume_one_thread)
7443 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7444 (linux_tracefork_grandchild, linux_test_for_tracefork)
7445 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7446 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7447 where the argument is 0.
7448
60f662b0
YQ
74492013-01-25 Yao Qi <yao@codesourcery.com>
7450
7451 * event-loop.c: Include "queue.h".
7452 (gdb_event_p): New typedef.
7453 (struct gdb_event) <next_event>: Remove.
7454 (event_queue): Change to QUEUE(gdb_event_p).
7455 (async_queue_event): Remove.
7456 (gdb_event_xfree): New.
7457 (initialize_event_loop): New.
7458 (process_event): Use API from QUEUE.
7459 (wait_for_event): Likewise.
7460 * server.c (main): Call initialize_event_loop.
7461 * server.h (initialize_event_loop): Declare.
7462
5ae4861a
YQ
74632013-01-18 Yao Qi <yao@codesourcery.com>
7464
7465 * ax.h (struct eval_agent_expr_context): New.
7466 (gdb_eval_agent_expr): Update declaration.
7467 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7468 TFRAME. Add new argument CTX.
7469 * server.h (struct eval_agent_expr_context): Declare.
7470 (agent_mem_read, agent_tsv_read): Update declaration.
7471 (agent_mem_read_string): Likewise.
7472 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7473 (add_traceframe_block): Add new argument TPOINT.
7474 Increase TPOINT->traceframe_usage.
7475 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7476 eval_tracepoint_agent_expr.
7477 (condition_true_at_tracepoint): Likewise.
7478 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7479 (agent_mem_read_string, agent_tsv_read): Likewise.
7480
85e00e85
YQ
74812013-01-16 Yao Qi <yao@codesourcery.com>
7482
7483 * linux-low.c (linux_resume_one_lwp): Don't check
7484 'lwp->bp_reinsert != 0'.
7485
4039cf45
JB
74862013-01-07 Joel Brobecker <brobecker@adacore.com>
7487 Pedro Alves <palves@redhat.com>
7488
7489 * lynx-low.c (ptrace_request_to_str): Define a temporary
7490 macro and use it to simplify this function's implementation.
7491
9044dee2
JB
74922013-01-07 Joel Brobecker <brobecker@adacore.com>
7493
7494 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7495 sets errno.
7496
e6352c8f
JB
74972013-01-07 Joel Brobecker <brobecker@adacore.com>
7498
7499 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7500
50681a27
JB
75012013-01-07 Joel Brobecker <brobecker@adacore.com>
7502
7503 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7504
3f6e77ef
JB
75052013-01-07 Joel Brobecker <brobecker@adacore.com>
7506
7507 * lynx-low.c (lynx_resume): Use the resume_info parameter
7508 to determine the ptid for the lynx_ptrace call, unless
7509 it is equal to minus_one_ptid, in which case we use the
7510 ptid of the current_inferior.
7511 (lynx_wait_1): After having received a thread create/exit
7512 event, resume the inferior's execution using the signaling
7513 thread's ptid, rather than the old ptid.
7514
7fda33ae
JB
75152013-01-07 Joel Brobecker <brobecker@adacore.com>
7516
7517 * lynx-low.c (lynx_resume): Delete variable ret.
7518
b9786c74
JB
75192013-01-01 Joel Brobecker <brobecker@adacore.com>
7520
7521 * gdbreplay.c (gdbreplay_version): Update copyright year.
7522 * server.c (gdbserver_version): Likewise.
7523
8b93d60f
JB
75242012-12-17 Joel Brobecker <brobecker@adacore.com>
7525
7526 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7527 new thread.
7528
037335a7
JB
75292012-12-17 Joel Brobecker <brobecker@adacore.com>
7530
7531 * lynx-low.c (ptrace_request_to_str): Add handling for
7532 PTRACE_GETTRACESIG.
7533
52d4cbd8
JB
75342012-12-17 Joel Brobecker <brobecker@adacore.com>
7535
7536 * lynx-low.c (lynx_attach): Delete variable new_process.
7537
ab8f6ca9
JB
75382012-12-17 Joel Brobecker <brobecker@adacore.com>
7539
7540 * lynx-low.c (lynx_create_inferior): Delete variable
7541 new_process.
7542
78cbc024
JB
75432012-12-17 Joel Brobecker <brobecker@adacore.com>
7544
7545 * lynx-low.c (ptrace_request_to_str): Do not handle
7546 PTRACE_GETTHREADLIST if this macro does not exist.
7547
14a00470
YQ
75482012-12-15 Yao Qi <yao@codesourcery.com>
7549
7550 * Makefile.in (OBS): Add notif.o.
7551 * notif.c, notif.h: New.
7552 * server.c: Include "notif.h".
7553 (struct vstop_notif) <next>: Remove.
7554 <base>: New field.
7555 (queue_stop_reply): Update.
7556 (push_event, send_next_stop_reply): Remove.
7557 (discard_queued_stop_replies): Update.
7558 (notif_stop): New variable.
7559 (handle_v_stopped): Remove.
7560 (handle_v_requests): Don't call handle_v_stopped. Call
7561 handle_ack_notif instead.
7562 (queue_stop_reply_callback): Call notif_event_enque instead
7563 of queue_stop_reply.
7564 (handle_status): Don't call send_next_stop_reply, call
7565 notif_write_event instead.
7566 (kill_inferior_callback): Likewise.
7567 (detach_or_kill_inferior_callback): Likewise.
7568 (main): Call initialize_notif.
7569 (process_serial_event): Call QUEUE_is_empty.
7570 (handle_target_event): Call notif_push instead of push event.
7571 * server.h (push_event): Remove declaration.
7572
61c125b9
TT
75732012-12-10 Tom Tromey <tromey@redhat.com>
7574
7575 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7576 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7577 macros.
7578 (.c.o): Rewrite.
7579 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7580 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7581 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7582 (amd64-linux-ipa.o, ax.o): Rewrite.
7583 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7584 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7585 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7586 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7587 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7588 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7589 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7590 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7591 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7592 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7593 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7594 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7595 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7596 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7597 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7598 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7599 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7600 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7601 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7602 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7603 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7604 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7605 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7606 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7607 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7608 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7609 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7610 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7611 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7612 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7613 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7614 (reg-tilegx.o): Remove.
7615 (all_object_files): New macro.
7616 Include .deps files.
7617 * aclocal.m4, configure: Rebuild.
7618 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7619 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7620 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7621
e90e9ad9
TT
76222012-12-05 Tom Tromey <tromey@redhat.com>
7623
7624 PR gdb/14917:
7625 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7626
02d403bf 76272012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7628
7629 * configure.ac: Check for linux/perf_event.h.
7630 * config.in: Regenerated.
7631 * configure: Regenerated.
7632
0270a750
PA
76332012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7634
7635 * hostio.c (handle_readlink): Decrease buffer size
7636 parameter passed to readlink by one byte.
7637
8c29b58e
YQ
76382012-11-26 Yao Qi <yao@codesourcery.com>
7639
7640 * configure.ac (build_warnings): Append '-Wempty-body'.
7641 * configure: Regenerated.
7642 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7643 body.
7644
8bdce1ff
PM
76452012-11-15 Pierre Muller <muller@sourceware.org>
7646
7647 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7648 * config.in: Regenerate.
7649 * configure: Regenerate.
7650 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7651 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7652 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7653 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7654 header.
7655 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7656 instead of <sys/wait.h> header.
7657 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7658
02d403bf 76592012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7660
7661 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7662 (various make rules): Remove -DGDBSERVER
7663
fbd5db48
YQ
76642012-11-09 Yao Qi <yao@codesourcery.com>
7665
7666 * spu-low.c (current_ptid): Move it to ..
7667 * gdbthread.h: ... here. New.
7668 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7669 * server.c (myresume, process_serial_event): Likewise.
7670 * thread-db.c (thread_db_find_new_threads): Likewise.
7671 * tracepoint.c (run_inferior_command): Likewise.
7672
b3dc46ff
AB
76732012-10-01 Andrew Burgess <aburgess@broadcom.com>
7674
7675 * server.c (handle_search_memory_1): Include access length in
7676 warning message.
7677
07c04788
HPN
76782012-09-05 Michael Brandt <michael.brandt@axis.com>
7679
7680 * linux-crisv32-low.c: Fix compile errors.
7681
918d227b
YQ
76822012-09-04 Yao Qi <yao@codesourcery.com>
7683
7684 * tracepoint.c (cmd_qtsv): Adjust debug message.
7685 Don't check CUR_TPOINT.
7686
18c1b81a
YQ
76872012-08-28 Yao Qi <yao@codesourcery.com>
7688
7689 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7690 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7691 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7692 Remove declarations of xmalloc, xreallloc, xstrdup and
7693 freeargv.
7694 * Makefile.in (libiberty_h): New.
7695 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7696 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7697
dc82f37b
YQ
76982012-08-23 Yao Qi <yao@codesourcery.com>
7699
7700 * server.h: Remove declaration of 'xsnprintf'.
7701
406b1477
KS
77022012-08-22 Keith Seitz <keiths@redhat.com>
7703
7704 * server.h: Include build-gnulib-gbserver/config.h.
7705 * gdbreplay.c: Likewise.
7706
e6712ff1
DE
77072012-08-08 Doug Evans <dje@google.com>
7708
7709 * Makefile.in (SFILES): Add gdb_vecs.c.
7710 (OBS): Add gdb_vecs.o.
7711 (gdb_vecs_h, host_defs_h): New variables.
7712 (thread-db.o): Add $(gdb_vecs_h) dependency.
7713 (gdb_vecs.o): New rule.
7714 * thread-db.c: #include "gdb_vecs.h".
7715 (thread_db_load_search): Use a vector to iterate over path elements.
7716 Handle text appearing after "$pdir".
7717
7718 * configure.ac: Add check for strstr.
7719 * config.in: Regenerate.
7720 * configure: Regenerate.
7721
7c3270ae
UW
77222012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7723
7724 * hostio.c (handle_pread): If pread fails, fall back to attempting
7725 lseek/read.
7726 (handle_pwrite): Likewise for pwrite.
7727
b62e2b27
UW
77282012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7729
7730 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7731 between unsupported TYPE and unimplementable ADDR/LEN combination.
7732 (arm_insert_point): Act on new return value.
7733
78a99e91
PA
77342012-07-31 Pedro Alves <palves@redhat.com>
7735
7736 * server.c (process_point_options): Only skip tokens if we find
7737 one that is unrecognized. Don't treat 'X' specially while
7738 skipping unrecognized tokens.
7739
fcf303ab
UW
77402012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7741
7742 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7743 to 4-byte-align HW breakpoint addresses for Thumb.
7744
7255706c
YQ
77452012-07-27 Yao Qi <yao@codesourcery.com>
7746
7747 PR remote/14161.
7748
7749 * server.h: Declare gdb_agent_about_to_close.
7750 * target.c (kill_inferior): Include "agent.h".
7751 New. Send command 'kill'.
7752 * target.h (kill_inferior): Removed macro.
7753 * tracepoint.c (gdb_agent_about_to_close): New.
7754 (gdb_agent_helper_thread): Handle command 'close'.
7755 Wait endlessly until the inferior stops.
7756 Install gdb_agent_remove_socket to atexit hook.
7757 (agent_socket_name): New static variable.
7758 (gdb_agent_socket_init): Replace local variable 'name' with
7759 'agent_socket_name'.
7760 (gdb_agent_remove_socket): New.
7761
5a3f286f
YQ
77622012-07-27 Yao Qi <yao@codesourcery.com>
7763
7764 * server.c (process_point_options): Stop at 'X' when parsing.
7765
961bd387
ME
77662012-07-19 Michael Eager <eager@eagercon.com>
7767
a261b8f5 7768 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7769 to hw_execute.
7770 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7771 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7772 hardware breakpoint.
7773
aa7c7447
JK
77742012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7775
7776 * gdbserver/linux-low.c (initialize_low): Call
7777 linux_ptrace_init_warnings.
7778
7f216e7c
DE
77792012-07-02 Doug Evans <dje@google.com>
7780
7781 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7782 pointer to int.
7783
d3ce09f5
SS
77842012-07-02 Stan Shebs <stan@codesourcery.com>
7785
7786 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7787 (ax.o): Add it to build rule.
7788 (ax-ipa.o): Ditto.
7789 (OBS): Add format.o.
7790 (IPA_OBS): Add format.o.
7791 * server.c (handle_query): Claim support for breakpoint commands.
7792 (process_point_options): Add command case.
7793 (process_serial_event): Leave running if there are printfs in
7794 effect.
7795 * mem-break.h (any_persistent_commands): Declare.
7796 (add_breakpoint_commands): Declare.
7797 (gdb_no_commands_at_breakpoint): Declare.
7798 (run_breakpoint_commands): Declare.
7799 * mem-break.c (struct point_command_list): New struct.
7800 (struct breakpoint): New field command_list.
7801 (any_persistent_commands): New function.
7802 (add_commands_to_breakpoint): New function.
7803 (add_breakpoint_commands): New function.
7804 (gdb_no_commands_at_breakpoint): New function.
7805 (run_breakpoint_commands): New function.
7806 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7807 locally.
7808 * ax.c: Include format.h.
7809 (ax_printf): New function.
7810 (gdb_eval_agent_expr): Add printf opcode.
7811
2f8f6aed
YQ
78122012-06-13 Yao Qi <yao@codesourcery.com>
7813
7814 * server.c (start_inferior): Remove duplicated writes to fields
7815 'last_resume_kind' and 'last_status' of 'current_inferior'.
7816
0c9070b3
YQ
78172012-06-12 Yao Qi <yao@codesourcery.com>
7818 Pedro Alves <palves@redhat.com>
7819
7820 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7821 comment.
7822 * server.c (handle_v_cont): Extend comment.
7823
c52daf70
YQ
78242012-06-11 Yao Qi <yao@codesourcery.com>
7825
7826 * linux-low.c (linux_attach): Add 'static'.
7827
d38bbb0a
YQ
78282012-06-06 Yao Qi <yao@codesourcery.com>
7829
7830 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7831
89dc0afd
JK
78322012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7833
7834 Fix gcc -flto compilation warning.
7835 * server.c (main): Make variable multi_mode and attach volatile.
7836
75f62ce7
TJB
78372012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7838
7839 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7840 if the platform doesn't know about it.
7841
65f479b6
PA
78422012-05-30 Jeff Kenton <jkenton@tilera.com>
7843
7844 * Makefile.in (SFILES): Add linux-tile-low.c.
7845 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7846 * configure.srv: Handle tilegx-*-linux*.
7847 * linux-tile-low.c: New file.
7848
0c5bf5a9
JK
78492012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7850
7851 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7852
a493e3e2
PA
78532012-05-24 Pedro Alves <palves@redhat.com>
7854
7855 PR gdb/7205
7856
43aaf8b6 7857 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7858
2ea28649
PA
78592012-05-24 Pedro Alves <palves@redhat.com>
7860
7861 PR gdb/7205
7862
7863 Replace target_signal with gdb_signal throughout.
7864
8d409d16
MR
78652012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7866
7867 * linux-low.c (linux_store_registers): Avoid the copying sequence
7868 when no data has been retrieved by ptrace.
7869
23512c01
MGD
78702012-05-22 Will Deacon <will.deacon@arm.com>
7871
7872 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7873 Include asm/ptrace.h.
7874 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7875 already defined.
7876
4934b29e
MR
78772012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7878
7879 * linux-low.c (linux_store_registers): Don't re-retrieve data
7880 with ptrace that has already been obtained from /proc. Always
7881 copy any data retrieved with ptrace to the buffer supplied.
7882
bde24c0a
PA
78832012-05-11 Yao Qi <yao@codesourcery.com>
7884 Pedro Alves <palves@redhat.com>
7885
7886 * linux-low.c (enum stopping_threads_kind): New.
7887 (stopping_threads): Change type to `enum stopping_threads_kind'.
7888 (handle_extended_wait): If stopping and suspending threads, leave
7889 the new_lwp suspended too.
7890 (linux_wait_for_event): Adjust.
7891 (stop_all_lwps): Set `stopping_threads' to
7892 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7893 whether we're suspending threads or just stopping them. Assert no
7894 recursion happens.
7895
623b6bdf
YQ
78962012-04-29 Yao Qi <yao@codesourcery.com>
7897
7898 * server.h: Move some code to ...
7899 * gdbthread.h: ... here. New.
7900 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7901 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7902 (nto-low.o, win32-low.o): Likewise.
7903 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7904 * regcache.c, remote-utils.c, server.c: Likewise.
7905 * target.c, tracepoint.c, win32-low.c: Likewise.
7906
f15f9948
TJB
79072012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7908
7909 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7910 (PTRACE_ARG4_TYPE): Likewise.
7911 (PTRACE_XFER_TYPE): Likewise.
7912 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7913 ptrace to PTRACE_ARG3_TYPE.
7914 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7915 (PTRACE_ARG4_TYPE): Likewise.
7916 (PTRACE_XFER_TYPE): Likewise.
7917 (linux_detach_one_lwp): Cast fourth argument of
7918 ptrace to long then PTRACE_ARG4_TYPE.
7919 (regsets_fetch_inferior_registers): Cast third argument of
7920 ptrace to long then PTRACE_ARG3_TYPE.
7921 (regsets_store_inferior_registers): Likewise.
7922
38ea300a
PA
79232012-04-20 Pedro Alves <palves@redhat.com>
7924
7925 * configure: Regenerate.
7926
c971b7fa
PA
79272012-04-19 Pedro Alves <palves@redhat.com>
7928
43aaf8b6 7929 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7930 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7931 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7932 (all, install-only, uninstall, clean-info, all-lib, clean): No
7933 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7934 (maintainer-clean realclean distclean): Use subdir_do.
7935 (subdir_do): New.
7936 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7937 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7938 * acinclude.m4: Include acx_configure_dir.m4.
7939 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7940 calls. Call AC_PROG_RANLIB. Configure gnulib using
7941 ACX_CONFIGURE_DIR.
7942 (GNULIB): New.
7943 (GNULIB_STDINT_H): Adjust.
7944 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7945 * gdbreplay.c: Include build-gnulib/config.h.
7946 * server.h: Likewise.
7947 * aclocal.m4: Regenerate.
7948 * config.in: Regenerate.
7949 * configure: Regenerate.
c971b7fa 7950
809277f8
PA
79512012-04-19 Pedro Alves <palves@redhat.com>
7952
7953 * Makefile.in (LIBGNU, INCGNU): Adjust.
7954 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7955 (all, install-only, uninstall, clean-info, all-lib, clean)
7956 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7957 * configure.ac: Adjust AC_OUTPUT output.
7958 * aclocal.m4: Regenerate.
7959 * configure: Regenerate.
7960
fd9bb8b8
PA
79612012-04-19 Pedro Alves <palves@redhat.com>
7962
7963 * Makefile.in (generated_files): New.
7964 (server_h): Remove the explicit dependency on config.h, and depend
7965 on $generated_files.
7966
1c298c66
PA
79672012-04-19 Pedro Alves <palves@redhat.com>
7968
7969 * Makefile.in (INCGNU): Add -Ignulib.
7970
57c4b50b
PA
79712012-04-19 Pedro Alves <palves@redhat.com>
7972
7973 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7974 (INCGNU): ... this, and spell out -I here.
7975 (GNULIB_LIB): Rename to ...
7976 (LIBGNU): ... this.
7977 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7978
1030e047
PA
79792012-04-19 Pedro Alves <palves@redhat.com>
7980
7981 * config.in: Regenerate.
7982
447d4319
PA
79832012-04-19 Pedro Alves <palves@redhat.com>
7984
7985 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7986 * server.h (memmem): Remove declaration.
7987 * config.in: Regenerate.
7988 * configure: Regenerate.
7989
aad9eab9
YQ
79902012-04-19 Yao Qi <yao@codesourcery.com>
7991
7992 * Makefile.in (SFILES): Add common/vec.c.
7993 (OBS): Add vec.o.
7994 (vec.o): New rule.
7995
3e10640f
YQ
79962012-04-19 Yao Qi <yao@codesourcery.com>
7997
7998 * remote-utils.c (prepare_resume_reply): Replace with macro
7999 target_core_of_thread.
8000 * server.c (handle_qxfer_threads_proper): Likewise.
8001 * target.h (traget_core_of_thread): New macro.
8002
71622373
PA
80032012-04-18 Pedro Alves <palves@redhat.com>
8004
8005 * aclocal.m4: Regenerate.
8006 * configure: Regenerate.
8007
80d26939
YQ
80082012-04-16 Yao Qi <yao@codesourcery.com>
8009
8010 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8011 duplicated on address.
8012
42476b70
YQ
80132012-04-16 Yao Qi <yao@codesourcery.com>
8014
8015 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8016 (struct tracepoint_action_ops) <send>: New field.
8017 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8018 (agent_expr_send, x_tracepoint_action_send): New.
8019 (l_tracepoint_action_send): New.
8020 (cmd_qtdp): Download and install tracepoint
8021 according to `use_agent'.
8022 (run_inferior_command): Add one more parameter `len'.
8023 Update callers.
8024 (tracepoint_send_agent): New.
8025 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8026
7bc83639
YQ
80272012-04-16 Yao Qi <yao@codesourcery.com>
8028
8029 * tracepoint.c (download_tracepoints): Moved to ...
8030 (cmd_qtstart): ... here.
8031
5f18041e
YQ
80322012-04-14 Yao Qi <yao@codesourcery.com>
8033
8034 * tracepoint.c: Include inttypes.h.
8035 (struct collect_memory_action): Use sized types.
8036 (struct tracepoint): Likewise.
8037 (cmd_qtdp, stop_tracing): Update print specifiers.
8038 (cmd_qtp, response_tracepoint): Likewise.
8039 (collect_data_at_tracepoint): Likewise.
8040 (collect_data_at_step): Likewise.
8041
55a8c076
YQ
80422012-04-14 Yao Qi <yao@codesourcery.com>
8043
8044 Import gnulib module inttypes.
8045 * aclocal.m4, config.in, configure: Regenerated.
8046
dc750257
YQ
80472012-04-14 Yao Qi <yao@codesourcery.com>
8048
8049 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8050 Makefile and config.status at last.
8051
0ab5faf9
YQ
80522012-04-13 Yao Qi <yao@codesourcery.com>
8053
8054 * tracepoint.c: Include stdint.h unconditionally.
8055
18f5fd81
TJB
80562012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8057
8058 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8059 on BFD_HAVE_SYS_PROCFS_TYPE.
8060 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8061 * configure: Regenerate.
8062 * config.in: Likewise.
8063
4d47af5c
L
80642012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8065
8066 * Makefile.in (clean): Also remove x32.c x32-linux.c
8067 x32-avx.c x32-avx-linux.c.
8068 (x32.o): New target.
8069 (x32.c): Likewise.
8070 (x32-linux.o): Likewise.
8071 (x32-linux.c): Likewise.
8072 (x32-avx.o): Likewise.
8073 (x32-avx.c): Likewise.
8074 (x32-avx-linux.o): Likewise.
8075 (x32-avx-linux.c): Likewise.
8076
8077 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8078 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8079 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8080 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8081 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8082 i386/x32-avx-linux.xml.
8083
8084 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8085 (init_registers_x32_avx_linux): Likwise.
8086 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8087 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8088
ecedbe58
PA
80892012-04-13 Pedro Alves <palves@redhat.com>
8090
8091 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8092 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8093 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8094 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8095 the sub-make.
8096
c92b5177
L
80972012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8098
8099 * linux-x86-low.c (compat_x32_clock_t): New.
8100 (compat_x32_siginfo_t): Likewise.
8101 (compat_x32_siginfo_from_siginfo): Likewise.
8102 (siginfo_from_compat_x32_siginfo): Likewise.
8103 (linux_is_elf64): Likewise.
8104 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8105 and siginfo_from_compat_x32_siginfo for x32.
8106 (x86_arch_setup): Set linux_is_elf64.
8107
214d508e
L
81082012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8109
8110 PR gdb/13969
8111 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8112 e_machine field.
8113 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8114 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8115 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8116 compatible with process.
8117
c9a1864a
YQ
81182012-04-12 Yao Qi <yao@codesourcery.com>
8119
8120 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8121 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8122 (install-only, install-info, clean): Handle sub dir gnulib.
8123 (all-lib, am--refresh): New targets.
8124 (memmem.o): Remove target.
8125 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8126 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8127 (AC_REPLACE_FUNCS): Remove memmem.
8128 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8129 (AC_OUTPUT): Generate Makefile in gnulib/.
8130 * aclocal.m4, config.in, configure: Regenerated.
8131
367ba2c2
MR
81322012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8133
8134 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8135
9d236627
PA
81362012-04-05 Pedro Alves <palves@redhat.com>
8137
8138 -Werror=strict-aliasing
8139
8140 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8141 pointer.
8142
111217b3
PA
81432012-04-04 Pedro Alves <palves@redhat.com>
8144
8145 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8146 (sparc_store_gregset_from_stack, sparc_store_gregset)
8147 (sparc_breakpoint_at): Fix formatting.
8148
8365dcf5
TJB
81492012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8150
8151 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8152 are available.
8153 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8154 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8155 * config.in: Regenerate.
8156 * configure: Likewise.
8157
689cc2ae
PA
81582012-03-29 Pedro Alves <palves@redhat.com>
8159
8160 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8161 Correct ptrace arguments.
8162
c14dfd32
PA
81632012-03-28 Pedro Alves <palves@redhat.com>
8164
8165 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8166 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8167 (IA64_FR1_REGNUM): New defines.
8168 (ia64_fetch_register): New.
8169 (the_low_target): Install it.
8170 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8171 field.
8172 * linux-low.c (linux_fetch_registers): Try the
8173 the_low_target.fetch_register hook first.
8174
8175 * linux-arm-low.c (the_low_target): Adjust.
8176 * linux-bfin-low.c (the_low_target): Adjust.
8177 * linux-cris-low.c (the_low_target): Adjust.
8178 * linux-crisv32-low.c (the_low_target): Adjust.
8179 * linux-m32r-low.c (the_low_target): Adjust.
8180 * linux-m68k-low.c (the_low_target): Adjust.
8181 * linux-mips-low.c (the_low_target): Adjust.
8182 * linux-ppc-low.c (the_low_target): Adjust.
8183 * linux-s390-low.c (the_low_target): Adjust.
8184 * linux-sh-low.c (the_low_target): Adjust.
8185 * linux-sparc-low.c (the_low_target): Adjust.
8186 * linux-tic6x-low.c (the_low_target): Adjust.
8187 * linux-x86-low.c (the_low_target): Adjust.
8188 * linux-xtensa-low.c (the_low_target): Adjust.
8189
63c88e13
PA
81902012-03-26 Pedro Alves <palves@redhat.com>
8191
8192 * server.c (handle_qxfer_libraries): Don't bail early if
8193 the_target->qxfer_libraries_svr4 is not NULL.
8194
fb723180
PA
81952012-03-26 Pedro Alves <palves@redhat.com>
8196
8197 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8198
0afae3cf
PA
81992012-03-23 Pedro Alves <palves@redhat.com>
8200
8201 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8202 "library-list-svr4" element's start tag when the the DSO list is
8203 empty.
8204
485f1ee4
PA
82052012-03-23 Pedro Alves <palves@redhat.com>
8206
8207 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8208 a variable whose type size is the same as the inferior's pointer
8209 size.
8210
a5362b9a
TS
82112012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8212
8213 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8214 struct siginfo.
8215 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8216 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8217 * linux-low.h: Include <signal.h>.
8218 (struct siginfo): Remove forward declaration.
8219 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8220 struct siginfo.
8221
d226c142
MF
82222012-03-21 Mike Frysinger <vapier@gentoo.org>
8223
8224 * .gitignore: Ignore more files.
8225
122f36ef
PA
82262012-03-19 Pedro Alves <palves@redhat.com>
8227 Jan Kratochvil <jan.kratochvil@redhat.com>
8228
8229 * server.c (cont_thread, general_thread): Add describing comments.
8230 (start_inferior): Clear `cont_thread'.
8231 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8232 of a process.
8233
fc3e5175
YQ
82342012-03-15 Yao Qi <yao@codesourcery.com>
8235
8236 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8237 handling to ...
8238 (cmd_qtdp): ... here.
8239
8d0d92cd
YQ
82402012-03-15 Yao Qi <yao@codesourcery.com>
8241
8242 * tracepoint.c (struct tracepoint_action_ops): New.
8243 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8244 (m_tracepoint_action_download): New.
8245 (r_tracepoint_action_download): New.
8246 (x_tracepoint_action_download): New.
8247 (l_tracepoint_action_download): New.
8248 (add_tracepoint_action): Install `action->ops' according type.
8249 (download_tracepoint_1): Move code `download' function pointer
8250 of various tracepoint_action_ops.
8251
87b0bb13
JK
82522012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8253
8254 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8255 linux_ptrace_attach_warnings.
8256
5f572dec
JK
82572012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8258
8259 * Makefile.in (linux-ptrace.o): New.
8260 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8261 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8262 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8263 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8264 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8265 of these targets.
8266 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8267
f4647387
YQ
82682012-03-08 Yao Qi <yao@codesourcery.com>
8269 Pedro Alves <palves@redhat.com>
8270
8271 Fix PR server/13392.
8272 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8273 offset of JMP insn.
8274 * tracepoint.c (remove_tracepoint): New.
8275 (cmd_qtdp): Call remove_tracepoint when failed to install.
8276
9b224c5e
PA
82772012-03-07 Pedro Alves <palves@redhat.com>
8278
8279 * linux-low.c (get_detach_signal): New.
8280 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8281 Pass on pending signals to PTRACE_DETACH. Check the result of the
8282 ptrace call.
8283 * server.c (program_signals, program_signals_p): New.
8284 (handle_general_set): Handle QProgramSignals.
8285 * server.h (program_signals, program_signals_p): Declare.
8286
e237a7e2
JK
82872012-03-05 Pedro Alves <palves@redhat.com>
8288 Jan Kratochvil <jan.kratochvil@redhat.com>
8289
8290 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8291 New comment why.
8292
5808517f
YQ
82932012-03-03 Yao Qi <yao@codesourcery.com>
8294
8295 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8296 agent_look_up_symbols.
8297
58b4daa5
YQ
82982012-03-03 Yao Qi <yao@codesourcery.com>
8299
8300 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8301 (linux-x86-low.o): Likewise.
8302 * server.h: Remove in_process_agent_loaded.
8303 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8304 common/agent.c.
8305 Update callers.
8306
8ffcbaaf
YQ
83072012-03-03 Yao Qi <yao@codesourcery.com>
8308
8309 * tracepoint.c (gdb_agent_capability): New global.
8310 (in_process_agent_loaded_ust): Renamed to
8311 `in_process_agent_supports_ust'.
8312 Update callers.
8313 (in_process_agent_supports_ust): Call agent_capability_check.
8314 (clear_installed_tracepoints): Assert that agent supports
8315 agent.
8316
d1feda86
YQ
83172012-03-03 Yao Qi <yao@codesourcery.com>
8318
8319 * linux-low.c (linux_supports_agent): New.
8320 (linux_target_ops): Initialize field `supports_agent' with
8321 linux_supports_agent.
8322 * target.h (struct target_ops) <supports_agent>: New.
8323 (target_supports_agent): New macro.
8324 * server.c (handle_general_set): Handle packet 'QAgent'.
8325 (handle_query): Send `QAgent+'.
8326 * Makefile.in (server.o): Depends on agent.h.
8327
2fa291ac
YQ
83282012-03-03 Yao Qi <yao@codesourcery.com>
8329
8330 * Makefile.in (OBS): Add agent.o.
8331 Add new rule for agent.o.
8332 Track dependence of tracepoint.c on agent.h.
8333 * tracepoint.c (run_inferior_command_1):
8334 (run_inferior_command): Call agent_run_command.
8335 (gdb_ust_connect_sync_socket): Deleted. Move it to
8336 common/agent.c.
8337 (resume_thread, stop_thread): Likewise.
8338 (gdb_ust_socket_init): Renamed to ...
8339 (gdb_agent_socket_init): ... New.
8340 (gdb_ust_thread): Renamed to ...
8341 (gdb_agent_helper_thread): ... New.
8342 (gdb_ust_init): Move some code to ...
8343 (gdb_agent_init): ... here. New.
8344 [HAVE_UST]: Call gdb_ust_init.
8345 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8346 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8347 * config.in, configure: Regenerated.
8348
05044653
PA
83492012-03-02 Pedro Alves <palves@redhat.com>
8350
8351 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8352 * linux-low.c (struct simple_pid_list): New.
8353 (stopped_pids): New a struct simple_pid_list pointer.
8354 (add_to_pid_list, pull_pid_from_list): New.
8355 (handle_extended_wait): Don't assume the first signal new children
8356 report is SIGSTOP. Adjust call to pull_pid_from_list.
8357 (linux_wait_for_lwp): Adjust.
8358
8d00225b
YQ
83592012-03-02 Yao Qi <yao@codesourcery.com>
8360
8361 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8362 debug log.
8363
19560ba5
YQ
83642012-03-02 Yao Qi <yao@codesourcery.com>
8365
8366 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8367 `stop_pc' and `tpoint'. Update caller.
8368
1faeff08
MR
83692012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8370
8371 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8372 * linux-low.c (use_linux_regsets): New macro.
8373 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8374 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8375 (linux_register_in_regsets): New function.
8376 (usr_fetch_inferior_registers): Skip registers covered by
8377 regsets.
8378 (usr_store_inferior_registers): Likewise.
8379 (usr_fetch_inferior_registers): New macro.
8380 (usr_store_inferior_registers): Likewise.
8381 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8382 (linux_store_registers): Likewise.
8383 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8384 prototype.
8385 (init_registers_mips64_dsp_linux): Likewise.
8386 (init_registers_mips_linux): New macro.
8387 (init_registers_mips_dsp_linux): Likewise.
8388 (mips_dsp_num_regs): Likewise.
8389 (DSP_BASE, DSP_CONTROL): New fallback macros.
8390 (mips_base_regs): New macro.
8391 (mips_regmap): Use it. Fix the size.
8392 (mips_dsp_regmap): New variable.
8393 (mips_dsp_regset_bitmap): Likewise.
8394 (mips_arch_setup): New function.
8395 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8396 than mips_regmap.
8397 (mips_cannot_store_register): Likewise.
8398 (the_low_target): Update .arch_setup, .num_regs and .regmap
8399 initializers. Add .regset_bitmap initializer.
8400 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8401 initializer.
8402 * linux-bfin-low.c (the_low_target): Likewise.
8403 * linux-cris-low.c (the_low_target): Likewise.
8404 * linux-crisv32-low.c (the_low_target): Likewise.
8405 * linux-ia64-low.c (the_low_target): Likewise.
8406 * linux-m32r-low.c (the_low_target): Likewise.
8407 * linux-m68k-low.c (the_low_target): Likewise.
8408 * linux-ppc-low.c (the_low_target): Likewise.
8409 * linux-s390-low.c (the_low_target): Likewise.
8410 * linux-sh-low.c (the_low_target): Likewise.
8411 * linux-sparc-low.c (the_low_target): Likewise.
8412 * linux-tic6x-low.c (the_low_target): Likewise.
8413 * linux-x86-low.c (the_low_target): Likewise.
8414 * linux-xtensa-low.c (the_low_target): Likewise.
8415 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8416 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8417 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8418 srv_xmlfiles.
8419 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8420 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8421
c03e6ccc
YQ
84222012-02-29 Yao Qi <yao@codesourcery.com>
8423 Pedro Alves <palves@redhat.com>
8424
8425 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8426 `step_over_finished' is true.
8427
644cebc9
PA
84282012-02-27 Pedro Alves <palves@redhat.com>
8429
8430 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8431 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8432
c14d7ab2
PA
84332012-02-27 Pedro Alves <palves@redhat.com>
8434
8435 PR server/9684
8436 * linux-low.c (pid_is_stopped): New.
8437 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8438
412c89dd
LM
84392012-02-25 Luis Machado <lgustavo@codesourcery.com>
8440
8441 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8442 of conditions.
8443
b745defe
MR
84442012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8445
8446 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8447
9f3a5c85
LM
84482012-02-24 Luis Machado <lgustavo@codesourcery>
8449
8450 * server.c (handle_query): Advertise support for target-side
8451 breakpoint condition evaluation.
8452 (process_point_options): New function.
8453 (process_serial_event): When inserting a breakpoint, check for
8454 a target-side condition that should be evaluated.
8455
8456 * mem-break.c: Include regcache.h and ax.h.
8457 (point_cond_list_t): New data structure.
8458 (breakpoint) <cond_list>: New field.
8459 (find_gdb_breakpoint_at): Make non-static.
8460 (delete_gdb_breakpoint_at): Clear any target-side
8461 conditions.
8462 (clear_gdb_breakpoint_conditions): New function.
8463 (add_condition_to_breakpoint): Likewise.
8464 (add_breakpoint_condition): Likewise.
8465 (gdb_condition_true_at_breakpoint): Likewise.
8466 (gdb_breakpoint_here): Return result directly instead
8467 of going through a local variable.
8468
8469 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8470 (clear_gdb_breakpoint_conditions): Likewise.
8471 (add_breakpoint_condition): Likewise.
8472 (gdb_condition_true_at_breakpoint): Likewise.
8473
8474 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8475 (need_step_over_p): Take target-side breakpoint condition into
8476 consideration.
8477
5e1dc496
LM
84782012-02-24 Luis Machado <lgustavo@codesourcery>
8479
8480 * server.h: Include tracepoint.h.
8481 (agent_mem_read, agent_get_trace_state_variable_value,
8482 agent_set_trace_state_variable_value,
8483 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8484 get_set_tsv_func_addr): New prototypes.
8485
8486 * ax.h: New include file.
8487 * ax.c: New source file.
8488
8489 * tracepoint.c: Include ax.h.
8490 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8491 agent_expr, eval_result_type): Move to ax.h.
8492 (parse_agent_expr): Rename to ...
8493 (gdb_parse_agent_expr): ... this, make it non-static and move
8494 to ax.h.
8495 (unparse_agent_expr) Rename to ...
8496 (gdb_unparse_agent_expr): ... this, make it non-static and move
8497 to ax.h.
8498 (eval_agent_expr): Rename to ...
8499 (eval_tracepoint_agent_expr): ... this.
8500 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8501 forward declarations.
8502 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8503 (agent_get_trace_state_variable_value): New function.
8504 (agent_set_trace_state_variable_value): New function.
8505 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8506 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8507 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8508 (condition_true_at_tracepoint): Likewise.
8509 (parse_agent_expr): Rename to ...
8510 (gdb_parse_agent_expr): ... this and move to ax.c.
8511 (unparse_agent_expr): Rename to ...
8512 (gdb_unparse_agent_expr): ... this and move to ax.c.
8513 (gdb_agent_op_name): Move to ax.c.
8514 (eval_agent_expr): Rename to ...
8515 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8516 and move to ax.c.
8517 (eval_tracepoint_agent_expr): New function.
8518 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8519 non-static.
5e1dc496
LM
8520 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8521 ax.c.
8522 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8523 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8524 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8525 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8526 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8527 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8528 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8529 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8530 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8531 (compile_bytecodes): Remove forward declaration.
8532 (is_goto_target): Move to ax.c.
8533 (compile_bytecodes): Move to ax.c and call
8534 agent_get_trace_state_variable_value (...) and
8535 agent_set_trace_state_variable_value (...).
8536
8537 * Makefile.in: Update ax.c and IPA dependencies.
8538
277e4e52
PA
85392012-02-24 Pedro Alves <palves@redhat.com>
8540
8541 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8542 (cmd_bigqtbuffer_circular): ... this. Only handle
8543 'QTBuffer:circular:'.
8544 (handle_tracepoint_general_set): Adjust.
8545
bf4c19f7
YQ
85462012-02-16 Yao Qi <yao@codesourcery.com>
8547
8548 * inferiors.c: Move code to ...
8549 * dll.c: .... here. New.
8550 * server.h: Declare clear_dlls.
8551 * Makefile.in (SFILES): Add dll.c.
8552 (OBS): Add dll.o
8553 (dll.o): New rule.
8554
d73f2619
YQ
85552012-02-11 Yao Qi <yao@codesourcery.com>
8556
8557 * server.c: (handle_monitor_command): Add a new parameter
8558 `own_buf'.
8559 (handle_query): Update caller.
8560
f8255c2a
JB
85612012-02-09 Joel Brobecker <brobecker@adacore.com>
8562
8563 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8564 * configure, config.in: Regenerate.
8565 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8566 is not defined.
8567
da84f473
PA
85682012-02-02 Pedro Alves <palves@redhat.com>
8569
8570 Try SIGKILL first, then PTRACE_KILL.
8571 * linux-low.c (linux_kill_one_lwp): New.
8572 (linux_kill_one_lwp): Rename to ...
8573 (kill_one_lwp_callback): ... this. Use the new
8574 linux_kill_one_lwp.
8575
e886a173
PA
85762012-02-02 Pedro Alves <palves@redhat.com>
8577
8578 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8579 inferior.
8580
be07f1a2
PA
85812012-01-27 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8584 (elf_64_file_p): Make static.
8585 (linux_pid_exe_is_elf_64_file): New.
8586 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8587 Delete declarations.
8588 (linux_pid_exe_is_elf_64_file): Declare.
8589 * linux-x86-low.c (x86_arch_setup): Use
8590 linux_pid_exe_is_elf_64_file.
8591
d8301ad1
JK
85922012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8593
8594 * linux-low.c (linux_wait_for_event_1): Rename to ...
8595 (linux_wait_for_event): ... here and merge it with former
8596 linux_wait_for_event - new variable wait_ptid, use it.
8597 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8598
01b17894
PA
85992012-01-23 Pedro Alves <palves@redhat.com>
8600
8601 * server.c (main): Avoid yet another case of infinite loop while
8602 detaching/killing after a longjmp.
8603
e825046f
JK
86042012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8605
8606 Code cleanup.
8607 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8608
b9e7b9c3
UW
86092012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8610
8611 * hostio.c (handle_readlink): New function.
8612 (handle_vFile): Call it to handle "vFile:readlink" packets.
8613
901f9912
UW
86142012-01-20 Pedro Alves <palves@redhat.com>
8615 Ulrich Weigand <ulrich.weigand@linaro.org>
8616
8617 * server.c (handle_v_requests): Only support vAttach and vRun to
8618 start multiple processes when in extended protocol mode.
8619
fc1ab1a0
PA
86202012-01-17 Pedro Alves <palves@redhat.com>
8621
8622 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8623 memalign plus mprotect to allocate the scratch buffer.
8624
7d5d4e98
PA
86252012-01-13 Pedro Alves <palves@redhat.com>
8626
8627 * server.c (attach_inferior): Clear `cont_thread'.
8628
f128d5e9
PA
86292012-01-13 Pedro Alves <palves@redhat.com>
8630
8631 * server.c (main): Avoid infinite loop while detaching/killing
8632 after a longjmp.
8633
06db92f0
DE
86342012-01-09 Doug Evans <dje@google.com>
8635
8636 * server.c (start_inferior): Set last_ptid in --wrapper case.
8637
32d92999
YQ
86382012-01-06 Yao Qi <yao@codesourcery.com>
8639
8640 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8641 defined.
8642 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8643
5e0a92a9
YQ
86442012-01-04 Yao Qi <yao@codesourcery.com>
8645
8646 * tracepoint.c (cmd_qtdp): Print debug message
8647 for static tracepoint.
8648
ae639e8c
YQ
86492012-01-04 Yao Qi <yao@codesourcery.com>
8650
8651 * tracepoint.c (trace_vdebug): Differentiate debug message
8652 between gdbserver and IPA.
8653
f72429c5
YQ
86542012-01-03 Yao Qi <yao@codesourcery.com>
8655
8656 * tracepoint.c (tracepoint_was_hit): Don't collect for
8657 static tracepoint.
8658
12c3e59c
JB
86592012-01-02 Joel Brobecker <brobecker@adacore.com>
8660
8661 * terminal.h: Reformat copyright header.
8662
67827812
JB
86632012-01-02 Joel Brobecker <brobecker@adacore.com>
8664
8665 * server.c (gdbserver_version): Update copyright year.
8666 * gdbreplay.c (gdbreplay_version): Likewise.
8667
3e52c33d
JK
86682011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8669
8670 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8671
8672 Revert:
8673 2011-12-18 Hui Zhu <teawater@gmail.com>
8674 * linux-low.c (linux_create_inferior): Save return value to ret.
8675
66f1260e
HZ
86762011-12-18 Hui Zhu <teawater@gmail.com>
8677
8678 * linux-low.c (linux_create_inferior): Save return value to ret.
8679
e77616d7
DE
86802011-12-16 Doug Evans <dje@google.com>
8681
e7b06c57
DE
8682 * linux-low.c (linux_create_inferior): If stdio connection,
8683 redirect stdin from /dev/null, stdout to stderr.
8684 * remote-utils.c (remote_is_stdio): New static global.
8685 (remote_connection_is_stdio): New function.
8686 (remote_prepare): Handle stdio connection.
8687 (remote_open): Ditto.
8688 (remote_close): Don't close stdin for stdio connections.
8689 (read_prim,write_prim): New functions. Replace all calls to
8690 read/write to these.
8691 * server.c (main): Watch for "-" argument. Move call to
8692 remote_prepare before start_inferior.
8693 * server.h (STDIO_CONNECTION_NAME): New macro.
8694 (remote_connection_is_stdio): Declare.
8695
e77616d7
DE
8696 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8697 in debugging output.
8698
82067193
YQ
86992011-12-15 Yao Qi <yao@codesourcery.com>
8700
8701 * tracepoint.c: Include sys/syscall.h.
8702 (gdb_ust_thread): Remove preprocessor conditional.
8703
82bfbe7e
PA
87042011-12-14 Pedro Alves <pedro@codesourcery.com>
8705
8706 * linux-low.c (linux_detach_one_lwp): Call
8707 the_low_target.prepare_to_resume before detaching.
8708
712c6575
YQ
87092011-12-14 Yao Qi <yao@codesourcery.com>
8710
8711 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8712 of write.
8713
d54d1edf
YQ
87142011-12-14 Yao Qi <yao@codesourcery.com>
8715
8716 * i386-low.c (i386_low_stopped_data_address): Initialize local
8717 variable `control'.
8718
6210a125
PA
87192011-12-13 Pedro Alves <pedro@codesourcery.com>
8720
8721 PR remote/13492
8722
8723 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8724 DR_CONTROL unless necessary. Extend comments.
8725 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8726 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8727
2ece8244
YQ
87282011-12-13 Yao Qi <yao@codesourcery.com>
8729
8730 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8731 macros.
8732 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8733
784867a5
JK
87342011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8735
8736 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8737 Print new debug message for such case.
8738
6bf36717
JK
87392011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8740
8741 Fix overlapping memcpy.
8742 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8743 the read_inferior_memory transfer.
8744 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8745 write_inferior_memory transfer.
8746 (set_fast_tracepoint_jump): New variable buf. Use it for the
8747 read_inferior_memory and write_inferior_memory transfers.
8748 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8749 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8750 Use it for the write_inferior_memory transfer.
8751 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8752 buffers.
8753
50275556
MR
87542011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8755
8756 * linux-low.c (fetch_register, store_register): Make code
8757 consistent, fix formatting.
8758
7325beb4
MR
87592011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8760
8761 * linux-low.c (usr_store_inferior_registers): Factor out code
8762 to handle individual registers into...
8763 (store_register): ... this new function.
8764
c642a434
UW
87652011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8766
8767 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8768 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8769 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8770 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8771 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8772 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8773 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8774 (srv_xmlfiles): Add new XML files.
8775
8776 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8777 and <sys/uio.h>.
8778 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8779 (init_registers_s390_linux32v1): Add prototype.
8780 (init_registers_s390_linux32v2): Likewise.
8781 (init_registers_s390_linux64v1): Likewise.
8782 (init_registers_s390_linux64v2): Likewise.
8783 (init_registers_s390x_linux64v1): Likewise.
8784 (init_registers_s390x_linux64v2): Likewise.
8785 (s390_num_regs): Increment to 52.
8786 (s390_regmap): Add orig_r2 register.
8787 (s390_num_regs_3264): Increment to 68.
8788 (s390_regmap_3264): Add orig_r2 register.
8789 (s390_collect_ptrace_register): Handle orig_r2 register.
8790 (s390_supply_ptrace_register): Likewise.
8791 (s390_fill_last_break): New function.
8792 (s390_store_last_break): Likewise.
8793 (s390_fill_system_call): New function.
8794 (s390_store_system_call): Likewise.
8795 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8796 register sets.
8797 (s390_check_regset): New function.
8798 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8799 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8800 Update target_regsets for available register sets.
8801
2268b414
JK
88022011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8803 Jan Kratochvil <jan.kratochvil@redhat.com>
8804
8805 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8806 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8807 New.
8808 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8809 * linux-low.h (struct process_info_private): New member r_debug.
8810 * server.c (handle_qxfer_libraries): Call
8811 the_target->qxfer_libraries_svr4.
8812 (handle_qxfer_libraries_svr4): New function.
8813 (qxfer_packets): New entry "libraries-svr4".
8814 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8815 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8816 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8817 PACKET_qXfer_libraries_svr4.
8818
d6db1fab
UW
88192011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8820
8821 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8822 PSW address/mask between 8-byte and 16-byte formats.
8823 (s390_supply_ptrace_register): Likewise.
8824 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8825 basic addressing mode bit.
8826
242f5f1c
SS
88272011-11-24 Stan Shebs <stan@codesourcery.com>
8828
8829 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8830
f196051f
SS
88312011-11-17 Stan Shebs <stan@codesourcery.com>
8832
8833 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8834 (tracing_start_time): New global.
8835 (tracing_stop_time): New global.
8836 (tracing_user_name): New global.
8837 (tracing_notes): New global.
8838 (tracing_stop_note): New global.
8839 (cmd_qtstart): Set traceframe_usage, start_time.
8840 (stop_tracing): Set stop_time.
8841 (cmd_qtstatus): Report additional status.
8842 (cmd_qtp): New function.
8843 (handle_tracepoint_query): Call it.
8844 (cmd_qtnotes): New function.
8845 (handle_tracepoint_general_set): Call it.
8846 (get_timestamp): Rename from tsv_get_timestamp.
8847
405f8e94
SS
88482011-11-14 Stan Shebs <stan@codesourcery.com>
8849 Kwok Cheung Yeung <kcy@codesourcery.com>
8850
8851 * linux-x86-low.c (small_jump_insn): New.
8852 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8853 trampoline and error message, build a trampoline and issue a small
8854 jump instruction to it.
8855 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8856 trampoline and error message.
8857 (x86_get_min_fast_tracepoint_insn_len): New.
8858 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8859 * linux-low.h (struct linux_target_ops): Add arguments to
8860 install_fast_tracepoint_jump_pad operation, add new operation.
8861 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8862 arguments.
8863 (linux_get_min_fast_tracepoint_insn_len): New function.
8864 (linux_target_op): Add new operation.
8865 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8866 (gdb_trampoline_buffer_end): Ditto.
8867 (gdb_trampoline_buffer_error): Ditto.
8868 (struct ipa_sym_addresses): Add fields for new IPA variables.
8869 (symbol_list): Add entries for new IPA variables.
8870 (struct tracepoint): Add fields to hold the address range of the
8871 trampoline used by the tracepoint.
8872 (trampoline_buffer_head): New static variable.
8873 (trampoline_buffer_tail): Ditto.
8874 (claim_trampoline_space): New function.
8875 (have_fast_tracepoint_trampoline_buffer): New function.
8876 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8877 structure.
8878 (install_fast_tracepoint): Ditto, also add error buffer argument.
8879 (cmd_qtminftpilen): New function.
8880 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8881 (fast_tracepoint_from_trampoline_address): New function.
8882 (fast_tracepoint_collecting): Handle trampoline as part of jump
8883 pad space.
8884 (set_trampoline_buffer_space): New function.
8885 (initialize_tracepoint): Initialize new IPA variables.
8886 * target.h (struct target_ops): Add arguments to
8887 install_fast_tracepoint_jump_pad operation, add new
8888 get_min_fast_tracepoint_insn_len operation.
8889 (target_get_min_fast_tracepoint_insn_len): New.
8890 (install_fast_tracepoint_jump_pad): Add arguments.
8891 * server.h (IPA_BUFSIZ): Define.
8892 * linux-i386-ipa.c: Include extra header files.
8893 (initialize_fast_tracepoint_trampoline_buffer): New function.
8894 (initialize_low_tracepoint): Call it.
8895 * server.h (set_trampoline_buffer_space): Declare.
8896 (claim_trampoline_space): Ditto.
8897 (have_fast_tracepoint_trampoline_buffer): Ditto.
8898
1e4d1764
YQ
88992011-11-14 Yao Qi <yao@codesourcery.com>
8900
8901 * server.c (handle_query): Handle InstallInTrace for qSupported.
8902 * tracepoint.c (add_tracepoint): Sort list.
8903 (install_tracepoint, download_tracepoint): New.
8904 (cmd_qtdp): Call them to install and download tracepoints.
8905 (sort_tracepoints): Removed.
8906 (cmd_qtstart): Update.
8907
5c73ff4e
YQ
89082011-11-14 Yao Qi <yao@codesourcery.com>
8909
8910 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8911 * mem-break.h: Declare.
8912 * tracepoint.c (cmd_qtstart): Move some code to ...
8913 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8914 New.
8915 (download_tracepoints): Move some code to ...
8916 (download_tracepoint_1): ... here. New.
8917
86a30030
YQ
89182011-11-08 Yao Qi <yao@codesourcery.com>
8919
8920 * remote-utils.c (relocate_instruction): A comment fix.
8921
8d26e50c
JB
89222011-11-07 Joel Brobecker <brobecker@adacore.com>
8923
8924 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8925 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8926 dr_status_mirror and dr_control_mirror from debug_reg_state.
8927 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8928 (i386_initial_stuff): Remove use of deleted globals.
8929 (i386_get_thread_context, i386_set_thread_context,
8930 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8931 from debug_reg_state.
8932
a59306a3
YQ
89332011-11-05 Yao Qi <yao@codesourcery.com>
8934
8935 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8936 address as TPOINT's.
8937
3065dfb6
SS
89382011-11-02 Stan Shebs <stan@codesourcery.com>
8939
8940 * tracepoint.c (agent_mem_read_string): New function.
8941 (eval_agent_expr): Call it for tracenz.
8942 * server.c (handle_query): Report support for tracenz.
8943
fd0d8c7c
YQ
89442011-11-02 Yao Qi <yao@codesourcery.com>
8945
8946 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8947
609086b1
YQ
89482011-11-02 Yao Qi <yao@codesourcery.com>
8949
8950 * target.h: Fix a typo in comment.
8951
b9fd1791
PA
89522011-10-31 Pedro Alves <pedro@codesourcery.com>
8953
8954 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8955 clobber the breakpoints' shadows with fast tracepoint jumps.
8956 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8957 * target.c (write_inferior_memory): Also pass MYADDR down to
8958 check_mem_write.
8959
03583c20
UW
89602011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8961
8962 * configure.ac: Check support for personality routine.
8963 * configure: Regenerate.
8964 * config.in: Likewise.
8965 * linux-low.c: Include <sys/personality.h>.
8966 Define ADDR_NO_RANDOMIZE if necessary.
8967 (linux_create_inferior): Disable address space randomization when
8968 forking inferior, if requested.
8969 (linux_supports_disable_randomization): New function.
8970 (linux_target_ops): Install it.
8971 * server.h (disable_randomization): Declare.
8972 * server.c (disable_randomization): New global variable.
8973 (handle_general_set): Handle QDisableRandomization.
8974 (handle_query): Likewise for qSupported.
8975 (main): Support --disable-randomization and --no-disable-randomization
8976 command line arguments.
8977 * target.h (struct target_ops): Add supports_disable_randomization.
8978 (target_supports_disable_randomization): New macro.
8979
723b724b
MF
89802011-09-29 Mike Frysinger <vapier@gentoo.org>
8981
8982 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8983 ifdef check.
8984 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8985 [!PT_GETDSBT] (target_loadmap): New definition.
8986 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8987 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8988 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8989 and PT_GETDSBT to LINUX_LOADMAP.
8990 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8991 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8992
55329a5c 89932011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8994
8995 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8996 (arm_linux_hwbp_cap): New static variable.
8997 (arm_linux_get_hwbp_cap): Replace by ...
8998 (arm_linux_init_hwbp_cap): ... this new function.
8999 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9000 (arm_linux_get_hw_watchpoint_count): Likewise.
9001 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9002 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9003 (arm_prepare_to_resume): Use perror_with_name instead of error.
9004
55329a5c 90052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9006
9007 * linux-arm-low.c: Include <signal.h>.
9008 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9009 (struct arm_linux_hwbp_cap): New data type.
9010 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9011 (struct arm_linux_hw_breakpoint): New data type.
9012 (MAX_BPTS, MAX_WPTS): Define.
9013 (struct arch_process_info, struct arch_lwp_info): New data types.
9014 (arm_linux_get_hwbp_cap): New function.
9015 (arm_linux_get_hw_breakpoint_count): Likewise.
9016 (arm_linux_get_hw_watchpoint_count): Likewise.
9017 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9018 (arm_hwbp_control_initialize): Likewise.
9019 (arm_hwbp_control_is_enabled): Likewise.
9020 (arm_hwbp_control_is_initialized): Likewise.
9021 (arm_hwbp_control_disable): Likewise.
9022 (arm_linux_hw_breakpoint_equal): Likewise.
9023 (arm_linux_hw_point_initialize): Likewise.
9024 (struct update_registers_data): New data structure.
9025 (update_registers_callback: New function.
9026 (arm_insert_point): Likewise.
9027 (arm_remove_point): Likewise.
9028 (arm_stopped_by_watchpoint): Likewise.
9029 (arm_stopped_data_address): Likewise.
9030 (arm_new_process): Likewise.
9031 (arm_new_thread): Likewise.
9032 (arm_prepare_to_resume): Likewise.
9033 (the_low_target): Register arm_insert_point, arm_remove_point,
9034 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9035 arm_new_thread, and arm_prepare_to_resume.
9036
6b9801d4
SS
90372011-09-15 Stan Shebs <stan@codesourcery.com>
9038
9039 * server.h (struct emit_ops): Add compare-goto fields.
9040 * tracepoint.c (gdb_agent_op_sizes): New table.
9041 (emit_eq_goto): New function.
9042 (emit_ne_goto): New function.
9043 (emit_lt_goto): New function.
9044 (emit_le_goto): New function.
9045 (emit_gt_goto): New function.
9046 (emit_ge_goto): New function.
9047 (is_goto_target): New function.
9048 (compile_bytecodes): Recognize special cases of compare-goto
9049 combinations and call specialized emitters for them.
9050 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9051 (amd64_emit_ne_goto): New function.
9052 (amd64_emit_lt_goto): New function.
9053 (amd64_emit_le_goto): New function.
9054 (amd64_emit_gt_goto): New function.
9055 (amd64_emit_ge_goto): New function.
9056 (amd64_emit_ops): Add the new functions.
9057 (i386_emit_eq_goto): New function.
9058 (i386_emit_ne_goto): New function.
9059 (i386_emit_lt_goto): New function.
9060 (i386_emit_le_goto): New function.
9061 (i386_emit_gt_goto): New function.
9062 (i386_emit_ge_goto): New function.
9063 (i386_emit_ops): Add the new functions.
9064
bf15cbda
SS
90652011-09-08 Stan Shebs <stan@codesourcery.com>
9066
9067 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9068 (i386_emit_epilogue): Restore %ebx.
9069
943ca1dd
JZ
90702011-08-31 Jie Zhang <jzhang918@gmail.com>
9071
9072 * server.c (step_thread): Remove definition.
9073 (process_serial_event): Don't handle Hs.
9074 * server.h (step_thread): Remove declaration.
9075 * target.c (set_desired_inferior): Remove use of step_thread.
9076
e3deef73
LM
90772011-08-24 Luis Machado <lgustavo@codesourcery.com>
9078
9079 * linux-low.c: Include linux-procfs.h.
9080 (linux_attach_lwp_1): Update comments.
9081 (linux_attach): Scan for existing threads when attaching to a
9082 process that is the tgid.
9083 * Makefile.in: Update dependencies.
9084
13da1c97
LM
90852011-08-24 Luis Machado <lgustavo@codesourcery.com>
9086
9087 * configure.srv: Add linux-procfs.o dependencies.
9088
881127c9
YQ
90892011-08-14 Yao Qi <yao@codesourcery.com>
9090
9091 * target.h (struct target_ops): Fix indent.
9092 * win32-low.c (win32_target_ops): Fix comment.
9093
58dbd541
YQ
90942011-08-14 Andrew Jenner <andrew@codesourcery.com>
9095 Yao Qi <yao@codesourcery.com>
9096
9097 * Makefile.in (clean): Remove tic6x-*.c files.
9098 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9099 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9100 (tic6x-c64xp-linux.c): Likewise.
9101 * configure.srv: Add support for tic6x-*-uclinux.
9102 * linux-tic6x-low.c: New.
9103 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9104
78d85199
YQ
91052011-08-14 Andrew Stubbs <ams@codesourcery.com>
9106 Yao Qi <yao@codesourcery.com>
9107
9108 * target.h (struct target_ops): Add read_loadmap.
9109 * linux-low.c (struct target_loadseg): New type.
9110 (struct target_loadmap): New type.
9111 (linux_read_loadmap): New function.
9112 (linux_target_ops): Add linux_read_loadmap.
9113 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9114 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9115 to NULL.
78d85199 9116
a959a88d
EZ
91172011-08-05 Eli Zaretskii <eliz@gnu.org>
9118
9119 * win32-low.c: Include <stdint.h>.
9120
1ced966e
PA
91212011-07-22 Pedro Alves <pedro@codesourcery.com>
9122
9123 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9124 to the inferior here.
9125 (i386_remove_aligned_watchpoint): Ditto.
9126 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9127 fit part of the watchpoint in the debug registers.
9128 (i386_update_inferior_debug_regs): New.
9129 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9130 registers, and only update the inferior on success.
9131 (i386_low_remove_watchpoint): Ditto.
9132
d26e3629
KY
91332011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9134
9135 * linux-low.c (compare_ints, unique, list_threads, show_process,
9136 linux_core_of_thread): Delete.
9137 (linux_target_ops): Change linux_core_of_thread to
9138 linux_common_core_of_thread.
9139 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9140 * utils.c (malloc_failure): Change type of argument.
9141 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9142 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9143 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9144 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9145 (IPA_OBJS): Add common-utils-ipa.o.
9146 (ptid_h, linux_osdata_h): New macros.
9147 (server_h): Add common/common-utils.h, common/xml-utils.h,
9148 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9149 common/ptid.h.
9150 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9151 ptid.o, buffer.o): New rules.
9152 (linux-low.o): Add common/linux-osdata.h as a dependency.
9153 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9154 * configure.ac: Add AC_HEADER_DIRENT check.
9155 * config.in: Regenerate.
9156 * configure: Regenerate.
9157 * remote-utils.c (xml_escape_text): Delete.
9158 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9159 buffer_xml_printf): Move to common/buffer.c.
9160 * server.c (main): Remove call to initialize_inferiors.
9161 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9162 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9163 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9164 internal_error, gdb_assert, gdb_assert_fail): Delete.
9165 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9166 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9167 common/buffer.h.
9168 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9169 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9170 initialize_inferiors): Delete.
9171
2275a1a7
PA
91722011-07-20 Pedro Alves <pedro@codesourcery.com>
9173
9174 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9175 symbol error.
9176
0a5b1e09
PA
91772011-05-31 Pedro Alves <pedro@codesourcery.com>
9178
9179 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9180 assertion.
9181 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9182
6938fd34
YQ
91832011-05-26 Yao Qi <yao@codesourcery.com>
9184
9185 * Makefile.in (thread-db.o): Track dependence to
9186 common/gdb_thread_db.h.
9187 * thread-db.c: include gdb_thread_db.h from right place.
9188
b481f9e0
TT
91892011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9190
9191 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9192 __FILE__ and __LINE__ to internal_error.
9193
98a5dd13
DE
91942011-05-13 Doug Evans <dje@google.com>
9195
9196 * thread-db.c (try_thread_db_load_from_sdir): New function.
9197 (try_thread_db_load_from_dir): New function.
9198 (thread_db_load_search): Handle $sdir, ignore $pdir.
9199 Remove trying of system directories if search of
9200 libthread-db-search-path fails, that is now done via $sdir.
9201
d248b706
KY
92022011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9203
9204 * server.c (handle_query): Add EnableDisableTracepoints to the list
9205 of supported features.
43aaf8b6 9206 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9207 tracepoints.
43aaf8b6
PA
9208 (cmd_qtenable_disable): New.
9209 (cmd_qtstart): Install tracepoints even if disabled.
9210 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9211 receiving a QTEnable or QTDisable packet.
9212 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9213 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9214 tracepoints.
9215 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9216
84e578fb
DE
92172011-05-10 Doug Evans <dje@google.com>
9218
9219 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9220
71f55dd8
DE
92212011-05-04 Doug Evans <dje@google.com>
9222
9223 * linux-low.c (linux_join): Skip process lookup.
9224 * spu-low.c (spu_join): Ditto.
9225 * server.c (join_inferiors_callback): Delete.
9226 (process_serial_event): For 'D' packet (detach) call join_inferior
9227 directly.
9228
4d393d60
JM
92292011-05-04 Joseph Myers <joseph@codesourcery.com>
9230
9231 * README: Don't mention xscale*-*-linux*.
9232 * configure.srv (xscale*-*-linux*): Don't handle target.
9233
b00ad6ff
NF
92342011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9235
9236 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9237 casting pointers.
9238 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9239 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9240 (i386_emit_void_call_2): Likewise.
9241
af96c192
YQ
92422011-04-26 Yao Qi <yao@codesourcery.com>
9243
43aaf8b6
PA
9244 * linux-low.c: Move common macros to linux-ptrace.h.
9245 Include linux-ptrace.h.
af96c192
YQ
9246 * Makefile.in (linux_ptrace_h): New.
9247 (linux-low.o): Depends on linux-ptrace.h.
9248
03f2bd59
JK
92492011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9250
9251 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9252 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9253 (remote_prepare): New function with most of the TCP code from ...
9254 (remote_open): ... here. Detect PORT here unconditionally. Move also
9255 setting transport_is_reliable.
9256 * server.c (run_once): New variable.
9257 (gdbserver_usage): Document it.
9258 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9259 the first run if RUN_ONCE.
9260 * server.h (run_once, remote_prepare): New declarations.
9261
7a9dd1b2
TT
92622011-04-19 Tom Tromey <tromey@redhat.com>
9263
9264 * win32-low.c (handle_load_dll): Remove duplicate "the".
9265
81239425
PM
92662011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9267
9268 Remove support for old Cygwin 1.5 versions.
9269 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9270 function to avoid warning.
9271 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9272 warning.
9273
9e0627f1
PM
92742011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9275
9276 * gdbserver/server.h (Macro _): Define it if not available.
9277
588eebee
MS
92782011-03-14 Michael Snyder <msnyder@vmware.com>
9279
348af9f7 9280 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9281
43f70d4c
JB
92822011-03-10 Joel Brobecker <brobecker@adacore.com>
9283
9284 * Makefile.in (maintainer-clean realclean distclean): Remove
9285 "make ... subdir_do" command.
9286
348af9f7
MS
92872011-03-10 Michael Snyder <msnyder@vmware.com>
9288
9289 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9290
9291 * server.c (handle_v_run): Free alloced buffer on early return.
9292
e637a4f5
YQ
92932011-03-09 Yao Qi <yao@codesourcery.com>
9294
9295 Revert:
9296 2011-03-04 Yao Qi <yao@codesourcery.com>
9297
9298 * Makefile.in: Remove GNU make feature --directory.
9299
9300 2011-03-05 Yao Qi <yao@codesourcery.com>
9301
9302 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9303 (subdir_do): New make target. Copied from gdb/Makefile.
9304 (maintainer-clean, realclean, distclean, clean): Call corresponding
9305 make targets in common/Makefile.
9306
9307 2011-02-11 Yao Qi <yao@codesourcery.com>
9308
9309 * configure.ac: Call AC_PROG_RANLIB.
9310 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9311 * configure: Regenerate.
9312
e6edda56
JK
93132011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9314
9315 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9316
e5141119
JB
93172011-03-06 Yao Qi <yao@codesourcery.com>
9318
9319 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9320
64794aa4
JB
93212011-03-05 Yao Qi <yao@codesourcery.com>
9322
9323 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9324 (subdir_do): New make target. Copied from gdb/Makefile.
9325 (maintainer-clean, realclean, distclean, clean): Call corresponding
9326 make targets in common/Makefile.
9327
7a762829
YQ
93282011-03-04 Yao Qi <yao@codesourcery.com>
9329
9330 * Makefile.in: Remove GNU make feature --directory.
9331
348af9f7
MS
93322011-03-04 Michael Snyder <msnyder@vmware.com>
9333
9334 * server.c (queue_stop_reply): Call xmalloc not malloc.
9335
93362011-03-02 Michael Snyder <msnyder@vmware.com>
9337
9338 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9339
9f72fee2
MS
93402011-02-28 Michael Snyder <msnyder@vmware.com>
9341
588eebee
MS
9342 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9343 (cmd_qtframe): Ditto.
9344 (cmd_qtbuffer): Ditto.
9345 (cmd_bigqtbuffer): Ditto.
9346
9f72fee2
MS
9347 * utils.c (decimal2str): Initialize 'width' to nine, then
9348 don't mess with it.
9349
8040bd49
UW
93502011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9351
9352 * hostio.c (require_data): Free *data, not data.
9353
7e52cbd0
JK
93542011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9355
9356 * hostio.c (require_data): Use free, not xfree.
9357
9130f83e
MS
93582011-02-27 Michael Snyder <msnyder@vmware.com>
9359
4b812f4e
MS
9360 * server.c (handle_query): Discard unused value.
9361
9130f83e
MS
9362 * hostio.c (require_data): Free malloc memory before returning
9363 error.
9364
69d37113
MS
93652011-02-26 Michael Snyder <msnyder@vmware.com>
9366
9367 * linux-low.c (list_threads): Call closedir for dirent.
9368
35f5825a
MS
93692011-02-27 Michael Snyder <msnyder@vmware.com>
9370
2a589cef
MS
9371 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9372 a case statement falls through.
9373
0adea5f7
MS
9374 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9375
35f5825a
MS
9376 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9377 in comparison.
9378
238f1c74
MS
93792011-02-26 Michael Snyder <msnyder@vmware.com>
9380
9381 * utils.c (decimal2str): Eliminate dead code and dead param.
9382 (pulongest): Drop dead param from call to decimal2str.
9383 (plongest): Ditto.
9384
633ff500
JB
93852011-02-24 Joel Brobecker <brobecker@adacore.com>
9386
9387 Revert the following patch (not approved yet):
9388 2011-02-21 Hui Zhu <teawater@gmail.com>
9389 * tracepoint.c (tp_printf): New function.
9390 (eval_agent_expr): Handle gdb_agent_op_printf.
9391
f9c6ff72
HZ
93922011-02-21 Hui Zhu <teawater@gmail.com>
9393
9394 * tracepoint.c (tp_printf): New function.
9395 (eval_agent_expr): Handle gdb_agent_op_printf.
9396
94d5e490
TT
93972011-02-18 Tom Tromey <tromey@redhat.com>
9398
9399 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9400 (tracepoint.o): Likewise.
9401 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9402 (gdb_agent_op_names): Likewise.
9403
c7f96d2b
TT
94042011-02-18 Tom Tromey <tromey@redhat.com>
9405
9406 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9407 gdb_agent_op_rot>: New constants.
9408 (gdb_agent_op_names): Add pick and roll.
9409 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9410 cases.
9411
0feedb2c
JK
94122011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9413
9414 * aclocal.m4: Regenerated with aclocal-1.11.1.
9415
b3b9301e
PA
94162011-02-14 Pedro Alves <pedro@codesourcery.com>
9417
9418 * server.c (handle_qxfer_traceframe_info): New.
9419 (qxfer_packets): Register "traceframe-info".
9420 (handle_query): Report support for qXfer:traceframe-info:read+.
9421 * tracepoint.c (match_blocktype): New.
9422 (traceframe_find_block_type): Rename to ...
9423 (traceframe_walk_blocks): ... this. Add callback filter argument,
9424 and use it.
9425 (traceframe_find_block_type): New, reimplemented on top of
9426 traceframe_walk_blocks.
9427 (build_traceframe_info_xml): New.
9428 (traceframe_read_info): New.
9429 * server.h (traceframe_read_info): Declare.
9430
4f3e6fb7
YQ
94312011-02-11 Yao Qi <yao@codesourcery.com>
9432
9433 * configure.ac: Call AC_PROG_RANLIB.
9434 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9435 * configure: Regenerate.
9436
764880b7
PA
94372011-02-07 Pedro Alves <pedro@codesourcery.com>
9438
9439 * server.c (gdb_read_memory): Change return semantics to allow
9440 partial transfers.
9441 (handle_search_memory_1): Adjust.
9442 (process_serial_event) <'m' packet>: Handle partial transfers.
9443 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9444
1c79eb8a
PA
94452011-01-28 Pedro Alves <pedro@codesourcery.com>
9446
9447 * regcache.c (init_register_cache): Initialize
9448 regcache->register_status.
9449 (free_register_cache): Release regcache->register_status.
9450 (regcache_cpy): Copy register_status.
9451 (registers_to_string): Print 'x's for unavailable registers.
9452 (supply_register): Mark the register's status valid or
9453 unavailable, depending on whether a buffer was passed in or not.
9454 (supply_register_zeroed): New.
9455 (supply_regblock): Mark the registers' status valid or
9456 unavailable, depending on whether a buffer was passed in or not.
9457 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9458 (struct regcache): New `register_status' field.
9459 (supply_register_zeroed): Declare.
9460 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9461 supply_register_zeroed, rather than passing a NULL buffer to
9462 supply_register.
9463 * tracepoint.c (fetch_traceframe_registers): Update comment.
9464
85724a0e
PA
94652011-01-28 Pedro Alves <pedro@codesourcery.com>
9466
9467 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9468 buffer explicit.
9469
d08aafef
PA
94702011-01-25 Pedro Alves <pedro@codesourcery.com>
9471
9472 * server.h (decode_xfer_write): Change prototype.
9473 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9474 and don't extract the annex here.
9475 * server.c (decode_xfer_read): Remove `annex' parameter,
9476 and don't extract the annex here.
9477 (decode_xfer): New.
9478 (struct qxfer): New.
9479 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9480 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9481 (handle_qxfer_statictrace): New functions, abstracted out from
9482 handle_query, and made to use the struct qxfer interface.
9483 (handle_threads_qxfer_proper): Rename to ...
9484 (handle_qxfer_threads_proper): ... this.
9485 (handle_threads_qxfer): Rename to ...
9486 (handle_qxfer_threads): ... this. Adjust.
9487 (qxfer_packets): New array.
9488 (handle_qxfer): New function.
9489 (handle_query): Use handle_qxfer.
9490
493e2a69
MS
94912011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9492
9493 * gdbreplay.c: Shorten lines of >= 80 columns.
9494 * linux-low.c: Ditto.
9495 * linux-ppc-low.c: Ditto.
9496 * linux-s390-low.c: Ditto.
9497 * linux-sparc-low.c: Ditto.
9498 * linux-x86-low.c: Ditto.
9499 * linux-xtensa-low.c: Ditto.
9500 * mem-break.c: Ditto.
9501 * nto-low.c: Ditto.
9502 * regcache.h: Ditto.
9503 * remote-utils.c: Ditto.
9504 * server.c: Ditto.
9505 * server.h: Ditto.
9506 * thread-db.c: Ditto.
9507 * tracepoint.c: Ditto.
9508 * utils.c: Ditto.
9509 * win32-low.h: Ditto.
9510
44944448
JB
95112011-01-05 Joel Brobecker <brobecker@adacore.com>
9512
9513 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9514 update.
9515
71ce852c
JB
95162011-01-01 Joel Brobecker <brobecker@adacore.com>
9517
9518 * server.c (gdbserver_version): Update copyright year in version
9519 output.
9520 * gdbreplay.c (gdbreplay_version): Ditto.
9521
eb826dc6
MF
95222010-12-29 Jie Zhang <jie.zhang@analog.com>
9523
9524 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9525 * linux-bfin-low.c: New file.
9526 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9527 PT_DATA_ADDR for BFIN targets.
9528 * Makefile.in (SFILES): Add linux-bfin-low.c.
9529 (clean): Remove reg-bfin.c.
9530 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9531 * README: Mention supported Blackfin targets.
9532
39ab222a
MF
95332010-12-23 Mike Frysinger <vapier@gentoo.org>
9534
9535 * .gitignore: New file.
9536
a1f2ce7d
MF
95372010-11-16 Mike Frysinger <vapier@gentoo.org>
9538
9539 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9540
f474844c
JZ
95412010-10-22 Jie Zhang <jie@codesourcery.com>
9542
9543 * Makefile.in: Add FLAGS_TO_PASS variable.
9544 (install): Remove dependency of install-only and recursively
9545 invoke make for install-only.
9546
f1048712
DE
95472010-10-04 Doug Evans <dje@google.com>
9548
9549 * Makefile.in (uninstall): Use $(DESTDIR).
9550
b53a1623
PA
95512010-09-24 Pedro Alves <pedro@codesourcery.com>
9552
e6ee044d
PA
9553 PR gdb/11842
9554
b53a1623
PA
9555 * linux-x86-low.c (compat_siginfo_from_siginfo)
9556 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9557 si_code is < 0. Check for si_code == SI_TIMER before checking for
9558 si_code < 0.
9559
fa1bd1e4
JB
95602010-09-13 Joel Brobecker <brobecker@adacore.com>
9561
9562 * lynx-i386-low.c: New file.
9563 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9564
47fac8f8
JB
95652010-09-13 Joel Brobecker <brobecker@adacore.com>
9566
9567 * lynx-low.c (ptrace_request_to_str): Remove handling for
9568 request values that have been removed in LynxOS 5.x.
9569
1adfc54d
JB
95702010-09-13 Joel Brobecker <brobecker@adacore.com>
9571
9572 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9573 <ptrace.h>
9574
c2a66c29
NS
95752010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9576
9577 * configure.ac: Add --enable-inprocess-agent option.
9578 * configure: Rebuilt.
9579
32fcada3
YQ
95802010-09-06 Yao Qi <yao@codesourcery.com>
9581
9582 * linux-low.c (linux_kill): Remove unused variable.
9583 (linux_stabilize_threads): Likewise.
9584 * server.c (start_inferior): Likewise.
9585 (queue_stop_reply_callback): Likewise.
9586 * tracepoint.c (do_action_at_tracepoint): Likewise.
9587
0cccb683
YQ
95882010-09-06 Yao Qi <yao@codesourcery.com>
9589
9590 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9591 on return.
9592
423ec54c
JK
95932010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9594
9595 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9596
12ac6819
PA
95972010-09-06 Pedro Alves <pedro@codesourcery.com>
9598
9599 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9600 "$(IPA_DEPFILES)".
9601
8ed54b31
JB
96022010-09-01 Joel Brobecker <brobecker@adacore.com>
9603
9604 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9605 gdbserver/lynx-ppc-low.c: New files.
9606 * Makefile.in (lynx_low_h): New variable.
9607 (lynx-low.o, lynx-ppc-low.o): New rules.
9608 * configure.ac: On LynxOS, link with -lnetinet.
9609 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9610 * configure: regenerate.
9611
bb0116a4
JB
96122010-09-01 Joel Brobecker <brobecker@adacore.com>
9613
9614 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9615 * configure.ac: Add check for vasprintf and vsnprintf.
9616 * configure, config.in: Regenerate.
9617 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9618
a778ab81 96192010-09-01 Joel Brobecker <brobecker@adacore.com>
9620
9621 * gdbreplay.c: Move include of alloca.h up, next to include of
9622 malloc.h.
9623 * server.h: Add include of malloc.h.
9624 * mem-break.c: Remove include of malloc.h.
9625 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9626
8b034a19 96272010-09-01 Joel Brobecker <brobecker@adacore.com>
9628
9629 * Makefile.in (memmem.o): Build with -Wno-error.
9630
96312010-09-01 Joel Brobecker <brobecker@adacore.com>
9632
9633 * utils.c (xsnprintf): Make non-static.
9634 * server.h: Add xsnprintf declaration.
9635 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9636 replace calls to snprintf by calls to xsnprintf throughout.
9637
96382010-09-01 Joel Brobecker <brobecker@adacore.com>
9639
9640 * configure.ac: Add configure check for alloca.
9641 * configure, config.in: Regenerate.
9642 * server.h: Include alloca.h if it exists.
9643 * gdbreplay.c: Include alloca.h if it exists.
9644
1a981360
PA
96452010-08-28 Pedro Alves <pedro@codesourcery.com>
9646
9647 * linux-low.c (__SIGRTMIN): Define if not already defined.
9648 (linux_create_inferior): Check for __ANDROID__ rather than
9649 __SIGRTMIN.
9650 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9651 are already deferred.
9652 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9653 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9654 stopped and already has a pending signal to report.
9655 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9656 a pending signal to report or is moving out of a jump pad.
9657 (linux_init_signals): Check for __ANDROID__ rather than
9658 __SIGRTMIN.
9659
b4d51a55
PA
96602010-08-28 Pedro Alves <pedro@codesourcery.com>
9661
9662 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9663 debug_threads check. Avoid a linear search when not doing debug
9664 output.
9665
ec48365d
PA
96662010-08-27 Pedro Alves <pedro@codesourcery.com>
9667
9668 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9669 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9670 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9671 (process_event): Change local fd's type to gdb_fildes_t.
9672 (create_file_handler): Adjust prototype.
9673 (delete_file_handler): Adjust prototype.
9674 (handle_file_event): Adjust prototype. Use pfildes.
9675 (create_file_event): Adjsut prototype.
9676 * remote-utils.c (remote_desc, listen_desc): Change type to
9677 gdb_fildes_t.
9678 * server.h: New gdb_fildes_t typedef.
9679 [USE_WIN32API]: Include winsock2.h.
9680 (delete_file_handler, add_file_handler): Adjust prototypes.
9681 (pfildes): Declare.
9682 * utils.c (pfildes): New.
9683
854d88f0
PA
96842010-08-27 Pedro Alves <pedro@codesourcery.com>
9685
9686 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9687 * configure: Regenerate.
9688
0146f85b
PA
96892010-08-27 Pedro Alves <pedro@codesourcery.com>
9690
9691 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9692 (linux_done_accessing_memory): ... this.
9693 (linux_target_ops): Adjust.
9694 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9695 * nto-low.c (nto_target_ops): Adjust comment.
9696 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9697 * spu-low.c (spu_target_ops): Adjust comment.
9698 * target.h (target_ops): Rename unprepare_to_access_memory field
9699 to done_accessing_memory.
9700 (unprepare_to_access_memory): Rename to ...
9701 (done_accessing_memory): ... this.
9702
90d74c30
PA
97032010-08-26 Pedro Alves <pedro@codesourcery.com>
9704
9705 * linux-low.c (linux_prepare_to_access_memory): New.
9706 (linux_unprepare_to_access_memory): New.
9707 (linux_target_ops): Install them.
9708 * server.c (read_memory): Rename to ...
9709 (gdb_read_memory): ... this. Use
9710 prepare_to_access_memory/prepare_to_access_memory.
9711 (write_memory): Rename to ...
9712 (gdb_write_memory): ... this. Use
9713 prepare_to_access_memory/prepare_to_access_memory.
9714 (handle_search_memory_1): Adjust.
9715 (process_serial_event): Adjust.
9716 * target.h (struct target_ops): New fields
9717 prepare_to_access_memory and unprepare_to_access_memory.
9718 (prepare_to_access_memory, unprepare_to_access_memory): New.
9719 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9720 prepare_to_access_memory/prepare_to_access_memory.
9721 * nto-low.c (nto_target_ops): Adjust.
9722 * spu-low.c (spu_target_ops): Adjust.
9723 * win32-low.c (win32_target_ops): Adjust.
9724
fd467969
PA
97252010-08-26 Pedro Alves <pedro@codesourcery.com>
9726
9727 * Makefile.in (WARN_CFLAGS): Get it from configure.
9728 (WERROR_CFLAGS): New.
9729 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9730 * configure.ac: Introduce --enable-werror, which adds -Werror to
9731 the compiler command line. Enabled by default. Disable with
9732 --disable-werror. Add -Wdeclaration-after-statement
9733 Wpointer-arith and -Wformat-nonliteral to warning flags.
9734 * configure: Regenerate.
9735
331e2f5f
PA
97362010-08-26 Pedro Alves <pedro@codesourcery.com>
9737
9738 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9739
e581f2b4
PA
97402010-08-26 Pedro Alves <pedro@codesourcery.com>
9741
9742 * gdbreplay.c (remote_error): New.
9743 (gdbchar): New.
9744 (expect): Use gdbchar. Check for error reading from GDB.
9745 Clarify sync error output.
9746 (play): Check for errors writing to GDB.
9747 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9748 * remote-utils.c (getpkt): Check for errors writing to the remote
9749 descriptor.
9750
3c11dd79
PA
97512010-08-25 Pedro Alves <pedro@codesourcery.com>
9752
9753 * linux-low.c (linux_wait_1): Move non-debugging code out of
9754 `debug_threads' control.
9755
d20a8ad9
PA
97562010-08-25 Pedro Alves <pedro@codesourcery.com>
9757
9758 * linux-low.c (linux_wait_1): Don't set last_status here.
9759 * server.c (push_event, queue_stop_reply_callback): Assert we're
9760 not pushing a TARGET_WAITKIND_IGNORE event.
9761 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9762 (myresume, handle_target_event): Set the thread's last_resume_kind
9763 and last_status from the target returned status.
9764
964e4306
PA
97652010-08-25 Pedro Alves <pedro@codesourcery.com>
9766
9767 PR threads/10729
9768
9769 * linux-x86-low.c (update_debug_registers_callback): New.
9770 (i386_dr_low_set_addr): Use it.
9771 (i386_dr_low_get_addr): New.
9772 (i386_dr_low_set_control): Use update_debug_registers_callback.
9773 (i386_dr_low_get_control): New.
9774 (i386_dr_low_get_status): Adjust.
9775 * linux-low.c (linux_stop_lwp): New.
9776 * linux-low.h (linux_stop_lwp): Declare.
9777
9778 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9779 argument instead of a i386_debug_reg_state.
9780 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9781 a i386_debug_reg_state.
9782 (i386_insert_aligned_watchpoint): Adjust.
9783 (i386_remove_aligned_watchpoint): Adjust.
9784 (i386_low_stopped_data_address): Read the debug registers from the
9785 inferior instead of from the mirrors.
9786 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9787 (i386_dr_low_get_addr): Declare.
9788 (i386_dr_low_get_control): Declare.
9789 (i386_dr_low_get_status): Change prototype.
9790
9791 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9792 (i386_dr_low_get_addr): New.
9793 (i386_dr_low_get_control): New.
9794 (i386_dr_low_get_status): Adjust prototype. Return
9795 dr_status_mirror.
9796 (i386_initial_stuff): Clear dr_status_mirror and
9797 dr_control_mirror.
9798 (i386_get_thread_context): Adjust.
9799 (i386_set_thread_context): Adjust.
9800 (i386_thread_added): Adjust.
9801
5f21a75b
PA
98022010-08-24 Pedro Alves <pedro@codesourcery.com>
9803
9804 * linux-low.h (linux_thread_area): Delete declaration.
9805
3e4c1235
TS
98062010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9807
9808 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9809 after its termination.
9810
1971b033
PA
98112010-08-09 Pedro Alves <pedro@codesourcery.com>
9812
9813 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9814 (gdb_wants_all_stopped): Delete.
9815 (linux_wait_1): Don't call them.
9816 * server.c (handle_v_cont): Tag all threads as want-stopped.
9817 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9818 stopped as "client-wants-stopped".
9819
310444ac
PA
98202010-07-31 Pedro Alves <pedro@codesourcery.com>
9821
9822 * Makefile.in (signals_h): New.
9823 (server_h): Depend on it.
9824 (server.o): Don't depend on $(signals_def).
9825 (signals.o): Depend on $(signals_def).
9826
a19cae16
JK
98272010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9828
9829 * Makefile.in (signals_def): New.
9830 (server_h): Append include/gdb/signals.h and signals_def.
9831 (server.o): Append signals_def.
9832
30d50328
JK
98332010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9834
9835 * server.c (handle_target_event): Use target_signal_to_host for
9836 resume_info.sig initialization.
9837 * target.h (struct thread_resume) <sig>: New comment.
9838
5c3216e2
OS
98392010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9840
c6f46ca0
OS
9841 * server.c (handle_query): strcpy() the returned string from paddress()
9842 instead of sprintf().
5c3216e2
OS
9843 * utils.c (paddress): Return phex_nz().
9844
6bd31874
JB
98452010-07-07 Joel Brobecker <brobecker@adacore.com>
9846
9847 * server.c (handle_v_cont): Call mourn_inferior if process
9848 just exited.
9849 (myresume): Likewise.
9850
0fb4aa4b
PA
98512010-07-01 Pedro Alves <pedro@codesourcery.com>
9852
9853 Static tracepoints, and integration with UST.
9854
9855 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9856 * mem-break.c (uninsert_all_breakpoints)
9857 (reinsert_all_breakpoints): New.
9858 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9859 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9860 (gdb_agent_ust_loaded, helper_thread_id)
9861 (gdb_agent_helper_thread_id): New macros.
9862 (struct ipa_sym_addresses): Add addr_ust_loaded,
9863 addr_helper_thread_id, addr_cmd_buf.
9864 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9865 (in_process_agent_loaded_ust): New.
9866 (write_e_ust_not_loaded): New.
9867 (maybe_write_ipa_ust_not_loaded): New.
9868 (struct collect_static_trace_data_action): New.
9869 (enum tracepoint_type) <static_tracepoint>: New.
9870 (struct tracepoint) <handle>: Mention static tracepoints.
9871 (struct static_tracepoint_ctx): New.
9872 (CMD_BUF_SIZE): New.
9873 (add_tracepoint_action): Handle static tracepoint actions.
9874 (unprobe_marker_at): New.
9875 (clear_installed_tracepoints): Handle static tracepoints.
9876 (cmd_qtdp): Handle static tracepoints.
9877 (probe_marker_at): New.
9878 (cmd_qtstart): Handle static tracepoints.
9879 (response_tracepoint): Handle static tracepoints.
9880 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9881 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9882 (get_context_regcache): Handle static tracepoints.
9883 (do_action_at_tracepoint): Handle static tracepoint actions.
9884 (traceframe_find_block_type): Handle static trace data blocks.
9885 (traceframe_read_sdata): New.
9886 (download_tracepoints): Download static tracepoint actions.
9887 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9888 (GDB_PROBE_NAME): New.
9889 (ust_ops): New.
9890 (GET_UST_SYM): New.
9891 (USTF): New.
9892 (dlsym_ust): New.
9893 (ust_marker_to_static_tracepoint): New.
9894 (gdb_probe): New.
9895 (collect_ust_data_at_tracepoint): New.
9896 (gdb_ust_probe): New.
9897 (UNIX_PATH_MAX, SOCK_DIR): New.
9898 (gdb_ust_connect_sync_socket): New.
9899 (resume_thread, stop_thread): New.
9900 (run_inferior_command): New.
9901 (init_named_socket): New.
9902 (gdb_ust_socket_init): New.
9903 (cstr_to_hexstr): New.
9904 (next_st): New.
9905 (first_marker, next_marker): New.
9906 (response_ust_marker): New.
9907 (cmd_qtfstm, cmd_qtsstm): New.
9908 (unprobe_marker_at, probe_marker_at): New.
9909 (cmd_qtstmat, gdb_ust_thread): New.
9910 (gdb_ust_init): New.
9911 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9912 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9913 (ST_REGENTRY): New.
9914 (x86_64_st_collect_regmap): New.
9915 (X86_64_NUM_ST_COLLECT_GREGS): New.
9916 (AMD64_RIP_REGNUM): New.
9917 (supply_static_tracepoint_registers): New.
9918 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9919 (ST_REGENTRY): New.
9920 (i386_st_collect_regmap): New.
9921 (i386_NUM_ST_COLLECT_GREGS): New.
9922 (supply_static_tracepoint_registers): New.
9923 * server.c (handle_query): Handle qXfer:statictrace:read.
9924 <qSupported>: Report support for StaticTracepoints, and
9925 qXfer:statictrace:read features.
9926 * server.h (traceframe_read_sdata)
9927 (supply_static_tracepoint_registers): Declare.
9928 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9929 (unpack_varlen_hex): Include in IPA build.
9930 * Makefile.in (ustlibs, ustinc): New.
9931 (IPA_OBJS): Add remote-utils-ipa.o.
9932 ($(IPA_LIB)): Link -ldl and -lpthread.
9933 (UST_CFLAGS): New.
9934 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9935 * config.in, configure: Regenerate.
9936
9e4344e5
PA
99372010-06-20 Ian Lance Taylor <iant@google.com>
9938 Pedro Alves <pedro@codesourcery.com>
9939
9940 * linux-x86-low.c (always_true): Delete.
9941 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9942 trying to fool the compiler with always_true.
9943
c6beb2cb
PA
99442010-06-20 Pedro Alves <pedro@codesourcery.com>
9945
9946 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9947 conditions in gdbserver.
9948
d2ed6730
UW
99492010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9950
9951 * spu-low.c (spu_read_memory): Wrap around local store limit.
9952 (spu_write_memory): Likewise.
9953
4e29fb54
PA
99542010-06-15 Pedro Alves <pedro@codesourcery.com>
9955
9956 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9957 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9958 LONGEST uses.
9959 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9960 uses.
9961 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9962 uses with LONGEST uses.
9963
6a271cae
PA
99642010-06-14 Stan Shebs <stan@codesourcery.com>
9965 Pedro Alves <pedro@codesourcery.com>
9966
9967 Bytecode compiler.
9968
9969 * linux-x86-low.c: Include limits.h.
9970 (add_insns): New.
9971 (always_true): New.
9972 (EMIT_ASM): New.
9973 (EMIT_ASM32): New.
9974 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9975 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9976 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9977 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9978 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9979 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9980 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9981 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9982 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9983 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9984 (amd64_emit_void_call_2): New.
9985 (amd64_emit_ops): New.
9986 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9987 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9988 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9989 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9990 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9991 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9992 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9993 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9994 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9995 (i386_emit_stack_adjust, i386_emit_int_call_1)
9996 (i386_emit_void_call_2): New.
9997 (i386_emit_ops): New.
9998 (x86_emit_ops): New.
9999 (the_low_target): Install x86_emit_ops.
10000 * server.h (struct emit_ops): New.
10001 (get_raw_reg_func_addr): Declare.
10002 (current_insn_ptr, emit_error): Declare.
10003 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10004 (set_trace_state_variable_value): New defines.
10005 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10006 addr_get_trace_state_variable_value and
10007 addr_set_trace_state_variable_value.
10008 (symbol_list): New fields for get_raw_reg,
10009 get_trace_state_variable_value and set_trace_state_variable_value.
10010 (condfn): New typedef.
10011 (struct tracepoint): New field `compiled_cond'.
10012 (do_action_at_tracepoint): Clear compiled_cond.
10013 (get_trace_state_variable_value, set_trace_state_variable_value):
10014 Export in the IPA.
10015 (condition_true_at_tracepoint): If there's a compiled condition,
10016 run that.
10017 (current_insn_ptr, emit_error): New globals.
10018 (struct bytecode_address): New.
10019 (get_raw_reg_func_addr): New.
10020 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10021 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10022 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10023 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10024 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10025 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10026 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10027 (compile_tracepoint_condition, compile_bytecodes): New.
10028 * target.h (emit_ops): Forward declare.
10029 (struct target_ops): New field emit_ops.
10030 (target_emit_ops): New.
10031 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10032 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10033 * linux-low.c (linux_emit_ops): New.
10034 (linux_target_ops): Install it.
10035 * linux-low.h (struct linux_target_ops): New field emit_ops.
10036
92b72907
UW
100372010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10038
10039 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10040 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10041
fa593d66
PA
100422010-06-01 Pedro Alves <pedro@codesourcery.com>
10043 Stan Shebs <stan@codesourcery.com>
10044
10045 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10046 (all): Depend on $(extra_libraries).
10047 (install-only): Install the IPA.
10048 (IPA_OBJS, IPA_LIB): New.
10049 (clean): Remove the IPA lib.
10050 (IPAGENT_CFLAGS): New.
10051 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10052 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10053 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10054 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10055 * configure.ac: Check for atomic builtins support in the compiler.
10056 (IPA_DEPFILES, extra_libraries): Define.
10057 * configure.srv (ipa_obj): Add description.
10058 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10059 (i[34567]86-*-linux*): Set ipa_obj.
10060 (x86_64-*-linux*): Set ipa_obj.
10061 * linux-low.c (stabilizing_threads): New.
10062 (supports_fast_tracepoints): New.
10063 (linux_detach): Stabilize threads before detaching.
10064 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10065 the lwp is either not stabilizing, or is moving out of a jump pad.
10066 (linux_fast_tracepoint_collecting): New.
10067 (maybe_move_out_of_jump_pad): New.
10068 (enqueue_one_deferred_signal): New.
10069 (dequeue_one_deferred_signal): New.
10070 (linux_wait_for_event_1): If moving out of a jump pad, defer
10071 pending signals to later.
10072 (linux_stabilize_threads): New.
10073 (linux_wait_1): Check if threads need moving out of jump pads, and
10074 do it if so.
10075 (stuck_in_jump_pad_callback): New.
10076 (move_out_of_jump_pad_callback): New.
10077 (lwp_running): New.
10078 (linux_resume_one_lwp): Handle moving out of jump pads.
10079 (linux_set_resume_request): Dequeue deferred signals.
10080 (need_step_over_p): Also step over fast tracepoint jumps.
10081 (start_step_over): Also uninsert fast tracepoint jumps.
10082 (finish_step_over): Also reinsert fast tracepoint jumps.
10083 (linux_install_fast_tracepoint_jump): New.
10084 (linux_target_ops): Install linux_stabilize_threads and
10085 linux_install_fast_tracepoint_jump_pad.
10086 * linux-low.h (linux_target_ops) <get_thread_area,
10087 install_fast_tracepoint_jump_pad>: New fields.
10088 (struct lwp_info) <collecting_fast_tracepoint,
10089 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10090 (linux_get_thread_area): Declare.
10091 * linux-x86-low.c (jump_insn): New.
10092 (x86_get_thread_area): New.
10093 (append_insns): New.
10094 (push_opcode): New.
10095 (amd64_install_fast_tracepoint_jump_pad): New.
10096 (i386_install_fast_tracepoint_jump_pad): New.
10097 (x86_install_fast_tracepoint_jump_pad): New.
10098 (the_low_target): Install x86_get_thread_area and
10099 x86_install_fast_tracepoint_jump_pad.
10100 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10101 (struct fast_tracepoint_jump): New.
10102 (fast_tracepoint_jump_insn): New.
10103 (fast_tracepoint_jump_shadow): New.
10104 (find_fast_tracepoint_jump_at): New.
10105 (fast_tracepoint_jump_here): New.
10106 (delete_fast_tracepoint_jump): New.
10107 (set_fast_tracepoint_jump): New.
10108 (uninsert_fast_tracepoint_jumps_at): New.
10109 (reinsert_fast_tracepoint_jumps_at): New.
10110 (set_breakpoint_at): Use write_inferior_memory.
10111 (uninsert_raw_breakpoint): Use write_inferior_memory.
10112 (check_mem_read): Mask out fast tracepoint jumps.
10113 (check_mem_write): Mask out fast tracepoint jumps.
10114 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10115 (set_fast_tracepoint_jump): Declare.
10116 (delete_fast_tracepoint_jump)
10117 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10118 (reinsert_fast_tracepoint_jumps_at): Declare.
10119 * regcache.c: Don't compile many functions when building the
10120 in-process agent library.
10121 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10122 the register buffer in the heap.
10123 (free_register_cache): If the register buffer isn't owned by the
10124 regcache, don't free it.
10125 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10126 pre-existing register caches.
10127 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10128 type.
10129 (convert_ascii_to_int): : Constify `from' parameter type.
10130 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10131 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10132 the needed buffer in-place.
10133 (relocate_instruction): New.
10134 * server.c (handle_query) <qSymbols>: If the target supports
10135 tracepoints, give it a chance of looking up symbols. Report
10136 support for fast tracepoints.
10137 (handle_status): Stabilize threads.
10138 (process_serial_event): Adjust.
10139 * server.h (struct fast_tracepoint_jump): Forward declare.
10140 (struct process_info) <fast_tracepoint_jumps>: New field.
10141 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10142 (decode_X_packet, decode_M_packet): Adjust.
10143 (relocate_instruction): Declare.
10144 (in_process_agent_loaded): Declare.
10145 (tracepoint_look_up_symbols): Declare.
10146 (struct fast_tpoint_collect_status): Declare.
10147 (fast_tracepoint_collecting): Declare.
10148 (force_unlock_trace_buffer): Declare.
10149 (handle_tracepoint_bkpts): Declare.
10150 (initialize_low_tracepoint)
10151 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10152 * target.h (struct target_ops) <stabilize_threads,
10153 install_fast_tracepoint_jump_pad>: New fields.
10154 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10155 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10156 [HAVE_STDINT_H]: Include stdint.h.
10157 (trace_debug_1): Rename to ...
10158 (trace_vdebug): ... this.
10159 (trace_debug): Rename to ...
10160 (trace_debug_1): ... this. Add `level' parameter.
10161 (trace_debug): New.
10162 (ATTR_USED, ATTR_NOINLINE): New.
10163 (IP_AGENT_EXPORT): New.
10164 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10165 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10166 (about_to_request_buffer_space, trace_buffer_is_full)
10167 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10168 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10169 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10170 (traceframe_write_count, traceframes_created)
10171 (trace_state_variables)
10172 New renaming defines.
10173 (struct ipa_sym_addresses): New.
10174 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10175 (symbol_list): New.
10176 (ipa_sym_addrs): New.
10177 (all_tracepoint_symbols_looked_up): New.
10178 (in_process_agent_loaded): New.
10179 (write_e_ipa_not_loaded): New.
10180 (maybe_write_ipa_not_loaded): New.
10181 (tracepoint_look_up_symbols): New.
10182 (debug_threads) [IN_PROCESS_AGENT]: New.
10183 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10184 (UNKNOWN_SIDE_EFFECTS): New.
10185 (stop_tracing): New.
10186 (flush_trace_buffer): New.
10187 (stop_tracing_bkpt): New.
10188 (flush_trace_buffer_bkpt): New.
10189 (read_inferior_integer): New.
10190 (read_inferior_uinteger): New.
10191 (read_inferior_data_pointer): New.
10192 (write_inferior_data_pointer): New.
10193 (write_inferior_integer): New.
10194 (write_inferior_uinteger): New.
10195 (struct collect_static_trace_data_action): Delete.
10196 (enum tracepoint_type): New.
10197 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10198 <actions_str, step_actions, step_actions_str>: Only include in
10199 GDBserver.
fa593d66
PA
10200 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10201 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10202 (tracepoints): Use IP_AGENT_EXPORT.
10203 (last_tracepoint): Don't include in the IPA.
10204 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10205 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10206 (alloced_trace_state_variables): New.
10207 (trace_state_variables): Use IP_AGENT_EXPORT.
10208 (traceframe_t): Delete unused variable.
10209 (circular_trace_buffer): Don't include in the IPA.
10210 (trace_buffer_start): Delete.
10211 (struct trace_buffer_control): New.
10212 (trace_buffer_free): Delete.
10213 (struct ipa_trace_buffer_control): New.
10214 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10215 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10216 New.
10217 (trace_buffer_ctrl): New.
10218 (TRACE_BUFFER_CTRL_CURR): New.
10219 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10220 Reimplement as macros.
10221 (trace_buffer_wrap): Delete.
10222 (traceframe_write_count, traceframe_read_count)
10223 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10224 (struct tracepoint_hit_ctx) <type>: New field.
10225 (struct fast_tracepoint_ctx): New.
10226 (memory_barrier): New.
10227 (cmpxchg): New.
10228 (record_tracepoint_error): Update atomically in the IPA.
10229 (clear_inferior_trace_buffer): New.
10230 (about_to_request_buffer_space): New.
10231 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10232 updating the same buffer.
10233 (add_tracepoint): Default the tracepoint's type to trap
10234 tracepoint, and orig_size to -1.
10235 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10236 internal variables.
10237 (create_trace_state_variable): New parameter `gdb'. Handle it.
10238 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10239 (cmd_qtdp): Handle fast tracepoints.
10240 (cmd_qtdv): Adjust.
10241 (max_jump_pad_size): New.
10242 (gdb_jump_pad_head): New.
10243 (get_jump_space_head): New.
10244 (claim_jump_space): New.
10245 (sort_tracepoints): New.
10246 (MAX_JUMP_SIZE): New.
10247 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10248 IPA.
10249 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10250 support. Upload fast traceframes, and delete internal IPA
10251 breakpoints.
10252 (stop_tracing_handler): New.
10253 (flush_trace_buffer_handler): New.
10254 (cmd_qtstop): Upload fast tracepoints.
10255 (response_tracepoint): Handle fast tracepoints.
10256 (tracepoint_finished_step): Upload fast traceframes. Set the
10257 tracepoint hit context's tracepoint type.
10258 (handle_tracepoint_bkpts): New.
10259 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10260 type. Add comment about fast tracepoints.
10261 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10262 non-existing action_str field.
10263 (get_context_regcache): Handle fast tracepoints.
10264 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10265 to the regcache.
10266 (fast_tracepoint_from_jump_pad_address): New.
10267 (fast_tracepoint_from_ipa_tpoint_address): New.
10268 (collecting_t): New.
10269 (force_unlock_trace_buffer): New.
10270 (fast_tracepoint_collecting): New.
10271 (collecting): New.
10272 (gdb_collect): New.
10273 (write_inferior_data_ptr): New.
10274 (target_tp_heap): New.
10275 (target_malloc): New.
10276 (download_agent_expr): New.
10277 (UALIGN): New.
10278 (download_tracepoints): New.
10279 (download_trace_state_variables): New.
10280 (upload_fast_traceframes): New.
10281 (IPA_FIRST_TRACEFRAME): New.
10282 (IPA_NEXT_TRACEFRAME_1): New.
10283 (IPA_NEXT_TRACEFRAME): New.
10284 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10285 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10286 (gdb_jump_pad_buffer_end): New.
10287 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10288 (initialize_tracepoint): Adjust.
10289 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10290 buffer. Initialize the low module.
10291 * utils.c (PREFIX, TOOLNAME): New.
10292 (malloc_failure): Use PREFIX.
10293 (error): In the IPA, an error causes an exit.
10294 (fatal, warning): Use PREFIX.
10295 (internal_error): Use TOOLNAME.
10296 (NUMCELLS): Increase to 10.
10297 * configure, config.in: Regenerate.
10298
d149dd1d
PA
102992010-06-01 Pedro Alves <pedro@codesourcery.com>
10300
10301 * server.c (handle_query) <qSupported>: Do two passes over the
10302 qSupported string to avoid nesting strtok.
10303
f6528abd
JK
103042010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10305
10306 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10307 (CDEPS): New.
10308 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10309 -Wl,--dynamic-list.
10310 * configure: Regenerate.
10311 * proc-service.list: New.
10312
ca2a87a0
JK
103132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10314
10315 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10316 New comment.
10317
363a6e9f
OS
103182010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10319
10320 * gdbreplay.c (remote_open): Check error return from socket() call by
10321 its equality to -1 not by it being negative.
10322 * remote-utils.c (remote_open): Likewise.
10323
d23b6cb1
PA
103242010-05-23 Pedro Alves <pedro@codesourcery.com>
10325
10326 * config.h: Regenerate.
10327
28d3cf85
MK
103282010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10329
10330 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10331 doesn't provide PTRACE_GET_THREAD_AREA.
10332
fea36a59
MK
103332010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10334
10335 * linux-m68k-low.c: Include <asm/ptrace.h>
10336 (ps_get_thread_area): Implement.
10337
24b066ba
DE
103382010-05-03 Doug Evans <dje@google.com>
10339
10340 * event-loop.c (struct callback_event): New struct.
10341 (callback_list): New global.
10342 (append_callback_event, delete_callback_event): New functions.
10343 (process_callback): New function.
10344 (start_event_loop): Call it.
10345 * remote-utils.c (NOT_SCHEDULED): Define.
10346 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10347 moved out of readchar.
10348 (readchar): Rewrite. Call reschedule before returning.
10349 (reset_readchar): New function.
10350 (remote_close): Call it.
10351 (process_remaining, reschedule): New functions.
10352 * server.h (callback_handler_func): New typedef.
10353 (append_callback_event, delete_callback_event): Declare.
10354
9836d6ea
PA
103552010-05-03 Pedro Alves <pedro@codesourcery.com>
10356
10357 * proc-service.c (ps_pglobal_lookup): Use
10358 thread_db_look_up_one_symbol.
10359 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10360 parameter. Use it instead of all_symbols_looked_up.
10361 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10362 field.
10363 (all_symbols_looked_up): Don't declare.
10364 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10365 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10366 field.
10367 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10368 Set all_symbols_looked_up here.
10369 (thread_db_look_up_one_symbol): New.
10370 (thread_db_get_tls_address): Adjust.
10371 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10372 thread_db object on the heap, and tentatively set it in the
10373 process structure.
10374 (thread_db_init): Don't set all_symbols_looked_up here.
10375 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10376
7984d532
PA
103772010-05-03 Pedro Alves <pedro@codesourcery.com>
10378
10379 * linux-low.c (linux_kill, linux_detach): Adjust.
10380 (status_pending_p_callback): Remove redundant statement. Check
10381 for !TARGET_WAITIKIND_IGNORE, instead of
10382 TARGET_WAITKIND_STOPPED.
10383 (handle_tracepoints): Make sure LWP is locked. Adjust.
10384 (linux_wait_for_event_1): Adjust.
10385 (linux_cancel_breakpoints): New.
10386 (unsuspend_one_lwp): New.
10387 (unsuspend_all_lwps): New.
10388 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10389 (send_sigstop_callback): Change return type to int, add new
10390 `except' parameter and handle it.
10391 (suspend_and_send_sigstop_callback): New.
10392 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10393 pass them down. If SUSPEND, also increment the lwp's suspend
10394 count.
10395 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10396 (need_step_over_p): Don't consider suspended LWPs.
10397 (start_step_over): Adjust.
10398 (proceed_one_lwp): Change return type to int, add new `except'
10399 parameter and handle it.
10400 (unsuspend_and_proceed_one_lwp): New.
10401 (proceed_all_lwps): Use find_inferior instead of
10402 for_each_inferior.
10403 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10404 also decrement the suspend count of LWPs. Pass `except' down,
10405 instead of hacking its suspend count.
10406 (linux_pause_all): Add `freeze' parameter. Adjust.
10407 (linux_unpause_all): New.
10408 (linux_target_ops): Install linux_unpause_all.
10409 * server.c (handle_status): Adjust.
10410 * target.h (struct target_ops): New fields `unpause_all' and
10411 `cancel_breakpoints'. Add new parameter to `pause_all'.
10412 (pause_all): Add new `freeze' parameter.
10413 (unpause_all): New.
10414 (cancel_breakpoints): New.
10415 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10416 cancel breakpoints.
10417 (cmd_qtstart): Pause threads.
10418 (stop_tracing): Pause threads, and cancel breakpoints.
10419 * win32-low.c (win32_target_ops): Adjust.
10420
e471f25b
PA
104212010-05-03 Pedro Alves <pedro@codesourcery.com>
10422
10423 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10424 the inferior right away from here...
10425 (linux_wait_1): ... to here, and adjust to check the thread's
10426 last_resume_kind instead of the lwp's step or stop_expected flags.
10427
1915ef4f
PA
104282010-05-02 Pedro Alves <pedro@codesourcery.com>
10429
10430 * README: Use consistent `GDB' and `GDBserver' spellings.
10431
f9e39928
PA
104322010-05-02 Pedro Alves <pedro@codesourcery.com>
10433
10434 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10435 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10436 (linux_detach_one_lwp): Assume the lwp is stopped.
10437 (any_thread_of): Delete.
10438 (linux_detach): Stop all lwps here. Don't blindly delete all
10439 breakpoints.
10440 (delete_lwp_callback): New.
10441 (linux_mourn): Delete all lwps of the process that is gone.
10442 (linux_wait_1): Don't delete the last lwp of the process here.
10443 * mem-break.h (mark_breakpoints_out): Declare.
10444 * mem-break.c (mark_breakpoints_out): New.
10445 (free_all_breakpoints): Use it.
10446 * server.c (handle_target_event): If the process is gone, mark
10447 breakpoints out.
10448 * thread-db.c (struct thread_db) <create_bp>: New field.
10449 (thread_db_enable_reporting): Fix prototype. Store a thread event
10450 breakpoint reference in the thread_db struct.
10451 (thread_db_load_search): Clear the thread_db object.
10452 (try_thread_db_load_1): Ditto.
10453 (switch_to_process): New.
10454 (disable_thread_event_reporting): Use it.
10455 (remove_thread_event_breakpoints): New.
10456 (thread_db_detach, thread_db_mourn): Use it.
10457
1e7fc18c
PA
104582010-05-01 Pedro Alves <pedro@codesourcery.com>
10459
10460 * linux-low.c (linux_enable_event_reporting): New.
10461 (linux_wait_for_event_1, handle_extended_wait): Use it.
10462
02fc4de7
PA
104632010-04-30 Pedro Alves <pedro@codesourcery.com>
10464
10465 * linux-low.c (linux_kill_one_lwp, linux_kill)
10466 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10467 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10468 SIGSTOP even if the LWP is stopped.
10469 (send_sigstop_callback): New.
10470 (stop_all_lwps): Use send_sigstop_callback instead.
10471 (linux_resume_one_thread): Adjust.
10472 (proceed_one_lwp): Still proceed an LWP that the client has
10473 requested to stop, if we haven't reported it as stopped yet. Make
10474 sure that LWPs the client want stopped, have a pending SIGSTOP.
10475
bc3b5632
DE
104762010-04-26 Doug Evans <dje@google.com>
10477
ae1ada35
DE
10478 * server.c (handle_general_set): Make static.
10479
bc3b5632
DE
10480 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10481 Print received char after testing for error/eof instead of before.
10482 (input_interrupt): Tweak comment.
10483
65730243
DE
104842010-04-23 Doug Evans <dje@google.com>
10485
10486 * server.c (start_inferior): Print inferior argv if --debug.
10487
a8ae7dc0
AR
104882010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10489
10490 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10491 * nto-x86-low.c: Include server.h
10492
1c07cc19
PM
104932010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10494
10495 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10496 be consistent with other sources of this directory.
10497 (init_registers_amd64): Correct name of source file of this function
10498 in the comment.
10499
e0a61e09
PM
105002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10501
10502 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10503 64-bit executables.
10504
54709339
PM
105052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10506
10507 * win32-i386-low.c: Add 64-bit support.
10508 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10509 (init_registers_amd64): Declare.
10510 (mappings): Add 64-bit version of array.
10511 (init_windows_x86): New function.
10512 (the_low_target): Change init_arch field to init_windows_x86.
10513
e8f0053d
PM
105142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10515
10516 * win32-low.c: Adapt to support also 64-bit architecture.
10517 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10518 (get_image_name): Use SIZE_T type for local variable `done'.
10519 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10520 (toolhelp_get_dll_name): Idem.
10521 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10522 Use uintptr_t typecast to avoid warning.
10523 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10524 (handle_exception): Use phex_nz to avoid warning.
10525 (win32_wait): Remove unused local variable `process'.
10526
c481e77e
PM
105272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10528
10529 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10530 `amd64-avx.o'.
10531
12ea4b69
PM
105322010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10533
10534 * configure.ac: Use `ws2_32' library for srv_mingw.
10535 * configure: Regenerate.
10536 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10537 * remote-utils.c: Likewise.
10538
f6d1620c
L
105392010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10540
10541 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10542 if __x86_64__ is defined.
10543
8e642873
PM
105442010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10545
10546 * configure: Regenerate.
10547
711e434b
PM
105482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10549
10550 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10551 * target.h (target_ops): New get_tib_address field.
10552 * win32-low.h (win32_thread_info): Add thread_local_base field.
10553 * win32-low.c (child_add_thread): Add tlb argument.
10554 Set thread_local_base field to TLB.
10555 (get_child_debug_event): Adapt to child_add_thread change.
10556 (win32_get_tib_address): New function.
10557 (win32_target_ops): Set get_tib_address field to
10558 win32_get_tib_address.
10559 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10560
505106cd
PA
105612010-04-12 Pedro Alves <pedro@codesourcery.com>
10562
505106cd
PA
10563 * linux-low.c (linux_mourn): Also remove the process.
10564 * server.c (handle_target_event): Don't remove the process here.
10565 * nto-low.c (nto_mourn): New.
10566 (nto_target_ops): Install it.
10567 * spu-low.c (spu_mourn): New.
10568 (spu_target_ops): Install it.
10569 * win32-low.c (win32_mourn): New.
10570 (win32_target_ops): Install it.
10571
e8470a06
PA
105722010-04-12 Pedro Alves <pedro@codesourcery.com>
10573
10574 * server.h (buffer_xml_printf): Remove redundant `;'.
10575
45ba0d02
PA
105762010-04-12 Pedro Alves <pedro@codesourcery.com>
10577
10578 * regcache.c (set_register_cache): Invalidate regcaches before
10579 changing the register cache layout.
10580 (regcache_invalidate_one): Allow a NULL regcache.
10581 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10582 regcaches before changing the register cache layout or the target
10583 regsets.
10584
59e04013
L
105852010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10586
10587 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10588 variable warning on Linux/x86-64.
10589
8336d594
PA
105902010-04-11 Pedro Alves <pedro@codesourcery.com>
10591
10592 GDBserver disconnected tracing support.
10593
10594 * linux-low.c (linux_remove_process): Delete.
10595 (add_lwp): Don't set last_resume_kind here.
10596 (linux_kill): Use `mourn'.
10597 (linux_detach): Use `thread_db_detach', and `mourn'.
10598 (linux_mourn): New.
10599 (linux_attach_lwp_1): Adjust comment.
10600 (linux_attach): last_resume_kind moved the thread_info; adjust.
10601 (status_pending_p_callback): Adjust.
10602 (linux_wait_for_event_1): Adjust.
10603 (count_events_callback, select_singlestep_lwp_callback)
10604 (select_event_lwp_callback, cancel_breakpoints_callback)
10605 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10606 (proceed_one_lwp): Adjust.
10607 (linux_async): Add debug output.
10608 (linux_thread_stopped): New.
10609 (linux_pause_all): New.
10610 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10611 linux_pause_all.
10612 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10613 (thread_db_free): Delete declaration.
10614 (thread_db_detach, thread_db_mourn): Declare.
10615 * thread-db.c (thread_db_init): Use thread_db_mourn.
10616 (thread_db_free): Delete, split in two.
10617 (disable_thread_event_reporting): New.
10618 (thread_db_detach): New.
10619 (thread_db_mourn): New.
10620
10621 * server.h (struct thread_info) <last_resume_kind>: New field.
10622 <attached>: Add comment.
10623 <gdb_detached>: New field.
10624 (handler_func): Change return type to int.
10625 (handle_serial_event, handle_target_event): Ditto.
10626 (gdb_connected): Declare.
10627 (tracing): Delete.
10628 (disconnected_tracing): Declare.
10629 (stop_tracing): Declare.
10630
10631 * server.c (handle_query) <qSupported>: Report support for
10632 disconnected tracing.
10633 (queue_stop_reply_callback): Account for running threads.
10634 (gdb_wants_thread_stopped): New.
10635 (gdb_wants_all_threads_stopped): New.
10636 (gdb_reattached_process): New.
10637 (handle_status): Clear the `gdb_detached' flag of all processes.
10638 In all-stop, stop all threads.
10639 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10640 (process_serial_event): If the remote connection breaks, or if an
10641 exit was forced with "monitor exit", force an event loop exit.
10642 Handle disconnected tracing on detach.
10643 (handle_serial_event): Adjust.
10644 (handle_target_event): If GDB isn't connected, forward events back
10645 to the inferior, unless the last process exited, in which case,
10646 exit gdbserver. Adjust interface.
10647
10648 * remote-utils.c (remote_open): Don't block in accept. Instead
10649 register an event loop source on the listen socket file
10650 descriptor. Refactor bits into ...
10651 (listen_desc): ... this new global.
10652 (gdb_connected): ... this new function.
10653 (enable_async_notification): ... this new function.
10654 (handle_accept_event): ... this new function.
10655 (remote_close): Clear remote_desc.
10656
10657 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10658
10659 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10660 New fields.
10661 (mourn_inferior): Define.
10662 (target_process_qsupported): Avoid the dangling else problem.
10663 (thread_stopped): Define.
10664 (pause_all): Define.
10665 (target_waitstatus_to_string): Declare.
10666 * target.c (target_waitstatus_to_string): New.
10667
10668 * tracepoint.c (tracing): Make extern.
10669 (disconnected_tracing): New.
10670 (stop_tracing): Make extern. Handle tracing stops due to GDB
10671 disconnecting.
10672 (cmd_qtdisconnected): New.
10673 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10674 (handle_tracepoint_general_set): Handle QTDisconnected.
10675
10676 * event-loop.c (event_handler_func): Change return type to int.
10677 (process_event): Bail out if the event handler wants the event
10678 loop to stop.
10679 (handle_file_event): Ditto.
10680 (start_event_loop): Bail out if the event handler wants the event
10681 loop to stop.
10682
10683 * nto-low.c (nto_target_ops): Adjust.
10684 * spu-low.c (spu_wait): Don't remove the process here.
10685 (spu_target_ops): Adjust.
10686 * win32-low.c (win32_wait): Don't remove the process here.
10687 (win32_target_ops): Adjust.
10688
5d267c4c
PA
106892010-04-11 Pedro Alves <pedro@codesourcery.com>
10690
10691 * regcache.c (realloc_register_cache): Invalidate inferior's
10692 regcache before recreating it.
10693
623ccd72
PA
106942010-04-09 Pedro Alves <pedro@codesourcery.com>
10695
10696 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10697
219f2f23
PA
106982010-04-09 Stan Shebs <stan@codesourcery.com>
10699 Pedro Alves <pedro@codesourcery.com>
10700
10701 * server.h (LONGEST): New.
10702 (struct thread_info) <while_stepping>: New field.
10703 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10704 Declare.
10705 (initialize_tracepoint, handle_tracepoint_general_set)
10706 (handle_tracepoint_query, tracepoint_finished_step)
10707 (tracepoint_was_hit, release_while_stepping_state_list):
10708 (current_traceframe): Declare.
10709 * server.c (handle_general_set): Handle tracepoint packets.
10710 (read_memory): New.
10711 (write_memory): New.
10712 (handle_search_memory_1): Use read_memory.
10713 (handle_query): Report support for conditional tracepoints, trace
10714 state variables, and tracepoint sources. Handle tracepoint
10715 queries.
10716 (main): Initialize the tracepoints module.
10717 (process_serial_event): Handle traceframe reads/writes.
10718
10719 * linux-low.c (handle_tracepoints): New.
10720 (linux_wait_1): Call it.
10721 (linux_resume_one_lwp): Handle while-stepping.
10722 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10723 (linux_target_ops): Install them.
10724 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10725 New field.
10726 * linux-x86-low.c (x86_supports_tracepoints): New.
10727 (the_low_target). Install it.
10728
10729 * mem-break.h (delete_breakpoint): Declare.
10730 * mem-break.c (delete_breakpoint): Make external.
10731
10732 * target.h (struct target_ops): Add `supports_tracepoints',
10733 `read_pc', and `write_pc' fields.
10734 (target_supports_tracepoints): Define.
10735 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10736 (phex_nz): New.
10737
10738 * regcache.h (struct regcache) <registers_owned>: New field.
10739 (init_register_cache, regcache_cpy): Declare.
10740 (regcache_read_pc, regcache_write_pc): Declare.
10741 (register_cache_size): Declare.
10742 (supply_regblock): Declare.
10743 * regcache.c (init_register_cache): New.
10744 (new_register_cache): Use it.
10745 (regcache_cpy): New.
10746 (register_cache_size): New.
10747 (supply_regblock): New.
10748 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10749
219f2f23
PA
10750 * tracepoint.c: New.
10751
10752 * Makefile.in (OBS): Add tracepoint.o.
10753 (tracepoint.o): New rule.
10754
3a13a53b
L
107552010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10756
10757 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10758 (i386-mmx.o): New.
10759 (i386-mmx.c): Likewise.
10760 (i386-mmx-linux.o): Likewise.
10761 (i386-mmx-linux.c): Likewise.
10762
10763 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10764 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10765 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10766 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10767
10768 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10769 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10770 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10771
1570b33e
L
107722010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10773
10774 * Makefile.in (clean): Updated.
10775 (i386-avx.o): New.
10776 (i386-avx.c): Likewise.
10777 (i386-avx-linux.o): Likewise.
10778 (i386-avx-linux.c): Likewise.
10779 (amd64-avx.o): Likewise.
10780 (amd64-avx.c): Likewise.
10781 (amd64-avx-linux.o): Likewise.
10782 (amd64-avx-linux.c): Likewise.
10783
10784 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10785 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10786 (srv_amd64_regobj): Add amd64-avx.o.
10787 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10788 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10789 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10790 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10791 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10792 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10793 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10794
10795 * i387-fp.c: Include "i386-xstate.h".
10796 (i387_xsave): New.
10797 (i387_cache_to_xsave): Likewise.
10798 (i387_xsave_to_cache): Likewise.
10799 (x86_xcr0): Likewise.
10800
10801 * i387-fp.h (i387_cache_to_xsave): Likewise.
10802 (i387_xsave_to_cache): Likewise.
10803 (x86_xcr0): Likewise.
10804
10805 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10806 * linux-crisv32-low.c (target_regsets): Likewise.
10807 * linux-m68k-low.c (target_regsets): Likewise.
10808 * linux-mips-low.c (target_regsets): Likewise.
10809 * linux-ppc-low.c (target_regsets): Likewise.
10810 * linux-s390-low.c (target_regsets): Likewise.
10811 * linux-sh-low.c (target_regsets): Likewise.
10812 * linux-sparc-low.c (target_regsets): Likewise.
10813 * linux-xtensa-low.c (target_regsets): Likewise.
10814
10815 * linux-low.c: Include <sys/uio.h>.
10816 (regsets_fetch_inferior_registers): Support nt_type.
10817 (regsets_store_inferior_registers): Likewise.
10818 (linux_process_qsupported): New.
10819 (linux_target_ops): Add linux_process_qsupported.
10820
10821 * linux-low.h (regset_info): Add nt_type.
10822 (linux_target_ops): Add process_qsupported.
10823
10824 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10825 and <sys/uio.h>.
10826 (init_registers_i386_avx_linux): New.
10827 (init_registers_amd64_avx_linux): Likewise.
10828 (xmltarget_i386_linux_no_xml): Likewise.
10829 (xmltarget_amd64_linux_no_xml): Likewise.
10830 (PTRACE_GETREGSET): Likewise.
10831 (PTRACE_SETREGSET): Likewise.
10832 (x86_fill_xstateregset): Likewise.
10833 (x86_store_xstateregset): Likewise.
10834 (use_xml): Likewise.
10835 (x86_linux_update_xmltarget): Likewise.
10836 (x86_linux_process_qsupported): Likewise.
10837 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10838 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10839 init_registers_i386_linux here. Call
10840 x86_linux_update_xmltarget.
10841 (the_low_target): Add x86_linux_process_qsupported.
10842
10843 * server.c (handle_query): Call target_process_qsupported.
10844
10845 * target.h (target_ops): Add process_qsupported.
10846 (target_process_qsupported): New.
10847
fc7238bb
PA
108482010-04-03 Pedro Alves <pedro@codesourcery.com>
10849
10850 * inferiors.c (add_thread): Set last_status kind to
10851 TARGET_WAITKIND_IGNORE.
10852 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10853 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10854 (linux_wait_1): Move `thread' local definition to block that uses
10855 it. Don't NULL initialize `event_child'.
10856 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10857 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10858 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10859
bdabb078
PA
108602010-04-01 Pedro Alves <pedro@codesourcery.com>
10861
10862 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10863 an extended waitstatus, or by a watchpoint.
10864 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10865 thread was stepping or has been stopped by a watchpoint.
10866
d3bbe7a0
PA
108672010-04-01 Pedro Alves <pedro@codesourcery.com>
10868
10869 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10870 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10871 of another, then delete the previous, and validate all
10872 breakpoints.
10873 (validate_inserted_breakpoint): New.
10874 (delete_disabled_breakpoints): New.
10875 (validate_breakpoints): New.
10876 (check_mem_read): Validate breakpoints before trusting their
10877 shadow. Delete disabled breakpoints.
10878 (check_mem_write): Validate breakpoints before trusting they
10879 should be inserted. Delete disabled breakpoints.
10880 * mem-break.h (validate_breakpoints):
10881 * server.c (handle_query): Validate breakpoints when we see a
10882 qSymbol query.
10883
8b07ae33
PA
108842010-04-01 Pedro Alves <pedro@codesourcery.com>
10885
10886 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10887 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10888 if we could tell there's a GDB breakpoint at stop_pc.
10889 (need_step_over_p): Don't do a step over if we find a GDB
10890 breakpoint at the resume PC.
10891
10892 * mem-break.c (struct raw_breakpoint): New.
10893 (enum bkpt_type): New type `gdb_breakpoint'.
10894 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10895 fields. New field `raw'.
10896 (find_raw_breakpoint_at): New.
10897 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10898 breakpoint instead.
10899 (set_breakpoint_at): Adjust.
10900 (delete_raw_breakpoint): New.
10901 (release_breakpoint): New.
10902 (delete_breakpoint): Rename to...
10903 (delete_breakpoint_1): ... this. Add proc parameter. Use
10904 release_breakpoint. Return ENOENT.
10905 (delete_breakpoint): Reimplement.
10906 (find_breakpoint_at): Delete.
10907 (find_gdb_breakpoint_at): New.
10908 (delete_breakpoint_at): Delete.
10909 (set_gdb_breakpoint_at): New.
10910 (delete_gdb_breakpoint_at): New.
10911 (gdb_breakpoint_here): New.
10912 (set_reinsert_breakpoint): Use release_breakpoint.
10913 (uninsert_breakpoint): Rename to ...
10914 (uninsert_raw_breakpoint): ... this.
10915 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10916 (reinsert_raw_breakpoint): Change parameter type to
10917 raw_breakpoint.
10918 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10919 instead.
10920 (check_breakpoints): Adjust. Use release_breakpoint.
10921 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10922 (breakpoint_inserted_here): Ditto.
10923 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10924 Don't trust the breakpoint's shadow if it is not inserted.
10925 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10926 (delete_all_breakpoints): Adjust.
10927 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10928 use delete_breakpoint_1.
10929
10930 * mem-break.h (breakpoints_supported): Delete declaration.
10931 (set_gdb_breakpoint_at): Declare.
10932 (gdb_breakpoint_here): Declare.
10933 (delete_breakpoint_at): Delete.
10934 (delete_gdb_breakpoint_at): Declare.
10935
10936 * server.h (struct raw_breakpoint): Forward declare.
10937 (struct process_info): New field `raw_breakpoints'.
10938
10939 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10940 breakpoints.
10941
6bf5e0ba
PA
109422010-03-24 Pedro Alves <pedro@codesourcery.com>
10943
10944 * linux-low.c (status_pending_p_callback): Fix comment.
10945 (linux_wait_for_event_1): Move most of the internal breakpoint
10946 handling from here...
10947 (linux_wait_1): ... to here.
10948 (count_events_callback): New.
10949 (select_singlestep_lwp_callback): New.
10950 (select_event_lwp_callback): New.
10951 (cancel_breakpoints_callback): New.
10952 (select_event_lwp): New.
10953 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10954 priority to all LWPs that have had events that should be reported
10955 to the client. Cancel breakpoints when about to reporting the
10956 event to the client, not while stopping lwps. No longer cancel
10957 finished single-steps here.
10958 (cancel_finished_single_step): Delete.
10959 (cancel_finished_single_steps): Delete.
10960
414a389f
PA
109612010-03-24 Pedro Alves <pedro@codesourcery.com>
10962
10963 * mem-break.c (enum bkpt_type): New.
10964 (struct breakpoint): New field `type'.
10965 (set_breakpoint_at): Change return type to struct breakpoint
10966 pointer. Set type to `other_breakpoint' by default.
10967 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10968 in the breakpoint list.
10969 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10970 (reinsert_breakpoint): Rename to ...
10971 (reinsert_raw_breakpoint): ... this.
10972 (reinsert_breakpoints_at): Adjust.
10973 * mem-break.h (struct breakpoint): Declare.
10974 (set_breakpoint_at): Change return type to struct breakpoint
10975 pointer.
10976
2280c721
PA
109772010-03-24 Pedro Alves <pedro@codesourcery.com>
10978
10979 * server.c (handle_query): Assign, not compare.
10980
d50171e4
PA
109812010-03-24 Pedro Alves <pedro@codesourcery.com>
10982
10983 Teach linux gdbserver to step-over-breakpoints.
10984
10985 * linux-low.c (can_hardware_single_step): New.
10986 (supports_breakpoints): New.
10987 (handle_extended_wait): If stopping threads, read the stop pc of
10988 the new cloned LWP.
10989 (get_pc): New.
10990 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10991 low target doesn't support retrieving the PC.
10992 (add_lwp): Set last_resume_kind to resume_continue.
10993 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10994 (linux_attach): Don't clear stop_expected. Set the lwp's
10995 last_resume_kind to resume_stop.
10996 (linux_detach_one_lwp): Don't check for removed breakpoints.
10997 (check_removed_breakpoint): Delete.
10998 (status_pending_p): Rename to ...
10999 (status_pending_p_callback): ... this. Don't check for removed
11000 breakpoints. Don't consider threads that are stopped from GDB's
11001 perspective.
11002 (linux_wait_for_lwp): Always read the stop_pc here.
11003 (cancel_breakpoint): New.
11004 (step_over_bkpt): New global.
11005 (linux_wait_for_event_1): Implement stepping over breakpoints.
11006 (gdb_wants_lwp_stopped): New.
11007 (gdb_wants_all_stopped): New.
11008 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11009 single-step traps here. Store the thread's last reported target
11010 wait status.
11011 (send_sigstop): Don't clear stop_expected. Always set it,
11012 instead.
11013 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11014 (cancel_finished_single_step): New.
11015 (cancel_finished_single_steps): New.
11016 (wait_for_sigstop): Don't cancel finished single-step traps here.
11017 (linux_resume_one_lwp): Don't check for removed breakpoints.
11018 Don't set `step' on non-hardware step archs.
11019 (linux_set_resume_request): Ignore resume_stop requests if already
11020 stopping or stopped. Set the lwp's last_resume_kind.
11021 (resume_status_pending_p): Don't check for removed breakpoints.
11022 (need_step_over_p): New.
11023 (start_step_over): New.
11024 (finish_step_over): New.
11025 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11026 requests. Clear the thread's last reported target waitstatus.
11027 Don't use the `suspended' flag. Don't consider pending breakpoints.
11028 (linux_resume): Start a step-over if necessary.
11029 (proceed_one_lwp): New.
11030 (proceed_all_lwps): New.
11031 (unstop_all_lwps): New.
11032 * linux-low.h (struct lwp_info): Rewrite comment for the
11033 `suspended' flag. Add the `stop_pc' field. Delete the
11034 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11035 Add `'last_resume_kind' and `need_step_over' fields.
11036 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11037 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11038 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11039 (set_raw_breakpoint_at): New.
11040 (set_breakpoint_at): Rewrite to use it.
11041 (reinsert_breakpoint_handler): Delete.
11042 (set_reinsert_breakpoint): New.
11043 (reinsert_breakpoint_by_bp): Delete.
11044 (delete_reinsert_breakpoints): New.
11045 (uninsert_breakpoint): Rewrite.
11046 (uninsert_breakpoints_at): New.
11047 (reinsert_breakpoint): Rewrite.
11048 (reinsert_breakpoints_at): New.
11049 (check_breakpoints): Rewrite.
11050 (breakpoint_here): New.
11051 (breakpoint_inserted_here): New.
11052 (check_mem_read): Adjust.
11053 * mem-break.h (breakpoints_supported, breakpoint_here)
11054 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11055 (reinsert_breakpoint_by_bp): Delete declaration.
11056 (delete_reinsert_breakpoints): Declare.
11057 (reinsert_breakpoint): Delete declaration.
11058 (reinsert_breakpoints_at): Declare.
11059 (uninsert_breakpoint): Delete declaration.
11060 (uninsert_breakpoints_at): Declare.
11061 (check_breakpoints): Adjust prototype.
11062 * server.h: Adjust include order.
11063 (struct thread_info): Declare here. Add a `last_status' field.
11064
30ba68cb
MS
110652010-03-23 Michael Snyder <msnyder@vmware.com>
11066
11067 * server.c (crc32): New function.
11068 (handle_query): Add handling for 'qCRC:' request.
11069
b9a881c2
PA
110702010-03-23 Pedro Alves <pedro@codesourcery.com>
11071
11072 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11073 lwp had been stopped by a watchpoint.
11074
e92d13d5
PA
110752010-03-16 Pedro Alves <pedro@codesourcery.com>
11076
11077 * server.h (internal_error): Declare.
11078 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11079 * utils.c (internal_error): New function.
11080
64daa791
AS
110812010-03-15 Andreas Schwab <schwab@redhat.com>
11082
11083 * configure.srv: Fix typo setting srv_regobj.
11084
f52cd8cd
PA
110852010-03-15 Pedro Alves <pedro@codesourcery.com>
11086
11087 * linux-low.c (fetch_register): Avoid passing a non string literal
11088 format to `error'.
11089 (usr_store_inferior_registers): Ditto.
11090
93ae6fdc
PA
110912010-03-14 Pedro Alves <pedro@codesourcery.com>
11092
11093 * linux-low.c (linux_write_memory): Bail out early if peeking
11094 memory failed.
11095
c3adc08c
PA
110962010-03-14 Pedro Alves <pedro@codesourcery.com>
11097
11098 * linux-low.h (struct lwp_info): New fields
11099 `stopped_by_watchpoint' and `stopped_data_address'.
11100 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11101 here, and cache them in the lwp object.
11102 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11103 directly.
11104 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11105 field.
11106 (linux_stopped_by_watchpoint): Rewrite.
11107 (linux_stopped_data_address): Rewrite.
11108
bce522a2
PA
111092010-03-06 Simo Melenius <simo.melenius@iki.fi>
11110
11111 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11112 switching the current inferior, not before.
11113
90884b2b
L
111142010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11115
11116 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11117 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11118 i386-linux.c and amd64-linux.c.
11119 (reg-i386.o): Removed.
11120 (reg-i386.c): Likewise.
11121 (reg-i386-linux.o): Likewise.
11122 (reg-i386-linux.c): Likewise.
11123 (reg-x86-64.o): Likewise.
11124 (reg-x86-64.c): Likewise.
11125 (reg-x86-64-linux.o): Likewise.
11126 (reg-x86-64-linux.c): Likewise.
11127 (i386.o): New.
11128 (i386.c): Likewise.
11129 (i386-linux.o): Likewise.
11130 (i386-linux.c): Likewise.
11131 (amd64.o): Likewise.
11132 (amd64.c): Likewise.
11133 (amd64-linux.o): Likewise.
11134 (amd64-linux.c): Likewise.
11135
11136 * configure.srv (srv_i386_regobj): New.
11137 (srv_i386_linux_regobj): Likewise.
11138 (srv_amd64_regobj): Likewise.
11139 (srv_amd64_linux_regobj): Likewise.
11140 (srv_i386_32bit_xmlfiles): Likewise.
11141 (srv_i386_64bit_xmlfiles): Likewise.
11142 (srv_i386_xmlfiles): Likewise.
11143 (srv_amd64_xmlfiles): Likewise.
11144 (srv_i386_linux_xmlfiles): Likewise.
11145 (srv_amd64_linux_xmlfiles): Likewise.
11146 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11147 srv_xmlfiles to $srv_i386_xmlfiles.
11148 (i[34567]86-*-mingw32ce*): Likewise.
11149 (i[34567]86-*-mingw*): Likewise.
11150 (i[34567]86-*-nto*): Likewise.
11151 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11152 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11153 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11154 (x86_64-*-linux*): Likewise.
11155
11156 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11157 (init_registers_amd64_linux): New.
11158 (x86_arch_setup): Replace init_registers_x86_64_linux with
11159 init_registers_amd64_linux.
11160
193f13e6
MK
111612010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11162
11163 * configure.ac: Check for libdl. If it is not available link against
11164 static libthread_db.
11165 * configure: Regenerate.
11166
85d721b8
PA
111672010-02-22 Pedro Alves <pedro@codesourcery.com>
11168
11169 PR9605
11170
11171 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11172 handing a read watchpoint.
11173 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11174
6076632b
DE
111752010-02-12 Doug Evans <dje@google.com>
11176
11177 * linux-low.c (linux_supports_tracefork_flag): Document.
11178 (linux_look_up_symbols): Add comment.
11179
3327ccf7
L
111802010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11181
11182 * regcache.c (supply_register): Clear regcache if buf is NULL.
11183
0718675c 111842010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11185 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11186
11187 * inferiors.c (find_inferior): Add function documentation.
11188 (unloaded_dll): Handle the case where the unloaded dll has not
11189 been previously registered in the dll list.
11190
177321bd
DJ
111912010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11192
11193 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11194 (thumb2_breakpoint): New.
11195 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11196
2b009048
DJ
111972010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11198
11199 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11200 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11201 breakpoints.
11202
3be029c7
PA
112032010-01-21 Pedro Alves <pedro@codesourcery.com>
11204
11205 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11206
18f5de3b
JK
112072010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11208
11209 * linux-s390-low.c (s390_collect_ptrace_register)
11210 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11211
3743bb4f
DE
112122010-01-21 Doug Evans <dje@google.com>
11213
14ce3065
DE
11214 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11215 (PTRACE_ARG4_TYPE): New macro.
11216 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11217 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11218 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11219 (usr_store_inferior_registers): Ditto.
11220 (linux_read_memory, linux_write_memory): Ditto.
11221 (linux_test_for_tracefork): Ditto.
11222
3743bb4f
DE
11223 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11224 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11225
8b315be5
PA
112262010-01-21 Pedro Alves <pedro@codesourcery.com>
11227
11228 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11229 target.
11230
85492558
PA
112312010-01-21 Pedro Alves <pedro@codesourcery.com>
11232
11233 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11234 prototype to take a regcache. Adjust.
11235
442ea881
PA
112362010-01-20 Pedro Alves <pedro@codesourcery.com>
11237
11238 * regcache.h (struct thread_info): Forward declare.
11239 (struct regcache): New.
11240 (new_register_cache): Adjust prototype.
11241 (get_thread_regcache): Declare.
11242 (free_register_cache): Adjust prototype.
11243 (registers_to_string, registers_from_string): Ditto.
11244 (supply_register, supply_register_by_name, collect_register)
11245 (collect_register_as_string, collect_register_by_name): Ditto.
11246 * regcache.c (struct inferior_regcache_data): Delete.
11247 (get_regcache): Rename to ...
11248 (get_thread_regcache): ... this. Adjust. Switch inferior before
11249 fetching registers.
11250 (regcache_invalidate_one): Adjust.
11251 (regcache_invalidate): Fix prototype.
11252 (new_register_cache): Return the new register cache.
11253 (free_register_cache): Change prototype.
11254 (realloc_register_cache): Adjust.
11255 (registers_to_string): Change prototype to take a regcache. Adjust.
11256 (registers_from_string): Ditto.
11257 (register_data): Ditto.
11258 (supply_register): Ditto.
11259 (supply_register_by_name): Ditto.
11260 (collect_register): Ditto.
11261 (collect_register_as_string): Ditto.
11262 (collect_register_by_name): Ditto.
11263 * server.c (process_serial_event): Adjust.
11264 * linux-low.h (regset_fill_func, regset_store_func): Change
11265 prototype.
11266 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11267 Change prototype.
11268 * linux-low.c (get_stop_pc): Adjust.
11269 (check_removed_breakpoint): Adjust.
11270 (linux_wait_for_event): Adjust.
11271 (linux_resume_one_lwp): Adjust.
11272 (fetch_register): Add regcache parameter. Adjust.
11273 (usr_store_inferior_registers): Ditto.
11274 (regsets_fetch_inferior_registers): Ditto.
11275 (regsets_store_inferior_registers): Ditto.
11276 (linux_fetch_registers, linux_store_registers): Ditto.
11277 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11278 regcache. Adjust.
43aaf8b6
PA
11279 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11280 Ditto.
442ea881
PA
11281 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11282 prototype to take a regcache.
11283 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11284 * remote-utils.c (convert_ascii_to_int, outreg)
11285 (prepare_resume_reply): Change prototype to take a regcache.
11286 Adjust.
11287 * target.h (struct target_ops) <fetch_registers, store_registers>:
11288 Change prototype to take a regcache.
11289 (fetch_inferior_registers, store_inferior_registers): Change
11290 prototype to take a regcache. Adjust.
11291 * proc-service.c (ps_lgetregs): Adjust.
11292 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11293 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11294 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11295 take a regcache. Adjust.
11296 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11297 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11298 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11299 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11300 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11301 (cris_cannot_fetch_register):
11302 (cris_breakpoint_at): Change prototype to take a regcache.
11303 Adjust.
11304 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11305 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11306 to take a regcache. Adjust.
11307 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11308 Adjust.
11309 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11310 take a regcache. Adjust.
11311 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11312 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11313 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11314 * linux-mips-low.c (mips_get_pc):
11315 (mips_set_pc): Change prototype to take a regcache. Adjust.
11316 (mips_reinsert_addr): Adjust.
11317 (mips_collect_register): Change prototype to take a regcache.
11318 Adjust.
11319 (mips_supply_register):
11320 (mips_collect_register_32bit, mips_supply_register_32bit)
11321 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11322 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11323 * linux-ppc-low.c (ppc_supply_ptrace_register)
11324 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11325 (parse_spufs_run): Adjust.
11326 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11327 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11328 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11329 take a regcache. Adjust.
11330 * linux-s390-low.c (s390_collect_ptrace_register)
11331 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11332 (s390_set_pc): Change prototype to take a regcache. Adjust.
11333 (s390_arch_setup): Adjust.
11334 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11335 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11336 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11337 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11338 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11339 regcache. Adjust.
11340 (sparc_breakpoint_at): Adjust.
11341 * linux-xtensa-low.c (xtensa_fill_gregset):
11342 (xtensa_store_gregset):
11343 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11344 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11345 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11346 prototype to take a regcache. Adjust.
11347 * win32-arm-low.c (arm_fetch_inferior_register)
11348 (arm_store_inferior_register): Change prototype to take a
11349 regcache. Adjust.
11350 * win32-i386-low.c (i386_fetch_inferior_register)
11351 (i386_store_inferior_register): Change prototype to take a
11352 regcache. Adjust.
11353 * win32-low.c (child_fetch_inferior_registers)
11354 (child_store_inferior_registers): Change prototype to take a
11355 regcache. Adjust.
11356 (win32_wait): Adjust.
11357 (win32_fetch_inferior_registers): Change prototype to take a
11358 regcache. Adjust.
11359 (win32_store_inferior_registers): Adjust.
11360 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11361 store_inferior_register>: Change prototype to take a regcache.
11362
60c3d7b0
DE
113632010-01-20 Doug Evans <dje@google.com>
11364
11365 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11366 #ifdef.
11367 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11368 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11369
dc146f7c
VP
113702010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11371
11372 * linux-low.c (linux_core_of_thread): New.
11373 (compare_ints, show_process, list_threads): New.
11374 (linux_qxfer_osdata): Report threads and cores.
11375 (linux_target_op): Register linux_core_of_thread.
11376 * remote-utils.c (prepare_resume_reply): Report the core.
11377 (buffer_xml_printf): Support %d specifier.
11378 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11379 New.
11380 (handle_query): Handle qXfer:threads. Announce availability
11381 thereof.
11382 * target.h (struct target_ops): New field core_of_thread.
11383
7803799a
UW
113842010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11385
11386 * Makefile.in (clean): Remove new generated files.
11387 (reg-s390.o, reg-s390.c): Remove rules.
11388 (reg-s390x.o, reg-s390x.c): Likewise.
11389 (s390-linux32.o, s390-linux32.c): Add rules.
11390 (s390-linux64.o, s390-linux64.c): Likewise.
11391 (s390x-linux64.o, s390x-linux64.c): Likewise.
11392 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11393 * linux-s390-low.c: Include <elf.h>.
11394 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11395 (init_registers_s390): Remove prototype.
11396 (init_registers_s390x): Likewise.
11397 (init_registers_s390_linux32): Add prototype.
11398 (init_registers_s390_linux64): Likewise.
11399 (init_registers_s390x_linux64): Likewise.
11400 (s390_num_regs_3264): New define.
11401 (s390_regmap_3264): New global variable.
11402 (s390_cannot_fetch_register): Remove obsolete check.
11403 (s390_cannot_store_register): Likewise.
11404 (s390_collect_ptrace_register): Handle upper/lower register halves.
11405 (s390_supply_ptrace_register): Likewise.
11406 (s390_fill_gregset): Update to register number changes.
11407 (s390_get_hwcap): New routine.
11408 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11409 Install appropriate regmap and register set.
11410
6e7ffa39
JB
114112010-01-01 Joel Brobecker <brobecker@adacore.com>
11412
11413 * server.c (gdbserver_version): Update copyright year to 2010.
11414 * gdbreplay.c (gdbreplay_version): Likewise.
11415
957f3f49
DE
114162009-12-28 Doug Evans <dje@google.com>
11417
11418 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11419 elf/external.h. Include <elf.h> instead but only if necessary.
11420
ca5c370d
PA
114212009-12-28 Pedro Alves <pedro@codesourcery.com>
11422
11423 * linux-low.c (linux_remove_process): Remove `detaching'
11424 parameter. Don't release/detach from thread_db here.
11425 (linux_kill): Release/detach from thread_db here, ...
11426 (linux_detach): ... and here, before actually detaching.
11427 (linux_wait_1): ... and here, when a process exits.
11428 * thread-db.c (any_thread_of): New.
11429 (thread_db_free): Switch the current inferior to a thread of the
11430 passed in process.
11431
4ee62156
DE
114322009-12-21 Doug Evans <dje@google.com>
11433
d90e6a88
DE
11434 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11435
c5f62d5f
DE
11436 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11437 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11438 warning ifndef __NR_tkill. Move setting of errno there too.
11439 Delete unnecessary resetting of errno after syscall.
11440 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11441
10e86dd7
DE
11442 * configure.ac: Check for dladdr.
11443 * config.in: Regenerate.
11444 * configure: Regenerate.
11445 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11446 (try_thread_db_load): Update.
11447
4ee62156
DE
11448 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11449
00f515da
DE
114502009-12-18 Doug Evans <dje@google.com>
11451
e9464885
DE
11452 * event-loop.c: Include unistd.h if it exists.
11453
07d4f67e
DE
11454 * linux-low.c (my_waitpid): Move definition away from being in
11455 between linux_tracefork_child/linux_test_for_tracefork.
11456
00f515da
DE
11457 * gdb_proc_service.h (psaddr_t): Fix type.
11458 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11459 signature to match glibc.
11460
1de1badb
DE
114612009-12-16 Doug Evans <dje@google.com>
11462
11463 * linux-low.c (linux_read_memory): Fix argument to read.
11464
aeeb81d1
PA
114652009-11-26 Pedro Alves <pedro@codesourcery.com>
11466
11467 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11468 events, don't leave current_inferior pointing at null.
11469
10357975
PA
114702009-11-26 Pedro Alves <pedro@codesourcery.com>
11471
11472 * win32-low.c (LOG): Delete.
11473 (OUTMSG): Output to stderr.
11474 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11475 on compile time LOG macro.
11476 (win32_wait): Fix debug output.
11477
cf6e3471
PA
114782009-11-26 Pedro Alves <pedro@codesourcery.com>
11479
11480 * win32-low.c (win32_add_one_solib): If the dll name is
11481 "ntdll.dll", prepend the system directory to the dll path.
11482
0c85e18e
MK
114832009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11484
11485 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11486
9ac544ce 114872009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11488 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11489
11490 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11491 * configure.ac: Check for __mcoldfire__ and set
11492 gdb_cv_m68k_is_coldfire.
11493 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11494 reg-cf.o and reg-m68k.o.
11495 * configure: Regenerated.
11496
fd7dd3e6
PA
114972009-11-16 Pedro Alves <pedro@codesourcery.com>
11498
11499 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11500 Pass it to thread_db_free.
11501 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11502 proper `detaching' argument to linux_remove_process.
11503 * linux-low.h (thread_db_free): Add `detaching' parameter.
11504 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11505 to thread_db_free.
11506 (thread_db_free): Add `detaching' parameter. Only
11507 call td_ta_clear_event if detaching from process.
11508
75aa492e
MK
115092009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11510
11511 * thread-db.c (thread_db_free): Fix typo.
11512
21e1bee4
PP
115132009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11514
11515 PR gdb/10838
11516 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11517
8838b45e
NS
115182009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11519
11520 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11521 with an i686 compiler.
11522 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11523 needed.
11524 * configure: Rebuilt.
11525
8a35fb51
SL
115262009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11527
11528 PR gdb/10783
11529
11530 * server.c (handle_search_memory_1): Correct read_addr initialization
11531 in loop for searching subsequent chunks.
11532
96f15937
PP
115332009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11534
11535 * configure.ac: New --with-libthread-db option.
11536 * thread-db.c: Allow direct dependence on libthread_db.
11537 (thread_db_free): Adjust.
11538 * config.in: Regenerate.
11539 * configure: Likewise.
889bf7c5 11540
5f7d1694
PP
115412009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11542
11543 PR gdb/10757
11544 * thread-db.c (attach_thread): New function.
11545 (maybe_attach_thread): Return success/failure.
11546 (find_new_threads_callback): Adjust.
889bf7c5
PA
11547 (thread_db_find_new_threads): Loop until no new threads.
11548
88e3b899
PA
115492009-10-13 Pedro Alves <pedro@codesourcery.com>
11550
11551 * proc-service.c (ps_lgetregs): Formatting.
11552
cdbfd419
PP
115532009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11554
11555 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11556 * configure.ac: Adjust.
11557 * linux-low.h (struct process_info_private): Move members to struct
11558 thread_db.
11559 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11560 * linux-low.c (linux_remove_process): Adjust.
11561 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11562 * server.c (handle_query): Move code ...
11563 (handle_monitor_command): ... here. New function.
11564 * target.h (struct target_ops): New member.
11565 * thread-db.c (struct thread_db): New.
11566 (libthread_db_search_path): New variable.
11567 (thread_db_create_event, thread_db_enable_reporting)
11568 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11569 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11570 (try_thread_db_load_1, dladdr_to_soname): New functions.
11571 (try_thread_db_load, thread_db_load_search): New functions.
11572 (thread_db_init): Search for libthread_db.
11573 (thread_db_free): New function.
11574 (thread_db_handle_monitor_command): Likewise.
11575 * config.in: Regenerate.
11576 * configure: Regenerate.
889bf7c5 11577
4168d2d6
UW
115782009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11579
11580 * spu-low.c (spu_kill): Wait for inferior to terminate.
11581 Call clear_inferiors.
11582 (spu_detach): Call clear_inferiors.
11583
81ecdfbb
RW
115842009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11585
11586 * aclocal.m4: Regenerate.
11587 * config.in: Likewise.
11588 * configure: Likewise.
11589
0b9ff2c0
UW
115902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11591
11592 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11593 (parse_spufs_run): New function.
11594 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11595 (ppc_breakpoint_at): Handle SPU breakpoints.
11596
efcbbd14
UW
115972009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11598
11599 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11600 (SPUFS_MAGIC): Define.
11601 (spu_enumerate_spu_ids): New function.
11602 (linux_qxfer_spu): New function.
11603 (linux_target_ops): Install linux_qxfer_spu.
11604
f4d9bade
UW
116052009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11606
11607 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11608 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11609 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11610 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11611 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11612 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11613 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11614 (init_registers_powerpc_cell32l): Add prototype.
11615 (init_registers_powerpc_cell64l): Likewise.
11616 (ppc_arch_setup): Detect Cell/B.E. architecture.
11617
96e946ca
RW
116182009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11619
11620 * Makefile.in (datarootdir): New variable.
11621
58d6951d
DJ
116222009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11623
11624 * linux-low.c (linux_write_memory): Update debugging output.
11625 * Makefile.in (clean): Add new descriptions.
11626 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11627 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11628 * configure.srv: Add new files for arm*-*-linux*.
11629 * linux-arm-low.c: Add new declarations.
11630 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11631 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11632 (HWCAP_VFPv3D16): New.
11633 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11634 instead of __IWMMXT__.
11635 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11636 (arm_arch_setup): New.
11637 (target_regsets): Remove #ifdef. Add VFP regset.
11638 (the_low_target): Use arm_arch_setup.
11639
12b42a12
DJ
116402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11641
11642 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11643 the main thread again.
11644
ac8c974e
AR
116452009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11646
11647 Adding Neutrino gdbserver.
11648 * configure: Regenerated.
11649 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11650 * configure.srv (i[34567]86-*-nto*): New target.
11651 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11652 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11653 (nto_comctrl) [__QNX__]: New function.
11654 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11655
4424e0c3 116562009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11657
11658 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11659 srv_tgtobj.
11660
912cf4ba
PA
116612009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11662 Pedro Alves <pedro@codesourcery.com>
11663
11664 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11665 don't support CONTEXT_EXTENDED_REGISTERS.
11666 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11667 (the_low_target): Install them.
11668 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11669 failing with ERROR_PIPE_NOT_CONNECTED.
11670
aa5ca48f
DE
116712009-06-30 Doug Evans <dje@google.com>
11672 Pierre Muller <muller@ics.u-strasbg.fr>
11673
11674 Add h/w watchpoint support to x86-linux, win32-i386.
11675 * Makefile.in (SFILES): Add i386-low.c
11676 (i386_low_h): Define.
11677 (i386-low.o): Add dependencies.
11678 (linux-x86-low.o): Add i386-low.h dependency.
11679 (win32-i386-low.o): Ditto.
11680 * i386-low.c: New file.
11681 * i386-low.h: New file.
11682 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11683 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11684 * linux-low.c (linux_add_process): Initialize arch_private.
11685 (linux_remove_process): Free arch_private.
11686 (add_lwp): Initialize arch_private.
11687 (delete_lwp): Free arch_private.
11688 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11689 provided.
11690 * linux-low.h (process_info_private): New member arch_private.
11691 (lwp_info): New member arch_private.
11692 (linux_target_ops): New members new_process, new_thread,
11693 prepare_to_resume.
11694 (ptid_of): New macro.
11695 * linux-x86-low.c: Include stddef.h, i386-low.h.
11696 (arch_process_info): New struct.
11697 (arch_lwp_info): New struct.
11698 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11699 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11700 (i386_dr_low_get_status): New function.
11701 (x86_insert_point, x86_remove_point): New functions.
11702 (x86_stopped_by_watchpoint): New function.
11703 (x86_stopped_data_address): New function.
11704 (x86_linux_new_process, x86_linux_new_thread): New functions.
11705 (x86_linux_prepare_to_resume): New function.
11706 (the_low_target): Add entries for insert_point, remove_point,
11707 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11708 prepare_to_resume.
11709 * server.c (debug_hw_points): New global.
11710 (monitor_show_help): Document set debug-hw-points.
11711 (handle_query): Process "set debug-hw-points".
11712 * server.h (debug_hw_points): Declare.
11713 (paddress): Declare.
11714 * utils.c (NUMCELLS, CELLSIZE): New macros.
11715 (get_sell, xsnprintf, paddress): New functions.
11716 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11717 remove_point, stopped_by_watchpoint, stopped_data_address.
11718 * win32-i386-low.c: Include i386-low.h.
11719 (debug_reg_state): Replaces dr.
11720 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11721 (i386_dr_low_get_status): New function.
11722 (i386_insert_point, i386_remove_point): New functions.
11723 (i386_stopped_by_watchpoint): New function.
11724 (i386_stopped_data_address): New function.
11725 (i386_initial_stuff): Update.
11726 (get_thread_context,set_thread_context,i386_thread_added): Update.
11727 (the_low_target): Add entries for insert_point,
11728 remove_point, stopped_by_watchpoint, stopped_data_address.
11729 * win32-low.c (win32_insert_watchpoint): New function.
11730 (win32_remove_watchpoint): New function.
11731 (win32_stopped_by_watchpoint): New function.
11732 (win32_stopped_data_address): New function.
11733 (win32_target_ops): Add entries for insert_watchpoint,
11734 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11735 * win32-low.h (win32_target_ops): New members insert_point,
11736 remove_point, stopped_by_watchpoint, stopped_data_address.
11737
d993e290
PA
117382009-06-25 Pedro Alves <pedro@codesourcery.com>
11739
11740 * server.c (process_serial_event): Re-return unsupported, not
11741 error, if the type isn't recognized. Re-allow supporting only
11742 insert or remove packets. Also call require_running for
11743 breakpoints. Add missing break statement to default case. Tidy.
11744 * target.h (struct target_ops): Rename insert_watchpoint to
11745 insert_point, and remove_watchpoint to remove_point.
11746
11747 * linux-low.h (struct linux_target_ops): Likewise.
11748 * linux-low.c (linux_insert_watchpoint): Rename to ...
11749 (linux_insert_point): ... this. Adjust.
11750 (linux_remove_watchpoint): Rename to ...
11751 (linux_remove_point): ... this. Adjust.
11752 (linux_target_ops): Adjust.
11753 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11754 (cris_insert_point): ... this.
11755 (cris_remove_watchpoint): Rename to ...
11756 (cris_remove_point): ... this.
11757 (the_low_target): Adjust.
11758
0f54c268
PM
117592009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11760
11761 * server.c (handle_v_kill): Pass signal_pid to
11762 kill_inferior if multi_process is zero.
11763
c6314022
AR
117642009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11765
11766 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11767 * target.h (target_ops): Comment for *_watchpoint to make it clear
11768 the functions can get types '0' and '1'.
11769
4463ce24
AR
117702009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11771
11772 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11773 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11774 * regcache.c (get_regcache): Likewise.
11775 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11776 * win32-low.c (child_fetch_inferior_registers): Remove check for
11777 regno 0.
11778
cf8fd78b
PA
117792009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11780 Pedro Alves <pedro@codesourcery.com>
11781
11782 * target.h (struct target_ops) <supports_multi_process>: New
11783 callback.
11784 (target_supports_multi_process): New.
11785 * server.c (handle_query): Even if GDB reports support, only
11786 enable multi-process if the target also supports it. Report
11787 multi-process support only if the target backend supports it.
11788 * linux-low.c (linux_supports_multi_process): New function.
11789 (linux_target_ops): Install it as target_supports_multi_process
11790 callback.
11791
47c0c975
DE
117922009-05-24 Doug Evans <dje@google.com>
11793
e09875d4
DE
11794 Global renaming of find_thread_pid to find_thread_ptid.
11795 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11796 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11797 All callers updated.
11798
e27d73f6
DE
11799 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11800 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11801 directly.
11802
47c0c975
DE
11803 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11804 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11805 (linux_resume_one_lwp): Ditto.
11806
2acc282a
DE
118072009-05-23 Doug Evans <dje@google.com>
11808
11809 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11810 from struct inferior_list_entry * to struct lwp_info *.
11811 All callers updated.
11812
9f1036c1
DE
118132009-05-13 Doug Evans <dje@google.com>
11814
11815 * linux-x86-low.c: Don't include assert.h.
11816 (x86_siginfo_fixup): Use fatal, not assert.
11817 (x86_arch_setup): Fix comment.
11818
d0722149
DE
118192009-05-12 Doug Evans <dje@google.com>
11820
11821 Biarch support for i386/amd64 gdbserver.
11822 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11823 Add linux-x86-low.c.
11824 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11825 (linux-x86-low.o): Add.
11826 * linux-x86-64-low.c: Delete.
11827 * linux-i386-low.c: Delete.
11828 * linux-x86-low.c: New file.
11829 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11830 linux-x86-low.o.
11831 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11832 linux-x86-low.o.
11833 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11834 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11835 (linux_child_pid_to_exec_file): New function.
11836 (elf_64_header_p, elf_64_file_p): New functions.
11837 (siginfo_fixup): New function.
11838 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11839 give target a chance to convert layout.
11840 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11841 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11842
fdeb2a12
DE
118432009-05-07 Doug Evans <dje@google.com>
11844
11845 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11846 (regsets_store_inferior_registers): Ditto.
11847
a6dbe5df
PA
118482009-05-06 Pedro Alves <pedro@codesourcery.com>
11849
11850 PR server/10048
11851
11852 * linux-low.c (must_set_ptrace_flags): Delete.
11853 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11854 of the global.
11855 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11856 `lwp->must_set_ptrace_flags' instead.
ba42693b 11857 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11858 (linux_wait_1): ... not here.
11859
5091eb23
DE
118602009-04-30 Doug Evans <dje@google.com>
11861
9f767825
DE
11862 * inferiors.c (started_inferior_callback): New function.
11863 (attached_inferior_callback): New function.
11864 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11865 * server.c (print_started_pid, print_attached_pid): New functions.
11866 (detach_or_kill_for_exit): New function.
11867 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11868 * server.h (have_started_inferiors_p): Declare.
11869 (have_attached_inferiors_p): Declare.
11870
5091eb23
DE
11871 * inferiors.c (remove_process): Fix memory leak, free process.
11872 * linux-low.c (linux_remove_process): New function.
11873 (linux_kill): Call it instead of remove_process.
11874 (linux_detach, linux_wait_1): Ditto.
11875
155c8968
PA
118762009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11877
11878 * configure.srv: Add x86 Windows CE target.
11879
7fe519cb
UW
118802009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11881
11882 * inferiors.c (get_thread_process): Make global.
11883 * server.h (get_thread_process): Add prototype.
11884 * thread-db.c (find_one_thread): Use get_thread_process
11885 instead of current_process.
11886 (thread_db_get_tls_address): Do not crash if called when
11887 thread layer is not yet initialized.
11888
5472f405
UW
118892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11890
11891 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11892 * spu-low.c (current_tid): Rename to ...
11893 (current_ptid): ... this.
11894 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11895 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11896 ptid_get_lwp (current_ptid) instead of current_tid.
11897 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11898 instead of current_tid. Use find_process_pid to verify pid
11899 argument is valid. Pass proper argument to remove_process.
11900 (spu_thread_alive): Compare current_ptid instead of current_tid.
11901 (spu_resume): Likewise.
11902
55ac2b99
PA
119032009-04-02 Pedro Alves <pedro@codesourcery.com>
11904
11905 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11906 variable.
11907
95954743
PA
119082009-04-01 Pedro Alves <pedro@codesourcery.com>
11909
11910 Implement the multiprocess extensions, and add linux multiprocess
11911 support.
11912
11913 * server.h (ULONGEST): Declare.
11914 (struct ptid, ptid_t): New.
11915 (minus_one_ptid, null_ptid): Declare.
11916 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11917 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11918 (struct inferior_list_entry): Change `id' type from unsigned from
11919 to ptid_t.
11920 (struct sym_cache, struct breakpoint, struct
11921 process_info_private): Forward declare.
11922 (struct process_info): Declare.
11923 (current_process): Declare.
11924 (all_processes): Declare.
11925 (initialize_inferiors): Declare.
11926 (add_thread): Adjust to use ptid_t.
11927 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11928 (add_process, remove_process, find_thread_pid): Declare.
11929 (find_inferior_id): Adjust to use ptid_t.
11930 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11931 (multi_process): Declare.
11932 (push_event): Adjust to use ptid_t.
11933 (read_ptid, write_ptid): Declare.
11934 (prepare_resume_reply): Adjust to use ptid_t.
11935 (clear_symbol_cache): Declare.
11936 * inferiors.c (all_processes): New.
11937 (null_ptid, minus_one_ptid): New.
11938 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11939 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11940 (add_thread): Change unsigned long to ptid. Remove gdb_id
11941 parameter. Adjust.
11942 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11943 (gdb_id_to_thread): Rename to ...
11944 (find_thread_pid): ... this. Change unsigned long to ptid.
11945 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11946 (loaded_dll, pull_pid_from_list): Adjust.
11947 (add_process, remove_process, find_process_pid)
11948 (get_thread_process, current_process, initialize_inferiors): New.
11949 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11950 (struct target_waitstatus) <related_pid>: Ditto.
11951 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11952 return type to int.
11953 (struct target_ops) <join>: Add `pid' argument.
11954 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11955 (struct target_ops) <wait>: Add `ptid' field. Change return type
11956 to ptid.
11957 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11958 (mywait): Add `ptid' argument. Change return type to ptid_t.
11959 (target_pid_to_str): Declare.
11960 * target.c (set_desired_inferior): Adjust to use ptids.
11961 (mywait): Add new `ptid' argument. Adjust.
11962 (target_pid_to_str): New.
11963 * mem-break.h (free_all_breakpoints): Declare.
11964 * mem-break.c (breakpoints): Delelete.
11965 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11966 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11967 to use per-process breakpoint list.
11968 (free_all_breakpoints): New.
11969 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11970 (symbol_cache, all_symbols_looked_up): Delete.
11971 (hexchars): New.
11972 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11973 read_ptid): New.
11974 (prepare_resume_reply): Change ptid argument's type from unsigned
11975 long to ptid_t. Adjust. Implement W;process and X;process.
11976 (free_sym_cache, clear_symbol_cache): New.
11977 (look_up_one_symbol): Adjust to per-process symbol cache. *
11978 * server.c (cont_thread, general_thread, step_thread): Change type
11979 to ptid_t.
11980 (attached): Delete.
11981 (multi_process): New.
11982 (last_ptid): Change type to ptid_t.
11983 (struct vstop_notif) <ptid>: Change type to ptid_t.
11984 (queue_stop_reply, push_event): Change `ptid' argument's type to
11985 ptid_t.
11986 (discard_queued_stop_replies): Add `pid' argument.
11987 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11988 changes. Don't reference the `attached' global.
11989 (attach_inferior): Adjust to mywait interface changes.
11990 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11991 features. Handle and report "multiprocess+". Handle
11992 "qAttached:PID".
11993 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11994 changes.
11995 (handle_v_kill): New.
11996 (handle_v_stopped): Adjust to use target_pid_to_str.
11997 (handle_v_requests): Allow multiple attaches and runs when
11998 multiprocess extensions are in effect. Handle "vKill".
11999 (myresume): Adjust to use ptids.
12000 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12001 (handle_status): Adjust to discard_queued_stop_replies interface
12002 change.
12003 (first_thread_of, kill_inferior_callback)
12004 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12005 (main): Call initialize_inferiors. Adjust to use ptids, killing
12006 and detaching from all inferiors. Handle multiprocess packet
12007 variants.
12008 * linux-low.h: Include gdb_proc_service.h.
12009 (struct process_info_private): New.
12010 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12011 <lwpid_of>: Use ptid_get_lwp.
12012 (get_lwp_thread): Adjust.
12013 (struct lwp_info): Add `dead' member.
12014 (find_lwp_pid): Declare.
12015 * linux-low.c (thread_db_active): Delete.
12016 (new_inferior): Adjust comment.
12017 (inferior_pid): Delete.
12018 (linux_add_process): New.
12019 (handle_extended_wait): Adjust.
12020 (add_lwp): Change unsigned long to ptid.
12021 (linux_create_inferior): Add process to processes table. Adjust
12022 to use ptids. Don't set new_inferior here.
12023 (linux_attach_lwp): Rename to ...
12024 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12025 it. Adjust to use ptids.
12026 (linux_attach_lwp): New.
12027 (linux_attach): Add process to processes table. Don't set
12028 new_inferior here.
12029 (struct counter): New.
12030 (second_thread_of_pid_p, last_thread_of_process_p): New.
12031 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12032 multiple processes.
12033 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12034 processes. Remove process from process table.
12035 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12036 to multiple processes.
12037 (any_thread_of): New.
12038 (linux_detach): Add `pid' argument, and handle it. Remove process
12039 from processes table.
12040 (linux_join): Add `pid' argument. Handle it.
12041 (linux_thread_alive): Change unsighed long argument to ptid_t.
12042 Consider dead lwps as not being alive.
12043 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12044 threads we're not interested in.
12045 (same_lwp, find_lwp_pid): New.
12046 (linux_wait_for_lwp): Change `pid' argument's type from int to
12047 ptid_t. Adjust.
12048 (linux_wait_for_event): Rename to ...
12049 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12050 from int to ptid_t. Adjust.
12051 (linux_wait_for_event): New.
12052 (linux_wait_1): Add `ptid' argument. Change return type to
12053 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12054 that exit from the process table.
12055 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12056 Adjust.
12057 (mark_lwp_dead): New.
12058 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12059 stopping all threads, mark its main lwp as dead.
12060 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12061 ptids.
12062 (fetch_register, usr_store_inferior_registers)
12063 (regsets_fetch_inferior_registers)
12064 (regsets_store_inferior_registers, linux_read_memory)
12065 (linux_write_memory): Inline `inferior_pid'.
12066 (linux_look_up_symbols): Adjust to use per-process
12067 `thread_db_active'.
12068 (linux_request_interrupt): Adjust to use ptids.
12069 (linux_read_auxv): Inline `inferior_pid'.
12070 (initialize_low): Don't reference thread_db_active.
12071 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12072 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12073 (ps_getpid): Return the pid of the current inferior.
12074 * thread-db.c (proc_handle, thread_agent): Delete.
12075 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12076 per-process data.
12077 (find_one_thread): Change argument type to ptid_t. Adjust to
12078 per-process data.
12079 (maybe_attach_thread): Adjust to per-process data and ptids.
12080 (thread_db_find_new_threads): Ditto.
12081 (thread_db_init): Ditto.
12082 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12083 processes table. Adjust to use ptids.
12084 (spu_kill, spu_detach): Adjust interface. Remove process from
12085 processes table.
12086 (spu_join, spu_thread_alive): Adjust interface.
12087 (spu_wait): Adjust interface. Remove process from processes
12088 table. Adjust to use ptids.
12089 * win32-low.c (current_inferior_tid): Delete.
12090 (current_inferior_ptid): New.
12091 (debug_event_ptid): New.
12092 (thread_rec): Take a ptid. Adjust.
12093 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12094 (child_delete_thread): Ditto.
12095 (do_initial_child_stuff): Add `attached' argument. Add process to
12096 processes table.
12097 (child_fetch_inferior_registers, child_store_inferior_registers):
12098 Adjust.
12099 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12100 (win32_attach): Pass 1 to do_initial_child_stuff.
12101 (win32_kill): Adjust interface. Remove process from processes
12102 table.
12103 (win32_detach): Ditto.
12104 (win32_join): Adjust interface.
12105 (win32_thread_alive): Take a ptid.
12106 (win32_resume): Adjust to use ptids.
12107 (get_child_debug_event): Ditto.
12108 (win32_wait): Adjust interface. Remove exiting process from
12109 processes table.
12110
bd99dc85
PA
121112009-04-01 Pedro Alves <pedro@codesourcery.com>
12112
12113 Non-stop mode support.
12114
12115 * server.h (non_stop): Declare.
12116 (gdb_client_data, handler_func): Declare.
12117 (delete_file_handler, add_file_handler, start_event_loop):
12118 Declare.
12119 (handle_serial_event, handle_target_event, push_event)
12120 (putpkt_notif): Declare.
12121 * target.h (enum resume_kind): New.
12122 (struct thread_resume): Replace `step' field by `kind' field.
12123 (TARGET_WNOHANG): Define.
12124 (struct target_ops) <wait>: Add `options' argument.
12125 <supports_non_stop, async, start_non_stop>: New fields.
12126 (target_supports_non_stop, target_async): New.
12127 (start_non_stop): Declare.
12128 (mywait): Add `options' argument.
12129 * target.c (mywait): Add `options' argument. Print child exit
12130 notifications here.
12131 (start_non_stop): New.
12132 * server.c (non_stop, own_buf, mem_buf): New globals.
12133 (struct vstop_notif): New.
12134 (notif_queue): New global.
12135 (queue_stop_reply, push_event, discard_queued_stop_replies)
12136 (send_next_stop_reply): New.
12137 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12138 interface changes.
12139 (attach_inferior): In non-stop mode, don't wait for the target
12140 here.
12141 (handle_general_set): Handle QNonStop.
12142 (handle_query): When handling qC, return the current general
12143 thread, instead of the first thread of the list.
12144 (handle_query): If the backend supports non-stop mode, include
12145 QNonStop+ in the qSupported query response.
12146 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12147 and non-stop mode.
12148 (handle_v_attach, handle_v_run): Handle non-stop mode.
12149 (handle_v_stopped): New.
12150 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12151 (myresume): Adjust to use resume_kind. Handle non-stop.
12152 (queue_stop_reply_callback): New.
12153 (handle_status): Handle non-stop mode.
12154 (main): Clear non_stop flag on reconnection. Use the event-loop.
12155 Refactor serial protocol handling from here ...
12156 (process_serial_event): ... to this new function. When GDB
12157 selects any thread, select one here. In non-stop mode, wait until
12158 GDB acks all pending events before exiting.
12159 (handle_serial_event, handle_target_event): New.
12160 * remote-utils.c (remote_open): Install remote_desc in the event
12161 loop.
12162 (remote_close): Remove remote_desc from the event loop.
12163 (putpkt_binary): Rename to...
12164 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12165 (putpkt_binary): New as wrapper around putpkt_binary_1.
12166 (putpkt_notif): New.
12167 (prepare_resume_reply): In non-stop mode, don't change the
12168 general_thread.
12169 * event-loop.c: New.
12170 * Makefile.in (OBJ): Add event-loop.o.
12171 (event-loop.o): New rule.
12172
12173 * linux-low.h (pid_of): Moved here.
12174 (lwpid_of): New.
12175 (get_lwp_thread): Use lwpid_of.
12176 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12177 * linux-low.c (pid_of): Delete.
12178 (inferior_pid): Use lwpid_of.
12179 (linux_event_pipe): New.
12180 (target_is_async_p): New.
12181 (delete_lwp): New.
12182 (handle_extended_wait): Use lwpid_of.
12183 (add_lwp): Don't set lwpid field.
12184 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12185 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12186 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12187 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12188 first. Adjust to linux_wait_for_event interface changes. Use
12189 lwpid_of.
12190 (linux_detach): Don't delete the main lwp here.
12191 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12192 (status_pending_p): Don't consider explicitly suspended lwps.
12193 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12194 pointer. Add OPTIONS argument. Change return type to int. Use
12195 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12196 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12197 pointer. Add status pointer argument. Return a pid instead of a
12198 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12199 changes. In non-stop mode, don't switch to a random thread.
12200 (linux_wait): Rename to...
12201 (linux_wait_1): ... this. Add target_options argument, and handle
12202 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12203 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12204 clean exit and signal exit code. Don't stop all threads in
12205 non-stop mode. In all-stop mode, only stop all threads when
12206 reporting a stop to GDB. Handle explicit thread stop requests.
12207 (async_file_flush, async_file_mark): New.
12208 (linux_wait): New.
12209 (send_sigstop): Use lwpid_of.
12210 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12211 interface changes. In non-stop mode, don't switch to a random
12212 thread.
12213 (linux_resume_one_lwp): Use lwpid_of.
12214 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12215 (linux_resume_one_thread): ... this. Handle resume_stop. In
12216 non-stop mode, don't look for pending flag in all threads.
12217 (resume_status_pending_p): Don't consider explicitly suspended
12218 threads.
12219 (my_waitpid): Reimplement. Emulate __WALL.
12220 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12221 Use lwpid_of.
12222 (sigchld_handler, linux_supports_non_stop, linux_async)
12223 (linux_start_non_stop): New.
12224 (linux_target_ops): Register linux_supports_non_stop, linux_async
12225 and linux_start_non_stop.
12226 (initialize_low): Install SIGCHLD handler.
12227 * thread-db.c (thread_db_create_event, find_one_thread)
12228 (thread_db_get_tls_address): Use lwpid_of.
12229 * win32-low.c (win32_detach): Adjust to use resume_kind.
12230 (win32_wait): Add `options' argument.
12231 * spu-low.c (spu_resume): Adjust to use resume_kind.
12232 (spu_wait): Add `options' argument.
12233
5b1c542e
PA
122342009-04-01 Pedro Alves <pedro@codesourcery.com>
12235
12236 Decouple target code from remote protocol.
12237
12238 * target.h (enum target_waitkind): New.
12239 (struct target_waitstatus): New.
12240 (struct target_ops) <wait>: Return an unsigned long. Take a
12241 target_waitstatus pointer instead of a char pointer.
12242 (mywait): Likewise.
12243 * target.c (mywait): Change prototype to return an unsigned long.
12244 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12245 * server.h (thread_from_wait, old_thread_from_wait): Delete
12246 declarations.
12247 (prepare_resume_reply): Change prototype to take a
12248 target_waitstatus.
12249 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12250 (last_status, last_ptid): New.
12251 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12252 pid instead of a signal.
12253 (attach_inferior): Remove "status" and "signal" parameters.
12254 Adjust.
12255 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12256 not as an address.
12257 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12258 (handle_v_requests, myresume): Remove "status" and "signal"
12259 parameters. Adjust.
12260 (handle_status): New.
12261 (main): Delete local `status'. Adjust.
12262 * remote-utils.c: Include target.h.
12263 (prepare_resume_reply): Change prototype to take a
12264 target_waitstatus. Adjust.
12265
12266 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12267 interface.
12268 * spu-low.c (spu_wait): Adjust.
12269 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12270 Delete.
12271 (win32_wait): Adjust.
12272
2bd7c093
PA
122732009-04-01 Pedro Alves <pedro@codesourcery.com>
12274
12275 * target.h (struct thread_resume): Delete leave_stopped member.
12276 (struct target_ops): Add a `n' argument to the `resume' callback.
12277 * server.c (start_inferior): Adjust.
12278 (handle_v_cont, myresume): Adjust.
12279 * linux-low.c (check_removed_breakpoint): Adjust to resume
12280 interface change, and to removed leave_stopped field.
12281 (resume_ptr): Delete.
12282 (struct thread_resume_array): New.
12283 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12284 resume interface change.
12285 (linux_continue_one_thread, linux_queue_one_thread)
12286 (resume_status_pending_p): Check if the resume field is NULL
12287 instead of checking the leave_stopped member.
12288 (linux_resume): Adjust to the target resume interface change.
12289 * spu-low.c (spu_resume): Adjust to the target resume interface
12290 change.
12291 * win32-low.c (win32_detach, win32_resume): Ditto.
12292
c35fafde
PA
122932009-04-01 Pedro Alves <pedro@codesourcery.com>
12294
12295 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12296 flag.
12297 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12298 pending.
12299 (linux_continue_one_thread): Only preserve the stepping flag if
12300 there's a pending breakpoint.
12301
0a59d50b
PA
123022009-03-31 Pedro Alves <pedro@codesourcery.com>
12303
12304 * server.c (main): After the inferior having exited, call
12305 remote_close before exiting gdbserver.
12306
f04c6d38
TJB
123072009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12308
12309 Fix size of FPSCR in Power 7 processors.
12310 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12311 (PPC_FEATURE_HAS_DFP): New #define.
12312 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12313 size of the FPSCR.
12314
78e5cee6
PA
123152009-03-23 Pedro Alves <pedro@codesourcery.com>
12316
12317 * server.c (handle_query) Whitespace and formatting.
12318
1b3f6016
PA
123192009-03-22 Pedro Alves <pedro@codesourcery.com>
12320
12321 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12322 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12323 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12324 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12325 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12326 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12327 Makefile.in, configure.ac: Fix whitespace throughout.
12328 * configure: Regenerate.
12329
a07b2135
PA
123302009-03-22 Pedro Alves <pedro@codesourcery.com>
12331
12332 * inferiors.c (find_inferior): Make it safe for the callback
12333 function to delete the currently iterated inferior.
12334
67cc2626
PA
123352009-03-22 Pedro Alves <pedro@codesourcery.com>
12336
12337 * Makefile.in (linuw_low_h): Move higher.
12338 (thread-db.o): Depend on $(linux_low_h).
12339
54a0b537
PA
123402009-03-17 Pedro Alves <pedro@codesourcery.com>
12341
12342 Rename "process" to "lwp" throughout.
12343
12344 * linux-low.c (all_processes): Rename to...
12345 (all_lwps): ... this.
12346 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12347 (add_process): Rename to ...
12348 (add_lwp): ... this. Adjust.
12349 (linux_create_inferior): Adjust.
12350 (linux_attach_lwp): Adjust.
12351 (linux_attach): Adjust.
12352 (linux_kill_one_process): Rename to ...
12353 (linux_kill_one_lwp): ... this. Adjust.
12354 (linux_kill): Adjust.
12355 (linux_detach_one_process): Rename to ...
12356 (linux_detach_one_lwp): ... this. Adjust.
12357 (linux_detach): Adjust.
12358 (check_removed_breakpoint): Adjust.
12359 (status_pending_p): Adjust.
12360 (linux_wait_for_process): Rename to ...
12361 (linux_wait_for_lwp): ... this. Adjust.
12362 (linux_wait_for_event): Adjust.
12363 (send_sigstop): Adjust.
12364 (wait_for_sigstop): Adjust.
12365 (stop_all_processes): Rename to ...
12366 (stop_all_lwps): ... this.
12367 (linux_resume_one_process): Rename to ...
12368 (linux_resume_one_lwp): ... this. Adjust.
12369 (linux_set_resume_request, linux_continue_one_thread)
12370 (linux_queue_one_thread, resume_status_pending_p)
12371 (usr_store_inferior_registers, regsets_store_inferior_registers)
12372 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12373 Adjust.
12374 * linux-low.h (get_process): Rename to ...
12375 (get_lwp): ... this. Adjust.
12376 (get_thread_process): Rename to ...
12377 (get_thread_lwp): ... this. Adjust.
12378 (get_process_thread): Rename to ...
12379 (get_lwp_thread): ... this. Adjust.
12380 (struct process_info): Rename to ...
12381 (struct lwp_info): ... this.
12382 (all_processes): Rename to ...
12383 (all_lwps): ... this.
12384 * proc-service.c (ps_lgetregs): Adjust.
12385 * thread-db.c (thread_db_create_event, find_one_thread)
12386 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12387
0b16c5cf
PA
123882009-03-14 Pedro Alves <pedro@codesourcery.com>
12389
12390 * server.c (handle_query): Handle "qAttached".
12391
32de4b9d
NS
123922009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12393
12394 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12395 GPLv3, update license URL.
12396
2aecd87f
DE
123972009-03-01 Doug Evans <dje@google.com>
12398
93efd302 12399 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12400 (server_h): Add gdb_signals.h.
12401 (signals.o): Update.
12402 * server.h (target_signal_from_host,target_signal_to_host_p)
12403 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12404
86b1f9c5
PM
124052009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12406
12407 * remote-utils.c (getpkt): Also generate remote-debug
12408 information if noack_mode is set.
12409
4aa995e1
PA
124102009-02-06 Pedro Alves <pedro@codesourcery.com>
12411
12412 * server.c (handle_query): Report qXfer:siginfo:read and
12413 qXfer:siginfo:write as supported and handle them.
12414 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12415 * linux-low.c (linux_xfer_siginfo): New.
12416 (linux_target_ops): Set it.
12417
62709adf
PA
124182009-01-26 Pedro Alves <pedro@codesourcery.com>
12419
12420 * server.c (gdbserver_usage): Mention --remote-debug.
12421 (main): Accept '--remote-debug' switch.
12422
aef93bd7
DE
124232009-01-18 Doug Evans <dje@google.com>
12424
12425 * regcache.c (new_register_cache): No need to check result of xcalloc.
12426 * server.c (handle_search_memory): Back out calls to xmalloc,
12427 result is checked and error is returned to user upon failure.
12428 (handle_query): Ditto. Add more checks for result of malloc.
12429 (handle_v_cont): Check result of malloc, report error back to
12430 user upon failure.
12431 (handle_v_run): Ditto. Call freeargv.
12432 * server.h (freeargv): Declare.
12433 * utils.c (freeargv): New fn.
12434
54363045
DE
124352009-01-15 Doug Evans <dje@google.com>
12436
f626972c
DE
12437 * gdbreplay.c (perror_with_name): Make arg const char *.
12438 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12439 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12440 * utils.c (perror_with_name): Make arg const char *.
54363045 12441
18aae699
PA
124422009-01-14 Pedro Alves <pedro@codesourcery.com>
12443
12444 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12445 when handling a EXIT_PROCESS_DEBUG_EVENT.
12446
ff703abe
JB
124472009-01-06 Joel Brobecker <brobecker@adacore.com>
12448
12449 * gdbreplay.c (gdbreplay_version): Update copyright year.
12450 * server.c (gdbserver_version): Likewise.
12451
f21cc1a2 124522009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12453
12454 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12455 (handle_extended_wait): Improve comment.
0e21c1ec 12456
bca929d3
DE
124572008-12-13 Doug Evans <dje@google.com>
12458
12459 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12460 * server.h (ATTR_MALLOC): New macro.
12461 (xmalloc,xcalloc,xstrdup): Declare.
12462 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12463 * inferiors.c: Ditto.
12464 * linux-low.c: Ditto.
12465 * mem-break.c: Ditto.
12466 * regcache.c: Ditto.
12467 * remote-utils.c: Ditto.
12468 * server.c: Ditto.
12469 * target.c: Ditto.
12470 * win32-low.c: Ditto.
12471
97438e3f
DE
124722008-12-12 Doug Evans <dje@google.com>
12473
896c7fbb
DE
12474 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12475 in debugging printf.
12476
97438e3f
DE
12477 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12478
e3b886f8
DE
124792008-12-09 Doug Evans <dje@google.com>
12480
12481 * linux-low.h (struct process_info): Delete member tid, unused.
12482 * thread-db.c (find_one_thread): Update.
12483 (maybe_attach_thread): Update.
12484
07e059b5
VP
124852008-12-02 Pedro Alves <pedro@codesourcery.com>
12486
889bf7c5
PA
12487 * target.h (struct target_ops): Add qxfer_osdata member.
12488 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12489 and dirent.h.
12490 (linux_qxfer_osdata): New functions.
12491 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12492 callback.
12493 * server.c (handle_query): Handle "qXfer:osdata:read:".
12494 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12495 (buffer_xml_printf): New functions.
12496 * server.h (struct buffer): New.
12497 (buffer_grow_str, buffer_grow_str0): New macros.
12498 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12499 (buffer_xml_printf): Declare.
07e059b5 12500
4cab47ab
DE
125012008-11-24 Doug Evans <dje@google.com>
12502
12503 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12504
f142445f
DJ
125052008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12506
12507 * server.c (handle_v_run): Always use the supplied argument list.
12508
d0107bb6 125092008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12510
d0107bb6
BW
12511 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12512 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12513
2c4ad781
TJB
125142008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12515
12516 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12517 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12518 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12519 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12520 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12521 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12522 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12523 XML target descriptions.
12524 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12525 when inferior is running on an ISA 2.05 or later processor. Add
12526 special case to return offset for full 64-bit slot of FPSCR when
12527 in 32-bits.
12528
dfb64f85
DJ
125292008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12530
12531 * Makefile.in (SFILES, clean): Added sparc64 files.
12532 (reg-sparc64.o, reg-sparc64.c): New.
12533 * configure.srv (sparc*-*-linux*): New configuration.
12534 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12535 syscall arguments for SPARC.
12536 (regsets_store_inferior_registers): Likewise.
12537 * linux-sparc-low.c: New file.
12538
66b6e1dd
DE
125392008-10-21 Doug Evans <dje@google.com>
12540
12541 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12542 (READLINE_DIR,READLINE_DEP): Delete.
12543 (INTERNAL_CFLAGS): Update.
12544 (LINTFLAGS): Update.
12545
9b710a42
PA
125462008-10-10 Pedro Alves <pedro@codesourcery.com>
12547
12548 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12549 whole argv from the last run, not just argv[0].
12550
5822d809
PA
125512008-09-08 Pedro Alves <pedro@codesourcery.com>
12552
12553 * regcache.c (new_register_cache): Return NULL if the register
12554 cache size isn't known yet.
12555 (free_register_cache): Avoid dereferencing a NULL regcache.
12556
74aac56f
DJ
125572008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12558
12559 * configure.srv: Merge MIPS and MIPS64.
12560
400b20f5
MR
125612008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12562
12563 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12564
677c5bb1
LM
125652008-08-18 Luis Machado <luisgpm@br.ibm.com>
12566
12567 * Makefile.in: Add required vsx dependencies.
12568
12569 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12570 Declare init_registers_powerpc_vsx32l.
12571 Declare init_registers_powerpc_vsx64l.
12572 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12573 (ppc_arch_setup): Check for VSX in hwcap.
12574 (ppc_fill_vsxregset): New function.
12575 (ppc_store_vsxregset): New function.
12576 Add new VSX entry in regset_info target_regsets.
12577
12578 * configure.srv: Add new VSX dependencies.
12579
a6f3e723
SL
125802008-08-12 Pedro Alves <pedro@codesourcery.com>
12581
12582 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12583 (remote_open): Set or clear transport_is_reliable.
12584 (putpkt_binary): Don't expect acks in noack mode.
12585 (getpkt): Don't send ack/nac in noack mode.
12586 * server.c (handle_general_set): Handle QStartNoAckMode.
12587 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12588 qSupported.
12589 (main): Reset noack_mode on every connection.
12590 * server.h (noack_mode): Declare.
12591
a417dc56
RW
125922008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12593
12594 * Makefile.in (GDBREPLAY_OBS): New variable.
12595 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12596
3221518c
UW
125972008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12598 Daniel Jacobowitz <dan@codesourcery.com>
12599
12600 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12601 (usr_store_inferior_registers): Likewise.
12602 (regsets_store_inferior_registers): Likewise.
12603
ec56be1b
PA
126042008-07-31 Rolf Jansen <rj@surtec.com>
12605 Pedro Alves <pedro@codesourcery.com>
12606
12607 * configure.ac: Check for memmem declaration.
12608 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12609 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12610 (disable_packet_qfThreadInfo): Unconditionally compile.
12611 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12612 * configure, config.in: Regenerate.
12613
2fe5e3ff
DE
126142008-07-28 Doug Kwan <dougkwan@google.com>
12615
12616 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12617 (linux_write_memory): Remove declaration of errno.
12618
836acd6d
UW
126192008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12620
12621 * linux-low.c (handle_extended_wait): Do not use "status"
12622 variable uninitialized.
12623
aeba519e
PA
126242008-07-07 Pedro Alves <pedro@codesourcery.com>
12625
12626 * server.c (handle_v_attach): Inhibit reporting dll changes.
12627
db42f210
PA
126282008-06-27 Pedro Alves <pedro@codesourcery.com>
12629
12630 * remote-utils.c (prepare_resume_reply): If requested, don't
12631 output "thread:TID" in the T stop reply.
12632
12633 * server.c (disable_packet_vCont, disable_packet_Tthread)
12634 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12635 (handle_query): If requested, disable support for qC, qfThreadInfo
12636 and qsThreadInfo.
12637 (handle_v_requests): If requested, disable support for vCont.
12638 (gdbserver_show_disableable): New.
12639 (main): Handle --disable-packet and --disable-packet=LIST.
12640
12641 * server.h (disable_packet_vCont, disable_packet_Tthread)
12642 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12643
8e4c5421
CD
126442008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12645
12646 * server.c (gdbserver_usage): Mention --version.
12647
6e23a804
DJ
126482008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12649
12650 * Makefile.in (gdbreplay.o): New rule.
12651
90aa6a40
JM
126522008-06-06 Joseph Myers <joseph@codesourcery.com>
12653
12654 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12655 message, not gdbserver.
12656
c16158bc 126572008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12658 Nathan Sidwell <nathan@codesourcery.com>
12659 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12660
12661 * acinclude.m4: Include ../../config/acx.m4.
12662 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12663 * configure, config.in: Regenerate.
12664 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12665 * server.c (gdbserver_version): Print PKGVERSION.
12666 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12667 (main): Adjust gdbserver_usage calls.
12668 * gdbreplay.c (version, host_name): Add declarations.
12669 (gdbreplay_version, gdbreplay_usage): New.
12670 (main): Accept --version and --help options.
12671
aeb75bf5
DJ
126722008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12673
12674 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12675 (arm_breakpoint_at): Handle Thumb.
12676 (the_low_target): Add comment.
12677
76b233dd
UW
126782008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12679
12680 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12681
08388c79
DE
126822008-05-09 Doug Evans <dje@google.com>
12683
a3c83fae
DE
12684 * server.h (decode_search_memory_packet): Declare.
12685 * remote-utils.c (decode_search_memory_packet): New fn.
12686 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12687 (handle_search_memory): New fn.
12688 (handle_query): Process qSearch:memory packets.
12689
bb9c3d36
UW
126902008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12691
12692 * regcache.c (registers_length): Remove.
12693 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12694 full register packet.
12695 * regcache.h (registers_length): Remove prototype.
12696 * server.h (PBUFSIZ): Define to 16384.
12697
7284e1be
UW
126982008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12699
12700 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12701 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12702 powerpc-64l.o, and powerpc-altivec64l.o.
12703 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12704 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12705 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12706 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12707 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12708 to srv_xmlfiles.
12709
12710 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12711 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12712 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12713 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12714 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12715 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12716 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12717 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12718 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12719 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12720 (clean): Update.
12721
12722 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12723 (init_registers_powerpc_32l): ... this new prototype.
12724 (init_registers_powerpc_32): Remove, replace by ...
12725 (init_registers_powerpc_altivec32l): ... this new prototype.
12726 (init_registers_powerpc_e500): Remove, replace by ...
12727 (init_registers_powerpc_e500l): ... this new prototype.
12728 (init_registers_ppc64): Remove, replace by ...
12729 (init_registers_powerpc_64l): ... this new prototype.
12730 (init_registers_powerpc_64): Remove, replace by ...
12731 (init_registers_powerpc_altivec64l): ... this new prototype.
12732 (ppc_num_regs): Set to 73.
12733 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12734 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12735 (ppc_cannot_store_register): Handle orig_r3 and trap.
12736 (ppc_arch_setup): Update init_registers_... calls.
12737 (ppc_fill_gregset): Handle orig_r3 and trap.
12738
12739 * inferiors.c (clear_inferiors): Reset current_inferior.
12740
fdc59709
PB
127412008-04-23 Paolo Bonzini <bonzini@gnu.org>
12742
889bf7c5
PA
12743 * acinclude.m4: Add override.m4.
12744 * configure: Regenerate.
fdc59709 12745
c9b2f845
UW
127462008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12747
12748 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12749 initial call to init_register_ppc64.
12750
550512b8
UW
127512008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12752
43aaf8b6
PA
12753 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12754 single powerpc*-*-linux* case.
550512b8
UW
12755 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12756
b6430ec3
UW
127572008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12758
12759 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12760 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12761 from reg_xmlfiles.
12762 * linux-ppc-low.c: Include <elf.h>.
12763 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12764 (ppc_hwcap): New global variable.
12765 (ppc_regmap): Remove __SPE__ #ifdef sections.
12766 (ppc_regmap_e500): New global variable.
12767 (ppc_cannot_store_register): Update __SPE__ special case.
12768 (ppc_get_hwcap): New function.
12769 (ppc_arch_setup): Use it to determine whether inferior supports
12770 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12771 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12772 Do not access registers if target does not support AltiVec.
12773 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12774 Do not access registers if target does not support SPE.
12775 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12776
52fa2412
UW
127772008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12778
12779 * linux-low.c (disabled_regsets, num_regsets): New.
12780 (use_regsets_p): Delete.
12781 (linux_wait_for_process): Clear disabled_regsets.
12782 (regsets_fetch_inferior_registers): Check and set it.
12783 (regsets_store_inferior_registers): Likewise.
12784 (linux_fetch_registers, linux_store_registers): Do not use
12785 use_regsets_p.
12786 (initialize_low): Allocate disabled_regsets.
12787
e28b3332
DJ
127882008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12789
12790 * Makefile.in (LIBOBJS): New.
12791 (OBS): Use LIBOBJS.
12792 (memmem.o): New rule.
12793 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12794 * configure: Regenerated.
12795
4536995d
UW
127962008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12797
12798 * server.c (handle_query): Never return "unsupported" for
12799 qXfer:features:read queries.
12800
221c031f
UW
128012008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12802
12803 * server.c (get_features_xml): Fix inverted condition.
12804 (handle_query): Always support qXfer:feature:read.
12805
ccd213ac
DJ
128062008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12807
12808 * server.c (wrapper_argv): New.
12809 (start_inferior): Handle wrapper_argv. If set, expect an extra
12810 trap.
12811 (gdbserver_usage): Document --wrapper.
12812 (main): Parse --wrapper.
12813
6fe305f7
UW
128142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12815
12816 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12817 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12818 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12819 (ppc_set_pc): Likewise.
12820 (ppc_arch_setup): New function.
12821 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12822 of collect_register.
889bf7c5 12823 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12824
5b0a002e
UW
128252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12826
12827 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12828 instead of linux-ppc64-low.o.
12829 * linux-ppc64-low.c: Remove file.
12830 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12831 (linux-ppc64-low.o): Remove rule.
12832
12833 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12834 (init_registers_powerpc_64): Likewise.
12835 (ppc_regmap): Conditionally define depending on __powerpc64__.
12836 (ppc_cannot_store_register): Do not special-case "fpscr" when
12837 compiled on __powerpc64__.
12838 (ppc_collect_ptrace_register): New function.
12839 (ppc_supply_ptrace_register): New function.
12840 (ppc_breakpoint): Change type to "unsigned int".
12841 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12842 (the_low_target): Conditionally provide initializers for the
889bf7c5 12843 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12844 collect_ptrace_register and supply_ptrace_register members.
12845
9b4b61c8
UW
128462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12847
12848 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12849 * server.c (gdbserver_xmltarget): Define.
12850 (get_features_xml): Use it to replace "target.xml" and arch_string.
12851
12852 * configure.srv: Remove srv_xmltarget. Add XML files that were
12853 mentioned there to srv_xmlfiles instead. Remove conditional tests
12854 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12855 srv_xmlfiles and srv_regobj to include all possible choices.
12856 * configure.ac (srv_xmltarget): Remove.
12857 (srv_xmlfiles): Do not add "target.xml".
12858 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12859 checks for supplementary target information.
12860 * configure: Regenerate.
12861 * Makefile.in (XML_TARGET): Remove.
12862 (target.xml): Remove rule.
12863 (clean): Do not clean up target.xml.
12864 (.PRECIOUS): Do not mention target.xml.
12865
12866 * target.h (struct target_ops): Remove arch_string member.
12867 * linux-low.c (linux_arch_string): Remove.
12868 (linux_target_ops): Remove arch_string initializer.
12869 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12870 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12871 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12872 * spu-low.c (spu_arch_string): Remove.
12873 (spu_target_ops): Remove arch_string initializer.
12874 * win32-low.c (win32_arch_string): Remove.
12875 (win32_target_ops): Remove arch_string initializer.
12876 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12877 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12878 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12879
ee1a7ae4
UW
128802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12881
12882 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12883 by collect_ptrace_register and supply_ptrace_register hooks.
12884 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12885 instead of checking for the_low_target.left_pad_xfer.
12886 (usr_store_inferior_registers): Use collect_ptrace_register callback
12887 instead of checking for the_low_target.left_pad_xfer.
12888
12889 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12890 (s390_supply_ptrace_register): Likewise.
12891 (s390_fill_gregset): Call s390_collect_ptrace_register.
12892 (the_low_target): Update.
12893
12894 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12895 (ppc_supply_ptrace_register): Likewise.
12896 (the_low_target): Update.
12897
12898 * linux-i386-low.c (the_low_target): Update.
12899 * linux-x86-64-low.c (the_low_target): Update.
12900
d61ddec4
UW
129012008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12902
12903 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12904 reg-s390.o and reg-s390x.o.
12905
12906 * linux-low.c (new_inferior): New global variable.
12907 (linux_create_inferior, linux_attach): Set it.
12908 (linux_wait_for_process): Call the_low_target.arch_setup after the
12909 target has stopped for the first time.
12910 (initialize_low): Do not call the_low_target.arch_setup.
12911
12912 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12913 (s390_set_pc): Likewise.
12914 (s390_arch_setup): New function.
12915 (the_low_target): Use s390_arch_setup as arch_setup routine.
12916
12917 * regcache.c (realloc_register_cache): New function.
12918 (set_register_cache): Call it for each existing regcache.
12919
d05b4ac3
UW
129202008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12921
12922 * server.h (init_registers): Remove prototype.
12923
12924 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12925 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12926 instead of init_registers ().
12927 * linux-arm-low.c (init_registers_arm): Add prototype.
12928 (init_registers_arm_with_iwmmxt): Likewise.
12929 (the_low_target): Add initializer for arch_setup field.
12930 * linux-cris-low.c (init_registers_cris): Add prototype.
12931 (the_low_target): Add initializer for arch_setup field.
12932 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12933 (the_low_target): Add initializer for arch_setup field.
12934 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12935 (the_low_target): Add initializer for arch_setup field.
12936 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12937 (the_low_target): Add initializer for arch_setup field.
12938 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12939 (the_low_target): Add initializer for arch_setup field.
12940 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12941 (the_low_target): Add initializer for arch_setup field.
12942 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12943 (init_registers_mips64_linux): Likewise.
12944 (the_low_target): Add initializer for arch_setup field.
12945 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12946 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12947 (the_low_target): Add initializer for arch_setup field.
12948 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12949 (init_registers_powerpc_64): Likewise.
12950 (the_low_target): Add initializer for arch_setup field.
12951 * linux-s390-low.c (init_registers_s390): Add prototype.
12952 (init_registers_s390x): Likewise.
12953 (the_low_target): Add initializer for arch_setup field.
12954 * linux-sh-low.c (init_registers_sh): Add prototype.
12955 (the_low_target): Add initializer for arch_setup field.
12956 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12957 (the_low_target): Add initializer for arch_setup field.
12958 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12959 (the_low_target): Add initializer for arch_setup field.
12960
12961 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12962 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12963 instead of init_registers ().
12964 * win32-arm-low.c (init_registers_arm): Add prototype.
12965 (the_low_target): Add initializer for arch_setup field.
12966 * win32-i386-low.c (init_registers_i386): Add prototype.
12967 (the_low_target): Add initializer for arch_setup field.
12968
12969 * spu-low.c (init_registers_spu): Add prototype.
12970 (initialize_low): Call initialie_registers_spu () instead of
12971 initialize_registers ().
12972
fd96d250
PA
129732008-02-19 Pedro Alves <pedro@codesourcery.com>
12974
12975 * server.c (handle_v_requests): When handling the vRun and vAttach
12976 packets, if already debugging a process, don't kill it. Return an
12977 error instead.
12978
d41b6bb4
DJ
129792008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * server.c (handle_query): Correct length check.
12982
5ac588cf
PA
129832008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12984
12985 * win32-low.c (do_initial_child_stuff): Add process handle
12986 parameter. Set current_process_handle and current_process_id from the
12987 parameters. Clear globals.
12988 (win32_create_inferior): Don't set current_process_handle and
12989 current_process_id here. Instead pass them on the call to
12990 do_initial_child_stuff.
12991 (win32_attach): Likewise.
12992 (win32_clear_inferiors): New.
12993 (win32_kill): Don't close the current process handle or the
12994 current thread handle here. Instead call win32_clear_inferiors.
12995 (win32_detach): Don't open a new handle to the process. Call
12996 win32_clear_inferiors.
12997 (win32_join): Don't rely on current_process_handle; open a new
12998 handle using the process id.
12999 (win32_wait): Call win32_clear_inferiors when the inferior process
13000 has exited.
13001
ecd7ecbc
DJ
130022008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13003
13004 * server.c (monitor_show_help): Add "exit".
13005
1525d545
MG
130062008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13007
ecd7ecbc 13008 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13009 (clean): Add reg-xtensa.c.
13010 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13011 * configure.srv (xtensa*-*-linux*) New target.
13012 * linux-xtensa-low.c: New.
13013 * xtensa-xtregs.c: New.
1525d545 13014
59a016f0
PA
130152008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13016
13017 * hostio.c: Don't include errno.h.
13018 (errno_to_fileio_errno): Move to hostio-errno.
13019 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13020 error number outputting to the target->hostio_last_error callback.
13021 (hostio_packet_error): Use FILEIO_EINVAL directly.
13022 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13023 calls to hostio_error.
13024 * hostio-errno.c: New.
13025 * server.h (hostio_last_error_from_errno): Declare.
13026 * target.h (target_ops): Add hostio_last_error member.
13027 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13028 as hostio_last_error handler.
889bf7c5 13029 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13030 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13031 (wince_hostio_last_error): New functions.
13032 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13033 as hostio_last_error handler.
13034 (win32_target_ops) [!_WIN32_WCE]: Register
13035 hostio_last_error_from_errno as hostio_last_error handler.
13036 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13037 (hostio-errno.o): New rule.
13038 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13039 * configure.srv (srv_hostio_err_objs): New variable. Default to
13040 hostio-errno.o.
13041 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13042 * configure: Regenerate.
13043
2d717e4f
DJ
130442008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13045
13046 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13047 (linux_kill, linux_detach): Clean up the process list.
13048 * remote-utils.c (remote_open): Improve port number parsing.
13049 (putpkt_binary, input_interrupt): Only send interrupts if the target
13050 is running.
13051 * server.c (extended_protocol): Make static.
13052 (attached): Define earlier.
13053 (exit_requested, response_needed, program_argv): New variables.
13054 (target_running): New.
13055 (start_inferior): Clear attached here.
13056 (attach_inferior): Set attached here.
13057 (require_running): Define.
13058 (handle_query): Use require_running and target_running. Implement
13059 "monitor exit".
13060 (handle_v_attach, handle_v_run): New.
13061 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13062 (gdbserver_usage): Update.
13063 (main): Redo argument parsing. Handle --debug and --multi. Handle
13064 --attach along with other options or after the port. Save
13065 program_argv. Support no initial program. Resynchronize
13066 communication with GDB after an error. Handle "monitor exit".
13067 Use require_running and target_running. Always allow the extended
13068 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13069 restart in extended mode.
13070 * README: Refer to the GDB manual. Update --attach usage.
13071
7407e2de
AS
130722007-12-20 Andreas Schwab <schwab@suse.de>
13073
13074 * linux-low.c (STACK_SIZE): Define.
13075 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13076 (linux_test_for_tracefork): Likewise.
13077
b65d95c5
DJ
130782007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13079
13080 * linux-low.c (linux_wait_for_event): Update messages. Do not
13081 reinsert auto-delete breakpoints.
13082 * mem-break.c (struct breakpoint): Change return type of handler to
13083 int.
13084 (set_breakpoint_at): Update handler type.
13085 (reinsert_breakpoint_handler): Return 1 instead of calling
13086 delete_breakpoint.
13087 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13088 setting a new one.
13089 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13090 * mem-break.h (set_breakpoint_at): Update handler type.
13091 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13092 * win32-low.c (auto_delete_breakpoint): New.
13093 (get_child_debug_event): Use it.
13094
4e799345
DJ
130952007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13096
13097 * configure.ac: Check for pread and pwrite.
13098 * hostio.c (handle_pread): Fall back to lseek and read.
13099 (handle_pwrite): Fall back to lseek and write.
13100 * config.in, configure: Regenerated.
13101
27524b67
DJ
131022007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13103
13104 * server.c (myresume): Add own_buf argument.
13105 (main): Update calls.
13106
a20d5e98
DJ
131072007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13108
13109 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13110 * remote-utils.c (remote_open): Do not call disable_async_io.
13111 (block_async_io): Delete.
13112 (unblock_async_io): Make static.
13113 (initialize_async_io): New.
13114 * server.c (handle_v_cont): Handle async I/O here.
13115 (myresume): Likewise. Move other common resume tasks here...
13116 (main): ... from here. Call initialize_async_io. Disable async
13117 I/O before the main loop.
13118 * server.h (initialize_async_io): Declare.
13119 (block_async_io, unblock_async_io): Delete prototypes.
13120 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13121
b79d787e
DJ
131222007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13123
13124 * remote-utils.c (readchar): Allow binary data in received messages.
13125
d97903b2
PA
131262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13127
13128 * win32-low.c (attaching): New global.
13129 (win32_create_inferior): Clear the `attaching' global.
13130 (win32_attach): Set the `attaching' global.
13131 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13132 attaching. Only set a breakpoint at the entry point if not
13133 attaching.
13134
311de423
PA
131352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13136
13137 * server.c (main): Don't report dll events on the initial
13138 connection on attaches.
13139
6c2d16d2
PA
131402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13141
13142 * server.c (main): Relax numerical bases supported for the pid of
13143 the --attach command line argument.
13144
5ca906e6
PA
131452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13146
13147 * win32-low.c (win32_attach): Call OpenProcess before
13148 DebugActiveProcess, not after. Add last error output to error
13149 call.
13150
9c6c8194
PA
131512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13152
13153 * win32-low.c (win32_get_thread_context)
13154 (win32_set_thread_context): New functions.
13155 (thread_rec): Use win32_get_thread_context.
13156 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13157 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13158 field.
13159
4d5d1aaa
PA
131602007-12-03 Leo Zayas
13161 Pedro Alves <pedro_alves@portugalmail.pt>
13162
13163 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13164 global variables.
13165 (child_add_thread): Minor cleanup.
13166 (child_continue): Resume artificially suspended threads before
13167 calling ContinueDebugEvent.
13168 (suspend_one_thread): New.
13169 (fake_breakpoint_event): New.
13170 (get_child_debug_event): Change return type to int. Check here if
13171 gdb sent an interrupt request. If a soft interrupt was requested,
13172 fake a breakpoint event. Return 0 if there is no event to handle,
13173 and 1 otherwise.
13174 (win32_wait): Don't check here if gdb sent an interrupt request.
13175 Ensure there is a valid event to handle.
13176 (win32_request_interrupt): Add soft interruption method as last
13177 resort.
13178
c436e841
PA
131792007-12-03 Leo Zayas
13180 Pedro Alves <pedro_alves@portugalmail.pt>
13181
13182 * win32-low.h (win32_thread_info): Add descriptions to the
13183 structure members. Replace `suspend_count' counter by a
13184 `suspended' flag.
13185 * win32-low.c (thread_rec): Update condition of when to get the
13186 context from the inferior. Rely on ContextFlags being set if it
13187 has already been retrieved. Only suspend the inferior thread if
13188 we haven't already. Warn if that fails.
13189 (continue_one_thread): s/suspend_count/suspended/. Only call
13190 ResumeThread once. Warn if that fails.
13191
e7b5fa67
PA
131922007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13193
13194 * win32-low.c (win32_wait): Don't read from the inferior when it
13195 has already exited.
13196
a385171d
PA
131972007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13198
13199 * Makefile.in (win32_low_h): New variable.
13200 (win32-low.o): Add dependency on $(win32_low_h).
13201 (win32-arm-low.o, win32-i386-low.o): New rules.
13202
f80c84b3
DJ
132032007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13204
13205 * hostio.c: Correct copyright year.
13206
a6b151f1
DJ
132072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13208
13209 * Makefile.in (OBS): Add hostio.o.
13210 (hostio.o): New rule.
13211 * server.h (handle_vFile): Declare.
13212 * hostio.c: New file.
13213 * server.c (handle_v_requests): Take packet_len and new_packet_len
13214 for binary packets. Call handle_vFile.
13215 (main): Update call to handle_v_requests.
13216
f9387fc3
DJ
132172007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13218
13219 * linux-low.c: Include <sched.h>.
13220
51c2684e
DJ
132212007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13222
13223 * linux-low.c (linux_tracefork_grandchild): New.
13224 (linux_tracefork_child): Use clone.
13225 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13226
75f83163
JB
132272007-10-31 Joel Brobecker <brobecker@adacore.com>
13228
13229 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13230
da5898ce
DJ
132312007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13232
13233 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13234
24a09b5f
DJ
132352007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * inferiors.c (change_inferior_id): Delete.
13238 (add_pid_to_list, pull_pid_from_list): New.
13239 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13240 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13241 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13242 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13243 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13244 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13245 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13246 (using_threads): Always set to 1.
13247 (handle_extended_wait): New.
13248 (add_process): Do not set TID.
13249 (linux_create_inferior): Set must_set_ptrace_flags.
13250 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13251 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13252 (linux_thread_alive): Rename TID argument to LWPID.
13253 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13254 (linux_wait_for_event): Do not use TID or check using_threads. Update
13255 call to dead_thread_notify. Call handle_extended_wait.
13256 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13257 (send_sigstop): Delete sigstop_sent.
13258 (wait_for_sigstop): Avoid TID.
13259 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13260 (linux_test_for_tracefork): New.
13261 (linux_lookup_signals): Use thread_db_active and
13262 linux_supports_tracefork_flag.
13263 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13264 * linux-low.h (get_process_thread): Avoid TID.
13265 (struct process_ifo): Move thread_known and tid to the end. Remove
13266 sigstop_sent.
13267 (linux_attach_lwp, thread_db_init): Update prototypes.
13268 * server.h (change_inferior_id): Delete prototype.
13269 (add_pid_to_list, pull_pid_from_list): New prototypes.
13270 * thread-db.c (thread_db_use_events): New.
13271 (find_first_thread): Rename to...
13272 (find_one_thread): ...this. Update callers and messages. Do not
13273 call fatal. Check thread_db_use_events. Do not call
13274 change_inferior_id or new_thread_notify.
13275 (maybe_attach_thread): Update. Do not call new_thread_notify.
13276 (thread_db_init): Set thread_db_use_events. Check use_events.
13277 * utils.c (fatal, warning): Correct message prefix.
13278
30ed0a8f
DJ
132792007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13280
13281 * Makefile.in (clean): Remove new files.
13282 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13283 (powerpc-64.o, powerpc-64.c): New rules.
13284 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13285 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13286 with SPE.
13287 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13288 SPE targets.
13289 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13290 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13291 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13292 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13293 (target_regsets): Add AltiVec and SPE register sets.
13294 * configure.ac: Check for AltiVec and SPE.
13295 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13296 (ppc_fill_vrregset, ppc_store_vrregset): New.
13297 (target_regsets): Add AltiVec register set.
13298 * configure: Regenerated.
13299
fd462a61
DJ
133002007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13301
13302 * linux-low.c (O_LARGEFILE): Define.
13303 (linux_read_memory): Use /proc/PID/mem.
13304 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13305 * configure, config.in: Regenerated.
13306
69f223ed
DJ
133072007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13308
13309 * linux-low.c (linux_wait_for_event): Do not pass signals while
13310 single-stepping.
13311
aec18585
PA
133122007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13313
13314 * win32-low.c (create_process): New.
13315 (win32_create_inferior): Use create_process instead of
13316 CreateProcess. If create_process failed retry appending an ".exe"
13317 suffix. Store the GetLastError result immediatelly after
13318 create_process calls and use it on the call to error.
13319
34d86ddd
PA
133202007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13321
13322 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13323
5a0e3bd0
JB
133242007-08-23 Joel Brobecker <brobecker@adacore.com>
13325
13326 * configure.ac: Switch license to GPLv3.
13327
f88c79e6
MS
133282007-08-01 Michael Snyder <msnyder@access-company.com>
13329
13330 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13331
6b3d9b83
PA
133322007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13333
13334 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13335 typedef.
13336 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13337 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13338 CloseToolhelp32Snapshot.
13339 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13340 CloseToolhelp32Snapshot.
13341
c588c53c
MS
133422007-07-27 Michael Snyder <michael.snyder@access-company.com>
13343
13344 * server.c (main): Check for inferior exit before main loop.
13345
aa0403d9
PA
133462007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13347
13348 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13349 instead of on tmp_desc.
13350
255e7678
DJ
133512007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13352 Daniel Jacobowitz <dan@codesourcery.com>
13353
13354 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13355 (add_thread): Minor cleanups.
13356 (clear_inferiors): Move lower in the file. Clear the DLL
13357 list.
13358 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13359 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13360 (xml_escape_text): New.
13361 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13362 for qSupported.
13363 (handle_v_cont): Report errors.
13364 (gdbserver_version): Update.
13365 (main): Correct size of own_buf. Do not report initial DLL events.
13366 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13367 (unloaded_dll, xml_escape_text): New.
13368 * win32-low.c (enum target_waitkind): Update comments.
13369 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13370 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13371 (win32_EnumProcessModules, win32_GetModuleInformation)
13372 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13373 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13374 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13375 (win32_Module32First, win32_Module32Next, load_toolhelp)
13376 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13377 (get_child_debug_event): Handle DLL events.
13378 (win32_wait): Likewise.
13379
0d37add9
DJ
133802007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13383 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13384
45e2715e
PA
133852007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13386
13387 * win32-low.c (handle_output_debug_string): Ignore event if not
13388 waiting.
13389
c5674cf1
PA
133902007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13391
13392 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13393
2bbe3cc1
DJ
133942007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13395
13396 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13397
ae13219e
DJ
133982007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * inferiors.c (change_inferior_id): Add comment.
13401 * linux-low.c (check_removed_breakpoint): Add an early
13402 prototype. Improve debug output.
13403 (linux_attach): Doc update.
13404 (linux_detach_one_process, linux_detach): Clean up before releasing
13405 each process.
13406 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13407 * linux-low.h (struct process_info): Doc improvement.
13408 * mem-break.c (delete_all_breakpoints): New.
13409 * mem-break.h (delete_all_breakpoints): New prototype.
13410 * thread-db.c (find_first_thread): New.
13411 (thread_db_create_event): Call it instead of
13412 thread_db_find_new_threads. Clean up unused variables.
13413 (maybe_attach_thread): Remove first thread handling.
13414 (thread_db_find_new_threads): Use find_first_thread.
13415 (thread_db_get_tls_address): Likewise.
13416
4105de34
DJ
134172007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13418
13419 * thread-db.c (thread_db_find_new_threads): Add prototype.
13420 (thread_db_create_event): Check for the main thread before adding
13421 a new thread.
13422 (maybe_attach_thread): Only enable event reporting if TID == 0.
13423 (thread_db_get_tls_address): Check for new threads.
13424
2b876972
DJ
134252007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13426
13427 * linux-low.c (linux_create_inferior): Try execv before execvp.
13428 * spu-low.c (spu_create_inferior): Likewise.
13429
7a245884
DJ
134302007-06-13 Mike Frysinger <vapier@gentoo.org>
13431
13432 * linux-low.c (linux_create_inferior): Change execv to execvp.
13433 * spu-low.c (spu_create_inferior): Likewies.
13434
117ce543
DJ
134352007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * Makefile.in (clean): Clean new files instead of deleted ones.
13438 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13439 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13440 rules.
13441 * configure.srv: Specify XML files and new regformats for MIPS and
13442 MIPS64 GNU/Linux.
13443 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13444 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13445 an entry for the restart register.
13446 (mips_cannot_fetch_register, mips_cannot_store_register)
13447 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13448 register names to match the XML descriptions.
13449 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13450 restart register instead of $0.
13451
0e7f50da
UW
134522007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13453 Markus Deuling <deuling@de.ibm.com>
13454
13455 * remote-utils.c (decode_xfer_write): New function.
13456 * server.h (decode_xfer_write): Add prototype.
13457 * server.c (handle_query): Add PACKET_LEN argument. Support
13458 qXfer:spu:read and qXfer:spu:write packets.
13459 (main): Pass packet_len to handle_query.
13460 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13461 * target.h (target_ops): Add qxfer_spu.
13462
374c1d38
UW
134632007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13464
13465 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13466 accessing non-seekable spufs files.
13467
bb63802a
UW
134682007-05-16 Markus Deuling <deuling@de.ibm.com>
13469
889bf7c5 13470 * server.c (handle_query): Add reply for qC packet.
bb63802a 13471
7390519e
PA
134722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13473 Leo Zayas <lerele@champenstudios@com>
13474
13475 * server.h (check_remote_input_interrupt_request): New function.
13476 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13477 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13478 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13479 (check_remote_input_interrupt_request): New function.
13480 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13481 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13482 winapi_GenerateConsoleCtrlEvent): New typedefs.
13483 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13484 to 250 ms.
13485 (win32_wait): Check for remote interrupt request
13486 with check_remote_input_interrupt_request.
13487 (win32_request_interrupt): New function.
13488 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13489
34b34921
PA
134902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13491
13492 * win32-low.c (debug_registers_changed,
13493 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13494 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13495 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13496 (thread_rec): Get context using the low target.
13497 (child_add_thread): Call thread_added on the low target,
13498 which does the same thing.
13499 (regptr): Delete.
13500 (do_initial_child_stuff): Remove debug registers references.
13501 Set context using the low target. Resume threads after
13502 setting the contexts.
13503 (child_continue): Remove dead variable. Remove debug
13504 registers references.
13505 (child_fetch_inferior_registers): Go through the low target.
13506 (do_child_store_inferior_registers): Remove.
13507 (child_store_inferior_registers): Go through the low target.
13508 (win32_resume): Remove debug registers references.
13509 Set context using the low target.
13510 (handle_exception): Change return type to void. Don't record
13511 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13512 first chance exception.
889bf7c5 13513 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13514 goto loop. Always return after waiting for debug event.
13515 (win32_wait): Convert to switch statement. Handle spurious
13516 events.
13517
13518 * win32-i386-low.c (debug_registers_changed,
13519 debug_registers_used): New.
13520 (initial_stuff): Rename to ...
13521 (i386_initial_stuff): ... this. Clear debug registers
13522 state variables.
13523 (store_debug_registers): Delete.
13524 (i386_get_thread_context): New.
13525 (load_debug_registers): Delete.
13526 (i386_set_thread_context): New.
13527 (i386_thread_added): New.
13528 (single_step): Rename to ...
13529 (i386_single_step): ... this.
13530 (do_fetch_inferior_registers): Rename to ...
13531 (i386_fetch_inferior_register): ... this.
13532 (i386_store_inferior_register): New.
13533 (the_low_target): Adapt to new interface.
13534
13535 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13536 (arm_get_thread_context): New.
13537 (arm_set_thread_context): New.
13538 (regptr): New.
13539 (do_fetch_inferior_registers): Rename to ...
13540 (arm_fetch_inferior_register): ... this.
13541 (arm_store_inferior_register): New.
13542 (arm_wince_breakpoint): Reimplement as unsigned long.
13543 (arm_wince_breakpoint_len): Define.
13544 (the_low_target): Adapt to new interface.
13545
13546 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13547 load_debug_registers. Add get_thread_context, set_thread_context,
13548 thread_added and store_inferior_register. Rename
13549 fetch_inferior_registers to fetch_inferior_register.
13550 (regptr): Remove declaration.
13551
dd6953e1
PA
135522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13553
13554 * linux-low.c (linux_detach): Change return type to int. Return 0.
13555 * spu-low.c (spu_detach): Likewise.
13556
444d6139
PA
135572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13558
13559 * target.h (target_ops): Change return type of detach to int.
13560 Add join.
13561 (join_inferior): New.
13562 * server.c (main): Don't skip detach support on mingw32.
13563 If the inferior doesn't support detaching return error.
13564 Call join_inferior instead of using waitpid.
13565 * linux-low.c (linux_join): New.
13566 (linux_target_op): Add linux_join.
13567 * spu-low.c (spu_join): New.
13568 (spu_target_ops): Add spu_join.
13569 * win32-low.c (win32_detach): Adapt to new interface.
13570 Reopen current_process_handle before detaching. Issue a child
13571 resume before detaching.
13572 (win32_join): New.
13573 (win32_target_op): Add win32_join.
13574
1d5315fe
PA
135752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13576
13577 * win32-low.c (win32-attach): Fix return value.
13578 * target.h (target_ops): Describe ATTACH return values.
13579
bf914831
PA
135802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13581
13582 * win32-low.c (GETPROCADDRESS): Define.
13583 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13584 (winapi_DebugSetProcessKillOnExit): Likewise.
13585 (win32_create_inferior): Force usage of ansi CreateProcessA.
13586 (win32_attach): Use GETPROCADDRESS.
13587 (win32_detach): Likewise.
13588
f72f3e60
PA
135892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13590
13591 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13592
ed50f18f
PA
135932007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13594
13595 * win32-low.c: Commit leftover changes from 2007-03-29.
13596
0c2ead7e
DJ
135972007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13598
13599 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13600 fields short instead of int. Add explicit padding.
13601 (i387_cache_to_fsave): Remove unnecessary casts.
13602 (i387_fsave_to_cache): Doc fix.
13603 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13604
73725ff3
DJ
136052007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13606
13607 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13608 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13609
d99f33d8
PA
136102007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13611
13612 * configure.srv (arm*-*-mingw32ce*): Move near the other
13613 arm targets.
13614
68070c10
PA
136152007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13616
2482afc6 13617 * configure.ac: Add errno checking.
68070c10
PA
13618 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13619 sys/file.h and malloc.h.
13620 (AC_CHECK_DECLS): Add perror.
13621 (srv_mingwce): Handle.
2482afc6 13622 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13623 win32-i386-low.o to srv_tgtobj.
13624 (i[34567]86-*-mingw*): Likewise.
13625 (arm*-*-mingw32ce*): Add case.
13626 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13627 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13628 [__MINGW32CE__] (strerror): New function.
13629 [__MINGW32CE__] (errno): Define to GetLastError.
13630 [__MINGW32CE__] (COUNTOF): New macro.
13631 (remote_open): Remove extra close call.
13632 * mem-break.c (delete_breakpoint_at): New function.
13633 * mem-break.h (delete_breakpoint_at): Declare.
13634 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13635 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13636 [USE_WIN32API] (read, write): Add char* casts.
13637 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13638 * server.h: Include wincecompat.h on Windows CE.
13639 [HAVE_ERRNO_H]: Check.
13640 (perror): Declare if not declared.
13641 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13642 (perror_with_name): Remove errno declaration.
13643 * wincecompat.h: New.
13644 * wincecompat.c: New.
13645 * win32-low.h: New.
13646 * win32-arm-low.c: New.
13647 * win32-i386-low.c: New.
13648 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13649 (OUTMSG2): Make it safe.
13650 (_T): New macro.
13651 (COUNTOF): New macro.
13652 (NUM_REGS): Get it from the low target.
13653 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13654 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13655 (thread_rec): Let low target handle debug registers.
13656 (child_add_thread): Likewise.
13657 (child_init_thread_list): Likewise.
13658 (continue_one_thread): Likewise.
13659 (regptr): New.
13660 (do_child_fetch_inferior_registers): Move to ...
13661 * win32-i386-low.c: ... here, and rename to ...
13662 (do_fetch_inferior_registers): ... this.
889bf7c5 13663 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13664 Go through the low target.
13665 (do_child_store_inferior_registers): Use regptr.
13666 (strwinerror): New function.
13667 (win32_create_inferior): Handle Windows CE.
13668 Use strwinerror instead of strerror on Windows error
13669 codes. Add program to the error output.
13670 Don't close the main thread handle on Windows CE.
13671 (win32_attach): Use coredll.dll on Windows CE.
13672 (win32_kill): Close current process and current
13673 thread handles.
13674 (win32_detach): Use coredll.dll on Windows CE.
13675 (win32_resume): Let low target handle debug registers, and
13676 step request.
13677 (handle_exception): Add/Remove initial breakpoint. Avoid
13678 non-existant WSTOPSIG on Windows CE.
13679 (win32_read_inferior_memory): Cast to remove warning.
13680 (win32_arch_string): Go through the low target.
13681 (initialize_low): Call set_breakpoint_data with the low
13682 target's breakpoint.
13683 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13684 FOP_REGNUM, mappings): Move to ...
13685 * win32-i386-low.c: ... here.
13686 * win32-low.c (win32_thread_info): Move to ...
13687 * win32-low.h: ... here.
13688 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13689 win32-arm-low.c and wincecompat.c.
13690 (all:): Add $EXEEXT.
13691 (install-only:): Likewise.
13692 (gdbserver:): Likewise.
13693 (gdbreplay:): Likewise.
13694 * config.in: Regenerate.
13695 * configure: Regenerate.
13696
41093d81
PA
136972007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13698
13699 * win32-low.c: Rename typedef thread_info to
13700 win32_thread_info throughout.
13701
544afa54
PA
137022007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13703
13704 * win32-i386-low.c: Rename to ...
13705 * win32-low.c: ... this.
13706 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13707 * Makefile.in: Likewise.
13708
bce7165d
PA
137092007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13710
13711 * remote-utils.c (monitor_output): Constify msg parameter.
13712 * server.h (monitor_output): Likewise.
13713 * win32-i386-low.c (handle_output_debug_string): New.
13714 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13715 handle_output_debug_string.
13716 (get_child_debug_event): Likewise.
13717
506c7aa0
DJ
137182007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13719
13720 * server.c (main): Correct strtoul check.
13721
42c81e2a
DJ
137222007-03-27 Jon Ringle <jon@ringle.org>
13723
13724 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13725
9453113a
DJ
137262007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13727
13728 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13729
64a69107
DJ
137302007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13731
13732 * terminal.h: Check HAVE_SGTTY_H.
13733
137342007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13735
13736 * remote-utils.c (remote_open): Print out the assigned port number.
13737
c74d0ad8
DJ
137382007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * remote-utils.c (monitor_output): New function.
13741 * server.c (debug_threads): Define here.
13742 (monitor_show_help): New function.
13743 (handle_query): Handle qRcmd.
13744 (main): Do not handle 'd' packet.
13745 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13746 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13747 of debug_threads.
13748
de7c3b4a
PA
137492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13750
13751 * Makefile.in (EXEEXT): New.
13752 (clean): Use $(EXEEXT).
13753
ef57601b
PA
137542007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13755
13756 * target.h (target_ops): Rename send_signal to request_interrupt,
13757 and remove enum target_signal parameter.
13758 * linux-low.c (linux_request_interrupt): Rename from
13759 linux_send_signal, and always send SIGINT.
13760 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13761 and always send SIGINT.
13762 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13763 of send_signal.
13764 (input_interrupt): Likewise.
13765
820f2bda
PA
137662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13767
13768 * server.c (get_features_xml): Check if target implemented
13769 arch_string.
13770 * win32-i386-low.c (win32_arch_string): New.
13771 (win32_target_ops): Add win32_arch_string as arch_string member.
13772
ab39bf24
UW
137732007-02-22 Markus Deuling <deuling@de.ibm.com>
13774
13775 * spu-low.c (spu_arch_string): New.
13776 (spu_target_ops): Add spu_arch_string.
13777
61ff6e04
DJ
137782007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13779
13780 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13781 * configure.ac: Do not check for terminal.h.
13782 * configure, config.in: Regenerated.
13783
fb1e4ffc
DJ
137842007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13785
13786 * Makefile.in (OBS): Add $(XML_BUILTIN).
13787 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13788 (clean): Update.
13789 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13790 (arm-with-iwmmxt.c): New.
13791 * config.in, configure: Regenerate.
13792 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13793 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13794 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13795 (arm*-*-linux*): Add iWMMXt and regset support.
13796 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13797 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13798 (arm_store_wmmxregset, target_regsets): New.
13799 * server.c (get_features_xml): Take annex argument. Check builtin
13800 XML documents.
13801 (handle_query): Handle multiple annexes.
13802
0f48aa01
DJ
138032007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * remote-utils.c [USE_WIN32API] (read, write): Define.
13806 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13807 write.
13808
23181151
DJ
138092007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * linux-i386-low.c (the_low_target): Set arch_string.
13812 * linux-x86-64-low.c (the_low_target): Likewise.
13813 * linux-low.c (linux_arch_string): New.
13814 (linux_target_ops): Add it.
13815 * linux-low.h (struct linux_target_ops): Add arch_string.
13816 * server.c (write_qxfer_response): Use const void * for DATA.
13817 (get_features_xml): New.
13818 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13819 * target.h (struct target_ops): Add arch_string method.
13820
9d606399
DJ
138212007-01-03 Denis Pilat <denis.pilat@st.com>
13822 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * linux-low.c (linux_kill): Handle being called with no threads.
13825 * win32-i386-low.c (win32_kill): Likewise.
13826 (get_child_debug_event): Clear current_process_handle.
13827
138282006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13829 Daniel Jacobowitz <dan@codesourcery.com>
13830
13831 * remote-utils.c (remote_open): Check the type of specified
13832 serial port devices before opening them.
13833 * server.c (main): Kill the inferior if an error occurs during
13834 the first remote_open.
13835
a5e13d24
DJ
138362006-12-05 Markus Deuling <deuling@de.ibm.com>
13837
13838 * README: Update supported targets.
13839
186947f7
DJ
138402006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13841
13842 * Makefile.in (clean): Remove reg-mips64.c.
13843 (reg-mips64.c, reg-mips64.o): New rules.
13844 * configure.srv: Handle mips64. Include regset support for mips.
13845 * linux-mips-low.c (union mips_register): New.
13846 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13847 (mips_breakpoint, mips_breakpoint_at): Use int.
13848 (mips_collect_register, mips_supply_register)
13849 (mips_collect_register_32bit, mips_supply_register_32bit)
13850 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13851 (mips_store_fpregset, target_regsets): New.
13852 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13853
a13e2c95
UW
138542006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13855
13856 * configure.srv: Add target "spu*-*-*".
13857 * Makefile.in (clean): Remove reg-spu.c.
13858 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13859 * spu-low.c: New file.
13860
cb7283db
DJ
138612006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13862
13863 * configure.ac: Correct td_thr_tls_get_addr test.
13864 * configure: Regenerated.
13865
89be2091
DJ
138662006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * linux-low.c (linux_wait_for_event): Reformat. Use the
13869 pass_signals array.
13870 * remote-utils.c (decode_address_to_semicolon): New.
13871 * server.c (pass_signals, handle_general_set): New.
13872 (handle_query): Mention QPassSignals for qSupported.
13873 (main): Call handle_general_set.
13874 * server.h (pass_signals, decode_address_to_semicolon): New.
13875
000ef4f0
DJ
138762006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * server.c (handle_query): Correct error handling for read_auxv.
13879
b7149293
UW
138802005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13881
13882 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13883 and srv_linux_thread_db to yes.
13884 * linux-s390-low.c (s390_fill_gregset): New function.
13885 (target_regsets): Define data structure.
13886
dae5f5cf
DJ
138872006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13888
13889 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13890 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13891 * config.in, configure: Regenerated.
13892 * inferiors.c (gdb_id_to_thread): New function.
13893 (gdb_id_to_thread_id): Use it.
13894 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13895 * linux-low.h (struct process_info): Add th member.
13896 (thread_db_get_tls_address): New prototype.
13897 * remote-utils.c (decode_address): Make non-static.
13898 * server.c (handle_query): Handle qGetTLSAddr.
13899 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13900 * target.h (struct target_ops): Add get_tls_address.
13901 * thread-db.c (maybe_attach_thread): Save the thread handle.
13902 (thread_db_get_tls_address): New.
13903
32ca6d61
DJ
139042006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13907 (linux_resume_one_process): Take a siginfo_t *. Update all
13908 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13909 (struct pending_signals): Add a siginfo_t.
13910 (linux_wait_for_process): Always set last_status.
13911 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13912 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13913 * linux-low.h (struct process_info): Add last_status.
13914
5ffff7c1
DJ
139152006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * remote-utils.c (try_rle): New function.
13918 (putpkt_binary): Use it.
13919
8695c747
DJ
139202006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13923 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13924 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13925 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13926 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13927 point registers.
13928
290fadea
RS
139292006-08-08 Richard Sandiford <richard@codesourcery.com>
13930
13931 * server.c (terminal_fd): New variable.
13932 (old_foreground_pgrp): Likewise.
13933 (restore_old_foreground_pgrp): New function.
13934 (start_inferior): Record the terminal file descriptor in terminal_fd
13935 and its original foreground group in old_foreground_pgrp. Register
13936 restore_old_foreground_pgrp with atexit().
13937
9f2e1e63
DJ
139382006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13939
13940 * server.c (handle_query): Correct qPart to qXfer.
13941
b80864fb
DJ
139422006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * configure.ac: Check for more headers which are missing on
13945 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13946 * configure.srv: Add Cygwin and mingw32.
13947 * remote-utils.c: Don't include headers unconditionally which
13948 are missing on mingw32. Include <winsock.h> for mingw32.
13949 (remote_open): Adjust for mingw32 support. Flush
13950 standard error after writing to it.
13951 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13952 (unblock_async_io, enable_async_io, disable_async_io)
13953 (readchar, getpkt): Update for Winsock support.
13954 (prepare_resume_reply): Expect a protocol signal number.
13955 * server.c: Disable <sys/wait.h> on mingw32.
13956 (start_inferior): Adjust for mingw32 support. Flush
13957 standard error after writing to it.
13958 (attach_inferior): Likewise. Use protocol signal
13959 numbers.
13960 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13961 and names.
13962 * win32-i386-low.c: New file.
13963 * Makefile.in (XM_CLIBS): Set.
13964 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13965 (win32-i386-low.o): New dependency rule.
13966 * linux-low.c (linux_wait): Use target signal numbers.
13967 * target.h (struct target_ops): Doc fix.
13968 * server.h (target_signal_to_name): New prototype.
13969 * gdbreplay.c: Don't include headers unconditionally which
13970 are missing on mingw32. Include <winsock.h> for mingw32.
13971 (remote_close, remote_open): Adjust for Winsock support.
13972 * configure, config.in: Regenerated.
13973
0876f84a
DJ
139742006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * server.c (decode_xfer_read, write_qxfer_response): New.
13977 (handle_query): Take a packet length argument. Handle
13978 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13979 the qSupported response.
13980 (main): Update call to handle_query.
13981
01f9e8fa
DJ
139822006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13985 (putpkt_binary): Renamed from putpkt and adjusted for binary
13986 data.
13987 (putpkt): New wrapper for putpkt_binary.
13988 (readchar): Don't mask off the high bit.
13989 (decode_X_packet): New function.
13990 * server.c (main): Call putpkt_binary if a handler sets the packet
13991 length. Save the length of the incoming packet. Handle 'X'.
13992 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13993
be2a5f71
DJ
139942006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13995
13996 * server.c (handle_query): Handle qSupported.
13997
ea025f5f
DJ
139982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13999
14000 * remote-utils.c (all_symbols_looked_up): New variable.
14001 (look_up_one_symbol): Check it.
14002 * server.h (look_up_one_symbol): New declaration.
14003 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14004
9308fc88
DJ
140052006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14006
14007 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14008 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14009 (PTRACE_GET_THREAD_AREA): Define.
14010 (ps_get_thread_area): New function.
14011
52fb6437
NS
140122006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14013
14014 * configure.srv (m68k*-*-uclinux*): New target.
14015 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14016 (linux_resume_one_process): Remove extraneous cast.
14017 (linux_read_offsets): New.
14018 (linux_target_op): Add linux_read_offsets on mmuless systems.
14019 * server.c (handle_query): Add qOffsets logic.
14020 * target.h (struct target_ops): Add read_offsets.
14021
21b0f40c
DJ
140222006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14025 (PTRACE_GET_THREAD_AREA): Define.
14026 (ps_get_thread_area): New function.
14027 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14028 (linux-x86-64-low.o): Update.
14029
0050a760
DJ
140302006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * configure.ac: Remove checks for prfpregset_t.
14033 * gdb_proc_service.h: New file.
14034 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14035 new "gdb_proc_service.h".
14036 * proc-service.c: Likewise.
14037 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14038 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14039 * Makefile.in (gdb_proc_service_h): Updated.
14040 * configure, config.in: Regenerated.
14041
b92a518e
DJ
140422006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * remote-utils.c (prepare_resume_reply): Move declaration
14045 of gdb_id_from_wait to the top of the block.
14046
545587ee
DJ
140472006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * linux-low.c (regsets_store_inferior_registers): Read the regset
14050 from the target before filling it.
14051
9db87ebd
DJ
140522006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14053
14054 * server.c (attach_inferior): Return SIGTRAP for a successful
14055 attach.
14056
dd24457d
DJ
140572006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * Makefile.in (OBS): Add version.o.
14060 (STAGESTUFF): Delete.
14061 (version.o): Add dependencies.
14062 (version.c): Replace rule.
14063 (clean): Remove version.c.
14064 * server.c (gdbserver_version): New.
14065 (gdbserver_usage): Use printf.
14066 (main): Handle --version and --help.
14067 * server.h (version, host_name): Add declarations.
14068
6f0f660e
EZ
140692005-12-23 Eli Zaretskii <eliz@gnu.org>
14070
889bf7c5
PA
14071 * linux-arm-low.c:
14072 * linux-arm-low.c:
14073 * inferiors.c:
14074 * i387-fp.h:
14075 * i387-fp.c:
14076 * gdbreplay.c:
14077 * regcache.c:
14078 * proc-service.c:
14079 * mem-break.h:
14080 * mem-break.c:
14081 * linux-x86-64-low.c:
14082 * linux-sh-low.c:
14083 * linux-s390-low.c:
14084 * linux-ppc64-low.c:
14085 * linux-ppc-low.c:
14086 * linux-mips-low.c:
14087 * linux-m68k-low.c:
14088 * linux-m32r-low.c:
14089 * linux-low.h:
14090 * linux-low.c:
14091 * linux-ia64-low.c:
14092 * linux-i386-low.c:
14093 * linux-crisv32-low.c:
14094 * thread-db.c:
14095 * terminal.h:
14096 * target.h:
14097 * target.c:
14098 * server.h:
14099 * server.c:
14100 * remote-utils.c:
14101 * regcache.h:
14102 * utils.c:
14103 * Makefile.in:
14104 * configure.ac:
6f0f660e
EZ
14105 * gdbserver.1: Add (C) after Copyright. Update the FSF
14106 address.
14107
9d1fb177
DJ
141082005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14111 (arm_breakpoint_at): Recognize both breakpoints.
14112 (the_low_target): Use the correct breakpoint instruction.
14113
011a70c2
DJ
141142005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14115
14116 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14117 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14118 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14119 (the_low_target): Update.
14120
7fb85e41
AS
141212005-10-25 Andreas Schwab <schwab@suse.de>
14122
14123 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14124
14125 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14126 (ia64_num_regs): Reduce to 462.
14127
3db0444b
DJ
141282005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * acinclude.m4: Correct quoting.
14131 * aclocal.m4: Regenerated.
14132
14133 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14134 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14135 (thread_db_init): Call thread_db_err_str.
14136 * configure.ac: Check for TD_VERSION.
14137 * config.in, configure: Regenerated.
14138
bee0189a
DJ
141392005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14140
14141 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14142
e9d25b98
DJ
141432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14146 is not available. Define HAVE_PTRACE_GETREGS if it is.
14147 * config.in, configure: Regenerated.
14148 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14149 * linux-i386-low.c, linux-m68k-low.c: Update to use
14150 HAVE_PTRACE_GETREGS.
14151 * linux-low.c (regsets_fetch_inferior_registers)
14152 (regsets_store_inferior_registers): Only return 0 if we processed
14153 GENERAL_REGS.
14154 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14155 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14156
a06660f7
DJ
141572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * inferiors.c (struct thread_info): Add gdb_id.
14160 (add_thread): Add gdb_id argument.
14161 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14162 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14163 calls to add_thread.
14164 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14165 * server.c (handle_query): Use thread_to_gdb_id.
14166 (handle_v_cont, main): Use gdb_id_to_thread_id.
14167 * server.h (add_thread): Update prototype.
14168 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14169 prototypes.
14170
5a1f5858
DJ
141712005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14174 left-padded registers.
14175 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14176 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14177
e122f1f5
SE
141782005-07-01 Steve Ellcey <sje@cup.hp.com>
14179
14180 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14181 * configure: Regenerate.
14182 * config.in: Regenerate.
14183 * server.h (NEED_DECLARATION_STRERROR):
14184 Replace with !HAVE_DECL_STRERROR.
14185
d592fa2f
DJ
141862005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14187
14188 * linux-low.c (linux_wait, linux_send_signal): Don't test
14189 an unsigned long variable for > 0 if it could be MAX_ULONG.
14190 * server.c (myresume): Likewise.
14191 * target.c (set_desired_inferior): Likewise.
14192
ccbd4912
MK
141932005-06-13 Mark Kettenis <kettenis@gnu.org>
14194
14195 * configure.ac: Simplify and improve check for socklen_t.
14196 * configure, config.in: Regenerate.
14197
f450004a
DJ
141982005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14199
14200 * acconfig.h: Remove.
14201 * configure.ac: Add a test for socklen_t. Use three-argument
14202 AC_DEFINE throughout.
14203 * config.in: Regenerated using autoheader 2.59.
14204 * configure: Regenerated.
14205
14206 * gdbreplay.c (socklen_t): Provide a default.
14207 (remote_open): Use socklen_t.
14208 * remote-utils.c (socklen_t): Provide a default.
14209 (remote_open): Use socklen_t.
14210 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14211 unsigned char.
14212
14213 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14214 char for buffers.
14215 * linux-low.c (linux_read_memory, linux_write_memory)
14216 (linux_read_auxv): Likewise.
14217 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14218 (check_mem_write): Likewise.
14219 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14220 Likewise.
14221 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14222 (registers_from_string, register_data): Likewise.
14223 * server.c (handle_query, main): Likewise.
14224 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14225 (decode_M_packet): Likewise.
14226 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14227 * target.h (struct target_ops): Update read_memory, write_memory,
14228 and read_auxv.
14229 (read_inferior_memory, write_inferior_memory): Update.
14230 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14231 to unsigned char *.
14232 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14233 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14234 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14235 linux-s390-low.c, linux-sh-low.c: Update for changes in
14236 read_inferior_memory and the_low_target->breakpoint.
14237
eee84df1
DJ
142382005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14239
14240 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14241 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14242 * configure.srv: Add powerpc64-*-linux*.
14243 * linux-ppc64-low.c: New file.
14244
45b134e5
OF
142452005-05-23 Orjan Friberg <orjanf@axis.com>
14246
14247 * linux-cris-low.c: New file with support for CRIS.
14248 * linux-crisv32-low.c: Ditto for CRISv32.
14249 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14250 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14251 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14252 reg-crisv32.o, and reg-crisv32.c to make rules.
14253 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14254 recognized targets.
14255
48d93c75
UW
142562005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14257
14258 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14259 of sizeof (PTRACE_XFER_TYPE).
14260 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14261
e013ee27
OF
142622005-05-12 Orjan Friberg <orjanf@axis.com>
14263
889bf7c5 14264 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14265 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14266 pointers for hardware watchpoint support.
14267 * linux-low.h (struct linux_target_ops): Ditto.
14268 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14269 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14270 to linux_target_ops.
14271 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14272 reply packet.
14273 * server.c (main): Recognize 'Z' and 'z' packets.
14274
b0ded00b
UW
142752005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14276
14277 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14278 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14279 (the_low_target): Add new members.
14280
8643e2ad
DJ
142812005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * proc-service.c (ps_lgetregs): Search all_processes instead of
14284 all_threads.
14285
fc620387
DJ
142862005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * server.c (start_inferior): Change return type to int.
14289 (attach_inferior): Change sigptr to int *.
14290 (handle_v_cont, handle_v_requests): Change signal to int *.
14291 (main): Change signal to int.
14292
142932005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14294
14295 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14296 * configure.srv: Add m32r*-*-linux*.
14297 * linux-m32r-low.c: New file.
14298
e0e76420
DJ
142992005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14300
14301 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14302
a1928bad
DJ
143032005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14304
14305 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14306 Take unsigned long arguments for PIDs.
14307 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14308 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14309 (wait_for_sigstop, linux_resume_one_process)
14310 (regsets_fetch_inferior_registers, linux_send_signal)
14311 (linux_read_auxv): Likewise. Update the types of variables holding
14312 PIDs. Update format string specifiers.
14313 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14314 * remote-utils.c (prepare_resume_reply): Likewise.
14315 * server.c (cont_thread, general_thread, step_thread)
14316 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14317 unsigned long.
14318 (handle_query): Update format specifiers.
14319 (handle_v_cont, main): Use strtoul for thread IDs.
14320 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14321 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14322 (general_thread, step_thread, thread_from_wait)
14323 (old_thread_from_wait): Update.
14324 * target.h (struct thread_resume): Use unsigned long for THREAD.
14325 (struct target_ops): Use unsigned long for arguments to attach and
14326 thread_alive.
14327
dcdb98d2
DJ
143282005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14329
14330 * acinclude.m4: Include bfd/bfd.m4 directly.
14331 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14332 <agriffis@toolchain.org>.
14333 * aclocal.m4, configure: Regenerated.
14334
bec39cab
AC
143352005-01-07 Andrew Cagney <cagney@gnu.org>
14336
14337 * configure.ac: Rename configure.in, require autoconf 2.59.
14338 * configure: Re-generate.
14339
434c4c77
DJ
143402004-12-08 Daniel Jacobowitz <dan@debian.org>
14341
14342 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14343 LIBS when finished.
14344 * aclocal.m4: Regenerated.
14345 * configure: Regenerated.
14346
db1d3e1b
AS
143472004-11-21 Andreas Schwab <schwab@suse.de>
14348
14349 * linux-m68k-low.c (m68k_num_gregs): Define.
14350 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14351 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14352 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14353 (m68k_breakpoint_at): New. Add to the_low_target.
14354
14355 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14356 srv_linux_thread_db to yes.
14357
43360365
JB
143582004-10-20 Joel Brobecker <brobecker@gnat.com>
14359
14360 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14361 (ARCH_SET_FS): Likewise.
14362 (ARCH_GET_FS): Likewise.
14363 (ARCH_GET_GS): Likewise.
14364
fd500816
DJ
143652004-10-16 Daniel Jacobowitz <dan@debian.org>
14366
14367 * linux-i386-low.c (ps_get_thread_area): New.
14368 * linux-x86-64-low.c (ps_get_thread_area): New.
14369 * linux-low.c: Include <sys/syscall.h>.
14370 (linux_kill_one_process): Don't kill the first thread here.
14371 (linux_kill): Kill the first thread here.
14372 (kill_lwp): New function.
14373 (send_sigstop, linux_send_signal): Use it.
14374 * proc-service.c: Clean up #ifdefs.
14375 (fpregset_info): Delete.
14376 (ps_lgetregs): Update and enable implementation.
14377 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14378 implementations.
14379 * remote-utils.c (struct sym_cache, symbol_cache): New.
14380 (input_interrupt): Print a clearer message.
14381 (async_io_enabled): New variable.
14382 (enable_async_io, disable_async_io): Use it. Update comments.
14383 (look_up_one_symbol): Use the symbol cache.
14384 * thread-db.c (thread_db_look_up_symbols): New function.
14385 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14386
f6de3c42
DJ
143872004-10-16 Daniel Jacobowitz <dan@debian.org>
14388
14389 * configure.in: Test for -rdynamic.
14390 * configure: Regenerated.
14391 * Makefile (INTERNAL_LDFLAGS): New.
14392 (gdbserver, gdbreplay): Use it.
14393
2c0fc042
AC
143942004-09-02 Andrew Cagney <cagney@gnu.org>
14395
14396 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14397
075b3282
DJ
143982004-03-23 Daniel Jacobowitz <drow@mvista.com>
14399
14400 * linux-low.c (linux_wait): Clear all_processes list also.
14401
fa6a77dc
DJ
144022004-03-12 Daniel Jacobowitz <drow@mvista.com>
14403
14404 * linux-low.c: Include <errno.h>. Remove extern declaration of
14405 errno.
14406
6d782a97
DJ
144072004-03-12 Daniel Jacobowitz <drow@mvista.com>
14408
14409 * gdbreplay.c, server.h, utils.c: Update copyright years.
14410
3a7fb99b
DJ
144112004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14412
14413 * server.c (main): Print child status or termination signal from
14414 variable 'signal', not 'sig'.
14415
c3e735a6
DJ
144162004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14417
14418 * linux-low.c (linux_read_memory): Change return type to
14419 int. Check for and return error from ptrace().
14420 * target.c (read_inferior_memory): Change return type to int. Pass
14421 back return status from the_target->read_memory().
14422 * target.h (struct target_ops): Adapt *read_memory() prototype.
14423 Update comment.
14424 (read_inferior_memory): Adapt prototype.
14425 * server.c (main): Return an error packet if
14426 read_inferior_memory() returns an error.
14427
a59d1c82
DJ
144282004-03-04 Daniel Jacobowitz <drow@mvista.com>
14429
14430 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14431 Unify with other clean targets.
14432
dc3f8883
DJ
144332004-02-29 Daniel Jacobowitz <drow@mvista.com>
14434
14435 * server.c (handle_v_cont): Call set_desired_inferior.
14436
89a208da
DJ
144372004-02-29 Daniel Jacobowitz <drow@mvista.com>
14438
14439 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14440
62ea82f5
DJ
144412004-02-29 Daniel Jacobowitz <drow@mvista.com>
14442
14443 * linux-low.c (linux_wait): Unblock async I/O.
14444 (linux_resume): Block and enable async I/O.
14445 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14446 * server.h (block_async_io, unblock_async_io): Add prototypes.
14447
6910d122
DJ
144482004-02-29 Daniel Jacobowitz <drow@mvista.com>
14449
14450 * remote-utils.c (remote_open): Print a status notice after
14451 opening a TCP port.
14452 * server.c (attach_inferior): Print a status notice after
14453 attaching.
14454
144552004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14456
14457 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14458
c89dc5d4
DJ
144592004-02-26 Daniel Jacobowitz <drow@mvista.com>
14460
14461 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14462 error packet.
14463 * server.c, target.h: Update copyright years.
14464
4b8dad4a
RM
144652004-02-25 Roland McGrath <roland@redhat.com>
14466
14467 * target.h (struct target_ops): New member `read_auxv'.
14468 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14469 * linux-low.c (linux_read_auxv): New function.
14470 (linux_target_ops): Initialize `read_auxv' member to that.
14471
d7446758
JB
144722004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14473
14474 Committed by Jim Blandy <jimb@redhat.com>.
14475
14476 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14477 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14478 instead of GPR_SIZE to distiguish s390 and s390x targets.
14479
5544ad89
DJ
144802004-01-31 Daniel Jacobowitz <drow@mvista.com>
14481
14482 * linux-low.c: Update copyright year.
14483 (check_removed_breakpoint): Clear pending_is_breakpoint.
14484 (linux_set_resume_request, linux_queue_one_thread)
14485 (resume_status_pending_p): New functions.
14486 (linux_continue_one_thread): Use process->resume.
14487 (linux_resume): Only resume threads if there are no pending events.
14488 * linux-low.h (struct process_info): Add resume request
14489 pointer.
14490
2a68b70e
DJ
144912004-01-30 Daniel Jacobowitz <drow@mvista.com>
14492
14493 * regcache.c (new_register_cache): Clear the allocated register
14494 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14495
64386c31
DJ
144962003-10-13 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * linux-low.c (linux_resume): Take a struct thread_resume *
14499 argument.
14500 (linux_wait): Update call.
14501 (resume_ptr): New static variable.
14502 (linux_continue_one_thread): Renamed from
14503 linux_continue_one_process. Use resume_ptr.
14504 (linux_resume): Use linux_continue_one_thread.
14505 * server.c (handle_v_cont, handle_v_requests): New functions.
14506 (myresume): New function.
14507 (main): Handle 'v' case.
14508 * target.h (struct thread_resume): New type.
14509 (struct target_ops): Change argument of "resume" to struct
14510 thread_resume *.
14511 (myresume): Delete macro.
14512
c938e9b0
L
145132003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14514
14515 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14516 (uninstall): Support DESTDIR.
14517
7f313d07
BC
14518Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14519
14520 * configure.srv: Add xscale*linux copy of arm*linux entry.
14521
3b2fc2ea
DJ
145222003-07-24 Daniel Jacobowitz <drow@mvista.com>
14523
14524 * linux-arm-low.c (arm_reinsert_addr): New function.
14525 (the_low_target): Add arm_reinsert_addr.
14526
1c0a559e
MK
145272003-07-08 Mark Kettenis <kettenis@gnu.org>
14528
14529 * mem-break.c: Remove whitespace at end of file.
14530
43d5792c
DJ
145312003-06-28 Daniel Jacobowitz <drow@mvista.com>
14532
14533 * configure.in: Check whether we need to prototype strerror.
14534 * server.h: Optionally prototype strerror.
14535 * gdbreplay.c (perror_with_name): Use strerror.
14536 * linux-low.c (linux_attach_lwp): Use strerror.
14537 * utils.c (perror_with_name): Use strerror.
14538 * config.in, configure: Regenerated.
14539
c8a86edf
DJ
145402003-06-28 Daniel Jacobowitz <drow@mvista.com>
14541
14542 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14543 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14544
73d37363
DJ
145452003-06-20 Daniel Jacobowitz <drow@mvista.com>
14546
14547 * Makefile.in (SFILES): Update.
14548 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14549 low-sun3.c: Remove files.
14550
6ad8ae5c
DJ
145512003-06-17 Daniel Jacobowitz <drow@mvista.com>
14552
14553 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14554 (linux_detach_one_process, linux_detach): New functions.
14555 (linux_target_ops): Add linux_detach.
14556 * server.c (main): Handle 'D' packet.
14557 * target.h (struct target_ops): Add "detach" member.
14558 (detach_inferior): Define.
14559
1581182a
MK
145602003-06-13 Mark Kettenis <kettenis@gnu.org>
14561
14562 From Kelley Cook <kelleycook@wideopenwest.com>:
14563 * configure.srv: Accept i[34567]86 variants.
14564
e5379b03
DJ
145652003-06-05 Daniel Jacobowitz <drow@mvista.com>
14566
14567 * linux-low.c (linux_wait_for_event): Correct comment typos.
14568 (linux_resume_one_process): Call check_removed_breakpoint.
14569 (linux_send_signal): New function.
14570 (linux_target_ops): Add linux_send_signal.
14571 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14572 of kill.
14573 * target.h (struct target_ops): Add send_signal.
14574
2ff29de4
JB
145752003-05-29 Jim Blandy <jimb@redhat.com>
14576
14577 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14578 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14579 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14580 away part of the register's value.
14581
254787d4
DJ
145822003-03-26 Daniel Jacobowitz <drow@mvista.com>
14583
14584 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14585 (linux_wait_for_event, linux_init_signals): Likewise.
14586
94e10508
DJ
145872003-03-17 Daniel Jacobowitz <drow@mvista.com>
14588
14589 * configure.in: Check for stdlib.h.
14590 * configure: Regenerated.
14591 * config.in: Regenerated.
14592
4c0711e0
DJ
145932003-01-04 Andreas Schwab <schwab@suse.de>
14594
14595 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14596
ef66e766
AC
145972003-01-02 Andrew Cagney <ac131313@redhat.com>
14598
14599 * Makefile.in: Remove obsolete code.
14600
a1358604
DJ
146012002-11-20 Daniel Jacobowitz <drow@mvista.com>
14602
14603 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14604 defined(PT_FPR0_HI).
14605
23ce3b1c
DJ
146062002-11-17 Stuart Hughes <seh@zee2.com>
14607
14608 * linux-arm-low.c (arm_num_regs): Increase.
14609 (arm_regmap): Include status register.
14610
146112002-11-17 Daniel Jacobowitz <drow@mvista.com>
14612
14613 * linux-low.c (register_addr): Remove incorrect -1 check.
14614
a9fa9f7d
DJ
146152002-08-29 Daniel Jacobowitz <drow@mvista.com>
14616
14617 * linux-low.c (linux_create_inferior): Call setpgid. Return
14618 the new PID.
14619 (unstopped_p, linux_signal_pid): Remove.
14620 (linux_target_ops): Remove linux_signal_pid.
14621 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14622 global instead of target method.
14623 * target.h (struct target_ops): Remove signal_pid. Update comment
14624 for create_inferior.
14625 * server.c (signal_pid): New variable.
14626 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14627 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14628 (attach_inferior): Set signal_pid.
14629
17574093
DJ
146302002-08-23 Daniel Jacobowitz <drow@mvista.com>
14631
14632 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14633
146342002-08-20 Jim Blandy <jimb@redhat.com>
14635
14636 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14637 default for this.
14638
146392002-08-01 Andrew Cagney <cagney@redhat.com>
14640
14641 * Makefile.in: Make chill references obsolete.
14642
146432002-07-24 Kevin Buettner <kevinb@redhat.com>
14644
14645 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14646 * configure: Regenerate.
14647 * config.in: Regenerate.
14648
146492002-07-09 David O'Brien <obrien@FreeBSD.org>
14650
14651 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14652 (perror_with_name, remote_close, remote_open, expect, play): Static.
14653
146542002-07-04 Michal Ludvig <mludvig@suse.cz>
14655
4b8dad4a 14656 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14657 byte offsets instead of an array of indexes.
14658 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14659
146602002-06-13 Daniel Jacobowitz <drow@mvista.com>
14661
14662 * regcache.c: Add comment.
14663
146642002-06-11 Daniel Jacobowitz <drow@mvista.com>
14665
14666 * thread-db.c: New file.
14667 * proc-service.c: New file.
14668 * acinclude.m4: New file.
14669 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14670 proc-service.o, and thread-db.o.
14671 (linux-low.o): Add USE_THREAD_DB.
14672 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14673 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14674 * aclocal.m4: Regenerated.
14675 * config.in: Regenerated.
14676 * configure: Regenerated.
14677 * configure.in: Check for proc_service.h, sys/procfs.h,
14678 thread_db.h, and linux/elf.h headrs.
14679 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14680 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14681 Check for -lthread_db and thread support.
14682 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14683 PowerPC, and SuperH.
14684 * i387-fp.c: Constify arguments.
14685 * i387-fp.h: Likewise.
14686 * inferiors.c: (struct thread_info): Renamed from
14687 `struct inferior_info'. Remove PID member. Use generic inferior
14688 list header. All uses updated.
14689 (inferiors, signal_pid): Removed.
14690 (all_threads): New variable.
14691 (get_thread): Define.
14692 (add_inferior_to_list): New function.
14693 (for_each_inferior): New function.
14694 (change_inferior_id): New function.
14695 (add_inferior): Removed.
14696 (remove_inferior): New function.
14697 (add_thread): New function.
14698 (free_one_thread): New function.
14699 (remove_thread): New function.
14700 (clear_inferiors): Use for_each_inferior and free_one_thread.
14701 (find_inferior): New function.
14702 (find_inferior_id): New function.
14703 (inferior_target_data): Update argument type.
14704 (set_inferior_target_data): Likewise.
14705 (inferior_regcache_data): Likewise.
14706 (set_inferior_regcache_data): Likewise.
14707 * linux-low.c (linux_bp_reinsert): Remove.
14708 (all_processes, stopping_threads, using_thrads)
14709 (struct pending_signals, debug_threads, pid_of): New.
14710 (inferior_pid): Replace with macro.
14711 (struct inferior_linux_data): Remove.
14712 (get_stop_pc, add_process): New functions.
14713 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14714 Use add_process and add_thread.
14715 (linux_attach_lwp): New function, based on old linux_attach. Use
14716 add_process and add_thread. Set stop_expected for new threads.
14717 (linux_attach): New function.
14718 (linux_kill_one_process): New function.
14719 (linux_kill): Kill all LWPs.
14720 (linux_thread_alive): Use find_inferior_id.
14721 (check_removed_breakpoints, status_pending_p): New functions.
14722 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14723 Update. Use WNOHANG. Wait for cloned processes also. Update process
14724 struct for the found process.
14725 (linux_wait_for_event): New function.
14726 (linux_wait): Use it. Support LWPs.
14727 (send_sigstop, wait_for_sigstop, stop_all_processes)
14728 (linux_resume_one_process, linux_continue_one_process): New functions.
14729 (linux_resume): Support LWPs.
14730 (REGISTER_RAW_SIZE): Remove.
14731 (fetch_register): Use register_size instead. Call supply_register.
14732 (usr_store_inferior_registers): Likewise. Call collect_register.
14733 Fix recursive case.
14734 (regsets_fetch_inferior_registers): Improve error message.
14735 (regsets_store_inferior_registers): Add debugging.
14736 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14737 (unstopped_p, linux_signal_pid): New functions.
14738 (linux_target_ops): Add linux_signal_pid.
14739 (linux_init_signals): New function.
14740 (initialize_low): Call it. Initialize using_threads.
14741 * regcache.c (inferior_regcache_data): Add valid
14742 flag.
14743 (get_regcache): Fetch registers lazily. Add fetch argument
14744 and update all callers.
14745 (regcache_invalidate_one, regcache_invalidate): New
14746 functions.
14747 (new_register_cache): Renamed from create_register_cache.
14748 Return the new regcache.
14749 (free_register_cache): Change argument to a void *.
14750 (registers_to_string, registers_from_string): Call get_regcache
14751 with fetch flag set.
14752 (register_data): Make static. Pass fetch flag to get_regcache.
14753 (supply_register): Call get_regcache with fetch flag clear.
14754 (collect_register): Call get_regcache with fetch flag set.
14755 (collect_register_as_string): New function.
14756 * regcache.h: Update.
14757 * remote-utils.c (putpkt): Flush after debug output and use
14758 stderr.
14759 Handle input interrupts while waiting for an ACK.
14760 (input_interrupt): Use signal_pid method.
14761 (getpkt): Flush after debug output and use stderr.
14762 (outreg): Use collect_register_as_string.
14763 (new_thread_notify, dead_thread_notify): New functions.
14764 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14765 and general_thread.
14766 (look_up_one_symbol): Flush after debug output.
14767 * server.c (step_thread, server_waiting): New variables.
14768 (start_inferior): Don't use signal_pid. Update call to mywait.
14769 (attach_inferior): Update call to mywait.
14770 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14771 (main): Don't fetch/store registers explicitly. Use
14772 set_desired_inferior. Support proposed ``Hs'' packet. Update
14773 calls to mywait.
14774 * server.h: Update.
14775 (struct inferior_list, struct_inferior_list_entry): New.
14776 * target.c (set_desired_inferior): New.
14777 (write_inferior_memory): Constify.
14778 (mywait): New function.
14779 * target.h: Update.
14780 (struct target_ops): New signal_pid method.
14781 (mywait): Removed macro, added prototype.
14782
14783 * linux-low.h (regset_func): Removed.
14784 (regset_fill_func, regset_store_func): New.
14785 (enum regset_type): New.
14786 (struct regset_info): Add type field. Use new operation types.
14787 (struct linux_target_ops): stop_pc renamed to get_pc.
14788 Add decr_pc_after_break and breakpoint_at.
14789 (get_process, get_thread_proess, get_process_thread)
14790 (strut process_info, all_processes, linux_attach_lwp)
14791 (thread_db_init): New.
14792
14793 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14794 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14795 (the_low_target): Add new members.
14796 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14797 (i386_store_fpxregset): Constify.
14798 (target_regsets): Add new kind identifier.
14799 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14800 (i386_set_pc): Add debugging.
14801 (i386_breakpoint_at): New function.
14802 (the_low_target): Add new members.
14803 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14804 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14805 (mips_breakpoint_at): New.
14806 (the_low_target): Add new members.
14807 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14808 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14809 (the_low_target): Add new members.
14810 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14811 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14812 (the_low_target): Add new members.
14813 * linux-x86-64-low.c (target_regsets): Add new kind
14814 identifier.
14815
148162002-05-15 Daniel Jacobowitz <drow@mvista.com>
14817
14818 From Martin Pool <mbp@samba.org>:
14819 * server.c (gdbserver_usage): New function.
14820 (main): Call it.
14821
148222002-05-14 Daniel Jacobowitz <drow@mvista.com>
14823
14824 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14825 stop_at -> stop_pc.
14826
148272002-05-04 Andrew Cagney <ac131313@redhat.com>
14828
14829 * Makefile.in: Remove obsolete code.
14830
148312002-04-24 Michal Ludvig <mludvig@suse.cz>
14832
14833 * linux-low.c (regsets_fetch_inferior_registers),
14834 (regsets_store_inferior_registers): Removed cast to int from
14835 ptrace() calls.
14836 * regcache.h: Added declaration of struct inferior_info.
14837
148382002-04-20 Daniel Jacobowitz <drow@mvista.com>
14839
14840 * inferiors.c (struct inferior_info): Add regcache_data.
14841 (add_inferior): Call create_register_cache.
14842 (clear_inferiors): Call free_register_cache.
14843 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14844 * regcache.c (struct inferior_regcache_data): New.
14845 (registers): Remove.
14846 (get_regcache): New function.
14847 (create_register_cache, free_register_cache): New functions.
14848 (set_register_cache): Don't initialize the register cache here.
14849 (registers_to_string, registers_from_string, register_data): Call
14850 get_regcache.
14851 * regcache.h: Add prototypes.
14852 * server.h: Likewise.
14853
148542002-04-20 Daniel Jacobowitz <drow@mvista.com>
14855
14856 * mem-break.c: New file.
14857 * mem-break.h: New file.
14858 * Makefile.in: Add mem-break.o rule; update server.h
14859 dependencies.
14860 * inferiors.c (struct inferior_info): Add target_data
14861 member.
14862 (clear_inferiors): Free target_data member if set.
14863 (inferior_target_data, set_inferior_target_data): New functions.
14864 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14865 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14866 * linux-low.c (linux_bp_reinsert): New variable.
14867 (struct inferior_linux_data): New.
14868 (linux_create_inferior): Use set_inferior_target_data.
14869 (linux_attach): Likewise. Call add_inferior.
14870 (linux_wait_for_one_inferior): New function.
14871 (linux_wait): Call it.
14872 (linux_write_memory): Add const.
14873 (initialize_low): Call set_breakpoint_data.
14874 * linux-low.h (struct linux_target_ops): Add breakpoint
14875 handling members.
14876 * server.c (attach_inferior): Remove extra add_inferior
14877 call.
14878 * server.h: Include mem-break.h. Update inferior.c
14879 prototypes.
14880 * target.c (read_inferior_memory)
14881 (write_inferior_memory): New functions.
14882 * target.h (read_inferior_memory)
14883 (write_inferior_memory): Change macros to prototypes.
14884 (struct target_ops): Update comments. Add const to write_memory
14885 definition.
14886
148872002-04-11 Daniel Jacobowitz <drow@mvista.com>
14888
14889 * linux-low.c (usr_store_inferior_registers): Support
14890 registers which are allowed to fail to store.
14891 * linux-low.h (linux_target_ops): Likewise.
14892 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14893 (ppc_cannot_store_register): FPSCR may not be storable.
14894
148952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * server.h: Include <string.h> if HAVE_STRING_H.
14898 * ChangeLog: Correct paths in last ChangeLog entry.
14899
149002002-04-09 Daniel Jacobowitz <drow@mvista.com>
14901
14902 * linux-low.h: Remove obsolete prototypes.
14903 (struct linux_target_ops): New.
14904 (extern the_low_target): New.
14905 * linux-low.c (num_regs, regmap): Remove declarations.
14906 (register_addr): Use the_low_target explicitly.
14907 (fetch_register): Likewise.
14908 (usr_fetch_inferior_registers): Likewise.
14909 (usr_store_inferior_registers): Likewise.
14910 * linux-arm-low.c (num_regs): Remove.
14911 (arm_num_regs): Define.
14912 (arm_regmap): Renamed from regmap, made static.
14913 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14914 made static.
14915 (arm_cannot_store_register): Renamed from cannot_store_register,
14916 made static.
14917 (the_low_target): New.
14918 * linux-i386-low.c (num_regs): Remove.
14919 (i386_num_regs): Define.
14920 (i386_regmap): Renamed from regmap, made static.
14921 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14922 made static.
14923 (i386_cannot_store_register): Renamed from cannot_store_register,
14924 made static.
14925 (the_low_target): New.
14926 * linux-ia64-low.c (num_regs): Remove.
14927 (ia64_num_regs): Define.
14928 (ia64_regmap): Renamed from regmap, made static.
14929 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14930 made static.
14931 (ia64_cannot_store_register): Renamed from cannot_store_register,
14932 made static.
14933 (the_low_target): New.
14934 * linux-m68k-low.c (num_regs): Remove.
14935 (m68k_num_regs): Define.
14936 (m68k_regmap): Renamed from regmap, made static.
14937 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14938 made static.
14939 (m68k_cannot_store_register): Renamed from cannot_store_register,
14940 made static.
14941 (the_low_target): New.
14942 * linux-mips-low.c (num_regs): Remove.
14943 (mips_num_regs): Define.
14944 (mips_regmap): Renamed from regmap, made static.
14945 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14946 made static.
14947 (mips_cannot_store_register): Renamed from cannot_store_register,
14948 made static.
14949 (the_low_target): New.
14950 * linux-ppc-low.c (num_regs): Remove.
14951 (ppc_num_regs): Define.
14952 (ppc_regmap): Renamed from regmap, made static.
14953 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14954 made static.
14955 (ppc_cannot_store_register): Renamed from cannot_store_register,
14956 made static.
14957 (the_low_target): New.
14958 * linux-s390-low.c (num_regs): Remove.
14959 (s390_num_regs): Define.
14960 (s390_regmap): Renamed from regmap, made static.
14961 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14962 made static.
14963 (s390_cannot_store_register): Renamed from cannot_store_register,
14964 made static.
14965 (the_low_target): New.
14966 * linux-sh-low.c (num_regs): Remove.
14967 (sh_num_regs): Define.
14968 (sh_regmap): Renamed from regmap, made static.
14969 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14970 made static.
14971 (sh_cannot_store_register): Renamed from cannot_store_register,
14972 made static.
14973 (the_low_target): New.
14974 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14975 (the_low_target): New.
14976
149772002-04-09 Daniel Jacobowitz <drow@mvista.com>
14978
14979 * Makefile.in: Add stamp-h target.
14980 * configure.in: Create stamp-h.
14981 * configure: Regenerated.
14982
149832002-04-09 Daniel Jacobowitz <drow@mvista.com>
14984
14985 * inferiors.c: New file.
14986 * target.c: New file.
14987 * target.h: New file.
14988 * Makefile.in: Add target.o and inferiors.o. Update
14989 dependencies.
14990 * linux-low.c (inferior_pid): New static variable,
14991 moved from server.c.
14992 (linux_create_inferior): Renamed from create_inferior.
14993 Call add_inferior. Return 0 on success instead of a PID.
14994 (linux_attach): Renamed from myattach.
14995 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14996 (linux_thread_alive): Renamed from mythread_alive.
14997 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14998 child dies.
14999 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15000 (regsets_store_inferior_registers): Correct error message.
15001 Add missing ``return 0''.
15002 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15003 (linux_store_registers): Renamed from store_inferior_registers.
15004 (linux_read_memory): Renamed from read_inferior_memory.
15005 (linux_write_memory): Renamed from write_inferior_memory.
15006 (linux_target_ops): New structure.
15007 (initialize_low): Call set_target_ops ().
15008 * remote-utils.c (unhexify): New function.
15009 (hexify): New function.
15010 (input_interrupt): Send signals to ``signal_pid''.
15011 * server.c (inferior_pid): Remove.
15012 (start_inferior): Update create_inferior call.
15013 (attach_inferior): Call add_inferior.
15014 (handle_query): New function.
15015 (main): Call handle_query for `q' packets.
15016 * server.h: Include "target.h". Remove obsolete prototypes.
15017 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15018
150192002-04-09 Daniel Jacobowitz <drow@mvista.com>
15020
15021 * Makefile.in: Add WARN_CFLAGS. Update configury
15022 dependencies.
15023 * configure.in: Check for <string.h>
15024 * configure: Regenerate.
15025 * config.in: Regenerate.
15026 * gdbreplay.c: Include needed system headers.
15027 (remote_open): Remove strchr prototype.
15028 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15029 * regcache.c (supply_register): Change buf argument to const void *.
15030 (supply_register_by_name): Likewise.
15031 (collect_register): Change buf argument to void *.
15032 (collect_register_by_name): Likewise.
15033 * regcache.h: Add missing prototypes.
15034 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15035 * server.c (handle_query): New function.
15036 (attached): New static variable, moved out of main.
15037 (main): Quiet longjmp clobber warnings.
15038 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15039 * utils.c (error): Remove NORETURN.
15040 (fatal): Likewise.