]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
x86-64: Add some x32 ELF property tests
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
aefd8b33
SDJ
12017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * server.c (handle_general_set): Handle new packet
4 "QStartupWithShell".
5 (handle_query): Add "QStartupWithShell" to the list of supported
6 packets.
7 (gdbserver_usage): Add help text explaining the
8 new "--startup-with-shell" and "--no-startup-with-shell" CLI
9 options.
10 (captured_main): Recognize and act upon the presence of the new
11 CLI options.
12
2090129c
SDJ
132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
14 Pedro Alves <palves@redhat.com>
15
16 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
17 * configure: Regenerate.
18 * configure.srv (srv_linux_obj): Add "fork-child.o" and
19 "fork-inferior.o".
20 (i[34567]86-*-lynxos*): Likewise.
21 (spu*-*-*): Likewise.
22 * fork-child.c: New file.
23 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
24 and "environ.h".
25 (linux_ptrace_fun): New function.
26 (linux_create_inferior): Adjust function prototype to reflect
27 change on "target.h". Adjust function code to use
28 "fork_inferior".
29 (linux_request_interrupt): Delete "signal_pid".
30 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
31 (lynx_ptrace_fun): New function.
32 (lynx_create_inferior): Adjust function prototype to reflect
33 change on "target.h". Adjust function code to use
34 "fork_inferior".
35 * nto-low.c (nto_create_inferior): Adjust function prototype and
36 code to reflect change on "target.h". Update comments.
37 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
38 "common-terminal.h" and "environ.h".
39 (terminal_fd): Moved to fork-child.c.
40 (old_foreground_pgrp): Likewise.
41 (restore_old_foreground_pgrp): Likewise.
42 (last_status): Make it global.
43 (last_ptid): Likewise.
44 (our_environ): New variable.
45 (startup_with_shell): Likewise.
46 (program_name): Likewise.
47 (program_argv): Rename to...
48 (program_args): ...this.
49 (wrapper_argv): New variable.
50 (start_inferior): Delete function.
51 (get_exec_wrapper): New function.
52 (get_exec_file): Likewise.
53 (get_environ): Likewise.
54 (prefork_hook): Likewise.
55 (post_fork_inferior): Likewise.
56 (postfork_hook): Likewise.
57 (postfork_child_hook): Likewise.
58 (handle_v_run): Update code to deal with arguments coming from the
59 remote host. Update calls from "start_inferior" to
60 "create_inferior".
61 (captured_main): Likewise. Initialize environment variable. Call
62 "have_job_control".
63 * server.h (post_fork_inferior): New prototype.
64 (get_environ): Likewise.
65 (last_status): Declare.
66 (last_ptid): Likewise.
67 (signal_pid): Likewise.
68 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
69 (spu_ptrace_fun): New function.
70 (spu_create_inferior): Adjust function prototype to reflect change
71 on "target.h". Adjust function code to use "fork_inferior".
72 * target.c (target_terminal_init): New function.
73 (target_terminal_inferior): Likewise.
74 (target_terminal_ours): Likewise.
75 * target.h: Include <vector>.
76 (struct target_ops) <create_inferior>: Update prototype.
77 (create_inferior): Update macro.
78 * utils.c (gdb_flush_out_err): New function.
79 * win32-low.c (win32_create_inferior): Adjust function prototype
80 and code to reflect change on "target.h".
81
043a4934
SDJ
822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
83
84 * inferiors.c (switch_to_thread): New function.
85
15652511
SDJ
862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
87
88 * Makefile.in (SFILE): Add "common/job-control.c".
89 (OBS): Add "job-control.o".
90
21ea5acd
SDJ
912017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
92
93 * Makefile: Remove "@host_makefile_frag@".
94
e13cb306
PA
952017-05-05 Pedro Alves <palves@redhat.com>
96
97 * configure: Regenerate.
98
c94fee56
SDJ
992017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
100
101 * configure: Regenerate.
102
a0ff9e1a
SM
1032017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
104
105 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
106 software_single_step change of return type to
107 std::vector<CORE_ADDR>.
108 * linux-low.c (install_software_single_step_breakpoints):
109 Likewise.
110 * linux-low.h (install_software_single_step_breakpoints):
111 Likewise.
112
be628ab8
SDJ
1132017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
114
115 * remote-utils.c: Include "gdb_termios.h" instead of
116 "terminal.h".
117 * terminal.h: Delete file.
118
7c5ded6a
SDJ
1192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
120
121 * server.c: Include <vector>.
122 <program_argv, wrapper_argv>: Convert to std::vector.
123 (start_inferior): Rewrite function to use C++.
124 (handle_v_run): Likewise. Update code that calculates the argv
125 based on the vRun packet; use C++.
126 (captured_main): Likewise.
127
436252de
SM
1282017-04-06 Simon Marchi <simon.marchi@ericsson.com>
129
130 * server.c (handle_v_cont): Initialize thread_resume::thread
131 with null_ptid.
132
9bf2a700
PA
1332017-04-05 Pedro Alves <palves@redhat.com>
134
135 * configure: Regenerate.
136
a121b7c1
PA
1372017-04-05 Pedro Alves <palves@redhat.com>
138
139 * gdbreplay.c (sync_error): Constify.
140 * linux-x86-low.c (push_opcode): Constify.
141
21c8a587
PA
1422017-04-05 Pedro Alves <palves@redhat.com>
143
144 * win32-low.c (get_child_debug_event)
145 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
146 Report TARGET_WAITKIND_SPURIOUS instead.
147
fb32b4f7
PA
1482017-04-05 Pedro Alves <palves@redhat.com>
149
150 * remote-utils.c (remote_prepare, remote_open): Constify.
151 * remote-utils.h (remote_prepare, remote_open): Constify.
152 * server.c (captured_main): Constify 'port' handling.
153
65dd1e59
SM
1542017-04-04 Simon Marchi <simon.marchi@ericsson.com>
155
156 * Makefile.in (clean): Clear .deps.
157
8fa5b777
SM
1582017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * .gitignore: Remove generated files, replace with wildcard.
161 * (clean): Replace removal of generated files with wildcard.
162 (version.c): Replace with...
163 (version-generated.c): ...this.
164 (xml-builtin.c): Replace with...
165 (xml-builtin-generated.c): ...this.
166 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
167 (%.c: *regformats*): Replace with...
168 (%-generated.c: *regformats*): ...this.
169
a12e714b
MF
1702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
171
172 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
173 (xtensa_fill_gregset): Call collect_register_by_name for
174 threadptr register.
175 (xtensa_store_gregset): Call supply_register_by_name for
176 threadptr register.
177
1a09b50a
MF
1782017-03-27 Max Filippov <jcmvbkbc@gmail.com>
179
180 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
181 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
182 (xtensa_store_gregset): Call supply_register for all registers in
183 a0_regnum..a0_regnum + C0_NREGS range.
184
1a01e7c6
SM
1852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
188 (ax-ipa.o: ax.c): Remove.
189 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
190 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
191 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
192 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
193 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
194
36bc18a8
SM
1952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
198 (print-utils-ipa.o: ../common/print-utils.c): Remove.
199 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
200 (errors-ipa.o: ../common/errors.c): Remove.
201 (format-ipa.o: ../common/format.c): Remove.
202 (common-utils-ipa.o: ../common/common-utils.c): Remove.
203
a8ebe3d5
SM
2042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
205
206 * Makefile.in (%-ipa.o: %.c): New rule.
207 (tracepoint-ipa.o: tracepoint.c): Remove.
208 (utils-ipa.o: utils.c): Remove.
209 (remote-utils-ipa.o: remote-utils.c): Remove.
210 (regcache-ipa.o: regcache.c): Remove.
211 (i386-linux-ipa.o: i386-linux.c): Remove.
212 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
213 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
214 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
215 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
216 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
217 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
218 (amd64-linux-ipa.o: amd64-linux.c): Remove.
219 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
220 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
221 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
222 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
223 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
224 (aarch64-ipa.o: aarch64.c): Remove.
225 (s390-linux32-ipa.o: s390-linux32.c): Remove.
226 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
227 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
228 (s390-linux64-ipa.o: s390-linux64.c): Remove.
229 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
230 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
231 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
232 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
233 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
234 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
235 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
236 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
237 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
238 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
239 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
240 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
241 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
242 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
243 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
244 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
245 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
246 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
247 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
248 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
249 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
250 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
251 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
252 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
253 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
254 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
255 (tdesc-ipa.o: tdesc.c): Remove.
256 (x32-linux-ipa.o: x32-linux.c): Remove.
257 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
258 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
259
50cfacb7
SM
2602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
261
262 * Makefile.in (%.o: ../arch/%.c): New rule.
263 (arm.o: ../arch/arm.c): Remove.
264 (arm-linux.o: ../arch/arm-linux.c): Remove.
265 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
266 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
267
c5a22423
SM
2682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
269
270 * Makefile.in (%.o: ../nat/%.c): New rule.
271 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
272 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
273 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
274 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
275 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
276 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
277 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
278 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
279 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
280 (linux-personality.o: ../nat/linux-personality.c): Remove.
281 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
282 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
283 (x86-linux.o: ../nat/x86-linux.c): Remove.
284 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
285 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
286
6bda016b
SM
2872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
288
289 * Makefile.in (%.o: ../common/%.c): New rule.
290 (signals.o: ../common/signals.c): Remove.
291 (print-utils.o: ../common/print-utils.c): Remove.
292 (rsp-low.o: ../common/rsp-low.c): Remove.
293 (common-utils.o: ../common/common-utils.c): Remove.
294 (posix-strerror.o: ../common/posix-strerror.c): Remove.
295 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
296 (vec.o: ../common/vec.c): Remove.
297 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
298 (xml-utils.o: ../common/xml-utils.c): Remove.
299 (ptid.o: ../common/ptid.c): Remove.
300 (buffer.o: ../common/buffer.c): Remove.
301 (format.o: ../common/format.c): Remove.
302 (filestuff.o: ../common/filestuff.c): Remove.
303 (agent.o: ../common/agent.c): Remove.
304 (errors.o: ../common/errors.c): Remove.
305 (environ.o: ../common/environ.c): Remove.
306 (common-debug.o: ../common/common-debug.c): Remove.
307 (cleanups.o: ../common/cleanups.c): Remove.
308 (common-exceptions.o: ../common/common-exceptions.c): Remove.
309 (fileio.o: ../common/fileio.c): Remove.
310 (common-regcache.o: ../common/common-regcache.c): Remove.
311 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
312 (new-op.o: ../common/new-op.c): Remove.
313 (btrace-common.o: ../common/btrace-common.c): Remove.
314
21122961
SM
3152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * Makefile.in (%.o: ../target/%.c): New rule.
318 (waitstatus.o: ../target/waitstatus.c): Remove.
319
c362e621
SM
3202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
321
322 * Makefile.in
323 (%.c: ../regformats/%.dat,
324 (%.c: ../regformats/arm/%.dat,
325 (%.c: ../regformats/i386/%.dat,
326 (%.c: ../regformats/rs6000/%.dat): New rules.
327 (aarch64.c): Remove.
328 (reg-arm.c): Remove.
329 (arm-with-iwmmxt.c): Remove.
330 (arm-with-vfpv2.c): Remove.
331 (arm-with-vfpv3.c): Remove.
332 (arm-with-neon.c): Remove.
333 (reg-bfin.c): Remove.
334 (reg-cris.c): Remove.
335 (reg-crisv32.c): Remove.
336 (i386.c): Remove.
337 (i386-linux.c): Remove.
338 (i386-avx.c): Remove.
339 (i386-avx-linux.c): Remove.
340 (i386-avx-avx512.c): Remove.
341 (i386-avx-avx512-linux.c): Remove.
342 (i386-mpx.c): Remove.
343 (i386-mpx-linux.c): Remove.
344 (i386-avx-mpx-avx512-pku.c): Remove.
345 (i386-avx-mpx-avx512-pku-linux.c): Remove.
346 (i386-avx-mpx.c): Remove.
347 (i386-avx-mpx-linux.c): Remove.
348 (i386-mmx.c): Remove.
349 (i386-mmx-linux.c): Remove.
350 (reg-ia64.c): Remove.
351 (reg-m32r.c): Remove.
352 (reg-m68k.c): Remove.
353 (reg-cf.c): Remove.
354 (mips-linux.c): Remove.
355 (mips-dsp-linux.c): Remove.
356 (mips64-linux.c): Remove.
357 (mips64-dsp-linux.c): Remove.
358 (nios2-linux.c): Remove.
359 (powerpc-32.c): Remove.
360 (powerpc-32l.c): Remove.
361 (powerpc-altivec32l.c): Remove.
362 (powerpc-cell32l.c): Remove.
363 (powerpc-vsx32l.c): Remove.
364 (powerpc-isa205-32l.c): Remove.
365 (powerpc-isa205-altivec32l.c): Remove.
366 (powerpc-isa205-vsx32l.c): Remove.
367 (powerpc-e500l.c): Remove.
368 (powerpc-64l.c): Remove.
369 (powerpc-altivec64l.c): Remove.
370 (powerpc-cell64l.c): Remove.
371 (powerpc-vsx64l.c): Remove.
372 (powerpc-isa205-64l.c): Remove.
373 (powerpc-isa205-altivec64l.c): Remove.
374 (powerpc-isa205-vsx64l.c): Remove.
375 (s390-linux32.c): Remove.
376 (s390-linux32v1.c): Remove.
377 (s390-linux32v2.c): Remove.
378 (s390-linux64.c): Remove.
379 (s390-linux64v1.c): Remove.
380 (s390-linux64v2.c): Remove.
381 (s390-te-linux64.c): Remove.
382 (s390-vx-linux64.c): Remove.
383 (s390-tevx-linux64.c): Remove.
384 (s390x-linux64.c): Remove.
385 (s390x-linux64v1.c): Remove.
386 (s390x-linux64v2.c): Remove.
387 (s390x-te-linux64.c): Remove.
388 (s390x-vx-linux64.c): Remove.
389 (s390x-tevx-linux64.c): Remove.
390 (tic6x-c64xp-linux.c): Remove.
391 (tic6x-c64x-linux.c): Remove.
392 (tic6x-c62x-linux.c): Remove.
393 (reg-sh.c): Remove.
394 (reg-sparc64.c): Remove.
395 (reg-spu.c): Remove.
396 (amd64.c): Remove.
397 (amd64-linux.c): Remove.
398 (amd64-avx.c): Remove.
399 (amd64-avx-linux.c): Remove.
400 (amd64-avx-avx512.c): Remove.
401 (amd64-avx-avx512-linux.c): Remove.
402 (amd64-mpx.c): Remove.
403 (amd64-mpx-linux.c): Remove.
404 (amd64-avx-mpx-avx512-pku.c): Remove.
405 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
406 (amd64-avx-mpx.c): Remove.
407 (amd64-avx-mpx-linux.c): Remove.
408 (x32.c): Remove.
409 (x32-linux.c): Remove.
410 (x32-avx.c): Remove.
411 (x32-avx-linux.c): Remove.
412 (x32-avx-avx512.c): Remove.
413 (x32-avx-avx512-linux.c): Remove.
414 (reg-xtensa.c): Remove.
415 (reg-tilegx.c): Remove.
416 (reg-tilegx32.c): Remove.
417
1672e0d9
SDJ
4182017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
419
420 * Makefile.in (SFILES): Add "common/environ.c".
421 (OBJS): Add "common/environ.h".
422
239b6d10
WT
4232017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
424
425 * configure.ac: Check if the fs_base and gs_base members of
426 `struct user_regs_struct' exist.
427 * config.in: Regenerated.
428 * configure: Likewise.
429
694b382c
AT
4302017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
431
432 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
433 target_read_memory.
434 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
435 (get_next_pcs_syscall_next_pc): Likewise.
436
7dc53023
LM
4372016-12-23 Luis Machado <lgustavo@codesourcery.com>
438
439 * win32-i386-low.c: Fix incorrect reference to a couple source files.
440 * nto-x86-low.c: Likewise.
441
ad02e4fe
SM
4422016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
443
444 * Makefile.in: Include disable-implicit-rules.mk.
445
dcb07cfa
PA
4462016-11-23 Pedro Alves <palves@redhat.com>
447
448 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
449 (debug_vprintf): Use std::chrono::steady_clock instead of
450 gettimeofday. Use '.' instead of ':'.
451 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
452 (get_timestamp): Use std::chrono::steady_clock instead of
453 gettimeofday.
454
8629c02c
SM
4552016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
456
457 * Makefile.in: Fix whitespace formatting.
458
b593ecca
SM
4592016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
460
461 * Makefile.in (SFILES, OBS): Flatten list and order
462 alphabetically.
463
9986ba08
PA
4642016-11-23 Pedro Alves <palves@redhat.com>
465
466 * event-loop.c (handle_file_event): Use warning.
467 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
468 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
469 Use warning.
470
4eefa7bc
PA
4712016-11-23 Pedro Alves <palves@redhat.com>
472
473 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
474 output.
475 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
476 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
477 debug_printf and debug_flush for debug output.
478 * server.c (handle_general_set): Likewise.
479 * thread-db.c (try_thread_db_load): Use debug_printf for debug
480 output.
481
5443506e
SM
4822016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
483
484 * Makefile.in (.c.o): Replace rule with ...
485 (%.o: %.c): ... this one.
486
3b165252
SM
4872016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
488
489 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
490 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
491 make.
492 * configure.ac: Remove checks for the make program.
493 * configure: Re-generate.
494
0bcda685
PA
4952016-10-28 Pedro Alves <palves@redhat.com>
496
497 * Makefile.in (CXX_DIALECT): Get from configure.
498 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
499 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
500 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
501 * config.in: Regenerate.
502 * configure: Regenerate.
503
c3805894
YQ
5042016-10-27 Yao Qi <yao.qi@linaro.org>
505
506 * linux-low.c (linux_supports_range_stepping): Return true if
507 can_software_single_step return true.
508
89342618
YQ
5092016-10-27 Yao Qi <yao.qi@linaro.org>
510
511 * inferiors.c (find_inferior_in_random): New function.
512 * inferiors.h (find_inferior_in_random): Declare.
513 * linux-low.c (linux_wait_for_event_filtered): Call
514 find_inferior_in_random instead of find_inferior.
515
e3652c84
YQ
5162016-10-27 Yao Qi <yao.qi@linaro.org>
517
518 * linux-low.c (linux_wait_1): If single-step breakpoints are
519 inserted, remove them.
520
5a04c4cf
PA
5212016-10-26 Pedro Alves <palves@redhat.com>
522
523 * linux-low.c (handle_extended_wait): Link parent/child fork
524 threads.
525 (linux_wait_1): Unlink them.
526 (linux_set_resume_request): Ignore resume requests for
527 already-resumed and unhandled fork child threads.
528 * linux-low.h (struct lwp_info) <fork_relative>: New field.
529 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
530 New functions.
531 (handle_v_requests) <vCont>: Don't call require_running.
532 * server.h (in_queued_stop_replies): New declaration.
533
cb93dc7f
YQ
5342016-10-24 Yao Qi <yao.qi@linaro.org>
535
536 PR server/20733
537 * linux-aarch64-low.c (append_insns): Cast the return value to
538 'uint32_t *'.
539
a1078bea
YQ
5402016-10-10 Yao Qi <yao.qi@linaro.org>
541
542 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
543
1fb77080
SDJ
5442016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
545
546 * target.c (target_supports_multi_process): New function, moved
547 from...
548 * target.h (target_supports_multi_process): ... here. Remove
549 macro.
550
39b5a3b9
TT
5512016-10-05 Tom Tromey <tom@tromey.com>
552
553 PR remote/20655:
554 * tracepoint.c (handle_tracepoint_bkpts): Check
555 ipa_error_tracepoint, not ipa_stopping_tracepoint.
556
c1d0b70a
YQ
5572016-10-05 Yao Qi <yao.qi@linaro.org>
558
559 * configure.srv: Update the path of arm-*.xml files.
560
0a69eedb
YQ
5612016-10-05 Terry Guo <terry.guo@arm.com>
562 Yao Qi <yao.qi@linaro.org>
563
564 * Makefile.in: Adjust the path of rules.
565 * configure.srv: Update the path of xml files.
566 * regformats/arm-with-iwmmxt.dat: Regenerated.
567 * regformats/arm-with-neon.dat: Likewise.
568 * regformats/arm-with-vfpv2.dat: Likewise.
569 * regformats/arm-with-vfpv3.dat Likewise.
570
17e16485
YQ
5712016-09-30 Yao Qi <yao.qi@linaro.org>
572
573 PR gdbserver/20627
574 * target.c (target_stop_and_wait): Don't call
575 target_continue_no_signal, use resume_stop instead.
576
edeeb602
YQ
5772016-09-26 Yao Qi <yao.qi@linaro.org>
578
579 * linux-low.c (linux_wait_1): Call debug_exit.
580
503b1c39
PA
5812016-09-23 Pedro Alves <palves@redhat.com>
582
583 * Makefile.in (SFILES): Add common/new-op.c.
584 (OBS): Add common/new-op.o.
585 (new-op.o): New rule.
586
74172ecf
SM
5872016-09-21 Simon Marchi <simon.marchi@ericsson.com>
588
589 * .gitinore: Ignore more files.
590
fc6cda2e
YQ
5912016-09-21 Yao Qi <yao.qi@linaro.org>
592
593 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
594 23.
595
bc1e6c81
SDJ
5962016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
597
598 * server.c (start_inferior): Call target_mourn_inferior instead of
599 mourn_inferior; pass ptid_t argument to it.
600 (resume): Likewise.
601 (handle_target_event): Likewise.
602 * target.c (target_mourn_inferior): New function.
603 * target.h (mourn_inferior): Delete macro.
604
0e00e962
AA
6052016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
606
607 * linux-low.c (lwp_is_stepping): New function.
608
1d8cb77d
CL
6092016-09-06 Carl Love <cel@us.ibm.com>
610
611 * server.c (start_inferior): Fixed comment, requested comment change
612 didn't get updated correctly. Removed reference to ptrace () call as
613 it is only true on Linux systems.
614
7313bced
CL
6152016-09-06 Carl Love <cel@us.ibm.com>
616
617 * server.c (start_inferior): Do not call
618 function target_post_create_inferior () if the
619 inferior process has already exited.
620
cf6de44d
PA
6212016-09-05 Pedro Alves <palves@redhat.com>
622
623 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
624 (COMPILE.pre, CC_LD): Use CXX directly.
625 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
626 * acinclude.m4: Don't include build-with-cxx.m4.
627 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
628 * configure: Regenerate.
629
c1da6748
AT
6302016-09-02 Akash Trehan <akash.trehan123@gmail.com>
631
632 PR gdb/19495
633 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
634 call writing data to own_buf.
635
f2b9e3df
SDJ
6362016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
637
638 * target.c (mywait): Call target_wait instead of
639 the_target->wait.
640 (target_wait): New function.
641
049a8570
SDJ
6422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
643
644 * server.c (start_inferior): New variable 'ptid'. Replace calls
645 to the_target->resume by target_continue{,_no_signal}, depending
646 on the case.
647 * target.c (target_stop_and_wait): Call target_continue_no_signal
648 instead of the_target->resume.
649 (target_continue): New function.
650
3aa5cfa0
AT
6512016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
652
653 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
654
754653a7
AZ
6552016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
656
657 PR server/20491
658 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
659 ps_prochandle.
660 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
661 * linux-arm-low.c (ps_get_thread_area): Likewise.
662 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
663 * linux-m68k-low.c (ps_get_thread_area): Likewise.
664 * linux-mips-low.c (ps_get_thread_area): Likewise.
665 * linux-nios2-low.c (ps_get_thread_area): Likewise.
666 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
667 * linux-x86-low.c (ps_get_thread_area): Likewise.
668 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
669
ed036b40
PA
6702016-08-19 Pedro Alves <palves@redhat.com>
671
672 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
673
c8ef42ee
PA
6742016-08-19 Pedro Alves <palves@redhat.com>
675
676 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
677 comment. Use memcpy instead of casting through unsigned long.
678
9c235a72
PA
6792016-08-19 Pedro Alves <palves@redhat.com>
680
681 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
682 allocating around 0x80000000.
683
201506da
PA
6842016-08-19 Pedro Alves <palves@redhat.com>
685
686 PR gdb/20415
687 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
688 (x32-avx512-linux-ipa.o): New rules.
689 * configure.ac (x86_64-*-linux*): New x32 check.
690 * configure.srv (ipa_x32_linux_regobj): New.
691 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
692 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
693 descriptions.
694 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
695 descriptions.
696 * configure: Regenerate.
697
f348d89a
PA
6982016-08-09 Pedro Alves <palves@redhat.com>
699
700 PR gdb/18653
701 * Makefile.in (OBS): Add signals-state-save-restore.o.
702 (signals-state-save-restore.o): New rule.
703 * config.in: Regenerate.
704 * configure: Regenerate.
705 * linux-low.c: Include "signals-state-save-restore.h".
706 (linux_create_inferior): Call
707 restore_original_signals_state.
708 * server.c: Include "dispositions-save-restore.h".
709 (captured_main): Call save_original_signals_state.
710
1baf5149
PA
7112016-08-05 Pedro Alves <palves@redhat.com>
712
713 * configure: Regenerate.
714
fcd4a73d
YQ
7152016-08-04 Yao Qi <yao.qi@linaro.org>
716
717 * linux-low.c (regsets_fetch_inferior_registers): Check
718 errno is ESRCH or not.
719
979659d0
YQ
7202016-08-02 Yao Qi <yao.qi@linaro.org>
721
722 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
723 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
724 (thread_db_load_search): Update.
725 (try_thread_db_load_1): Don't look for td_ta_event_addr,
726 td_ta_set_event and td_ta_event_getmsg.
727
6598661d
PA
7282016-07-26 Pedro Alves <palves@redhat.com>
729
730 PR server/20414
731 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
732 of unsigned long for 64-bit registers and use uint32_t instead of
733 unsigned int for 32-bit registers.
734
9cf12d57
PA
7352016-07-26 Pedro Alves <palves@redhat.com>
736
737 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
738 to 'ptrace'.
739
305450ed
TT
7402016-07-21 Tom Tromey <tom@tromey.com>
741
742 * configure: Rebuild.
743
2583da7c
YQ
7442016-07-21 Yao Qi <yao.qi@linaro.org>
745
746 * mem-break.c (find_gdb_breakpoint): Cast bp to
747 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
748
21536b36
YQ
7492016-07-21 Yao Qi <yao.qi@linaro.org>
750
751 * server.c (handle_v_requests): Support s and S actions
752 if target_supports_software_single_step return true.
753
8901d193
YQ
7542016-07-21 Yao Qi <yao.qi@linaro.org>
755
756 * linux-low.c (resume_stopped_resumed_lwps): If resume request
757 is resume_step, call maybe_hw_step.
758 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
759 and unstop them.
760 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
761 breakpoints or not.
762 (proceed_one_lwp): If resume request is resume_step, install
763 reinsert breakpoints and call maybe_hw_step.
764
0e9a339e
YQ
7652016-07-21 Yao Qi <yao.qi@linaro.org>
766
767 * linux-low.c (proceed_one_lwp): Declare.
768 (linux_resume_one_thread): Remove local variable 'step'.
769 Lift code enqueue signal. Call proceed_one_lwp instead of
770 linux_resume_one_lwp.
771
4281b351
YQ
7722016-07-21 Yao Qi <yao.qi@linaro.org>
773
774 * linux-low.c (linux_resume_one_thread): Call
775 enqueue_pending_signal.
776
984a2c04
YQ
7772016-07-21 Yao Qi <yao.qi@linaro.org>
778
779 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
780 * inferiors.c (do_restore_current_thread_cleanup): New function.
781 (make_cleanup_restore_current_thread): Likewise.
782 * linux-low.c (install_software_single_step_breakpoints): Call
783 make_cleanup_restore_current_thread. Switch current_thread to
784 thread.
785
bec903c9
YQ
7862016-07-21 Yao Qi <yao.qi@linaro.org>
787
788 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
789 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
790 (clone_one_breakpoint): Likewise.
791 (delete_reinsert_breakpoints): Change parameter to thread.
792 Callers updated.
793 (has_reinsert_breakpoints): Likewise.
794 (uninsert_reinsert_breakpoints): Likewise.
795 (reinsert_reinsert_breakpoints): Likewise.
796 * mem-break.h (set_reinsert_breakpoint): Update declaration.
797 (delete_reinsert_breakpoints): Likewise.
798 (reinsert_reinsert_breakpoints): Likewise.
799 (uninsert_reinsert_breakpoints): Likewise.
800 (has_reinsert_breakpoints): Likewise.
801
63c40ec7
YQ
8022016-07-21 Yao Qi <yao.qi@linaro.org>
803
804 * inferiors.c (get_thread_process): Make parameter const.
805 * inferiors.h (get_thread_process): Update declaration.
806 * mem-break.c (clone_all_breakpoints): Remove all parameters.
807 Add new parameters child_thread and parent_thread. Callers
808 updated.
809 * mem-break.h (clone_all_breakpoints): Update declaration.
810
9aa76cd0
YQ
8112016-07-21 Yao Qi <yao.qi@linaro.org>
812
813 * mem-break.c (struct breakpoint) <cond_list>: Remove.
814 <command_list, handler>: Remove.
815 (struct gdb_breakpoint): New.
816 (struct other_breakpoint): New.
817 (struct reinsert_breakpoint): New.
818 (is_gdb_breakpoint): New function.
819 (any_persistent_commands): Update command_list if
820 is_gdb_breakpoint returns true.
821 (set_breakpoint): Create breakpoints according to their types.
822 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
823 (set_gdb_breakpoint_1): Likewise.
824 (set_gdb_breakpoint): Likewise.
825 (clear_breakpoint_conditions): Change parameter type to
826 'struct gdb_breakpoint *'.
827 (clear_breakpoint_commands): Likewise.
828 (clear_breakpoint_conditions_and_commands): Likewise.
829 (add_condition_to_breakpoint): Likewise.
830 (add_breakpoint_condition): Likewise.
831 (add_commands_to_breakpoint): Likewise.
832 (check_breakpoints): Check other_breakpoint.
833 (clone_one_breakpoint): Clone breakpopint according to its type.
834 * mem-break.h (struct gdb_breakpoint): Declare.
835 (set_gdb_breakpoint): Update declaration.
836 (clear_breakpoint_conditions_and_commands): Likewise.
837 (add_breakpoint_condition): Likewise.
838 (add_breakpoint_commands): Likewise.
839 * server.c (process_point_options): Change parameter type to
840 'struct gdb_breakpoint *'.
841
811f8301
YQ
8422016-07-21 Yao Qi <yao.qi@linaro.org>
843
844 * mem-break.c (set_breakpoint_at): Rename it to ...
845 (set_breakpoint_type_at): ... it.
846 (set_breakpoint_at): Call set_breakpoint_type_at.
847 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
848 * mem-break.h (set_breakpoint_at): Update comments.
849
b1c51e36
CLT
8502016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
851
852 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
853 to buf parameter.
854 (nios2_store_gregset): Likewise.
855
ced2dffb
PA
8562016-07-01 Pedro Alves <palves@redhat.com>
857 Antoine Tremblay <antoine.tremblay@ericsson.com>
858
859 * linux-low.c: Change interface to take the target lwp_info
860 pointer directly and return void. Handle detaching from a zombie
861 thread.
862 (linux_detach_lwp_callback): New function.
863 (linux_detach): Detach from the leader thread after detaching from
864 the clone threads.
865
2ac09a5b
YQ
8662016-06-28 Yao Qi <yao.qi@linaro.org>
867
868 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
869 for variable new_offset.
870 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
871 (aarch64_ftrace_insn_reloc_cb): Likewise.
872 (aarch64_ftrace_insn_reloc_tb): Likewise.
873 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
874 PRIx64 instead of PRIx32.
875
79e7fd4f
YQ
8762016-06-28 Yao Qi <yao.qi@linaro.org>
877
878 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
879 (the_low_target): Install arm_get_syscall_trapinfo.
880
061fc021
YQ
8812016-06-28 Yao Qi <yao.qi@linaro.org>
882
883 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
884 function.
885 (the_low_target): Install aarch64_get_syscall_trapinfo.
886
4cc32bec
YQ
8872016-06-28 Yao Qi <yao.qi@linaro.org>
888
889 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
890 Callers updated.
891 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
892 Remove parameter sysno.
893 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
894 sysret.
895
782c1122
AA
8962016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
897
898 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
899 (s390_emit_ne_goto): Likewise.
900 (s390_emit_lt_goto): Likewise.
901 (s390_emit_le_goto): Likewise.
902 (s390_emit_gt_goto): Likewise.
903 (s390_emit_ge_goto): Likewise.
904 (s390x_emit_eq_goto): Likewise.
905 (s390x_emit_ne_goto): Likewise.
906 (s390x_emit_lt_goto): Likewise.
907 (s390x_emit_le_goto): Likewise.
908 (s390x_emit_gt_goto): Likewise.
909 (s390x_emit_ge_goto): Likewise.
910 (s390_emit_ops_impl): Mark variable static.
911 (s390x_emit_ops): Likewise.
912
2e7b624b
YQ
9132016-06-17 Yao Qi <yao.qi@linaro.org>
914
915 * linux-low.c (handle_extended_wait): Call
916 uninsert_reinsert_breakpoints for the parent process. Remove
917 reinsert breakpoints from the child process. Reinsert them to
918 the parent process when vfork is done.
919 * mem-break.c (uninsert_reinsert_breakpoints): New function.
920 (reinsert_reinsert_breakpoints): New function.
921 * mem-break.h (uninsert_reinsert_breakpoints): Declare
922 (reinsert_reinsert_breakpoints): Declare.
923
8a81c5d7
YQ
9242016-06-17 Yao Qi <yao.qi@linaro.org>
925
926 * linux-low.c (handle_extended_wait): If the parent is doing
927 step-over, remove the reinsert breakpoints from the forked child.
928
f50bf8e5
YQ
9292016-06-17 Yao Qi <yao.qi@linaro.org>
930
931 * linux-low.c (unsuspend_all_lwps): Declare.
932 (linux_low_filter_event): If thread exited, call finish_step_over.
933 If step-over is finished, unsuspend other threads.
934
8376a3cb
YQ
9352016-06-17 Yao Qi <yao.qi@linaro.org>
936
937 * linux-low.c (linux_resume_one_lwp_throw): Assert
938 has_reinsert_breakpoints returns false.
939 * mem-break.c (delete_disabled_breakpoints): Assert
940 bp type isn't reinsert_breakpoint.
941
f79b145d
YQ
9422016-06-17 Yao Qi <yao.qi@linaro.org>
943
944 * linux-low.c (maybe_hw_step): New function.
945 (linux_resume_one_lwp_throw): Call maybe_hw_step.
946 (finish_step_over): Switch current_thread to lwp temporarily,
947 and assert has_reinsert_breakpoints returns true.
948 (proceed_one_lwp): Call maybe_hw_step.
949 * mem-break.c (has_reinsert_breakpoints): New function.
950 * mem-break.h (has_reinsert_breakpoints): Declare.
951
0ae534d2
JT
9522016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
953
954 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
955
fcdad592
YQ
9562016-05-17 Yao Qi <yao.qi@linaro.org>
957
958 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
959 instead of find_inferior.
960
9e784964
YQ
9612016-05-05 Yao Qi <yao.qi@linaro.org>
962
963 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
964 Initialize res to zero.
965
cf2ebb6e
YQ
9662016-05-05 Yao Qi <yao.qi@linaro.org>
967
968 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
969 to uint32_t.
970
c1aebf87
UW
9712016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
972
973 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
974 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
975 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
976
35fd2deb 9772016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 978 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
979
980 * tracepoint.c (write_inferior_int8): New function.
981 (cmd_qtenable_disable): Write enable flag using
982 write_inferior_int8.
983
484b3c32
YQ
9842016-04-25 Yao Qi <yao.qi@linaro.org>
985
986 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
987 (need_step_over_p): Return zero if the LWP has pending signals
988 can be delivered on software single step target.
989
85ba7d86
YQ
9902016-04-25 Yao Qi <yao.qi@linaro.org>
991
992 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
993 return instead of error.
994
3539aa13
YQ
9952016-04-22 Yao Qi <yao.qi@linaro.org>
996
997 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
998 to 23.
999
5b061e98
YQ
10002016-04-22 Yao Qi <yao.qi@linaro.org>
1001
1002 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1003 signal when stepping over breakpoint with software single
1004 step.
1005
3451269c
PA
10062016-04-21 Pedro Alves <palves@redhat.com>
1007
1008 * linux-s390-low.c (s390_collect_ptrace_register)
1009 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1010 add casts.
1011 (s390_check_regset): Use void * instead of gdb_byte *.
1012
a2358508
PA
10132016-04-20 Pedro Alves <palves@redhat.com>
1014
1015 * configure: Renegerate.
1016
6885166d
YQ
10172016-04-20 Yao Qi <yao.qi@linaro.org>
1018
1019 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1020 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1021 number 16.
1022 (arm_store_gregset): Likewise.
1023
2b863f51
WT
10242016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1025
1026 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1027 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1028 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1029 (amd64-avx-mpx-linux.c): New rules.
1030 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1031 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1032 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1033 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1034 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1035 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1036 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1037 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1038 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1039 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1040 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1041 * linux-x86-low.c (x86_linux_read_description): Add case for
1042 X86_XSTATE_AVX_MPX_MASK.
1043 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1044 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1045 init_registers_i386_avx_mpx_linux.
1046 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1047 (initialize_low_tracepoint): Call
1048 init_registers_i386_avx_mpx_linux.
1049 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1050 (initialize_low_tracepoint): Call
1051 init_registers_amd64_avx_mpx_linux.
1052 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1053 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1054 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1055 declarations.
1056
9b30624b
PA
10572016-04-18 Pedro Alves <palves@redhat.com>
1058
1059 * configure: Regenerate.
1060
45e3745e
AT
10612016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1062
1063 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1064 (aarch64_emit_sub): Likewise.
1065
2afc13ff
PA
10662016-04-12 Pedro Alves <palves@redhat.com>
1067
1068 * utils.c (prepare_to_throw_exception): Delete.
1069
6e774b13
SM
10702016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1073
4dca19f8
MK
10742016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1075
1076 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1077
d0a9981f
MK
10782016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1079
1080 * linux-aarch64-ipa.c: Add <elf.h> include.
1081 * linux-ppc-ipa.c: Add <elf.h> include.
1082 * linux-s390-ipa.c: Add <elf.h> include.
1083
252db07e
MK
10842016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1085
1086 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1087 (get_raw_reg_ptr): Likewise.
1088 (get_trace_state_variable_value_ptr): Likewise.
1089 (set_trace_state_variable_value_ptr): Likewise.
1090 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1091 char *.
1092
14e2b6d9
MK
10932016-03-31 Wei-cheng Wang <cole945@gmail.com>
1094 Marcin Kościelnicki <koriakin@0x04.net>
1095
1096 PR/17221
1097 * linux-ppc-low.c (emit_insns): New function.
1098 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1099 (ppc_emit_prologue): New function.
1100 (ppc_emit_epilogue): New function.
1101 (ppc_emit_add): New function.
1102 (ppc_emit_sub): New function.
1103 (ppc_emit_mul): New function.
1104 (ppc_emit_lsh): New function.
1105 (ppc_emit_rsh_signed): New function.
1106 (ppc_emit_rsh_unsigned): New function.
1107 (ppc_emit_ext): New function.
1108 (ppc_emit_zero_ext): New function.
1109 (ppc_emit_log_not): New function.
1110 (ppc_emit_bit_and): New function.
1111 (ppc_emit_bit_or): New function.
1112 (ppc_emit_bit_xor): New function.
1113 (ppc_emit_bit_not): New function.
1114 (ppc_emit_equal): New function.
1115 (ppc_emit_less_signed): New function.
1116 (ppc_emit_less_unsigned): New function.
1117 (ppc_emit_ref): New function.
1118 (ppc_emit_const): New function.
1119 (ppc_emit_reg): New function.
1120 (ppc_emit_pop): New function.
1121 (ppc_emit_stack_flush): New function.
1122 (ppc_emit_swap): New function.
1123 (ppc_emit_stack_adjust): New function.
1124 (ppc_emit_call): New function.
1125 (ppc_emit_int_call_1): New function.
1126 (ppc_emit_void_call_2): New function.
1127 (ppc_emit_if_goto): New function.
1128 (ppc_emit_goto): New function.
1129 (ppc_emit_eq_goto): New function.
1130 (ppc_emit_ne_goto): New function.
1131 (ppc_emit_lt_goto): New function.
1132 (ppc_emit_le_goto): New function.
1133 (ppc_emit_gt_goto): New function.
1134 (ppc_emit_ge_goto): New function.
1135 (ppc_write_goto_address): New function.
1136 (ppc_emit_ops_impl): New static variable.
1137 (ppc64v1_emit_prologue): New function.
1138 (ppc64v2_emit_prologue): New function.
1139 (ppc64_emit_epilogue): New function.
1140 (ppc64_emit_add): New function.
1141 (ppc64_emit_sub): New function.
1142 (ppc64_emit_mul): New function.
1143 (ppc64_emit_lsh): New function.
1144 (ppc64_emit_rsh_signed): New function.
1145 (ppc64_emit_rsh_unsigned): New function.
1146 (ppc64_emit_ext): New function.
1147 (ppc64_emit_zero_ext): New function.
1148 (ppc64_emit_log_not): New function.
1149 (ppc64_emit_bit_and): New function.
1150 (ppc64_emit_bit_or): New function.
1151 (ppc64_emit_bit_xor): New function.
1152 (ppc64_emit_bit_not): New function.
1153 (ppc64_emit_equal): New function.
1154 (ppc64_emit_less_signed): New function.
1155 (ppc64_emit_less_unsigned): New function.
1156 (ppc64_emit_ref): New function.
1157 (ppc64_emit_const): New function.
1158 (ppc64v1_emit_reg): New function.
1159 (ppc64v2_emit_reg): New function.
1160 (ppc64_emit_pop): New function.
1161 (ppc64_emit_stack_flush): New function.
1162 (ppc64_emit_swap): New function.
1163 (ppc64v1_emit_call): New function.
1164 (ppc64v2_emit_call): New function.
1165 (ppc64v1_emit_int_call_1): New function.
1166 (ppc64v2_emit_int_call_1): New function.
1167 (ppc64v1_emit_void_call_2): New function.
1168 (ppc64v2_emit_void_call_2): New function.
1169 (ppc64_emit_if_goto): New function.
1170 (ppc64_emit_eq_goto): New function.
1171 (ppc64_emit_ne_goto): New function.
1172 (ppc64_emit_lt_goto): New function.
1173 (ppc64_emit_le_goto): New function.
1174 (ppc64_emit_gt_goto): New function.
1175 (ppc64_emit_ge_goto): New function.
1176 (ppc64v1_emit_ops_impl): New static variable.
1177 (ppc64v2_emit_ops_impl): New static variable.
1178 (ppc_emit_ops): New function.
1179 (linux_low_target): Wire in ppc_emit_ops.
1180
a2174ba4
MK
11812016-03-31 Wei-cheng Wang <cole945@gmail.com>
1182 Marcin Kościelnicki <koriakin@0x04.net>
1183
1184 PR/17221
1185 * Makefile.in: Add powerpc-*-ipa.o
1186 * configure.srv: Add ipa_obj for powerpc*-linux.
1187 * linux-ppc-ipa.c: New file.
1188 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1189 includes.
1190 (PPC_FIELD): New macro.
1191 (PPC_SEXT): New macro.
1192 (PPC_OP6): New macro.
1193 (PPC_BO): New macro.
1194 (PPC_LI): New macro.
1195 (PPC_BD): New macro.
1196 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1197 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1198 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1199 (ppc_get_thread_area): New function.
1200 (is_elfv2_inferior): New function.
1201 (gen_ds_form): New function.
1202 (GEN_STD): New macro.
1203 (GEN_STDU): New macro.
1204 (GEN_LD): New macro.
1205 (GEN_LDU): New macro.
1206 (gen_d_form): New function.
1207 (GEN_ADDI): New macro.
1208 (GEN_ADDIS): New macro.
1209 (GEN_LI): New macro.
1210 (GEN_LIS): New macro.
1211 (GEN_ORI): New macro.
1212 (GEN_ORIS): New macro.
1213 (GEN_LWZ): New macro.
1214 (GEN_STW): New macro.
1215 (GEN_STWU): New macro.
1216 (gen_xfx_form): New function.
1217 (GEN_MFSPR): New macro.
1218 (GEN_MTSPR): New macro.
1219 (GEN_MFCR): New macro.
1220 (GEN_MTCR): New macro.
1221 (GEN_SYNC): New macro.
1222 (GEN_LWSYNC): New macro.
1223 (gen_x_form): New function.
1224 (GEN_OR): New macro.
1225 (GEN_MR): New macro.
1226 (GEN_LWARX): New macro.
1227 (GEN_STWCX): New macro.
1228 (GEN_CMPW): New macro.
1229 (gen_md_form): New function.
1230 (GEN_RLDICL): New macro.
1231 (GEN_RLDICR): New macro.
1232 (gen_i_form): New function.
1233 (GEN_B): New macro.
1234 (GEN_BL): New macro.
1235 (gen_b_form): New function.
1236 (GEN_BNE): New macro.
1237 (GEN_LOAD): New macro.
1238 (GEN_STORE): New macro.
1239 (gen_limm): New function.
1240 (gen_atomic_xchg): New function.
1241 (gen_call): New function.
1242 (ppc_relocate_instruction): New function.
1243 (ppc_install_fast_tracepoint_jump_pad): New function.
1244 (ppc_get_min_fast_tracepoint_insn_len): New function.
1245 (ppc_get_ipa_tdesc_idx): New function.
1246 (the_low_target): Wire in the new functions.
1247 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1248 tdescs.
1249 * linux-ppc-tdesc.h: New file.
1250
a13c4696
MK
12512016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1252
1253 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1254 (alloc_jump_pad_buffer): New function.
1255 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1256 (alloc_jump_pad_buffer): New function.
1257 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1258 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1259 (alloc_jump_pad_buffer): New function.
1260 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1261 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1262 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1263 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1264
1cda1512
MK
12652016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1266
1267 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1268 * linux-amd64-ipa.c: Likewise.
1269 * linux-i386-ipa.c: Likewise.
1270 * linux-s390-ipa.c: Likewise.
1271 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1272 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1273 set_trace_state_variable_value_ptr.
1274 (struct ipa_sym_addresses): Likewise.
1275 (symbol_list): Likewise.
1276 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1277 accessing gdb_collect directly.
1278 (gdb_collect_ptr_type): New typedef.
1279 (get_raw_reg_ptr_type): New typedef.
1280 (get_trace_state_variable_value_ptr_type): New typedef.
1281 (set_trace_state_variable_value_ptr_type): New typedef.
1282 (gdb_collect_ptr): New global.
1283 (get_raw_reg_ptr): New global.
1284 (get_trace_state_variable_value_ptr): New global.
1285 (set_trace_state_variable_value_ptr): New global.
1286 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1287 accessing get_raw_reg directly.
1288 (get_get_tsv_func_addr): Likewise for
1289 get_trace_state_variable_value_ptr.
1290 (get_set_tsv_func_addr): Likewise for
1291 set_trace_state_variable_value_ptr.
1292 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1293
72fb5488
SM
12942016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1297
28170b88
MK
12982016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1299
1300 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1301 packets.
1302 (relocate_instruction): Remove own_buf.
1303 * server.c (own_buf): Make global.
1304 (handle_v_requests): Make global.
1305 * server.h (own_buf): New declaration.
1306 (handle_v_requests): New prototype.
1307
f39e8743
MK
13082016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1309
1310 PR 18377
1311 * linux-s390-low.c (add_insns): New function.
1312 (s390_emit_prologue): New function.
1313 (s390_emit_epilogue): New function.
1314 (s390_emit_add): New function.
1315 (s390_emit_sub): New function.
1316 (s390_emit_mul): New function.
1317 (s390_emit_lsh): New function.
1318 (s390_emit_rsh_signed): New function.
1319 (s390_emit_rsh_unsigned): New function.
1320 (s390_emit_ext): New function.
1321 (s390_emit_log_not): New function.
1322 (s390_emit_bit_and): New function.
1323 (s390_emit_bit_or): New function.
1324 (s390_emit_bit_xor): New function.
1325 (s390_emit_bit_not): New function.
1326 (s390_emit_equal): New function.
1327 (s390_emit_less_signed): New function.
1328 (s390_emit_less_unsigned): New function.
1329 (s390_emit_ref): New function.
1330 (s390_emit_if_goto): New function.
1331 (s390_emit_goto): New function.
1332 (s390_write_goto_address): New function.
1333 (s390_emit_litpool): New function.
1334 (s390_emit_const): New function.
1335 (s390_emit_call): New function.
1336 (s390_emit_reg): New function.
1337 (s390_emit_pop): New function.
1338 (s390_emit_stack_flush): New function.
1339 (s390_emit_zero_ext): New function.
1340 (s390_emit_swap): New function.
1341 (s390_emit_stack_adjust): New function.
1342 (s390_emit_set_r2): New function.
1343 (s390_emit_int_call_1): New function.
1344 (s390_emit_void_call_2): New function.
1345 (s390_emit_eq_goto): New function.
1346 (s390_emit_ne_goto): New function.
1347 (s390_emit_lt_goto): New function.
1348 (s390_emit_le_goto): New function.
1349 (s390_emit_gt_goto): New function.
1350 (s390_emit_ge_goto): New function.
1351 (s390x_emit_prologue): New function.
1352 (s390x_emit_epilogue): New function.
1353 (s390x_emit_add): New function.
1354 (s390x_emit_sub): New function.
1355 (s390x_emit_mul): New function.
1356 (s390x_emit_lsh): New function.
1357 (s390x_emit_rsh_signed): New function.
1358 (s390x_emit_rsh_unsigned): New function.
1359 (s390x_emit_ext): New function.
1360 (s390x_emit_log_not): New function.
1361 (s390x_emit_bit_and): New function.
1362 (s390x_emit_bit_or): New function.
1363 (s390x_emit_bit_xor): New function.
1364 (s390x_emit_bit_not): New function.
1365 (s390x_emit_equal): New function.
1366 (s390x_emit_less_signed): New function.
1367 (s390x_emit_less_unsigned): New function.
1368 (s390x_emit_ref): New function.
1369 (s390x_emit_if_goto): New function.
1370 (s390x_emit_const): New function.
1371 (s390x_emit_call): New function.
1372 (s390x_emit_reg): New function.
1373 (s390x_emit_pop): New function.
1374 (s390x_emit_stack_flush): New function.
1375 (s390x_emit_zero_ext): New function.
1376 (s390x_emit_swap): New function.
1377 (s390x_emit_stack_adjust): New function.
1378 (s390x_emit_int_call_1): New function.
1379 (s390x_emit_void_call_2): New function.
1380 (s390x_emit_eq_goto): New function.
1381 (s390x_emit_ne_goto): New function.
1382 (s390x_emit_lt_goto): New function.
1383 (s390x_emit_le_goto): New function.
1384 (s390x_emit_gt_goto): New function.
1385 (s390x_emit_ge_goto): New function.
1386 (s390_emit_ops): New function.
1387 (struct linux_target_ops): Fill in emit_ops hook.
1388
abd9baf9
MK
13892016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1390
1391 PR 18377
1392 * Makefile.in: Add s390 IPA files.
1393 * configure.srv: Build IPA for s390.
1394 * linux-s390-ipa.c: New file.
1395 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1396 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1397 (tdesc_s390_linux32): Likewise.
1398 (init_registers_s390_linux32v1): Likewise.
1399 (tdesc_s390_linux32v1): Likewise.
1400 (init_registers_s390_linux32v2): Likewise.
1401 (tdesc_s390_linux32v2): Likewise.
1402 (init_registers_s390_linux64): Likewise.
1403 (tdesc_s390_linux64): Likewise.
1404 (init_registers_s390_linux64v1): Likewise.
1405 (tdesc_s390_linux64v1): Likewise.
1406 (init_registers_s390_linux64v2): Likewise.
1407 (tdesc_s390_linux64v2): Likewise.
1408 (init_registers_s390_te_linux64): Likewise.
1409 (tdesc_s390_te_linux64): Likewise.
1410 (init_registers_s390_vx_linux64): Likewise.
1411 (tdesc_s390_vx_linux64): Likewise.
1412 (init_registers_s390_tevx_linux64): Likewise.
1413 (tdesc_s390_tevx_linux64): Likewise.
1414 (init_registers_s390x_linux64): Likewise.
1415 (tdesc_s390x_linux64): Likewise.
1416 (init_registers_s390x_linux64v1): Likewise.
1417 (tdesc_s390x_linux64v1): Likewise.
1418 (init_registers_s390x_linux64v2): Likewise.
1419 (tdesc_s390x_linux64v2): Likewise.
1420 (init_registers_s390x_te_linux64): Likewise.
1421 (tdesc_s390x_te_linux64): Likewise.
1422 (init_registers_s390x_vx_linux64): Likewise.
1423 (tdesc_s390x_vx_linux64): Likewise.
1424 (init_registers_s390x_tevx_linux64): Likewise.
1425 (tdesc_s390x_tevx_linux64): Likewise.
1426 (have_hwcap_s390_vx): New static variable.
1427 (s390_arch_setup): Fill have_hwcap_s390_vx.
1428 (s390_get_thread_area): New function.
1429 (s390_ft_entry_gpr_esa): New const.
1430 (s390_ft_entry_gpr_zarch): New const.
1431 (s390_ft_entry_misc): New const.
1432 (s390_ft_entry_fr): New const.
1433 (s390_ft_entry_vr): New const.
1434 (s390_ft_main_31): New const.
1435 (s390_ft_main_64): New const.
1436 (s390_ft_exit_fr): New const.
1437 (s390_ft_exit_vr): New const.
1438 (s390_ft_exit_misc): New const.
1439 (s390_ft_exit_gpr_esa): New const.
1440 (s390_ft_exit_gpr_zarch): New const.
1441 (append_insns): New function.
1442 (s390_relocate_instruction): New function.
1443 (s390_install_fast_tracepoint_jump_pad): New function.
1444 (s390_get_min_fast_tracepoint_insn_len): New function.
1445 (s390_get_ipa_tdesc_idx): New function.
1446 (struct linux_target_ops): Wire in the above functions.
1447 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1448 * linux-s390-tdesc.h: New file.
1449
a4105d04
MK
14502016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1451
1452 * linux-s390-low.c (s390_supports_tracepoints): New function.
1453 (struct linux_target_ops): Fill supports_tracepoints hook.
1454
35ac8b3e
YQ
14552016-03-18 Yao Qi <yao.qi@linaro.org>
1456
1457 * linux-low.c (lwp_signal_can_be_delivered): New function.
1458 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1459
94610ec4
YQ
14602016-03-18 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1463 0 if signal is enqueued. Remove 'signal' from one debugging
1464 message. Move one debugging message to some lines below.
1465 Remove code setting 'signal' to 0.
1466
80aea927
YQ
14672016-03-18 Yao Qi <yao.qi@linaro.org>
1468
1469 * linux-low.c (linux_low_filter_event): Remove redundant
1470 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1471
b04fd3be
MK
14722016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1473
1474 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1475 (struct linux_target_ops): Wire in the above.
1476
c40c8d4b
YQ
14772016-03-03 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-low.c: Update comments to start_step_over.
1480
0f8288ae
YQ
14812016-03-03 Yao Qi <yao.qi@linaro.org>
1482
1483 PR server/19736
1484 * linux-low.c (handle_extended_wait): Set child suspended
1485 if event_lwp->bp_reinsert isn't zero.
1486
fdbd04a8
YQ
14872016-03-02 Yao Qi <yao.qi@linaro.org>
1488
1489 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1490 enqueue_pending_signal.
1491
6896a8fa
MK
14922016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1493
1494 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1495 is actually loaded.
1496
ab503087
MK
14972016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1498
1499 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1500 (s390_regmap_3264) [!__s390x__]: New global.
1501 (s390_collect_ptrace_register): Skip map entries containing -1.
1502 (s390_supply_ptrace_register): Ditto.
1503 (s390_fill_gprs_high): New function.
1504 (s390_store_gprs_high): New function.
1505 (s390_regsets): Add NT_S390_HIGH_GPRS.
1506 (s390_get_hwcap): Enable on 31-bit.
1507 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1508 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1509 Detect NT_S390_HIGH_GPRS.
1510 (s390_usrregs_info_3264): Enable on 31-bit.
1511 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1512 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1513
ae91f625
MK
15142016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1515
1516 PR gdb/13808
1517 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1518 * configure.srv: Ditto.
1519 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1520 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1521 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1522 (init_registers_amd64_linux): Remove prototype.
1523 (tdesc_amd64_linux): Remove declaration.
1524 (get_ipa_tdesc): New function.
1525 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1526 initialize remaining tdescs.
1527 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1528 (init_registers_i386_linux): Remove prototype.
1529 (tdesc_i386_linux): Remove declaration.
1530 (get_ipa_tdesc): New function.
1531 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1532 initialize remaining tdescs.
1533 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1534 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1535 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1536 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1537 (x86_get_ipa_tdesc_idx): New function.
1538 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1539 * linux-x86-tdesc.h: New file.
1540 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1541 (target_get_ipa_tdesc_idx): New macro.
1542 * tracepoint.c (ipa_tdesc_idx): New macro.
1543 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1544 (symbol_list): Add ipa_tdesc_idx.
1545 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1546 (ipa_tdesc): Remove.
1547 (ipa_tdesc_idx): New variable.
1548 (get_context_regcache): Use get_ipa_tdesc.
1549 (gdb_collect): Ditto.
1550 (gdb_probe): Ditto.
1551 * tracepoint.h (get_ipa_tdesc): New prototype.
1552 (ipa_tdesc): Remove.
1553
e7ad2f14
PA
15542016-02-24 Pedro Alves <palves@redhat.com>
1555
1556 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1557 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1558 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1559 Factor out common code between the USE_SIGTRAP_SIGINFO and
1560 !USE_SIGTRAP_SIGINFO blocks.
1561 (linux_low_filter_event): Call save_stop_reason instead of
1562 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1563 Update comments.
1564 (linux_wait_1): Update comments.
1565
657f9cde
WW
15662016-02-24 Wei-cheng Wang <cole945@gmail.com>
1567
1568 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1569 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1570 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1571 ppc_insert_point, ppc_remove_point.
1572
b00b61e1
MK
15732016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1574
1575 * linux-s390-low.c (s390_supports_z_point_type): New function.
1576 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1577
553cb527
YQ
15782016-02-16 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1581 PC. Get pc from regcache_read_pc.
1582
a5652c21
YQ
15832016-02-12 Yao Qi <yao.qi@linaro.org>
1584
1585 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1586 or linux_get_pc_32bit.
1587 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1588
ed443b61
YQ
15892016-02-12 Yao Qi <yao.qi@linaro.org>
1590
1591 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1592 arm_linux_get_next_pcs_fixup.
1593
020ecd38
MK
15942016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1595
1596 * tracepoint.c (x_tracepoint_action_download): Change
1597 write_inferior_data_ptr to write_inferior_data_pointer.
1598 (cmd_qtstart): Likewise.
1599 (write_inferior_data_ptr): Remove.
1600 (download_agent_expr): Change write_inferior_data_ptr to
1601 write_inferior_data_pointer.
1602 (download_tracepoint_1): Likewise.
1603 (download_tracepoint): Likewise.
1604 (download_trace_state_variables): Likewise.
1605
7cae9051
WW
16062016-02-11 Wei-cheng Wang <cole945@gmail.com>
1607 Marcin Kościelnicki <koriakin@0x04.net>
1608
1609 * tracepoint.c (struct tracepoint_action_ops): Remove.
1610 (struct tracepoint_action): Remove ops.
1611 (m_tracepoint_action_download, r_tracepoint_action_download)
1612 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1613 size and offset accordingly.
1614 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1615 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1616 (tracepoint_action_send, tracepoint_action_download): New functions.
1617 Helpers for trace action handlers.
1618 (add_tracepoint_action): Remove setup actions ops.
1619 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1620
9f6a71b4
YQ
16212016-02-10 Yao Qi <yao.qi@linaro.org>
1622
1623 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1624
1e94266c
SM
16252016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1628 to AC_OUTPUT.
1629 * configure: Regenerate.
1630
8adce034
SM
16312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1634 void * to gdb_byte *.
1635 * linux-low.c (siginfo_fixup): Likewise.
1636 (linux_xfer_siginfo): Likewise.
1637 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1638 Likewise.
1639 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1640
93813b37
WT
16412016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1642
1643 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1644 to srv_tgtobj.
1645 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1646 to srv_tgtobj.
1647 * linux-x86-low.c [__x86_64__]: Include
1648 "nat/amd64-linux-siginfo.h".
1649 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1650 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1651 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1652 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1653 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1654 (cpt_si_fd, si_timerid, si_overrun): Move from
1655 nat/amd64-linux-siginfo.c.
1656 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1657
8424cc97
SM
16582016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * server.c (skip_to_semicolon): Remove.
1661 (process_point_options): Use strchrnul instead of
1662 skip_to_semicolon.
1663
4d18591b
YQ
16642016-01-26 Yao Qi <yao.qi@linaro.org>
1665
1666 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1667 * linux-low.c (install_software_single_step_breakpoints): Don't
1668 call regcache_read_pc.
1669 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1670 argument pc.
1671
d8020970
YQ
16722016-01-26 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-low.c (install_software_single_step_breakpoints): Call
1675 regcache_read_pc instead of get_pc.
1676
8b207339
YQ
16772016-01-26 Yao Qi <yao.qi@linaro.org>
1678
1679 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1680 (unblock_async_io): Rename to ...
1681 (block_unblock_async_io): ... it. New function.
1682 (enable_async_io): Don't install SIGIO handler. Unblock it
1683 instead.
1684 (disable_async_io): Don't ignore SIGIO. Block it instead.
1685 (initialize_async_io): Install SIGIO handler. Don't call
1686 unblock_async_io.
1687
18879fef
YQ
16882016-01-26 Yao Qi <yao.qi@linaro.org>
1689
1690 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1691 first character is '\003', call *the_target->request_interrupt.
1692
a0f8e08a
YQ
16932016-01-25 Yao Qi <yao.qi@linaro.org>
1694
1695 * remote-utils.c (new_thread_notify): Remove.
1696 (dead_thread_notify): Likewise.
1697 * remote-utils.h (new_thread_notify): Remove declaration.
1698 (dead_thread_notify): Likewise.
1699
cc5fd9ab
MK
17002016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1701
1702 * gdb.trace/pending.exp: Fix expected message on continue.
1703
99e8eb11
MK
17042016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1705
1706 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1707 it works properly on big-endian machines where sizeof (CORE_ADDR)
1708 != sizeof (void *).
1709
a994041d
PA
17102016-01-21 Pedro Alves <palves@redhat.com>
1711
1712 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1713 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1714 * configure: Regenerate.
1715
f7a6a40d
YQ
17162016-01-21 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1719 is_thumb and set it according to CPSR saved on the stack.
1720 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1721 arm_sigreturn_next_pc.
1722
6f69e520
YQ
17232016-01-18 Yao Qi <yao.qi@linaro.org>
1724
1725 * linux-low.c (linux_set_pc_64bit): New function.
1726 (linux_get_pc_64bit): New function.
1727 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1728 Declare.
1729 * linux-sparc-low.c (debug_threads): Remove declaration.
1730 (sparc_get_pc): Remove.
1731 (the_low_target): Use linux_get_pc_64bit instead of
1732 sparc_get_pc.
1733 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1734 (the_low_target): Use linux_get_pc_64bit and
1735 linux_set_pc_64bit.
1736
276d4552
YQ
17372016-01-18 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-arm-low.c (debug_threads): Remove declaration.
1740 (arm_get_pc, arm_set_pc): Remove.
1741 (the_low_target): Use linux_get_pc_32bit and
1742 linux_set_pc_32bit.
1743 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1744 (the_low_target): Use linux_get_pc_32bit and
1745 linux_set_pc_32bit.
1746 * linux-cris-low.c (debug_threads): Remove declaration.
1747 (cris_get_pc, cris_set_pc,): Remove.
1748 (the_low_target): Use linux_get_pc_32bit and
1749 linux_set_pc_32bit.
1750 * linux-crisv32-low.c (debug_threads): Remove declaration.
1751 (cris_get_pc, cris_set_pc): Remove.
1752 (the_low_target): Use linux_get_pc_32bit and
1753 linux_set_pc_32bit.
1754 * linux-low.c: Include inttypes.h.
1755 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1756 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1757 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1758 (the_low_target): Use linux_get_pc_32bit and
1759 linux_set_pc_32bit.
1760 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1761 (the_low_target): Use linux_get_pc_32bit and
1762 linux_set_pc_32bit.
1763 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1764 (the_low_target): Use linux_get_pc_32bit and
1765 linux_set_pc_32bit.
1766 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1767 (the_low_target): Use linux_get_pc_32bit and
1768 linux_set_pc_32bit.
1769 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1770 (the_low_target): Use linux_get_pc_32bit and
1771 linux_set_pc_32bit.
1772
eb0edac8
GB
17732016-01-18 Gary Benson <gbenson@redhat.com>
1774
1775 * configure.ac (AC_FUNC_FORK): New check.
1776 * config.in: Regenerate.
1777 * configure: Likewise.
1778
1b451dda
YQ
17792016-01-14 Yao Qi <yao.qi@linaro.org>
1780
1781 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1782 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1783 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1784 arm_get_next_pcs_ctor.
1785
82075af2
JS
17862016-01-12 Josh Stone <jistone@redhat.com>
1787 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1788
1789 * inferiors.h: Include "gdb_vecs.h".
1790 (struct process_info): Add syscalls_to_catch.
1791 * inferiors.c (remove_process): Free syscalls_to_catch.
1792 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1793 syscall_return stops.
1794 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1795 * server.c (handle_general_set): Handle QCatchSyscalls.
1796 (handle_query): Report support for QCatchSyscalls.
1797 * target.h (struct target_ops): Add supports_catch_syscall.
1798 (target_supports_catch_syscall): New macro.
1799 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1800 (struct lwp_info): Add syscall_state.
1801 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1802 Maintain syscall_state and syscalls_to_catch across exec.
1803 (get_syscall_trapinfo): New function, proxy to the_low_target.
1804 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1805 (linux_low_filter_event): Toggle syscall_state entry/return for
1806 syscall traps, and set it ignored for all others.
1807 (gdb_catching_syscalls_p): New function.
1808 (gdb_catch_this_syscall_p): New function.
1809 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1810 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1811 (linux_supports_catch_syscall): New function.
1812 (linux_target_ops): Install it.
1813 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1814 (the_low_target): Install it.
1815
8f13a3ce
MF
18162016-01-12 Mike Frysinger <vapier@gentoo.org>
1817
1818 * acinclude.m4: Include new ../warning.m4 file.
1819 * configure: Regenerated.
1820 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1821
5b3da067
MF
18222016-01-12 Mike Frysinger <vapier@gentoo.org>
1823
1824 * ax.c (is_goto_target): Mark static.
1825 * linux-low.c (register_addr): Likewise.
1826 (linux_fetch_registers, linux_store_registers): Likewise.
1827 * mem-break.c (any_persistent_commands): Fix old prototype.
1828 (add_commands_to_breakpoint): Mark static.
1829 * regcache.c (find_register_by_name): Delete unused func.
1830 * remote-utils.c (hex_or_minus_one): Mark static.
1831 * server.c (monitor_show_help): Mark static.
1832 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1833 handle_v_requests): Likewise.
1834
bc504a31
PA
18352016-01-12 Pedro Alves <palves@redhat.com>
1836
1837 Remove use of the registered trademark symbol throughout.
1838
5a0dd67a
YQ
18392016-01-08 Yao Qi <yao.qi@linaro.org>
1840
1841 * remote-utils.c (getpkt): If c is '\003', call target hook
1842 request_interrupt.
1843
b2ca446f
YQ
18442016-01-06 Yao Qi <yao.qi@linaro.org>
1845
1846 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1847 linux-aarch32-low.c.
1848 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1849 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1850 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1851 (thumb2_breakpoint): Declare.
1852 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1853 linux-aarch32-low.h.
1854 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1855 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1856 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1857
edd88788
JB
18582016-01-01 Joel Brobecker <brobecker@adacore.com>
1859
1860 * gdbreplay.c (gdbreplay_version): Change copyright year in
1861 version message.
1862 * server.c (gdbserver_version): Likewise.
1863
65da7f14
PP
18642015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1865
1866 * server.c (crc32_table): Delete.
1867 (crc32): Use libiberty's xcrc32 function.
1868
4abd5ed2
JB
18692015-12-22 Joel Brobecker <brobecker@adacore.com>
1870
1871 * lynx-low.c (lynx_delete_thread_callback): New function.
1872 (lynx_mourn): Properly delete our process and all of its
1873 threads. Remove call to clear_inferiors.
1874
0e50fe5c
JB
18752015-12-22 Joel Brobecker <brobecker@adacore.com>
1876
1877 * target.c (thread_search_callback): Add check that
1878 the thread_stopped target callback is not NULL before
1879 calling it.
1880
35adc03f
YQ
18812015-12-21 Yao Qi <yao.qi@linaro.org>
1882
1883 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1884 arm breakpoint.
1885
bd2b2909
AT
18862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1887
1888 * server.c (handle_query): Call target_supports_software_single_step.
1889
7fe5e27e
AT
18902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1891
1892 * linux-low.c (single_step): New function.
1893 (linux_resume_one_lwp_throw): Call single_step.
1894 (start_step_over): Likewise.
1895
d9311bfa
AT
18962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1897
1898 * Makefile.in (SFILES): Append arch/arm-linux.c,
1899 arch/arm-get-next-pcs.c.
1900 (arm-linux.o): New rule.
1901 (arm-get-next-pcs.o): New rule.
1902 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1903 arm-linux.o.
1904 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1905 to linux-aarch32-low.c.
1906 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1907 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1908 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1909 (thumb2_breakpoint_len): Likewise.
1910 (arm_is_thumb_mode): Make non-static.
1911 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1912 from linux-aarch32-low.c.
1913 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1914 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1915 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1916 (thumb2_breakpoint_len): Likewise.
1917 (arm_is_thumb_mode): New declaration.
1918 * linux-arm-low.c: Include arch/arm-linux.h
1919 aarch/arm-get-next-pcs.h, sys/syscall.h.
1920 (get_next_pcs_ops): New struct.
1921 (get_next_pcs_addr_bits_remove): New function.
1922 (get_next_pcs_is_thumb): New function.
1923 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1924 (arm_sigreturn_next_pc): Likewise.
1925 (get_next_pcs_syscall_next_pc): Likewise.
1926 (arm_gdbserver_get_next_pcs): Likewise.
1927 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1928 Initialize.
1929 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1930 * server.h: Include gdb_vecs.h.
1931
68ce2059
AT
19322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1933
1934 * Makefile.in (SFILES): Append common/common-regcache.c.
1935 (OBS): Append common-regcache.o.
1936 (common-regcache.o): New rule.
1937 * regcache.c (init_register_cache): Initialize cache to
1938 REG_UNAVAILABLE.
1939 (regcache_raw_read_unsigned): New function.
1940 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1941 register_status enum.
1942
fa5308bd
AT
19432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1944
1945 * linux-aarch64-low.c (the_low_targets): Rename
1946 breakpoint_reinsert_addr to get_next_pcs.
1947 * linux-arm-low.c (the_low_targets): Likewise.
1948 * linux-bfin-low.c (the_low_targets): Likewise.
1949 * linux-cris-low.c (the_low_targets): Likewise.
1950 * linux-crisv32-low.c (the_low_targets): Likewise.
1951 * linux-low.c (can_software_single_step): Likewise.
1952 (install_software_single_step_breakpoints): New function.
1953 (start_step_over): Use install_software_single_step_breakpoints.
1954 * linux-low.h: New CORE_ADDR vector.
1955 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1956 get_next_pcs.
1957 * linux-mips-low.c (the_low_targets): Likewise.
1958 * linux-nios2-low.c (the_low_targets): Likewise.
1959 * linux-sparc-low.c (the_low_targets): Likewise.
1960
4a6ed09b
PA
19612015-12-17 Pedro Alves <palves@redhat.com>
1962
1963 * linux-low.c (linux_kill_one_lwp): Remove references to
1964 LinuxThreads.
1965 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1966 to 'kill'.
1967 (linux_init_signals): Delete.
1968 (initialize_low): Adjust.
1969 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1970
7544db95
PA
19712015-12-16 Pedro Alves <palves@redhat.com>
1972
1973 * configure.ac (compiler warning flags): When testing a
1974 -Wno-foo option, check whether -Wfoo works instead.
1975 * configure: Regenerate.
1976
8020350c
DB
19772015-12-11 Don Breazeal <donb@codesourcery.com>
1978
1979 * server.c (process_serial_event): Don't exit from gdbserver
1980 in remote mode if there are still active inferiors.
1981
db91f502
YQ
19822015-12-11 Yao Qi <yao.qi@linaro.org>
1983
1984 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1985 arm_breakpoint_at if the process is 32-bit.
1986
b37a6290
YQ
19872015-12-11 Yao Qi <yao.qi@linaro.org>
1988
1989 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1990 arm breakpoint.
1991
17b1509a
YQ
19922015-12-07 Yao Qi <yao.qi@linaro.org>
1993
1994 * configure.srv: Append arm.o to srv_tgtobj for
1995 aarch64*-*-linux* target.
1996 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1997 from linux-arm-low.c.
1998 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1999 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2000 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2001 (thumb2_breakpoint_len): Likewise.
2002 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2003 (arm_breakpoint_kinds): Likewise.
2004 (arm_breakpoint_kind_from_pc): Likewise.
2005 (arm_sw_breakpoint_from_kind): Likewise.
2006 (arm_breakpoint_kind_from_current_state): Likewise.
2007 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2008 (arm_sw_breakpoint_from_kind): Declare.
2009 (arm_breakpoint_kind_from_current_state): Declare.
2010 (arm_breakpoint_at): Declare.
2011 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2012 arm_sw_breakpoint_from_kind if process is 32-bit.
2013 (aarch64_breakpoint_kind_from_pc): New function.
2014 (aarch64_breakpoint_kind_from_current_state): New function.
2015 (the_low_target): Initialize fields breakpoint_kind_from_pc
2016 and breakpoint_kind_from_current_state.
2017 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2018 linux-aarch32-low.c.
2019 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2020 (arm_breakpoint, arm_breakpoint_len): Likewise.
2021 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2022 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2023 (arm_is_thumb_mode): Likewise.
2024 (arm_breakpoint_at): Likewise.
2025 (arm_breakpoint_kind_from_pc): Likewise.
2026 (arm_sw_breakpoint_from_kind): Likewise.
2027 (arm_breakpoint_kind_from_current_state): Likewise.
2028
2029 Revert:
2030 2015-08-04 Yao Qi <yao.qi@linaro.org>
2031
2032 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2033 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2034 * server.c (extended_protocol): Remove "static".
2035 * server.h (extended_protocol): Declare it.
2036
ece66d65
JS
20372015-12-04 Josh Stone <jistone@redhat.com>
2038
2039 * target.h (struct target_ops) <arch_setup>: Rename to ...
2040 (struct target_ops) <post_create_inferior>: ... this.
2041 (target_arch_setup): Rename to ...
2042 (target_post_create_inferior): ... this, calling post_create_inferior.
2043 * server.c (start_inferior): Update target_arch_setup calls to
2044 target_post_create_inferior.
2045 * linux-low.c (linux_low_ptrace_options): Forward declare.
2046 (linux_arch_setup): Update its comment for general use.
2047 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2048 (struct linux_target_ops): Use linux_post_create_inferior.
2049 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2050 to post_create_inferior.
2051 * nto-low.c (struct nto_target_ops): Likewise.
2052 * spu-low.c (struct spu_target_ops): Likewise.
2053 * win32-low.c (struct win32_target_ops): Likewise.
2054
e58c48b4
AT
20552015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2056
2057 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2058
fbec8956
AT
20592015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2060
2061 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2062 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2063 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2064 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2065 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2066 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2067 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2068 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2069 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2070 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2071 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2072 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2073
9b4c5f87
AT
20742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2075
2076 * linux-low.c (linux_look_up_symbols): Don't call
2077 linux_supports_traceclone.
2078 * linux-low.h (thread_db_init): Remove use_events argument.
2079 * thread-db.c (thread_db_use_event): Remove global variable.
2080 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2081 (struct thread_db) <td_create_bp>: Remove field.
2082 (thread_db_create_event): Remove function.
2083 (thread_db_enable_reporting): Likewise.
2084 (find_one_thread): Don't check for thread_db_use_events.
2085 (attach_thread): Likewise.
2086 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2087 (try_thread_db_load_1): Don't check for thread_db_use_events.
2088 (thread_db_init): Remove use_events argument and thread events
2089 handling.
2090 (remove_thread_event_breakpoints): Remove function.
2091 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2092
7d00775e
AT
20932015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2094
2095 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2096 New function.
2097 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2098 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2099 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2100 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2101 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2102 Initialize.
2103 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2104 New function.
2105 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2106 * linux-low.c (can_hardware_single_step): Use
2107 supports_hardware_single_step.
2108 (can_software_single_step): New function.
2109 (start_step_over): Call can_software_single_step.
2110 (linux_supports_hardware_single_step): New function.
2111 (struct target_ops) <supports_software_single_step>: Initialize.
2112 * linux-low.h (struct linux_target_ops)
2113 <supports_hardware_single_step>: Initialize.
2114 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2115 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2116 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2117 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2118 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2119 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2120 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2121 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2122 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2123 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2124 Initialize.
2125 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2126 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2127 Initialize.
2128 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2130 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2131 New function.
2132 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2133 * target.h (struct target_ops): <supports_software_single_step>:
2134 New field.
2135 (target_supports_software_single_step): New macro.
2136
2d97cd35
AT
21372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2138
2139 * linux-low.c (linux_wait_1): Fix pc advance condition.
2140 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2141 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2142
769ef81f
AT
21432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2144
2145 * linux-arm-low.c (arm_is_thumb_mode): New function.
2146 (arm_breakpoint_at): Use arm_is_thumb_mode.
2147 (arm_breakpoint_kind_from_current_state): New function.
2148 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2149 Initialize.
2150 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2151 (linux_breakpoint_kind_from_current_state): New function.
2152 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2153 * linux-low.h (struct linux_target_ops)
2154 <breakpoint_kind_from_current_state>: New field.
2155 * target.h (struct target_ops): Likewise.
2156 (target_breakpoint_kind_from_current_state): New macro.
2157
1bebeeca
PA
21582015-11-30 Pedro Alves <palves@redhat.com>
2159
2160 * linux-low.c (linux_resume): Wake up the event loop before
2161 returning.
2162
a67a9fae
PA
21632015-11-30 Pedro Alves <palves@redhat.com>
2164
2165 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2166 check.
2167 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2168 to -1.
2169 * target.c (struct thread_search): New structure.
2170 (thread_search_callback): New function.
2171 (prev_general_thread): New global.
2172 (prepare_to_access_memory, done_accessing_memory): New functions.
2173 * target.h (prepare_to_access_memory, done_accessing_memory):
2174 Replace macros with function declarations.
2175
f2faf941
PA
21762015-11-30 Pedro Alves <palves@redhat.com>
2177
2178 PR 14618
2179 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2180 report TARGET_WAITKIND_NO_RESUMED.
2181 * remote-utils.c (prepare_resume_reply): Handle
2182 TARGET_WAITKIND_NO_RESUMED.
2183 * server.c (report_no_resumed): New global.
2184 (handle_query) <qSupported>: Handle "no-resumed+". Report
2185 "no-resumed+" support.
2186 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2187 return error if the client doesn't support no-resumed events.
2188 (push_stop_notification): New function.
2189 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2190 events if the client supports them.
2191
a681f9c9
PA
21922015-11-30 Pedro Alves <palves@redhat.com>
2193
2194 * linux-low.c (thread_still_has_status_pending_p): Don't check
2195 vCont;t here.
2196 (lwp_resumed): New function.
2197 (status_pending_p_callback): Return early if the LWP is not
2198 supposed to be resumed.
2199
65706a29
PA
22002015-11-30 Pedro Alves <palves@redhat.com>
2201
2202 * linux-low.c (handle_extended_wait): Assert that the LWP's
2203 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2204 thread create events, leave the new child's status pending.
2205 (linux_low_filter_event): If GDB wants to hear about thread exit
2206 events, leave the LWP marked dead and don't delete it.
2207 (linux_wait_for_event_filtered): Don't check for thread exit.
2208 (filter_exit_event): New function.
2209 (linux_wait_1): Use it, when returning an exit event.
2210 (linux_resume_one_lwp_throw): Assert that the LWP's
2211 waitstatus is TARGET_WAITKIND_IGNORE.
2212 * remote-utils.c (prepare_resume_reply): Handle
2213 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2214 * server.c (report_thread_events): New global.
2215 (handle_general_set): Handle QThreadEvents.
2216 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2217 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2218 TARGET_WAITKIND_THREAD_EXITED.
2219 * server.h (report_thread_events): Declare.
2220
56cf4bed
PA
22212015-11-30 Pedro Alves <palves@redhat.com>
2222
2223 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2224 the thread's last_resume_kind was resume_stop.
2225
500c1d85
PA
22262015-11-30 Pedro Alves <palves@redhat.com>
2227
2228 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2229 before returning.
2230
de979965
PA
22312015-11-30 Pedro Alves <palves@redhat.com>
2232
2233 * server.c (handle_v_requests): Handle vCtrlC.
2234
34c65914
PA
22352015-11-30 Pedro Alves <palves@redhat.com>
2236
2237 * gdbthread.h (find_any_thread_of_pid): Declare.
2238 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2239 functions.
2240 * server.c (handle_query): If current_thread is NULL, look for
2241 another thread of the selected process.
2242
79efa585 22432015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2244 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2245
2246 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2247 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2248 name in reply.
2249 * target.h (struct target_ops) <thread_name>: New field.
2250 (target_thread_name): New macro.
2251
80d82c19
JB
22522015-11-23 Joel Brobecker <brobecker@adacore.com>
2253
2254 * regcache.h (regcache_invalidate_pid): Add declaration.
2255 * regcache.c (regcache_invalidate_pid): New function, extracted
2256 from regcache_invalidate.
2257 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2258 Add trivial documentation comment.
2259 * lynx-low.c: Use regcache_invalidate_pid instead of
2260 regcache_invalidate.
2261
64da5dd5
JB
22622015-11-23 Joel Brobecker <brobecker@adacore.com>
2263
2264 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2265 and Elf64_auxv_t if the target is Android.
2266
37ce4055
DE
22672015-11-22 Doug Evans <xdje42@gmail.com>
2268
2269 * target.h: #include <sys/types.h>.
2270
06e03fff
PA
22712015-11-19 Pedro Alves <palves@redhat.com>
2272
2273 * linux-low.c (linux_process_qsupported): Change prototype.
2274 Adjust.
2275 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2276 Change prototype.
2277 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2278 and adjust to loop over all features.
2279 * server.c (handle_query) <qSupported>: Adjust to call
2280 target_process_qsupported once, passing it a vector of unprocessed
2281 features.
2282 * target.h (struct target_ops) <process_qsupported>: Change
2283 prototype.
2284 (target_process_qsupported): Adjust.
2285
9a084706
PA
22862015-11-19 Pedro Alves <palves@redhat.com>
2287
2288 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2289 mode.
2290 * configure: Regenerate.
2291
dad44a1f
PA
22922015-11-19 Pedro Alves <palves@redhat.com>
2293
2294 * configure: Regenerate.
2295
231c0592
YQ
22962015-11-19 Yao Qi <yao.qi@linaro.org>
2297
2298 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2299 type to uint32_t.
2300
6c1c9a8b
YQ
23012015-11-19 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2304 (struct aarch64_operand): Move enum out.
2305
9caa3311
YQ
23062015-11-19 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2309 struct user_fpsimd_state *.
2310 (aarch64_store_fpregset): Likewise.
2311
6a69a054
YQ
23122015-11-19 Yao Qi <yao.qi@linaro.org>
2313
2314 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2315 struct user_pt_regs *.
2316 (aarch64_store_gregset): Likewise.
2317
1798301e
PA
23182015-11-18 Pedro Alves <palves@redhat.com>
2319
2320 * Makefile.in (all_object_files): Add $IPA_OBJS.
2321
ce7715e2
PA
23222015-11-17 Pedro Alves <palves@redhat.com>
2323
2324 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2325 GDB_SIGNAL_0 and gdb_signal_to_string.
2326
c0879059
PA
23272015-11-17 Pedro Alves <palves@redhat.com>
2328
2329 * win32-low.c (handle_output_debug_string): Remove parameter.
2330 (win32_kill): Remove our_status local and adjust call to
2331 handle_output_debug_string.
2332 (get_child_debug_event): Adjust call to
2333 handle_output_debug_string.
2334
1996e237
SM
23352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2336
2337 * linux-mips-low.c (mips_fill_gregset): Add cast.
2338 (mips_store_gregset): Likewise.
2339 (mips_fill_fpregset): Likewise.
2340 (mips_store_fpregset): Likewise.
2341
cbec665b
SM
23422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2343
2344 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2345 priv.
2346
eb3e3c67
SM
23472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2348
2349 * linux-mips-low.c (mips_linux_new_thread): Change type of
2350 watch_type to enum target_hw_bp_type.
2351
171de4b8
SM
23522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2353
2354 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2355 Change return type to arm_hwbp_type.
2356
04248ead
SM
23572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2358
2359 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2360 (arm_store_gregset): Likewise.
2361 * linux-arm-low.c (arm_get_hwcap): Likewise.
2362 (arm_read_description): Likewise.
2363
04b3479c
SM
23642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2365
2366 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2367
2bc84e8a
SM
23682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2369
2370 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2371 (ppc_fill_vsxregset): Likewise.
2372 (ppc_store_vsxregset): Likewise.
2373 (ppc_fill_vrregset): Likewise.
2374 (ppc_store_vrregset): Likewise.
2375 (ppc_fill_evrregset): Likewise.
2376 (ppc_store_evrregset): Likewise.
2377
e6c5bb05
SM
23782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2379
2380 * linux-ppc-low.c (ppc_usrregs_info): Remove
2381 forward-declaration.
2382 (ppc_arch_setup): Move lower in file.
2383
7ea45d72
SM
23842015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2385
2386 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2387 (ps_pdwrite): Likewise.
2388
69291610
HW
23892015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2390
2391 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2392 to after assert checks.
2393
b42945fd
SM
23942015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2395
2396 * proc-service.c (ps_pdread): Add/adjust casts.
2397 (ps_pdwrite): Add/adjust casts.
2398
d6f85c84
SM
23992015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2400
2401 * server.c (handle_search_memory_1): Cast return value of
2402 memmem.
2403
f98cd059
SM
24042015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2405
2406 * server.c (write_qxfer_response): Change type of data to
2407 gdb_byte *.
2408
d2412fa5
PA
24092015-10-29 Pedro Alves <palves@redhat.com>
2410
2411 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2412
c17414a2
PA
24132015-10-29 Pedro Alves <palves@redhat.com>
2414
2415 * tracepoint.c (clear_installed_tracepoints): Add casts.
2416
e053fbc4
PA
24172015-10-29 Pedro Alves <palves@redhat.com>
2418
2419 * server.c (handle_v_cont, process_serial_event): Add enum
2420 gdb_signal casts to signal parsing code.
2421
add67df8
PA
24222015-10-29 Pedro Alves <palves@redhat.com>
2423
2424 * linux-low.h (NULL_REGSET): Define.
2425 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2426 * linux-arm-low.c (arm_regsets): Likewise.
2427 * linux-crisv32-low.c (cris_regsets): Likewise.
2428 * linux-m68k-low.c (m68k_regsets): Likewise.
2429 * linux-mips-low.c (mips_regsets): Likewise.
2430 * linux-nios2-low.c (nios2_regsets): Likewise.
2431 * linux-ppc-low.c (ppc_regsets): Likewise.
2432 * linux-s390-low.c (s390_regsets): Likewise.
2433 * linux-sh-low.c (sh_regsets): Likewise.
2434 * linux-sparc-low.c (sparc_regsets): Likewise.
2435 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2436 * linux-tile-low.c (tile_regsets): Likewise.
2437 * linux-x86-low.c (x86_regsets): Likewise.
2438 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2439
50bc912a
PA
24402015-10-29 Pedro Alves <palves@redhat.com>
2441
2442 * linux-low.h (NULL_REGSET): Define.
2443 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2444 * linux-arm-low.c (arm_regsets): Likewise.
2445 * linux-crisv32-low.c (cris_regsets): Likewise.
2446 * linux-m68k-low.c (m68k_regsets): Likewise.
2447 * linux-mips-low.c (mips_regsets): Likewise.
2448 * linux-nios2-low.c (nios2_regsets): Likewise.
2449 * linux-ppc-low.c (ppc_regsets): Likewise.
2450 * linux-s390-low.c (s390_regsets): Likewise.
2451 * linux-sh-low.c (sh_regsets): Likewise.
2452 * linux-sparc-low.c (sparc_regsets): Likewise.
2453 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2454 * linux-tile-low.c (tile_regsets): Likewise.
2455 * linux-x86-low.c (x86_regsets): Likewise.
2456 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2457
682b2546
DE
24582015-10-26 Doug Evans <dje@google.com>
2459
2460 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2461
963843d4
DE
24622015-10-26 Doug Evans <dje@google.com>
2463
2464 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2465
d41401ac
DE
24662015-10-26 Doug Evans <dje@google.com>
2467
2468 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2469 for debug_printf.
2470 (attach_thread, find_new_threads_callback): Ditto.
2471
3db28855
AT
24722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2473
2474 * mem-break.h (set_breakpoint_data): Remove.
2475
fb78e89c
AT
24762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2477
2478 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2479 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2480 (initialize_low): Remove set_breakpoint_data call.
2481 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2482 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2483 (initialize_low): Remove set_breakpoint_data call.
2484 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2485 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2486 (initialize_low): Remove set_breakpoint_data call.
2487
2e6ee069
AT
24882015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2489
2490 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2491 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2492 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2493 * target.h (target_breakpoint_kind_from_pc): New macro.
2494
1652a986
AT
24952015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2496
2497 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2498 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2499 the default breakpoint kind.
2500
abeead09
AT
25012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2502
2503 * linux-arm-low.c (arm_supports_z_point_type): Add software
2504 breakpoint support.
2505
b0b4b501
AT
25062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2507
2508 * linux-arm-low.c: Refactor breakpoint definitions.
2509 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2510 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2511
8689682c
AT
25122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2513
2514 * Makefile.in: Add arm.c/o.
2515 * configure.srv: Likewise.
2516 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2517 (arm_breakpoint_kind_from_pc): New function.
2518 (arm_sw_breakpoint_from_kind): Return proper kind.
2519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2520
27165294
AT
25212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2522
2523 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2524 removal.
2525 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2526 (struct raw_breakpoint) <size>: Remove.
2527 (struct raw_breakpoint) <kind>: Add.
2528 (bp_size): New function.
2529 (bp_opcode): Likewise.
2530 (find_raw_breakpoint_at): Adjust for kind.
2531 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2532 (remove_memory_breakpoint): Adjust for kind call bp_size.
2533 (set_raw_breakpoint_at): Adjust for kind.
2534 (set_breakpoint): Likewise.
2535 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2536 (delete_raw_breakpoint): Adjust for kind.
2537 (delete_breakpoint): Likewise.
2538 (find_gdb_breakpoint): Likewise.
2539 (set_gdb_breakpoint_1): Likewise.
2540 (set_gdb_breakpoint): Likewise.
2541 (delete_gdb_breakpoint_1): Likewise.
2542 (delete_gdb_breakpoint): Likewise.
2543 (uninsert_raw_breakpoint): Likewise.
2544 (reinsert_raw_breakpoint): Likewise.
2545 (set_breakpoint_data): Remove.
2546 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2547 (check_mem_read): Adjust for kind call bp_size.
2548 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2549 (clone_one_breakpoint): Adjust for kind.
2550 * mem-break.h (set_gdb_breakpoint): Likewise.
2551 (delete_gdb_breakpoint): Likewise.
2552 * server.c (process_serial_event): Likewise.
2553
dd373349
AT
25542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2555
2556 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2562 (arm_sw_breakpoint_from_kind): New function.
2563 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2564 (struct linux_target_ops) <breakpoint>: Remove.
2565 (struct linux_target_ops) <breakpoint_len>: Remove.
2566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2568 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2569 (struct linux_target_ops) <breakpoint>: Remove.
2570 (struct linux_target_ops) <breakpoint_len>: Remove.
2571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2573 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2574 (struct linux_target_ops) <breakpoint>: Remove.
2575 (struct linux_target_ops) <breakpoint_len>: Remove.
2576 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2577 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2578 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2579 and sw_breakpoint_from_kind to increment the pc.
2580 (linux_breakpoint_kind_from_pc): New function.
2581 (linux_sw_breakpoint_from_kind): New function.
2582 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2583 (initialize_low): Call breakpoint_kind_from_pc and
2584 sw_breakpoint_from_kind to replace breakpoint_data/len.
2585 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2586 New field.
2587 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2588 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2589 (struct linux_target_ops) <breakpoint>: Remove.
2590 (struct linux_target_ops) <breakpoint_len>: Remove.
2591 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2592 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2593 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2594 (struct linux_target_ops) <breakpoint>: Remove.
2595 (struct linux_target_ops) <breakpoint_len>: Remove.
2596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2598 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2599 (struct linux_target_ops) <breakpoint>: Remove.
2600 (struct linux_target_ops) <breakpoint_len>: Remove.
2601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2603 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2604 (struct linux_target_ops) <breakpoint>: Remove.
2605 (struct linux_target_ops) <breakpoint_len>: Remove.
2606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2608 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2609 (struct linux_target_ops) <breakpoint>: Remove.
2610 (struct linux_target_ops) <breakpoint_len>: Remove.
2611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2613 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2614 (struct linux_target_ops) <breakpoint>: Remove.
2615 (struct linux_target_ops) <breakpoint_len>: Remove.
2616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2618 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2619 (struct linux_target_ops) <breakpoint>: Remove.
2620 (struct linux_target_ops) <breakpoint_len>: Remove.
2621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2623 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2624 (struct linux_target_ops) <breakpoint>: Remove.
2625 (struct linux_target_ops) <breakpoint_len>: Remove.
2626 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2627 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2628 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2629 (struct linux_target_ops) <breakpoint>: Remove.
2630 (struct linux_target_ops) <breakpoint_len>: Remove.
2631 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2633 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2634 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2635 (struct linux_target_ops) <breakpoint>: Remove.
2636 (struct linux_target_ops) <breakpoint_len>: Remove.
2637 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2638 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2639 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2640 (struct linux_target_ops) <breakpoint>: Remove.
2641 (struct linux_target_ops) <breakpoint_len>: Remove.
2642 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2643 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2644
4cd98a19
AT
26452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2646
2647 * linux-cris-low.c (cris_get_pc): Remove void arg.
2648
774ee6d2
AR
26492015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2650
2651 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2652 variable name.
2653
833dcd29
AR
26542015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2655
2656 * inferiors.c (thread_pid_matches_callback): New function.
2657 (find_thread_process): New function.
2658 (remove_thread): Reset current_thread.
2659 (remove_process): Assert threads have been removed first.
2660
8d689ee5
YQ
26612015-10-15 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2664 if it is 3.
2665 (aarch64_remove_point): Likewise.
2666 * regcache.c (regcache_register_size): New function.
2667
1c2e1515
YQ
26682015-10-12 Yao Qi <yao.qi@linaro.org>
2669
2670 * linux-aarch64-low.c: Update all callers as emit_load_store
2671 is renamed to aarch64_emit_load_store.
2672
e1c587c3
YQ
26732015-10-12 Yao Qi <yao.qi@linaro.org>
2674
2675 * linux-aarch64-low.c: Update all callers of function renaming
2676 from emit_insn to aarch64_emit_insn.
2677
b6542f81
YQ
26782015-10-12 Yao Qi <yao.qi@linaro.org>
2679
2680 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2681 arch/aarch64-insn.h.
2682 (struct aarch64_memory_operand): Likewise.
2683 (ENCODE): Likewise.
2684 (emit_insn): Move to arch/aarch64-insn.c.
2685 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2686 (emit_load_store): Move to arch/aarch64-insn.c.
2687 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2688 (can_encode_int32): Remove.
2689
246994ce
YQ
26902015-10-12 Yao Qi <yao.qi@linaro.org>
2691
2692 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2693 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2694 (aarch64_relocate_instruction): Likewise.
2695 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2696 (struct aarch64_insn_visitor): Likewise.
2697
0badd99f
YQ
26982015-10-12 Yao Qi <yao.qi@linaro.org>
2699
2700 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2701 (struct aarch64_insn_visitor): New.
2702 (struct aarch64_insn_relocation_data): New.
2703 (aarch64_ftrace_insn_reloc_b): New function.
2704 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2705 (aarch64_ftrace_insn_reloc_cb): Likewise.
2706 (aarch64_ftrace_insn_reloc_tb): Likewise.
2707 (aarch64_ftrace_insn_reloc_adr): Likewise.
2708 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2709 (aarch64_ftrace_insn_reloc_others): Likewise.
2710 (visitor): New.
2711 (aarch64_relocate_instruction): Use visitor.
2712
dfaffe9d
YQ
27132015-10-12 Yao Qi <yao.qi@linaro.org>
2714
2715 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2716 int. Add argument buf.
2717 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2718 aarch64_relocate_instruction.
2719
70b439f0
YQ
27202015-10-12 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2723 argument insn. Remove local variable insn. Don't call
2724 target_read_uint32.
2725 (aarch64_install_fast_tracepoint_jump_pad): Call
2726 target_read_uint32.
2727
7781c06f
YQ
27282015-09-30 Yao Qi <yao.qi@linaro.org>
2729
2730 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2731 (emit_load_store_pair): Likewise.
2732
9a3c8263
SM
27332015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2734
2735 * dll.c (match_dll): Add cast(s).
2736 (unloaded_dll): Likewise.
2737 * linux-low.c (second_thread_of_pid_p): Likewise.
2738 (delete_lwp_callback): Likewise.
2739 (count_events_callback): Likewise.
2740 (select_event_lwp_callback): Likewise.
2741 (linux_set_resume_request): Likewise.
2742 * server.c (accumulate_file_name_length): Likewise.
2743 (emit_dll_description): Likewise.
2744 (handle_qxfer_threads_worker): Likewise.
2745 (visit_actioned_threads): Likewise.
2746 * thread-db.c (any_thread_of): Likewise.
2747 * tracepoint.c (same_process_p): Likewise.
2748 (match_blocktype): Likewise.
2749 (build_traceframe_info_xml): Likewise.
2750
224c3ddb
SM
27512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2752
2753 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2754 assignment.
2755 (gdb_unparse_agent_expr): Likewise.
2756 * hostio.c (require_data): Likewise.
2757 (handle_pread): Likewise.
2758 * linux-low.c (disable_regset): Likewise.
2759 (fetch_register): Likewise.
2760 (store_register): Likewise.
2761 (get_dynamic): Likewise.
2762 (linux_qxfer_libraries_svr4): Likewise.
2763 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2764 (set_fast_tracepoint_jump): Likewise.
2765 (uninsert_fast_tracepoint_jumps_at): Likewise.
2766 (reinsert_fast_tracepoint_jumps_at): Likewise.
2767 (validate_inserted_breakpoint): Likewise.
2768 (clone_agent_expr): Likewise.
2769 * regcache.c (init_register_cache): Likewise.
2770 * remote-utils.c (putpkt_binary_1): Likewise.
2771 (decode_M_packet): Likewise.
2772 (decode_X_packet): Likewise.
2773 (look_up_one_symbol): Likewise.
2774 (relocate_instruction): Likewise.
2775 (monitor_output): Likewise.
2776 * server.c (handle_search_memory): Likewise.
2777 (handle_qxfer_exec_file): Likewise.
2778 (handle_qxfer_libraries): Likewise.
2779 (handle_qxfer): Likewise.
2780 (handle_query): Likewise.
2781 (handle_v_cont): Likewise.
2782 (handle_v_run): Likewise.
2783 (captured_main): Likewise.
2784 * target.c (write_inferior_memory): Likewise.
2785 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2786 * tracepoint.c (init_trace_buffer): Likewise.
2787 (add_tracepoint_action): Likewise.
2788 (add_traceframe): Likewise.
2789 (add_traceframe_block): Likewise.
2790 (cmd_qtdpsrc): Likewise.
2791 (cmd_qtdv): Likewise.
2792 (cmd_qtstatus): Likewise.
2793 (response_source): Likewise.
2794 (response_tsv): Likewise.
2795 (cmd_qtnotes): Likewise.
2796 (gdb_collect): Likewise.
2797 (initialize_tracepoint): Likewise.
2798
afbe19f8
PL
27992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2800
2801 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2802 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2803 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2804 <NOP>: New.
2805 (enum aarch64_condition_codes): New enum.
2806 (w0): New static global.
2807 (fp): Likewise.
2808 (lr): Likewise.
2809 (struct aarch64_memory_operand) <type>: New
2810 MEMORY_OPERAND_POSTINDEX type.
2811 (postindex_memory_operand): New helper function.
2812 (emit_ret): New function.
2813 (emit_load_store_pair): New function, factored out of emit_stp
2814 with support for MEMORY_OPERAND_POSTINDEX.
2815 (emit_stp): Rewrite using emit_load_store_pair.
2816 (emit_ldp): New function.
2817 (emit_load_store): Likewise.
2818 (emit_ldr): Mention post-index instruction in comment.
2819 (emit_ldrh): New function.
2820 (emit_ldrb): New function.
2821 (emit_ldrsw): Mention post-index instruction in comment.
2822 (emit_str): Likewise.
2823 (emit_subs): New function.
2824 (emit_cmp): Likewise.
2825 (emit_and): Likewise.
2826 (emit_orr): Likewise.
2827 (emit_orn): Likewise.
2828 (emit_eor): Likewise.
2829 (emit_mvn): Likewise.
2830 (emit_lslv): Likewise.
2831 (emit_lsrv): Likewise.
2832 (emit_asrv): Likewise.
2833 (emit_mul): Likewise.
2834 (emit_sbfm): Likewise.
2835 (emit_sbfx): Likewise.
2836 (emit_ubfm): Likewise.
2837 (emit_ubfx): Likewise.
2838 (emit_csinc): Likewise.
2839 (emit_cset): Likewise.
2840 (emit_nop): Likewise.
2841 (emit_ops_insns): New helper function.
2842 (emit_pop): Likewise.
2843 (emit_push): Likewise.
2844 (aarch64_emit_prologue): New function.
2845 (aarch64_emit_epilogue): Likewise.
2846 (aarch64_emit_add): Likewise.
2847 (aarch64_emit_sub): Likewise.
2848 (aarch64_emit_mul): Likewise.
2849 (aarch64_emit_lsh): Likewise.
2850 (aarch64_emit_rsh_signed): Likewise.
2851 (aarch64_emit_rsh_unsigned): Likewise.
2852 (aarch64_emit_ext): Likewise.
2853 (aarch64_emit_log_not): Likewise.
2854 (aarch64_emit_bit_and): Likewise.
2855 (aarch64_emit_bit_or): Likewise.
2856 (aarch64_emit_bit_xor): Likewise.
2857 (aarch64_emit_bit_not): Likewise.
2858 (aarch64_emit_equal): Likewise.
2859 (aarch64_emit_less_signed): Likewise.
2860 (aarch64_emit_less_unsigned): Likewise.
2861 (aarch64_emit_ref): Likewise.
2862 (aarch64_emit_if_goto): Likewise.
2863 (aarch64_emit_goto): Likewise.
2864 (aarch64_write_goto_address): Likewise.
2865 (aarch64_emit_const): Likewise.
2866 (aarch64_emit_call): Likewise.
2867 (aarch64_emit_reg): Likewise.
2868 (aarch64_emit_pop): Likewise.
2869 (aarch64_emit_stack_flush): Likewise.
2870 (aarch64_emit_zero_ext): Likewise.
2871 (aarch64_emit_swap): Likewise.
2872 (aarch64_emit_stack_adjust): Likewise.
2873 (aarch64_emit_int_call_1): Likewise.
2874 (aarch64_emit_void_call_2): Likewise.
2875 (aarch64_emit_eq_goto): Likewise.
2876 (aarch64_emit_ne_goto): Likewise.
2877 (aarch64_emit_lt_goto): Likewise.
2878 (aarch64_emit_le_goto): Likewise.
2879 (aarch64_emit_gt_goto): Likewise.
2880 (aarch64_emit_ge_got): Likewise.
2881 (aarch64_emit_ops_impl): New static global variable.
2882 (aarch64_emit_ops): New target function, return
2883 &aarch64_emit_ops_impl.
2884 (struct linux_target_ops): Install it.
2885
bb903df0
PL
28862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2887
2888 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2889 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2890 aarch64-ipa.o.
2891 * linux-aarch64-ipa.c: New file.
2892 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2893 and endian.h.
2894 (aarch64_get_thread_area): New target method.
2895 (extract_signed_bitfield): New helper function.
2896 (aarch64_decode_ldr_literal): New function.
2897 (enum aarch64_opcodes): New enum.
2898 (struct aarch64_register): New struct.
2899 (struct aarch64_operand): New struct.
2900 (x0): New static global.
2901 (x1): Likewise.
2902 (x2): Likewise.
2903 (x3): Likewise.
2904 (x4): Likewise.
2905 (w2): Likewise.
2906 (ip0): Likewise.
2907 (sp): Likewise.
2908 (xzr): Likewise.
2909 (aarch64_register): New helper function.
2910 (register_operand): Likewise.
2911 (immediate_operand): Likewise.
2912 (struct aarch64_memory_operand): New struct.
2913 (offset_memory_operand): New helper function.
2914 (preindex_memory_operand): Likewise.
2915 (enum aarch64_system_control_registers): New enum.
2916 (ENCODE): New macro.
2917 (emit_insn): New helper function.
2918 (emit_b): New function.
2919 (emit_bcond): Likewise.
2920 (emit_cb): Likewise.
2921 (emit_tb): Likewise.
2922 (emit_blr): Likewise.
2923 (emit_stp): Likewise.
2924 (emit_ldp_q_offset): Likewise.
2925 (emit_stp_q_offset): Likewise.
2926 (emit_load_store): Likewise.
2927 (emit_ldr): Likewise.
2928 (emit_ldrsw): Likewise.
2929 (emit_str): Likewise.
2930 (emit_ldaxr): Likewise.
2931 (emit_stxr): Likewise.
2932 (emit_stlr): Likewise.
2933 (emit_data_processing_reg): Likewise.
2934 (emit_data_processing): Likewise.
2935 (emit_add): Likewise.
2936 (emit_sub): Likewise.
2937 (emit_mov): Likewise.
2938 (emit_movk): Likewise.
2939 (emit_mov_addr): Likewise.
2940 (emit_mrs): Likewise.
2941 (emit_msr): Likewise.
2942 (emit_sevl): Likewise.
2943 (emit_wfe): Likewise.
2944 (append_insns): Likewise.
2945 (can_encode_int32_in): New helper function.
2946 (aarch64_relocate_instruction): New function.
2947 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2948 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2949 (struct linux_target_ops): Install aarch64_get_thread_area,
2950 aarch64_install_fast_tracepoint_jump_pad and
2951 aarch64_get_min_fast_tracepoint_insn_len.
2952
787749ea
PL
29532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2954
2955 * Makefile.in (aarch64-insn.o): New rule.
2956 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2957
9812b2e6
YQ
29582015-09-21 Yao Qi <yao.qi@linaro.org>
2959
2960 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2961
18fe412b
YQ
29622015-09-21 Yao Qi <yao.qi@linaro.org>
2963
2964 * tracepoint.c (max_jump_pad_size): Remove.
2965
a0cc84cd
YQ
29662015-09-18 Yao Qi <yao.qi@linaro.org>
2967
2968 * linux-aarch64-low.c: Don't include sys/uio.h.
2969 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2970
d78908cf
WW
29712015-09-16 Wei-cheng Wang <cole945@gmail.com>
2972
2973 * tracepoint.c (eval_result_type): Change prototype.
2974 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2975
d57e0d50
PA
29762015-09-15 Pedro Alves <palves@redhat.com>
2977
2978 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2979 Check whether to report exec events instead of checking whether
2980 multiprocess is enabled.
2981
5a676acc
PA
29822015-09-15 Pedro Alves <palves@redhat.com>
2983
2984 PR remote/18965
2985 * remote-utils.c (prepare_resume_reply): Merge
2986 TARGET_WAITKIND_VFORK_DONE switch case with the
2987 TARGET_WAITKIND_FORKED case.
2988
7c5d0fad
YQ
29892015-09-15 Yao Qi <yao.qi@linaro.org>
2990
2991 * server.c (handle_query): Check string comparison using
2992 "else if" instead of "if".
2993
750ce8d1
YQ
29942015-09-15 Yao Qi <yao.qi@linaro.org>
2995
2996 * server.c (vCont_supported): New global variable.
2997 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2998 matches. Append ";vContSupported+" to own_buf.
2999 (handle_v_requests): Append ";s;S" to own_buf if target supports
3000 hardware single step or vCont_supported is false.
3001 (capture_main): Set vCont_supported to zero.
3002
70b90b91
YQ
30032015-09-15 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3006 it to ...
3007 (linux_supports_hardware_single_step): ... New function.
3008 (linux_target_ops): Update.
3009 * lynx-low.c (lynx_target_ops): Set field
3010 supports_hardware_single_step to target_can_do_hardware_single_step.
3011 * nto-low.c (nto_target_ops): Likewise.
3012 * spu-low.c (spu_target_ops): Likewise.
3013 * win32-low.c (win32_target_ops): Likewise.
3014 * target.c (target_can_do_hardware_single_step): New function.
3015 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3016 Remove. <supports_hardware_single_step>: New field.
3017 (target_supports_conditional_breakpoints): Remove.
3018 (target_supports_hardware_single_step): New macro.
3019 (target_can_do_hardware_single_step): Declare.
3020 * server.c (handle_query): Use target_supports_hardware_single_step
3021 instead of target_supports_conditional_breakpoints.
3022
ade90bde
YQ
30232015-09-15 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3026 function.
3027 (struct linux_target_ops the_low_target): Install
3028 aarch64_linux_siginfo_fixup.
3029
94585166
DB
30302015-09-11 Don Breazeal <donb@codesourcery.com>
3031 Luis Machado <lgustavo@codesourcery.com>
3032
3033 * linux-low.c (linux_mourn): Static declaration.
3034 (linux_arch_setup): Move in front of
3035 handle_extended_wait.
3036 (linux_arch_setup_thread): New function.
3037 (handle_extended_wait): Handle exec events. Call
3038 linux_arch_setup_thread. Make event_lwp argument a
3039 pointer-to-a-pointer.
3040 (check_zombie_leaders): Do not check stopped threads.
3041 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3042 (linux_low_filter_event): Add lwp and thread for exec'ing
3043 non-leader thread if leader thread has been deleted.
3044 Refactor code into linux_arch_setup_thread and call it.
3045 Pass child lwp pointer by reference to handle_extended_wait.
3046 (linux_wait_for_event_filtered): Update comment.
3047 (linux_wait_1): Prevent clobbering exec event status.
3048 (linux_supports_exec_events): New function.
3049 (linux_target_ops) <supports_exec_events>: Initialize new member.
3050 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3051 new member.
3052 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3053 * server.c (report_exec_events): New global variable.
3054 (handle_query): Handle qSupported query for exec-events feature.
3055 (captured_main): Initialize report_exec_events.
3056 * server.h (report_exec_events): Declare new global variable.
3057 * target.h (struct target_ops) <supports_exec_events>: New
3058 member.
3059 (target_supports_exec_events): New macro.
3060 * win32-low.c (win32_target_ops) <supports_exec_events>:
3061 Initialize new member.
3062
0568462b
MM
30632015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3064
3065 * linux-low.c (linux_low_enable_btrace): Remove.
3066 (linux_target_ops): Replace linux_low_enable_btrace with
3067 linux_enable_btrace.
3068
39edd165
YQ
30692015-09-03 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-aarch64-low.c (aarch64_insert_point): Call
3072 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3073 returns true.
3074
1db33b5a
UW
30752015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3076
3077 * linux-low.c (check_stopped_by_breakpoint): Use
3078 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3079
ab290430
PA
30802015-08-27 Pedro Alves <palves@redhat.com>
3081
3082 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3083
8d749320
SM
30842015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3085
6711b7f8
SM
3086 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3087 the XNEW-family equivalent.
8d749320
SM
3088 (compile_bytecodes): Likewise.
3089 * dll.c (loaded_dll): Likewise.
3090 * event-loop.c (append_callback_event): Likewise.
3091 (create_file_handler): Likewise.
3092 (create_file_event): Likewise.
3093 * hostio.c (handle_open): Likewise.
3094 * inferiors.c (add_thread): Likewise.
3095 (add_process): Likewise.
3096 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3097 * linux-arm-low.c (arm_new_process): Likewise.
3098 (arm_new_thread): Likewise.
3099 * linux-low.c (add_to_pid_list): Likewise.
3100 (linux_add_process): Likewise.
3101 (handle_extended_wait): Likewise.
3102 (add_lwp): Likewise.
3103 (enqueue_one_deferred_signal): Likewise.
3104 (enqueue_pending_signal): Likewise.
3105 (linux_resume_one_lwp_throw): Likewise.
3106 (linux_resume_one_thread): Likewise.
3107 (linux_read_memory): Likewise.
3108 (linux_write_memory): Likewise.
3109 * linux-mips-low.c (mips_linux_new_process): Likewise.
3110 (mips_linux_new_thread): Likewise.
3111 (mips_add_watchpoint): Likewise.
3112 * linux-x86-low.c (initialize_low_arch): Likewise.
3113 * lynx-low.c (lynx_add_process): Likewise.
3114 * mem-break.c (set_raw_breakpoint_at): Likewise.
3115 (set_breakpoint): Likewise.
3116 (add_condition_to_breakpoint): Likewise.
3117 (add_commands_to_breakpoint): Likewise.
3118 (clone_agent_expr): Likewise.
3119 (clone_one_breakpoint): Likewise.
3120 * regcache.c (new_register_cache): Likewise.
3121 * remote-utils.c (look_up_one_symbol): Likewise.
3122 * server.c (queue_stop_reply): Likewise.
3123 (start_inferior): Likewise.
3124 (queue_stop_reply_callback): Likewise.
3125 (handle_target_event): Likewise.
3126 * spu-low.c (fetch_ppc_memory): Likewise.
3127 (store_ppc_memory): Likewise.
3128 * target.c (set_target_ops): Likewise.
3129 * thread-db.c (thread_db_load_search): Likewise.
3130 (try_thread_db_load_1): Likewise.
3131 * tracepoint.c (add_tracepoint): Likewise.
3132 (add_tracepoint_action): Likewise.
3133 (create_trace_state_variable): Likewise.
3134 (cmd_qtdpsrc): Likewise.
3135 (cmd_qtro): Likewise.
3136 (add_while_stepping_state): Likewise.
3137 * win32-low.c (child_add_thread): Likewise.
3138 (get_image_name): Likewise.
3139
ed8b7b42
YQ
31402015-08-25 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3143
db3cb7cb
YQ
31442015-08-25 Yao Qi <yao.qi@linaro.org>
3145
3146 * Makefile.in (aarch64-linux.o): New rule.
3147 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3148 srv_tgtobj.
3149 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3150 (aarch64_init_debug_reg_state): Make it extern.
3151 (aarch64_linux_prepare_to_resume): Remove.
3152
f6011a1c
YQ
31532015-08-25 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3156 lwp_arch_private_info and ptid_of_lwp.
3157
88e2cf7e
YQ
31582015-08-25 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3161 Find proc_info by find_process_pid. All callers updated.
3162
5e35436e
YQ
31632015-08-25 Yao Qi <yao.qi@linaro.org>
3164
3165 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3166 Remove.
3167 (debug_reg_change_callback): Remove.
3168 (aarch64_notify_debug_reg_change): Remove.
3169
4a8a7965
YQ
31702015-08-25 Yao Qi <yao.qi@linaro.org>
3171
3172 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3173 Call current_lwp_ptid.
3174
32a271ee
YQ
31752015-08-25 Yao Qi <yao.qi@linaro.org>
3176
3177 * linux-aarch64-low.c (debug_reg_change_callback): Use
3178 debug_printf.
3179
0d51c8d7
YQ
31802015-08-25 Yao Qi <yao.qi@linaro.org>
3181
3182 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3183
31a43dd5
YQ
31842015-08-25 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3187
8ee52567
YQ
31882015-08-25 Yao Qi <yao.qi@linaro.org>
3189
3190 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3191 the code.
3192
ff3f0f45
YQ
31932015-08-25 Yao Qi <yao.qi@linaro.org>
3194
3195 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3196 Remove.
3197 (debug_reg_change_callback): Remove argument entry and add argument
3198 lwp. Remove local variable thread. Don't print thread id in the
3199 debugging output. Don't check whether pid of thread equals to pid.
3200 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3201 iterate_over_lwps instead find_inferior.
3202
3d40fbb5
PA
32032015-08-24 Pedro Alves <palves@redhat.com>
3204
3205 * inferiors.c (get_first_process): New function.
3206 * inferiors.h (get_first_process): New declaration.
3207 * remote-utils.c (read_ptid): Default to the first process in the
3208 list, instead of to the current thread's process.
3209
438e1e42
PA
32102015-08-24 Pedro Alves <palves@redhat.com>
3211
3212 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3213 * event-loop.c: Likewise.
3214 * remote-utils.c: Likewise.
3215 * tracepoint.c: Likewise.
3216
a8c6d4fc
PA
32172015-08-24 Pedro Alves <palves@redhat.com>
3218
3219 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3220 ptid_get_lwp.
3221
99b0bb12
PA
32222015-08-21 Pedro Alves <palves@redhat.com>
3223
3224 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3225 instead of literal 1.
3226
f8904751
PA
32272015-08-21 Pedro Alves <palves@redhat.com>
3228
3229 * tdesc.c (default_description): Explicitly zero-initialize.
3230
465a859e
PA
32312015-08-21 Pedro Alves <palves@redhat.com>
3232
3233 PR gdb/18749
3234 * inferiors.c (remove_thread): Discard any pending stop reply for
3235 this thread.
3236 * server.c (remove_all_on_match_pid): Rename to ...
3237 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3238 instead of a pid.
3239 (discard_queued_stop_replies): Change parameter to a ptid. Now
3240 extern.
3241 (handle_v_kill, kill_inferior_callback, captured_main)
3242 (process_serial_event): Adjust.
3243 * server.h (discard_queued_stop_replies): Declare.
3244
f0db101d
PA
32452015-08-21 Pedro Alves <palves@redhat.com>
3246
3247 * linux-low.c (wait_for_sigstop): Always switch to no thread
3248 selected if the previously current thread dies.
3249 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3250 process instead of the current thread's.
3251 * remote-utils.c (input_interrupt): Don't check if there's no
3252 current thread.
3253 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3254 current thread to the general thread fails, error out.
3255 (handle_qxfer_auxv, handle_qxfer_libraries)
3256 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3257 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3258 (handle_query): Check if there's a thread selected instead of
3259 checking whether there's any thread in the thread list.
3260 (handle_qxfer_threads, handle_qxfer_btrace)
3261 (handle_qxfer_btrace_conf): Don't error out early if there's no
3262 thread in the thread list.
3263 (handle_v_cont, myresume): Don't set the current thread to the
3264 continue thread.
3265 (process_serial_event) <Hg handling>: Also set thread_id if the
3266 previous general thread is still alive.
3267 (process_serial_event) <g/G handling>: If setting the current
3268 thread to the general thread fails, error out.
3269 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3270 thread's lwp instead of the current thread's.
3271 * target.c (set_desired_thread): If the desired thread was not
3272 found, leave the current thread pointing to NULL. Return an int
3273 (boolean) indicating success.
3274 * target.h (set_desired_thread): Change return type to int.
3275
40045d91
MF
32762015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3277
3278 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3279 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3280 #includes.
3281 (ps_get_thread_area): New function.
3282
45face3b
GB
32832015-08-19 Gary Benson <gbenson@redhat.com>
3284
3285 * hostio.c (handle_pread): Do not attempt to read more data
3286 than hostio_reply_with_data can fit in a packet.
3287
16d5f642
JB
32882015-08-18 Joel Brobecker <brobecker@adacore.com>
3289
3290 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3291
a738da3a
MF
32922015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3293
3294 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3295
33ebda9d
PA
32962015-08-06 Pedro Alves <palves@redhat.com>
3297
3298 * tracepoint.c (expr_eval_result): Now an int.
3299
a44892be
PA
33002015-08-06 Pedro Alves <palves@redhat.com>
3301
3302 * gdbthread.h (struct regcache): Forward declare.
3303 (struct thread_info) <regcache_data>: Now a struct regcache
3304 pointer.
3305 * inferiors.c (inferior_regcache_data)
3306 (set_inferior_regcache_data): Now work with struct regcache
3307 pointers.
3308 * inferiors.h (struct regcache): Forward declare.
3309 (inferior_regcache_data, set_inferior_regcache_data): Now work
3310 with struct regcache pointers.
3311 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3312 (free_register_cache_thread): Remove struct regcache pointer
3313 casts.
3314
608a1e46
PA
33152015-08-06 Pedro Alves <palves@redhat.com>
3316
3317 * server.c (captured_main): On error, print the exception message
3318 to stderr, and if run_once is set, throw a quit.
3319
f0ce0d3a
PA
33202015-08-06 Pedro Alves <palves@redhat.com>
3321
3322 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3323 the current thread.
3324
bf47e248
PA
33252015-08-06 Pedro Alves <palves@redhat.com>
3326
3327 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3328 reading beyond the passed in buffer length.
3329
b6b9ffcc
PL
33302015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3331
3332 * tracepoint.c (symbol_list) <required>: Remove.
3333
863d01bd
PA
33342015-08-06 Pedro Alves <palves@redhat.com>
3335
3336 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3337 count if stopping and suspending threads.
3338 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3339 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3340 (linux_detach): Complete an ongoing step-over.
3341 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3342 throughout.
3343 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3344 (linux_wait_1): If passing a signal to the inferior after
3345 finishing a step-over, unsuspend and re-resume all lwps. If we
3346 see a single-step event but the thread should be continuing, don't
3347 pass the trap to gdb.
3348 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3349 internal_error instead of gdb_assert.
3350 (enqueue_pending_signal): New function.
3351 (check_ptrace_stopped_lwp_gone): Add debug output.
3352 (start_step_over): Use internal_error instead of gdb_assert.
3353 (complete_ongoing_step_over): New function.
3354 (linux_resume_one_thread): Don't resume a suspended thread.
3355 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3356 it stepping.
3357
00db26fa
PA
33582015-08-06 Pedro Alves <palves@redhat.com>
3359
3360 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3361 (linux_thread_alive): Use lwp_is_marked_dead.
3362 (extended_event_reported): Delete.
3363 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3364 instead of extended_event_reported.
3365 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3366 as well.
3367 (lwp_is_marked_dead): New function.
3368 (lwp_running): Use lwp_is_marked_dead.
3369 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3370 comment.
3371
ad071a30
PA
33722015-08-06 Pedro Alves <palves@redhat.com>
3373
3374 * linux-low.c (linux_wait_1): Move fork event output out of the
3375 !report_to_gdb check. Pass event_child->waitstatus to
3376 target_waitstatus_to_string instead of ourstatus.
3377
524b57e6
YQ
33782015-08-04 Yao Qi <yao.qi@linaro.org>
3379
3380 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3381 if current_thread is 32 bit.
3382
6085d6f6
YQ
33832015-08-04 Yao Qi <yao.qi@linaro.org>
3384
3385 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3386 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3387 * server.c (extended_protocol): Remove "static".
3388 * server.h (extended_protocol): Declare it.
3389
8a7e4587
YQ
33902015-08-04 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3393 both aarch64 and aarch32.
3394 (aarch64_set_pc): Likewise.
3395
3b53ae99
YQ
33962015-08-04 Yao Qi <yao.qi@linaro.org>
3397
3398 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3399 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3400 arm-with-neon.xml to srv_xmlfiles.
3401 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3402 (is_64bit_tdesc): New function.
3403 (aarch64_linux_read_description): New function.
3404 (aarch64_arch_setup): Call aarch64_linux_read_description.
3405 (regs_info): Rename to regs_info_aarch64.
3406 (aarch64_regs_info): Return right regs_info.
3407 (initialize_low_arch): Call initialize_low_arch_aarch32.
3408
bd9e6534
YQ
34092015-08-04 Yao Qi <yao.qi@linaro.org>
3410
3411 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3412 * linux-aarch32-low.c: New file.
3413 * linux-aarch32-low.h: New file.
3414 * linux-arm-low.c (arm_fill_gregset): Move it to
3415 linux-aarch32-low.c.
3416 (arm_store_gregset): Likewise.
3417 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3418 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3419 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3420 (regs_info): Rename to regs_info_arm.
3421 (arm_regs_info): Return regs_info_aarch32 if
3422 have_ptrace_getregset is 1 and target description is
3423 arm_with_neon or arm_with_vfpv3.
3424 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3425 Call initialize_low_arch_aarch32 instead.
3426
ded48a5e
YQ
34272015-08-04 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3430 * linux-low.c: ... here.
3431 * linux-low.h (have_ptrace_getregset): Declare it.
3432
96e9210f
PA
34332015-08-04 Pedro Alves <palves@redhat.com>
3434
3435 * thread-db.c (struct thread_db): Use new typedefs.
3436 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3437 CHK calls.
3438 (disable_thread_event_reporting): Cast result of dlsym to
3439 destination function pointer type.
3440 (thread_db_mourn): Use td_ta_delete_ftype.
3441
af60a1ef
SL
34422015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3443
3444 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3445 arch variant.
3446 (CDX_BREAKPOINT): Define for R2.
3447 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3448 (the_low_target): Add comments.
3449
e8b41681
YQ
34502015-07-30 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-arm-low.c (arm_hwcap): Remove it.
3453 (arm_read_description): New local variable arm_hwcap. Don't
3454 set arm_hwcap to zero.
3455
89abb039
YQ
34562015-07-30 Yao Qi <yao.qi@linaro.org>
3457
3458 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3459 Use regcache->tdesc instead.
3460 (arm_store_wmmxregset): Likewise.
3461 (arm_fill_vfpregset): Likewise.
3462 (arm_store_vfpregset): Likewise.
3463
deca266c
YQ
34642015-07-30 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-arm-low.c: Include arch/arm.h.
3467 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3468 (arm_store_gregset): Likewise.
3469
aa58a496
SM
34702015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3471
3472 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3473 ptrace's 4th parameter.
3474
50904b25
YQ
34752015-07-27 Yao Qi <yao.qi@linaro.org>
3476
3477 * configure.srv (case aarch64*-*-linux*): Don't set
3478 srv_linux_usrregs.
3479
5826e159
PA
34802015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3481
3482 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3483 sys/ptrace.h.
3484 * linux-arm-low.c: Likewise.
3485 * linux-cris-low.c: Likewise.
3486 * linux-crisv32-low.c: Likewise.
3487 * linux-low.c: Likewise.
3488 * linux-m68k-low.c: Likewise.
3489 * linux-mips-low.c: Likewise.
3490 * linux-nios2-low.c: Likewise.
3491 * linux-s390-low.c: Likewise.
3492 * linux-sparc-low.c: Likewise.
3493 * linux-tic6x-low.c: Likewise.
3494 * linux-tile-low.c: Likewise.
3495 * linux-x86-low.c: Likewise.
3496
54019719
PA
34972015-07-24 Pedro Alves <palves@redhat.com>
3498
3499 * config.in: Regenerate.
3500 * configure: Regenerate.
3501
eb7aa561
PA
35022015-07-24 Pedro Alves <palves@redhat.com>
3503
3504 * acinclude.m4: Include ../ptrace.m4.
3505 * configure.ac: Call GDB_AC_PTRACE.
3506 * config.in, configure: Regenerate.
3507
55d7b841
YQ
35082015-07-24 Yao Qi <yao.qi@linaro.org>
3509
3510 * linux-low.c (linux_create_inferior): Remove setting to
3511 proc->priv->new_inferior.
3512 (linux_attach): Likewise.
3513 (linux_low_filter_event): Likewise.
3514 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3515
c06cbd92
YQ
35162015-07-24 Yao Qi <yao.qi@linaro.org>
3517
3518 * linux-low.c (linux_arch_setup): New function.
3519 (linux_low_filter_event): If proc->tdesc is NULL and
3520 proc->attached is true, call the_low_target.arch_setup.
3521 Otherwise, keep status pending, and return.
3522 (linux_resume_one_lwp_throw): Don't call get_pc if
3523 thread->while_stepping isn't NULL. Don't call
3524 get_thread_regcache if proc->tdesc is NULL.
3525 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3526 (linux_target_ops): Install arch_setup.
3527 * server.c (start_inferior): Call the_target->arch_setup.
3528 * target.h (struct target_ops) <arch_setup>: New field.
3529 (target_arch_setup): New marco.
3530 * lynx-low.c (lynx_target_ops): Update.
3531 * nto-low.c (nto_target_ops): Update.
3532 * spu-low.c (spu_target_ops): Update.
3533 * win32-low.c (win32_target_ops): Update.
3534
5ae3ebba
YQ
35352015-07-24 Yao Qi <yao.qi@linaro.org>
3536
3537 * linux-low.c (linux_add_process): Don't set
3538 proc->priv->new_inferior.
3539 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3540 (linux_attach): Likewise.
3541
eb97750b
YQ
35422015-07-24 Yao Qi <yao.qi@linaro.org>
3543
3544 * server.c (start_inferior): Code refactor.
3545
51aee833
YQ
35462015-07-24 Yao Qi <yao.qi@linaro.org>
3547
3548 * server.c (process_serial_event): Set general_thread.
3549
af1b22f3
YQ
35502015-07-21 Yao Qi <yao.qi@linaro.org>
3551
3552 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3553 aarch64_linux_get_debug_reg_capacity.
3554
554717a3
YQ
35552015-07-17 Yao Qi <yao.qi@linaro.org>
3556
3557 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3558 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3559 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3560 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3561 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3562 (AARCH64_HWP_ALIGNMENT): Likewise.
3563 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3564 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3565 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3566 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3567 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3568 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3569 (struct aarch64_debug_reg_state): Likewise.
3570 (struct arch_lwp_info): Likewise.
3571 (aarch64_align_watchpoint): Likewise.
3572 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3573 (aarch64_watchpoint_length): Likewise.
3574 (aarch64_point_encode_ctrl_reg): Likewise
3575 (aarch64_point_is_aligned): Likewise.
3576 (aarch64_align_watchpoint): Likewise.
3577 (aarch64_linux_set_debug_regs):
3578 (aarch64_dr_state_insert_one_point): Likewise.
3579 (aarch64_dr_state_remove_one_point): Likewise.
3580 (aarch64_handle_breakpoint): Likewise.
3581 (aarch64_handle_aligned_watchpoint): Likewise.
3582 (aarch64_handle_unaligned_watchpoint): Likewise.
3583 (aarch64_handle_watchpoint): Likewise.
3584
c67ca4de
YQ
35852015-07-17 Yao Qi <yao.qi@linaro.org>
3586
3587 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3588 and don't aarch64_get_debug_reg_state. All callers update.
3589 (aarch64_handle_aligned_watchpoint): Likewise.
3590 (aarch64_handle_unaligned_watchpoint): Likewise.
3591 (aarch64_handle_watchpoint): Likewise.
3592 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3593 (aarch64_remove_point): Likewise.
3594
25abf979
YQ
35952015-07-17 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3598 debug_printf.
3599 (aarch64_handle_unaligned_watchpoint): Likewise.
3600
db1ff28b
JK
36012015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3602
3603 Revert the previous 3 commits:
3604 Move gdb_regex* to common/
3605 Move linux_find_memory_regions_full & co.
3606 gdbserver build-id attribute generator
3607
700ca40f
JK
36082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3609 Jan Kratochvil <jan.kratochvil@redhat.com>
3610
3611 gdbserver build-id attribute generator.
3612 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3613 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3614 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3615 (find_phdr): New.
3616 (get_dynamic): Use find_pdhr to traverse program headers.
3617 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3618 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3619 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3620 (get_hex_build_id): New.
3621 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3622 to reply XML document.
3623
9904185c
JK
36242015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3625 Jan Kratochvil <jan.kratochvil@redhat.com>
3626
3627 * target.c: Include target/target-utils.h and fcntl.h.
3628 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3629 (target_fileio_read_stralloc): New functions.
3630
6e5b4429
JK
36312015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3632
3633 * Makefile.in (OBS): Add gdb_regex.o.
3634 (gdb_regex.o): New.
3635 * config.in: Rebuilt.
3636 * configure: Rebuilt.
3637
ddc98fbf
JK
36382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3639 Jan Kratochvil <jan.kratochvil@redhat.com>
3640
3641 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3642 * Makefile.in (OBS): Add target-utils.o.
3643 (linux-maps.o, target-utils.o): New.
3644 * configure.srv (srv_linux_obj): Add linux-maps.o.
3645
e57bb7a0
PL
36462015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3647
3648 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3649 function, return 1.
3650 (the_low_target): Install it.
3651
586b02a9
PA
36522015-07-14 Pedro Alves <palves@redhat.com>
3653
3654 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3655 Instead, ignore ECHILD, and throw an error for other errnos.
3656
58c1b36c
PA
36572015-07-10 Pedro Alves <palves@redhat.com>
3658
3659 * event-loop.c (struct callback_event) <data>: Change type to
3660 gdb_client_data instance instead of gdb_client_data pointer.
3661 (append_callback_event): Adjust.
3662
421530db
PL
36632015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3664
3665 * linux-aarch64-low.c: Add comments for each linux_target_ops
3666 method. Remove comments already covered in target_ops and
3667 linux_target_ops definitions.
3668 (the_low_target): Add comments for each unimplemented method.
3669
c2d65f38
YQ
36702015-07-09 Yao Qi <yao.qi@linaro.org>
3671
3672 * linux-aarch64-low.c (aarch64_regmap): Remove.
3673 (aarch64_usrregs_info): Remove.
3674 (regs_info): Set field usrregs to NULL.
3675
b20a6524
MM
36762015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3677
3678 * linux-low.c: Include "rsp-low.h"
3679 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3680 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3681 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3682 (handle_btrace_enable_pt): New.
3683 (handle_btrace_general_set): Support "pt".
3684 (handle_btrace_conf_general_set): Support "pt:size".
3685
96c97461
PL
36862015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3687
3688 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3689 Z_PACKET_SW_BP.
3690
37d66942
PL
36912015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3692
3693 * linux-aarch64-low.c: Remove comment about endianness.
3694 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3695 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3696 memcmp.
3697
dc06243f
GB
36982015-06-24 Gary Benson <gbenson@redhat.com>
3699
3700 * linux-i386-ipa.c (stdint.h): Do not include.
3701 * lynx-i386-low.c (stdint.h): Likewise.
3702 * lynx-ppc-low.c (stdint.h): Likewise.
3703 * mem-break.c (stdint.h): Likewise.
3704 * thread-db.c (stdint.h): Likewise.
3705 * tracepoint.c (stdint.h): Likewise.
3706 * win32-low.c (stdint.h): Likewise.
3707
124e13d9
SM
37082015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3709
3710 * server.c (write_qxfer_response): Update call to
3711 remote_escape_output.
3712
909c2cda
JK
37132015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3714 Jan Kratochvil <jan.kratochvil@redhat.com>
3715
3716 Merge multiple hex conversions.
3717 * gdbreplay.c (tohex): Rename to 'fromhex'.
3718 (logchar): Use fromhex.
3719
24c05f46
JK
37202015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3721
3722 * server.c (handle_qxfer_libraries): Set `version' attribute for
3723 <library-list>.
3724
14d2069a
GB
37252015-06-10 Gary Benson <gbenson@redhat.com>
3726
3727 * target.h (struct target_ops) <multifs_open>: New field.
3728 <multifs_unlink>: Likewise.
3729 <multifs_readlink>: Likewise.
3730 * linux-low.c (nat/linux-namespaces.h): New include.
3731 (linux_target_ops): Initialize the_target->multifs_open,
3732 the_target->multifs_unlink and the_target->multifs_readlink.
3733 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3734 * hostio.c (hostio_fs_pid): New static variable.
3735 (hostio_handle_new_gdb_connection): New function.
3736 (handle_setfs): Likewise.
3737 (handle_open): Use the_target->multifs_open as appropriate.
3738 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3739 (handle_readlink): Use the_target->multifs_readlink as
3740 appropriate.
3741 (handle_vFile): Handle vFile:setfs packets.
3742 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3743 after target_handle_new_gdb_connection.
3744
4b8b5e72
GB
37452015-06-10 Gary Benson <gbenson@redhat.com>
3746
3747 * configure.ac (AC_CHECK_FUNCS): Add setns.
3748 * config.in: Regenerate.
3749 * configure: Likewise.
3750 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3751 (linux-namespaces.o): New rule.
3752 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3753
3ac2e371
GB
37542015-06-09 Gary Benson <gbenson@redhat.com>
3755
3756 * hostio.c (handle_open): Process mode argument with
3757 fileio_to_host_mode.
3758
ca9b78ce
YQ
37592015-06-01 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3762 * linux-x86-low.c: Likewise.
3763
bfacd19d
DB
37642015-05-28 Don Breazeal <donb@codesourcery.com>
3765
3766 * linux-low.c (handle_extended_wait): Initialize
3767 thread_info.last_resume_kind for new fork children.
3768
452003ef
PA
37692015-05-15 Pedro Alves <palves@redhat.com>
3770
3771 * target.h (target_handle_new_gdb_connection): Rewrite using if
3772 wrapped in do/while.
3773
1041a03c
JB
37742015-05-14 Joel Brobecker <brobecker@adacore.com>
3775
3776 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3777 * configure, config.in: Regenerate.
3778 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3779 Declare typedef.
3780
c269dbdb
DB
37812015-05-12 Don Breazeal <donb@codesourcery.com>
3782
3783 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3784 PTRACE_EVENT_VFORK_DONE.
3785 (linux_low_ptrace_options, extended_event_reported): Add vfork
3786 events.
3787 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3788 and "vforkdone" for RSP 'T' Stop Reply Packet.
3789 * server.h (report_vfork_events): Declare
3790 global variable.
3791
3a8a0396
DB
37922015-05-12 Don Breazeal <donb@codesourcery.com>
3793
3794 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3795 (the_low_target) <new_fork>: Initialize new member.
3796 * linux-arm-low.c (arm_new_fork): New function.
3797 (the_low_target) <new_fork>: Initialize new member.
3798 * linux-low.c (handle_extended_wait): Call new target function
3799 new_fork.
3800 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3801 * linux-mips-low.c (mips_add_watchpoint): New function
3802 extracted from mips_insert_point.
3803 (the_low_target) <new_fork>: Initialize new member.
3804 (mips_linux_new_fork): New function.
3805 (mips_insert_point): Call mips_add_watchpoint.
3806 * linux-x86-low.c (x86_linux_new_fork): New function.
3807 (the_low_target) <new_fork>: Initialize new member.
3808
de0d863e
DB
38092015-05-12 Don Breazeal <donb@codesourcery.com>
3810
3811 * linux-low.c (handle_extended_wait): Implement return value,
3812 rename argument 'event_child' to 'event_lwp', handle
3813 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3814 (linux_low_ptrace_options): New function.
3815 (linux_low_filter_event): Call linux_low_ptrace_options,
3816 use different argument fo linux_enable_event_reporting,
3817 use return value from handle_extended_wait.
3818 (extended_event_reported): New function.
3819 (linux_wait_1): Call extended_event_reported and set
3820 status to report fork events.
3821 (linux_write_memory): Add pid to debug message.
3822 (reset_lwp_ptrace_options_callback): New function.
3823 (linux_handle_new_gdb_connection): New function.
3824 (linux_target_ops): Initialize new structure member.
3825 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3826 * lynx-low.c: Initialize new structure member.
3827 * remote-utils.c (prepare_resume_reply): Implement stop reason
3828 "fork" for "T" stop message.
3829 * server.c (handle_query): Call handle_new_gdb_connection.
3830 * server.h (report_fork_events): Declare global flag.
3831 * target.h (struct target_ops) <handle_new_gdb_connection>:
3832 New member.
3833 (target_handle_new_gdb_connection): New macro.
3834 * win32-low.c: Initialize new structure member.
3835
ddcbc397
DB
38362015-05-12 Don Breazeal <donb@codesourcery.com>
3837
3838 * mem-break.c (APPEND_TO_LIST): Define macro.
3839 (clone_agent_expr): New function.
3840 (clone_one_breakpoint): New function.
3841 (clone_all_breakpoints): New function.
3842 * mem-break.h: Declare new functions.
3843
89245bc0
DB
38442015-05-12 Don Breazeal <donb@codesourcery.com>
3845
3846 * linux-low.c (linux_supports_fork_events): New function.
3847 (linux_supports_vfork_events): New function.
3848 (linux_target_ops): Initialize new structure members.
3849 (initialize_low): Call linux_check_ptrace_features.
3850 * lynx-low.c (lynx_target_ops): Initialize new structure
3851 members.
3852 * server.c (report_fork_events, report_vfork_events):
3853 New global flags.
3854 (handle_query): Add new features to qSupported packet and
3855 response.
3856 (captured_main): Initialize new global variables.
3857 * target.h (struct target_ops) <supports_fork_events>:
3858 New member.
3859 <supports_vfork_events>: New member.
3860 (target_supports_fork_events): New macro.
3861 (target_supports_vfork_events): New macro.
3862 * win32-low.c (win32_target_ops): Initialize new structure
3863 members.
3864
835205d0
GB
38652015-05-12 Gary Benson <gbenson@redhat.com>
3866
3867 * server.c (handle_qxfer_exec_file): Use current process
3868 if annex is empty.
3869
21e94bd9
SL
38702015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3871
3872 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3873 Remove HAVE_PTRACE_GETREGS conditionals.
3874 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3875 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3876
45614f15
YQ
38772015-05-08 Yao Qi <yao.qi@linaro.org>
3878
3879 * linux-low.c (linux_supports_conditional_breakpoints): New
3880 function.
3881 (linux_target_ops): Install new target method.
3882 * lynx-low.c (lynx_target_ops): Install NULL hook for
3883 supports_conditional_breakpoints.
3884 * nto-low.c (nto_target_ops): Likewise.
3885 * spu-low.c (spu_target_ops): Likewise.
3886 * win32-low.c (win32_target_ops): Likewise.
3887 * server.c (handle_query): Check
3888 target_supports_conditional_breakpoints.
3889 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3890 New field.
3891 (target_supports_conditional_breakpoints): New macro.
3892
80ad801e
PA
38932015-05-06 Pedro Alves <palves@redhat.com>
3894
3895 PR server/18081
3896 * server.c (start_inferior): If the process exits, mourn it.
3897
819843c7
GB
38982015-04-21 Gary Benson <gbenson@redhat.com>
3899
3900 * hostio.c (fileio_open_flags_to_host): Factored out to
3901 fileio_to_host_openflags in common/fileio.c. Single use
3902 updated.
3903
a2d5a9d7
MF
39042015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3905
3906 * linux-xtensa-low.c (xtensa_fill_gregset)
3907 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3908 XCHAL_HAVE_LOOP.
3909
deb44829
MF
39102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3911
3912 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3913 (regs_info): Replace usrregs pointer with NULL.
3914
e57f1de3
GB
39152015-04-17 Gary Benson <gbenson@redhat.com>
3916
3917 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3918 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3919 * server.c (handle_qxfer_exec_file): New function.
3920 (qxfer_packets): Add exec-file entry.
3921 (handle_query): Report qXfer:exec-file:read as supported packet.
3922
62828379
RN
39232015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3924
3925 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3926
b88bb450
GB
39272015-04-09 Gary Benson <gbenson@redhat.com>
3928
3929 * hostio-errno.c (errno_to_fileio_error): Remove function.
3930 Update caller to use remote_fileio_to_fio_error.
3931
c8f4bfdd
YQ
39322015-04-09 Yao Qi <yao.qi@linaro.org>
3933
3934 * linux-low.c (linux_insert_point): Call
3935 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3936 (linux_remove_point): Call remove_memory_breakpoint if type is
3937 raw_bkpt_type_sw.
3938 * linux-x86-low.c (x86_insert_point): Don't call
3939 insert_memory_breakpoint.
3940 (x86_remove_point): Don't call remove_memory_breakpoint.
3941
41f98f02
PA
39422015-04-01 Pedro Alves <palves@redhat.com>
3943 Cleber Rosa <crosa@redhat.com>
3944
3945 * server.c (gdbserver_usage): Reorganize and extend the usage
3946 message.
3947
2bf6fb9d
PA
39482015-03-24 Pedro Alves <palves@redhat.com>
3949
3950 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3951 output. Also dump TRAP_TRACE.
3952 (linux_low_filter_event): In debug output, distinguish a
3953 resume_stop SIGSTOP from a delayed SIGSTOP.
3954
369f6daa
GB
39552015-03-24 Gary Benson <gbenson@redhat.com>
3956
3957 * linux-x86-low.c (x86_linux_new_thread): Moved to
3958 nat/x86-linux.c.
3959 (x86_linux_prepare_to_resume): Likewise.
3960
8e5d4070
GB
39612015-03-24 Gary Benson <gbenson@redhat.com>
3962
3963 * Makefile.in (x86-linux-dregs.o): New rule.
3964 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3965 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3966 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3967 (x86_linux_dr_get): Likewise.
3968 (x86_linux_dr_set): Likewise.
3969 (update_debug_registers_callback): Likewise.
3970 (x86_linux_dr_set_addr): Likewise.
3971 (x86_linux_dr_get_addr): Likewise.
3972 (x86_linux_dr_set_control): Likewise.
3973 (x86_linux_dr_get_control): Likewise.
3974 (x86_linux_dr_get_status): Likewise.
3975 (x86_linux_update_debug_registers): Likewise.
3976
2b95d440
GB
39772015-03-24 Gary Benson <gbenson@redhat.com>
3978
3979 * linux-x86-low.c (x86_linux_update_debug_registers):
3980 New function, factored out from...
3981 (x86_linux_prepare_to_resume): ...this.
3982
14b0bc68
GB
39832015-03-24 Gary Benson <gbenson@redhat.com>
3984
3985 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3986 (x86_linux_dr_set): Likewise.
3987 (update_debug_registers_callback): Likewise.
3988 (x86_linux_dr_set_addr): Likewise.
3989 (x86_linux_dr_get_addr): Likewise.
3990 (x86_linux_dr_set_control): Likewise.
3991 (x86_linux_dr_get_control): Likewise.
3992 (x86_linux_dr_get_status): Likewise.
3993 (x86_linux_prepare_to_resume): Likewise.
3994
5dfe6ca8
GB
39952015-03-24 Gary Benson <gbenson@redhat.com>
3996
3997 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3998 Use perror_with_name. Pass string through gettext.
3999 (x86_linux_dr_set): Likewise.
4000
d33472ad
GB
40012015-03-24 Gary Benson <gbenson@redhat.com>
4002
4003 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4004 (x86_linux_dr_set_addr): ...this.
4005 (x86_dr_low_get_addr): Rename to...
4006 (x86_linux_dr_get_addr): ...this.
4007 (x86_dr_low_set_control): Rename to...
4008 (x86_linux_dr_set_control): ...this.
4009 (x86_dr_low_get_control): Rename to...
4010 (x86_linux_dr_get_control): ...this.
4011 (x86_dr_low_get_status): Rename to...
4012 (x86_linux_dr_get_status): ...this.
4013 (x86_dr_low): Update with new function names.
4014
4b134ca1
GB
40152015-03-24 Gary Benson <gbenson@redhat.com>
4016
4017 * Makefile.in (x86-linux.o): New rule.
4018 * configure.srv: Add x86-linux.o to relevant targets.
4019 * linux-low.c (lwp_set_arch_private_info): New function.
4020 (lwp_arch_private_info): Likewise.
4021 * linux-x86-low.c: Include nat/x86-linux.h.
4022 (arch_lwp_info): Removed structure.
4023 (update_debug_registers_callback):
4024 Use lwp_set_debug_registers_changed.
4025 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4026 and lwp_set_debug_registers_changed.
4027 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4028
34c703da
GB
40292015-03-24 Gary Benson <gbenson@redhat.com>
4030
4031 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4032 * linux-arm-low.c (arm_new_thread): Likewise.
4033 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4034 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4035 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4036 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4037
cff068da
GB
40382015-03-24 Gary Benson <gbenson@redhat.com>
4039
4040 * linux-low.c (ptid_of_lwp): New function.
4041 (lwp_is_stopped): Likewise.
4042 (lwp_stop_reason): Likewise.
4043 * linux-x86-low.c (update_debug_registers_callback):
4044 Use lwp_is_stopped.
4045 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4046 lwp_stop_reason.
4047
b2f7c7e8
GB
40482015-03-24 Gary Benson <gbenson@redhat.com>
4049
4050 * linux-low.h (linux_stop_lwp): Remove declaration.
4051
6d4ee8c6
GB
40522015-03-24 Gary Benson <gbenson@redhat.com>
4053
4054 * linux-low.h: Include nat/linux-nat.h.
4055 * linux-low.c (iterate_over_lwps_args): New structure.
4056 (iterate_over_lwps_filter): New function.
4057 (iterate_over_lwps): Likewise.
4058 * linux-x86-low.c (update_debug_registers_callback):
4059 Update signature to what iterate_over_lwps expects.
4060 Remove PID check that iterate_over_lwps now performs.
4061 (x86_dr_low_set_addr): Use iterate_over_lwps.
4062 (x86_dr_low_set_control): Likewise.
4063
70a0bb6b
GB
40642015-03-24 Gary Benson <gbenson@redhat.com>
4065
4066 * linux-x86-low.c (x86_debug_reg_state): New function.
4067 (x86_linux_prepare_to_resume): Use the above.
4068
7b669087
GB
40692015-03-24 Gary Benson <gbenson@redhat.com>
4070
4071 * linux-low.c (current_lwp_ptid): New function.
4072 * linux-x86-low.c: Include nat/linux-nat.h.
4073 (x86_dr_low_get_addr): Use current_lwp_ptid.
4074 (x86_dr_low_get_control): Likewise.
4075 (x86_dr_low_get_status): Likewise.
4076
eef49a3d
PA
40772015-03-20 Pedro Alves <palves@redhat.com>
4078
4079 * tracepoint.c (cmd_qtstatus): Make "str" const.
4080
b2333d22
PA
40812015-03-20 Pedro Alves <palves@redhat.com>
4082
4083 * server.c (handle_general_set): Make "req_str" const.
4084
23f238d3
PA
40852015-03-19 Pedro Alves <palves@redhat.com>
4086
4087 * linux-low.c (linux_resume_one_lwp): Rename to ...
4088 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4089 instead call perror_with_name.
4090 (check_ptrace_stopped_lwp_gone): New function.
4091 (linux_resume_one_lwp): Reimplement as wrapper around
4092 linux_resume_one_lwp_throw that swallows errors if the LWP is
4093 gone.
4094
91baf43f
PA
40952015-03-19 Pedro Alves <palves@redhat.com>
4096
4097 * linux-low.c (count_events_callback, select_event_lwp_callback):
4098 No longer check whether the thread has resume_stop as last resume
4099 kind.
4100
8bf3b159
PA
41012015-03-19 Pedro Alves <palves@redhat.com>
4102
4103 * linux-low.c (count_events_callback, select_event_lwp_callback):
4104 Use the lwp's status_pending_p field, not the thread's.
4105
b90fc188
PA
41062015-03-19 Pedro Alves <palves@redhat.com>
4107
4108 * linux-low.c (select_event_lwp_callback): Update comments to
4109 no longer mention SIGTRAP.
4110
464b0089
GB
41112015-03-18 Gary Benson <gbenson@redhat.com>
4112
4113 * server.c (handle_query): Do not report vFile:fstat as supported.
4114
aa9e327f
GB
41152015-03-11 Gary Benson <gbenson@redhat.com>
4116
4117 * hostio.c (sys/types.h): New include.
4118 (sys/stat.h): Likewise.
4119 (common-remote-fileio.h): Likewise.
4120 (handle_fstat): New function.
4121 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4122
791c0056
GB
41232015-03-11 Gary Benson <gbenson@redhat.com>
4124
4125 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4126 struct stat.st_blocks and struct stat.st_blksize.
4127 * configure: Regenerate.
4128 * config.in: Likewise.
4129 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4130 (OBS): Add common-remote-fileio.o.
4131 (common-remote-fileio.o): New rule.
4132
9a9df970
PA
41332015-03-09 Pedro Alves <palves@redhat.com>
4134
4135 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4136 'struct sockaddr' pointer in 'accept' call.
4137
9eb1356e
PA
41382015-03-09 Pedro Alves <palves@redhat.com>
4139
4140 Revert:
4141 2015-03-07 Pedro Alves <palves@redhat.com>
4142 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4143 or <winsock2.h> here. Instead include "gdb_socket.h".
4144 (remote_open): Use union gdb_sockaddr_u.
4145 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4146 or <winsock2.h> here. Instead include "gdb_socket.h".
4147 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4148 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4149 or <sys/un.h>.
4150 (init_named_socket, gdb_agent_helper_thread): Use union
4151 gdb_sockaddr_u.
4152
aac331e4
PA
41532015-03-07 Pedro Alves <palves@redhat.com>
4154
4155 * configure.ac (build_warnings): Move
4156 -Wdeclaration-after-statement to the C-specific set.
4157 * configure: Regenerate.
4158
366c75fc
PA
41592015-03-07 Pedro Alves <palves@redhat.com>
4160
4161 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4162 or <winsock2.h> here. Instead include "gdb_socket.h".
4163 (remote_open): Use union gdb_sockaddr_u.
4164 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4165 or <winsock2.h> here. Instead include "gdb_socket.h".
4166 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4167 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4168 or <sys/un.h>.
4169 (init_named_socket, gdb_agent_helper_thread): Use union
4170 gdb_sockaddr_u.
4171
492d29ea
PA
41722015-03-07 Pedro Alves <palves@redhat.com>
4173
4174 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4175 instead.
4176
60a191ed
YQ
41772015-03-06 Yao Qi <yao.qi@linaro.org>
4178
4179 * linux-aarch64-low.c (aarch64_insert_point): Use
4180 show_debug_regs as a boolean.
4181 (aarch64_remove_point): Likewise.
4182
f5771b1d
PA
41832015-03-05 Pedro Alves <palves@redhat.com>
4184
4185 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4186 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4187 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4188 * nto-low.c (nto_target_ops): Likewise.
4189 * spu-low.c (spu_target_ops): Likewise.
4190 * win32-low.c (win32_target_ops): Likewise.
4191
3e572f71
PA
41922015-03-04 Pedro Alves <palves@redhat.com>
4193
72f4393d 4194 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4195 Decide whether a breakpoint triggered based on the SIGTRAP's
4196 siginfo.si_code.
72f4393d
L
4197 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4198 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4199 (linux_low_filter_event): Check for breakpoints before checking
4200 watchpoints.
4201 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4202 siginfo.si_code.
72f4393d
L
4203 (linux_stopped_by_sw_breakpoint)
4204 (linux_supports_stopped_by_sw_breakpoint)
4205 (linux_stopped_by_hw_breakpoint)
4206 (linux_supports_stopped_by_hw_breakpoint): New functions.
4207 (linux_target_ops): Install new target methods.
3e572f71 4208
1ec68e26
PA
42092015-03-04 Pedro Alves <palves@redhat.com>
4210
4211 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4212 * server.c (swbreak_feature, hwbreak_feature): New globals.
4213 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4214 (captured_main): Clear swbreak_feature and hwbreak_feature.
4215 * server.h (swbreak_feature, hwbreak_feature): Declare.
4216 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4217 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4218 supports_stopped_by_hw_breakpoint>: New fields.
4219 (target_supports_stopped_by_sw_breakpoint)
4220 (target_stopped_by_sw_breakpoint)
4221 (target_supports_stopped_by_hw_breakpoint)
4222 (target_stopped_by_hw_breakpoint): Declare.
4223
15c66dd6
PA
42242015-03-04 Pedro Alves <palves@redhat.com>
4225
4226 enum lwp_stop_reason -> enum target_stop_reason
4227 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4228 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4229 (linux_wait_1, stuck_in_jump_pad_callback)
4230 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4231 (linux_stopped_by_watchpoint):
4232 * linux-low.h (enum lwp_stop_reason): Delete.
4233 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4234 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4235
98fc70d6
YQ
42362015-03-04 Yao Qi <yao.qi@linaro.org>
4237
4238 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4239
dd2ac174
GB
42402015-03-03 Gary Benson <gbenson@redhat.com>
4241
4242 * hostio.c (handle_vFile): Fix prefix lengths.
4243
d68e53f4
MM
42442015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4245
4246 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4247 ptr_bits.
4248
bf2d68ab
AA
42492015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4250
4251 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4252 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4253 (clean): Add "rm -f" for above C files.
4254 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4255 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4256 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4257 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4258 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4259 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4260 (init_registers_s390x_vx_linux64)
4261 (init_registers_s390x_tevx_linux64)
4262 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4263 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4264 declarations.
4265 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4266 (s390_store_vxrs_high): New functions.
4267 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4268 NT_S390_VXRS_HIGH.
4269 (s390_arch_setup): Add logic for selecting one of the new target
4270 descriptions. Activate the new vector regsets if applicable.
4271 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4272 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4273 and init_registers_s390x_tevx_linux64.
4274
c966a859
PA
42752015-03-01 Pedro Alves <palves@redhat.com>
4276
4277 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4278 parameter.
4279
4180215b
PA
42802015-02-27 Pedro Alves <palves@redhat.com>
4281
4282 * linux-x86-low.c (u_debugreg_offset): New function.
4283 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4284
749bab01
PA
42852015-02-27 Pedro Alves <palves@redhat.com>
4286
4287 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4288 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4289 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4290 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4291 (ps_lsetfpregs, ps_getpid)
4292 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4293 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4294 (ps_lsetxregs, ps_plog): Declare.
4295
3c14e5a3
PA
42962015-02-27 Pedro Alves <palves@redhat.com>
4297
4298 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4299 IP_AGENT_EXPORT_FUNC.
4300 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4301 IP_AGENT_EXPORT_FUNC.
4302 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4303 (IP_AGENT_EXPORT): Delete.
4304 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4305 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4306 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4307 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4308 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4309 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4310 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4311 (traceframe_read_count, traceframe_write_count)
4312 (traceframes_created, trace_state_variables, get_raw_reg)
4313 (get_trace_state_variable_value, set_trace_state_variable_value)
4314 (ust_loaded, helper_thread_id, cmd_buf): Use
4315 IPA_SYM_EXPORTED_NAME.
4316 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4317 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4318 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4319 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4320 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4321 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4322 EXTERN_C_PUSH/EXTERN_C_POP.
4323 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4324 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4325 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4326 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4327 (traceframe_write_count, traceframe_read_count)
4328 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4329 (about_to_request_buffer_space, get_trace_state_variable_value)
4330 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4331 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4332 EXTERN_C_PUSH/EXTERN_C_POP.
4333 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4334 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4335 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4336 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4338 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4339 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4340 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4341 Define.
4342 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4343 (IP_AGENT_EXPORT_VAR_DECL): Define.
4344 (tracing): Declare.
4345 (gdb_agent_get_raw_reg): Declare.
4346
fe978cb0
PA
43472015-02-27 Tom Tromey <tromey@redhat.com>
4348 Pedro Alves <palves@redhat.com>
4349
4350 Rename symbols whose names are reserved C++ keywords throughout.
4351
3bc3d82a
PA
43522015-02-27 Pedro Alves <palves@redhat.com>
4353
4354 * Makefile.in (COMPILER): New, get it from autoconf.
4355 (CXX): Get from autoconf instead.
4356 (COMPILE.pre): Use COMPILER.
4357 (CC-LD): Rename to ...
4358 (CC_LD): ... this. Use COMPILER.
4359 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4360 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4361 * acinclude.m4: Include build-with-cxx.m4.
4362 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4363 Disable -Werror by default if building in C++ mode.
4364 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4365 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4366 the C++ compiler. Save/restore CXXFLAGS too.
4367 * configure: Regenerate.
4368
07697489
PA
43692015-02-27 Pedro Alves <palves@redhat.com>
4370
4371 * acinclude.m4: Include libiberty.m4.
4372 * configure.ac: Call libiberty_INIT.
4373 * config.in, configure: Regenerate.
4374
9beb7c4e
PA
43752015-02-26 Pedro Alves <palves@redhat.com>
4376
4377 * linux-low.c (linux_wait_1): When incrementing the PC past a
4378 program breakpoint always use the_low_target.breakpoint_len as
4379 increment, rather than the maximum between that and
4380 the_low_target.decr_pc_after_break.
4381
8090aef2
PA
43822015-02-23 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4385 thread was doing a step-over; always adjust the PC if
4386 we stepped over a permanent breakpoint.
4387 (linux_wait_1): If we stepped over breakpoint that was on top of a
4388 permanent breakpoint, manually advance the PC past it.
4389
bc9540e8
PA
43902015-02-23 Pedro Alves <palves@redhat.com>
4391
4392 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4393 modes.
4394 (x86_fill_gregset, x86_store_gregset): Use it when handling
4395 $orig_eax.
4396
2db9a427
PA
43972015-02-20 Pedro Alves <palves@redhat.com>
4398
4399 * thread-db.c: Include "nat/linux-procfs.h".
4400 (thread_db_init): Skip listing new threads if the kernel supports
4401 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4402
afa8d396
PA
44032015-02-20 Pedro Alves <palves@redhat.com>
4404
4405 * linux-low.c (status_pending_p_callback): Use ptid_match.
4406
c9587f88
AT
44072015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4408
4409 PR breakpoints/16812
4410 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4411 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4412 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4413
b05ec7a5
AT
44142015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4415
4416 PR breakpoints/15956
4417 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4418
d33501a5
MM
44192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4420
4421 * linux-low.c (linux_low_btrace_conf): Print size.
4422 * server.c (handle_btrace_conf_general_set): New.
4423 (hanle_general_set): Call handle_btrace_conf_general_set.
4424 (handle_query): Report Qbtrace-conf:bts:size as supported.
4425
f4abbc16
MM
44262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4427
4428 * linux-low.c (linux_low_enable_btrace): Update parameters.
4429 (linux_low_btrace_conf): New.
4430 (linux_target_ops)<to_btrace_conf>: Initialize.
4431 * server.c (current_btrace_conf): New.
4432 (handle_btrace_enable): Rename to ...
4433 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4434 to target_enable_btrace. Update comment. Update users.
4435 (handle_qxfer_btrace_conf): New.
4436 (qxfer_packets): Add btrace-conf entry.
4437 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4438 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4439 (target_ops)<read_btrace_conf>: New.
4440 (target_enable_btrace): Update parameters.
4441 (target_read_btrace_conf): New.
4442
043c3577
MM
44432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4444
4445 * server.c (handle_btrace_general_set): Remove call to
4446 target_supports_btrace.
4447 (supported_btrace_packets): New.
4448 (handle_query): Call supported_btrace_packets.
4449 * target.h: include btrace-common.h.
4450 (btrace_target_info): Removed.
4451 (supports_btrace, target_supports_btrace): Update parameters.
4452
734b0e4b
MM
44532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4454
4455 * Makefile.in (SFILES): Add common/btrace-common.c.
4456 (OBS): Add common/btrace-common.o.
4457 (btrace-common.o): Add build rules.
4458 * linux-low: Include btrace-common.h.
4459 (linux_low_read_btrace): Use struct btrace_data. Call
4460 btrace_data_init and btrace_data_fini.
4461
d6c146e9
PA
44622015-02-06 Pedro Alves <palves@redhat.com>
4463
4464 * thread-db.c (find_new_threads_callback): Add debug output.
4465
20ba1ce6
PA
44662015-02-04 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4469 (resume_stopped_resumed_lwps): New function.
4470 (linux_wait_for_event_filtered): Use it.
4471
8cc73a39
SDJ
44722015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4473
4474 * Makefile.in (SFILES): Add linux-personality.c.
4475 (linux-personality.o): New rule.
4476 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4477 list of objects to be built.
4478 * linux-low.c: Include nat/linux-personality.h.
4479 (linux_create_inferior): Remove code to disable address space
4480 randomization (moved to ../nat/linux-personality.c). Create
4481 cleanup to disable address space randomization.
4482
fb23d554
SDJ
44832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4484
4485 * Makefile.in (posix-strerror.o): New rule.
4486 (mingw-strerror.o): Likewise.
4487 * configure: Regenerated.
4488 * configure.ac: Source file ../common/common.host. Initialize new
4489 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4490
cdf43629
YQ
44912015-01-14 Yao Qi <yao@codesourcery.com>
4492
4493 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4494 (ppc-linux.o): New rule.
4495 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4496 * configure.ac: AC_CHECK_FUNCS(getauxval).
4497 * config.in: Re-generated.
4498 * configure: Re-generated.
4499 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4500 ppc64_64bit_inferior_p
4501
514c5338
YQ
45022015-01-14 Yao Qi <yao@codesourcery.com>
4503
4504 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4505 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4506 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4507 (PT_ORIG_R3, PT_TRAP): Likewise.
4508 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4509 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4510 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4511
3368c1e5
JB
45122015-01-10 Joel Brobecker <brobecker@adacore.com>
4513
4514 * i387-fp.c (i387_cache_to_xsave): In look over
4515 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4516 zmmh_low_space field by use of zmmh_high_space.
4517
582511be
PA
45182015-01-09 Pedro Alves <palves@redhat.com>
4519
4520 * linux-low.c (step_over_bkpt): Move higher up in the file.
4521 (handle_extended_wait): Don't store the stop_pc here.
4522 (get_stop_pc): Adjust comments and rename to ...
4523 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4524 stopped for a software breakpoint or hardware breakpoint.
4525 (thread_still_has_status_pending_p): New function.
4526 (status_pending_p_callback): Use
4527 thread_still_has_status_pending_p. If the event is no longer
4528 interesting, resume the LWP.
4529 (handle_tracepoints): Add assert.
4530 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4531 (wstatus_maybe_breakpoint): New function.
4532 (cancel_breakpoint): Delete function.
4533 (check_stopped_by_watchpoint): New function, factored out from
4534 linux_low_filter_event.
4535 (lp_status_maybe_breakpoint): Delete function.
4536 (linux_low_filter_event): Remove filter_ptid argument.
4537 Leave thread group exits pending here. Store the LWP's stop PC.
4538 Always leave events pending.
4539 (linux_wait_for_event_filtered): Pull all events out of the
4540 kernel, and leave them all pending.
4541 (count_events_callback, select_event_lwp_callback): Consider all
4542 events.
4543 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4544 (select_event_lwp): Only give preference to the stepping LWP in
4545 all-stop mode. Adjust comments.
4546 (ignore_event): New function.
4547 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4548 references to cancel_breakpoints. Adjust to renames. Also give
4549 equal priority to all LWPs that have had events in non-stop mode.
4550 If reporting a software breakpoint event, unadjust the LWP's PC.
4551 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4552 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4553 Adjust.
4554 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4555 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4556 (linux_stopped_by_watchpoint): Adjust.
4557 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4558 * linux-low.h (enum lwp_stop_reason): New.
4559 (struct lwp_info) <stop_pc>: Adjust comment.
4560 <stopped_by_watchpoint>: Delete field.
4561 <stop_reason>: New field.
4562 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4563 * mem-break.c (software_breakpoint_inserted_here)
4564 (hardware_breakpoint_inserted_here): New function.
4565 * mem-break.h (software_breakpoint_inserted_here)
4566 (hardware_breakpoint_inserted_here): Declare.
4567 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4568 (cancel_breakpoints): Delete.
4569 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4570 (upload_fast_traceframes): Remove references to
4571 cancel_breakpoints.
4572
a33e3959
PA
45732015-01-09 Pedro Alves <palves@redhat.com>
4574
4575 * thread-db.c (find_new_threads_callback): Ignore thread if the
4576 kernel thread ID is -1.
4577
8784d563
PA
45782015-01-09 Pedro Alves <palves@redhat.com>
4579
4580 * linux-low.c (linux_attach_fail_reason_string): Move to
4581 nat/linux-ptrace.c, and rename.
4582 (linux_attach_lwp): Update comment.
4583 (attach_proc_task_lwp_callback): New function.
4584 (linux_attach): Adjust to rename and use
4585 linux_proc_attach_tgid_threads.
4586 (linux_attach_fail_reason_string): Delete declaration.
4587
76f2b779
JB
45882015-01-01 Joel Brobecker <brobecker@adacore.com>
4589
4590 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4591 * server.c (gdbserver_version): Likewise.
4592
fafcc06a
SDJ
45932014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4594
4595 * remote-utils.c: Include ctype.h.
4596 (input_interrupt): Explicitly handle the case when the char
4597 received is the NUL byte. Improve the printing of non-ASCII
4598 characters.
4599
beed38b8
JB
46002014-12-16 Joel Brobecker <brobecker@adacore.com>
4601
4602 * linux-low.c (linux_low_filter_event): Update call to
4603 linux_enable_event_reporting following the addition of
4604 a new parameter to that function.
4605
bf330350
CU
46062014-12-16 Catalin Udma <catalin.udma@freescale.com>
4607
4608 PR server/17457
4609 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4610 (AARCH64_FPCR_REGNO): Likewise.
4611 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4612 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4613 (aarch64_store_fpregset): Likewise.
4614
5227d625
JB
46152014-12-15 Joel Brobecker <brobecker@adacore.com>
4616
4617 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4618 Remove FIXME comment about assumption about N.
4619
f93b65a0
JB
46202014-12-13 Joel Brobecker <brobecker@adacore.com>
4621
4622 * configure.ac: If large-file support is disabled in GDBserver,
4623 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4624 * configure: Regenerate.
4625
e5a9158d
AA
46262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4627
4628 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4629 warning upon ENODATA from ptrace.
4630 * linux-s390-low.c (s390_store_tdb): New.
4631 (s390_regsets): Add regset for NT_S390_TDB.
4632
feea5f36
AA
46332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4634
4635 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4636 without a fill_function.
4637 * linux-s390-low.c (s390_fill_last_break): Remove.
4638 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4639 (s390_arch_setup): Use regset's size instead of fill_function for
4640 loop end condition.
4641
098dbe61
AA
46422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4643
4644 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4645 the regset's store function when ptrace returned an error.
4646 * regcache.c (get_thread_regcache): Invalidate register cache
4647 before fetching inferior's registers.
4648
28eef672
AA
46492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4650
4651 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4652 while-loop as for-loop.
4653 (regsets_store_inferior_registers): Likewise.
4654
bdca27a2
YQ
46552014-11-28 Yao Qi <yao@codesourcery.com>
4656
4657 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4658 * config.in, configure: Re-generate.
4659 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4660 is defined.
4661
9c232dda
YQ
46622014-11-21 Yao Qi <yao@codesourcery.com>
4663
4664 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4665 (AC_CHECK_HEADERS): Remove malloc.h.
4666 * configure: Re-generated.
4667 * config.in: Re-generated.
4668 * server.h: Don't include alloca.h and malloc.h.
4669 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4670 Don't include malloc.h.
4671
43968415
JB
46722014-11-17 Joel Brobecker <brobecker@adacore.com>
4673
4674 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4675 corresponding ERRNO check in same block.
4676
40e91bc7
PA
46772014-11-12 Pedro Alves <palves@redhat.com>
4678
4679 * server.c (cont_thread): Update comment.
4680 (start_inferior, attach_inferior): No longer clear cont_thread.
4681 (handle_v_cont): No longer set cont_thread.
4682 (captured_main): Clear cont_thread each time a GDB connects.
4683
c2c118cf
PA
46842014-11-12 Pedro Alves <palves@redhat.com>
4685
4686 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4687 thread, and don't resume all threads if the Hc thread has exited.
4688
78708b7c
PA
46892014-11-12 Pedro Alves <palves@redhat.com>
4690
4691 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4692 the process group instead of to a specific LWP.
4693
a2abc7de
PA
46942014-10-15 Pedro Alves <palves@redhat.com>
4695
4696 PR server/17487
4697 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4698 parameter.
4699 (arm_set_thread_context): Delete.
4700 (the_low_target): Adjust.
4701 * win32-i386-low.c (debug_registers_changed)
4702 (debug_registers_used): Delete.
4703 (update_debug_registers_callback): New function.
4704 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4705 needing to update their debug registers.
4706 (win32_get_current_dr): New function.
4707 (x86_dr_low_get_addr, x86_dr_low_get_control)
4708 (x86_dr_low_get_status): Fetch the debug register from the thread
4709 record's context.
4710 (i386_initial_stuff): Adjust.
4711 (i386_get_thread_context): Remove current_event parameter. Don't
4712 clear debug_registers_changed nor copy DR values to
4713 debug_reg_state.
4714 (i386_set_thread_context): Delete.
4715 (i386_prepare_to_resume): New function.
4716 (i386_thread_added): Mark the thread as needing to update irs
4717 debug registers.
4718 (the_low_target): Remove i386_set_thread_context and install
4719 i386_prepare_to_resume.
4720 * win32-low.c (win32_get_thread_context): Adjust.
4721 (win32_set_thread_context): Use SetThreadContext
4722 directly.
4723 (win32_prepare_to_resume): New function.
4724 (win32_require_context): New function, factored out from ...
4725 (thread_rec): ... this.
4726 (continue_one_thread): Call win32_prepare_to_resume on each thread
4727 we're about to continue.
4728 (win32_resume): Call win32_prepare_to_resume on the event thread.
4729 * win32-low.h (struct win32_thread_info)
4730 <debug_registers_changed>: New field.
4731 (struct win32_target_ops): Change prototype of set_thread_context,
4732 delete set_thread_context and add prepare_to_resume.
4733 (win32_require_context): New declaration.
4734
a442d071
GB
47352014-10-08 Gary Benson <gbenson@redhat.com>
4736
4737 * server.h: Do not include common-exceptions.h.
4738
6f1947e8
GB
47392014-10-08 Gary Benson <gbenson@redhat.com>
4740
4741 * server.h: Do not include cleanups.h.
4742
63b434a4
JH
47432014-09-30 James Hogan <james.hogan@imgtec.com>
4744
4745 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4746 mips64-dsp-linux.c.
4747
c4d9ceb6
YQ
47482014-09-23 Yao Qi <yao@codesourcery.com>
4749
4750 * linux-low.c (lp_status_maybe_breakpoint): New function.
4751 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4752 (count_events_callback): Likewise.
4753 (select_event_lwp_callback): Likewise.
4754 (cancel_breakpoints_callback): Likewise.
4755
89a5711c
DB
47562014-09-19 Don Breazeal <donb@codesourcery.com>
4757
4758 * linux-low.c (handle_extended_wait): Call
4759 linux_ptrace_get_extended_event.
4760 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4761 linux_is_extended_waitstatus.
4762
bffc0964
JB
47632014-09-16 Joel Brobecker <brobecker@adacore.com>
4764
4765 * Makefile.in (CPPFLAGS): Define.
4766 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4767 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4768
0bfdf32f
GB
47692014-09-16 Gary Benson <gbenson@redhat.com>
4770
4771 * inferiors.h (current_inferior): Renamed as...
4772 (current_thread): New variable. All uses updated.
4773 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4774 (maybe_move_out_of_jump_pad): Likewise.
4775 (cancel_breakpoint): Likewise.
4776 (linux_low_filter_event): Likewise.
4777 (wait_for_sigstop): Likewise.
4778 (linux_resume_one_lwp): Likewise.
4779 (need_step_over_p): Likewise.
4780 (start_step_over): Likewise.
4781 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4782 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4783 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4784 and save_inferior as saved_thread.
4785 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4786 saved_thread.
4787 (regcache_invalidate_thread): Likewise.
4788 * remote-utils.c (prepare_resume_reply): Likewise.
4789 * thread-db.c (thread_db_get_tls_address): Likewise.
4790 (disable_thread_event_reporting): Likewise.
4791 (remove_thread_event_breakpoints): Likewise.
4792 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4793 as saved_thread.
4794 * target.h (set_desired_inferior): Renamed as...
4795 (set_desired_thread): New declaration. All uses updated.
4796 * server.c (myresume): Updated comment to reference thread instead
4797 of inferior.
4798 (handle_serial_event): Likewise.
4799 (handle_target_event): Likewise.
4800
361c8ade
GB
48012014-09-12 Tom Tromey <tromey@redhat.com>
4802 Gary Benson <gbenson@redhat.com>
4803
4804 * regcache.h: Include common-regcache.h.
4805 (regcache_read_pc): Don't declare.
4806 * regcache.c (get_thread_regcache_for_ptid): New function.
4807
bd9269f7
GB
48082014-09-11 Tom Tromey <tromey@redhat.com>
4809 Gary Benson <gbenson@redhat.com>
4810
4811 * symbol.c: New file.
4812 * Makefile.in (SFILES): Add symbol.c.
4813 (OBS): Add symbol.o.
4814
f8c1d06b
GB
48152014-09-11 Gary Benson <gbenson@redhat.com>
4816
4817 * target.c (target_stop_ptid, target_continue_ptid): New
4818 functions.
4819
721ec300
GB
48202014-09-11 Tom Tromey <tromey@redhat.com>
4821 Gary Benson <gbenson@redhat.com>
4822
4823 * target.h: Include target/target.h.
4824 * target.c (target_read_memory, target_read_uint32)
4825 (target_write_memory): New functions.
4826
c5e92cca
GB
48272014-09-11 Gary Benson <gbenson@redhat.com>
4828
4829 * server.h (debug_hw_points): Don't declare.
4830 * server.c (debug_hw_points): Don't define. Replace all uses
4831 with show_debug_regs.
4832 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4833 all uses with show_debug_regs.
4834
2e4bb98a
EBM
48352014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4836
4837 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4838 endianness into account.
4839 (ppc_supply_ptrace_register): Likewise.
4840
ac740bc7
JH
48412014-09-03 James Hogan <james.hogan@imgtec.com>
4842
4843 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4844 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4845
97ea6506
GB
48462014-09-03 Gary Benson <gbenson@redhat.com>
4847
4848 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4849 ALL_DEBUG_ADDRESS_REGISTERS.
4850
df7e5265
GB
48512014-09-02 Gary Benson <gbenson@redhat.com>
4852
4853 * i386-low.h: Renamed as...
4854 * x86-low.h: New file. All type, function and variable name
4855 prefixes changed from "i386_" to "x86_". All references updated.
4856 * i386-low.c: Renamed as...
4857 * x86-low.c: New file. All type, function and variable name
4858 prefixes changed from "i386_" to "x86_". All references updated.
4859
ed859da7
GB
48602014-09-02 Gary Benson <gbenson@redhat.com>
4861
4862 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4863 (x86_linux_new_thread): Likewise.
4864
860789c7
GB
48652014-08-29 Gary Benson <gbenson@redhat.com>
4866
4867 * server.h (setjmp.h): Do not include.
4868 (toplevel): Do not declare.
4869 (common-exceptions.h): Include.
4870 (cleanups.h): Likewise.
4871 * server.c (toplevel): Do not define.
4872 (exit_code): New static global.
4873 (detach_or_kill_for_exit_cleanup): New function.
4874 (main): New function. Original main renamed to...
4875 (captured_main): New function.
4876 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4877
ff55e1b5
GB
48782014-08-29 Gary Benson <gbenson@redhat.com>
4879
4880 * Makefile.in (SFILES): Add common/common-exceptions.c.
4881 (OBS): Add common-exceptions.o.
4882 (common-exceptions.o): New rule.
4883 * utils.c (prepare_to_throw_exception): New function.
4884
e9bcb658
GB
48852014-08-29 Gary Benson <gbenson@redhat.com>
4886
4887 * config.in: Regenerate.
4888 * configure: Likewise.
4889
e3180625
GB
48902014-08-29 Gary Benson <gbenson@redhat.com>
4891
4892 * Makefile.in (SFILES): Add common/cleanups.c.
4893 (OBS): cleanups.o.
4894 (cleanups.o): New rule.
4895
e3d6ba5d
GB
48962014-08-29 Gary Benson <gbenson@redhat.com>
4897
4898 * utils.c (internal_vwarning): New function.
4899
7096e886
GB
49002014-08-28 Gary Benson <gbenson@redhat.com>
4901
4902 * utils.h (fatal): Remove declaration.
4903 * utils.c (fatal): Remove function.
4904
14ce3192
GB
49052014-08-28 Gary Benson <gbenson@redhat.com>
4906
4907 * tracepoint.c (gdb_agent_init): Replace fatal with
4908 perror_with_name.
4909 (initialize_tracepoint): Likewise.
4910
50278d59
GB
49112014-08-28 Gary Benson <gbenson@redhat.com>
4912
4913 * remote-utils.c (remote_prepare): Replace fatal with error.
4914
aa96c426
GB
49152014-08-28 Gary Benson <gbenson@redhat.com>
4916
4917 * linux-low.c (linux_async): Replace fatal with warning.
4918 Tidy up and return.
4919 (linux_start_non_stop): Return -1 if linux_async failed.
4920
f7160e97
GB
49212014-08-28 Gary Benson <gbenson@redhat.com>
4922
4923 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4924 gdb_assert.
4925 (i386_dr_low_get_addr): Remove vague comment.
4926 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4927 gdb_assert.
4928
38e08fca
GB
49292014-08-28 Gary Benson <gbenson@redhat.com>
4930
4931 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4932 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4933 internal_error.
4934 (linux_resume_one_lwp): Likewise.
4935 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4936 gdb_assert.
4937 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4938 with internal_error.
4939 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4940 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4941 (find_register_by_name): Replace fatal with internal_error.
4942 (find_regno): Likewise.
4943 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4944 * thread-db.c (thread_db_create_event): Likewise.
4945 (thread_db_load_search): Likewise.
4946 (try_thread_db_load_1): Likewise.
4947 * tracepoint.c (get_jump_space_head): Replace fatal with
4948 internal_error.
4949 (claim_trampoline_space): Likewise.
4950 (have_fast_tracepoint_trampoline_buffer): Likewise.
4951 (cmd_qtstart): Likewise.
4952 (stop_tracing): Likewise.
4953 (fast_tracepoint_collecting): Likewise.
4954 (target_malloc): Likewise.
4955 (download_tracepoint): Likewise.
4956 (download_trace_state_variables): Replace check with gdb_assert.
4957 (upload_fast_traceframes): Replace fatal with internal_error.
4958
34abf635
GB
49592014-08-19 Tom Tromey <tromey@redhat.com>
4960 Gary Benson <gbenson@redhat.com>
4961
4962 * Makefile.in (SFILES): Add common/common-debug.c.
4963 (OBS): Add common-debug.o.
4964 (common-debug.o): New rule.
4965 * debug.h (debug_printf): Don't declare.
4966 * debug.c (debug_printf): Renamed and rewritten as...
4967 (debug_vprintf): New function.
4968
f6e94d78
GB
49692014-08-19 Gary Benson <gbenson@redhat.com>
4970
4971 * utils.h: Do not include print-utils.h.
4972
9239eeab
GB
49732014-08-19 Tom Tromey <tromey@redhat.com>
4974 Gary Benson <gbenson@redhat.com>
4975
4976 * server.h: Add static assertion.
4977 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4978
ef87c8bb
GB
49792014-08-19 Tom Tromey <tromey@redhat.com>
4980 Gary Benson <gbenson@redhat.com>
4981
4982 * Makefile.in (SFILES): Add common/errors.c.
4983 (OBS): Add errors.o.
4984 (IPA_OBS): Add errors-ipa.o.
4985 (errors.o): New rule.
4986 (errors-ipa.o): Likewise.
4987 * utils.h (perror_with_name, error, warning): Don't declare.
4988 * utils.c (warning): Renamed and rewritten as...
4989 (vwarning): New function.
4990 (error): Renamed and rewritten as...
4991 (verror): New function.
4992 (internal_error): Renamed and rewritten as...
4993 (internal_verror): New function.
4994
bb974a24
GB
49952014-08-07 Gary Benson <gbenson@redhat.com>
4996
4997 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4998 * configure: Regenerate.
4999 * config.in: Likewise.
5000 * server.h: Do not include errno.h.
5001 * event-loop.c: Likewise.
5002 * hostio-errno.c: Likewise.
5003 * linux-low.c: Likewise.
5004 * remote-utils.c: Likewise.
5005 * spu-low.c: Likewise.
5006 * utils.c: Likewise.
5007 * gdbreplay.c: Unconditionally include errno.h.
5008
6d3d12eb
GB
50092014-08-07 Gary Benson <gbenson@redhat.com>
5010
5011 * server.h: Do not include string.h.
5012 * event-loop.c: Likewise.
5013 * linux-low.c: Likewise.
5014 * regcache.c: Likewise.
5015 * remote-utils.c: Likewise.
5016 * spu-low.c: Likewise.
5017 * utils.c: Likewise.
5018
dccbb609
GB
50192014-08-07 Gary Benson <gbenson@redhat.com>
5020
5021 * server.h: Do not include gdb_assert.h.
5022
e76df0d0
GB
50232014-08-07 Gary Benson <gbenson@redhat.com>
5024
5025 * server.h: Do not include common-utils.h.
5026
4cb9c816
GB
50272014-08-07 Gary Benson <gbenson@redhat.com>
5028
5029 * server.h: Do not include ptid.h.
5030 * notif.h: Likewise.
5031
3995eeee
GB
50322014-08-07 Gary Benson <gbenson@redhat.com>
5033
5034 * server.h: Do not include gdb_locale.h.
5035
cb9f1a9b
GB
50362014-08-07 Gary Benson <gbenson@redhat.com>
5037
5038 * server.h: Do not include gdb/signals.h.
5039 * win32-low.c: Likewise.
5040
a5fceff8
GB
50412014-08-07 Gary Benson <gbenson@redhat.com>
5042
5043 * server.h: Do not include pathmax.h.
5044
b9391142
GB
50452014-08-07 Gary Benson <gbenson@redhat.com>
5046
5047 * server.h: Do not include libiberty.h.
5048 * linux-bfin-low.c: Likewise.
5049
0e443c87
GB
50502014-08-07 Gary Benson <gbenson@redhat.com>
5051
5052 * server.h: Do not include ansidecl.h.
5053
8ebb3f56
GB
50542014-08-07 Gary Benson <gbenson@redhat.com>
5055
5056 * linux-x86-low.c: Do not include stddef.h.
5057 * lynx-ppc-low.c: Likewise.
5058 * tracepoint.c: Likewise.
5059
8980bdf6
GB
50602014-08-07 Gary Benson <gbenson@redhat.com>
5061
5062 * server.h: Do not include stdarg.h.
5063 * nto-low.c: Likewise.
5064
d7096f71
GB
50652014-08-07 Gary Benson <gbenson@redhat.com>
5066
5067 * server.h: Do not include stdlib.h.
5068 * inferiors.c: Likewise.
5069 * linux-low.c: Likewise.
5070 * regcache.c: Likewise.
5071 * spu-low.c: Likewise.
5072 * tracepoint.c: Likewise.
5073 * utils.c: Likewise.
5074
d02f550d
GB
50752014-08-07 Gary Benson <gbenson@redhat.com>
5076
5077 * server.h: Do not include stdio.h.
5078 * linux-low.c: Likewise.
5079 * remote-utils.c: Likewise.
5080 * spu-low.c: Likewise.
5081 * utils.c: Likewise.
5082 * wincecompat.c: Likewise.
5083
87f6c4e3
GB
50842014-08-06 Gary Benson <gbenson@redhat.com>
5085
5086 * regcache.c (init_register_cache): Move conditionals inside if.
5087
7089dca4
GB
50882014-08-06 Gary Benson <gbenson@redhat.com>
5089
5090 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5091
462f517e
GB
50922014-07-31 Gary Benson <gbenson@redhat.com>
5093
5094 * ax.h: Do not include server.h.
5095 * gdbthread.h: Likewise.
5096 * lynx-low.h: Likewise.
5097 * notif.h: Likewise.
5098
976411d6
GB
50992014-07-30 Gary Benson <gbenson@redhat.com>
5100
5101 * server.h: Include common-defs.h.
5102 Do not include config.h or build-gnulib-gdbserver/config.h.
5103
d41f6d8e
GB
51042014-07-30 Gary Benson <gbenson@redhat.com>
5105
5106 * hostio-errno.c: Move server.h to top of includes list.
5107 * inferiors.c: Likewise.
5108 * linux-x86-low.c: Likewise.
5109 * notif.c: Include server.h.
5110
314c6a35
TT
51112014-07-24 Tom Tromey <tromey@redhat.com>
5112 Gary Benson <gbenson@redhat.com>
5113
5114 * server.h (CORE_ADDR): Now unsigned.
5115
69ff6be5
PA
51162014-07-16 Pedro Alves <palves@redhat.com>
5117
5118 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5119
ce9e3fe7
PA
51202014-07-15 Pedro Alves <palves@redhat.com>
5121
5122 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5123 copy.
5124
e76126e8
PA
51252014-07-11 Pedro Alves <palves@redhat.com>
5126
5127 * linux-low.c (kill_wait_lwp): New function, based on
5128 kill_one_lwp_callback, but use my_waitpid directly.
5129 (kill_one_lwp_callback, linux_kill): Use it.
5130
8e9db26e
PA
51312014-06-23 Pedro Alves <palves@redhat.com>
5132
5133 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5134 before setting DR0..DR3.
5135
698b3e08
GB
51362014-06-20 Gary Benson <gbenson@redhat.com>
5137
5138 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5139 * configure: Regenerated.
5140 * config.in: Likewise.
5141
125f8a3d
GB
51422014-06-20 Gary Benson <gbenson@redhat.com>
5143
5144 * Makefile.in (SFILES): Update locations for files moved
5145 from common to nat.
5146 (object file files): Reordered.
5147
42995dbd
GB
51482014-06-20 Gary Benson <gbenson@redhat.com>
5149
5150 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5151 (i386_dr_low_set_addr): Likewise.
5152 (i386_dr_low_get_addr): Likewise.
5153 (i386_dr_low_can_set_control): Likewise.
5154 (i386_dr_low_set_control): Likewise.
5155 (i386_dr_low_get_control): Likewise.
5156 (i386_dr_low_get_status): Likewise.
5157 (i386_get_debug_register_length): Likewise.
5158 * linux-x86-low.c (i386_dr_low_set_addr):
5159 Changed signature. Made static.
5160 (i386_dr_low_get_addr): Likewise.
5161 (i386_dr_low_set_control): Likewise.
5162 (i386_dr_low_get_control): Likewise.
5163 (i386_dr_low_get_status): Likewise.
5164 (i386_dr_low): New global variable.
5165 * win32-i386-low.c (i386_dr_low_set_addr):
5166 Changed signature. Made static.
5167 (i386_dr_low_get_addr): Likewise.
5168 (i386_dr_low_set_control): Likewise.
5169 (i386_dr_low_get_control): Likewise.
5170 (i386_dr_low_get_status): Likewise.
5171 (i386_dr_low): New global variable.
5172
e1d2394b
MS
51732014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5174
5175 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5176 * Makefile.in (AR, AR_FLAGS): Define.
5177 * configure: Regenerate.
5178
3a8ee006
GB
51792014-06-19 Gary Benson <gbenson@redhat.com>
5180
5181 * Makefile.in (i386-dregs.o): New rule.
5182 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5183 * i386-low.c (target.h): Remove include.
5184 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5185 (DR_CONTROL_SHIFT): Likewise.
5186 (DR_CONTROL_SIZE): Likewise.
5187 (DR_RW_EXECUTE): Likewise.
5188 (DR_RW_WRITE): Likewise.
5189 (DR_RW_READ): Likewise.
5190 (DR_RW_IORW): Likewise.
5191 (DR_LEN_1): Likewise.
5192 (DR_LEN_2): Likewise.
5193 (DR_LEN_4): Likewise.
5194 (DR_LEN_8): Likewise.
5195 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5196 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5197 (DR_ENABLE_SIZE): Likewise.
5198 (DR_LOCAL_SLOWDOWN): Likewise.
5199 (DR_GLOBAL_SLOWDOWN): Likewise.
5200 (DR_CONTROL_RESERVED): Likewise.
5201 (I386_DR_CONTROL_MASK): Likewise.
5202 (I386_DR_VACANT): Likewise.
5203 (I386_DR_LOCAL_ENABLE): Likewise.
5204 (I386_DR_GLOBAL_ENABLE): Likewise.
5205 (I386_DR_DISABLE): Likewise.
5206 (I386_DR_SET_RW_LEN): Likewise.
5207 (I386_DR_GET_RW_LEN): Likewise.
5208 (I386_DR_WATCH_HIT): Likewise.
5209 (i386_wp_op_t): Likewise.
5210 (i386_show_dr): Likewise.
5211 (i386_length_and_rw_bits): Likewise.
5212 (i386_insert_aligned_watchpoint): Likewise.
5213 (i386_remove_aligned_watchpoint): Likewise.
5214 (i386_handle_nonaligned_watchpoint): Likewise.
5215 i386_update_inferior_debug_regs(): Likewise.
5216 (i386_dr_insert_watchpoint): Likewise.
5217 (i386_dr_remove_watchpoint): Likewise.
5218 (i386_dr_region_ok_for_watchpoint): Likewise.
5219 (i386_dr_stopped_data_address): Likewise.
5220 (i386_dr_stopped_by_watchpoint): Likewise.
5221
8f26655c
GB
52222014-06-19 Gary Benson <gbenson@redhat.com>
5223
5224 * i386-low.c (i386_dr_show): Renamed to
5225 i386_show_dr and made static. All uses updated.
5226 (i386_dr_length_and_rw_bits): Renamed to
5227 i386_length_and_rw_bits and made static.
5228 All uses updated.
5229 (i386_dr_insert_aligned_watchpoint): Renamed to
5230 i386_insert_aligned_watchpoint and made static.
5231 All uses updated.
5232 (i386_dr_remove_aligned_watchpoint): Renamed to
5233 i386_remove_aligned_watchpoint and made static.
5234 All uses updated.
5235 (i386_dr_update_inferior_debug_regs): Renamed to
5236 i386_update_inferior_debug_regs and made static.
5237 All uses updated.
5238
b9228891
GB
52392014-06-18 Gary Benson <gbenson@redhat.com>
5240
5171def3
GB
5241 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5242 (i386_dr_low_can_set_control): Likewise.
5243 (i386_get_debug_register_length): Likewise.
5244 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5245 (i386_dr_low_can_set_control): Likewise.
5246 (i386_get_debug_register_length): Likewise.
5247
52482014-06-17 Gary Benson <gbenson@redhat.com>
5249
b9228891
GB
5250 * i386-low.h (i386-dregs.h): New include.
5251 (DR_FIRSTADDR): Now in i386-dregs.h.
5252 (DR_LASTADDR): Likewise.
5253 (DR_NADDR): Likewise.
5254 (DR_STATUS): Likewise.
5255 (DR_CONTROL): Likewise.
5256 (i386_debug_reg_state): Likewise.
5257 (i386_dr_insert_watchpoint): Likewise.
5258 (i386_dr_remove_watchpoint): Likewise.
5259 (i386_dr_region_ok_for_watchpoint): Likewise.
5260 (i386_dr_stopped_data_address): Likewise.
5261 (i386_dr_stopped_by_watchpoint): Likewise.
5262 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5263
4be83cc2
GB
52642014-06-18 Gary Benson <gbenson@redhat.com>
5265
5266 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5267 i386_dr_insert_watchpoint.
5268 (i386_low_remove_watchpoint): Renamed to
5269 i386_dr_remove_watchpoint.
5270 (i386_low_region_ok_for_watchpoint): Renamed to
5271 i386_dr_region_ok_for_watchpoint.
5272 (i386_low_stopped_data_address): Renamed to
5273 i386_dr_stopped_data_address.
5274 (i386_low_stopped_by_watchpoint): Renamed to
5275 i386_dr_stopped_by_watchpoint.
5276 * i386-low.c (i386_show_dr): Renamed to
5277 i386_dr_show and made nonstatic. All uses updated.
5278 (i386_length_and_rw_bits): Renamed to
5279 i386_dr_length_and_rw_bits and made nonstatic.
5280 All uses updated.
5281 (i386_insert_aligned_watchpoint): Renamed to
5282 i386_dr_insert_aligned_watchpoint and made nonstatic.
5283 All uses updated.
5284 (i386_remove_aligned_watchpoint): Renamed to
5285 i386_dr_remove_aligned_watchpoint and made nonstatic.
5286 All uses updated.
5287 (i386_update_inferior_debug_regs): Renamed to
5288 i386_dr_update_inferior_debug_regs and made nonstatic.
5289 All uses updated.
5290 (i386_low_insert_watchpoint): Renamed to
5291 i386_dr_insert_watchpoint. All uses updated.
5292 (i386_low_remove_watchpoint): Renamed to
5293 i386_dr_remove_watchpoint. All uses updated.
5294 (i386_low_region_ok_for_watchpoint): Renamed to
5295 i386_dr_region_ok_for_watchpoint. All uses updated.
5296 (i386_low_stopped_data_address): Renamed to
5297 i386_dr_stopped_data_address. All uses updated.
5298 (i386_low_stopped_by_watchpoint): Renamed to
5299 i386_dr_stopped_by_watchpoint. All uses updated.
5300
131aa0d4
GB
53012014-06-18 Gary Benson <gbenson@redhat.com>
5302
5303 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5304 (i386_dr_low_can_set_control): Likewise.
5305 (i386_insert_aligned_watchpoint): New check.
5306
d9305f7f
GB
53072014-06-18 Gary Benson <gbenson@redhat.com>
5308
5309 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5310 Renamed to state.
5311
e927c9fc
GB
53122014-06-18 Gary Benson <gbenson@redhat.com>
5313
5314 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5315 instead of fatal and error.
5316 (i386_handle_nonaligned_watchpoint): Likewise.
5317
1b6d4134
GB
53182014-06-18 Gary Benson <gbenson@redhat.com>
5319
5320 * i386-low.c (i386_get_debug_register_length): New macro.
5321 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5322 (i386_show_dr): Use debug_printf instead of fprintf. Use
5323 phex to format values.
5324
6e62758f
GB
53252014-06-18 Gary Benson <gbenson@redhat.com>
5326
5327 * i386-low.h: Comment changes.
5328 * i386-low.c: Likewise.
5329
fc6e2f03
GB
53302014-06-18 Gary Benson <gbenson@redhat.com>
5331
5332 * i386-low.c: Whitespace changes.
5333
f9d1eeed
TT
53342014-06-12 Tom Tromey <tromey@redhat.com>
5335
5336 * utils.c (freeargv): Remove.
5337
0b04e523
TT
53382014-06-12 Tom Tromey <tromey@redhat.com>
5339
5340 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5341 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5342 (parse_debug_format_options): Likewise.
5343 (gdbserver_usage): Likewise.
5344 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5345 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5346 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5347 against libiberty.
5348 ($(LIBGNU)): Depend on libiberty.
5349 (all-lib): Recurse into all subdirs.
5350 (install-only): Invoke "install" target in subdirs.
5351 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5352 targets.
5353 * configure: Rebuild.
5354 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5355 for vasprintf, vsnprintf, or gettimeofday.
5356 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5357 srv_tgtobj.
5358
270c9937
JB
53592014-06-05 Joel Brobecker <brobecker@adacore.com>
5360
5361 * development.sh: Delete.
5362 * Makefile.in (config.status): Adjust dependency on development.sh.
5363 * configure.ac: Adjust development.sh source call.
5364 * configure: Regenerate.
5365
0a261ed8
PA
53662014-06-02 Pedro Alves <palves@redhat.com>
5367
5368 * ax.c (gdb_free_agent_expr): New function.
5369 * ax.h (gdb_free_agent_expr): New declaration.
5370 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5371 list.
5372 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5373 static.
5374 (clear_breakpoint_conditions_and_commands): New function.
5375 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5376 (clear_breakpoint_conditions_and_commands): New declaration.
5377
e9dae05e
RR
53782014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5379
5380 * linux-aarch64-low.c (asm/ptrace.h): Include.
5381
5876f503
JK
53822014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5383
5384 Fix TLS access for -static -pthread.
5385 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5386 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5387 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5388
802e8e6d
PA
53892014-05-20 Pedro Alves <palves@redhat.com>
5390
5391 * linux-aarch64-low.c (aarch64_insert_point)
5392 (aarch64_remove_point): No longer check whether the type is
5393 supported here. Adjust to new interface.
5394 (the_low_target): Install aarch64_supports_z_point_type as
5395 supports_z_point_type method.
5396 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5397 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5398 instead of a Z packet char. Adjust.
5399 (arm_supports_z_point_type): New function.
5400 (arm_insert_point, arm_remove_point): Adjust to new interface.
5401 (the_low_target): Install arm_supports_z_point_type.
5402 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5403 (cris_insert_point, cris_remove_point): Adjust to new interface.
5404 Don't check whether the type is supported here.
5405 (the_low_target): Install cris_supports_z_point_type.
5406 * linux-low.c (linux_supports_z_point_type): New function.
5407 (linux_insert_point, linux_remove_point): Adjust to new interface.
5408 * linux-low.h (struct linux_target_ops) <insert_point,
5409 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5410 raw_breakpoint pointer parameter.
5411 <supports_z_point_type>: New method.
5412 * linux-mips-low.c (mips_supports_z_point_type): New function.
5413 (mips_insert_point, mips_remove_point): Adjust to new interface.
5414 Use mips_supports_z_point_type.
5415 (the_low_target): Install mips_supports_z_point_type.
5416 * linux-ppc-low.c (the_low_target): Install NULL as
5417 supports_z_point_type method.
5418 * linux-s390-low.c (the_low_target): Install NULL as
5419 supports_z_point_type method.
5420 * linux-sparc-low.c (the_low_target): Install NULL as
5421 supports_z_point_type method.
5422 * linux-x86-low.c (x86_supports_z_point_type): New function.
5423 (x86_insert_point): Adjust to new insert_point interface. Use
5424 insert_memory_breakpoint. Adjust to new
5425 i386_low_insert_watchpoint interface.
5426 (x86_remove_point): Adjust to remove_point interface. Use
5427 remove_memory_breakpoint. Adjust to new
5428 i386_low_remove_watchpoint interface.
5429 (the_low_target): Install x86_supports_z_point_type.
5430 * lynx-low.c (lynx_target_ops): Install NULL as
5431 supports_z_point_type callback.
5432 * nto-low.c (nto_supports_z_point_type): New.
5433 (nto_insert_point, nto_remove_point): Adjust to new interface.
5434 (nto_target_ops): Install nto_supports_z_point_type.
5435 * mem-break.c: Adjust intro comment.
5436 (struct raw_breakpoint) <raw_type, size>: New fields.
5437 <inserted>: Update comment.
5438 <shlib_disabled>: Delete field.
5439 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5440 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5441 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5442 (raw_bkpt_type_to_target_hw_bp_type): New function.
5443 (find_enabled_raw_code_breakpoint_at): New function.
5444 (find_raw_breakpoint_at): New type and size parameters. Use them.
5445 (insert_memory_breakpoint): New function, based off
5446 set_raw_breakpoint_at.
5447 (remove_memory_breakpoint): New function.
5448 (set_raw_breakpoint_at): Reimplement.
5449 (set_breakpoint): New, based on set_breakpoint_at.
5450 (set_breakpoint_at): Reimplement.
5451 (delete_raw_breakpoint): Go through the_target->remove_point
5452 instead of assuming memory breakpoints.
5453 (find_gdb_breakpoint_at): Delete.
5454 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5455 (find_gdb_breakpoint): New function.
5456 (set_gdb_breakpoint_at): Delete.
5457 (z_type_supported): New function.
5458 (set_gdb_breakpoint_1): New function, loosely based off
5459 set_gdb_breakpoint_at.
5460 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5461 (delete_gdb_breakpoint_at): Delete.
5462 (delete_gdb_breakpoint_1): New function, loosely based off
5463 delete_gdb_breakpoint_at.
5464 (delete_gdb_breakpoint): New function.
5465 (clear_gdb_breakpoint_conditions): Rename to ...
5466 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5467 breakpoint.
5468 (add_condition_to_breakpoint): Make static.
5469 (add_breakpoint_condition): Take a struct breakpoint pointer
5470 instead of an address. Adjust.
5471 (gdb_condition_true_at_breakpoint): Rename to ...
5472 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5473 z_type parameter.
5474 (gdb_condition_true_at_breakpoint): Reimplement.
5475 (add_breakpoint_commands): Take a struct breakpoint pointer
5476 instead of an address. Adjust.
5477 (gdb_no_commands_at_breakpoint): Rename to ...
5478 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5479 parameter. Return true if no breakpoint was found. Change debug
5480 output.
5481 (gdb_no_commands_at_breakpoint): Reimplement.
5482 (run_breakpoint_commands): Rename to ...
5483 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5484 and change return type to boolean.
5485 (run_breakpoint_commands): New function.
5486 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5487 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5488 breakpoint. Go through the_target->remove_point instead of
5489 assuming memory breakpoint.
5490 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5491 software and hardware breakpoints.
5492 (reinsert_raw_breakpoint): Go through the_target->insert_point
5493 instead of assuming memory breakpoint.
5494 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5495 software and hardware breakpoints.
5496 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5497 Check both software and hardware breakpoints.
5498 (validate_inserted_breakpoint): Assert the breakpoint is a
5499 software breakpoint. Set the inserted flag to -1 instead of
5500 setting shlib_disabled.
5501 (delete_disabled_breakpoints): Adjust.
5502 (validate_breakpoints): Only validate software breakpoints.
5503 Adjust to inserted flag change.
5504 (check_mem_read, check_mem_write): Skip breakpoint types other
5505 than software breakpoints. Adjust to inserted flag change.
5506 * mem-break.h (enum raw_bkpt_type): New enum.
5507 (raw_breakpoint, struct process_info): Forward declare.
5508 (Z_packet_to_target_hw_bp_type): Delete declaration.
5509 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5510 (set_gdb_breakpoint, delete_gdb_breakpoint)
5511 (clear_breakpoint_conditions): New declarations.
5512 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5513 (breakpoint_inserted_here): Update comment.
5514 (add_breakpoint_condition, add_breakpoint_commands): Replace
5515 address parameter with a breakpoint pointer parameter.
5516 (gdb_breakpoint_here): Update comment.
5517 (delete_gdb_breakpoint_at): Delete.
5518 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5519 * server.c (process_point_options): Take a struct breakpoint
5520 pointer instead of an address. Adjust.
5521 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5522 delete_gdb_breakpoint.
5523 * spu-low.c (spu_target_ops): Install NULL as
5524 supports_z_point_type method.
5525 * target.h: Include mem-break.h.
5526 (struct target_ops) <prepare_to_access_memory>: Update comment.
5527 <supports_z_point_type>: New field.
5528 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5529 instead of a char. Also take a raw breakpoint pointer.
5530 * win32-arm-low.c (the_low_target): Install NULL as
5531 supports_z_point_type.
5532 * win32-i386-low.c (i386_supports_z_point_type): New function.
5533 (i386_insert_point, i386_remove_point): Adjust to new interface.
5534 (the_low_target): Install i386_supports_z_point_type.
5535 * win32-low.c (win32_supports_z_point_type): New function.
5536 (win32_insert_point, win32_remove_point): Adjust to new interface.
5537 (win32_target_ops): Install win32_supports_z_point_type.
5538 * win32-low.h (struct win32_target_ops):
5539 <supports_z_point_type>: New method.
5540 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5541 instead of a char. Also take a raw breakpoint pointer.
5542
932539e3
PA
55432014-05-20 Pedro Alves <palves@redhat.com>
5544
5545 * mem-break.h: Include break-common.h.
5546 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5547 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5548 (Z_packet_to_target_hw_bp_type): New declaration.
5549 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5550 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5551 (Z_PACKET_ACCESS_WP): Delete macros.
5552 (Z_packet_to_hw_type): Delete function.
5553 * i386-low.h: Don't include break-common.h here.
5554 (Z_packet_to_hw_type): Delete declaration.
5555 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5556 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5557 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5558 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5559 * linux-aarch64-low.c: Don't include break-common.h here.
5560 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5561 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5562 (Z_packet_to_target_hw_bp_type): Delete function.
5563 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5564 function.
5565 (mips_insert_point, mips_remove_point): Use
5566 Z_packet_to_target_hw_bp_type.
5567
4ff0d3d8
PA
55682014-05-20 Pedro Alves <palves@redhat.com>
5569
5570 * linux-aarch64-low.c: Include break-common.h.
5571 (enum target_point_type): Delete.
5572 (Z_packet_to_point_type): Rename to ...
5573 (Z_packet_to_target_hw_bp_type): ... this, and return a
5574 target_hw_bp_type instead.
5575 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5576 instead of an enum target_point_type.
5577 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5578 breakpoint type.
5579 (aarch64_dr_state_insert_one_point)
5580 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5581 (aarch64_handle_aligned_watchpoint)
5582 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5583 Take an enum target_hw_bp_type instead of an enum
5584 target_point_type.
5585 (aarch64_supports_z_point_type): New function.
5586 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5587 use Z_packet_to_target_hw_bp_type.
5588
786dc519
JB
55892014-05-20 Joel Brobecker <brobecker@adacore.com>
5590
5591 * configure.ac: Only use -Werror by default when DEVELOPMENT
5592 is true.
5593 * configure: Regenerate.
5594
9e0aa64f
JK
55952014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5596
5597 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5598 * linux-x86-low.c (X86_64_USER_REGS): New.
5599 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5600
2b577b92
YQ
56012014-04-28 Yao Qi <yao@codesourcery.com>
5602
5603 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5604 name.
5605
94611da2
PA
56062014-04-25 Pedro Alves <palves@redhat.com>
5607
5608 PR server/16255
5609 * linux-low.c (linux_attach_fail_reason_string): New function.
5610 (linux_attach_lwp): Delete.
5611 (linux_attach_lwp_1): Rename to ...
5612 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5613 argument. Remove "initial" parameter. Return int instead of
5614 void. Don't error or warn here.
5615 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5616 failure to attach to the tgid. Call warning when failing to
5617 attach to an lwp.
5618 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5619 argument. Remove "initial" parameter. Return int instead of
5620 void. Don't error or warn here.
5621 (linux_attach_fail_reason_string): New declaration.
5622 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5623 interface change. Use linux_attach_fail_reason_string.
5624
01f9f808
MS
56252014-04-24 Michael Sturm <michael.sturm@mintel.com>
5626 Walfred Tedeschi <walfred.tedeschi@intel.com>
5627
5628 * Makefile.in: Added rules to handle new files
5629 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5630 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5631 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5632 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5633 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5634 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5635 x32-avx512-linux.o.
5636 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5637 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5638 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5639 i386/x32-avx512.xml.
5640 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5641 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5642 i386/x32-avx512-linux.xml.
5643 * i387-fp.c (num_avx512_k_registers): New constant for number
5644 of K registers.
5645 (num_avx512_zmmh_low_registers): New constant for number of
5646 lower ZMM registers (0-15).
5647 (num_avx512_zmmh_high_registers): New constant for number of
5648 higher ZMM registers (16-31).
5649 (num_avx512_ymmh_registers): New contant for number of higher
5650 YMM registers (ymm16-31 added by avx521 on x86_64).
5651 (num_avx512_xmm_registers): New constant for number of higher
5652 XMM registers (xmm16-31 added by AVX512 on x86_64).
5653 (struct i387_xsave): Add space for AVX512 registers.
5654 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5655 Add code to handle AVX512 registers.
5656 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5657 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5658 prototypei from generated file.
5659 (tdesc_amd64_avx512_linux): Likewise.
5660 (init_registers_x32_avx512_linux): Likewise.
5661 (tdesc_x32_avx512_linux): Likewise.
5662 (init_registers_i386_avx512_linux): Likewise.
5663 (tdesc_i386_avx512_linux): Likewise.
5664 (x86_64_regmap): Add AVX512 registers.
5665 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5666 mask.
5667 (initialize_low_arch): Add code to initialize AVX512 registers.
5668
51aa91f9
PA
56692014-04-23 Pedro Alves <palves@redhat.com>
5670
5671 * mem-break.c (find_gdb_breakpoint_at): Make static.
5672 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5673
a4165e94
PA
56742014-04-23 Pedro Alves <palves@redhat.com>
5675
5676 * i386-low.c: Don't include break-common.h here.
5677 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5678 prototype to take target_hw_bp_type as argument instead of a Z
5679 packet char.
5680 * i386-low.h: Include break-common.h here.
5681 (Z_packet_to_hw_type): Declare.
5682 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5683 prototypes.
5684 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5685 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5686 (x86_remove_point): Convert the packet number to a
5687 target_hw_bp_type before calling i386_low_remove_watchpoint.
5688 * win32-i386-low.c (i386_insert_point): Convert the packet number
5689 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5690 (i386_remove_point): Convert the packet number to a
5691 target_hw_bp_type before calling i386_low_remove_watchpoint.
5692
b8acf843
PA
56932014-04-23 Pedro Alves <palves@redhat.com>
5694
5695 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5696
d708bcd1
PA
56972014-04-10 Pedro Alves <palves@redhat.com>
5698
5699 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5700 Check if the condition or command is NULL before checking if the
5701 breakpoint is known. On success, return true.
5702 * mem-break.h (add_breakpoint_condition): Document return.
5703 (add_breakpoint_commands): Add describing comment.
5704 * server.c (skip_to_semicolon): New function.
5705 (process_point_options): Use it.
5706
2eec7d5b
PA
57072014-04-09 Pedro Alves <palves@redhat.com>
5708
5709 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5710 to lwpid_of.
5711
fa96cb38
PA
57122014-02-27 Pedro Alves <palves@redhat.com>
5713
5714 PR 12702
5715 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5716 macros.
5717 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5718 output.
5719 (last_thread_of_process_p): Take a PID argument instead of a
5720 thread pointer.
5721 (linux_wait_for_lwp): Delete.
5722 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5723 functions.
5724 (linux_low_filter_event): New function, party factored out from
5725 linux_wait_for_event.
5726 (linux_wait_for_event): Rename to ...
5727 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5728 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5729 sigsuspend. Check for zombie leaders.
5730 (linux_wait_for_event): Reimplement as wrapper around
5731 linux_wait_for_event_filtered.
5732 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5733 a normal or signal exit is seen, it's the whole process exiting.
5734 (wait_for_sigstop): No longer a for_each_inferior callback.
5735 Rewrite on top of linux_wait_for_event_filtered.
5736 (stop_all_lwps): Call wait_for_sigstop directly.
5737 * server.c (resume, handle_target_event): Handle
5738 TARGET_WAITKIND_NO_RESUMED.
5739
d763de10
JB
57402014-02-26 Joel Brobecker <brobecker@adacore.com>
5741
5742 * win32-low.c (psapi_get_dll_name,
5743 * win32_CreateToolhelp32Snapshot): Delete.
5744 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5745 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5746 Delete.
5747 (handle_load_dll): Add function description.
5748 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5749
850a0f76
JB
57502014-02-26 Joel Brobecker <brobecker@adacore.com>
5751
5752 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5753 Add comment.
5754 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5755 base address when calling win32_add_one_solib.
5756 (handle_load_dll): Delete local variable load_addr.
5757 Remove 0x1000 offset applied to DLL base address when calling
5758 win32_add_one_solib.
5759 (handle_unload_dll): Add comment.
5760
f25b3fc3
JB
57612014-02-26 Joel Brobecker <brobecker@adacore.com>
5762
5763 * win32-low.c (win32_add_all_dlls): Renames
5764 win32_ensure_ntdll_loaded. Rewrite function documentation.
5765 Adjust implementation to always load all DLLs.
5766 Add 0x1000 offset to DLL base address when calling
5767 win32_add_one_solib.
5768 (child_initialization_done): New static global.
5769 (do_initial_child_stuff): Set child_initialization_done to
5770 zero during child initialization, and 1 after. Replace call
5771 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5772 Add comment.
5773 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5774 (handle_unload_dll): Add function documentation.
5775 (get_child_debug_event): Ignore load and unload DLL events
5776 during child initialization.
5777
d86d4aaf
DE
57782014-02-20 Doug Evans <dje@google.com>
5779
3bc32da3 5780 Remove global all_lwps.
d86d4aaf
DE
5781 * inferiors.h (ptid_of): Move here from linux-low.h.
5782 (pid_of, lwpid_of): Ditto.
5783 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5784 parameter is a struct thread_info * now.
5785 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5786 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5787 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5788 directly.
5789 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5790 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5791 * linux-arm-low.c (update_registers_callback): Update, "entry"
5792 parameter is a struct thread_info * now.
5793 Fetch lwpid from current_inferior directly.
5794 (arm_insert_point): Pass &all_threads to find_inferior instead of
5795 &all_lwps.
5796 (arm_remove_point): Ditto.
5797 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5798 (arm_prepare_to_resume): Fetch pid from thread.
5799 (arm_read_description): Fetch lwpid from current_inferior directly.
5800 * linux-low.c (all_lwps): Delete.
5801 (delete_lwp): Delete call to remove_inferior.
5802 (handle_extended_wait): Fetch lwpid from thread.
5803 (add_lwp): Don't set lwp->entry.id. Remove call to
5804 add_inferior_to_list.
5805 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5806 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5807 (kill_one_lwp_callback): Ditto.
5808 (linux_kill): Don't dereference NULL pointer.
5809 Fetch ptid,lwpid from thread.
5810 (get_detach_signal): Fetch ptid from thread.
5811 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5812 Simplify call to regcache_invalidate_thread.
5813 (delete_lwp_callback): Update, "entry" parameter is a
5814 struct thread_info * now. Fetch pid from thread.
5815 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5816 (status_pending_p_callback): Update, "entry" parameter is a
5817 struct thread_info * now. Fetch ptid from thread.
5818 (find_lwp_pid): Update, "entry" parameter is a
5819 struct thread_info * now.
5820 (linux_wait_for_lwp): Fetch pid from thread.
5821 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5822 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5823 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5824 (dequeue_one_deferred_signal): Ditto.
5825 (cancel_breakpoint): Fetch ptid from current_inferior.
5826 (linux_wait_for_event): Pass &all_threads to find_inferior,
5827 not &all_lwps. Fetch ptid, lwpid from thread.
5828 (count_events_callback): Update, "entry" parameter is a
5829 struct thread_info * now.
5830 (select_singlestep_lwp_callback): Ditto.
5831 (select_event_lwp_callback): Ditto.
5832 (cancel_breakpoints_callback): Ditto.
5833 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5834 not &all_lwps.
5835 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5836 (unsuspend_one_lwp): Update, "entry" parameter is a
5837 struct thread_info * now.
5838 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5839 not &all_lwps.
5840 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5841 Fetch lwpid from thread, not lwp.
5842 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5843 Pass &all_threads to find_inferior, not &all_lwps.
5844 (send_sigstop): Fetch lwpid from thread, not lwp.
5845 (send_sigstop_callback): Update, "entry" parameter is a
5846 struct thread_info * now.
5847 (suspend_and_send_sigstop_callback): Ditto.
5848 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5849 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5850 struct thread_info * now.
5851 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5852 from thread, lwp.
5853 (lwp_running): Update, "entry" parameter is a
5854 struct thread_info * now.
5855 (stop_all_lwps): Fetch ptid from thread.
5856 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5857 (linux_resume_one_lwp): Fetch lwpid from thread.
5858 (linux_set_resume_request): Update, "entry" parameter is a
5859 struct thread_info * now. Fetch pid, lwpid from thread.
5860 (resume_status_pending_p): Update, "entry" parameter is a
5861 struct thread_info * now.
5862 (need_step_over_p): Ditto. Fetch lwpid from thread.
5863 (start_step_over): Fetch lwpid from thread.
5864 (linux_resume_one_thread): Update, "entry" parameter is a
5865 struct thread_info * now. Fetch lwpid from thread.
5866 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5867 (proceed_one_lwp): Update, "entry" parameter is a
5868 struct thread_info * now. Fetch lwpid from thread.
5869 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5870 struct thread_info * now.
5871 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5872 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5873 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5874 directly.
5875 (regsets_store_inferior_registers): Ditto.
5876 (fetch_register, store_register): Ditto.
5877 (linux_read_memory, linux_write_memory): Ditto.
5878 (linux_request_interrupt): Ditto.
5879 (linux_read_auxv): Ditto.
5880 (linux_xfer_siginfo): Ditto.
5881 (linux_qxfer_spu): Ditto.
5882 (linux_qxfer_libraries_svr4): Ditto.
5883 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5884 moved to inferiors.h.
5885 (get_lwp): Delete.
5886 (get_thread_lwp): Update.
5887 (struct lwp_info): Delete member "entry". Simplify comment for
5888 member "thread".
5889 (all_lwps): Delete.
5890 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5891 current_inferior directly.
5892 (update_watch_registers_callback): Update, "entry" parameter is a
5893 struct thread_info * now. Fetch pid from thread.
5894 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5895 (mips_insert_point): Fetch lwpid from current_inferior.
5896 Pass &all_threads to find_inferior, not &all_lwps.
5897 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5898 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5899 directly.
5900 (mips_stopped_data_address): Ditto.
5901 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5902 directly.
5903 * linux-tile-low.c (tile_arch_setup): Ditto.
5904 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5905 (update_debug_registers_callback): Update, "entry" parameter is a
5906 struct thread_info * now. Fetch pid from thread.
5907 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5908 Pass &all_threads to find_inferior, not &all_lwps.
5909 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5910 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5911 Pass &all_threads to find_inferior, not &all_lwps.
5912 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5913 (i386_dr_low_get_status): Ditto.
5914 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5915 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5916 (x86_linux_read_description): Ditto.
5917 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5918
3b8361aa
DE
59192014-02-20 Doug Evans <dje@google.com>
5920
5921 * inferiors.c (get_first_inferior): Fix buglet.
5922
f7667f0d
DE
59232014-02-19 Doug Evans <dje@google.com>
5924
5925 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5926 * inferiors.c (add_thread): Change result type to struct thread_info *.
5927 All callers updated.
5928 (add_lwp): Call add_thread here instead of in callers.
5929 All callers updated.
5930 * linux-low.h (get_lwp_thread): Rewrite.
5931 (struct lwp_info): New member "thread".
5932
b3312d80
DE
59332014-02-19 Doug Evans <dje@google.com>
5934
5935 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5936 All callers updated.
5937
ecc6f45c
DE
59382014-02-19 Doug Evans <dje@google.com>
5939
5940 * inferiors.c (add_thread): Fix whitespace.
5941
649ebbca
DE
59422014-02-19 Doug Evans <dje@google.com>
5943
5944 * dll.c (clear_dlls): Replace accessing list implemention details
5945 with API function.
5946 * gdbthread.h (get_first_thread): Declare.
5947 * inferiors.c (for_each_inferior_with_data): New function.
5948 (get_first_thread): New function.
5949 (find_thread_ptid): Simplify.
5950 (get_first_inferior): New function.
5951 (clear_list): Delete.
5952 (one_inferior_p): New function.
5953 (clear_inferior_list): New function.
5954 (clear_inferiors): Update.
5955 * inferiors.h (for_each_inferior_with_data): Declare.
5956 (clear_inferior_list): Declare.
5957 (one_inferior_p): Declare.
5958 (get_first_inferior): Declare.
5959 * linux-low.c (linux_wait_for_event): Replace accessing list
5960 implemention details with API function.
5961 * server.c (target_running): Ditto.
5962 (accumulate_file_name_length): New function.
5963 (emit_dll_description): New function.
5964 (handle_qxfer_libraries): Replace accessing list implemention
5965 details with API function.
5966 (handle_qxfer_threads_worker): New function.
5967 (handle_qxfer_threads_proper): Replace accessing list implemention
5968 details with API function.
5969 (handle_query): Ditto.
5970 (visit_actioned_threads_callback_ftype): New typedef.
5971 (visit_actioned_threads_data): New struct.
5972 (visit_actioned_threads): Rewrite to be find_inferior callback.
5973 (resume): Call find_inferior.
5974 (handle_status): Replace accessing list implemention
5975 details with API function.
5976 (process_serial_event): Replace accessing list implemention details
5977 with API function.
5978 * target.c (set_desired_inferior): Replace accessing list implemention
5979 details with API function.
5980 * tracepoint.c (same_process_p): New function.
5981 (gdb_agent_about_to_close): Replace accessing list implemention
5982 details with API function.
5983 * win32-low.c (child_delete_thread): Replace accessing list
5984 implemention details with API function.
5985 (match_dll_by_basename): New function.
5986 (dll_is_loaded_by_basename): New function.
5987 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5988 details call to dll_is_loaded_by_basename.
5989
80894984
DE
59902014-02-19 Doug Evans <dje@google.com>
5991
5992 * dll.h (struct dll_info): Add comment.
5993 * gdbthread.h (struct thread_info): Add comment.
5994 (current_ptid): Simplify.
5995 * inferiors.c (add_process): Update.
5996 (remove_process): Update.
5997 * inferiors.h (struct process_info): Rename member "head" to "entry".
5998 * linux-low.c (delete_lwp): Update.
5999 (add_lwp): Update.
6000 (last_thread_of_process_p): Update.
6001 (kill_one_lwp_callback, linux_kill): Update.
6002 (status_pending_p_callback): Update.
6003 (wait_for_sigstop): Update. Simplify read of ptid.
6004 (start_step_over): Update.
6005 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6006 (get_lwp_thread): Update.
6007 (struct lwp_info): Rename member "head" to "entry".
6008 * regcache.h (inferior_list_entry): Delete.
6009 * server.c (kill_inferior_callback): Update.
6010 (detach_or_kill_inferior_callback): Update.
6011 (print_started_pid): Update.
6012 (print_attached_pid): Update.
6013 (process_serial_event): Simplify read of ptid.
6014 * thread-db.c (thread_db_create_event): Update.
6015 (thread_db_get_tls_address): Update.
6016 * win32-low.c (current_inferior_ptid): Simplify.
6017
46917d26
TT
60182014-02-19 Tom Tromey <tromey@redhat.com>
6019
6020 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6021 argument.
6022 (target_supports_btrace): Update.
6023
0759a81e
YQ
60242014-02-14 Yao Qi <yao@codesourcery.com>
6025
6026 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6027 (rsp-low-ipa.o): New target.
6028
a7191e8b
TT
60292014-02-12 Tom Tromey <tromey@redhat.com>
6030
6031 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6032 convert_ascii_to_int.
6033 * regcache.c (registers_to_string): Likewise.
6034 * remote-utils.c (decode_M_packet): Likewise.
6035 * server.c (process_serial_event): Likewise.
6036
ff0e980e
TT
60372014-02-12 Tom Tromey <tromey@redhat.com>
6038
6039 * server.c (handle_query, handle_v_run): Use hex2bin, not
6040 unhexify.
6041 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6042
e9371aff
TT
60432014-02-12 Tom Tromey <tromey@redhat.com>
6044
6045 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6046 convert_int_to_ascii.
6047 * regcache.c (registers_to_string, collect_register_as_string):
6048 Likewise.
6049 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6050 Likewise.
6051 * server.c (process_serial_event): Likewise.
6052 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6053 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6054
971dc0b8
TT
60552014-02-12 Tom Tromey <tromey@redhat.com>
6056
6057 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6058 bin2hex, not hexify.
6059 * tracepoint.c (cmd_qtstatus): Likewise.
6060
0a822afb
TT
60612014-02-12 Tom Tromey <tromey@redhat.com>
6062
6063 * remote-utils.c (monitor_output): Pass explicit length to
6064 hexify.
6065
9c3d6531
TT
60662014-02-12 Tom Tromey <tromey@redhat.com>
6067
6068 * tracepoint.c: Include rsp-low.h.
6069 * server.c: Include rsp-low.h.
6070 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6071 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6072 declare.
6073 * remote-utils.c: Include rsp-low.h.
6074 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6075 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6076 (convert_int_to_ascii, convert_ascii_to_int): Move to
6077 common/rsp-low.c.
6078 * regcache.c: Include rsp-low.h.
6079 * ax.c: Include rsp-low.h.
6080 * Makefile.in (SFILES): Add common/rsp-low.c.
6081 (OBS): Add rsp-low.o.
6082 (rsp-low.o): New target.
6083
01fd3ea5
TT
60842014-02-12 Tom Tromey <tromey@redhat.com>
6085
6086 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6087 Include print-utils.h.
6088 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6089 (plongest, thirty_two, phex_nz): Remove.
6090 * Makefile.in (SFILES): Add common/print-utils.c.
6091 (OBS): Add print-utils.o.
6092 (print-utils-ipa.o): New target.
6093 (print-utils.o): New target.
6094 (IPA_OBJS): Add print-utils-ipa.o.
6095
e99dc820
TT
60962014-02-06 Tom Tromey <tromey@redhat.com>
6097
6098 * Makefile.in (SFILES): Fix indentation.
6099
ee1e2d4f
DE
61002014-02-05 Doug Evans <dje@google.com>
6101
6102 * linux-low.c (linux_wait_for_event): Improve comment.
6103 (linux_wait_1): Keep current_inferior in sync with event_child.
6104
f5a02773
DE
61052014-01-22 Doug Evans <dje@google.com>
6106
6107 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6108
87ce2a04
DE
61092014-01-22 Doug Evans <dje@google.com>
6110
6111 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6112 * configure: Regenerate.
6113 * config.in: Regenerate.
6114 * Makefile.in (SFILES): Add debug.c.
6115 (OBS): Add debug.o.
6116 * debug.c: New file.
6117 * debug.h: New file.
6118 * linux-aarch64-low.c (*): Update all debugging printfs to use
6119 debug_printf instead of fprintf.
6120 * linux-arm-low.c (*): Ditto.
6121 * linux-cris-low.c (*): Ditto.
6122 * linux-crisv32-low.c (*): Ditto.
6123 * linux-m32r-low.c (*): Ditto.
6124 * linux-sparc-low.c (*): Ditto.
6125 * linux-x86.c (*): Ditto.
6126 * linux-low.c (*): Ditto.
6127 (linux_wait_1): Add calls to debug_enter, debug_exit.
6128 (linux_wait): Remove redundant debugging printf.
6129 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6130 (linux_resume, unstop_all_lwps): Ditto.
6131 * mem-break.c (*): Update all debugging printfs to use
6132 debug_printf instead of fprintf.
6133 * remote-utils.c (*): Ditto.
6134 * thread-db.c (*): Ditto.
6135 * server.c #include <ctype.h>, "gdb_vecs.h".
6136 (debug_threads): Moved to debug.c.
6137 (*): Update all debugging printfs to use debug_printf instead of
6138 fprintf.
6139 (start_inferior): Replace call to fflush with call to debug_flush.
6140 (monitor_show_help): Mention set debug-format.
6141 (parse_debug_format_options): New function.
6142 (handle_monitor_command): Handle "monitor set debug-format".
6143 (gdbserver_usage): Mention --debug-format.
6144 (main): Parse --debug-format.
6145 * server.h (debug_threads): Declaration moved to debug.h.
6146 #include "debug.h".
6147 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6148 trace_debug_1 that uses debug_printf.
6149 (tracepoint_look_up_symbols): Update all debugging printfs to use
6150 debug_printf instead of fprintf.
6151
e671835b
BS
61522014-01-20 Baruch Siach <baruch@tkos.co.il>
6153
6154 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6155 sys/ptrace.h.
6156
b5737fa9
PA
61572014-01-17 Pedro Alves <palves@redhat.com>
6158
ea38d2a9 6159 PR build/16445
c7faa97a
PA
6160 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6161 defined after including gdb_proc_service.h.
b5737fa9 6162
40ed484e
DE
61632014-01-16 Doug Evans <dje@google.com>
6164
6165 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6166 (match_dll): Use it.
6167
969c39fb
MM
61682014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6169
6170 * target.h (target_ops) <read_btrace>: Change parameters and
6171 return type to allow error reporting.
6172 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6173 trace reading errors on.
6174 * linux-low.c (linux_low_read_btrace): Pass trace reading
6175 errors on.
6176 (linux_low_disable_btrace): New.
6177
ab7f45ba
DE
61782014-01-15 Doug Evans <dje@google.com>
6179
6180 * inferiors.c (thread_id_to_gdb_id): Delete.
6181 * inferiors.h (thread_id_to_gdb_id): Delete.
6182
66af0f44
EZ
61832014-01-13 Eli Zaretskii <eliz@gnu.org>
6184
6185 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6186 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6187 versions.
6188
9939e131
PA
61892014-01-08 Pedro Alves <palves@redhat.com>
6190
6191 * server.c (handle_status): Don't discard previous queued stop
6192 replies or thread's pending status here.
6193 (main) <disconnection>: Do it here instead.
6194
b7ea362b
PA
61952014-01-08 Pedro Alves <palves@redhat.com>
6196
6197 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6198 * server.c (visit_actioned_threads, handle_pending_status): New
6199 function.
6200 (handle_v_cont): Factor out parts to ...
6201 (resume): ... this new function. If in all-stop, and a thread
6202 being resumed has a pending status, report it without actually
6203 resuming.
6204 (myresume): Adjust to use the new 'resume' function.
6205 (clear_pending_status_callback, set_pending_status_callback)
6206 (find_status_pending_thread_callback): New functions.
6207 (handle_status): Handle the case of multiple threads having
6208 interesting statuses to report. Report threads' real last signal
6209 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6210 with an interesting thread to report the status for, instead of
6211 always reporting the status of the first thread.
6212
28498c42
JB
62132014-01-01 Joel Brobecker <brobecker@adacore.com>
6214
6215 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6216 * gdbreplay.c (gdbreplay_version): Likewise.
6217
f45c82da
YZ
62182013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6219
6220 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6221 iov.iov_len with the real length in use.
6222
379a5e2d
JB
62232013-12-13 Joel Brobecker <brobecker@adacore.com>
6224
6225 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6226 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6227 for all targets that use win32-low.c.
6228 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6229 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6230
4210d83e
PA
62312013-12-13 Pedro Alves <palves@redhat.com>
6232
6233 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6234 if equal to TARGET_WAITKIND_LOADED.
6235 * win32-low.c (cached_status): New static global.
6236 (win32_wait): Add declaration.
6237 (do_initial_child_stuff): Flush all initial pending debug events
6238 up to the initial breakpoint.
6239 (win32_wait): If CACHED_STATUS was set, return that instead
6240 of doing a real wait. Remove the code resuming the execution
6241 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6242 during the initial phase. Also remove the code changing
6243 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6244 TARGET_WAITKIND_STOPPED.
6245
e7f0d979
YQ
62462013-12-11 Yao Qi <yao@codesourcery.com>
6247
6248 * notif.c (handle_notif_ack): Return 0 if no notification
6249 matches.
6250
ebcf782c
DE
62512013-11-20 Doug Evans <dje@google.com>
6252
6253 * linux-low.c (linux_set_resume_request): Fix comment.
6254
20ad9378
DE
62552013-11-20 Doug Evans <dje@google.com>
6256
6257 * linux-low.c (resume_status_pending_p): Tweak comment.
6258
a196ebeb
WT
62592013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6260
6261 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6262 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6263 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6264 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6265 (srv_amd64_regobj): Add amd64-mpx.o.
6266 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6267 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6268 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6269 * i387-fp.c (num_pl_bnd_register) Added constant.
6270 (num_pl_bnd_cfg_registers) Added constant.
6271 (struct i387_xsave) Added reserved area and MPX fields.
6272 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6273 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6274 function.
6275 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6276 (init_registers_amd64_mpx_linux): Declare new function.
6277 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6278 (x86_64_regmap): Add MPX registers.
6279 (x86_linux_read_description): Add MPX case.
6280 (initialize_low_arch): Initialize MPX targets.
6281
0080a2f6
TT
62822013-11-18 Tom Tromey <tromey@redhat.com>
6283
6284 * configure: Rebuild.
6285 * configure.ac: Don't check for stdlib.h.
6286 * gdbreplay.c: Unconditionally include stdlib.h.
6287
2978b111
TT
62882013-11-18 Tom Tromey <tromey@redhat.com>
6289
6290 * config.in: Rebuild.
6291 * configure: Rebuild.
6292 * configure.ac: Don't use AC_HEADER_DIRENT.
6293
a3d08894
TT
62942013-11-18 Tom Tromey <tromey@redhat.com>
6295
6296 * server.h: Don't check HAVE_STRING_H.
6297 * gdbreplay.c: Don't check HAVE_STRING_H.
6298 * configure: Rebuild.
6299
0a5dd17d
TT
63002013-11-18 Tom Tromey <tromey@redhat.com>
6301
6302 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6303 LIBGNU.
6304
1bd2f0ba
TT
63052013-11-08 Tom Tromey <tromey@redhat.com>
6306
6307 * configure, config.in: Rebuild.
6308 * configure.ac: Remove unused configury.
6309
3266f10b
TT
63102013-11-08 Tom Tromey <tromey@redhat.com>
6311
6312 * acinclude.m4: Include common.m4, codeset.m4.
6313 * configure, config.in: Rebuild.
6314 * configure.ac: Use GDB_AC_COMMON.
6315
6682d959
AA
63162013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6317
6318 * linux-s390-low.c (HWCAP_S390_TE): New define.
6319 (s390_arch_setup): Consider the TE field in the HWCAP for
6320 determining 'have_regset_tdb'.
6321
fd0a4d76
SDJ
63222013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6323
6324 PR gdb/16014
6325 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6326 call to sizeof.
6327
1a3d890b
PA
63282013-10-02 Pedro Alves <palves@redhat.com>
6329
6330 * server.c (process_serial_event): Don't output "GDBserver
6331 exiting" if GDB is connected through stdio.
6332 * target.c (mywait): Likewise, be silent if GDB is connected
6333 through stdio.
6334
97ad4581
JB
63352013-10-01 Joel Brobecker <brobecker@adacore.com>
6336
6337 * lynx-low.c (lynx_add_threads_after_attach): New function.
6338 (lynx_attach): Remove call to add_thread. Add call to
6339 lynx_add_threads_after_attach instead.
6340
5b4e221c
MF
63412013-09-28 Mike Frysinger <vapier@gentoo.org>
6342
6343 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6344 * config.in, configure: Regenerated.
6345
ee47b2f8
YQ
63462013-09-18 Yao Qi <yao@codesourcery.com>
6347
6348 PR server/15959
6349 * server.c (start_inferior): Clear 'resume_info'.
6350
d6707650 63512013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6352
d6707650
JW
6353 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6354 for each register.
6355
9243dd0e 63562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6357
9243dd0e
JW
6358 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6359 linux-tile-low.o to srv_tgtobj.
6360
c623a6ef
WN
63612013-09-16 Will Newton <will.newton@linaro.org>
6362
6363 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6364 out regs.
6365
fb71d39e
PA
63662013-09-06 Pedro Alves <palves@redhat.com>
6367
6368 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6369 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6370 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6371 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6372 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6373 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6374
8e7e9910
PA
63752013-09-06 Pedro Alves <palves@redhat.com>
6376
6377 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6378 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6379
7c3a12ca
PA
63802013-09-06 Pedro Alves <palves@redhat.com>
6381
6382 * linux-amd64-ipa.c: Include tracepoint.h.
6383 * linux-i386-ipa.c: Include tracepoint.h.
6384
8eb3d7b6
RW
63852013-09-06 Ricard Wanderlof <ricardw@axis.com>
6386
6387 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6388 (ps_get_thread_area): New function.
6389
eddddb9d
RW
63902013-09-06 Ricard Wanderlof <ricardw@axis.com>
6391
6392 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6393 (initialize_low_arch): Call init_registers_crisv32 rather than
6394 init_register_crisv32.
6395
533b0600
PA
63962013-09-05 Pedro Alves <palves@redhat.com>
6397
6398 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6399 to ...
6400 * hostio.h: ... this new file.
6401 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6402 win32-low.c: Include hostio.h.
6403
0ce3d3b5
PA
64042013-09-05 Pedro Alves <palves@redhat.com>
6405
6406 * server.h (gdb_client_data, handler_func, callback_handler_func)
6407 (delete_file_handler, add_file_handler, append_callback_event)
6408 (delete_callback_event, start_event_loop, initialize_event_loop):
6409 Move to event-loop.h and include it.
6410 * event-loop.h: New file.
6411
799cdc37
PA
64122013-09-05 Pedro Alves <palves@redhat.com>
6413
6414 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6415 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6416 (loaded_dll, unloaded_dll): Move to ...
6417 * dll.h: ... this new file.
6418 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6419
6a6bbd9d
PA
64202013-09-05 Pedro Alves <palves@redhat.com>
6421
6422 * server.h (current_process, get_thread_process, all_processes)
6423 (add_inferior_to_list, for_each_inferior, current_inferior)
6424 (remove_inferior, add_process, remove_process, find_process_pid)
6425 (have_started_inferiors_p, have_attached_inferiors_p)
6426 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6427 (clear_inferiors, find_inferior, find_inferior_id)
6428 (inferior_target_data, set_inferior_target_data)
6429 (inferior_regcache_data, set_inferior_regcache_data): Move to
6430 inferiors.h, and include it.
6431 * inferiors.h: New file.
6432
f699aaba
PA
64332013-09-05 Pedro Alves <palves@redhat.com>
6434
6435 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6436 Move ...
72f4393d 6437 * ax.h: ... here.
f699aaba 6438
c144c7a0
PA
64392013-09-05 Pedro Alves <palves@redhat.com>
6440
6441 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6442 tracepoint.h.
6443 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6444 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6445 (handle_tracepoint_general_set, handle_tracepoint_query)
6446 (tracepoint_finished_step, tracepoint_was_hit)
6447 (release_while_stepping_state_list, current_traceframe)
6448 (in_readonly_region, traceframe_read_mem)
6449 (fetch_traceframe_registers, traceframe_read_sdata)
6450 (traceframe_read_info, struct fast_tpoint_collect_status)
6451 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6452 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6453 (supply_fast_tracepoint_registers)
6454 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6455 (ipa_tdesc, claim_trampoline_space)
6456 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6457 (agent_mem_read, agent_get_trace_state_variable_value)
6458 (agent_set_trace_state_variable_value, agent_tsv_read)
6459 (agent_mem_read_string, get_raw_reg_func_addr)
6460 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6461 * tracepoint.h: ... this new file.
6462
ff42e6ab
PA
64632013-09-05 Pedro Alves <palves@redhat.com>
6464
6465 * server.h (perror_with_name, error, fatal, warning, paddress)
6466 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6467 include it.
6468 * utils.h: New file.
6469
541af0f4
PA
64702013-09-05 Pedro Alves <palves@redhat.com>
6471
6472 * server.h (remote_debug, noack_mode, transport_is_reliable)
6473 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6474 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6475 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6476 (write_enn, initialize_async_io, enable_async_io)
6477 (disable_async_io, check_remote_input_interrupt_request)
6478 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6479 (dead_thread_notify, prepare_resume_reply)
6480 (decode_address_to_semicolon, decode_address, decode_m_packet)
6481 (decode_M_packet, decode_X_packet, decode_xfer_write)
6482 (decode_search_memory_packet, unhexify, hexify)
6483 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6484 (look_up_one_symbol, relocate_instruction)
6485 (monitor_output): Move to remote-utils.h, and include it.
6486 * remote-utils.h: New file.
6487
eebdf26b
PA
64882013-09-05 Pedro Alves <palves@redhat.com>
6489
6490 * server.h (_): Delete.
6491
3aafd2ff
PA
64922013-09-02 Pedro Alves <palves@redhat.com>
6493
6494 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6495 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6496 allocated.
6497 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6498
cee83bcb
PM
64992013-09-02 Pierre Muller <muller@sourceware.org>
6500
6501 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6502 or WriteProcessMemory complete successfully and handle
6503 ERROR_PARTIAL_COPY error.
6504
9a13b2fa
PA
65052013-09-02 Pedro Alves <palves@redhat.com>
6506
6507 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6508 error instead of EIO.
6509
602e3198
JK
65102013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6511
6512 PR server/15604
6513 * linux-low.c: Include filestuff.h.
6514 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6515 * lynx-low.c: Include filestuff.h.
6516 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6517 * server.c: Include filestuff.h.
6518 (main): Call notice_open_fds.
6519 * spu-low.c: Include filestuff.h.
6520 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6521
96d7229d
LM
65222013-08-22 Luis Machado <lgustavo@codesourcery.com>
6523
6524 * Makefile.in: Explain why ../target and ../nat are not
6525 listed as include file search paths.
6526 (linux-waitpid.o): New object file rule.
6527 * configure.srv (srv_native_linux_obj): New variable.
6528 Replace all occurrences of linux native object files with
6529 $srv_native_linux_obj.
6530 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6531 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6532 (linux_enable_event_reporting): Remove declaration.
6533 (my_waitpid): Moved to common/linux-waitpid.c.
6534 (linux_wait_for_event): Pass ptid when calling
6535 linux_enable_event_reporting.
6536 (linux_supports_tracefork_flag): Remove.
6537 (linux_enable_event_reporting): Likewise.
6538 (linux_tracefork_grandchild): Remove.
6539 (STACK_SIZE): Moved to common/linux-ptrace.c.
6540 (linux_tracefork_child): Remove.
6541 (linux_test_for_tracefork): Remove.
6542 (linux_look_up_symbols): Call linux_supports_traceclone.
6543 (initialize_low): Remove call to linux_test_for_tracefork.
6544 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6545 common/linux-ptrace.h.
6546 (PTRACE_TYPE_ARG4): Likewise.
6547 Include linux-ptrace.h.
6548
32940073
PA
65492013-08-21 Pedro Alves <palves@redhat.com>
6550
6551 * config.in: Renegerate.
6552
33b60d58 65532013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6554
33b60d58
LM
6555 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6556 (SFILES): Remove $(srcdir)/common/target-common.c and
6557 add $(srcdir)/target/waitstatus.c.
6558 (OBS): Remove target-common.o and add waitstatus.o.
6559 (server_h): Remove $(srcdir)/../common/target-common.h and
6560 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6561 and $(srcdir)/../target/waitstatus.h.
6562 (target-common.o): Remove.
6563 (waitstatus.o): New target object file.
6564 * target.h: Do not include target-common.h and
6565 include target/resume.h, target/wait.h and
6566 target/waitstatus.h.
6567
b8e1b30e
LM
65682013-08-13 Luis Machado <lgustavo@codesourcery.com>
6569
6570 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6571 to PTRACE_TYPE_ARG3.
6572 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6573 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6574 PTRACE_TYPE_ARG4.
6575 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6576 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6577
7a60ad40
YQ
65782013-07-27 Jie Zhang <jie@codesourcery.com>
6579 Daniel Jacobowitz <dan@codesourcery.com>
6580 Yao Qi <yao@codesourcery.com>
6581
6582 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6583 (mips-linux-watch.o): New rule.
6584 (mips_linux_watch_h): New variable.
6585 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6586 srv_tgtobj.
6587 * linux-mips-low.c: Include mips-linux-watch.h.
6588 (struct arch_process_info, struct arch_lwp_info): New.
6589 (update_watch_registers_callback): New function.
6590 (mips_linux_new_process, mips_linux_new_thread) New functions.
6591 (mips_linux_prepare_to_resume, mips_insert_point): New
6592 functions.
6593 (mips_remove_point, mips_stopped_by_watchpoint): New
6594 functions.
6595 (rsp_bp_type_to_target_hw_bp_type): New function.
6596 (mips_stopped_data_address): New function.
6597 (the_low_target): Add watchpoint support functions.
6598
de6f69ad
YQ
65992013-07-27 Yao Qi <yao@codesourcery.com>
6600
6601 * i386-low.c: Include break-common.h.
6602 (enum target_hw_bp_type): Remove.
6603
3360c0bf
LM
66042013-07-24 Luis Machado <lgustavo@codesourcery.com>
6605
6606 * Makefile.in (SFILES): /common/target-common.c.
6607 (OBS): Add target-common.o.
6608 (server_h): Add $(srcdir)/../common/target-common.h.
6609 (target-common.o): New target.
6610 * server.c (queue_stop_reply_callback): Free
6611 status string after use.
6612 * target.c (target_waitstatus_to_string): Remove.
6613 * target.h: Include target-common.h.
6614 (resume_kind): Likewise.
6615 (target_waitkind): Likewise.
6616 (target_waitstatus): Likewise.
6617 (TARGET_WNOHANG): Likewise.
6618
bd885420
YQ
66192013-07-04 Yao Qi <yao@codesourcery.com>
6620
6621 * Makefile.in (host_alias): Use @host_noncanonical@.
6622 (target_alias): Use @target_noncanonical@.
6623 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6624 ACX_NONCANONICAL_HOST.
6625 * configure: Regenerated.
6626
6627 Revert:
6628 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6629
6630 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6631 * configure: Rebuild.
6632 * Makefile.in (version_host, version_target): Get from configure.
6633 (version.c): Use $(version_host) and $(version_target).
6634
17ef446e
PA
66352013-07-03 Pedro Alves <palves@redhat.com>
6636
6637 * Makefile.in (config.status): Depend on development.sh.
6638 * acinclude.m4: Include libmcheck.m4.
6639 * configure: Regenerate.
6640
7a9a7487
MG
66412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6642
6643 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6644 attribute inside the parentheses.
6645 (winapi_DebugSetProcessKillOnExit): Ditto.
6646 (winapi_DebugBreakProcess): Ditto.
6647 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6648
49b64de6
MG
66492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6650
6651 * notif.h (notif_event): Add a dummy member to avoid compiler
6652 errors.
6653
d5749ee7
PA
66542013-07-01 Pedro Alves <palves@redhat.com>
6655
6656 * hostio.c (HOSTIO_PATH_MAX): Define.
6657 (require_filename, handle_open, handle_unlink, handle_readlink):
6658 Use it.
6659
d8d2a3ee
PA
66602013-07-01 Pedro Alves <palves@redhat.com>
6661
6662 * server.h: Include "pathmax.h".
6663 * linux-low.c: Don't include sys/param.h.
6664 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6665 MAXPATHLEN.
6666 * win32-low.c: Don't include sys/param.h.
6667 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6668
bc7dea8d
PA
66692013-07-01 Pedro Alves <palves@redhat.com>
6670
6671 * event-loop.c: Don't check HAVE_UNISTD_H before including
6672 <unistd.h>.
6673 * gdbreplay.c: Likewise.
6674 * remote-utils.c: Likewise.
6675 * server.c: Likewise.
6676 * configure.ac: Don't check for unistd.h.
6677 * configure: Regenerate.
6678
d6c2da54
TT
66792013-06-28 Tom Tromey <tromey@redhat.com>
6680
6681 * Makefile.in (version.c): Use version.in, not
6682 common/version.in.
6683
257b6bec
MG
66842013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6685
6686 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6687 * configure: Rebuild.
6688 * Makefile.in (version_host, version_target): Get from configure.
6689 (version.c): Use $(version_host) and $(version_target).
6690
86ebe149
DK
66912013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6692
6693 Fix trace-status to output user name without trailing colon.
6694 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6695
f30aa5af
DK
66962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6697
6698 Fix trace-status to output proper start-time and stop-time.
6699 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6700 output start time and stop time in hex as gdb expects.
6701
28a93511
YQ
67022013-06-26 Pedro Alves <pedro@codesourcery.com>
6703
6704 * tracepoint.c (build_traceframe_info_xml): Output trace state
6705 variables present in the trace buffer.
6706
01208463
TT
67072013-06-24 Tom Tromey <tromey@redhat.com>
6708
6709 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6710 create-version.sh.
6711 (version.o): Remove.
6712 * gdbreplay.c: Include version.h.
6713 (version, host_name): Don't declare.
6714 * server.h: Include version.h.
6715 (version, host_name): Don't declare.
6716
760256f9
PA
67172013-06-12 Pedro Alves <palves@redhat.com>
6718
6719 * linux-x86-low.c (linux_is_elf64): Delete global.
6720 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6721 with local linux_pid_exe_is_elf_64_file use.
6722
030031ee
PA
67232013-06-11 Pedro Alves <palves@redhat.com>
6724
6725 * linux-low.c (regset_disabled, disable_regset): New functions.
6726 (regsets_fetch_inferior_registers)
6727 (regsets_store_inferior_registers): Use them.
6728 (initialize_regsets_info); Don't allocate the disabled_regsets
6729 array here.
6730 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6731 comment.
6732
5da6eb0a
PA
67332013-06-11 Pedro Alves <palves@redhat.com>
6734
6735 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6736 xmalloc.
6737
7e5aaa09
PA
67382013-06-11 Pedro Alves <palves@redhat.com>
6739
6740 * linux-x86-low.c (initialize_low_arch): Call
6741 init_registers_x32_avx_linux.
6742
d878444c
JK
67432013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6744
6745 Fix compatibility with Android Bionic.
6746 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6747 it is not empty.
6748
3aee8918
PA
67492013-06-07 Pedro Alves <palves@redhat.com>
6750
5f2b57b5 6751 PR server/14823
3aee8918
PA
6752 * Makefile.in (OBS): Add tdesc.o.
6753 (IPA_OBJS): Add tdesc-ipa.o.
6754 (tdesc-ipa.o): New rule.
6755 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6756 interface.
6757 * linux-low.c (new_inferior): Delete.
6758 (disabled_regsets, num_regsets): Delete.
6759 (linux_add_process): Adjust to set the new per-process
6760 new_inferior flag.
6761 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6762 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6763 was a stop. When calling arch_setup, switch the current inferior
6764 to the thread that got an event.
6765 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6766 (regsets_fetch_inferior_registers)
6767 (regsets_store_inferior_registers): New regsets_info parameter.
6768 Adjust to use it.
6769 (linux_register_in_regsets): New regs_info parameter. Adjust to
6770 use it.
6771 (register_addr, fetch_register, store_register): New usrregs_info
6772 parameter. Adjust to use it.
6773 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6774 parameter regs_info. Adjust to use it.
6775 (linux_fetch_registers): Get the current inferior's regs_info, and
6776 adjust to use it.
6777 (linux_store_registers): Ditto.
6778 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6779 (initialize_low): Don't initialize the target_regsets here. Call
6780 initialize_low_arch.
6781 * linux-low.h (target_regsets): Delete declaration.
6782 (struct regsets_info): New.
6783 (struct usrregs_info): New.
6784 (struct regs_info): New.
6785 (struct process_info_private) <new_inferior>: New field.
6786 (struct linux_target_ops): Delete the num_regs, regmap, and
6787 regset_bitmap fields. New field regs_info.
6788 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6789 * i387-fp.c (num_xmm_registers): Delete.
6790 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6791 calls to new interface.
6792 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6793 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6794 Infer the number of xmm registers from the regcache's target
6795 description.
6796 * i387-fp.h (num_xmm_registers): Delete.
6797 * inferiors.c (add_thread): Don't install the thread's regcache
6798 here.
6799 * proc-service.c (gregset_info): Fetch the current inferior's
6800 regs_info. Adjust to use it.
6801 * regcache.c: Include tdesc.h.
6802 (register_bytes, reg_defs, num_registers)
6803 (gdbserver_expedite_regs): Delete.
6804 (get_thread_regcache): If the thread doesn't have a regcache yet,
6805 create one, instead of aborting gdbserver.
6806 (regcache_invalidate_one): Rename to ...
6807 (regcache_invalidate_thread): ... this.
6808 (regcache_invalidate_one): New.
6809 (regcache_invalidate): Only invalidate registers of the current
6810 process.
6811 (init_register_cache): Add target_desc parameter, and use it.
6812 (new_register_cache): Ditto. Assert the target description has a
6813 non zero registers_size.
6814 (regcache_cpy): Add assertions. Adjust.
6815 (realloc_register_cache, set_register_cache): Delete.
6816 (registers_to_string, registers_from_string): Adjust.
6817 (find_register_by_name, find_regno, find_register_by_number)
6818 (register_cache_size): Add target_desc parameter, and use it.
6819 (free_register_cache_thread, free_register_cache_thread_one)
6820 (regcache_release, register_cache_size): New.
6821 (register_size): Add target_desc parameter, and use it.
6822 (register_data, supply_register, supply_register_zeroed)
6823 (supply_regblock, supply_register_by_name, collect_register)
6824 (collect_register_as_string, collect_register_by_name): Adjust.
6825 * regcache.h (struct target_desc): Forward declare.
6826 (struct regcache) <tdesc>: New field.
6827 (init_register_cache, new_register_cache): Add target_desc
6828 parameter.
6829 (regcache_invalidate_thread): Declare.
6830 (regcache_invalidate_one): Delete declaration.
6831 (regcache_release): Declare.
6832 (find_register_by_number, register_cache_size, register_size)
6833 (find_regno): Add target_desc parameter.
6834 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6835 declarations.
6836 * remote-utils.c: Include tdesc.h.
6837 (outreg, prepare_resume_reply): Adjust.
6838 * server.c: Include tdesc.h.
6839 (gdbserver_xmltarget): Delete declaration.
6840 (get_features_xml, process_serial_event): Adjust.
6841 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6842 declare.
6843 (struct process_info) <tdesc>: New field.
6844 (ipa_tdesc): Declare.
6845 * tdesc.c: New file.
6846 * tdesc.h: New file.
6847 * tracepoint.c: Include tdesc.h.
6848 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6849 (get_context_regcache): Adjust to pass ipa_tdesc down.
6850 (do_action_at_tracepoint): Adjust to get the register cache size
6851 from the context regcache's description.
6852 (traceframe_walk_blocks): Adjust to get the register cache size
6853 from the current trace frame's description.
6854 (traceframe_get_pc): Adjust to get current trace frame's
6855 description and pass it down.
6856 (gdb_collect): Adjust to get the register cache size from the
6857 IPA's description.
6858 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6859 (gdbserver_xmltarget): Delete.
6860 (initialize_low_tracepoint): Set the ipa's target description.
6861 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6862 (initialize_low_tracepoint): Set the ipa's target description.
6863 * linux-x86-low.c: Include tdesc.h.
6864 [__x86_64__] (is_64bit_tdesc): New.
6865 (ps_get_thread_area, x86_get_thread_area): Use it.
6866 (i386_cannot_store_register): Rename to ...
6867 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6868 (i386_cannot_fetch_register): Rename to ...
6869 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6870 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6871 to new interface.
6872 (target_regsets): Rename to ...
6873 (x86_regsets): ... this.
6874 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6875 interface.
6876 (x86_siginfo_fixup): Use is_64bit_tdesc.
6877 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6878 (tdesc_x32_avx_linux, tdesc_x32_linux)
6879 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6880 Declare.
6881 (x86_linux_update_xmltarget): Delete.
6882 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6883 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6884 (AMD64_LINUX_USER64_CS): New.
6885 (x86_linux_read_description): New, based on
6886 x86_linux_update_xmltarget.
6887 (same_process_callback): New.
6888 (x86_arch_setup_process_callback): New.
6889 (x86_linux_update_xmltarget): New.
6890 (x86_regsets_info): New.
6891 (amd64_linux_regs_info): New.
6892 (i386_linux_usrregs_info): New.
6893 (i386_linux_regs_info): New.
6894 (x86_linux_regs_info): New.
6895 (x86_arch_setup): Reimplement.
6896 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6897 (x86_emit_ops): Ditto.
6898 (the_low_target): Adjust. Install x86_linux_regs_info,
6899 x86_cannot_fetch_register, and x86_cannot_store_register.
6900 (initialize_low_arch): New.
6901 * linux-ia64-low.c (tdesc_ia64): Declare.
6902 (ia64_fetch_register): Adjust.
6903 (ia64_usrregs_info, regs_info): New globals.
6904 (ia64_regs_info): New function.
6905 (the_low_target): Adjust.
6906 (initialize_low_arch): New function.
6907 * linux-sparc-low.c (tdesc_sparc64): Declare.
6908 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6909 Adjust.
6910 (sparc_arch_setup): New function.
6911 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6912 (the_low_target): Adjust.
6913 (initialize_low_arch): New function.
6914 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6915 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6916 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6917 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6918 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6919 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6920 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6921 (tdesc_powerpc_isa205_vsx64l): Declare.
6922 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6923 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6924 (ppc_set_pc, ppc_get_hwcap): Adjust.
6925 (ppc_usrregs_info): Forward declare.
6926 (!__powerpc64__) ppc_regmap_adjusted: New global.
6927 (ppc_arch_setup): Adjust to the current process'es target
6928 description.
6929 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6930 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6931 (ppc_store_evrregset): Adjust.
6932 (target_regsets): Rename to ...
6933 (ppc_regsets): ... this, and make static.
6934 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6935 (ppc_regs_info): New function.
6936 (the_low_target): Adjust.
6937 (initialize_low_arch): New function.
6938 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6939 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6940 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6941 (tdesc_s390x_linux64v2): Declare.
6942 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6943 (s390_fill_gregset, s390_store_last_break): Adjust.
6944 (target_regsets): Rename to ...
6945 (s390_regsets): ... this, and make static.
6946 (s390_get_pc, s390_set_pc): Adjust.
6947 (s390_get_hwcap): New target_desc parameter, and use it.
6948 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6949 (s390_arch_setup): Adjust to set the current process'es target
6950 description. Don't adjust the regmap.
6951 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6952 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6953 (regs_info_3264): New globals.
6954 (s390_regs_info): New function.
6955 (the_low_target): Adjust.
6956 (initialize_low_arch): New function.
6957 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6958 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6959 [__mips64] (init_registers_mips_linux)
6960 (init_registers_mips_dsp_linux): Delete defines.
6961 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6962 (have_dsp): New global.
6963 (mips_read_description): New, based on mips_arch_setup.
6964 (mips_arch_setup): Reimplement.
6965 (get_usrregs_info): New function.
6966 (mips_cannot_fetch_register, mips_cannot_store_register)
6967 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6968 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6969 (target_regsets): Rename to ...
6970 (mips_regsets): ... this, and make static.
6971 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6972 (dsp_regs_info, regs_info): New globals.
6973 (mips_regs_info): New function.
6974 (the_low_target): Adjust.
6975 (initialize_low_arch): New function.
6976 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6977 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6978 Declare.
6979 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6980 (arm_read_description): New, with bits factored from
6981 arm_arch_setup.
6982 (arm_arch_setup): Reimplement.
6983 (target_regsets): Rename to ...
6984 (arm_regsets): ... this, and make static.
6985 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6986 (arm_regs_info): New function.
6987 (the_low_target): Adjust.
6988 (initialize_low_arch): New function.
6989 * linux-m68k-low.c (tdesc_m68k): Declare.
6990 (target_regsets): Rename to ...
6991 (m68k_regsets): ... this, and make static.
6992 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6993 (m68k_regs_info): New function.
6994 (m68k_arch_setup): New function.
6995 (the_low_target): Adjust.
6996 (initialize_low_arch): New function.
6997 * linux-sh-low.c (tdesc_sharch): Declare.
6998 (target_regsets): Rename to ...
6999 (sh_regsets): ... this, and make static.
7000 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7001 (sh_regs_info, sh_arch_setup): New functions.
7002 (the_low_target): Adjust.
7003 (initialize_low_arch): New function.
7004 * linux-bfin-low.c (tdesc_bfin): Declare.
7005 (bfin_arch_setup): New function.
7006 (bfin_usrregs_info, regs_info): New globals.
7007 (bfin_regs_info): New function.
7008 (the_low_target): Adjust.
7009 (initialize_low_arch): New function.
7010 * linux-cris-low.c (tdesc_cris): Declare.
7011 (cris_arch_setup): New function.
7012 (cris_usrregs_info, regs_info): New globals.
7013 (cris_regs_info): New function.
7014 (the_low_target): Adjust.
7015 (initialize_low_arch): New function.
7016 * linux-cris-low.c (tdesc_crisv32): Declare.
7017 (cris_arch_setup): New function.
7018 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7019 (cris_regs_info): New function.
7020 (the_low_target): Adjust.
7021 (initialize_low_arch): New function.
7022 * linux-m32r-low.c (tdesc_m32r): Declare.
7023 (m32r_arch_setup): New function.
7024 (m32r_usrregs_info, regs_info): New globals.
7025 (m32r_regs_info): Adjust.
7026 (initialize_low_arch): New function.
7027 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7028 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7029 (tic6x_usrregs_info): Forward declare.
7030 (tic6x_read_description): New function, based on ...
7031 (tic6x_arch_setup): ... this. Reimplement.
7032 (target_regsets): Rename to ...
7033 (tic6x_regsets): ... this, and make static.
7034 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7035 (tic6x_regs_info): New function.
7036 (the_low_target): Adjust.
7037 (initialize_low_arch): New function.
7038 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7039 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7040 (target_regsets): Rename to ...
7041 (xtensa_regsets): ... this, and make static.
7042 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7043 globals.
7044 (xtensa_arch_setup, xtensa_regs_info): New functions.
7045 (the_low_target): Adjust.
7046 (initialize_low_arch): New function.
7047 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7048 (nios2_arch_setup): Set the current process'es tdesc.
7049 (target_regsets): Rename to ...
7050 (nios2_regsets): ... this.
7051 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7052 (nios2_regs_info): New function.
7053 (the_low_target): Adjust.
7054 (initialize_low_arch): New function.
a261b8f5
PA
7055 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7056 (aarch64_arch_setup): Set the current process'es tdesc.
7057 (target_regsets): Rename to ...
7058 (aarch64_regsets): ... this.
7059 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7060 (aarch64_regs_info): New function.
7061 (the_low_target): Adjust.
7062 (initialize_low_arch): New function.
3aee8918
PA
7063 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7064 globals.
7065 (target_regsets): Rename to ...
7066 (tile_regsets): ... this.
7067 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7068 (tile_regs_info): New function.
7069 (tile_arch_setup): Set the current process'es tdesc.
7070 (the_low_target): Adjust.
7071 (initialize_low_arch): New function.
7072 * spu-low.c (tdesc_spu): Declare.
7073 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7074 * win32-arm-low.c (tdesc_arm): Declare.
7075 (arm_arch_setup): New function.
7076 (the_low_target): Install arm_arch_setup instead of
7077 init_registers_arm.
7078 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7079 (init_windows_x86): Rename to ...
7080 (i386_arch_setup): ... this. Set `win32_tdesc'.
7081 (the_low_target): Adjust.
7082 * win32-low.c (win32_tdesc): New global.
7083 (child_add_thread): Don't create the thread cache here.
7084 (do_initial_child_stuff): Set the new process'es tdesc.
7085 * win32-low.h (struct target_desc): Forward declare.
7086 (win32_tdesc): Declare.
7087 * lynx-i386-low.c (tdesc_i386): Declare global.
7088 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7089 * lynx-low.c (lynx_tdesc): New global.
7090 (lynx_add_process): Set the new process'es tdesc.
7091 * lynx-low.h (struct target_desc): Forward declare.
7092 (lynx_tdesc): Declare global.
7093 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7094 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7095 * nto-low.c (nto_tdesc): New global.
7096 (do_attach): Set the new process'es tdesc.
7097 * nto-low.h (struct target_desc): Forward declare.
7098 (nto_tdesc): Declare.
7099 * nto-x86-low.c (tdesc_i386): Declare.
7100 (nto_x86_arch_setup): Set `nto_tdesc'.
7101
b1fbec62
GB
71022013-06-04 Gary Benson <gbenson@redhat.com>
7103
7104 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7105 to qSupported response when appropriate.
7106 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7107 with nonzero-length annex.
7108 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7109 arguments supplied in annex.
7110
d1ec4ce7
DE
71112013-05-31 Doug Evans <dje@google.com>
7112
ac44adcb 7113 PR server/15594
d1ec4ce7
DE
7114 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7115 64 bits in 64-cross-32 environment.
7116
9b25f2d3
PA
71172013-05-28 Pedro Alves <palves@redhat.com>
7118
7119 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7120 (aarch64-without-fpu.c): Delete rule.
7121 * configure.srv (aarch64*-*-linux*): Remove references to
7122 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7123 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7124 declaration.
7125
6740dc9c
PA
71262013-05-24 Pedro Alves <palves@redhat.com>
7127
7128 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7129 instead of strchr/decode_address. Error if the range isn't split
7130 with a ','. Don't assume there's be a ':' in the action.
7131
c2d6af84
PA
71322013-05-23 Yao Qi <yao@codesourcery.com>
7133 Pedro Alves <palves@redhat.com>
7134
7135 * linux-low.c (lwp_in_step_range): New function.
7136 (linux_wait_1): If the thread was range stepping and stopped
7137 outside the stepping range, report the stop to GDB. Otherwise,
7138 continue stepping. Add range stepping debug output.
7139 (linux_set_resume_request): Copy the step range from the resume
7140 request to the lwp.
7141 (linux_supports_range_stepping): New.
7142 (linux_target_ops) <supports_range_stepping>: Set to
7143 linux_supports_range_stepping.
7144 * linux-low.h (struct linux_target_ops)
7145 <supports_range_stepping>: New field.
7146 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7147 * linux-x86-low.c (x86_supports_range_stepping): New.
7148 (the_low_target) <supports_range_stepping>: Set to
7149 x86_supports_range_stepping.
7150 * server.c (handle_v_cont): Handle 'r' action.
7151 (handle_v_requests): Append ";r" if the target supports range
7152 stepping.
7153 * target.h (struct thread_resume) <step_range_start,
7154 step_range_end>: New fields.
7155 (struct target_ops) <supports_range_stepping>:
7156 New field.
7157 (target_supports_range_stepping): New macro.
7158
58794e1a
JB
71592013-05-17 Joel Brobecker <brobecker@adacore.com>
7160
7161 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7162 confusion in comment.
7163
d631c5a7
JB
71642013-05-17 Joel Brobecker <brobecker@adacore.com>
7165
7166 * lynx-low.c (struct process_info_private): New type.
7167 (lynx_add_process): New function.
7168 (lynx_create_inferior, lynx_attach): Replace calls to
7169 add_process by calls to lynx_add_process.
7170 (lynx_resume): If PTID is null, then try using
7171 current_process()->private->last_wait_event_ptid.
7172 Add comments.
7173 (lynx_clear_inferiors): Delete. The contents of that function
7174 has been inlined in lynx_mourn;
7175 (lynx_wait_1): Save the ptid in the process's private data.
7176 (lynx_mourn): Free the process' private data. Replace call
7177 to lynx_clear_inferiors by call to clear_inferiors.
7178
96f7a20f
YQ
71792013-05-17 Yao Qi <yao@codesourcery.com>
7180
7181 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7182 the right place.
7183
db0dfaa0
LM
71842013-05-16 Luis Machado <lgustavo@codesourcery.com>
7185
7186 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7187 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7188 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7189 PT_TEXT_END_ADDR guards. Update comments.
7190 (linux_target_op) <read_offsets>: Conditionally define to
7191 linux_read_offsets if the target is UCLIBC and if it defines
7192 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7193
68f5f838
SL
71942013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7195 Andrew Jenner <andrew@codesourcery.com>
7196
7197 * Makefile.in (SFILES): Add linux-nios2-low.c.
7198 (clean): Add action to delete nios2-linux.c.
7199 (nios2-linux.c): New rule.
7200 * configure.srv: Add nios2*-*-linux*.
7201 * linux-nios2-low.c: New.
7202
1ebff1fd
HAQ
72032013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7204
7205 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7206
f6150862
HZ
72072013-04-25 Hui Zhu <hui@codesourcery.com>
7208
7209 PR gdb/15186
f6150862
HZ
7210 * ax.c (ax_printf): Add fflush.
7211
614c279d
TT
72122013-04-22 Tom Tromey <tromey@redhat.com>
7213
7214 * Makefile.in (SFILES): Add filestuff.c.
7215 (OBS): Add filestuff.o.
7216 (filestuff.o): New target.
7217 * config.in, configure: Rebuild.
7218 * configure.ac: Check for fdwalk, pipe2.
7219
7d4e5717
PA
72202013-04-17 Pedro Alves <palves@redhat.com>
7221
7222 * configure.ac (USE_THREAD_DB): Delete variable.
7223 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7224 Don't AC_SUBST USE_THREAD_DB.
7225 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7226 * config.in, configure: Regenerate.
7227
d5c93e41
PA
72282013-04-16 Pedro Alves <palves@redhat.com>
7229
7230 * linux-low.h (struct lwp_info) <thread_known>: Move under
7231 the USE_THREAD_DB #ifdef.
7232
04f5fe89
PA
72332013-04-16 Pedro Alves <palves@redhat.com>
7234
7235 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7236 (linux-low.o): Delete rule.
7237 * linux-low.h: Always include "gdb_thread_db.h" instead of
7238 conditionally including thread_db.h.
7239 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7240 HAVE_THREAD_DB_H.
7241
480b27bf
JK
72422013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7243
7244 * Makefile.in (install-only): Fix make install regression.
7245
43662968
JK
72462013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7247
7248 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7249 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7250 installation.
7251 * gdbserver.1: Remove.
7252
3e74e146
PA
72532013-03-22 Pedro Alves <palves@redhat.com>
7254
7255 * linux-low.c (handle_extended_wait): Don't call
7256 linux_enable_event_reporting.
7257
a8347a2a
TT
72582013-03-15 Tony Theodore <tonyt@logyst.com>
7259
7260 PR build/9098:
7261 * Makefile.in (SHELL): Use @SHELL@.
7262
eeb56fa7
SDJ
72632013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7264
7265 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7266 compiler warning.
7267
4fa7e2ff
JB
72682013-03-13 Joel Brobecker <brobecker@adacore.com>
7269
7270 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7271 Remove extraneous NULL element.
7272
8ddb1965
YQ
72732013-03-13 Yao Qi <yao@codesourcery.com>
7274
7275 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7276 'V' block in trace frame.
7277
9accd112
MM
72782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7279
7280 * target.h (struct target_ops): Add btrace ops.
7281 (target_supports_btrace): New macro.
7282 (target_enable_btrace): New macro.
7283 (target_disable_btrace): New macro.
7284 (target_read_btrace): New macro.
7285 * gdbthread.h (struct thread_info): Add btrace field.
7286 * server.c: Include btrace-common.h.
7287 (handle_btrace_general_set): New function.
7288 (handle_btrace_enable): New function.
7289 (handle_btrace_disable): New function.
7290 (handle_general_set): Call handle_btrace_general_set.
7291 (handle_qxfer_btrace): New function.
7292 (struct qxfer qxfer_packets[]): Add btrace entry.
7293 * inferiors.c (remove_thread): Disable btrace.
7294 * linux-low: Include linux-btrace.h.
7295 (linux_low_enable_btrace): New function.
7296 (linux_low_read_btrace): New function.
7297 (linux_target_ops): Add btrace ops.
7298 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7299 Add srv_linux_btrace=yes.
7300 (x86_64-*-linux*): Add linux-btrace.o.
7301 Add srv_linux_btrace=yes.
7302 * configure.ac: Define HAVE_LINUX_BTRACE.
7303 * config.in: Regenerated.
7304 * configure: Regenerated.
7305
5cc22e4c
MM
73062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7307
7308 * server.c (handle_qxfer): Preserve error message if -3 is
7309 returned.
7310 (qxfer): Document the -3 return value.
7311
7c97f91e
MM
73122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7313
7314 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7315 (linux_btrace_h): New variable.
7316 (linux-btrace.o): New rule.
7317
be9a119c 73182013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7319 Hafiz Abid Qadeer <abidh@codesourcery.com>
7320
7321 * tracepoint.c (trace_buffer_size): New global.
7322 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7323 (init_trace_buffer): Change to one-argument function. Allocate
7324 trace buffer memory.
7325 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7326 handle QTBuffer:size packet.
7327 (cmd_bigqtbuffer_size): New function.
7328 (initialize_tracepoint): Call init_trace_buffer with
7329 DEFAULT_TRACE_BUFFER_SIZE.
7330 * server.c (handle_query): Add QTBuffer:size in the
7331 supported packets.
7332
e64f7499
YQ
73332013-03-07 Yao Qi <yao@codesourcery.com>
7334
7335 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7336 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7337 of -1.
7338 (cmd_qtsp): Adjust condition. Do post increment.
7339 Set cur_action and cur_step_action back to 0.
7340
f0ae6fc3
PA
73412013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7342
7343 PR server/15236
7344 * linux-low.c (linux_write_memory): Return early success if LEN is
7345 zero.
7346
b5b0b0af
CV
73472013-03-05 Corinna Vinschen <vinschen@redhat.de>
7348
334ad4a8 7349 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7350
589bc927
TT
73512013-02-28 Tom Tromey <tromey@redhat.com>
7352
7353 * configure.ac: Invoke AC_SYS_LARGEFILE.
7354 * configure, config.in: Rebuild.
7355
dfe07582
CV
73562013-02-28 Corinna Vinschen <vinschen@redhat.com>
7357
7358 * win32-low.c: Throughout, fix format strings and casts of
7359 printf-like functions to avoid type related warnings on all
7360 platforms.
7361 (get_child_debug_event): Print dwDebugEventCode as hex since
7362 that's how it's usually documented.
7363
736cd585
YQ
73642013-02-28 Yao Qi <yao@codesourcery.com>
7365
7366 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7367 pulongest.
7368
e1f58301
JW
73692013-02-27 Jiong Wang <jiwang@tilera.com>
7370
7371 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7372 (reg-tilegx32.c): New rule.
7373 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7374 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7375 different register info initializer according to elf class.
7376 (init_registers_tilgx32): New function. The tilegx32 register info
7377 initializer.
7378 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7379 (tile_store_gregset): Likewise.
7380
d171ca78
YQ
73812013-02-27 Yao Qi <yao@codesourcery.com>
7382
7383 * server.c (process_point_options): Print debug message when
7384 debug_threads is true.
7385
282bbdf3
YQ
73862013-02-26 Yao Qi <yao@codesourcery.com>
7387
7388 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7389
aca22551
PA
73902013-02-19 Pedro Alves <palves@redhat.com>
7391 Kai Tietz <ktietz@redhat.com>
7392
7393 PR gdb/15161
7394
7395 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7396 instead of strtoul to extract address from packet.
7397 (process_serial_event) <'z'>: Likewise.
7398
4f3cee1c
YQ
73992013-02-18 Yao Qi <yao@codesourcery.com>
7400
7401 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7402
8e1d55a3
PA
74032013-02-14 Pedro Alves <palves@redhat.com>
7404
7405 Plug memory leak.
7406
7407 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7408 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7409
458820da
PA
74102013-02-14 Pedro Alves <palves@redhat.com>
7411
7412 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7413
baea0dae
PA
74142013-02-14 Pedro Alves <palves@redhat.com>
7415
7416 * tracepoint.c (save_string): Delete.
7417 (add_tracepoint_action): Use savestring instead of save_string.
7418
0b1afbb3
PA
74192013-02-12 Pedro Alves <palves@redhat.com>
7420
7421 * linux-xtensa-low.c: Ditto.
7422 * xtensa-xtregs.c: Ditto.
7423
8a4ac37e
PA
74242013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7425
7426 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7427 thread_db.
7428
148de6bb
MS
74292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7430
7431 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7432 aarch64_num_wp_regs and aarch64_num_bp_regs to
7433 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7434
55fac6e0
MS
74352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7436
7437 * linux-aarch64-low.c (ps_get_thread_area): Replace
7438 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7439
176eb98c
MS
74402013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7441 Marcus Shawcroft <marcus.shawcroft@arm.com>
7442 Nigel Stephens <nigel.stephens@arm.com>
7443 Yufeng Zhang <yufeng.zhang@arm.com>
7444
7445 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7446 (aarch64.c, aarch64-without-fpu.c): New targets.
7447 * configure.srv (aarch64*-*-linux*): New.
7448 * linux-aarch64-low.c: New file.
7449
56f7af9c
MS
74502013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7451
43aaf8b6 7452 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7453 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7454 (dequeue_one_deferred_signal, linux_resume_one_thread)
7455 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7456 (linux_tracefork_grandchild, linux_test_for_tracefork)
7457 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7458 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7459 where the argument is 0.
7460
60f662b0
YQ
74612013-01-25 Yao Qi <yao@codesourcery.com>
7462
7463 * event-loop.c: Include "queue.h".
7464 (gdb_event_p): New typedef.
7465 (struct gdb_event) <next_event>: Remove.
7466 (event_queue): Change to QUEUE(gdb_event_p).
7467 (async_queue_event): Remove.
7468 (gdb_event_xfree): New.
7469 (initialize_event_loop): New.
7470 (process_event): Use API from QUEUE.
7471 (wait_for_event): Likewise.
7472 * server.c (main): Call initialize_event_loop.
7473 * server.h (initialize_event_loop): Declare.
7474
5ae4861a
YQ
74752013-01-18 Yao Qi <yao@codesourcery.com>
7476
7477 * ax.h (struct eval_agent_expr_context): New.
7478 (gdb_eval_agent_expr): Update declaration.
7479 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7480 TFRAME. Add new argument CTX.
7481 * server.h (struct eval_agent_expr_context): Declare.
7482 (agent_mem_read, agent_tsv_read): Update declaration.
7483 (agent_mem_read_string): Likewise.
7484 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7485 (add_traceframe_block): Add new argument TPOINT.
7486 Increase TPOINT->traceframe_usage.
7487 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7488 eval_tracepoint_agent_expr.
7489 (condition_true_at_tracepoint): Likewise.
7490 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7491 (agent_mem_read_string, agent_tsv_read): Likewise.
7492
85e00e85
YQ
74932013-01-16 Yao Qi <yao@codesourcery.com>
7494
7495 * linux-low.c (linux_resume_one_lwp): Don't check
7496 'lwp->bp_reinsert != 0'.
7497
4039cf45
JB
74982013-01-07 Joel Brobecker <brobecker@adacore.com>
7499 Pedro Alves <palves@redhat.com>
7500
7501 * lynx-low.c (ptrace_request_to_str): Define a temporary
7502 macro and use it to simplify this function's implementation.
7503
9044dee2
JB
75042013-01-07 Joel Brobecker <brobecker@adacore.com>
7505
7506 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7507 sets errno.
7508
e6352c8f
JB
75092013-01-07 Joel Brobecker <brobecker@adacore.com>
7510
7511 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7512
50681a27
JB
75132013-01-07 Joel Brobecker <brobecker@adacore.com>
7514
7515 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7516
3f6e77ef
JB
75172013-01-07 Joel Brobecker <brobecker@adacore.com>
7518
7519 * lynx-low.c (lynx_resume): Use the resume_info parameter
7520 to determine the ptid for the lynx_ptrace call, unless
7521 it is equal to minus_one_ptid, in which case we use the
7522 ptid of the current_inferior.
7523 (lynx_wait_1): After having received a thread create/exit
7524 event, resume the inferior's execution using the signaling
7525 thread's ptid, rather than the old ptid.
7526
7fda33ae
JB
75272013-01-07 Joel Brobecker <brobecker@adacore.com>
7528
7529 * lynx-low.c (lynx_resume): Delete variable ret.
7530
b9786c74
JB
75312013-01-01 Joel Brobecker <brobecker@adacore.com>
7532
7533 * gdbreplay.c (gdbreplay_version): Update copyright year.
7534 * server.c (gdbserver_version): Likewise.
7535
8b93d60f
JB
75362012-12-17 Joel Brobecker <brobecker@adacore.com>
7537
7538 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7539 new thread.
7540
037335a7
JB
75412012-12-17 Joel Brobecker <brobecker@adacore.com>
7542
7543 * lynx-low.c (ptrace_request_to_str): Add handling for
7544 PTRACE_GETTRACESIG.
7545
52d4cbd8
JB
75462012-12-17 Joel Brobecker <brobecker@adacore.com>
7547
7548 * lynx-low.c (lynx_attach): Delete variable new_process.
7549
ab8f6ca9
JB
75502012-12-17 Joel Brobecker <brobecker@adacore.com>
7551
7552 * lynx-low.c (lynx_create_inferior): Delete variable
7553 new_process.
7554
78cbc024
JB
75552012-12-17 Joel Brobecker <brobecker@adacore.com>
7556
7557 * lynx-low.c (ptrace_request_to_str): Do not handle
7558 PTRACE_GETTHREADLIST if this macro does not exist.
7559
14a00470
YQ
75602012-12-15 Yao Qi <yao@codesourcery.com>
7561
7562 * Makefile.in (OBS): Add notif.o.
7563 * notif.c, notif.h: New.
7564 * server.c: Include "notif.h".
7565 (struct vstop_notif) <next>: Remove.
7566 <base>: New field.
7567 (queue_stop_reply): Update.
7568 (push_event, send_next_stop_reply): Remove.
7569 (discard_queued_stop_replies): Update.
7570 (notif_stop): New variable.
7571 (handle_v_stopped): Remove.
7572 (handle_v_requests): Don't call handle_v_stopped. Call
7573 handle_ack_notif instead.
7574 (queue_stop_reply_callback): Call notif_event_enque instead
7575 of queue_stop_reply.
7576 (handle_status): Don't call send_next_stop_reply, call
7577 notif_write_event instead.
7578 (kill_inferior_callback): Likewise.
7579 (detach_or_kill_inferior_callback): Likewise.
7580 (main): Call initialize_notif.
7581 (process_serial_event): Call QUEUE_is_empty.
7582 (handle_target_event): Call notif_push instead of push event.
7583 * server.h (push_event): Remove declaration.
7584
61c125b9
TT
75852012-12-10 Tom Tromey <tromey@redhat.com>
7586
7587 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7588 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7589 macros.
7590 (.c.o): Rewrite.
7591 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7592 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7593 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7594 (amd64-linux-ipa.o, ax.o): Rewrite.
7595 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7596 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7597 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7598 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7599 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7600 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7601 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7602 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7603 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7604 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7605 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7606 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7607 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7608 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7609 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7610 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7611 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7612 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7613 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7614 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7615 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7616 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7617 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7618 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7619 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7620 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7621 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7622 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7623 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7624 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7625 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7626 (reg-tilegx.o): Remove.
7627 (all_object_files): New macro.
7628 Include .deps files.
7629 * aclocal.m4, configure: Rebuild.
7630 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7631 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7632 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7633
e90e9ad9
TT
76342012-12-05 Tom Tromey <tromey@redhat.com>
7635
7636 PR gdb/14917:
7637 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7638
02d403bf 76392012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7640
7641 * configure.ac: Check for linux/perf_event.h.
7642 * config.in: Regenerated.
7643 * configure: Regenerated.
7644
0270a750
PA
76452012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7646
7647 * hostio.c (handle_readlink): Decrease buffer size
7648 parameter passed to readlink by one byte.
7649
8c29b58e
YQ
76502012-11-26 Yao Qi <yao@codesourcery.com>
7651
7652 * configure.ac (build_warnings): Append '-Wempty-body'.
7653 * configure: Regenerated.
7654 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7655 body.
7656
8bdce1ff
PM
76572012-11-15 Pierre Muller <muller@sourceware.org>
7658
7659 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7660 * config.in: Regenerate.
7661 * configure: Regenerate.
7662 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7663 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7664 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7665 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7666 header.
7667 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7668 instead of <sys/wait.h> header.
7669 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7670
02d403bf 76712012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7672
7673 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7674 (various make rules): Remove -DGDBSERVER
7675
fbd5db48
YQ
76762012-11-09 Yao Qi <yao@codesourcery.com>
7677
7678 * spu-low.c (current_ptid): Move it to ..
7679 * gdbthread.h: ... here. New.
7680 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7681 * server.c (myresume, process_serial_event): Likewise.
7682 * thread-db.c (thread_db_find_new_threads): Likewise.
7683 * tracepoint.c (run_inferior_command): Likewise.
7684
b3dc46ff
AB
76852012-10-01 Andrew Burgess <aburgess@broadcom.com>
7686
7687 * server.c (handle_search_memory_1): Include access length in
7688 warning message.
7689
07c04788
HPN
76902012-09-05 Michael Brandt <michael.brandt@axis.com>
7691
7692 * linux-crisv32-low.c: Fix compile errors.
7693
918d227b
YQ
76942012-09-04 Yao Qi <yao@codesourcery.com>
7695
7696 * tracepoint.c (cmd_qtsv): Adjust debug message.
7697 Don't check CUR_TPOINT.
7698
18c1b81a
YQ
76992012-08-28 Yao Qi <yao@codesourcery.com>
7700
7701 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7702 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7703 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7704 Remove declarations of xmalloc, xreallloc, xstrdup and
7705 freeargv.
7706 * Makefile.in (libiberty_h): New.
7707 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7708 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7709
dc82f37b
YQ
77102012-08-23 Yao Qi <yao@codesourcery.com>
7711
7712 * server.h: Remove declaration of 'xsnprintf'.
7713
406b1477
KS
77142012-08-22 Keith Seitz <keiths@redhat.com>
7715
7716 * server.h: Include build-gnulib-gbserver/config.h.
7717 * gdbreplay.c: Likewise.
7718
e6712ff1
DE
77192012-08-08 Doug Evans <dje@google.com>
7720
7721 * Makefile.in (SFILES): Add gdb_vecs.c.
7722 (OBS): Add gdb_vecs.o.
7723 (gdb_vecs_h, host_defs_h): New variables.
7724 (thread-db.o): Add $(gdb_vecs_h) dependency.
7725 (gdb_vecs.o): New rule.
7726 * thread-db.c: #include "gdb_vecs.h".
7727 (thread_db_load_search): Use a vector to iterate over path elements.
7728 Handle text appearing after "$pdir".
7729
7730 * configure.ac: Add check for strstr.
7731 * config.in: Regenerate.
7732 * configure: Regenerate.
7733
7c3270ae
UW
77342012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7735
7736 * hostio.c (handle_pread): If pread fails, fall back to attempting
7737 lseek/read.
7738 (handle_pwrite): Likewise for pwrite.
7739
b62e2b27
UW
77402012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7741
7742 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7743 between unsupported TYPE and unimplementable ADDR/LEN combination.
7744 (arm_insert_point): Act on new return value.
7745
78a99e91
PA
77462012-07-31 Pedro Alves <palves@redhat.com>
7747
7748 * server.c (process_point_options): Only skip tokens if we find
7749 one that is unrecognized. Don't treat 'X' specially while
7750 skipping unrecognized tokens.
7751
fcf303ab
UW
77522012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7753
7754 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7755 to 4-byte-align HW breakpoint addresses for Thumb.
7756
7255706c
YQ
77572012-07-27 Yao Qi <yao@codesourcery.com>
7758
7759 PR remote/14161.
7760
7761 * server.h: Declare gdb_agent_about_to_close.
7762 * target.c (kill_inferior): Include "agent.h".
7763 New. Send command 'kill'.
7764 * target.h (kill_inferior): Removed macro.
7765 * tracepoint.c (gdb_agent_about_to_close): New.
7766 (gdb_agent_helper_thread): Handle command 'close'.
7767 Wait endlessly until the inferior stops.
7768 Install gdb_agent_remove_socket to atexit hook.
7769 (agent_socket_name): New static variable.
7770 (gdb_agent_socket_init): Replace local variable 'name' with
7771 'agent_socket_name'.
7772 (gdb_agent_remove_socket): New.
7773
5a3f286f
YQ
77742012-07-27 Yao Qi <yao@codesourcery.com>
7775
7776 * server.c (process_point_options): Stop at 'X' when parsing.
7777
961bd387
ME
77782012-07-19 Michael Eager <eager@eagercon.com>
7779
a261b8f5 7780 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7781 to hw_execute.
7782 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7783 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7784 hardware breakpoint.
7785
aa7c7447
JK
77862012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7787
7788 * gdbserver/linux-low.c (initialize_low): Call
7789 linux_ptrace_init_warnings.
7790
7f216e7c
DE
77912012-07-02 Doug Evans <dje@google.com>
7792
7793 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7794 pointer to int.
7795
d3ce09f5
SS
77962012-07-02 Stan Shebs <stan@codesourcery.com>
7797
7798 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7799 (ax.o): Add it to build rule.
7800 (ax-ipa.o): Ditto.
7801 (OBS): Add format.o.
7802 (IPA_OBS): Add format.o.
7803 * server.c (handle_query): Claim support for breakpoint commands.
7804 (process_point_options): Add command case.
7805 (process_serial_event): Leave running if there are printfs in
7806 effect.
7807 * mem-break.h (any_persistent_commands): Declare.
7808 (add_breakpoint_commands): Declare.
7809 (gdb_no_commands_at_breakpoint): Declare.
7810 (run_breakpoint_commands): Declare.
7811 * mem-break.c (struct point_command_list): New struct.
7812 (struct breakpoint): New field command_list.
7813 (any_persistent_commands): New function.
7814 (add_commands_to_breakpoint): New function.
7815 (add_breakpoint_commands): New function.
7816 (gdb_no_commands_at_breakpoint): New function.
7817 (run_breakpoint_commands): New function.
7818 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7819 locally.
7820 * ax.c: Include format.h.
7821 (ax_printf): New function.
7822 (gdb_eval_agent_expr): Add printf opcode.
7823
2f8f6aed
YQ
78242012-06-13 Yao Qi <yao@codesourcery.com>
7825
7826 * server.c (start_inferior): Remove duplicated writes to fields
7827 'last_resume_kind' and 'last_status' of 'current_inferior'.
7828
0c9070b3
YQ
78292012-06-12 Yao Qi <yao@codesourcery.com>
7830 Pedro Alves <palves@redhat.com>
7831
7832 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7833 comment.
7834 * server.c (handle_v_cont): Extend comment.
7835
c52daf70
YQ
78362012-06-11 Yao Qi <yao@codesourcery.com>
7837
7838 * linux-low.c (linux_attach): Add 'static'.
7839
d38bbb0a
YQ
78402012-06-06 Yao Qi <yao@codesourcery.com>
7841
7842 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7843
89dc0afd
JK
78442012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7845
7846 Fix gcc -flto compilation warning.
7847 * server.c (main): Make variable multi_mode and attach volatile.
7848
75f62ce7
TJB
78492012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7850
7851 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7852 if the platform doesn't know about it.
7853
65f479b6
PA
78542012-05-30 Jeff Kenton <jkenton@tilera.com>
7855
7856 * Makefile.in (SFILES): Add linux-tile-low.c.
7857 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7858 * configure.srv: Handle tilegx-*-linux*.
7859 * linux-tile-low.c: New file.
7860
0c5bf5a9
JK
78612012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7862
7863 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7864
a493e3e2
PA
78652012-05-24 Pedro Alves <palves@redhat.com>
7866
7867 PR gdb/7205
7868
43aaf8b6 7869 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7870
2ea28649
PA
78712012-05-24 Pedro Alves <palves@redhat.com>
7872
7873 PR gdb/7205
7874
7875 Replace target_signal with gdb_signal throughout.
7876
8d409d16
MR
78772012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7878
7879 * linux-low.c (linux_store_registers): Avoid the copying sequence
7880 when no data has been retrieved by ptrace.
7881
23512c01
MGD
78822012-05-22 Will Deacon <will.deacon@arm.com>
7883
7884 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7885 Include asm/ptrace.h.
7886 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7887 already defined.
7888
4934b29e
MR
78892012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7890
7891 * linux-low.c (linux_store_registers): Don't re-retrieve data
7892 with ptrace that has already been obtained from /proc. Always
7893 copy any data retrieved with ptrace to the buffer supplied.
7894
bde24c0a
PA
78952012-05-11 Yao Qi <yao@codesourcery.com>
7896 Pedro Alves <palves@redhat.com>
7897
7898 * linux-low.c (enum stopping_threads_kind): New.
7899 (stopping_threads): Change type to `enum stopping_threads_kind'.
7900 (handle_extended_wait): If stopping and suspending threads, leave
7901 the new_lwp suspended too.
7902 (linux_wait_for_event): Adjust.
7903 (stop_all_lwps): Set `stopping_threads' to
7904 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7905 whether we're suspending threads or just stopping them. Assert no
7906 recursion happens.
7907
623b6bdf
YQ
79082012-04-29 Yao Qi <yao@codesourcery.com>
7909
7910 * server.h: Move some code to ...
7911 * gdbthread.h: ... here. New.
7912 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7913 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7914 (nto-low.o, win32-low.o): Likewise.
7915 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7916 * regcache.c, remote-utils.c, server.c: Likewise.
7917 * target.c, tracepoint.c, win32-low.c: Likewise.
7918
f15f9948
TJB
79192012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7920
7921 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7922 (PTRACE_ARG4_TYPE): Likewise.
7923 (PTRACE_XFER_TYPE): Likewise.
7924 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7925 ptrace to PTRACE_ARG3_TYPE.
7926 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7927 (PTRACE_ARG4_TYPE): Likewise.
7928 (PTRACE_XFER_TYPE): Likewise.
7929 (linux_detach_one_lwp): Cast fourth argument of
7930 ptrace to long then PTRACE_ARG4_TYPE.
7931 (regsets_fetch_inferior_registers): Cast third argument of
7932 ptrace to long then PTRACE_ARG3_TYPE.
7933 (regsets_store_inferior_registers): Likewise.
7934
38ea300a
PA
79352012-04-20 Pedro Alves <palves@redhat.com>
7936
7937 * configure: Regenerate.
7938
c971b7fa
PA
79392012-04-19 Pedro Alves <palves@redhat.com>
7940
43aaf8b6 7941 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7942 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7943 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7944 (all, install-only, uninstall, clean-info, all-lib, clean): No
7945 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7946 (maintainer-clean realclean distclean): Use subdir_do.
7947 (subdir_do): New.
7948 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7949 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7950 * acinclude.m4: Include acx_configure_dir.m4.
7951 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7952 calls. Call AC_PROG_RANLIB. Configure gnulib using
7953 ACX_CONFIGURE_DIR.
7954 (GNULIB): New.
7955 (GNULIB_STDINT_H): Adjust.
7956 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7957 * gdbreplay.c: Include build-gnulib/config.h.
7958 * server.h: Likewise.
7959 * aclocal.m4: Regenerate.
7960 * config.in: Regenerate.
7961 * configure: Regenerate.
c971b7fa 7962
809277f8
PA
79632012-04-19 Pedro Alves <palves@redhat.com>
7964
7965 * Makefile.in (LIBGNU, INCGNU): Adjust.
7966 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7967 (all, install-only, uninstall, clean-info, all-lib, clean)
7968 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7969 * configure.ac: Adjust AC_OUTPUT output.
7970 * aclocal.m4: Regenerate.
7971 * configure: Regenerate.
7972
fd9bb8b8
PA
79732012-04-19 Pedro Alves <palves@redhat.com>
7974
7975 * Makefile.in (generated_files): New.
7976 (server_h): Remove the explicit dependency on config.h, and depend
7977 on $generated_files.
7978
1c298c66
PA
79792012-04-19 Pedro Alves <palves@redhat.com>
7980
7981 * Makefile.in (INCGNU): Add -Ignulib.
7982
57c4b50b
PA
79832012-04-19 Pedro Alves <palves@redhat.com>
7984
7985 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7986 (INCGNU): ... this, and spell out -I here.
7987 (GNULIB_LIB): Rename to ...
7988 (LIBGNU): ... this.
7989 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7990
1030e047
PA
79912012-04-19 Pedro Alves <palves@redhat.com>
7992
7993 * config.in: Regenerate.
7994
447d4319
PA
79952012-04-19 Pedro Alves <palves@redhat.com>
7996
7997 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7998 * server.h (memmem): Remove declaration.
7999 * config.in: Regenerate.
8000 * configure: Regenerate.
8001
aad9eab9
YQ
80022012-04-19 Yao Qi <yao@codesourcery.com>
8003
8004 * Makefile.in (SFILES): Add common/vec.c.
8005 (OBS): Add vec.o.
8006 (vec.o): New rule.
8007
3e10640f
YQ
80082012-04-19 Yao Qi <yao@codesourcery.com>
8009
8010 * remote-utils.c (prepare_resume_reply): Replace with macro
8011 target_core_of_thread.
8012 * server.c (handle_qxfer_threads_proper): Likewise.
8013 * target.h (traget_core_of_thread): New macro.
8014
71622373
PA
80152012-04-18 Pedro Alves <palves@redhat.com>
8016
8017 * aclocal.m4: Regenerate.
8018 * configure: Regenerate.
8019
80d26939
YQ
80202012-04-16 Yao Qi <yao@codesourcery.com>
8021
8022 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8023 duplicated on address.
8024
42476b70
YQ
80252012-04-16 Yao Qi <yao@codesourcery.com>
8026
8027 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8028 (struct tracepoint_action_ops) <send>: New field.
8029 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8030 (agent_expr_send, x_tracepoint_action_send): New.
8031 (l_tracepoint_action_send): New.
8032 (cmd_qtdp): Download and install tracepoint
8033 according to `use_agent'.
8034 (run_inferior_command): Add one more parameter `len'.
8035 Update callers.
8036 (tracepoint_send_agent): New.
8037 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8038
7bc83639
YQ
80392012-04-16 Yao Qi <yao@codesourcery.com>
8040
8041 * tracepoint.c (download_tracepoints): Moved to ...
8042 (cmd_qtstart): ... here.
8043
5f18041e
YQ
80442012-04-14 Yao Qi <yao@codesourcery.com>
8045
8046 * tracepoint.c: Include inttypes.h.
8047 (struct collect_memory_action): Use sized types.
8048 (struct tracepoint): Likewise.
8049 (cmd_qtdp, stop_tracing): Update print specifiers.
8050 (cmd_qtp, response_tracepoint): Likewise.
8051 (collect_data_at_tracepoint): Likewise.
8052 (collect_data_at_step): Likewise.
8053
55a8c076
YQ
80542012-04-14 Yao Qi <yao@codesourcery.com>
8055
8056 Import gnulib module inttypes.
8057 * aclocal.m4, config.in, configure: Regenerated.
8058
dc750257
YQ
80592012-04-14 Yao Qi <yao@codesourcery.com>
8060
8061 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8062 Makefile and config.status at last.
8063
0ab5faf9
YQ
80642012-04-13 Yao Qi <yao@codesourcery.com>
8065
8066 * tracepoint.c: Include stdint.h unconditionally.
8067
18f5fd81
TJB
80682012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8069
8070 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8071 on BFD_HAVE_SYS_PROCFS_TYPE.
8072 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8073 * configure: Regenerate.
8074 * config.in: Likewise.
8075
4d47af5c
L
80762012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8077
8078 * Makefile.in (clean): Also remove x32.c x32-linux.c
8079 x32-avx.c x32-avx-linux.c.
8080 (x32.o): New target.
8081 (x32.c): Likewise.
8082 (x32-linux.o): Likewise.
8083 (x32-linux.c): Likewise.
8084 (x32-avx.o): Likewise.
8085 (x32-avx.c): Likewise.
8086 (x32-avx-linux.o): Likewise.
8087 (x32-avx-linux.c): Likewise.
8088
8089 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8090 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8091 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8092 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8093 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8094 i386/x32-avx-linux.xml.
8095
8096 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8097 (init_registers_x32_avx_linux): Likwise.
8098 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8099 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8100
ecedbe58
PA
81012012-04-13 Pedro Alves <palves@redhat.com>
8102
8103 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8104 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8105 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8106 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8107 the sub-make.
8108
c92b5177
L
81092012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8110
8111 * linux-x86-low.c (compat_x32_clock_t): New.
8112 (compat_x32_siginfo_t): Likewise.
8113 (compat_x32_siginfo_from_siginfo): Likewise.
8114 (siginfo_from_compat_x32_siginfo): Likewise.
8115 (linux_is_elf64): Likewise.
8116 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8117 and siginfo_from_compat_x32_siginfo for x32.
8118 (x86_arch_setup): Set linux_is_elf64.
8119
214d508e
L
81202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8121
8122 PR gdb/13969
8123 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8124 e_machine field.
8125 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8126 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8127 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8128 compatible with process.
8129
c9a1864a
YQ
81302012-04-12 Yao Qi <yao@codesourcery.com>
8131
8132 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8133 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8134 (install-only, install-info, clean): Handle sub dir gnulib.
8135 (all-lib, am--refresh): New targets.
8136 (memmem.o): Remove target.
8137 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8138 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8139 (AC_REPLACE_FUNCS): Remove memmem.
8140 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8141 (AC_OUTPUT): Generate Makefile in gnulib/.
8142 * aclocal.m4, config.in, configure: Regenerated.
8143
367ba2c2
MR
81442012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8145
8146 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8147
9d236627
PA
81482012-04-05 Pedro Alves <palves@redhat.com>
8149
8150 -Werror=strict-aliasing
8151
8152 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8153 pointer.
8154
111217b3
PA
81552012-04-04 Pedro Alves <palves@redhat.com>
8156
8157 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8158 (sparc_store_gregset_from_stack, sparc_store_gregset)
8159 (sparc_breakpoint_at): Fix formatting.
8160
8365dcf5
TJB
81612012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8162
8163 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8164 are available.
8165 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8166 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8167 * config.in: Regenerate.
8168 * configure: Likewise.
8169
689cc2ae
PA
81702012-03-29 Pedro Alves <palves@redhat.com>
8171
8172 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8173 Correct ptrace arguments.
8174
c14dfd32
PA
81752012-03-28 Pedro Alves <palves@redhat.com>
8176
8177 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8178 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8179 (IA64_FR1_REGNUM): New defines.
8180 (ia64_fetch_register): New.
8181 (the_low_target): Install it.
8182 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8183 field.
8184 * linux-low.c (linux_fetch_registers): Try the
8185 the_low_target.fetch_register hook first.
8186
8187 * linux-arm-low.c (the_low_target): Adjust.
8188 * linux-bfin-low.c (the_low_target): Adjust.
8189 * linux-cris-low.c (the_low_target): Adjust.
8190 * linux-crisv32-low.c (the_low_target): Adjust.
8191 * linux-m32r-low.c (the_low_target): Adjust.
8192 * linux-m68k-low.c (the_low_target): Adjust.
8193 * linux-mips-low.c (the_low_target): Adjust.
8194 * linux-ppc-low.c (the_low_target): Adjust.
8195 * linux-s390-low.c (the_low_target): Adjust.
8196 * linux-sh-low.c (the_low_target): Adjust.
8197 * linux-sparc-low.c (the_low_target): Adjust.
8198 * linux-tic6x-low.c (the_low_target): Adjust.
8199 * linux-x86-low.c (the_low_target): Adjust.
8200 * linux-xtensa-low.c (the_low_target): Adjust.
8201
63c88e13
PA
82022012-03-26 Pedro Alves <palves@redhat.com>
8203
8204 * server.c (handle_qxfer_libraries): Don't bail early if
8205 the_target->qxfer_libraries_svr4 is not NULL.
8206
fb723180
PA
82072012-03-26 Pedro Alves <palves@redhat.com>
8208
8209 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8210
0afae3cf
PA
82112012-03-23 Pedro Alves <palves@redhat.com>
8212
8213 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8214 "library-list-svr4" element's start tag when the the DSO list is
8215 empty.
8216
485f1ee4
PA
82172012-03-23 Pedro Alves <palves@redhat.com>
8218
8219 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8220 a variable whose type size is the same as the inferior's pointer
8221 size.
8222
a5362b9a
TS
82232012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8224
8225 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8226 struct siginfo.
8227 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8228 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8229 * linux-low.h: Include <signal.h>.
8230 (struct siginfo): Remove forward declaration.
8231 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8232 struct siginfo.
8233
d226c142
MF
82342012-03-21 Mike Frysinger <vapier@gentoo.org>
8235
8236 * .gitignore: Ignore more files.
8237
122f36ef
PA
82382012-03-19 Pedro Alves <palves@redhat.com>
8239 Jan Kratochvil <jan.kratochvil@redhat.com>
8240
8241 * server.c (cont_thread, general_thread): Add describing comments.
8242 (start_inferior): Clear `cont_thread'.
8243 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8244 of a process.
8245
fc3e5175
YQ
82462012-03-15 Yao Qi <yao@codesourcery.com>
8247
8248 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8249 handling to ...
8250 (cmd_qtdp): ... here.
8251
8d0d92cd
YQ
82522012-03-15 Yao Qi <yao@codesourcery.com>
8253
8254 * tracepoint.c (struct tracepoint_action_ops): New.
8255 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8256 (m_tracepoint_action_download): New.
8257 (r_tracepoint_action_download): New.
8258 (x_tracepoint_action_download): New.
8259 (l_tracepoint_action_download): New.
8260 (add_tracepoint_action): Install `action->ops' according type.
8261 (download_tracepoint_1): Move code `download' function pointer
8262 of various tracepoint_action_ops.
8263
87b0bb13
JK
82642012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8265
8266 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8267 linux_ptrace_attach_warnings.
8268
5f572dec
JK
82692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8270
8271 * Makefile.in (linux-ptrace.o): New.
8272 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8273 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8274 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8275 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8276 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8277 of these targets.
8278 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8279
f4647387
YQ
82802012-03-08 Yao Qi <yao@codesourcery.com>
8281 Pedro Alves <palves@redhat.com>
8282
8283 Fix PR server/13392.
8284 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8285 offset of JMP insn.
8286 * tracepoint.c (remove_tracepoint): New.
8287 (cmd_qtdp): Call remove_tracepoint when failed to install.
8288
9b224c5e
PA
82892012-03-07 Pedro Alves <palves@redhat.com>
8290
8291 * linux-low.c (get_detach_signal): New.
8292 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8293 Pass on pending signals to PTRACE_DETACH. Check the result of the
8294 ptrace call.
8295 * server.c (program_signals, program_signals_p): New.
8296 (handle_general_set): Handle QProgramSignals.
8297 * server.h (program_signals, program_signals_p): Declare.
8298
e237a7e2
JK
82992012-03-05 Pedro Alves <palves@redhat.com>
8300 Jan Kratochvil <jan.kratochvil@redhat.com>
8301
8302 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8303 New comment why.
8304
5808517f
YQ
83052012-03-03 Yao Qi <yao@codesourcery.com>
8306
8307 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8308 agent_look_up_symbols.
8309
58b4daa5
YQ
83102012-03-03 Yao Qi <yao@codesourcery.com>
8311
8312 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8313 (linux-x86-low.o): Likewise.
8314 * server.h: Remove in_process_agent_loaded.
8315 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8316 common/agent.c.
8317 Update callers.
8318
8ffcbaaf
YQ
83192012-03-03 Yao Qi <yao@codesourcery.com>
8320
8321 * tracepoint.c (gdb_agent_capability): New global.
8322 (in_process_agent_loaded_ust): Renamed to
8323 `in_process_agent_supports_ust'.
8324 Update callers.
8325 (in_process_agent_supports_ust): Call agent_capability_check.
8326 (clear_installed_tracepoints): Assert that agent supports
8327 agent.
8328
d1feda86
YQ
83292012-03-03 Yao Qi <yao@codesourcery.com>
8330
8331 * linux-low.c (linux_supports_agent): New.
8332 (linux_target_ops): Initialize field `supports_agent' with
8333 linux_supports_agent.
8334 * target.h (struct target_ops) <supports_agent>: New.
8335 (target_supports_agent): New macro.
8336 * server.c (handle_general_set): Handle packet 'QAgent'.
8337 (handle_query): Send `QAgent+'.
8338 * Makefile.in (server.o): Depends on agent.h.
8339
2fa291ac
YQ
83402012-03-03 Yao Qi <yao@codesourcery.com>
8341
8342 * Makefile.in (OBS): Add agent.o.
8343 Add new rule for agent.o.
8344 Track dependence of tracepoint.c on agent.h.
8345 * tracepoint.c (run_inferior_command_1):
8346 (run_inferior_command): Call agent_run_command.
8347 (gdb_ust_connect_sync_socket): Deleted. Move it to
8348 common/agent.c.
8349 (resume_thread, stop_thread): Likewise.
8350 (gdb_ust_socket_init): Renamed to ...
8351 (gdb_agent_socket_init): ... New.
8352 (gdb_ust_thread): Renamed to ...
8353 (gdb_agent_helper_thread): ... New.
8354 (gdb_ust_init): Move some code to ...
8355 (gdb_agent_init): ... here. New.
8356 [HAVE_UST]: Call gdb_ust_init.
8357 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8358 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8359 * config.in, configure: Regenerated.
8360
05044653
PA
83612012-03-02 Pedro Alves <palves@redhat.com>
8362
8363 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8364 * linux-low.c (struct simple_pid_list): New.
8365 (stopped_pids): New a struct simple_pid_list pointer.
8366 (add_to_pid_list, pull_pid_from_list): New.
8367 (handle_extended_wait): Don't assume the first signal new children
8368 report is SIGSTOP. Adjust call to pull_pid_from_list.
8369 (linux_wait_for_lwp): Adjust.
8370
8d00225b
YQ
83712012-03-02 Yao Qi <yao@codesourcery.com>
8372
8373 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8374 debug log.
8375
19560ba5
YQ
83762012-03-02 Yao Qi <yao@codesourcery.com>
8377
8378 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8379 `stop_pc' and `tpoint'. Update caller.
8380
1faeff08
MR
83812012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8382
8383 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8384 * linux-low.c (use_linux_regsets): New macro.
8385 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8386 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8387 (linux_register_in_regsets): New function.
8388 (usr_fetch_inferior_registers): Skip registers covered by
8389 regsets.
8390 (usr_store_inferior_registers): Likewise.
8391 (usr_fetch_inferior_registers): New macro.
8392 (usr_store_inferior_registers): Likewise.
8393 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8394 (linux_store_registers): Likewise.
8395 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8396 prototype.
8397 (init_registers_mips64_dsp_linux): Likewise.
8398 (init_registers_mips_linux): New macro.
8399 (init_registers_mips_dsp_linux): Likewise.
8400 (mips_dsp_num_regs): Likewise.
8401 (DSP_BASE, DSP_CONTROL): New fallback macros.
8402 (mips_base_regs): New macro.
8403 (mips_regmap): Use it. Fix the size.
8404 (mips_dsp_regmap): New variable.
8405 (mips_dsp_regset_bitmap): Likewise.
8406 (mips_arch_setup): New function.
8407 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8408 than mips_regmap.
8409 (mips_cannot_store_register): Likewise.
8410 (the_low_target): Update .arch_setup, .num_regs and .regmap
8411 initializers. Add .regset_bitmap initializer.
8412 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8413 initializer.
8414 * linux-bfin-low.c (the_low_target): Likewise.
8415 * linux-cris-low.c (the_low_target): Likewise.
8416 * linux-crisv32-low.c (the_low_target): Likewise.
8417 * linux-ia64-low.c (the_low_target): Likewise.
8418 * linux-m32r-low.c (the_low_target): Likewise.
8419 * linux-m68k-low.c (the_low_target): Likewise.
8420 * linux-ppc-low.c (the_low_target): Likewise.
8421 * linux-s390-low.c (the_low_target): Likewise.
8422 * linux-sh-low.c (the_low_target): Likewise.
8423 * linux-sparc-low.c (the_low_target): Likewise.
8424 * linux-tic6x-low.c (the_low_target): Likewise.
8425 * linux-x86-low.c (the_low_target): Likewise.
8426 * linux-xtensa-low.c (the_low_target): Likewise.
8427 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8428 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8429 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8430 srv_xmlfiles.
8431 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8432 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8433
c03e6ccc
YQ
84342012-02-29 Yao Qi <yao@codesourcery.com>
8435 Pedro Alves <palves@redhat.com>
8436
8437 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8438 `step_over_finished' is true.
8439
644cebc9
PA
84402012-02-27 Pedro Alves <palves@redhat.com>
8441
8442 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8443 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8444
c14d7ab2
PA
84452012-02-27 Pedro Alves <palves@redhat.com>
8446
8447 PR server/9684
8448 * linux-low.c (pid_is_stopped): New.
8449 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8450
412c89dd
LM
84512012-02-25 Luis Machado <lgustavo@codesourcery.com>
8452
8453 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8454 of conditions.
8455
b745defe
MR
84562012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8457
8458 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8459
9f3a5c85
LM
84602012-02-24 Luis Machado <lgustavo@codesourcery>
8461
8462 * server.c (handle_query): Advertise support for target-side
8463 breakpoint condition evaluation.
8464 (process_point_options): New function.
8465 (process_serial_event): When inserting a breakpoint, check for
8466 a target-side condition that should be evaluated.
8467
8468 * mem-break.c: Include regcache.h and ax.h.
8469 (point_cond_list_t): New data structure.
8470 (breakpoint) <cond_list>: New field.
8471 (find_gdb_breakpoint_at): Make non-static.
8472 (delete_gdb_breakpoint_at): Clear any target-side
8473 conditions.
8474 (clear_gdb_breakpoint_conditions): New function.
8475 (add_condition_to_breakpoint): Likewise.
8476 (add_breakpoint_condition): Likewise.
8477 (gdb_condition_true_at_breakpoint): Likewise.
8478 (gdb_breakpoint_here): Return result directly instead
8479 of going through a local variable.
8480
8481 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8482 (clear_gdb_breakpoint_conditions): Likewise.
8483 (add_breakpoint_condition): Likewise.
8484 (gdb_condition_true_at_breakpoint): Likewise.
8485
8486 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8487 (need_step_over_p): Take target-side breakpoint condition into
8488 consideration.
8489
5e1dc496
LM
84902012-02-24 Luis Machado <lgustavo@codesourcery>
8491
8492 * server.h: Include tracepoint.h.
8493 (agent_mem_read, agent_get_trace_state_variable_value,
8494 agent_set_trace_state_variable_value,
8495 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8496 get_set_tsv_func_addr): New prototypes.
8497
8498 * ax.h: New include file.
8499 * ax.c: New source file.
8500
8501 * tracepoint.c: Include ax.h.
8502 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8503 agent_expr, eval_result_type): Move to ax.h.
8504 (parse_agent_expr): Rename to ...
8505 (gdb_parse_agent_expr): ... this, make it non-static and move
8506 to ax.h.
8507 (unparse_agent_expr) Rename to ...
8508 (gdb_unparse_agent_expr): ... this, make it non-static and move
8509 to ax.h.
8510 (eval_agent_expr): Rename to ...
8511 (eval_tracepoint_agent_expr): ... this.
8512 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8513 forward declarations.
8514 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8515 (agent_get_trace_state_variable_value): New function.
8516 (agent_set_trace_state_variable_value): New function.
8517 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8518 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8519 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8520 (condition_true_at_tracepoint): Likewise.
8521 (parse_agent_expr): Rename to ...
8522 (gdb_parse_agent_expr): ... this and move to ax.c.
8523 (unparse_agent_expr): Rename to ...
8524 (gdb_unparse_agent_expr): ... this and move to ax.c.
8525 (gdb_agent_op_name): Move to ax.c.
8526 (eval_agent_expr): Rename to ...
8527 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8528 and move to ax.c.
8529 (eval_tracepoint_agent_expr): New function.
8530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8531 non-static.
5e1dc496
LM
8532 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8533 ax.c.
8534 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8535 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8536 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8537 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8538 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8539 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8540 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8541 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8542 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8543 (compile_bytecodes): Remove forward declaration.
8544 (is_goto_target): Move to ax.c.
8545 (compile_bytecodes): Move to ax.c and call
8546 agent_get_trace_state_variable_value (...) and
8547 agent_set_trace_state_variable_value (...).
8548
8549 * Makefile.in: Update ax.c and IPA dependencies.
8550
277e4e52
PA
85512012-02-24 Pedro Alves <palves@redhat.com>
8552
8553 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8554 (cmd_bigqtbuffer_circular): ... this. Only handle
8555 'QTBuffer:circular:'.
8556 (handle_tracepoint_general_set): Adjust.
8557
bf4c19f7
YQ
85582012-02-16 Yao Qi <yao@codesourcery.com>
8559
8560 * inferiors.c: Move code to ...
8561 * dll.c: .... here. New.
8562 * server.h: Declare clear_dlls.
8563 * Makefile.in (SFILES): Add dll.c.
8564 (OBS): Add dll.o
8565 (dll.o): New rule.
8566
d73f2619
YQ
85672012-02-11 Yao Qi <yao@codesourcery.com>
8568
8569 * server.c: (handle_monitor_command): Add a new parameter
8570 `own_buf'.
8571 (handle_query): Update caller.
8572
f8255c2a
JB
85732012-02-09 Joel Brobecker <brobecker@adacore.com>
8574
8575 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8576 * configure, config.in: Regenerate.
8577 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8578 is not defined.
8579
da84f473
PA
85802012-02-02 Pedro Alves <palves@redhat.com>
8581
8582 Try SIGKILL first, then PTRACE_KILL.
8583 * linux-low.c (linux_kill_one_lwp): New.
8584 (linux_kill_one_lwp): Rename to ...
8585 (kill_one_lwp_callback): ... this. Use the new
8586 linux_kill_one_lwp.
8587
e886a173
PA
85882012-02-02 Pedro Alves <palves@redhat.com>
8589
8590 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8591 inferior.
8592
be07f1a2
PA
85932012-01-27 Pedro Alves <palves@redhat.com>
8594
8595 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8596 (elf_64_file_p): Make static.
8597 (linux_pid_exe_is_elf_64_file): New.
8598 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8599 Delete declarations.
8600 (linux_pid_exe_is_elf_64_file): Declare.
8601 * linux-x86-low.c (x86_arch_setup): Use
8602 linux_pid_exe_is_elf_64_file.
8603
d8301ad1
JK
86042012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8605
8606 * linux-low.c (linux_wait_for_event_1): Rename to ...
8607 (linux_wait_for_event): ... here and merge it with former
8608 linux_wait_for_event - new variable wait_ptid, use it.
8609 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8610
01b17894
PA
86112012-01-23 Pedro Alves <palves@redhat.com>
8612
8613 * server.c (main): Avoid yet another case of infinite loop while
8614 detaching/killing after a longjmp.
8615
e825046f
JK
86162012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8617
8618 Code cleanup.
8619 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8620
b9e7b9c3
UW
86212012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8622
8623 * hostio.c (handle_readlink): New function.
8624 (handle_vFile): Call it to handle "vFile:readlink" packets.
8625
901f9912
UW
86262012-01-20 Pedro Alves <palves@redhat.com>
8627 Ulrich Weigand <ulrich.weigand@linaro.org>
8628
8629 * server.c (handle_v_requests): Only support vAttach and vRun to
8630 start multiple processes when in extended protocol mode.
8631
fc1ab1a0
PA
86322012-01-17 Pedro Alves <palves@redhat.com>
8633
8634 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8635 memalign plus mprotect to allocate the scratch buffer.
8636
7d5d4e98
PA
86372012-01-13 Pedro Alves <palves@redhat.com>
8638
8639 * server.c (attach_inferior): Clear `cont_thread'.
8640
f128d5e9
PA
86412012-01-13 Pedro Alves <palves@redhat.com>
8642
8643 * server.c (main): Avoid infinite loop while detaching/killing
8644 after a longjmp.
8645
06db92f0
DE
86462012-01-09 Doug Evans <dje@google.com>
8647
8648 * server.c (start_inferior): Set last_ptid in --wrapper case.
8649
32d92999
YQ
86502012-01-06 Yao Qi <yao@codesourcery.com>
8651
8652 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8653 defined.
8654 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8655
5e0a92a9
YQ
86562012-01-04 Yao Qi <yao@codesourcery.com>
8657
8658 * tracepoint.c (cmd_qtdp): Print debug message
8659 for static tracepoint.
8660
ae639e8c
YQ
86612012-01-04 Yao Qi <yao@codesourcery.com>
8662
8663 * tracepoint.c (trace_vdebug): Differentiate debug message
8664 between gdbserver and IPA.
8665
f72429c5
YQ
86662012-01-03 Yao Qi <yao@codesourcery.com>
8667
8668 * tracepoint.c (tracepoint_was_hit): Don't collect for
8669 static tracepoint.
8670
12c3e59c
JB
86712012-01-02 Joel Brobecker <brobecker@adacore.com>
8672
8673 * terminal.h: Reformat copyright header.
8674
67827812
JB
86752012-01-02 Joel Brobecker <brobecker@adacore.com>
8676
8677 * server.c (gdbserver_version): Update copyright year.
8678 * gdbreplay.c (gdbreplay_version): Likewise.
8679
3e52c33d
JK
86802011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8681
8682 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8683
8684 Revert:
8685 2011-12-18 Hui Zhu <teawater@gmail.com>
8686 * linux-low.c (linux_create_inferior): Save return value to ret.
8687
66f1260e
HZ
86882011-12-18 Hui Zhu <teawater@gmail.com>
8689
8690 * linux-low.c (linux_create_inferior): Save return value to ret.
8691
e77616d7
DE
86922011-12-16 Doug Evans <dje@google.com>
8693
e7b06c57
DE
8694 * linux-low.c (linux_create_inferior): If stdio connection,
8695 redirect stdin from /dev/null, stdout to stderr.
8696 * remote-utils.c (remote_is_stdio): New static global.
8697 (remote_connection_is_stdio): New function.
8698 (remote_prepare): Handle stdio connection.
8699 (remote_open): Ditto.
8700 (remote_close): Don't close stdin for stdio connections.
8701 (read_prim,write_prim): New functions. Replace all calls to
8702 read/write to these.
8703 * server.c (main): Watch for "-" argument. Move call to
8704 remote_prepare before start_inferior.
8705 * server.h (STDIO_CONNECTION_NAME): New macro.
8706 (remote_connection_is_stdio): Declare.
8707
e77616d7
DE
8708 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8709 in debugging output.
8710
82067193
YQ
87112011-12-15 Yao Qi <yao@codesourcery.com>
8712
8713 * tracepoint.c: Include sys/syscall.h.
8714 (gdb_ust_thread): Remove preprocessor conditional.
8715
82bfbe7e
PA
87162011-12-14 Pedro Alves <pedro@codesourcery.com>
8717
8718 * linux-low.c (linux_detach_one_lwp): Call
8719 the_low_target.prepare_to_resume before detaching.
8720
712c6575
YQ
87212011-12-14 Yao Qi <yao@codesourcery.com>
8722
8723 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8724 of write.
8725
d54d1edf
YQ
87262011-12-14 Yao Qi <yao@codesourcery.com>
8727
8728 * i386-low.c (i386_low_stopped_data_address): Initialize local
8729 variable `control'.
8730
6210a125
PA
87312011-12-13 Pedro Alves <pedro@codesourcery.com>
8732
8733 PR remote/13492
8734
8735 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8736 DR_CONTROL unless necessary. Extend comments.
8737 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8738 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8739
2ece8244
YQ
87402011-12-13 Yao Qi <yao@codesourcery.com>
8741
8742 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8743 macros.
8744 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8745
784867a5
JK
87462011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8747
8748 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8749 Print new debug message for such case.
8750
6bf36717
JK
87512011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8752
8753 Fix overlapping memcpy.
8754 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8755 the read_inferior_memory transfer.
8756 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8757 write_inferior_memory transfer.
8758 (set_fast_tracepoint_jump): New variable buf. Use it for the
8759 read_inferior_memory and write_inferior_memory transfers.
8760 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8761 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8762 Use it for the write_inferior_memory transfer.
8763 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8764 buffers.
8765
50275556
MR
87662011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8767
8768 * linux-low.c (fetch_register, store_register): Make code
8769 consistent, fix formatting.
8770
7325beb4
MR
87712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8772
8773 * linux-low.c (usr_store_inferior_registers): Factor out code
8774 to handle individual registers into...
8775 (store_register): ... this new function.
8776
c642a434
UW
87772011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8778
8779 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8780 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8781 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8782 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8783 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8784 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8785 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8786 (srv_xmlfiles): Add new XML files.
8787
8788 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8789 and <sys/uio.h>.
8790 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8791 (init_registers_s390_linux32v1): Add prototype.
8792 (init_registers_s390_linux32v2): Likewise.
8793 (init_registers_s390_linux64v1): Likewise.
8794 (init_registers_s390_linux64v2): Likewise.
8795 (init_registers_s390x_linux64v1): Likewise.
8796 (init_registers_s390x_linux64v2): Likewise.
8797 (s390_num_regs): Increment to 52.
8798 (s390_regmap): Add orig_r2 register.
8799 (s390_num_regs_3264): Increment to 68.
8800 (s390_regmap_3264): Add orig_r2 register.
8801 (s390_collect_ptrace_register): Handle orig_r2 register.
8802 (s390_supply_ptrace_register): Likewise.
8803 (s390_fill_last_break): New function.
8804 (s390_store_last_break): Likewise.
8805 (s390_fill_system_call): New function.
8806 (s390_store_system_call): Likewise.
8807 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8808 register sets.
8809 (s390_check_regset): New function.
8810 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8811 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8812 Update target_regsets for available register sets.
8813
2268b414
JK
88142011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8815 Jan Kratochvil <jan.kratochvil@redhat.com>
8816
8817 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8818 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8819 New.
8820 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8821 * linux-low.h (struct process_info_private): New member r_debug.
8822 * server.c (handle_qxfer_libraries): Call
8823 the_target->qxfer_libraries_svr4.
8824 (handle_qxfer_libraries_svr4): New function.
8825 (qxfer_packets): New entry "libraries-svr4".
8826 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8827 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8828 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8829 PACKET_qXfer_libraries_svr4.
8830
d6db1fab
UW
88312011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8832
8833 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8834 PSW address/mask between 8-byte and 16-byte formats.
8835 (s390_supply_ptrace_register): Likewise.
8836 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8837 basic addressing mode bit.
8838
242f5f1c
SS
88392011-11-24 Stan Shebs <stan@codesourcery.com>
8840
8841 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8842
f196051f
SS
88432011-11-17 Stan Shebs <stan@codesourcery.com>
8844
8845 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8846 (tracing_start_time): New global.
8847 (tracing_stop_time): New global.
8848 (tracing_user_name): New global.
8849 (tracing_notes): New global.
8850 (tracing_stop_note): New global.
8851 (cmd_qtstart): Set traceframe_usage, start_time.
8852 (stop_tracing): Set stop_time.
8853 (cmd_qtstatus): Report additional status.
8854 (cmd_qtp): New function.
8855 (handle_tracepoint_query): Call it.
8856 (cmd_qtnotes): New function.
8857 (handle_tracepoint_general_set): Call it.
8858 (get_timestamp): Rename from tsv_get_timestamp.
8859
405f8e94
SS
88602011-11-14 Stan Shebs <stan@codesourcery.com>
8861 Kwok Cheung Yeung <kcy@codesourcery.com>
8862
8863 * linux-x86-low.c (small_jump_insn): New.
8864 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8865 trampoline and error message, build a trampoline and issue a small
8866 jump instruction to it.
8867 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8868 trampoline and error message.
8869 (x86_get_min_fast_tracepoint_insn_len): New.
8870 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8871 * linux-low.h (struct linux_target_ops): Add arguments to
8872 install_fast_tracepoint_jump_pad operation, add new operation.
8873 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8874 arguments.
8875 (linux_get_min_fast_tracepoint_insn_len): New function.
8876 (linux_target_op): Add new operation.
8877 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8878 (gdb_trampoline_buffer_end): Ditto.
8879 (gdb_trampoline_buffer_error): Ditto.
8880 (struct ipa_sym_addresses): Add fields for new IPA variables.
8881 (symbol_list): Add entries for new IPA variables.
8882 (struct tracepoint): Add fields to hold the address range of the
8883 trampoline used by the tracepoint.
8884 (trampoline_buffer_head): New static variable.
8885 (trampoline_buffer_tail): Ditto.
8886 (claim_trampoline_space): New function.
8887 (have_fast_tracepoint_trampoline_buffer): New function.
8888 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8889 structure.
8890 (install_fast_tracepoint): Ditto, also add error buffer argument.
8891 (cmd_qtminftpilen): New function.
8892 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8893 (fast_tracepoint_from_trampoline_address): New function.
8894 (fast_tracepoint_collecting): Handle trampoline as part of jump
8895 pad space.
8896 (set_trampoline_buffer_space): New function.
8897 (initialize_tracepoint): Initialize new IPA variables.
8898 * target.h (struct target_ops): Add arguments to
8899 install_fast_tracepoint_jump_pad operation, add new
8900 get_min_fast_tracepoint_insn_len operation.
8901 (target_get_min_fast_tracepoint_insn_len): New.
8902 (install_fast_tracepoint_jump_pad): Add arguments.
8903 * server.h (IPA_BUFSIZ): Define.
8904 * linux-i386-ipa.c: Include extra header files.
8905 (initialize_fast_tracepoint_trampoline_buffer): New function.
8906 (initialize_low_tracepoint): Call it.
8907 * server.h (set_trampoline_buffer_space): Declare.
8908 (claim_trampoline_space): Ditto.
8909 (have_fast_tracepoint_trampoline_buffer): Ditto.
8910
1e4d1764
YQ
89112011-11-14 Yao Qi <yao@codesourcery.com>
8912
8913 * server.c (handle_query): Handle InstallInTrace for qSupported.
8914 * tracepoint.c (add_tracepoint): Sort list.
8915 (install_tracepoint, download_tracepoint): New.
8916 (cmd_qtdp): Call them to install and download tracepoints.
8917 (sort_tracepoints): Removed.
8918 (cmd_qtstart): Update.
8919
5c73ff4e
YQ
89202011-11-14 Yao Qi <yao@codesourcery.com>
8921
8922 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8923 * mem-break.h: Declare.
8924 * tracepoint.c (cmd_qtstart): Move some code to ...
8925 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8926 New.
8927 (download_tracepoints): Move some code to ...
8928 (download_tracepoint_1): ... here. New.
8929
86a30030
YQ
89302011-11-08 Yao Qi <yao@codesourcery.com>
8931
8932 * remote-utils.c (relocate_instruction): A comment fix.
8933
8d26e50c
JB
89342011-11-07 Joel Brobecker <brobecker@adacore.com>
8935
8936 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8937 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8938 dr_status_mirror and dr_control_mirror from debug_reg_state.
8939 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8940 (i386_initial_stuff): Remove use of deleted globals.
8941 (i386_get_thread_context, i386_set_thread_context,
8942 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8943 from debug_reg_state.
8944
a59306a3
YQ
89452011-11-05 Yao Qi <yao@codesourcery.com>
8946
8947 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8948 address as TPOINT's.
8949
3065dfb6
SS
89502011-11-02 Stan Shebs <stan@codesourcery.com>
8951
8952 * tracepoint.c (agent_mem_read_string): New function.
8953 (eval_agent_expr): Call it for tracenz.
8954 * server.c (handle_query): Report support for tracenz.
8955
fd0d8c7c
YQ
89562011-11-02 Yao Qi <yao@codesourcery.com>
8957
8958 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8959
609086b1
YQ
89602011-11-02 Yao Qi <yao@codesourcery.com>
8961
8962 * target.h: Fix a typo in comment.
8963
b9fd1791
PA
89642011-10-31 Pedro Alves <pedro@codesourcery.com>
8965
8966 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8967 clobber the breakpoints' shadows with fast tracepoint jumps.
8968 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8969 * target.c (write_inferior_memory): Also pass MYADDR down to
8970 check_mem_write.
8971
03583c20
UW
89722011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8973
8974 * configure.ac: Check support for personality routine.
8975 * configure: Regenerate.
8976 * config.in: Likewise.
8977 * linux-low.c: Include <sys/personality.h>.
8978 Define ADDR_NO_RANDOMIZE if necessary.
8979 (linux_create_inferior): Disable address space randomization when
8980 forking inferior, if requested.
8981 (linux_supports_disable_randomization): New function.
8982 (linux_target_ops): Install it.
8983 * server.h (disable_randomization): Declare.
8984 * server.c (disable_randomization): New global variable.
8985 (handle_general_set): Handle QDisableRandomization.
8986 (handle_query): Likewise for qSupported.
8987 (main): Support --disable-randomization and --no-disable-randomization
8988 command line arguments.
8989 * target.h (struct target_ops): Add supports_disable_randomization.
8990 (target_supports_disable_randomization): New macro.
8991
723b724b
MF
89922011-09-29 Mike Frysinger <vapier@gentoo.org>
8993
8994 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8995 ifdef check.
8996 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8997 [!PT_GETDSBT] (target_loadmap): New definition.
8998 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8999 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9000 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9001 and PT_GETDSBT to LINUX_LOADMAP.
9002 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9003 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9004
55329a5c 90052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9006
9007 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9008 (arm_linux_hwbp_cap): New static variable.
9009 (arm_linux_get_hwbp_cap): Replace by ...
9010 (arm_linux_init_hwbp_cap): ... this new function.
9011 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9012 (arm_linux_get_hw_watchpoint_count): Likewise.
9013 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9014 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9015 (arm_prepare_to_resume): Use perror_with_name instead of error.
9016
55329a5c 90172011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9018
9019 * linux-arm-low.c: Include <signal.h>.
9020 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9021 (struct arm_linux_hwbp_cap): New data type.
9022 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9023 (struct arm_linux_hw_breakpoint): New data type.
9024 (MAX_BPTS, MAX_WPTS): Define.
9025 (struct arch_process_info, struct arch_lwp_info): New data types.
9026 (arm_linux_get_hwbp_cap): New function.
9027 (arm_linux_get_hw_breakpoint_count): Likewise.
9028 (arm_linux_get_hw_watchpoint_count): Likewise.
9029 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9030 (arm_hwbp_control_initialize): Likewise.
9031 (arm_hwbp_control_is_enabled): Likewise.
9032 (arm_hwbp_control_is_initialized): Likewise.
9033 (arm_hwbp_control_disable): Likewise.
9034 (arm_linux_hw_breakpoint_equal): Likewise.
9035 (arm_linux_hw_point_initialize): Likewise.
9036 (struct update_registers_data): New data structure.
9037 (update_registers_callback: New function.
9038 (arm_insert_point): Likewise.
9039 (arm_remove_point): Likewise.
9040 (arm_stopped_by_watchpoint): Likewise.
9041 (arm_stopped_data_address): Likewise.
9042 (arm_new_process): Likewise.
9043 (arm_new_thread): Likewise.
9044 (arm_prepare_to_resume): Likewise.
9045 (the_low_target): Register arm_insert_point, arm_remove_point,
9046 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9047 arm_new_thread, and arm_prepare_to_resume.
9048
6b9801d4
SS
90492011-09-15 Stan Shebs <stan@codesourcery.com>
9050
9051 * server.h (struct emit_ops): Add compare-goto fields.
9052 * tracepoint.c (gdb_agent_op_sizes): New table.
9053 (emit_eq_goto): New function.
9054 (emit_ne_goto): New function.
9055 (emit_lt_goto): New function.
9056 (emit_le_goto): New function.
9057 (emit_gt_goto): New function.
9058 (emit_ge_goto): New function.
9059 (is_goto_target): New function.
9060 (compile_bytecodes): Recognize special cases of compare-goto
9061 combinations and call specialized emitters for them.
9062 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9063 (amd64_emit_ne_goto): New function.
9064 (amd64_emit_lt_goto): New function.
9065 (amd64_emit_le_goto): New function.
9066 (amd64_emit_gt_goto): New function.
9067 (amd64_emit_ge_goto): New function.
9068 (amd64_emit_ops): Add the new functions.
9069 (i386_emit_eq_goto): New function.
9070 (i386_emit_ne_goto): New function.
9071 (i386_emit_lt_goto): New function.
9072 (i386_emit_le_goto): New function.
9073 (i386_emit_gt_goto): New function.
9074 (i386_emit_ge_goto): New function.
9075 (i386_emit_ops): Add the new functions.
9076
bf15cbda
SS
90772011-09-08 Stan Shebs <stan@codesourcery.com>
9078
9079 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9080 (i386_emit_epilogue): Restore %ebx.
9081
943ca1dd
JZ
90822011-08-31 Jie Zhang <jzhang918@gmail.com>
9083
9084 * server.c (step_thread): Remove definition.
9085 (process_serial_event): Don't handle Hs.
9086 * server.h (step_thread): Remove declaration.
9087 * target.c (set_desired_inferior): Remove use of step_thread.
9088
e3deef73
LM
90892011-08-24 Luis Machado <lgustavo@codesourcery.com>
9090
9091 * linux-low.c: Include linux-procfs.h.
9092 (linux_attach_lwp_1): Update comments.
9093 (linux_attach): Scan for existing threads when attaching to a
9094 process that is the tgid.
9095 * Makefile.in: Update dependencies.
9096
13da1c97
LM
90972011-08-24 Luis Machado <lgustavo@codesourcery.com>
9098
9099 * configure.srv: Add linux-procfs.o dependencies.
9100
881127c9
YQ
91012011-08-14 Yao Qi <yao@codesourcery.com>
9102
9103 * target.h (struct target_ops): Fix indent.
9104 * win32-low.c (win32_target_ops): Fix comment.
9105
58dbd541
YQ
91062011-08-14 Andrew Jenner <andrew@codesourcery.com>
9107 Yao Qi <yao@codesourcery.com>
9108
9109 * Makefile.in (clean): Remove tic6x-*.c files.
9110 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9111 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9112 (tic6x-c64xp-linux.c): Likewise.
9113 * configure.srv: Add support for tic6x-*-uclinux.
9114 * linux-tic6x-low.c: New.
9115 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9116
78d85199
YQ
91172011-08-14 Andrew Stubbs <ams@codesourcery.com>
9118 Yao Qi <yao@codesourcery.com>
9119
9120 * target.h (struct target_ops): Add read_loadmap.
9121 * linux-low.c (struct target_loadseg): New type.
9122 (struct target_loadmap): New type.
9123 (linux_read_loadmap): New function.
9124 (linux_target_ops): Add linux_read_loadmap.
9125 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9126 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9127 to NULL.
78d85199 9128
a959a88d
EZ
91292011-08-05 Eli Zaretskii <eliz@gnu.org>
9130
9131 * win32-low.c: Include <stdint.h>.
9132
1ced966e
PA
91332011-07-22 Pedro Alves <pedro@codesourcery.com>
9134
9135 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9136 to the inferior here.
9137 (i386_remove_aligned_watchpoint): Ditto.
9138 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9139 fit part of the watchpoint in the debug registers.
9140 (i386_update_inferior_debug_regs): New.
9141 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9142 registers, and only update the inferior on success.
9143 (i386_low_remove_watchpoint): Ditto.
9144
d26e3629
KY
91452011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9146
9147 * linux-low.c (compare_ints, unique, list_threads, show_process,
9148 linux_core_of_thread): Delete.
9149 (linux_target_ops): Change linux_core_of_thread to
9150 linux_common_core_of_thread.
9151 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9152 * utils.c (malloc_failure): Change type of argument.
9153 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9154 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9155 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9156 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9157 (IPA_OBJS): Add common-utils-ipa.o.
9158 (ptid_h, linux_osdata_h): New macros.
9159 (server_h): Add common/common-utils.h, common/xml-utils.h,
9160 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9161 common/ptid.h.
9162 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9163 ptid.o, buffer.o): New rules.
9164 (linux-low.o): Add common/linux-osdata.h as a dependency.
9165 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9166 * configure.ac: Add AC_HEADER_DIRENT check.
9167 * config.in: Regenerate.
9168 * configure: Regenerate.
9169 * remote-utils.c (xml_escape_text): Delete.
9170 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9171 buffer_xml_printf): Move to common/buffer.c.
9172 * server.c (main): Remove call to initialize_inferiors.
9173 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9174 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9175 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9176 internal_error, gdb_assert, gdb_assert_fail): Delete.
9177 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9178 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9179 common/buffer.h.
9180 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9181 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9182 initialize_inferiors): Delete.
9183
2275a1a7
PA
91842011-07-20 Pedro Alves <pedro@codesourcery.com>
9185
9186 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9187 symbol error.
9188
0a5b1e09
PA
91892011-05-31 Pedro Alves <pedro@codesourcery.com>
9190
9191 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9192 assertion.
9193 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9194
6938fd34
YQ
91952011-05-26 Yao Qi <yao@codesourcery.com>
9196
9197 * Makefile.in (thread-db.o): Track dependence to
9198 common/gdb_thread_db.h.
9199 * thread-db.c: include gdb_thread_db.h from right place.
9200
b481f9e0
TT
92012011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9202
9203 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9204 __FILE__ and __LINE__ to internal_error.
9205
98a5dd13
DE
92062011-05-13 Doug Evans <dje@google.com>
9207
9208 * thread-db.c (try_thread_db_load_from_sdir): New function.
9209 (try_thread_db_load_from_dir): New function.
9210 (thread_db_load_search): Handle $sdir, ignore $pdir.
9211 Remove trying of system directories if search of
9212 libthread-db-search-path fails, that is now done via $sdir.
9213
d248b706
KY
92142011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9215
9216 * server.c (handle_query): Add EnableDisableTracepoints to the list
9217 of supported features.
43aaf8b6 9218 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9219 tracepoints.
43aaf8b6
PA
9220 (cmd_qtenable_disable): New.
9221 (cmd_qtstart): Install tracepoints even if disabled.
9222 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9223 receiving a QTEnable or QTDisable packet.
9224 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9225 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9226 tracepoints.
9227 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9228
84e578fb
DE
92292011-05-10 Doug Evans <dje@google.com>
9230
9231 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9232
71f55dd8
DE
92332011-05-04 Doug Evans <dje@google.com>
9234
9235 * linux-low.c (linux_join): Skip process lookup.
9236 * spu-low.c (spu_join): Ditto.
9237 * server.c (join_inferiors_callback): Delete.
9238 (process_serial_event): For 'D' packet (detach) call join_inferior
9239 directly.
9240
4d393d60
JM
92412011-05-04 Joseph Myers <joseph@codesourcery.com>
9242
9243 * README: Don't mention xscale*-*-linux*.
9244 * configure.srv (xscale*-*-linux*): Don't handle target.
9245
b00ad6ff
NF
92462011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9247
9248 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9249 casting pointers.
9250 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9251 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9252 (i386_emit_void_call_2): Likewise.
9253
af96c192
YQ
92542011-04-26 Yao Qi <yao@codesourcery.com>
9255
43aaf8b6
PA
9256 * linux-low.c: Move common macros to linux-ptrace.h.
9257 Include linux-ptrace.h.
af96c192
YQ
9258 * Makefile.in (linux_ptrace_h): New.
9259 (linux-low.o): Depends on linux-ptrace.h.
9260
03f2bd59
JK
92612011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9262
9263 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9264 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9265 (remote_prepare): New function with most of the TCP code from ...
9266 (remote_open): ... here. Detect PORT here unconditionally. Move also
9267 setting transport_is_reliable.
9268 * server.c (run_once): New variable.
9269 (gdbserver_usage): Document it.
9270 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9271 the first run if RUN_ONCE.
9272 * server.h (run_once, remote_prepare): New declarations.
9273
7a9dd1b2
TT
92742011-04-19 Tom Tromey <tromey@redhat.com>
9275
9276 * win32-low.c (handle_load_dll): Remove duplicate "the".
9277
81239425
PM
92782011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9279
9280 Remove support for old Cygwin 1.5 versions.
9281 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9282 function to avoid warning.
9283 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9284 warning.
9285
9e0627f1
PM
92862011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9287
9288 * gdbserver/server.h (Macro _): Define it if not available.
9289
588eebee
MS
92902011-03-14 Michael Snyder <msnyder@vmware.com>
9291
348af9f7 9292 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9293
43f70d4c
JB
92942011-03-10 Joel Brobecker <brobecker@adacore.com>
9295
9296 * Makefile.in (maintainer-clean realclean distclean): Remove
9297 "make ... subdir_do" command.
9298
348af9f7
MS
92992011-03-10 Michael Snyder <msnyder@vmware.com>
9300
9301 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9302
9303 * server.c (handle_v_run): Free alloced buffer on early return.
9304
e637a4f5
YQ
93052011-03-09 Yao Qi <yao@codesourcery.com>
9306
9307 Revert:
9308 2011-03-04 Yao Qi <yao@codesourcery.com>
9309
9310 * Makefile.in: Remove GNU make feature --directory.
9311
9312 2011-03-05 Yao Qi <yao@codesourcery.com>
9313
9314 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9315 (subdir_do): New make target. Copied from gdb/Makefile.
9316 (maintainer-clean, realclean, distclean, clean): Call corresponding
9317 make targets in common/Makefile.
9318
9319 2011-02-11 Yao Qi <yao@codesourcery.com>
9320
9321 * configure.ac: Call AC_PROG_RANLIB.
9322 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9323 * configure: Regenerate.
9324
e6edda56
JK
93252011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9326
9327 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9328
e5141119
JB
93292011-03-06 Yao Qi <yao@codesourcery.com>
9330
9331 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9332
64794aa4
JB
93332011-03-05 Yao Qi <yao@codesourcery.com>
9334
9335 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9336 (subdir_do): New make target. Copied from gdb/Makefile.
9337 (maintainer-clean, realclean, distclean, clean): Call corresponding
9338 make targets in common/Makefile.
9339
7a762829
YQ
93402011-03-04 Yao Qi <yao@codesourcery.com>
9341
9342 * Makefile.in: Remove GNU make feature --directory.
9343
348af9f7
MS
93442011-03-04 Michael Snyder <msnyder@vmware.com>
9345
9346 * server.c (queue_stop_reply): Call xmalloc not malloc.
9347
93482011-03-02 Michael Snyder <msnyder@vmware.com>
9349
9350 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9351
9f72fee2
MS
93522011-02-28 Michael Snyder <msnyder@vmware.com>
9353
588eebee
MS
9354 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9355 (cmd_qtframe): Ditto.
9356 (cmd_qtbuffer): Ditto.
9357 (cmd_bigqtbuffer): Ditto.
9358
9f72fee2
MS
9359 * utils.c (decimal2str): Initialize 'width' to nine, then
9360 don't mess with it.
9361
8040bd49
UW
93622011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9363
9364 * hostio.c (require_data): Free *data, not data.
9365
7e52cbd0
JK
93662011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9367
9368 * hostio.c (require_data): Use free, not xfree.
9369
9130f83e
MS
93702011-02-27 Michael Snyder <msnyder@vmware.com>
9371
4b812f4e
MS
9372 * server.c (handle_query): Discard unused value.
9373
9130f83e
MS
9374 * hostio.c (require_data): Free malloc memory before returning
9375 error.
9376
69d37113
MS
93772011-02-26 Michael Snyder <msnyder@vmware.com>
9378
9379 * linux-low.c (list_threads): Call closedir for dirent.
9380
35f5825a
MS
93812011-02-27 Michael Snyder <msnyder@vmware.com>
9382
2a589cef
MS
9383 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9384 a case statement falls through.
9385
0adea5f7
MS
9386 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9387
35f5825a
MS
9388 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9389 in comparison.
9390
238f1c74
MS
93912011-02-26 Michael Snyder <msnyder@vmware.com>
9392
9393 * utils.c (decimal2str): Eliminate dead code and dead param.
9394 (pulongest): Drop dead param from call to decimal2str.
9395 (plongest): Ditto.
9396
633ff500
JB
93972011-02-24 Joel Brobecker <brobecker@adacore.com>
9398
9399 Revert the following patch (not approved yet):
9400 2011-02-21 Hui Zhu <teawater@gmail.com>
9401 * tracepoint.c (tp_printf): New function.
9402 (eval_agent_expr): Handle gdb_agent_op_printf.
9403
f9c6ff72
HZ
94042011-02-21 Hui Zhu <teawater@gmail.com>
9405
9406 * tracepoint.c (tp_printf): New function.
9407 (eval_agent_expr): Handle gdb_agent_op_printf.
9408
94d5e490
TT
94092011-02-18 Tom Tromey <tromey@redhat.com>
9410
9411 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9412 (tracepoint.o): Likewise.
9413 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9414 (gdb_agent_op_names): Likewise.
9415
c7f96d2b
TT
94162011-02-18 Tom Tromey <tromey@redhat.com>
9417
9418 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9419 gdb_agent_op_rot>: New constants.
9420 (gdb_agent_op_names): Add pick and roll.
9421 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9422 cases.
9423
0feedb2c
JK
94242011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9425
9426 * aclocal.m4: Regenerated with aclocal-1.11.1.
9427
b3b9301e
PA
94282011-02-14 Pedro Alves <pedro@codesourcery.com>
9429
9430 * server.c (handle_qxfer_traceframe_info): New.
9431 (qxfer_packets): Register "traceframe-info".
9432 (handle_query): Report support for qXfer:traceframe-info:read+.
9433 * tracepoint.c (match_blocktype): New.
9434 (traceframe_find_block_type): Rename to ...
9435 (traceframe_walk_blocks): ... this. Add callback filter argument,
9436 and use it.
9437 (traceframe_find_block_type): New, reimplemented on top of
9438 traceframe_walk_blocks.
9439 (build_traceframe_info_xml): New.
9440 (traceframe_read_info): New.
9441 * server.h (traceframe_read_info): Declare.
9442
4f3e6fb7
YQ
94432011-02-11 Yao Qi <yao@codesourcery.com>
9444
9445 * configure.ac: Call AC_PROG_RANLIB.
9446 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9447 * configure: Regenerate.
9448
764880b7
PA
94492011-02-07 Pedro Alves <pedro@codesourcery.com>
9450
9451 * server.c (gdb_read_memory): Change return semantics to allow
9452 partial transfers.
9453 (handle_search_memory_1): Adjust.
9454 (process_serial_event) <'m' packet>: Handle partial transfers.
9455 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9456
1c79eb8a
PA
94572011-01-28 Pedro Alves <pedro@codesourcery.com>
9458
9459 * regcache.c (init_register_cache): Initialize
9460 regcache->register_status.
9461 (free_register_cache): Release regcache->register_status.
9462 (regcache_cpy): Copy register_status.
9463 (registers_to_string): Print 'x's for unavailable registers.
9464 (supply_register): Mark the register's status valid or
9465 unavailable, depending on whether a buffer was passed in or not.
9466 (supply_register_zeroed): New.
9467 (supply_regblock): Mark the registers' status valid or
9468 unavailable, depending on whether a buffer was passed in or not.
9469 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9470 (struct regcache): New `register_status' field.
9471 (supply_register_zeroed): Declare.
9472 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9473 supply_register_zeroed, rather than passing a NULL buffer to
9474 supply_register.
9475 * tracepoint.c (fetch_traceframe_registers): Update comment.
9476
85724a0e
PA
94772011-01-28 Pedro Alves <pedro@codesourcery.com>
9478
9479 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9480 buffer explicit.
9481
d08aafef
PA
94822011-01-25 Pedro Alves <pedro@codesourcery.com>
9483
9484 * server.h (decode_xfer_write): Change prototype.
9485 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9486 and don't extract the annex here.
9487 * server.c (decode_xfer_read): Remove `annex' parameter,
9488 and don't extract the annex here.
9489 (decode_xfer): New.
9490 (struct qxfer): New.
9491 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9492 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9493 (handle_qxfer_statictrace): New functions, abstracted out from
9494 handle_query, and made to use the struct qxfer interface.
9495 (handle_threads_qxfer_proper): Rename to ...
9496 (handle_qxfer_threads_proper): ... this.
9497 (handle_threads_qxfer): Rename to ...
9498 (handle_qxfer_threads): ... this. Adjust.
9499 (qxfer_packets): New array.
9500 (handle_qxfer): New function.
9501 (handle_query): Use handle_qxfer.
9502
493e2a69
MS
95032011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9504
9505 * gdbreplay.c: Shorten lines of >= 80 columns.
9506 * linux-low.c: Ditto.
9507 * linux-ppc-low.c: Ditto.
9508 * linux-s390-low.c: Ditto.
9509 * linux-sparc-low.c: Ditto.
9510 * linux-x86-low.c: Ditto.
9511 * linux-xtensa-low.c: Ditto.
9512 * mem-break.c: Ditto.
9513 * nto-low.c: Ditto.
9514 * regcache.h: Ditto.
9515 * remote-utils.c: Ditto.
9516 * server.c: Ditto.
9517 * server.h: Ditto.
9518 * thread-db.c: Ditto.
9519 * tracepoint.c: Ditto.
9520 * utils.c: Ditto.
9521 * win32-low.h: Ditto.
9522
44944448
JB
95232011-01-05 Joel Brobecker <brobecker@adacore.com>
9524
9525 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9526 update.
9527
71ce852c
JB
95282011-01-01 Joel Brobecker <brobecker@adacore.com>
9529
9530 * server.c (gdbserver_version): Update copyright year in version
9531 output.
9532 * gdbreplay.c (gdbreplay_version): Ditto.
9533
eb826dc6
MF
95342010-12-29 Jie Zhang <jie.zhang@analog.com>
9535
9536 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9537 * linux-bfin-low.c: New file.
9538 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9539 PT_DATA_ADDR for BFIN targets.
9540 * Makefile.in (SFILES): Add linux-bfin-low.c.
9541 (clean): Remove reg-bfin.c.
9542 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9543 * README: Mention supported Blackfin targets.
9544
39ab222a
MF
95452010-12-23 Mike Frysinger <vapier@gentoo.org>
9546
9547 * .gitignore: New file.
9548
a1f2ce7d
MF
95492010-11-16 Mike Frysinger <vapier@gentoo.org>
9550
9551 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9552
f474844c
JZ
95532010-10-22 Jie Zhang <jie@codesourcery.com>
9554
9555 * Makefile.in: Add FLAGS_TO_PASS variable.
9556 (install): Remove dependency of install-only and recursively
9557 invoke make for install-only.
9558
f1048712
DE
95592010-10-04 Doug Evans <dje@google.com>
9560
9561 * Makefile.in (uninstall): Use $(DESTDIR).
9562
b53a1623
PA
95632010-09-24 Pedro Alves <pedro@codesourcery.com>
9564
e6ee044d
PA
9565 PR gdb/11842
9566
b53a1623
PA
9567 * linux-x86-low.c (compat_siginfo_from_siginfo)
9568 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9569 si_code is < 0. Check for si_code == SI_TIMER before checking for
9570 si_code < 0.
9571
fa1bd1e4
JB
95722010-09-13 Joel Brobecker <brobecker@adacore.com>
9573
9574 * lynx-i386-low.c: New file.
9575 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9576
47fac8f8
JB
95772010-09-13 Joel Brobecker <brobecker@adacore.com>
9578
9579 * lynx-low.c (ptrace_request_to_str): Remove handling for
9580 request values that have been removed in LynxOS 5.x.
9581
1adfc54d
JB
95822010-09-13 Joel Brobecker <brobecker@adacore.com>
9583
9584 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9585 <ptrace.h>
9586
c2a66c29
NS
95872010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9588
9589 * configure.ac: Add --enable-inprocess-agent option.
9590 * configure: Rebuilt.
9591
32fcada3
YQ
95922010-09-06 Yao Qi <yao@codesourcery.com>
9593
9594 * linux-low.c (linux_kill): Remove unused variable.
9595 (linux_stabilize_threads): Likewise.
9596 * server.c (start_inferior): Likewise.
9597 (queue_stop_reply_callback): Likewise.
9598 * tracepoint.c (do_action_at_tracepoint): Likewise.
9599
0cccb683
YQ
96002010-09-06 Yao Qi <yao@codesourcery.com>
9601
9602 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9603 on return.
9604
423ec54c
JK
96052010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9606
9607 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9608
12ac6819
PA
96092010-09-06 Pedro Alves <pedro@codesourcery.com>
9610
9611 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9612 "$(IPA_DEPFILES)".
9613
8ed54b31
JB
96142010-09-01 Joel Brobecker <brobecker@adacore.com>
9615
9616 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9617 gdbserver/lynx-ppc-low.c: New files.
9618 * Makefile.in (lynx_low_h): New variable.
9619 (lynx-low.o, lynx-ppc-low.o): New rules.
9620 * configure.ac: On LynxOS, link with -lnetinet.
9621 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9622 * configure: regenerate.
9623
bb0116a4
JB
96242010-09-01 Joel Brobecker <brobecker@adacore.com>
9625
9626 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9627 * configure.ac: Add check for vasprintf and vsnprintf.
9628 * configure, config.in: Regenerate.
9629 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9630
a778ab81 96312010-09-01 Joel Brobecker <brobecker@adacore.com>
9632
9633 * gdbreplay.c: Move include of alloca.h up, next to include of
9634 malloc.h.
9635 * server.h: Add include of malloc.h.
9636 * mem-break.c: Remove include of malloc.h.
9637 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9638
8b034a19 96392010-09-01 Joel Brobecker <brobecker@adacore.com>
9640
9641 * Makefile.in (memmem.o): Build with -Wno-error.
9642
96432010-09-01 Joel Brobecker <brobecker@adacore.com>
9644
9645 * utils.c (xsnprintf): Make non-static.
9646 * server.h: Add xsnprintf declaration.
9647 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9648 replace calls to snprintf by calls to xsnprintf throughout.
9649
96502010-09-01 Joel Brobecker <brobecker@adacore.com>
9651
9652 * configure.ac: Add configure check for alloca.
9653 * configure, config.in: Regenerate.
9654 * server.h: Include alloca.h if it exists.
9655 * gdbreplay.c: Include alloca.h if it exists.
9656
1a981360
PA
96572010-08-28 Pedro Alves <pedro@codesourcery.com>
9658
9659 * linux-low.c (__SIGRTMIN): Define if not already defined.
9660 (linux_create_inferior): Check for __ANDROID__ rather than
9661 __SIGRTMIN.
9662 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9663 are already deferred.
9664 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9665 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9666 stopped and already has a pending signal to report.
9667 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9668 a pending signal to report or is moving out of a jump pad.
9669 (linux_init_signals): Check for __ANDROID__ rather than
9670 __SIGRTMIN.
9671
b4d51a55
PA
96722010-08-28 Pedro Alves <pedro@codesourcery.com>
9673
9674 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9675 debug_threads check. Avoid a linear search when not doing debug
9676 output.
9677
ec48365d
PA
96782010-08-27 Pedro Alves <pedro@codesourcery.com>
9679
9680 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9681 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9682 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9683 (process_event): Change local fd's type to gdb_fildes_t.
9684 (create_file_handler): Adjust prototype.
9685 (delete_file_handler): Adjust prototype.
9686 (handle_file_event): Adjust prototype. Use pfildes.
9687 (create_file_event): Adjsut prototype.
9688 * remote-utils.c (remote_desc, listen_desc): Change type to
9689 gdb_fildes_t.
9690 * server.h: New gdb_fildes_t typedef.
9691 [USE_WIN32API]: Include winsock2.h.
9692 (delete_file_handler, add_file_handler): Adjust prototypes.
9693 (pfildes): Declare.
9694 * utils.c (pfildes): New.
9695
854d88f0
PA
96962010-08-27 Pedro Alves <pedro@codesourcery.com>
9697
9698 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9699 * configure: Regenerate.
9700
0146f85b
PA
97012010-08-27 Pedro Alves <pedro@codesourcery.com>
9702
9703 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9704 (linux_done_accessing_memory): ... this.
9705 (linux_target_ops): Adjust.
9706 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9707 * nto-low.c (nto_target_ops): Adjust comment.
9708 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9709 * spu-low.c (spu_target_ops): Adjust comment.
9710 * target.h (target_ops): Rename unprepare_to_access_memory field
9711 to done_accessing_memory.
9712 (unprepare_to_access_memory): Rename to ...
9713 (done_accessing_memory): ... this.
9714
90d74c30
PA
97152010-08-26 Pedro Alves <pedro@codesourcery.com>
9716
9717 * linux-low.c (linux_prepare_to_access_memory): New.
9718 (linux_unprepare_to_access_memory): New.
9719 (linux_target_ops): Install them.
9720 * server.c (read_memory): Rename to ...
9721 (gdb_read_memory): ... this. Use
9722 prepare_to_access_memory/prepare_to_access_memory.
9723 (write_memory): Rename to ...
9724 (gdb_write_memory): ... this. Use
9725 prepare_to_access_memory/prepare_to_access_memory.
9726 (handle_search_memory_1): Adjust.
9727 (process_serial_event): Adjust.
9728 * target.h (struct target_ops): New fields
9729 prepare_to_access_memory and unprepare_to_access_memory.
9730 (prepare_to_access_memory, unprepare_to_access_memory): New.
9731 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9732 prepare_to_access_memory/prepare_to_access_memory.
9733 * nto-low.c (nto_target_ops): Adjust.
9734 * spu-low.c (spu_target_ops): Adjust.
9735 * win32-low.c (win32_target_ops): Adjust.
9736
fd467969
PA
97372010-08-26 Pedro Alves <pedro@codesourcery.com>
9738
9739 * Makefile.in (WARN_CFLAGS): Get it from configure.
9740 (WERROR_CFLAGS): New.
9741 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9742 * configure.ac: Introduce --enable-werror, which adds -Werror to
9743 the compiler command line. Enabled by default. Disable with
9744 --disable-werror. Add -Wdeclaration-after-statement
9745 Wpointer-arith and -Wformat-nonliteral to warning flags.
9746 * configure: Regenerate.
9747
331e2f5f
PA
97482010-08-26 Pedro Alves <pedro@codesourcery.com>
9749
9750 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9751
e581f2b4
PA
97522010-08-26 Pedro Alves <pedro@codesourcery.com>
9753
9754 * gdbreplay.c (remote_error): New.
9755 (gdbchar): New.
9756 (expect): Use gdbchar. Check for error reading from GDB.
9757 Clarify sync error output.
9758 (play): Check for errors writing to GDB.
9759 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9760 * remote-utils.c (getpkt): Check for errors writing to the remote
9761 descriptor.
9762
3c11dd79
PA
97632010-08-25 Pedro Alves <pedro@codesourcery.com>
9764
9765 * linux-low.c (linux_wait_1): Move non-debugging code out of
9766 `debug_threads' control.
9767
d20a8ad9
PA
97682010-08-25 Pedro Alves <pedro@codesourcery.com>
9769
9770 * linux-low.c (linux_wait_1): Don't set last_status here.
9771 * server.c (push_event, queue_stop_reply_callback): Assert we're
9772 not pushing a TARGET_WAITKIND_IGNORE event.
9773 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9774 (myresume, handle_target_event): Set the thread's last_resume_kind
9775 and last_status from the target returned status.
9776
964e4306
PA
97772010-08-25 Pedro Alves <pedro@codesourcery.com>
9778
9779 PR threads/10729
9780
9781 * linux-x86-low.c (update_debug_registers_callback): New.
9782 (i386_dr_low_set_addr): Use it.
9783 (i386_dr_low_get_addr): New.
9784 (i386_dr_low_set_control): Use update_debug_registers_callback.
9785 (i386_dr_low_get_control): New.
9786 (i386_dr_low_get_status): Adjust.
9787 * linux-low.c (linux_stop_lwp): New.
9788 * linux-low.h (linux_stop_lwp): Declare.
9789
9790 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9791 argument instead of a i386_debug_reg_state.
9792 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9793 a i386_debug_reg_state.
9794 (i386_insert_aligned_watchpoint): Adjust.
9795 (i386_remove_aligned_watchpoint): Adjust.
9796 (i386_low_stopped_data_address): Read the debug registers from the
9797 inferior instead of from the mirrors.
9798 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9799 (i386_dr_low_get_addr): Declare.
9800 (i386_dr_low_get_control): Declare.
9801 (i386_dr_low_get_status): Change prototype.
9802
9803 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9804 (i386_dr_low_get_addr): New.
9805 (i386_dr_low_get_control): New.
9806 (i386_dr_low_get_status): Adjust prototype. Return
9807 dr_status_mirror.
9808 (i386_initial_stuff): Clear dr_status_mirror and
9809 dr_control_mirror.
9810 (i386_get_thread_context): Adjust.
9811 (i386_set_thread_context): Adjust.
9812 (i386_thread_added): Adjust.
9813
5f21a75b
PA
98142010-08-24 Pedro Alves <pedro@codesourcery.com>
9815
9816 * linux-low.h (linux_thread_area): Delete declaration.
9817
3e4c1235
TS
98182010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9819
9820 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9821 after its termination.
9822
1971b033
PA
98232010-08-09 Pedro Alves <pedro@codesourcery.com>
9824
9825 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9826 (gdb_wants_all_stopped): Delete.
9827 (linux_wait_1): Don't call them.
9828 * server.c (handle_v_cont): Tag all threads as want-stopped.
9829 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9830 stopped as "client-wants-stopped".
9831
310444ac
PA
98322010-07-31 Pedro Alves <pedro@codesourcery.com>
9833
9834 * Makefile.in (signals_h): New.
9835 (server_h): Depend on it.
9836 (server.o): Don't depend on $(signals_def).
9837 (signals.o): Depend on $(signals_def).
9838
a19cae16
JK
98392010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9840
9841 * Makefile.in (signals_def): New.
9842 (server_h): Append include/gdb/signals.h and signals_def.
9843 (server.o): Append signals_def.
9844
30d50328
JK
98452010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9846
9847 * server.c (handle_target_event): Use target_signal_to_host for
9848 resume_info.sig initialization.
9849 * target.h (struct thread_resume) <sig>: New comment.
9850
5c3216e2
OS
98512010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9852
c6f46ca0
OS
9853 * server.c (handle_query): strcpy() the returned string from paddress()
9854 instead of sprintf().
5c3216e2
OS
9855 * utils.c (paddress): Return phex_nz().
9856
6bd31874
JB
98572010-07-07 Joel Brobecker <brobecker@adacore.com>
9858
9859 * server.c (handle_v_cont): Call mourn_inferior if process
9860 just exited.
9861 (myresume): Likewise.
9862
0fb4aa4b
PA
98632010-07-01 Pedro Alves <pedro@codesourcery.com>
9864
9865 Static tracepoints, and integration with UST.
9866
9867 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9868 * mem-break.c (uninsert_all_breakpoints)
9869 (reinsert_all_breakpoints): New.
9870 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9871 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9872 (gdb_agent_ust_loaded, helper_thread_id)
9873 (gdb_agent_helper_thread_id): New macros.
9874 (struct ipa_sym_addresses): Add addr_ust_loaded,
9875 addr_helper_thread_id, addr_cmd_buf.
9876 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9877 (in_process_agent_loaded_ust): New.
9878 (write_e_ust_not_loaded): New.
9879 (maybe_write_ipa_ust_not_loaded): New.
9880 (struct collect_static_trace_data_action): New.
9881 (enum tracepoint_type) <static_tracepoint>: New.
9882 (struct tracepoint) <handle>: Mention static tracepoints.
9883 (struct static_tracepoint_ctx): New.
9884 (CMD_BUF_SIZE): New.
9885 (add_tracepoint_action): Handle static tracepoint actions.
9886 (unprobe_marker_at): New.
9887 (clear_installed_tracepoints): Handle static tracepoints.
9888 (cmd_qtdp): Handle static tracepoints.
9889 (probe_marker_at): New.
9890 (cmd_qtstart): Handle static tracepoints.
9891 (response_tracepoint): Handle static tracepoints.
9892 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9893 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9894 (get_context_regcache): Handle static tracepoints.
9895 (do_action_at_tracepoint): Handle static tracepoint actions.
9896 (traceframe_find_block_type): Handle static trace data blocks.
9897 (traceframe_read_sdata): New.
9898 (download_tracepoints): Download static tracepoint actions.
9899 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9900 (GDB_PROBE_NAME): New.
9901 (ust_ops): New.
9902 (GET_UST_SYM): New.
9903 (USTF): New.
9904 (dlsym_ust): New.
9905 (ust_marker_to_static_tracepoint): New.
9906 (gdb_probe): New.
9907 (collect_ust_data_at_tracepoint): New.
9908 (gdb_ust_probe): New.
9909 (UNIX_PATH_MAX, SOCK_DIR): New.
9910 (gdb_ust_connect_sync_socket): New.
9911 (resume_thread, stop_thread): New.
9912 (run_inferior_command): New.
9913 (init_named_socket): New.
9914 (gdb_ust_socket_init): New.
9915 (cstr_to_hexstr): New.
9916 (next_st): New.
9917 (first_marker, next_marker): New.
9918 (response_ust_marker): New.
9919 (cmd_qtfstm, cmd_qtsstm): New.
9920 (unprobe_marker_at, probe_marker_at): New.
9921 (cmd_qtstmat, gdb_ust_thread): New.
9922 (gdb_ust_init): New.
9923 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9924 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9925 (ST_REGENTRY): New.
9926 (x86_64_st_collect_regmap): New.
9927 (X86_64_NUM_ST_COLLECT_GREGS): New.
9928 (AMD64_RIP_REGNUM): New.
9929 (supply_static_tracepoint_registers): New.
9930 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9931 (ST_REGENTRY): New.
9932 (i386_st_collect_regmap): New.
9933 (i386_NUM_ST_COLLECT_GREGS): New.
9934 (supply_static_tracepoint_registers): New.
9935 * server.c (handle_query): Handle qXfer:statictrace:read.
9936 <qSupported>: Report support for StaticTracepoints, and
9937 qXfer:statictrace:read features.
9938 * server.h (traceframe_read_sdata)
9939 (supply_static_tracepoint_registers): Declare.
9940 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9941 (unpack_varlen_hex): Include in IPA build.
9942 * Makefile.in (ustlibs, ustinc): New.
9943 (IPA_OBJS): Add remote-utils-ipa.o.
9944 ($(IPA_LIB)): Link -ldl and -lpthread.
9945 (UST_CFLAGS): New.
9946 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9947 * config.in, configure: Regenerate.
9948
9e4344e5
PA
99492010-06-20 Ian Lance Taylor <iant@google.com>
9950 Pedro Alves <pedro@codesourcery.com>
9951
9952 * linux-x86-low.c (always_true): Delete.
9953 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9954 trying to fool the compiler with always_true.
9955
c6beb2cb
PA
99562010-06-20 Pedro Alves <pedro@codesourcery.com>
9957
9958 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9959 conditions in gdbserver.
9960
d2ed6730
UW
99612010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9962
9963 * spu-low.c (spu_read_memory): Wrap around local store limit.
9964 (spu_write_memory): Likewise.
9965
4e29fb54
PA
99662010-06-15 Pedro Alves <pedro@codesourcery.com>
9967
9968 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9969 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9970 LONGEST uses.
9971 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9972 uses.
9973 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9974 uses with LONGEST uses.
9975
6a271cae
PA
99762010-06-14 Stan Shebs <stan@codesourcery.com>
9977 Pedro Alves <pedro@codesourcery.com>
9978
9979 Bytecode compiler.
9980
9981 * linux-x86-low.c: Include limits.h.
9982 (add_insns): New.
9983 (always_true): New.
9984 (EMIT_ASM): New.
9985 (EMIT_ASM32): New.
9986 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9987 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9988 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9989 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9990 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9991 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9992 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9993 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9994 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9995 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9996 (amd64_emit_void_call_2): New.
9997 (amd64_emit_ops): New.
9998 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9999 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10000 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10001 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10002 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10003 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10004 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10005 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10006 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10007 (i386_emit_stack_adjust, i386_emit_int_call_1)
10008 (i386_emit_void_call_2): New.
10009 (i386_emit_ops): New.
10010 (x86_emit_ops): New.
10011 (the_low_target): Install x86_emit_ops.
10012 * server.h (struct emit_ops): New.
10013 (get_raw_reg_func_addr): Declare.
10014 (current_insn_ptr, emit_error): Declare.
10015 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10016 (set_trace_state_variable_value): New defines.
10017 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10018 addr_get_trace_state_variable_value and
10019 addr_set_trace_state_variable_value.
10020 (symbol_list): New fields for get_raw_reg,
10021 get_trace_state_variable_value and set_trace_state_variable_value.
10022 (condfn): New typedef.
10023 (struct tracepoint): New field `compiled_cond'.
10024 (do_action_at_tracepoint): Clear compiled_cond.
10025 (get_trace_state_variable_value, set_trace_state_variable_value):
10026 Export in the IPA.
10027 (condition_true_at_tracepoint): If there's a compiled condition,
10028 run that.
10029 (current_insn_ptr, emit_error): New globals.
10030 (struct bytecode_address): New.
10031 (get_raw_reg_func_addr): New.
10032 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10033 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10034 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10035 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10036 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10037 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10038 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10039 (compile_tracepoint_condition, compile_bytecodes): New.
10040 * target.h (emit_ops): Forward declare.
10041 (struct target_ops): New field emit_ops.
10042 (target_emit_ops): New.
10043 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10044 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10045 * linux-low.c (linux_emit_ops): New.
10046 (linux_target_ops): Install it.
10047 * linux-low.h (struct linux_target_ops): New field emit_ops.
10048
92b72907
UW
100492010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10050
10051 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10052 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10053
fa593d66
PA
100542010-06-01 Pedro Alves <pedro@codesourcery.com>
10055 Stan Shebs <stan@codesourcery.com>
10056
10057 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10058 (all): Depend on $(extra_libraries).
10059 (install-only): Install the IPA.
10060 (IPA_OBJS, IPA_LIB): New.
10061 (clean): Remove the IPA lib.
10062 (IPAGENT_CFLAGS): New.
10063 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10064 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10065 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10066 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10067 * configure.ac: Check for atomic builtins support in the compiler.
10068 (IPA_DEPFILES, extra_libraries): Define.
10069 * configure.srv (ipa_obj): Add description.
10070 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10071 (i[34567]86-*-linux*): Set ipa_obj.
10072 (x86_64-*-linux*): Set ipa_obj.
10073 * linux-low.c (stabilizing_threads): New.
10074 (supports_fast_tracepoints): New.
10075 (linux_detach): Stabilize threads before detaching.
10076 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10077 the lwp is either not stabilizing, or is moving out of a jump pad.
10078 (linux_fast_tracepoint_collecting): New.
10079 (maybe_move_out_of_jump_pad): New.
10080 (enqueue_one_deferred_signal): New.
10081 (dequeue_one_deferred_signal): New.
10082 (linux_wait_for_event_1): If moving out of a jump pad, defer
10083 pending signals to later.
10084 (linux_stabilize_threads): New.
10085 (linux_wait_1): Check if threads need moving out of jump pads, and
10086 do it if so.
10087 (stuck_in_jump_pad_callback): New.
10088 (move_out_of_jump_pad_callback): New.
10089 (lwp_running): New.
10090 (linux_resume_one_lwp): Handle moving out of jump pads.
10091 (linux_set_resume_request): Dequeue deferred signals.
10092 (need_step_over_p): Also step over fast tracepoint jumps.
10093 (start_step_over): Also uninsert fast tracepoint jumps.
10094 (finish_step_over): Also reinsert fast tracepoint jumps.
10095 (linux_install_fast_tracepoint_jump): New.
10096 (linux_target_ops): Install linux_stabilize_threads and
10097 linux_install_fast_tracepoint_jump_pad.
10098 * linux-low.h (linux_target_ops) <get_thread_area,
10099 install_fast_tracepoint_jump_pad>: New fields.
10100 (struct lwp_info) <collecting_fast_tracepoint,
10101 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10102 (linux_get_thread_area): Declare.
10103 * linux-x86-low.c (jump_insn): New.
10104 (x86_get_thread_area): New.
10105 (append_insns): New.
10106 (push_opcode): New.
10107 (amd64_install_fast_tracepoint_jump_pad): New.
10108 (i386_install_fast_tracepoint_jump_pad): New.
10109 (x86_install_fast_tracepoint_jump_pad): New.
10110 (the_low_target): Install x86_get_thread_area and
10111 x86_install_fast_tracepoint_jump_pad.
10112 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10113 (struct fast_tracepoint_jump): New.
10114 (fast_tracepoint_jump_insn): New.
10115 (fast_tracepoint_jump_shadow): New.
10116 (find_fast_tracepoint_jump_at): New.
10117 (fast_tracepoint_jump_here): New.
10118 (delete_fast_tracepoint_jump): New.
10119 (set_fast_tracepoint_jump): New.
10120 (uninsert_fast_tracepoint_jumps_at): New.
10121 (reinsert_fast_tracepoint_jumps_at): New.
10122 (set_breakpoint_at): Use write_inferior_memory.
10123 (uninsert_raw_breakpoint): Use write_inferior_memory.
10124 (check_mem_read): Mask out fast tracepoint jumps.
10125 (check_mem_write): Mask out fast tracepoint jumps.
10126 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10127 (set_fast_tracepoint_jump): Declare.
10128 (delete_fast_tracepoint_jump)
10129 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10130 (reinsert_fast_tracepoint_jumps_at): Declare.
10131 * regcache.c: Don't compile many functions when building the
10132 in-process agent library.
10133 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10134 the register buffer in the heap.
10135 (free_register_cache): If the register buffer isn't owned by the
10136 regcache, don't free it.
10137 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10138 pre-existing register caches.
10139 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10140 type.
10141 (convert_ascii_to_int): : Constify `from' parameter type.
10142 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10143 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10144 the needed buffer in-place.
10145 (relocate_instruction): New.
10146 * server.c (handle_query) <qSymbols>: If the target supports
10147 tracepoints, give it a chance of looking up symbols. Report
10148 support for fast tracepoints.
10149 (handle_status): Stabilize threads.
10150 (process_serial_event): Adjust.
10151 * server.h (struct fast_tracepoint_jump): Forward declare.
10152 (struct process_info) <fast_tracepoint_jumps>: New field.
10153 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10154 (decode_X_packet, decode_M_packet): Adjust.
10155 (relocate_instruction): Declare.
10156 (in_process_agent_loaded): Declare.
10157 (tracepoint_look_up_symbols): Declare.
10158 (struct fast_tpoint_collect_status): Declare.
10159 (fast_tracepoint_collecting): Declare.
10160 (force_unlock_trace_buffer): Declare.
10161 (handle_tracepoint_bkpts): Declare.
10162 (initialize_low_tracepoint)
10163 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10164 * target.h (struct target_ops) <stabilize_threads,
10165 install_fast_tracepoint_jump_pad>: New fields.
10166 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10167 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10168 [HAVE_STDINT_H]: Include stdint.h.
10169 (trace_debug_1): Rename to ...
10170 (trace_vdebug): ... this.
10171 (trace_debug): Rename to ...
10172 (trace_debug_1): ... this. Add `level' parameter.
10173 (trace_debug): New.
10174 (ATTR_USED, ATTR_NOINLINE): New.
10175 (IP_AGENT_EXPORT): New.
10176 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10177 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10178 (about_to_request_buffer_space, trace_buffer_is_full)
10179 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10180 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10181 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10182 (traceframe_write_count, traceframes_created)
10183 (trace_state_variables)
10184 New renaming defines.
10185 (struct ipa_sym_addresses): New.
10186 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10187 (symbol_list): New.
10188 (ipa_sym_addrs): New.
10189 (all_tracepoint_symbols_looked_up): New.
10190 (in_process_agent_loaded): New.
10191 (write_e_ipa_not_loaded): New.
10192 (maybe_write_ipa_not_loaded): New.
10193 (tracepoint_look_up_symbols): New.
10194 (debug_threads) [IN_PROCESS_AGENT]: New.
10195 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10196 (UNKNOWN_SIDE_EFFECTS): New.
10197 (stop_tracing): New.
10198 (flush_trace_buffer): New.
10199 (stop_tracing_bkpt): New.
10200 (flush_trace_buffer_bkpt): New.
10201 (read_inferior_integer): New.
10202 (read_inferior_uinteger): New.
10203 (read_inferior_data_pointer): New.
10204 (write_inferior_data_pointer): New.
10205 (write_inferior_integer): New.
10206 (write_inferior_uinteger): New.
10207 (struct collect_static_trace_data_action): Delete.
10208 (enum tracepoint_type): New.
10209 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10210 <actions_str, step_actions, step_actions_str>: Only include in
10211 GDBserver.
fa593d66
PA
10212 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10213 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10214 (tracepoints): Use IP_AGENT_EXPORT.
10215 (last_tracepoint): Don't include in the IPA.
10216 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10217 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10218 (alloced_trace_state_variables): New.
10219 (trace_state_variables): Use IP_AGENT_EXPORT.
10220 (traceframe_t): Delete unused variable.
10221 (circular_trace_buffer): Don't include in the IPA.
10222 (trace_buffer_start): Delete.
10223 (struct trace_buffer_control): New.
10224 (trace_buffer_free): Delete.
10225 (struct ipa_trace_buffer_control): New.
10226 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10227 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10228 New.
10229 (trace_buffer_ctrl): New.
10230 (TRACE_BUFFER_CTRL_CURR): New.
10231 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10232 Reimplement as macros.
10233 (trace_buffer_wrap): Delete.
10234 (traceframe_write_count, traceframe_read_count)
10235 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10236 (struct tracepoint_hit_ctx) <type>: New field.
10237 (struct fast_tracepoint_ctx): New.
10238 (memory_barrier): New.
10239 (cmpxchg): New.
10240 (record_tracepoint_error): Update atomically in the IPA.
10241 (clear_inferior_trace_buffer): New.
10242 (about_to_request_buffer_space): New.
10243 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10244 updating the same buffer.
10245 (add_tracepoint): Default the tracepoint's type to trap
10246 tracepoint, and orig_size to -1.
10247 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10248 internal variables.
10249 (create_trace_state_variable): New parameter `gdb'. Handle it.
10250 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10251 (cmd_qtdp): Handle fast tracepoints.
10252 (cmd_qtdv): Adjust.
10253 (max_jump_pad_size): New.
10254 (gdb_jump_pad_head): New.
10255 (get_jump_space_head): New.
10256 (claim_jump_space): New.
10257 (sort_tracepoints): New.
10258 (MAX_JUMP_SIZE): New.
10259 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10260 IPA.
10261 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10262 support. Upload fast traceframes, and delete internal IPA
10263 breakpoints.
10264 (stop_tracing_handler): New.
10265 (flush_trace_buffer_handler): New.
10266 (cmd_qtstop): Upload fast tracepoints.
10267 (response_tracepoint): Handle fast tracepoints.
10268 (tracepoint_finished_step): Upload fast traceframes. Set the
10269 tracepoint hit context's tracepoint type.
10270 (handle_tracepoint_bkpts): New.
10271 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10272 type. Add comment about fast tracepoints.
10273 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10274 non-existing action_str field.
10275 (get_context_regcache): Handle fast tracepoints.
10276 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10277 to the regcache.
10278 (fast_tracepoint_from_jump_pad_address): New.
10279 (fast_tracepoint_from_ipa_tpoint_address): New.
10280 (collecting_t): New.
10281 (force_unlock_trace_buffer): New.
10282 (fast_tracepoint_collecting): New.
10283 (collecting): New.
10284 (gdb_collect): New.
10285 (write_inferior_data_ptr): New.
10286 (target_tp_heap): New.
10287 (target_malloc): New.
10288 (download_agent_expr): New.
10289 (UALIGN): New.
10290 (download_tracepoints): New.
10291 (download_trace_state_variables): New.
10292 (upload_fast_traceframes): New.
10293 (IPA_FIRST_TRACEFRAME): New.
10294 (IPA_NEXT_TRACEFRAME_1): New.
10295 (IPA_NEXT_TRACEFRAME): New.
10296 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10297 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10298 (gdb_jump_pad_buffer_end): New.
10299 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10300 (initialize_tracepoint): Adjust.
10301 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10302 buffer. Initialize the low module.
10303 * utils.c (PREFIX, TOOLNAME): New.
10304 (malloc_failure): Use PREFIX.
10305 (error): In the IPA, an error causes an exit.
10306 (fatal, warning): Use PREFIX.
10307 (internal_error): Use TOOLNAME.
10308 (NUMCELLS): Increase to 10.
10309 * configure, config.in: Regenerate.
10310
d149dd1d
PA
103112010-06-01 Pedro Alves <pedro@codesourcery.com>
10312
10313 * server.c (handle_query) <qSupported>: Do two passes over the
10314 qSupported string to avoid nesting strtok.
10315
f6528abd
JK
103162010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10317
10318 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10319 (CDEPS): New.
10320 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10321 -Wl,--dynamic-list.
10322 * configure: Regenerate.
10323 * proc-service.list: New.
10324
ca2a87a0
JK
103252010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10326
10327 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10328 New comment.
10329
363a6e9f
OS
103302010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10331
10332 * gdbreplay.c (remote_open): Check error return from socket() call by
10333 its equality to -1 not by it being negative.
10334 * remote-utils.c (remote_open): Likewise.
10335
d23b6cb1
PA
103362010-05-23 Pedro Alves <pedro@codesourcery.com>
10337
10338 * config.h: Regenerate.
10339
28d3cf85
MK
103402010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10341
10342 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10343 doesn't provide PTRACE_GET_THREAD_AREA.
10344
fea36a59
MK
103452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10346
10347 * linux-m68k-low.c: Include <asm/ptrace.h>
10348 (ps_get_thread_area): Implement.
10349
24b066ba
DE
103502010-05-03 Doug Evans <dje@google.com>
10351
10352 * event-loop.c (struct callback_event): New struct.
10353 (callback_list): New global.
10354 (append_callback_event, delete_callback_event): New functions.
10355 (process_callback): New function.
10356 (start_event_loop): Call it.
10357 * remote-utils.c (NOT_SCHEDULED): Define.
10358 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10359 moved out of readchar.
10360 (readchar): Rewrite. Call reschedule before returning.
10361 (reset_readchar): New function.
10362 (remote_close): Call it.
10363 (process_remaining, reschedule): New functions.
10364 * server.h (callback_handler_func): New typedef.
10365 (append_callback_event, delete_callback_event): Declare.
10366
9836d6ea
PA
103672010-05-03 Pedro Alves <pedro@codesourcery.com>
10368
10369 * proc-service.c (ps_pglobal_lookup): Use
10370 thread_db_look_up_one_symbol.
10371 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10372 parameter. Use it instead of all_symbols_looked_up.
10373 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10374 field.
10375 (all_symbols_looked_up): Don't declare.
10376 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10377 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10378 field.
10379 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10380 Set all_symbols_looked_up here.
10381 (thread_db_look_up_one_symbol): New.
10382 (thread_db_get_tls_address): Adjust.
10383 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10384 thread_db object on the heap, and tentatively set it in the
10385 process structure.
10386 (thread_db_init): Don't set all_symbols_looked_up here.
10387 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10388
7984d532
PA
103892010-05-03 Pedro Alves <pedro@codesourcery.com>
10390
10391 * linux-low.c (linux_kill, linux_detach): Adjust.
10392 (status_pending_p_callback): Remove redundant statement. Check
10393 for !TARGET_WAITIKIND_IGNORE, instead of
10394 TARGET_WAITKIND_STOPPED.
10395 (handle_tracepoints): Make sure LWP is locked. Adjust.
10396 (linux_wait_for_event_1): Adjust.
10397 (linux_cancel_breakpoints): New.
10398 (unsuspend_one_lwp): New.
10399 (unsuspend_all_lwps): New.
10400 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10401 (send_sigstop_callback): Change return type to int, add new
10402 `except' parameter and handle it.
10403 (suspend_and_send_sigstop_callback): New.
10404 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10405 pass them down. If SUSPEND, also increment the lwp's suspend
10406 count.
10407 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10408 (need_step_over_p): Don't consider suspended LWPs.
10409 (start_step_over): Adjust.
10410 (proceed_one_lwp): Change return type to int, add new `except'
10411 parameter and handle it.
10412 (unsuspend_and_proceed_one_lwp): New.
10413 (proceed_all_lwps): Use find_inferior instead of
10414 for_each_inferior.
10415 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10416 also decrement the suspend count of LWPs. Pass `except' down,
10417 instead of hacking its suspend count.
10418 (linux_pause_all): Add `freeze' parameter. Adjust.
10419 (linux_unpause_all): New.
10420 (linux_target_ops): Install linux_unpause_all.
10421 * server.c (handle_status): Adjust.
10422 * target.h (struct target_ops): New fields `unpause_all' and
10423 `cancel_breakpoints'. Add new parameter to `pause_all'.
10424 (pause_all): Add new `freeze' parameter.
10425 (unpause_all): New.
10426 (cancel_breakpoints): New.
10427 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10428 cancel breakpoints.
10429 (cmd_qtstart): Pause threads.
10430 (stop_tracing): Pause threads, and cancel breakpoints.
10431 * win32-low.c (win32_target_ops): Adjust.
10432
e471f25b
PA
104332010-05-03 Pedro Alves <pedro@codesourcery.com>
10434
10435 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10436 the inferior right away from here...
10437 (linux_wait_1): ... to here, and adjust to check the thread's
10438 last_resume_kind instead of the lwp's step or stop_expected flags.
10439
1915ef4f
PA
104402010-05-02 Pedro Alves <pedro@codesourcery.com>
10441
10442 * README: Use consistent `GDB' and `GDBserver' spellings.
10443
f9e39928
PA
104442010-05-02 Pedro Alves <pedro@codesourcery.com>
10445
10446 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10447 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10448 (linux_detach_one_lwp): Assume the lwp is stopped.
10449 (any_thread_of): Delete.
10450 (linux_detach): Stop all lwps here. Don't blindly delete all
10451 breakpoints.
10452 (delete_lwp_callback): New.
10453 (linux_mourn): Delete all lwps of the process that is gone.
10454 (linux_wait_1): Don't delete the last lwp of the process here.
10455 * mem-break.h (mark_breakpoints_out): Declare.
10456 * mem-break.c (mark_breakpoints_out): New.
10457 (free_all_breakpoints): Use it.
10458 * server.c (handle_target_event): If the process is gone, mark
10459 breakpoints out.
10460 * thread-db.c (struct thread_db) <create_bp>: New field.
10461 (thread_db_enable_reporting): Fix prototype. Store a thread event
10462 breakpoint reference in the thread_db struct.
10463 (thread_db_load_search): Clear the thread_db object.
10464 (try_thread_db_load_1): Ditto.
10465 (switch_to_process): New.
10466 (disable_thread_event_reporting): Use it.
10467 (remove_thread_event_breakpoints): New.
10468 (thread_db_detach, thread_db_mourn): Use it.
10469
1e7fc18c
PA
104702010-05-01 Pedro Alves <pedro@codesourcery.com>
10471
10472 * linux-low.c (linux_enable_event_reporting): New.
10473 (linux_wait_for_event_1, handle_extended_wait): Use it.
10474
02fc4de7
PA
104752010-04-30 Pedro Alves <pedro@codesourcery.com>
10476
10477 * linux-low.c (linux_kill_one_lwp, linux_kill)
10478 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10479 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10480 SIGSTOP even if the LWP is stopped.
10481 (send_sigstop_callback): New.
10482 (stop_all_lwps): Use send_sigstop_callback instead.
10483 (linux_resume_one_thread): Adjust.
10484 (proceed_one_lwp): Still proceed an LWP that the client has
10485 requested to stop, if we haven't reported it as stopped yet. Make
10486 sure that LWPs the client want stopped, have a pending SIGSTOP.
10487
bc3b5632
DE
104882010-04-26 Doug Evans <dje@google.com>
10489
ae1ada35
DE
10490 * server.c (handle_general_set): Make static.
10491
bc3b5632
DE
10492 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10493 Print received char after testing for error/eof instead of before.
10494 (input_interrupt): Tweak comment.
10495
65730243
DE
104962010-04-23 Doug Evans <dje@google.com>
10497
10498 * server.c (start_inferior): Print inferior argv if --debug.
10499
a8ae7dc0
AR
105002010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10501
10502 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10503 * nto-x86-low.c: Include server.h
10504
1c07cc19
PM
105052010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10506
10507 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10508 be consistent with other sources of this directory.
10509 (init_registers_amd64): Correct name of source file of this function
10510 in the comment.
10511
e0a61e09
PM
105122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10513
10514 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10515 64-bit executables.
10516
54709339
PM
105172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10518
10519 * win32-i386-low.c: Add 64-bit support.
10520 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10521 (init_registers_amd64): Declare.
10522 (mappings): Add 64-bit version of array.
10523 (init_windows_x86): New function.
10524 (the_low_target): Change init_arch field to init_windows_x86.
10525
e8f0053d
PM
105262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10527
10528 * win32-low.c: Adapt to support also 64-bit architecture.
10529 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10530 (get_image_name): Use SIZE_T type for local variable `done'.
10531 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10532 (toolhelp_get_dll_name): Idem.
10533 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10534 Use uintptr_t typecast to avoid warning.
10535 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10536 (handle_exception): Use phex_nz to avoid warning.
10537 (win32_wait): Remove unused local variable `process'.
10538
c481e77e
PM
105392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10540
10541 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10542 `amd64-avx.o'.
10543
12ea4b69
PM
105442010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10545
10546 * configure.ac: Use `ws2_32' library for srv_mingw.
10547 * configure: Regenerate.
10548 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10549 * remote-utils.c: Likewise.
10550
f6d1620c
L
105512010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10552
10553 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10554 if __x86_64__ is defined.
10555
8e642873
PM
105562010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10557
10558 * configure: Regenerate.
10559
711e434b
PM
105602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10561
10562 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10563 * target.h (target_ops): New get_tib_address field.
10564 * win32-low.h (win32_thread_info): Add thread_local_base field.
10565 * win32-low.c (child_add_thread): Add tlb argument.
10566 Set thread_local_base field to TLB.
10567 (get_child_debug_event): Adapt to child_add_thread change.
10568 (win32_get_tib_address): New function.
10569 (win32_target_ops): Set get_tib_address field to
10570 win32_get_tib_address.
10571 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10572
505106cd
PA
105732010-04-12 Pedro Alves <pedro@codesourcery.com>
10574
505106cd
PA
10575 * linux-low.c (linux_mourn): Also remove the process.
10576 * server.c (handle_target_event): Don't remove the process here.
10577 * nto-low.c (nto_mourn): New.
10578 (nto_target_ops): Install it.
10579 * spu-low.c (spu_mourn): New.
10580 (spu_target_ops): Install it.
10581 * win32-low.c (win32_mourn): New.
10582 (win32_target_ops): Install it.
10583
e8470a06
PA
105842010-04-12 Pedro Alves <pedro@codesourcery.com>
10585
10586 * server.h (buffer_xml_printf): Remove redundant `;'.
10587
45ba0d02
PA
105882010-04-12 Pedro Alves <pedro@codesourcery.com>
10589
10590 * regcache.c (set_register_cache): Invalidate regcaches before
10591 changing the register cache layout.
10592 (regcache_invalidate_one): Allow a NULL regcache.
10593 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10594 regcaches before changing the register cache layout or the target
10595 regsets.
10596
59e04013
L
105972010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10598
10599 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10600 variable warning on Linux/x86-64.
10601
8336d594
PA
106022010-04-11 Pedro Alves <pedro@codesourcery.com>
10603
10604 GDBserver disconnected tracing support.
10605
10606 * linux-low.c (linux_remove_process): Delete.
10607 (add_lwp): Don't set last_resume_kind here.
10608 (linux_kill): Use `mourn'.
10609 (linux_detach): Use `thread_db_detach', and `mourn'.
10610 (linux_mourn): New.
10611 (linux_attach_lwp_1): Adjust comment.
10612 (linux_attach): last_resume_kind moved the thread_info; adjust.
10613 (status_pending_p_callback): Adjust.
10614 (linux_wait_for_event_1): Adjust.
10615 (count_events_callback, select_singlestep_lwp_callback)
10616 (select_event_lwp_callback, cancel_breakpoints_callback)
10617 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10618 (proceed_one_lwp): Adjust.
10619 (linux_async): Add debug output.
10620 (linux_thread_stopped): New.
10621 (linux_pause_all): New.
10622 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10623 linux_pause_all.
10624 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10625 (thread_db_free): Delete declaration.
10626 (thread_db_detach, thread_db_mourn): Declare.
10627 * thread-db.c (thread_db_init): Use thread_db_mourn.
10628 (thread_db_free): Delete, split in two.
10629 (disable_thread_event_reporting): New.
10630 (thread_db_detach): New.
10631 (thread_db_mourn): New.
10632
10633 * server.h (struct thread_info) <last_resume_kind>: New field.
10634 <attached>: Add comment.
10635 <gdb_detached>: New field.
10636 (handler_func): Change return type to int.
10637 (handle_serial_event, handle_target_event): Ditto.
10638 (gdb_connected): Declare.
10639 (tracing): Delete.
10640 (disconnected_tracing): Declare.
10641 (stop_tracing): Declare.
10642
10643 * server.c (handle_query) <qSupported>: Report support for
10644 disconnected tracing.
10645 (queue_stop_reply_callback): Account for running threads.
10646 (gdb_wants_thread_stopped): New.
10647 (gdb_wants_all_threads_stopped): New.
10648 (gdb_reattached_process): New.
10649 (handle_status): Clear the `gdb_detached' flag of all processes.
10650 In all-stop, stop all threads.
10651 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10652 (process_serial_event): If the remote connection breaks, or if an
10653 exit was forced with "monitor exit", force an event loop exit.
10654 Handle disconnected tracing on detach.
10655 (handle_serial_event): Adjust.
10656 (handle_target_event): If GDB isn't connected, forward events back
10657 to the inferior, unless the last process exited, in which case,
10658 exit gdbserver. Adjust interface.
10659
10660 * remote-utils.c (remote_open): Don't block in accept. Instead
10661 register an event loop source on the listen socket file
10662 descriptor. Refactor bits into ...
10663 (listen_desc): ... this new global.
10664 (gdb_connected): ... this new function.
10665 (enable_async_notification): ... this new function.
10666 (handle_accept_event): ... this new function.
10667 (remote_close): Clear remote_desc.
10668
10669 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10670
10671 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10672 New fields.
10673 (mourn_inferior): Define.
10674 (target_process_qsupported): Avoid the dangling else problem.
10675 (thread_stopped): Define.
10676 (pause_all): Define.
10677 (target_waitstatus_to_string): Declare.
10678 * target.c (target_waitstatus_to_string): New.
10679
10680 * tracepoint.c (tracing): Make extern.
10681 (disconnected_tracing): New.
10682 (stop_tracing): Make extern. Handle tracing stops due to GDB
10683 disconnecting.
10684 (cmd_qtdisconnected): New.
10685 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10686 (handle_tracepoint_general_set): Handle QTDisconnected.
10687
10688 * event-loop.c (event_handler_func): Change return type to int.
10689 (process_event): Bail out if the event handler wants the event
10690 loop to stop.
10691 (handle_file_event): Ditto.
10692 (start_event_loop): Bail out if the event handler wants the event
10693 loop to stop.
10694
10695 * nto-low.c (nto_target_ops): Adjust.
10696 * spu-low.c (spu_wait): Don't remove the process here.
10697 (spu_target_ops): Adjust.
10698 * win32-low.c (win32_wait): Don't remove the process here.
10699 (win32_target_ops): Adjust.
10700
5d267c4c
PA
107012010-04-11 Pedro Alves <pedro@codesourcery.com>
10702
10703 * regcache.c (realloc_register_cache): Invalidate inferior's
10704 regcache before recreating it.
10705
623ccd72
PA
107062010-04-09 Pedro Alves <pedro@codesourcery.com>
10707
10708 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10709
219f2f23
PA
107102010-04-09 Stan Shebs <stan@codesourcery.com>
10711 Pedro Alves <pedro@codesourcery.com>
10712
10713 * server.h (LONGEST): New.
10714 (struct thread_info) <while_stepping>: New field.
10715 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10716 Declare.
10717 (initialize_tracepoint, handle_tracepoint_general_set)
10718 (handle_tracepoint_query, tracepoint_finished_step)
10719 (tracepoint_was_hit, release_while_stepping_state_list):
10720 (current_traceframe): Declare.
10721 * server.c (handle_general_set): Handle tracepoint packets.
10722 (read_memory): New.
10723 (write_memory): New.
10724 (handle_search_memory_1): Use read_memory.
10725 (handle_query): Report support for conditional tracepoints, trace
10726 state variables, and tracepoint sources. Handle tracepoint
10727 queries.
10728 (main): Initialize the tracepoints module.
10729 (process_serial_event): Handle traceframe reads/writes.
10730
10731 * linux-low.c (handle_tracepoints): New.
10732 (linux_wait_1): Call it.
10733 (linux_resume_one_lwp): Handle while-stepping.
10734 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10735 (linux_target_ops): Install them.
10736 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10737 New field.
10738 * linux-x86-low.c (x86_supports_tracepoints): New.
10739 (the_low_target). Install it.
10740
10741 * mem-break.h (delete_breakpoint): Declare.
10742 * mem-break.c (delete_breakpoint): Make external.
10743
10744 * target.h (struct target_ops): Add `supports_tracepoints',
10745 `read_pc', and `write_pc' fields.
10746 (target_supports_tracepoints): Define.
10747 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10748 (phex_nz): New.
10749
10750 * regcache.h (struct regcache) <registers_owned>: New field.
10751 (init_register_cache, regcache_cpy): Declare.
10752 (regcache_read_pc, regcache_write_pc): Declare.
10753 (register_cache_size): Declare.
10754 (supply_regblock): Declare.
10755 * regcache.c (init_register_cache): New.
10756 (new_register_cache): Use it.
10757 (regcache_cpy): New.
10758 (register_cache_size): New.
10759 (supply_regblock): New.
10760 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10761
219f2f23
PA
10762 * tracepoint.c: New.
10763
10764 * Makefile.in (OBS): Add tracepoint.o.
10765 (tracepoint.o): New rule.
10766
3a13a53b
L
107672010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10768
10769 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10770 (i386-mmx.o): New.
10771 (i386-mmx.c): Likewise.
10772 (i386-mmx-linux.o): Likewise.
10773 (i386-mmx-linux.c): Likewise.
10774
10775 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10776 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10777 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10778 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10779
10780 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10781 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10782 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10783
1570b33e
L
107842010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10785
10786 * Makefile.in (clean): Updated.
10787 (i386-avx.o): New.
10788 (i386-avx.c): Likewise.
10789 (i386-avx-linux.o): Likewise.
10790 (i386-avx-linux.c): Likewise.
10791 (amd64-avx.o): Likewise.
10792 (amd64-avx.c): Likewise.
10793 (amd64-avx-linux.o): Likewise.
10794 (amd64-avx-linux.c): Likewise.
10795
10796 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10797 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10798 (srv_amd64_regobj): Add amd64-avx.o.
10799 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10800 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10801 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10802 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10803 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10804 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10805 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10806
10807 * i387-fp.c: Include "i386-xstate.h".
10808 (i387_xsave): New.
10809 (i387_cache_to_xsave): Likewise.
10810 (i387_xsave_to_cache): Likewise.
10811 (x86_xcr0): Likewise.
10812
10813 * i387-fp.h (i387_cache_to_xsave): Likewise.
10814 (i387_xsave_to_cache): Likewise.
10815 (x86_xcr0): Likewise.
10816
10817 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10818 * linux-crisv32-low.c (target_regsets): Likewise.
10819 * linux-m68k-low.c (target_regsets): Likewise.
10820 * linux-mips-low.c (target_regsets): Likewise.
10821 * linux-ppc-low.c (target_regsets): Likewise.
10822 * linux-s390-low.c (target_regsets): Likewise.
10823 * linux-sh-low.c (target_regsets): Likewise.
10824 * linux-sparc-low.c (target_regsets): Likewise.
10825 * linux-xtensa-low.c (target_regsets): Likewise.
10826
10827 * linux-low.c: Include <sys/uio.h>.
10828 (regsets_fetch_inferior_registers): Support nt_type.
10829 (regsets_store_inferior_registers): Likewise.
10830 (linux_process_qsupported): New.
10831 (linux_target_ops): Add linux_process_qsupported.
10832
10833 * linux-low.h (regset_info): Add nt_type.
10834 (linux_target_ops): Add process_qsupported.
10835
10836 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10837 and <sys/uio.h>.
10838 (init_registers_i386_avx_linux): New.
10839 (init_registers_amd64_avx_linux): Likewise.
10840 (xmltarget_i386_linux_no_xml): Likewise.
10841 (xmltarget_amd64_linux_no_xml): Likewise.
10842 (PTRACE_GETREGSET): Likewise.
10843 (PTRACE_SETREGSET): Likewise.
10844 (x86_fill_xstateregset): Likewise.
10845 (x86_store_xstateregset): Likewise.
10846 (use_xml): Likewise.
10847 (x86_linux_update_xmltarget): Likewise.
10848 (x86_linux_process_qsupported): Likewise.
10849 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10850 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10851 init_registers_i386_linux here. Call
10852 x86_linux_update_xmltarget.
10853 (the_low_target): Add x86_linux_process_qsupported.
10854
10855 * server.c (handle_query): Call target_process_qsupported.
10856
10857 * target.h (target_ops): Add process_qsupported.
10858 (target_process_qsupported): New.
10859
fc7238bb
PA
108602010-04-03 Pedro Alves <pedro@codesourcery.com>
10861
10862 * inferiors.c (add_thread): Set last_status kind to
10863 TARGET_WAITKIND_IGNORE.
10864 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10865 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10866 (linux_wait_1): Move `thread' local definition to block that uses
10867 it. Don't NULL initialize `event_child'.
10868 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10869 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10870 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10871
bdabb078
PA
108722010-04-01 Pedro Alves <pedro@codesourcery.com>
10873
10874 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10875 an extended waitstatus, or by a watchpoint.
10876 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10877 thread was stepping or has been stopped by a watchpoint.
10878
d3bbe7a0
PA
108792010-04-01 Pedro Alves <pedro@codesourcery.com>
10880
10881 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10882 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10883 of another, then delete the previous, and validate all
10884 breakpoints.
10885 (validate_inserted_breakpoint): New.
10886 (delete_disabled_breakpoints): New.
10887 (validate_breakpoints): New.
10888 (check_mem_read): Validate breakpoints before trusting their
10889 shadow. Delete disabled breakpoints.
10890 (check_mem_write): Validate breakpoints before trusting they
10891 should be inserted. Delete disabled breakpoints.
10892 * mem-break.h (validate_breakpoints):
10893 * server.c (handle_query): Validate breakpoints when we see a
10894 qSymbol query.
10895
8b07ae33
PA
108962010-04-01 Pedro Alves <pedro@codesourcery.com>
10897
10898 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10899 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10900 if we could tell there's a GDB breakpoint at stop_pc.
10901 (need_step_over_p): Don't do a step over if we find a GDB
10902 breakpoint at the resume PC.
10903
10904 * mem-break.c (struct raw_breakpoint): New.
10905 (enum bkpt_type): New type `gdb_breakpoint'.
10906 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10907 fields. New field `raw'.
10908 (find_raw_breakpoint_at): New.
10909 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10910 breakpoint instead.
10911 (set_breakpoint_at): Adjust.
10912 (delete_raw_breakpoint): New.
10913 (release_breakpoint): New.
10914 (delete_breakpoint): Rename to...
10915 (delete_breakpoint_1): ... this. Add proc parameter. Use
10916 release_breakpoint. Return ENOENT.
10917 (delete_breakpoint): Reimplement.
10918 (find_breakpoint_at): Delete.
10919 (find_gdb_breakpoint_at): New.
10920 (delete_breakpoint_at): Delete.
10921 (set_gdb_breakpoint_at): New.
10922 (delete_gdb_breakpoint_at): New.
10923 (gdb_breakpoint_here): New.
10924 (set_reinsert_breakpoint): Use release_breakpoint.
10925 (uninsert_breakpoint): Rename to ...
10926 (uninsert_raw_breakpoint): ... this.
10927 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10928 (reinsert_raw_breakpoint): Change parameter type to
10929 raw_breakpoint.
10930 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10931 instead.
10932 (check_breakpoints): Adjust. Use release_breakpoint.
10933 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10934 (breakpoint_inserted_here): Ditto.
10935 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10936 Don't trust the breakpoint's shadow if it is not inserted.
10937 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10938 (delete_all_breakpoints): Adjust.
10939 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10940 use delete_breakpoint_1.
10941
10942 * mem-break.h (breakpoints_supported): Delete declaration.
10943 (set_gdb_breakpoint_at): Declare.
10944 (gdb_breakpoint_here): Declare.
10945 (delete_breakpoint_at): Delete.
10946 (delete_gdb_breakpoint_at): Declare.
10947
10948 * server.h (struct raw_breakpoint): Forward declare.
10949 (struct process_info): New field `raw_breakpoints'.
10950
10951 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10952 breakpoints.
10953
6bf5e0ba
PA
109542010-03-24 Pedro Alves <pedro@codesourcery.com>
10955
10956 * linux-low.c (status_pending_p_callback): Fix comment.
10957 (linux_wait_for_event_1): Move most of the internal breakpoint
10958 handling from here...
10959 (linux_wait_1): ... to here.
10960 (count_events_callback): New.
10961 (select_singlestep_lwp_callback): New.
10962 (select_event_lwp_callback): New.
10963 (cancel_breakpoints_callback): New.
10964 (select_event_lwp): New.
10965 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10966 priority to all LWPs that have had events that should be reported
10967 to the client. Cancel breakpoints when about to reporting the
10968 event to the client, not while stopping lwps. No longer cancel
10969 finished single-steps here.
10970 (cancel_finished_single_step): Delete.
10971 (cancel_finished_single_steps): Delete.
10972
414a389f
PA
109732010-03-24 Pedro Alves <pedro@codesourcery.com>
10974
10975 * mem-break.c (enum bkpt_type): New.
10976 (struct breakpoint): New field `type'.
10977 (set_breakpoint_at): Change return type to struct breakpoint
10978 pointer. Set type to `other_breakpoint' by default.
10979 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10980 in the breakpoint list.
10981 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10982 (reinsert_breakpoint): Rename to ...
10983 (reinsert_raw_breakpoint): ... this.
10984 (reinsert_breakpoints_at): Adjust.
10985 * mem-break.h (struct breakpoint): Declare.
10986 (set_breakpoint_at): Change return type to struct breakpoint
10987 pointer.
10988
2280c721
PA
109892010-03-24 Pedro Alves <pedro@codesourcery.com>
10990
10991 * server.c (handle_query): Assign, not compare.
10992
d50171e4
PA
109932010-03-24 Pedro Alves <pedro@codesourcery.com>
10994
10995 Teach linux gdbserver to step-over-breakpoints.
10996
10997 * linux-low.c (can_hardware_single_step): New.
10998 (supports_breakpoints): New.
10999 (handle_extended_wait): If stopping threads, read the stop pc of
11000 the new cloned LWP.
11001 (get_pc): New.
11002 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11003 low target doesn't support retrieving the PC.
11004 (add_lwp): Set last_resume_kind to resume_continue.
11005 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11006 (linux_attach): Don't clear stop_expected. Set the lwp's
11007 last_resume_kind to resume_stop.
11008 (linux_detach_one_lwp): Don't check for removed breakpoints.
11009 (check_removed_breakpoint): Delete.
11010 (status_pending_p): Rename to ...
11011 (status_pending_p_callback): ... this. Don't check for removed
11012 breakpoints. Don't consider threads that are stopped from GDB's
11013 perspective.
11014 (linux_wait_for_lwp): Always read the stop_pc here.
11015 (cancel_breakpoint): New.
11016 (step_over_bkpt): New global.
11017 (linux_wait_for_event_1): Implement stepping over breakpoints.
11018 (gdb_wants_lwp_stopped): New.
11019 (gdb_wants_all_stopped): New.
11020 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11021 single-step traps here. Store the thread's last reported target
11022 wait status.
11023 (send_sigstop): Don't clear stop_expected. Always set it,
11024 instead.
11025 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11026 (cancel_finished_single_step): New.
11027 (cancel_finished_single_steps): New.
11028 (wait_for_sigstop): Don't cancel finished single-step traps here.
11029 (linux_resume_one_lwp): Don't check for removed breakpoints.
11030 Don't set `step' on non-hardware step archs.
11031 (linux_set_resume_request): Ignore resume_stop requests if already
11032 stopping or stopped. Set the lwp's last_resume_kind.
11033 (resume_status_pending_p): Don't check for removed breakpoints.
11034 (need_step_over_p): New.
11035 (start_step_over): New.
11036 (finish_step_over): New.
11037 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11038 requests. Clear the thread's last reported target waitstatus.
11039 Don't use the `suspended' flag. Don't consider pending breakpoints.
11040 (linux_resume): Start a step-over if necessary.
11041 (proceed_one_lwp): New.
11042 (proceed_all_lwps): New.
11043 (unstop_all_lwps): New.
11044 * linux-low.h (struct lwp_info): Rewrite comment for the
11045 `suspended' flag. Add the `stop_pc' field. Delete the
11046 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11047 Add `'last_resume_kind' and `need_step_over' fields.
11048 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11049 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11050 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11051 (set_raw_breakpoint_at): New.
11052 (set_breakpoint_at): Rewrite to use it.
11053 (reinsert_breakpoint_handler): Delete.
11054 (set_reinsert_breakpoint): New.
11055 (reinsert_breakpoint_by_bp): Delete.
11056 (delete_reinsert_breakpoints): New.
11057 (uninsert_breakpoint): Rewrite.
11058 (uninsert_breakpoints_at): New.
11059 (reinsert_breakpoint): Rewrite.
11060 (reinsert_breakpoints_at): New.
11061 (check_breakpoints): Rewrite.
11062 (breakpoint_here): New.
11063 (breakpoint_inserted_here): New.
11064 (check_mem_read): Adjust.
11065 * mem-break.h (breakpoints_supported, breakpoint_here)
11066 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11067 (reinsert_breakpoint_by_bp): Delete declaration.
11068 (delete_reinsert_breakpoints): Declare.
11069 (reinsert_breakpoint): Delete declaration.
11070 (reinsert_breakpoints_at): Declare.
11071 (uninsert_breakpoint): Delete declaration.
11072 (uninsert_breakpoints_at): Declare.
11073 (check_breakpoints): Adjust prototype.
11074 * server.h: Adjust include order.
11075 (struct thread_info): Declare here. Add a `last_status' field.
11076
30ba68cb
MS
110772010-03-23 Michael Snyder <msnyder@vmware.com>
11078
11079 * server.c (crc32): New function.
11080 (handle_query): Add handling for 'qCRC:' request.
11081
b9a881c2
PA
110822010-03-23 Pedro Alves <pedro@codesourcery.com>
11083
11084 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11085 lwp had been stopped by a watchpoint.
11086
e92d13d5
PA
110872010-03-16 Pedro Alves <pedro@codesourcery.com>
11088
11089 * server.h (internal_error): Declare.
11090 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11091 * utils.c (internal_error): New function.
11092
64daa791
AS
110932010-03-15 Andreas Schwab <schwab@redhat.com>
11094
11095 * configure.srv: Fix typo setting srv_regobj.
11096
f52cd8cd
PA
110972010-03-15 Pedro Alves <pedro@codesourcery.com>
11098
11099 * linux-low.c (fetch_register): Avoid passing a non string literal
11100 format to `error'.
11101 (usr_store_inferior_registers): Ditto.
11102
93ae6fdc
PA
111032010-03-14 Pedro Alves <pedro@codesourcery.com>
11104
11105 * linux-low.c (linux_write_memory): Bail out early if peeking
11106 memory failed.
11107
c3adc08c
PA
111082010-03-14 Pedro Alves <pedro@codesourcery.com>
11109
11110 * linux-low.h (struct lwp_info): New fields
11111 `stopped_by_watchpoint' and `stopped_data_address'.
11112 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11113 here, and cache them in the lwp object.
11114 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11115 directly.
11116 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11117 field.
11118 (linux_stopped_by_watchpoint): Rewrite.
11119 (linux_stopped_data_address): Rewrite.
11120
bce522a2
PA
111212010-03-06 Simo Melenius <simo.melenius@iki.fi>
11122
11123 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11124 switching the current inferior, not before.
11125
90884b2b
L
111262010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11127
11128 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11129 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11130 i386-linux.c and amd64-linux.c.
11131 (reg-i386.o): Removed.
11132 (reg-i386.c): Likewise.
11133 (reg-i386-linux.o): Likewise.
11134 (reg-i386-linux.c): Likewise.
11135 (reg-x86-64.o): Likewise.
11136 (reg-x86-64.c): Likewise.
11137 (reg-x86-64-linux.o): Likewise.
11138 (reg-x86-64-linux.c): Likewise.
11139 (i386.o): New.
11140 (i386.c): Likewise.
11141 (i386-linux.o): Likewise.
11142 (i386-linux.c): Likewise.
11143 (amd64.o): Likewise.
11144 (amd64.c): Likewise.
11145 (amd64-linux.o): Likewise.
11146 (amd64-linux.c): Likewise.
11147
11148 * configure.srv (srv_i386_regobj): New.
11149 (srv_i386_linux_regobj): Likewise.
11150 (srv_amd64_regobj): Likewise.
11151 (srv_amd64_linux_regobj): Likewise.
11152 (srv_i386_32bit_xmlfiles): Likewise.
11153 (srv_i386_64bit_xmlfiles): Likewise.
11154 (srv_i386_xmlfiles): Likewise.
11155 (srv_amd64_xmlfiles): Likewise.
11156 (srv_i386_linux_xmlfiles): Likewise.
11157 (srv_amd64_linux_xmlfiles): Likewise.
11158 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11159 srv_xmlfiles to $srv_i386_xmlfiles.
11160 (i[34567]86-*-mingw32ce*): Likewise.
11161 (i[34567]86-*-mingw*): Likewise.
11162 (i[34567]86-*-nto*): Likewise.
11163 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11164 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11165 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11166 (x86_64-*-linux*): Likewise.
11167
11168 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11169 (init_registers_amd64_linux): New.
11170 (x86_arch_setup): Replace init_registers_x86_64_linux with
11171 init_registers_amd64_linux.
11172
193f13e6
MK
111732010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11174
11175 * configure.ac: Check for libdl. If it is not available link against
11176 static libthread_db.
11177 * configure: Regenerate.
11178
85d721b8
PA
111792010-02-22 Pedro Alves <pedro@codesourcery.com>
11180
11181 PR9605
11182
11183 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11184 handing a read watchpoint.
11185 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11186
6076632b
DE
111872010-02-12 Doug Evans <dje@google.com>
11188
11189 * linux-low.c (linux_supports_tracefork_flag): Document.
11190 (linux_look_up_symbols): Add comment.
11191
3327ccf7
L
111922010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11193
11194 * regcache.c (supply_register): Clear regcache if buf is NULL.
11195
0718675c 111962010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11197 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11198
11199 * inferiors.c (find_inferior): Add function documentation.
11200 (unloaded_dll): Handle the case where the unloaded dll has not
11201 been previously registered in the dll list.
11202
177321bd
DJ
112032010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11204
11205 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11206 (thumb2_breakpoint): New.
11207 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11208
2b009048
DJ
112092010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11210
11211 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11212 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11213 breakpoints.
11214
3be029c7
PA
112152010-01-21 Pedro Alves <pedro@codesourcery.com>
11216
11217 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11218
18f5de3b
JK
112192010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11220
11221 * linux-s390-low.c (s390_collect_ptrace_register)
11222 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11223
3743bb4f
DE
112242010-01-21 Doug Evans <dje@google.com>
11225
14ce3065
DE
11226 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11227 (PTRACE_ARG4_TYPE): New macro.
11228 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11229 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11230 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11231 (usr_store_inferior_registers): Ditto.
11232 (linux_read_memory, linux_write_memory): Ditto.
11233 (linux_test_for_tracefork): Ditto.
11234
3743bb4f
DE
11235 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11236 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11237
8b315be5
PA
112382010-01-21 Pedro Alves <pedro@codesourcery.com>
11239
11240 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11241 target.
11242
85492558
PA
112432010-01-21 Pedro Alves <pedro@codesourcery.com>
11244
11245 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11246 prototype to take a regcache. Adjust.
11247
442ea881
PA
112482010-01-20 Pedro Alves <pedro@codesourcery.com>
11249
11250 * regcache.h (struct thread_info): Forward declare.
11251 (struct regcache): New.
11252 (new_register_cache): Adjust prototype.
11253 (get_thread_regcache): Declare.
11254 (free_register_cache): Adjust prototype.
11255 (registers_to_string, registers_from_string): Ditto.
11256 (supply_register, supply_register_by_name, collect_register)
11257 (collect_register_as_string, collect_register_by_name): Ditto.
11258 * regcache.c (struct inferior_regcache_data): Delete.
11259 (get_regcache): Rename to ...
11260 (get_thread_regcache): ... this. Adjust. Switch inferior before
11261 fetching registers.
11262 (regcache_invalidate_one): Adjust.
11263 (regcache_invalidate): Fix prototype.
11264 (new_register_cache): Return the new register cache.
11265 (free_register_cache): Change prototype.
11266 (realloc_register_cache): Adjust.
11267 (registers_to_string): Change prototype to take a regcache. Adjust.
11268 (registers_from_string): Ditto.
11269 (register_data): Ditto.
11270 (supply_register): Ditto.
11271 (supply_register_by_name): Ditto.
11272 (collect_register): Ditto.
11273 (collect_register_as_string): Ditto.
11274 (collect_register_by_name): Ditto.
11275 * server.c (process_serial_event): Adjust.
11276 * linux-low.h (regset_fill_func, regset_store_func): Change
11277 prototype.
11278 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11279 Change prototype.
11280 * linux-low.c (get_stop_pc): Adjust.
11281 (check_removed_breakpoint): Adjust.
11282 (linux_wait_for_event): Adjust.
11283 (linux_resume_one_lwp): Adjust.
11284 (fetch_register): Add regcache parameter. Adjust.
11285 (usr_store_inferior_registers): Ditto.
11286 (regsets_fetch_inferior_registers): Ditto.
11287 (regsets_store_inferior_registers): Ditto.
11288 (linux_fetch_registers, linux_store_registers): Ditto.
11289 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11290 regcache. Adjust.
43aaf8b6
PA
11291 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11292 Ditto.
442ea881
PA
11293 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11294 prototype to take a regcache.
11295 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11296 * remote-utils.c (convert_ascii_to_int, outreg)
11297 (prepare_resume_reply): Change prototype to take a regcache.
11298 Adjust.
11299 * target.h (struct target_ops) <fetch_registers, store_registers>:
11300 Change prototype to take a regcache.
11301 (fetch_inferior_registers, store_inferior_registers): Change
11302 prototype to take a regcache. Adjust.
11303 * proc-service.c (ps_lgetregs): Adjust.
11304 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11305 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11306 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11307 take a regcache. Adjust.
11308 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11309 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11310 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11311 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11312 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11313 (cris_cannot_fetch_register):
11314 (cris_breakpoint_at): Change prototype to take a regcache.
11315 Adjust.
11316 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11317 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11318 to take a regcache. Adjust.
11319 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11320 Adjust.
11321 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11322 take a regcache. Adjust.
11323 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11324 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11325 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11326 * linux-mips-low.c (mips_get_pc):
11327 (mips_set_pc): Change prototype to take a regcache. Adjust.
11328 (mips_reinsert_addr): Adjust.
11329 (mips_collect_register): Change prototype to take a regcache.
11330 Adjust.
11331 (mips_supply_register):
11332 (mips_collect_register_32bit, mips_supply_register_32bit)
11333 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11334 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11335 * linux-ppc-low.c (ppc_supply_ptrace_register)
11336 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11337 (parse_spufs_run): Adjust.
11338 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11339 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11340 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11341 take a regcache. Adjust.
11342 * linux-s390-low.c (s390_collect_ptrace_register)
11343 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11344 (s390_set_pc): Change prototype to take a regcache. Adjust.
11345 (s390_arch_setup): Adjust.
11346 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11347 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11348 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11349 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11350 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11351 regcache. Adjust.
11352 (sparc_breakpoint_at): Adjust.
11353 * linux-xtensa-low.c (xtensa_fill_gregset):
11354 (xtensa_store_gregset):
11355 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11356 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11357 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11358 prototype to take a regcache. Adjust.
11359 * win32-arm-low.c (arm_fetch_inferior_register)
11360 (arm_store_inferior_register): Change prototype to take a
11361 regcache. Adjust.
11362 * win32-i386-low.c (i386_fetch_inferior_register)
11363 (i386_store_inferior_register): Change prototype to take a
11364 regcache. Adjust.
11365 * win32-low.c (child_fetch_inferior_registers)
11366 (child_store_inferior_registers): Change prototype to take a
11367 regcache. Adjust.
11368 (win32_wait): Adjust.
11369 (win32_fetch_inferior_registers): Change prototype to take a
11370 regcache. Adjust.
11371 (win32_store_inferior_registers): Adjust.
11372 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11373 store_inferior_register>: Change prototype to take a regcache.
11374
60c3d7b0
DE
113752010-01-20 Doug Evans <dje@google.com>
11376
11377 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11378 #ifdef.
11379 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11380 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11381
dc146f7c
VP
113822010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11383
11384 * linux-low.c (linux_core_of_thread): New.
11385 (compare_ints, show_process, list_threads): New.
11386 (linux_qxfer_osdata): Report threads and cores.
11387 (linux_target_op): Register linux_core_of_thread.
11388 * remote-utils.c (prepare_resume_reply): Report the core.
11389 (buffer_xml_printf): Support %d specifier.
11390 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11391 New.
11392 (handle_query): Handle qXfer:threads. Announce availability
11393 thereof.
11394 * target.h (struct target_ops): New field core_of_thread.
11395
7803799a
UW
113962010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11397
11398 * Makefile.in (clean): Remove new generated files.
11399 (reg-s390.o, reg-s390.c): Remove rules.
11400 (reg-s390x.o, reg-s390x.c): Likewise.
11401 (s390-linux32.o, s390-linux32.c): Add rules.
11402 (s390-linux64.o, s390-linux64.c): Likewise.
11403 (s390x-linux64.o, s390x-linux64.c): Likewise.
11404 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11405 * linux-s390-low.c: Include <elf.h>.
11406 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11407 (init_registers_s390): Remove prototype.
11408 (init_registers_s390x): Likewise.
11409 (init_registers_s390_linux32): Add prototype.
11410 (init_registers_s390_linux64): Likewise.
11411 (init_registers_s390x_linux64): Likewise.
11412 (s390_num_regs_3264): New define.
11413 (s390_regmap_3264): New global variable.
11414 (s390_cannot_fetch_register): Remove obsolete check.
11415 (s390_cannot_store_register): Likewise.
11416 (s390_collect_ptrace_register): Handle upper/lower register halves.
11417 (s390_supply_ptrace_register): Likewise.
11418 (s390_fill_gregset): Update to register number changes.
11419 (s390_get_hwcap): New routine.
11420 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11421 Install appropriate regmap and register set.
11422
6e7ffa39
JB
114232010-01-01 Joel Brobecker <brobecker@adacore.com>
11424
11425 * server.c (gdbserver_version): Update copyright year to 2010.
11426 * gdbreplay.c (gdbreplay_version): Likewise.
11427
957f3f49
DE
114282009-12-28 Doug Evans <dje@google.com>
11429
11430 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11431 elf/external.h. Include <elf.h> instead but only if necessary.
11432
ca5c370d
PA
114332009-12-28 Pedro Alves <pedro@codesourcery.com>
11434
11435 * linux-low.c (linux_remove_process): Remove `detaching'
11436 parameter. Don't release/detach from thread_db here.
11437 (linux_kill): Release/detach from thread_db here, ...
11438 (linux_detach): ... and here, before actually detaching.
11439 (linux_wait_1): ... and here, when a process exits.
11440 * thread-db.c (any_thread_of): New.
11441 (thread_db_free): Switch the current inferior to a thread of the
11442 passed in process.
11443
4ee62156
DE
114442009-12-21 Doug Evans <dje@google.com>
11445
d90e6a88
DE
11446 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11447
c5f62d5f
DE
11448 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11449 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11450 warning ifndef __NR_tkill. Move setting of errno there too.
11451 Delete unnecessary resetting of errno after syscall.
11452 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11453
10e86dd7
DE
11454 * configure.ac: Check for dladdr.
11455 * config.in: Regenerate.
11456 * configure: Regenerate.
11457 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11458 (try_thread_db_load): Update.
11459
4ee62156
DE
11460 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11461
00f515da
DE
114622009-12-18 Doug Evans <dje@google.com>
11463
e9464885
DE
11464 * event-loop.c: Include unistd.h if it exists.
11465
07d4f67e
DE
11466 * linux-low.c (my_waitpid): Move definition away from being in
11467 between linux_tracefork_child/linux_test_for_tracefork.
11468
00f515da
DE
11469 * gdb_proc_service.h (psaddr_t): Fix type.
11470 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11471 signature to match glibc.
11472
1de1badb
DE
114732009-12-16 Doug Evans <dje@google.com>
11474
11475 * linux-low.c (linux_read_memory): Fix argument to read.
11476
aeeb81d1
PA
114772009-11-26 Pedro Alves <pedro@codesourcery.com>
11478
11479 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11480 events, don't leave current_inferior pointing at null.
11481
10357975
PA
114822009-11-26 Pedro Alves <pedro@codesourcery.com>
11483
11484 * win32-low.c (LOG): Delete.
11485 (OUTMSG): Output to stderr.
11486 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11487 on compile time LOG macro.
11488 (win32_wait): Fix debug output.
11489
cf6e3471
PA
114902009-11-26 Pedro Alves <pedro@codesourcery.com>
11491
11492 * win32-low.c (win32_add_one_solib): If the dll name is
11493 "ntdll.dll", prepend the system directory to the dll path.
11494
0c85e18e
MK
114952009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11498
9ac544ce 114992009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11500 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11501
11502 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11503 * configure.ac: Check for __mcoldfire__ and set
11504 gdb_cv_m68k_is_coldfire.
11505 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11506 reg-cf.o and reg-m68k.o.
11507 * configure: Regenerated.
11508
fd7dd3e6
PA
115092009-11-16 Pedro Alves <pedro@codesourcery.com>
11510
11511 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11512 Pass it to thread_db_free.
11513 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11514 proper `detaching' argument to linux_remove_process.
11515 * linux-low.h (thread_db_free): Add `detaching' parameter.
11516 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11517 to thread_db_free.
11518 (thread_db_free): Add `detaching' parameter. Only
11519 call td_ta_clear_event if detaching from process.
11520
75aa492e
MK
115212009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11522
11523 * thread-db.c (thread_db_free): Fix typo.
11524
21e1bee4
PP
115252009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11526
11527 PR gdb/10838
11528 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11529
8838b45e
NS
115302009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11531
11532 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11533 with an i686 compiler.
11534 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11535 needed.
11536 * configure: Rebuilt.
11537
8a35fb51
SL
115382009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11539
11540 PR gdb/10783
11541
11542 * server.c (handle_search_memory_1): Correct read_addr initialization
11543 in loop for searching subsequent chunks.
11544
96f15937
PP
115452009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11546
11547 * configure.ac: New --with-libthread-db option.
11548 * thread-db.c: Allow direct dependence on libthread_db.
11549 (thread_db_free): Adjust.
11550 * config.in: Regenerate.
11551 * configure: Likewise.
889bf7c5 11552
5f7d1694
PP
115532009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11554
11555 PR gdb/10757
11556 * thread-db.c (attach_thread): New function.
11557 (maybe_attach_thread): Return success/failure.
11558 (find_new_threads_callback): Adjust.
889bf7c5
PA
11559 (thread_db_find_new_threads): Loop until no new threads.
11560
88e3b899
PA
115612009-10-13 Pedro Alves <pedro@codesourcery.com>
11562
11563 * proc-service.c (ps_lgetregs): Formatting.
11564
cdbfd419
PP
115652009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11566
11567 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11568 * configure.ac: Adjust.
11569 * linux-low.h (struct process_info_private): Move members to struct
11570 thread_db.
11571 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11572 * linux-low.c (linux_remove_process): Adjust.
11573 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11574 * server.c (handle_query): Move code ...
11575 (handle_monitor_command): ... here. New function.
11576 * target.h (struct target_ops): New member.
11577 * thread-db.c (struct thread_db): New.
11578 (libthread_db_search_path): New variable.
11579 (thread_db_create_event, thread_db_enable_reporting)
11580 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11581 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11582 (try_thread_db_load_1, dladdr_to_soname): New functions.
11583 (try_thread_db_load, thread_db_load_search): New functions.
11584 (thread_db_init): Search for libthread_db.
11585 (thread_db_free): New function.
11586 (thread_db_handle_monitor_command): Likewise.
11587 * config.in: Regenerate.
11588 * configure: Regenerate.
889bf7c5 11589
4168d2d6
UW
115902009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11591
11592 * spu-low.c (spu_kill): Wait for inferior to terminate.
11593 Call clear_inferiors.
11594 (spu_detach): Call clear_inferiors.
11595
81ecdfbb
RW
115962009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11597
11598 * aclocal.m4: Regenerate.
11599 * config.in: Likewise.
11600 * configure: Likewise.
11601
0b9ff2c0
UW
116022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11603
11604 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11605 (parse_spufs_run): New function.
11606 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11607 (ppc_breakpoint_at): Handle SPU breakpoints.
11608
efcbbd14
UW
116092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11610
11611 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11612 (SPUFS_MAGIC): Define.
11613 (spu_enumerate_spu_ids): New function.
11614 (linux_qxfer_spu): New function.
11615 (linux_target_ops): Install linux_qxfer_spu.
11616
f4d9bade
UW
116172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11618
11619 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11620 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11621 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11622 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11623 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11624 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11625 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11626 (init_registers_powerpc_cell32l): Add prototype.
11627 (init_registers_powerpc_cell64l): Likewise.
11628 (ppc_arch_setup): Detect Cell/B.E. architecture.
11629
96e946ca
RW
116302009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11631
11632 * Makefile.in (datarootdir): New variable.
11633
58d6951d
DJ
116342009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11635
11636 * linux-low.c (linux_write_memory): Update debugging output.
11637 * Makefile.in (clean): Add new descriptions.
11638 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11639 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11640 * configure.srv: Add new files for arm*-*-linux*.
11641 * linux-arm-low.c: Add new declarations.
11642 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11643 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11644 (HWCAP_VFPv3D16): New.
11645 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11646 instead of __IWMMXT__.
11647 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11648 (arm_arch_setup): New.
11649 (target_regsets): Remove #ifdef. Add VFP regset.
11650 (the_low_target): Use arm_arch_setup.
11651
12b42a12
DJ
116522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11653
11654 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11655 the main thread again.
11656
ac8c974e
AR
116572009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11658
11659 Adding Neutrino gdbserver.
11660 * configure: Regenerated.
11661 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11662 * configure.srv (i[34567]86-*-nto*): New target.
11663 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11664 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11665 (nto_comctrl) [__QNX__]: New function.
11666 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11667
4424e0c3 116682009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11669
11670 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11671 srv_tgtobj.
11672
912cf4ba
PA
116732009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11674 Pedro Alves <pedro@codesourcery.com>
11675
11676 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11677 don't support CONTEXT_EXTENDED_REGISTERS.
11678 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11679 (the_low_target): Install them.
11680 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11681 failing with ERROR_PIPE_NOT_CONNECTED.
11682
aa5ca48f
DE
116832009-06-30 Doug Evans <dje@google.com>
11684 Pierre Muller <muller@ics.u-strasbg.fr>
11685
11686 Add h/w watchpoint support to x86-linux, win32-i386.
11687 * Makefile.in (SFILES): Add i386-low.c
11688 (i386_low_h): Define.
11689 (i386-low.o): Add dependencies.
11690 (linux-x86-low.o): Add i386-low.h dependency.
11691 (win32-i386-low.o): Ditto.
11692 * i386-low.c: New file.
11693 * i386-low.h: New file.
11694 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11695 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11696 * linux-low.c (linux_add_process): Initialize arch_private.
11697 (linux_remove_process): Free arch_private.
11698 (add_lwp): Initialize arch_private.
11699 (delete_lwp): Free arch_private.
11700 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11701 provided.
11702 * linux-low.h (process_info_private): New member arch_private.
11703 (lwp_info): New member arch_private.
11704 (linux_target_ops): New members new_process, new_thread,
11705 prepare_to_resume.
11706 (ptid_of): New macro.
11707 * linux-x86-low.c: Include stddef.h, i386-low.h.
11708 (arch_process_info): New struct.
11709 (arch_lwp_info): New struct.
11710 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11711 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11712 (i386_dr_low_get_status): New function.
11713 (x86_insert_point, x86_remove_point): New functions.
11714 (x86_stopped_by_watchpoint): New function.
11715 (x86_stopped_data_address): New function.
11716 (x86_linux_new_process, x86_linux_new_thread): New functions.
11717 (x86_linux_prepare_to_resume): New function.
11718 (the_low_target): Add entries for insert_point, remove_point,
11719 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11720 prepare_to_resume.
11721 * server.c (debug_hw_points): New global.
11722 (monitor_show_help): Document set debug-hw-points.
11723 (handle_query): Process "set debug-hw-points".
11724 * server.h (debug_hw_points): Declare.
11725 (paddress): Declare.
11726 * utils.c (NUMCELLS, CELLSIZE): New macros.
11727 (get_sell, xsnprintf, paddress): New functions.
11728 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11729 remove_point, stopped_by_watchpoint, stopped_data_address.
11730 * win32-i386-low.c: Include i386-low.h.
11731 (debug_reg_state): Replaces dr.
11732 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11733 (i386_dr_low_get_status): New function.
11734 (i386_insert_point, i386_remove_point): New functions.
11735 (i386_stopped_by_watchpoint): New function.
11736 (i386_stopped_data_address): New function.
11737 (i386_initial_stuff): Update.
11738 (get_thread_context,set_thread_context,i386_thread_added): Update.
11739 (the_low_target): Add entries for insert_point,
11740 remove_point, stopped_by_watchpoint, stopped_data_address.
11741 * win32-low.c (win32_insert_watchpoint): New function.
11742 (win32_remove_watchpoint): New function.
11743 (win32_stopped_by_watchpoint): New function.
11744 (win32_stopped_data_address): New function.
11745 (win32_target_ops): Add entries for insert_watchpoint,
11746 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11747 * win32-low.h (win32_target_ops): New members insert_point,
11748 remove_point, stopped_by_watchpoint, stopped_data_address.
11749
d993e290
PA
117502009-06-25 Pedro Alves <pedro@codesourcery.com>
11751
11752 * server.c (process_serial_event): Re-return unsupported, not
11753 error, if the type isn't recognized. Re-allow supporting only
11754 insert or remove packets. Also call require_running for
11755 breakpoints. Add missing break statement to default case. Tidy.
11756 * target.h (struct target_ops): Rename insert_watchpoint to
11757 insert_point, and remove_watchpoint to remove_point.
11758
11759 * linux-low.h (struct linux_target_ops): Likewise.
11760 * linux-low.c (linux_insert_watchpoint): Rename to ...
11761 (linux_insert_point): ... this. Adjust.
11762 (linux_remove_watchpoint): Rename to ...
11763 (linux_remove_point): ... this. Adjust.
11764 (linux_target_ops): Adjust.
11765 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11766 (cris_insert_point): ... this.
11767 (cris_remove_watchpoint): Rename to ...
11768 (cris_remove_point): ... this.
11769 (the_low_target): Adjust.
11770
0f54c268
PM
117712009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11772
11773 * server.c (handle_v_kill): Pass signal_pid to
11774 kill_inferior if multi_process is zero.
11775
c6314022
AR
117762009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11777
11778 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11779 * target.h (target_ops): Comment for *_watchpoint to make it clear
11780 the functions can get types '0' and '1'.
11781
4463ce24
AR
117822009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11783
11784 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11785 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11786 * regcache.c (get_regcache): Likewise.
11787 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11788 * win32-low.c (child_fetch_inferior_registers): Remove check for
11789 regno 0.
11790
cf8fd78b
PA
117912009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11792 Pedro Alves <pedro@codesourcery.com>
11793
11794 * target.h (struct target_ops) <supports_multi_process>: New
11795 callback.
11796 (target_supports_multi_process): New.
11797 * server.c (handle_query): Even if GDB reports support, only
11798 enable multi-process if the target also supports it. Report
11799 multi-process support only if the target backend supports it.
11800 * linux-low.c (linux_supports_multi_process): New function.
11801 (linux_target_ops): Install it as target_supports_multi_process
11802 callback.
11803
47c0c975
DE
118042009-05-24 Doug Evans <dje@google.com>
11805
e09875d4
DE
11806 Global renaming of find_thread_pid to find_thread_ptid.
11807 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11808 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11809 All callers updated.
11810
e27d73f6
DE
11811 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11812 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11813 directly.
11814
47c0c975
DE
11815 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11816 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11817 (linux_resume_one_lwp): Ditto.
11818
2acc282a
DE
118192009-05-23 Doug Evans <dje@google.com>
11820
11821 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11822 from struct inferior_list_entry * to struct lwp_info *.
11823 All callers updated.
11824
9f1036c1
DE
118252009-05-13 Doug Evans <dje@google.com>
11826
11827 * linux-x86-low.c: Don't include assert.h.
11828 (x86_siginfo_fixup): Use fatal, not assert.
11829 (x86_arch_setup): Fix comment.
11830
d0722149
DE
118312009-05-12 Doug Evans <dje@google.com>
11832
11833 Biarch support for i386/amd64 gdbserver.
11834 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11835 Add linux-x86-low.c.
11836 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11837 (linux-x86-low.o): Add.
11838 * linux-x86-64-low.c: Delete.
11839 * linux-i386-low.c: Delete.
11840 * linux-x86-low.c: New file.
11841 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11842 linux-x86-low.o.
11843 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11844 linux-x86-low.o.
11845 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11846 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11847 (linux_child_pid_to_exec_file): New function.
11848 (elf_64_header_p, elf_64_file_p): New functions.
11849 (siginfo_fixup): New function.
11850 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11851 give target a chance to convert layout.
11852 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11853 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11854
fdeb2a12
DE
118552009-05-07 Doug Evans <dje@google.com>
11856
11857 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11858 (regsets_store_inferior_registers): Ditto.
11859
a6dbe5df
PA
118602009-05-06 Pedro Alves <pedro@codesourcery.com>
11861
11862 PR server/10048
11863
11864 * linux-low.c (must_set_ptrace_flags): Delete.
11865 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11866 of the global.
11867 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11868 `lwp->must_set_ptrace_flags' instead.
ba42693b 11869 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11870 (linux_wait_1): ... not here.
11871
5091eb23
DE
118722009-04-30 Doug Evans <dje@google.com>
11873
9f767825
DE
11874 * inferiors.c (started_inferior_callback): New function.
11875 (attached_inferior_callback): New function.
11876 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11877 * server.c (print_started_pid, print_attached_pid): New functions.
11878 (detach_or_kill_for_exit): New function.
11879 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11880 * server.h (have_started_inferiors_p): Declare.
11881 (have_attached_inferiors_p): Declare.
11882
5091eb23
DE
11883 * inferiors.c (remove_process): Fix memory leak, free process.
11884 * linux-low.c (linux_remove_process): New function.
11885 (linux_kill): Call it instead of remove_process.
11886 (linux_detach, linux_wait_1): Ditto.
11887
155c8968
PA
118882009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11889
11890 * configure.srv: Add x86 Windows CE target.
11891
7fe519cb
UW
118922009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11893
11894 * inferiors.c (get_thread_process): Make global.
11895 * server.h (get_thread_process): Add prototype.
11896 * thread-db.c (find_one_thread): Use get_thread_process
11897 instead of current_process.
11898 (thread_db_get_tls_address): Do not crash if called when
11899 thread layer is not yet initialized.
11900
5472f405
UW
119012009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11902
11903 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11904 * spu-low.c (current_tid): Rename to ...
11905 (current_ptid): ... this.
11906 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11907 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11908 ptid_get_lwp (current_ptid) instead of current_tid.
11909 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11910 instead of current_tid. Use find_process_pid to verify pid
11911 argument is valid. Pass proper argument to remove_process.
11912 (spu_thread_alive): Compare current_ptid instead of current_tid.
11913 (spu_resume): Likewise.
11914
55ac2b99
PA
119152009-04-02 Pedro Alves <pedro@codesourcery.com>
11916
11917 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11918 variable.
11919
95954743
PA
119202009-04-01 Pedro Alves <pedro@codesourcery.com>
11921
11922 Implement the multiprocess extensions, and add linux multiprocess
11923 support.
11924
11925 * server.h (ULONGEST): Declare.
11926 (struct ptid, ptid_t): New.
11927 (minus_one_ptid, null_ptid): Declare.
11928 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11929 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11930 (struct inferior_list_entry): Change `id' type from unsigned from
11931 to ptid_t.
11932 (struct sym_cache, struct breakpoint, struct
11933 process_info_private): Forward declare.
11934 (struct process_info): Declare.
11935 (current_process): Declare.
11936 (all_processes): Declare.
11937 (initialize_inferiors): Declare.
11938 (add_thread): Adjust to use ptid_t.
11939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11940 (add_process, remove_process, find_thread_pid): Declare.
11941 (find_inferior_id): Adjust to use ptid_t.
11942 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11943 (multi_process): Declare.
11944 (push_event): Adjust to use ptid_t.
11945 (read_ptid, write_ptid): Declare.
11946 (prepare_resume_reply): Adjust to use ptid_t.
11947 (clear_symbol_cache): Declare.
11948 * inferiors.c (all_processes): New.
11949 (null_ptid, minus_one_ptid): New.
11950 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11951 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11952 (add_thread): Change unsigned long to ptid. Remove gdb_id
11953 parameter. Adjust.
11954 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11955 (gdb_id_to_thread): Rename to ...
11956 (find_thread_pid): ... this. Change unsigned long to ptid.
11957 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11958 (loaded_dll, pull_pid_from_list): Adjust.
11959 (add_process, remove_process, find_process_pid)
11960 (get_thread_process, current_process, initialize_inferiors): New.
11961 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11962 (struct target_waitstatus) <related_pid>: Ditto.
11963 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11964 return type to int.
11965 (struct target_ops) <join>: Add `pid' argument.
11966 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11967 (struct target_ops) <wait>: Add `ptid' field. Change return type
11968 to ptid.
11969 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11970 (mywait): Add `ptid' argument. Change return type to ptid_t.
11971 (target_pid_to_str): Declare.
11972 * target.c (set_desired_inferior): Adjust to use ptids.
11973 (mywait): Add new `ptid' argument. Adjust.
11974 (target_pid_to_str): New.
11975 * mem-break.h (free_all_breakpoints): Declare.
11976 * mem-break.c (breakpoints): Delelete.
11977 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11978 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11979 to use per-process breakpoint list.
11980 (free_all_breakpoints): New.
11981 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11982 (symbol_cache, all_symbols_looked_up): Delete.
11983 (hexchars): New.
11984 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11985 read_ptid): New.
11986 (prepare_resume_reply): Change ptid argument's type from unsigned
11987 long to ptid_t. Adjust. Implement W;process and X;process.
11988 (free_sym_cache, clear_symbol_cache): New.
11989 (look_up_one_symbol): Adjust to per-process symbol cache. *
11990 * server.c (cont_thread, general_thread, step_thread): Change type
11991 to ptid_t.
11992 (attached): Delete.
11993 (multi_process): New.
11994 (last_ptid): Change type to ptid_t.
11995 (struct vstop_notif) <ptid>: Change type to ptid_t.
11996 (queue_stop_reply, push_event): Change `ptid' argument's type to
11997 ptid_t.
11998 (discard_queued_stop_replies): Add `pid' argument.
11999 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12000 changes. Don't reference the `attached' global.
12001 (attach_inferior): Adjust to mywait interface changes.
12002 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12003 features. Handle and report "multiprocess+". Handle
12004 "qAttached:PID".
12005 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12006 changes.
12007 (handle_v_kill): New.
12008 (handle_v_stopped): Adjust to use target_pid_to_str.
12009 (handle_v_requests): Allow multiple attaches and runs when
12010 multiprocess extensions are in effect. Handle "vKill".
12011 (myresume): Adjust to use ptids.
12012 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12013 (handle_status): Adjust to discard_queued_stop_replies interface
12014 change.
12015 (first_thread_of, kill_inferior_callback)
12016 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12017 (main): Call initialize_inferiors. Adjust to use ptids, killing
12018 and detaching from all inferiors. Handle multiprocess packet
12019 variants.
12020 * linux-low.h: Include gdb_proc_service.h.
12021 (struct process_info_private): New.
12022 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12023 <lwpid_of>: Use ptid_get_lwp.
12024 (get_lwp_thread): Adjust.
12025 (struct lwp_info): Add `dead' member.
12026 (find_lwp_pid): Declare.
12027 * linux-low.c (thread_db_active): Delete.
12028 (new_inferior): Adjust comment.
12029 (inferior_pid): Delete.
12030 (linux_add_process): New.
12031 (handle_extended_wait): Adjust.
12032 (add_lwp): Change unsigned long to ptid.
12033 (linux_create_inferior): Add process to processes table. Adjust
12034 to use ptids. Don't set new_inferior here.
12035 (linux_attach_lwp): Rename to ...
12036 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12037 it. Adjust to use ptids.
12038 (linux_attach_lwp): New.
12039 (linux_attach): Add process to processes table. Don't set
12040 new_inferior here.
12041 (struct counter): New.
12042 (second_thread_of_pid_p, last_thread_of_process_p): New.
12043 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12044 multiple processes.
12045 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12046 processes. Remove process from process table.
12047 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12048 to multiple processes.
12049 (any_thread_of): New.
12050 (linux_detach): Add `pid' argument, and handle it. Remove process
12051 from processes table.
12052 (linux_join): Add `pid' argument. Handle it.
12053 (linux_thread_alive): Change unsighed long argument to ptid_t.
12054 Consider dead lwps as not being alive.
12055 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12056 threads we're not interested in.
12057 (same_lwp, find_lwp_pid): New.
12058 (linux_wait_for_lwp): Change `pid' argument's type from int to
12059 ptid_t. Adjust.
12060 (linux_wait_for_event): Rename to ...
12061 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12062 from int to ptid_t. Adjust.
12063 (linux_wait_for_event): New.
12064 (linux_wait_1): Add `ptid' argument. Change return type to
12065 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12066 that exit from the process table.
12067 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12068 Adjust.
12069 (mark_lwp_dead): New.
12070 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12071 stopping all threads, mark its main lwp as dead.
12072 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12073 ptids.
12074 (fetch_register, usr_store_inferior_registers)
12075 (regsets_fetch_inferior_registers)
12076 (regsets_store_inferior_registers, linux_read_memory)
12077 (linux_write_memory): Inline `inferior_pid'.
12078 (linux_look_up_symbols): Adjust to use per-process
12079 `thread_db_active'.
12080 (linux_request_interrupt): Adjust to use ptids.
12081 (linux_read_auxv): Inline `inferior_pid'.
12082 (initialize_low): Don't reference thread_db_active.
12083 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12084 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12085 (ps_getpid): Return the pid of the current inferior.
12086 * thread-db.c (proc_handle, thread_agent): Delete.
12087 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12088 per-process data.
12089 (find_one_thread): Change argument type to ptid_t. Adjust to
12090 per-process data.
12091 (maybe_attach_thread): Adjust to per-process data and ptids.
12092 (thread_db_find_new_threads): Ditto.
12093 (thread_db_init): Ditto.
12094 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12095 processes table. Adjust to use ptids.
12096 (spu_kill, spu_detach): Adjust interface. Remove process from
12097 processes table.
12098 (spu_join, spu_thread_alive): Adjust interface.
12099 (spu_wait): Adjust interface. Remove process from processes
12100 table. Adjust to use ptids.
12101 * win32-low.c (current_inferior_tid): Delete.
12102 (current_inferior_ptid): New.
12103 (debug_event_ptid): New.
12104 (thread_rec): Take a ptid. Adjust.
12105 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12106 (child_delete_thread): Ditto.
12107 (do_initial_child_stuff): Add `attached' argument. Add process to
12108 processes table.
12109 (child_fetch_inferior_registers, child_store_inferior_registers):
12110 Adjust.
12111 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12112 (win32_attach): Pass 1 to do_initial_child_stuff.
12113 (win32_kill): Adjust interface. Remove process from processes
12114 table.
12115 (win32_detach): Ditto.
12116 (win32_join): Adjust interface.
12117 (win32_thread_alive): Take a ptid.
12118 (win32_resume): Adjust to use ptids.
12119 (get_child_debug_event): Ditto.
12120 (win32_wait): Adjust interface. Remove exiting process from
12121 processes table.
12122
bd99dc85
PA
121232009-04-01 Pedro Alves <pedro@codesourcery.com>
12124
12125 Non-stop mode support.
12126
12127 * server.h (non_stop): Declare.
12128 (gdb_client_data, handler_func): Declare.
12129 (delete_file_handler, add_file_handler, start_event_loop):
12130 Declare.
12131 (handle_serial_event, handle_target_event, push_event)
12132 (putpkt_notif): Declare.
12133 * target.h (enum resume_kind): New.
12134 (struct thread_resume): Replace `step' field by `kind' field.
12135 (TARGET_WNOHANG): Define.
12136 (struct target_ops) <wait>: Add `options' argument.
12137 <supports_non_stop, async, start_non_stop>: New fields.
12138 (target_supports_non_stop, target_async): New.
12139 (start_non_stop): Declare.
12140 (mywait): Add `options' argument.
12141 * target.c (mywait): Add `options' argument. Print child exit
12142 notifications here.
12143 (start_non_stop): New.
12144 * server.c (non_stop, own_buf, mem_buf): New globals.
12145 (struct vstop_notif): New.
12146 (notif_queue): New global.
12147 (queue_stop_reply, push_event, discard_queued_stop_replies)
12148 (send_next_stop_reply): New.
12149 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12150 interface changes.
12151 (attach_inferior): In non-stop mode, don't wait for the target
12152 here.
12153 (handle_general_set): Handle QNonStop.
12154 (handle_query): When handling qC, return the current general
12155 thread, instead of the first thread of the list.
12156 (handle_query): If the backend supports non-stop mode, include
12157 QNonStop+ in the qSupported query response.
12158 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12159 and non-stop mode.
12160 (handle_v_attach, handle_v_run): Handle non-stop mode.
12161 (handle_v_stopped): New.
12162 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12163 (myresume): Adjust to use resume_kind. Handle non-stop.
12164 (queue_stop_reply_callback): New.
12165 (handle_status): Handle non-stop mode.
12166 (main): Clear non_stop flag on reconnection. Use the event-loop.
12167 Refactor serial protocol handling from here ...
12168 (process_serial_event): ... to this new function. When GDB
12169 selects any thread, select one here. In non-stop mode, wait until
12170 GDB acks all pending events before exiting.
12171 (handle_serial_event, handle_target_event): New.
12172 * remote-utils.c (remote_open): Install remote_desc in the event
12173 loop.
12174 (remote_close): Remove remote_desc from the event loop.
12175 (putpkt_binary): Rename to...
12176 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12177 (putpkt_binary): New as wrapper around putpkt_binary_1.
12178 (putpkt_notif): New.
12179 (prepare_resume_reply): In non-stop mode, don't change the
12180 general_thread.
12181 * event-loop.c: New.
12182 * Makefile.in (OBJ): Add event-loop.o.
12183 (event-loop.o): New rule.
12184
12185 * linux-low.h (pid_of): Moved here.
12186 (lwpid_of): New.
12187 (get_lwp_thread): Use lwpid_of.
12188 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12189 * linux-low.c (pid_of): Delete.
12190 (inferior_pid): Use lwpid_of.
12191 (linux_event_pipe): New.
12192 (target_is_async_p): New.
12193 (delete_lwp): New.
12194 (handle_extended_wait): Use lwpid_of.
12195 (add_lwp): Don't set lwpid field.
12196 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12197 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12198 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12199 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12200 first. Adjust to linux_wait_for_event interface changes. Use
12201 lwpid_of.
12202 (linux_detach): Don't delete the main lwp here.
12203 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12204 (status_pending_p): Don't consider explicitly suspended lwps.
12205 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12206 pointer. Add OPTIONS argument. Change return type to int. Use
12207 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12208 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12209 pointer. Add status pointer argument. Return a pid instead of a
12210 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12211 changes. In non-stop mode, don't switch to a random thread.
12212 (linux_wait): Rename to...
12213 (linux_wait_1): ... this. Add target_options argument, and handle
12214 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12215 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12216 clean exit and signal exit code. Don't stop all threads in
12217 non-stop mode. In all-stop mode, only stop all threads when
12218 reporting a stop to GDB. Handle explicit thread stop requests.
12219 (async_file_flush, async_file_mark): New.
12220 (linux_wait): New.
12221 (send_sigstop): Use lwpid_of.
12222 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12223 interface changes. In non-stop mode, don't switch to a random
12224 thread.
12225 (linux_resume_one_lwp): Use lwpid_of.
12226 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12227 (linux_resume_one_thread): ... this. Handle resume_stop. In
12228 non-stop mode, don't look for pending flag in all threads.
12229 (resume_status_pending_p): Don't consider explicitly suspended
12230 threads.
12231 (my_waitpid): Reimplement. Emulate __WALL.
12232 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12233 Use lwpid_of.
12234 (sigchld_handler, linux_supports_non_stop, linux_async)
12235 (linux_start_non_stop): New.
12236 (linux_target_ops): Register linux_supports_non_stop, linux_async
12237 and linux_start_non_stop.
12238 (initialize_low): Install SIGCHLD handler.
12239 * thread-db.c (thread_db_create_event, find_one_thread)
12240 (thread_db_get_tls_address): Use lwpid_of.
12241 * win32-low.c (win32_detach): Adjust to use resume_kind.
12242 (win32_wait): Add `options' argument.
12243 * spu-low.c (spu_resume): Adjust to use resume_kind.
12244 (spu_wait): Add `options' argument.
12245
5b1c542e
PA
122462009-04-01 Pedro Alves <pedro@codesourcery.com>
12247
12248 Decouple target code from remote protocol.
12249
12250 * target.h (enum target_waitkind): New.
12251 (struct target_waitstatus): New.
12252 (struct target_ops) <wait>: Return an unsigned long. Take a
12253 target_waitstatus pointer instead of a char pointer.
12254 (mywait): Likewise.
12255 * target.c (mywait): Change prototype to return an unsigned long.
12256 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12257 * server.h (thread_from_wait, old_thread_from_wait): Delete
12258 declarations.
12259 (prepare_resume_reply): Change prototype to take a
12260 target_waitstatus.
12261 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12262 (last_status, last_ptid): New.
12263 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12264 pid instead of a signal.
12265 (attach_inferior): Remove "status" and "signal" parameters.
12266 Adjust.
12267 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12268 not as an address.
12269 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12270 (handle_v_requests, myresume): Remove "status" and "signal"
12271 parameters. Adjust.
12272 (handle_status): New.
12273 (main): Delete local `status'. Adjust.
12274 * remote-utils.c: Include target.h.
12275 (prepare_resume_reply): Change prototype to take a
12276 target_waitstatus. Adjust.
12277
12278 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12279 interface.
12280 * spu-low.c (spu_wait): Adjust.
12281 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12282 Delete.
12283 (win32_wait): Adjust.
12284
2bd7c093
PA
122852009-04-01 Pedro Alves <pedro@codesourcery.com>
12286
12287 * target.h (struct thread_resume): Delete leave_stopped member.
12288 (struct target_ops): Add a `n' argument to the `resume' callback.
12289 * server.c (start_inferior): Adjust.
12290 (handle_v_cont, myresume): Adjust.
12291 * linux-low.c (check_removed_breakpoint): Adjust to resume
12292 interface change, and to removed leave_stopped field.
12293 (resume_ptr): Delete.
12294 (struct thread_resume_array): New.
12295 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12296 resume interface change.
12297 (linux_continue_one_thread, linux_queue_one_thread)
12298 (resume_status_pending_p): Check if the resume field is NULL
12299 instead of checking the leave_stopped member.
12300 (linux_resume): Adjust to the target resume interface change.
12301 * spu-low.c (spu_resume): Adjust to the target resume interface
12302 change.
12303 * win32-low.c (win32_detach, win32_resume): Ditto.
12304
c35fafde
PA
123052009-04-01 Pedro Alves <pedro@codesourcery.com>
12306
12307 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12308 flag.
12309 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12310 pending.
12311 (linux_continue_one_thread): Only preserve the stepping flag if
12312 there's a pending breakpoint.
12313
0a59d50b
PA
123142009-03-31 Pedro Alves <pedro@codesourcery.com>
12315
12316 * server.c (main): After the inferior having exited, call
12317 remote_close before exiting gdbserver.
12318
f04c6d38
TJB
123192009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12320
12321 Fix size of FPSCR in Power 7 processors.
12322 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12323 (PPC_FEATURE_HAS_DFP): New #define.
12324 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12325 size of the FPSCR.
12326
78e5cee6
PA
123272009-03-23 Pedro Alves <pedro@codesourcery.com>
12328
12329 * server.c (handle_query) Whitespace and formatting.
12330
1b3f6016
PA
123312009-03-22 Pedro Alves <pedro@codesourcery.com>
12332
12333 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12334 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12335 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12336 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12337 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12338 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12339 Makefile.in, configure.ac: Fix whitespace throughout.
12340 * configure: Regenerate.
12341
a07b2135
PA
123422009-03-22 Pedro Alves <pedro@codesourcery.com>
12343
12344 * inferiors.c (find_inferior): Make it safe for the callback
12345 function to delete the currently iterated inferior.
12346
67cc2626
PA
123472009-03-22 Pedro Alves <pedro@codesourcery.com>
12348
12349 * Makefile.in (linuw_low_h): Move higher.
12350 (thread-db.o): Depend on $(linux_low_h).
12351
54a0b537
PA
123522009-03-17 Pedro Alves <pedro@codesourcery.com>
12353
12354 Rename "process" to "lwp" throughout.
12355
12356 * linux-low.c (all_processes): Rename to...
12357 (all_lwps): ... this.
12358 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12359 (add_process): Rename to ...
12360 (add_lwp): ... this. Adjust.
12361 (linux_create_inferior): Adjust.
12362 (linux_attach_lwp): Adjust.
12363 (linux_attach): Adjust.
12364 (linux_kill_one_process): Rename to ...
12365 (linux_kill_one_lwp): ... this. Adjust.
12366 (linux_kill): Adjust.
12367 (linux_detach_one_process): Rename to ...
12368 (linux_detach_one_lwp): ... this. Adjust.
12369 (linux_detach): Adjust.
12370 (check_removed_breakpoint): Adjust.
12371 (status_pending_p): Adjust.
12372 (linux_wait_for_process): Rename to ...
12373 (linux_wait_for_lwp): ... this. Adjust.
12374 (linux_wait_for_event): Adjust.
12375 (send_sigstop): Adjust.
12376 (wait_for_sigstop): Adjust.
12377 (stop_all_processes): Rename to ...
12378 (stop_all_lwps): ... this.
12379 (linux_resume_one_process): Rename to ...
12380 (linux_resume_one_lwp): ... this. Adjust.
12381 (linux_set_resume_request, linux_continue_one_thread)
12382 (linux_queue_one_thread, resume_status_pending_p)
12383 (usr_store_inferior_registers, regsets_store_inferior_registers)
12384 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12385 Adjust.
12386 * linux-low.h (get_process): Rename to ...
12387 (get_lwp): ... this. Adjust.
12388 (get_thread_process): Rename to ...
12389 (get_thread_lwp): ... this. Adjust.
12390 (get_process_thread): Rename to ...
12391 (get_lwp_thread): ... this. Adjust.
12392 (struct process_info): Rename to ...
12393 (struct lwp_info): ... this.
12394 (all_processes): Rename to ...
12395 (all_lwps): ... this.
12396 * proc-service.c (ps_lgetregs): Adjust.
12397 * thread-db.c (thread_db_create_event, find_one_thread)
12398 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12399
0b16c5cf
PA
124002009-03-14 Pedro Alves <pedro@codesourcery.com>
12401
12402 * server.c (handle_query): Handle "qAttached".
12403
32de4b9d
NS
124042009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12405
12406 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12407 GPLv3, update license URL.
12408
2aecd87f
DE
124092009-03-01 Doug Evans <dje@google.com>
12410
93efd302 12411 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12412 (server_h): Add gdb_signals.h.
12413 (signals.o): Update.
12414 * server.h (target_signal_from_host,target_signal_to_host_p)
12415 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12416
86b1f9c5
PM
124172009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12418
12419 * remote-utils.c (getpkt): Also generate remote-debug
12420 information if noack_mode is set.
12421
4aa995e1
PA
124222009-02-06 Pedro Alves <pedro@codesourcery.com>
12423
12424 * server.c (handle_query): Report qXfer:siginfo:read and
12425 qXfer:siginfo:write as supported and handle them.
12426 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12427 * linux-low.c (linux_xfer_siginfo): New.
12428 (linux_target_ops): Set it.
12429
62709adf
PA
124302009-01-26 Pedro Alves <pedro@codesourcery.com>
12431
12432 * server.c (gdbserver_usage): Mention --remote-debug.
12433 (main): Accept '--remote-debug' switch.
12434
aef93bd7
DE
124352009-01-18 Doug Evans <dje@google.com>
12436
12437 * regcache.c (new_register_cache): No need to check result of xcalloc.
12438 * server.c (handle_search_memory): Back out calls to xmalloc,
12439 result is checked and error is returned to user upon failure.
12440 (handle_query): Ditto. Add more checks for result of malloc.
12441 (handle_v_cont): Check result of malloc, report error back to
12442 user upon failure.
12443 (handle_v_run): Ditto. Call freeargv.
12444 * server.h (freeargv): Declare.
12445 * utils.c (freeargv): New fn.
12446
54363045
DE
124472009-01-15 Doug Evans <dje@google.com>
12448
f626972c
DE
12449 * gdbreplay.c (perror_with_name): Make arg const char *.
12450 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12451 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12452 * utils.c (perror_with_name): Make arg const char *.
54363045 12453
18aae699
PA
124542009-01-14 Pedro Alves <pedro@codesourcery.com>
12455
12456 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12457 when handling a EXIT_PROCESS_DEBUG_EVENT.
12458
ff703abe
JB
124592009-01-06 Joel Brobecker <brobecker@adacore.com>
12460
12461 * gdbreplay.c (gdbreplay_version): Update copyright year.
12462 * server.c (gdbserver_version): Likewise.
12463
f21cc1a2 124642009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12465
12466 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12467 (handle_extended_wait): Improve comment.
0e21c1ec 12468
bca929d3
DE
124692008-12-13 Doug Evans <dje@google.com>
12470
12471 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12472 * server.h (ATTR_MALLOC): New macro.
12473 (xmalloc,xcalloc,xstrdup): Declare.
12474 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12475 * inferiors.c: Ditto.
12476 * linux-low.c: Ditto.
12477 * mem-break.c: Ditto.
12478 * regcache.c: Ditto.
12479 * remote-utils.c: Ditto.
12480 * server.c: Ditto.
12481 * target.c: Ditto.
12482 * win32-low.c: Ditto.
12483
97438e3f
DE
124842008-12-12 Doug Evans <dje@google.com>
12485
896c7fbb
DE
12486 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12487 in debugging printf.
12488
97438e3f
DE
12489 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12490
e3b886f8
DE
124912008-12-09 Doug Evans <dje@google.com>
12492
12493 * linux-low.h (struct process_info): Delete member tid, unused.
12494 * thread-db.c (find_one_thread): Update.
12495 (maybe_attach_thread): Update.
12496
07e059b5
VP
124972008-12-02 Pedro Alves <pedro@codesourcery.com>
12498
889bf7c5
PA
12499 * target.h (struct target_ops): Add qxfer_osdata member.
12500 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12501 and dirent.h.
12502 (linux_qxfer_osdata): New functions.
12503 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12504 callback.
12505 * server.c (handle_query): Handle "qXfer:osdata:read:".
12506 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12507 (buffer_xml_printf): New functions.
12508 * server.h (struct buffer): New.
12509 (buffer_grow_str, buffer_grow_str0): New macros.
12510 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12511 (buffer_xml_printf): Declare.
07e059b5 12512
4cab47ab
DE
125132008-11-24 Doug Evans <dje@google.com>
12514
12515 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12516
f142445f
DJ
125172008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12518
12519 * server.c (handle_v_run): Always use the supplied argument list.
12520
d0107bb6 125212008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12522
d0107bb6
BW
12523 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12524 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12525
2c4ad781
TJB
125262008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12527
12528 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12529 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12530 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12531 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12532 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12533 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12534 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12535 XML target descriptions.
12536 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12537 when inferior is running on an ISA 2.05 or later processor. Add
12538 special case to return offset for full 64-bit slot of FPSCR when
12539 in 32-bits.
12540
dfb64f85
DJ
125412008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12542
12543 * Makefile.in (SFILES, clean): Added sparc64 files.
12544 (reg-sparc64.o, reg-sparc64.c): New.
12545 * configure.srv (sparc*-*-linux*): New configuration.
12546 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12547 syscall arguments for SPARC.
12548 (regsets_store_inferior_registers): Likewise.
12549 * linux-sparc-low.c: New file.
12550
66b6e1dd
DE
125512008-10-21 Doug Evans <dje@google.com>
12552
12553 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12554 (READLINE_DIR,READLINE_DEP): Delete.
12555 (INTERNAL_CFLAGS): Update.
12556 (LINTFLAGS): Update.
12557
9b710a42
PA
125582008-10-10 Pedro Alves <pedro@codesourcery.com>
12559
12560 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12561 whole argv from the last run, not just argv[0].
12562
5822d809
PA
125632008-09-08 Pedro Alves <pedro@codesourcery.com>
12564
12565 * regcache.c (new_register_cache): Return NULL if the register
12566 cache size isn't known yet.
12567 (free_register_cache): Avoid dereferencing a NULL regcache.
12568
74aac56f
DJ
125692008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12570
12571 * configure.srv: Merge MIPS and MIPS64.
12572
400b20f5
MR
125732008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12574
12575 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12576
677c5bb1
LM
125772008-08-18 Luis Machado <luisgpm@br.ibm.com>
12578
12579 * Makefile.in: Add required vsx dependencies.
12580
12581 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12582 Declare init_registers_powerpc_vsx32l.
12583 Declare init_registers_powerpc_vsx64l.
12584 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12585 (ppc_arch_setup): Check for VSX in hwcap.
12586 (ppc_fill_vsxregset): New function.
12587 (ppc_store_vsxregset): New function.
12588 Add new VSX entry in regset_info target_regsets.
12589
12590 * configure.srv: Add new VSX dependencies.
12591
a6f3e723
SL
125922008-08-12 Pedro Alves <pedro@codesourcery.com>
12593
12594 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12595 (remote_open): Set or clear transport_is_reliable.
12596 (putpkt_binary): Don't expect acks in noack mode.
12597 (getpkt): Don't send ack/nac in noack mode.
12598 * server.c (handle_general_set): Handle QStartNoAckMode.
12599 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12600 qSupported.
12601 (main): Reset noack_mode on every connection.
12602 * server.h (noack_mode): Declare.
12603
a417dc56
RW
126042008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12605
12606 * Makefile.in (GDBREPLAY_OBS): New variable.
12607 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12608
3221518c
UW
126092008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12610 Daniel Jacobowitz <dan@codesourcery.com>
12611
12612 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12613 (usr_store_inferior_registers): Likewise.
12614 (regsets_store_inferior_registers): Likewise.
12615
ec56be1b
PA
126162008-07-31 Rolf Jansen <rj@surtec.com>
12617 Pedro Alves <pedro@codesourcery.com>
12618
12619 * configure.ac: Check for memmem declaration.
12620 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12621 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12622 (disable_packet_qfThreadInfo): Unconditionally compile.
12623 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12624 * configure, config.in: Regenerate.
12625
2fe5e3ff
DE
126262008-07-28 Doug Kwan <dougkwan@google.com>
12627
12628 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12629 (linux_write_memory): Remove declaration of errno.
12630
836acd6d
UW
126312008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12632
12633 * linux-low.c (handle_extended_wait): Do not use "status"
12634 variable uninitialized.
12635
aeba519e
PA
126362008-07-07 Pedro Alves <pedro@codesourcery.com>
12637
12638 * server.c (handle_v_attach): Inhibit reporting dll changes.
12639
db42f210
PA
126402008-06-27 Pedro Alves <pedro@codesourcery.com>
12641
12642 * remote-utils.c (prepare_resume_reply): If requested, don't
12643 output "thread:TID" in the T stop reply.
12644
12645 * server.c (disable_packet_vCont, disable_packet_Tthread)
12646 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12647 (handle_query): If requested, disable support for qC, qfThreadInfo
12648 and qsThreadInfo.
12649 (handle_v_requests): If requested, disable support for vCont.
12650 (gdbserver_show_disableable): New.
12651 (main): Handle --disable-packet and --disable-packet=LIST.
12652
12653 * server.h (disable_packet_vCont, disable_packet_Tthread)
12654 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12655
8e4c5421
CD
126562008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12657
12658 * server.c (gdbserver_usage): Mention --version.
12659
6e23a804
DJ
126602008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12661
12662 * Makefile.in (gdbreplay.o): New rule.
12663
90aa6a40
JM
126642008-06-06 Joseph Myers <joseph@codesourcery.com>
12665
12666 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12667 message, not gdbserver.
12668
c16158bc 126692008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12670 Nathan Sidwell <nathan@codesourcery.com>
12671 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12672
12673 * acinclude.m4: Include ../../config/acx.m4.
12674 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12675 * configure, config.in: Regenerate.
12676 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12677 * server.c (gdbserver_version): Print PKGVERSION.
12678 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12679 (main): Adjust gdbserver_usage calls.
12680 * gdbreplay.c (version, host_name): Add declarations.
12681 (gdbreplay_version, gdbreplay_usage): New.
12682 (main): Accept --version and --help options.
12683
aeb75bf5
DJ
126842008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12685
12686 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12687 (arm_breakpoint_at): Handle Thumb.
12688 (the_low_target): Add comment.
12689
76b233dd
UW
126902008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12691
12692 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12693
08388c79
DE
126942008-05-09 Doug Evans <dje@google.com>
12695
a3c83fae
DE
12696 * server.h (decode_search_memory_packet): Declare.
12697 * remote-utils.c (decode_search_memory_packet): New fn.
12698 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12699 (handle_search_memory): New fn.
12700 (handle_query): Process qSearch:memory packets.
12701
bb9c3d36
UW
127022008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12703
12704 * regcache.c (registers_length): Remove.
12705 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12706 full register packet.
12707 * regcache.h (registers_length): Remove prototype.
12708 * server.h (PBUFSIZ): Define to 16384.
12709
7284e1be
UW
127102008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12711
12712 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12713 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12714 powerpc-64l.o, and powerpc-altivec64l.o.
12715 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12716 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12717 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12718 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12719 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12720 to srv_xmlfiles.
12721
12722 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12723 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12724 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12725 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12726 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12727 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12728 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12729 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12730 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12731 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12732 (clean): Update.
12733
12734 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12735 (init_registers_powerpc_32l): ... this new prototype.
12736 (init_registers_powerpc_32): Remove, replace by ...
12737 (init_registers_powerpc_altivec32l): ... this new prototype.
12738 (init_registers_powerpc_e500): Remove, replace by ...
12739 (init_registers_powerpc_e500l): ... this new prototype.
12740 (init_registers_ppc64): Remove, replace by ...
12741 (init_registers_powerpc_64l): ... this new prototype.
12742 (init_registers_powerpc_64): Remove, replace by ...
12743 (init_registers_powerpc_altivec64l): ... this new prototype.
12744 (ppc_num_regs): Set to 73.
12745 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12746 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12747 (ppc_cannot_store_register): Handle orig_r3 and trap.
12748 (ppc_arch_setup): Update init_registers_... calls.
12749 (ppc_fill_gregset): Handle orig_r3 and trap.
12750
12751 * inferiors.c (clear_inferiors): Reset current_inferior.
12752
fdc59709
PB
127532008-04-23 Paolo Bonzini <bonzini@gnu.org>
12754
889bf7c5
PA
12755 * acinclude.m4: Add override.m4.
12756 * configure: Regenerate.
fdc59709 12757
c9b2f845
UW
127582008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12759
12760 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12761 initial call to init_register_ppc64.
12762
550512b8
UW
127632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12764
43aaf8b6
PA
12765 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12766 single powerpc*-*-linux* case.
550512b8
UW
12767 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12768
b6430ec3
UW
127692008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12770
12771 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12772 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12773 from reg_xmlfiles.
12774 * linux-ppc-low.c: Include <elf.h>.
12775 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12776 (ppc_hwcap): New global variable.
12777 (ppc_regmap): Remove __SPE__ #ifdef sections.
12778 (ppc_regmap_e500): New global variable.
12779 (ppc_cannot_store_register): Update __SPE__ special case.
12780 (ppc_get_hwcap): New function.
12781 (ppc_arch_setup): Use it to determine whether inferior supports
12782 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12783 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12784 Do not access registers if target does not support AltiVec.
12785 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12786 Do not access registers if target does not support SPE.
12787 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12788
52fa2412
UW
127892008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12790
12791 * linux-low.c (disabled_regsets, num_regsets): New.
12792 (use_regsets_p): Delete.
12793 (linux_wait_for_process): Clear disabled_regsets.
12794 (regsets_fetch_inferior_registers): Check and set it.
12795 (regsets_store_inferior_registers): Likewise.
12796 (linux_fetch_registers, linux_store_registers): Do not use
12797 use_regsets_p.
12798 (initialize_low): Allocate disabled_regsets.
12799
e28b3332
DJ
128002008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12801
12802 * Makefile.in (LIBOBJS): New.
12803 (OBS): Use LIBOBJS.
12804 (memmem.o): New rule.
12805 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12806 * configure: Regenerated.
12807
4536995d
UW
128082008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12809
12810 * server.c (handle_query): Never return "unsupported" for
12811 qXfer:features:read queries.
12812
221c031f
UW
128132008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12814
12815 * server.c (get_features_xml): Fix inverted condition.
12816 (handle_query): Always support qXfer:feature:read.
12817
ccd213ac
DJ
128182008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12819
12820 * server.c (wrapper_argv): New.
12821 (start_inferior): Handle wrapper_argv. If set, expect an extra
12822 trap.
12823 (gdbserver_usage): Document --wrapper.
12824 (main): Parse --wrapper.
12825
6fe305f7
UW
128262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12827
12828 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12829 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12830 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12831 (ppc_set_pc): Likewise.
12832 (ppc_arch_setup): New function.
12833 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12834 of collect_register.
889bf7c5 12835 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12836
5b0a002e
UW
128372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12838
12839 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12840 instead of linux-ppc64-low.o.
12841 * linux-ppc64-low.c: Remove file.
12842 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12843 (linux-ppc64-low.o): Remove rule.
12844
12845 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12846 (init_registers_powerpc_64): Likewise.
12847 (ppc_regmap): Conditionally define depending on __powerpc64__.
12848 (ppc_cannot_store_register): Do not special-case "fpscr" when
12849 compiled on __powerpc64__.
12850 (ppc_collect_ptrace_register): New function.
12851 (ppc_supply_ptrace_register): New function.
12852 (ppc_breakpoint): Change type to "unsigned int".
12853 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12854 (the_low_target): Conditionally provide initializers for the
889bf7c5 12855 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12856 collect_ptrace_register and supply_ptrace_register members.
12857
9b4b61c8
UW
128582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12859
12860 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12861 * server.c (gdbserver_xmltarget): Define.
12862 (get_features_xml): Use it to replace "target.xml" and arch_string.
12863
12864 * configure.srv: Remove srv_xmltarget. Add XML files that were
12865 mentioned there to srv_xmlfiles instead. Remove conditional tests
12866 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12867 srv_xmlfiles and srv_regobj to include all possible choices.
12868 * configure.ac (srv_xmltarget): Remove.
12869 (srv_xmlfiles): Do not add "target.xml".
12870 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12871 checks for supplementary target information.
12872 * configure: Regenerate.
12873 * Makefile.in (XML_TARGET): Remove.
12874 (target.xml): Remove rule.
12875 (clean): Do not clean up target.xml.
12876 (.PRECIOUS): Do not mention target.xml.
12877
12878 * target.h (struct target_ops): Remove arch_string member.
12879 * linux-low.c (linux_arch_string): Remove.
12880 (linux_target_ops): Remove arch_string initializer.
12881 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12882 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12883 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12884 * spu-low.c (spu_arch_string): Remove.
12885 (spu_target_ops): Remove arch_string initializer.
12886 * win32-low.c (win32_arch_string): Remove.
12887 (win32_target_ops): Remove arch_string initializer.
12888 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12889 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12890 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12891
ee1a7ae4
UW
128922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12893
12894 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12895 by collect_ptrace_register and supply_ptrace_register hooks.
12896 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12897 instead of checking for the_low_target.left_pad_xfer.
12898 (usr_store_inferior_registers): Use collect_ptrace_register callback
12899 instead of checking for the_low_target.left_pad_xfer.
12900
12901 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12902 (s390_supply_ptrace_register): Likewise.
12903 (s390_fill_gregset): Call s390_collect_ptrace_register.
12904 (the_low_target): Update.
12905
12906 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12907 (ppc_supply_ptrace_register): Likewise.
12908 (the_low_target): Update.
12909
12910 * linux-i386-low.c (the_low_target): Update.
12911 * linux-x86-64-low.c (the_low_target): Update.
12912
d61ddec4
UW
129132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12914
12915 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12916 reg-s390.o and reg-s390x.o.
12917
12918 * linux-low.c (new_inferior): New global variable.
12919 (linux_create_inferior, linux_attach): Set it.
12920 (linux_wait_for_process): Call the_low_target.arch_setup after the
12921 target has stopped for the first time.
12922 (initialize_low): Do not call the_low_target.arch_setup.
12923
12924 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12925 (s390_set_pc): Likewise.
12926 (s390_arch_setup): New function.
12927 (the_low_target): Use s390_arch_setup as arch_setup routine.
12928
12929 * regcache.c (realloc_register_cache): New function.
12930 (set_register_cache): Call it for each existing regcache.
12931
d05b4ac3
UW
129322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12933
12934 * server.h (init_registers): Remove prototype.
12935
12936 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12937 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12938 instead of init_registers ().
12939 * linux-arm-low.c (init_registers_arm): Add prototype.
12940 (init_registers_arm_with_iwmmxt): Likewise.
12941 (the_low_target): Add initializer for arch_setup field.
12942 * linux-cris-low.c (init_registers_cris): Add prototype.
12943 (the_low_target): Add initializer for arch_setup field.
12944 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12945 (the_low_target): Add initializer for arch_setup field.
12946 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12947 (the_low_target): Add initializer for arch_setup field.
12948 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12949 (the_low_target): Add initializer for arch_setup field.
12950 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12951 (the_low_target): Add initializer for arch_setup field.
12952 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12953 (the_low_target): Add initializer for arch_setup field.
12954 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12955 (init_registers_mips64_linux): Likewise.
12956 (the_low_target): Add initializer for arch_setup field.
12957 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12958 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12959 (the_low_target): Add initializer for arch_setup field.
12960 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12961 (init_registers_powerpc_64): Likewise.
12962 (the_low_target): Add initializer for arch_setup field.
12963 * linux-s390-low.c (init_registers_s390): Add prototype.
12964 (init_registers_s390x): Likewise.
12965 (the_low_target): Add initializer for arch_setup field.
12966 * linux-sh-low.c (init_registers_sh): Add prototype.
12967 (the_low_target): Add initializer for arch_setup field.
12968 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12969 (the_low_target): Add initializer for arch_setup field.
12970 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12971 (the_low_target): Add initializer for arch_setup field.
12972
12973 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12974 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12975 instead of init_registers ().
12976 * win32-arm-low.c (init_registers_arm): Add prototype.
12977 (the_low_target): Add initializer for arch_setup field.
12978 * win32-i386-low.c (init_registers_i386): Add prototype.
12979 (the_low_target): Add initializer for arch_setup field.
12980
12981 * spu-low.c (init_registers_spu): Add prototype.
12982 (initialize_low): Call initialie_registers_spu () instead of
12983 initialize_registers ().
12984
fd96d250
PA
129852008-02-19 Pedro Alves <pedro@codesourcery.com>
12986
12987 * server.c (handle_v_requests): When handling the vRun and vAttach
12988 packets, if already debugging a process, don't kill it. Return an
12989 error instead.
12990
d41b6bb4
DJ
129912008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12992
12993 * server.c (handle_query): Correct length check.
12994
5ac588cf
PA
129952008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12996
12997 * win32-low.c (do_initial_child_stuff): Add process handle
12998 parameter. Set current_process_handle and current_process_id from the
12999 parameters. Clear globals.
13000 (win32_create_inferior): Don't set current_process_handle and
13001 current_process_id here. Instead pass them on the call to
13002 do_initial_child_stuff.
13003 (win32_attach): Likewise.
13004 (win32_clear_inferiors): New.
13005 (win32_kill): Don't close the current process handle or the
13006 current thread handle here. Instead call win32_clear_inferiors.
13007 (win32_detach): Don't open a new handle to the process. Call
13008 win32_clear_inferiors.
13009 (win32_join): Don't rely on current_process_handle; open a new
13010 handle using the process id.
13011 (win32_wait): Call win32_clear_inferiors when the inferior process
13012 has exited.
13013
ecd7ecbc
DJ
130142008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13015
13016 * server.c (monitor_show_help): Add "exit".
13017
1525d545
MG
130182008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13019
ecd7ecbc 13020 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13021 (clean): Add reg-xtensa.c.
13022 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13023 * configure.srv (xtensa*-*-linux*) New target.
13024 * linux-xtensa-low.c: New.
13025 * xtensa-xtregs.c: New.
1525d545 13026
59a016f0
PA
130272008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13028
13029 * hostio.c: Don't include errno.h.
13030 (errno_to_fileio_errno): Move to hostio-errno.
13031 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13032 error number outputting to the target->hostio_last_error callback.
13033 (hostio_packet_error): Use FILEIO_EINVAL directly.
13034 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13035 calls to hostio_error.
13036 * hostio-errno.c: New.
13037 * server.h (hostio_last_error_from_errno): Declare.
13038 * target.h (target_ops): Add hostio_last_error member.
13039 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13040 as hostio_last_error handler.
889bf7c5 13041 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13042 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13043 (wince_hostio_last_error): New functions.
13044 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13045 as hostio_last_error handler.
13046 (win32_target_ops) [!_WIN32_WCE]: Register
13047 hostio_last_error_from_errno as hostio_last_error handler.
13048 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13049 (hostio-errno.o): New rule.
13050 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13051 * configure.srv (srv_hostio_err_objs): New variable. Default to
13052 hostio-errno.o.
13053 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13054 * configure: Regenerate.
13055
2d717e4f
DJ
130562008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13057
13058 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13059 (linux_kill, linux_detach): Clean up the process list.
13060 * remote-utils.c (remote_open): Improve port number parsing.
13061 (putpkt_binary, input_interrupt): Only send interrupts if the target
13062 is running.
13063 * server.c (extended_protocol): Make static.
13064 (attached): Define earlier.
13065 (exit_requested, response_needed, program_argv): New variables.
13066 (target_running): New.
13067 (start_inferior): Clear attached here.
13068 (attach_inferior): Set attached here.
13069 (require_running): Define.
13070 (handle_query): Use require_running and target_running. Implement
13071 "monitor exit".
13072 (handle_v_attach, handle_v_run): New.
13073 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13074 (gdbserver_usage): Update.
13075 (main): Redo argument parsing. Handle --debug and --multi. Handle
13076 --attach along with other options or after the port. Save
13077 program_argv. Support no initial program. Resynchronize
13078 communication with GDB after an error. Handle "monitor exit".
13079 Use require_running and target_running. Always allow the extended
13080 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13081 restart in extended mode.
13082 * README: Refer to the GDB manual. Update --attach usage.
13083
7407e2de
AS
130842007-12-20 Andreas Schwab <schwab@suse.de>
13085
13086 * linux-low.c (STACK_SIZE): Define.
13087 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13088 (linux_test_for_tracefork): Likewise.
13089
b65d95c5
DJ
130902007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * linux-low.c (linux_wait_for_event): Update messages. Do not
13093 reinsert auto-delete breakpoints.
13094 * mem-break.c (struct breakpoint): Change return type of handler to
13095 int.
13096 (set_breakpoint_at): Update handler type.
13097 (reinsert_breakpoint_handler): Return 1 instead of calling
13098 delete_breakpoint.
13099 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13100 setting a new one.
13101 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13102 * mem-break.h (set_breakpoint_at): Update handler type.
13103 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13104 * win32-low.c (auto_delete_breakpoint): New.
13105 (get_child_debug_event): Use it.
13106
4e799345
DJ
131072007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13108
13109 * configure.ac: Check for pread and pwrite.
13110 * hostio.c (handle_pread): Fall back to lseek and read.
13111 (handle_pwrite): Fall back to lseek and write.
13112 * config.in, configure: Regenerated.
13113
27524b67
DJ
131142007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13115
13116 * server.c (myresume): Add own_buf argument.
13117 (main): Update calls.
13118
a20d5e98
DJ
131192007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13120
13121 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13122 * remote-utils.c (remote_open): Do not call disable_async_io.
13123 (block_async_io): Delete.
13124 (unblock_async_io): Make static.
13125 (initialize_async_io): New.
13126 * server.c (handle_v_cont): Handle async I/O here.
13127 (myresume): Likewise. Move other common resume tasks here...
13128 (main): ... from here. Call initialize_async_io. Disable async
13129 I/O before the main loop.
13130 * server.h (initialize_async_io): Declare.
13131 (block_async_io, unblock_async_io): Delete prototypes.
13132 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13133
b79d787e
DJ
131342007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13135
13136 * remote-utils.c (readchar): Allow binary data in received messages.
13137
d97903b2
PA
131382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13139
13140 * win32-low.c (attaching): New global.
13141 (win32_create_inferior): Clear the `attaching' global.
13142 (win32_attach): Set the `attaching' global.
13143 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13144 attaching. Only set a breakpoint at the entry point if not
13145 attaching.
13146
311de423
PA
131472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * server.c (main): Don't report dll events on the initial
13150 connection on attaches.
13151
6c2d16d2
PA
131522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13153
13154 * server.c (main): Relax numerical bases supported for the pid of
13155 the --attach command line argument.
13156
5ca906e6
PA
131572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13158
13159 * win32-low.c (win32_attach): Call OpenProcess before
13160 DebugActiveProcess, not after. Add last error output to error
13161 call.
13162
9c6c8194
PA
131632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13164
13165 * win32-low.c (win32_get_thread_context)
13166 (win32_set_thread_context): New functions.
13167 (thread_rec): Use win32_get_thread_context.
13168 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13169 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13170 field.
13171
4d5d1aaa
PA
131722007-12-03 Leo Zayas
13173 Pedro Alves <pedro_alves@portugalmail.pt>
13174
13175 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13176 global variables.
13177 (child_add_thread): Minor cleanup.
13178 (child_continue): Resume artificially suspended threads before
13179 calling ContinueDebugEvent.
13180 (suspend_one_thread): New.
13181 (fake_breakpoint_event): New.
13182 (get_child_debug_event): Change return type to int. Check here if
13183 gdb sent an interrupt request. If a soft interrupt was requested,
13184 fake a breakpoint event. Return 0 if there is no event to handle,
13185 and 1 otherwise.
13186 (win32_wait): Don't check here if gdb sent an interrupt request.
13187 Ensure there is a valid event to handle.
13188 (win32_request_interrupt): Add soft interruption method as last
13189 resort.
13190
c436e841
PA
131912007-12-03 Leo Zayas
13192 Pedro Alves <pedro_alves@portugalmail.pt>
13193
13194 * win32-low.h (win32_thread_info): Add descriptions to the
13195 structure members. Replace `suspend_count' counter by a
13196 `suspended' flag.
13197 * win32-low.c (thread_rec): Update condition of when to get the
13198 context from the inferior. Rely on ContextFlags being set if it
13199 has already been retrieved. Only suspend the inferior thread if
13200 we haven't already. Warn if that fails.
13201 (continue_one_thread): s/suspend_count/suspended/. Only call
13202 ResumeThread once. Warn if that fails.
13203
e7b5fa67
PA
132042007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13205
13206 * win32-low.c (win32_wait): Don't read from the inferior when it
13207 has already exited.
13208
a385171d
PA
132092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13210
13211 * Makefile.in (win32_low_h): New variable.
13212 (win32-low.o): Add dependency on $(win32_low_h).
13213 (win32-arm-low.o, win32-i386-low.o): New rules.
13214
f80c84b3
DJ
132152007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13216
13217 * hostio.c: Correct copyright year.
13218
a6b151f1
DJ
132192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13220
13221 * Makefile.in (OBS): Add hostio.o.
13222 (hostio.o): New rule.
13223 * server.h (handle_vFile): Declare.
13224 * hostio.c: New file.
13225 * server.c (handle_v_requests): Take packet_len and new_packet_len
13226 for binary packets. Call handle_vFile.
13227 (main): Update call to handle_v_requests.
13228
f9387fc3
DJ
132292007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13230
13231 * linux-low.c: Include <sched.h>.
13232
51c2684e
DJ
132332007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13234
13235 * linux-low.c (linux_tracefork_grandchild): New.
13236 (linux_tracefork_child): Use clone.
13237 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13238
75f83163
JB
132392007-10-31 Joel Brobecker <brobecker@adacore.com>
13240
13241 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13242
da5898ce
DJ
132432007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13244
13245 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13246
24a09b5f
DJ
132472007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13248
13249 * inferiors.c (change_inferior_id): Delete.
13250 (add_pid_to_list, pull_pid_from_list): New.
13251 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13252 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13253 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13254 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13255 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13256 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13257 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13258 (using_threads): Always set to 1.
13259 (handle_extended_wait): New.
13260 (add_process): Do not set TID.
13261 (linux_create_inferior): Set must_set_ptrace_flags.
13262 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13263 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13264 (linux_thread_alive): Rename TID argument to LWPID.
13265 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13266 (linux_wait_for_event): Do not use TID or check using_threads. Update
13267 call to dead_thread_notify. Call handle_extended_wait.
13268 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13269 (send_sigstop): Delete sigstop_sent.
13270 (wait_for_sigstop): Avoid TID.
13271 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13272 (linux_test_for_tracefork): New.
13273 (linux_lookup_signals): Use thread_db_active and
13274 linux_supports_tracefork_flag.
13275 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13276 * linux-low.h (get_process_thread): Avoid TID.
13277 (struct process_ifo): Move thread_known and tid to the end. Remove
13278 sigstop_sent.
13279 (linux_attach_lwp, thread_db_init): Update prototypes.
13280 * server.h (change_inferior_id): Delete prototype.
13281 (add_pid_to_list, pull_pid_from_list): New prototypes.
13282 * thread-db.c (thread_db_use_events): New.
13283 (find_first_thread): Rename to...
13284 (find_one_thread): ...this. Update callers and messages. Do not
13285 call fatal. Check thread_db_use_events. Do not call
13286 change_inferior_id or new_thread_notify.
13287 (maybe_attach_thread): Update. Do not call new_thread_notify.
13288 (thread_db_init): Set thread_db_use_events. Check use_events.
13289 * utils.c (fatal, warning): Correct message prefix.
13290
30ed0a8f
DJ
132912007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13292
13293 * Makefile.in (clean): Remove new files.
13294 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13295 (powerpc-64.o, powerpc-64.c): New rules.
13296 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13297 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13298 with SPE.
13299 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13300 SPE targets.
13301 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13302 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13303 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13304 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13305 (target_regsets): Add AltiVec and SPE register sets.
13306 * configure.ac: Check for AltiVec and SPE.
13307 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13308 (ppc_fill_vrregset, ppc_store_vrregset): New.
13309 (target_regsets): Add AltiVec register set.
13310 * configure: Regenerated.
13311
fd462a61
DJ
133122007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13313
13314 * linux-low.c (O_LARGEFILE): Define.
13315 (linux_read_memory): Use /proc/PID/mem.
13316 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13317 * configure, config.in: Regenerated.
13318
69f223ed
DJ
133192007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13320
13321 * linux-low.c (linux_wait_for_event): Do not pass signals while
13322 single-stepping.
13323
aec18585
PA
133242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13325
13326 * win32-low.c (create_process): New.
13327 (win32_create_inferior): Use create_process instead of
13328 CreateProcess. If create_process failed retry appending an ".exe"
13329 suffix. Store the GetLastError result immediatelly after
13330 create_process calls and use it on the call to error.
13331
34d86ddd
PA
133322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13333
13334 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13335
5a0e3bd0
JB
133362007-08-23 Joel Brobecker <brobecker@adacore.com>
13337
13338 * configure.ac: Switch license to GPLv3.
13339
f88c79e6
MS
133402007-08-01 Michael Snyder <msnyder@access-company.com>
13341
13342 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13343
6b3d9b83
PA
133442007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13345
13346 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13347 typedef.
13348 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13349 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13350 CloseToolhelp32Snapshot.
13351 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13352 CloseToolhelp32Snapshot.
13353
c588c53c
MS
133542007-07-27 Michael Snyder <michael.snyder@access-company.com>
13355
13356 * server.c (main): Check for inferior exit before main loop.
13357
aa0403d9
PA
133582007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13359
13360 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13361 instead of on tmp_desc.
13362
255e7678
DJ
133632007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13364 Daniel Jacobowitz <dan@codesourcery.com>
13365
13366 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13367 (add_thread): Minor cleanups.
13368 (clear_inferiors): Move lower in the file. Clear the DLL
13369 list.
13370 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13371 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13372 (xml_escape_text): New.
13373 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13374 for qSupported.
13375 (handle_v_cont): Report errors.
13376 (gdbserver_version): Update.
13377 (main): Correct size of own_buf. Do not report initial DLL events.
13378 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13379 (unloaded_dll, xml_escape_text): New.
13380 * win32-low.c (enum target_waitkind): Update comments.
13381 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13382 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13383 (win32_EnumProcessModules, win32_GetModuleInformation)
13384 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13385 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13386 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13387 (win32_Module32First, win32_Module32Next, load_toolhelp)
13388 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13389 (get_child_debug_event): Handle DLL events.
13390 (win32_wait): Likewise.
13391
0d37add9
DJ
133922007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13393
13394 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13395 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13396
45e2715e
PA
133972007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13398
13399 * win32-low.c (handle_output_debug_string): Ignore event if not
13400 waiting.
13401
c5674cf1
PA
134022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13403
13404 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13405
2bbe3cc1
DJ
134062007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13407
13408 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13409
ae13219e
DJ
134102007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13411
13412 * inferiors.c (change_inferior_id): Add comment.
13413 * linux-low.c (check_removed_breakpoint): Add an early
13414 prototype. Improve debug output.
13415 (linux_attach): Doc update.
13416 (linux_detach_one_process, linux_detach): Clean up before releasing
13417 each process.
13418 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13419 * linux-low.h (struct process_info): Doc improvement.
13420 * mem-break.c (delete_all_breakpoints): New.
13421 * mem-break.h (delete_all_breakpoints): New prototype.
13422 * thread-db.c (find_first_thread): New.
13423 (thread_db_create_event): Call it instead of
13424 thread_db_find_new_threads. Clean up unused variables.
13425 (maybe_attach_thread): Remove first thread handling.
13426 (thread_db_find_new_threads): Use find_first_thread.
13427 (thread_db_get_tls_address): Likewise.
13428
4105de34
DJ
134292007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13430
13431 * thread-db.c (thread_db_find_new_threads): Add prototype.
13432 (thread_db_create_event): Check for the main thread before adding
13433 a new thread.
13434 (maybe_attach_thread): Only enable event reporting if TID == 0.
13435 (thread_db_get_tls_address): Check for new threads.
13436
2b876972
DJ
134372007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13438
13439 * linux-low.c (linux_create_inferior): Try execv before execvp.
13440 * spu-low.c (spu_create_inferior): Likewise.
13441
7a245884
DJ
134422007-06-13 Mike Frysinger <vapier@gentoo.org>
13443
13444 * linux-low.c (linux_create_inferior): Change execv to execvp.
13445 * spu-low.c (spu_create_inferior): Likewies.
13446
117ce543
DJ
134472007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13448
13449 * Makefile.in (clean): Clean new files instead of deleted ones.
13450 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13451 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13452 rules.
13453 * configure.srv: Specify XML files and new regformats for MIPS and
13454 MIPS64 GNU/Linux.
13455 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13456 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13457 an entry for the restart register.
13458 (mips_cannot_fetch_register, mips_cannot_store_register)
13459 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13460 register names to match the XML descriptions.
13461 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13462 restart register instead of $0.
13463
0e7f50da
UW
134642007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13465 Markus Deuling <deuling@de.ibm.com>
13466
13467 * remote-utils.c (decode_xfer_write): New function.
13468 * server.h (decode_xfer_write): Add prototype.
13469 * server.c (handle_query): Add PACKET_LEN argument. Support
13470 qXfer:spu:read and qXfer:spu:write packets.
13471 (main): Pass packet_len to handle_query.
13472 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13473 * target.h (target_ops): Add qxfer_spu.
13474
374c1d38
UW
134752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13476
13477 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13478 accessing non-seekable spufs files.
13479
bb63802a
UW
134802007-05-16 Markus Deuling <deuling@de.ibm.com>
13481
889bf7c5 13482 * server.c (handle_query): Add reply for qC packet.
bb63802a 13483
7390519e
PA
134842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13485 Leo Zayas <lerele@champenstudios@com>
13486
13487 * server.h (check_remote_input_interrupt_request): New function.
13488 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13489 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13490 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13491 (check_remote_input_interrupt_request): New function.
13492 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13493 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13494 winapi_GenerateConsoleCtrlEvent): New typedefs.
13495 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13496 to 250 ms.
13497 (win32_wait): Check for remote interrupt request
13498 with check_remote_input_interrupt_request.
13499 (win32_request_interrupt): New function.
13500 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13501
34b34921
PA
135022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13503
13504 * win32-low.c (debug_registers_changed,
13505 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13506 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13507 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13508 (thread_rec): Get context using the low target.
13509 (child_add_thread): Call thread_added on the low target,
13510 which does the same thing.
13511 (regptr): Delete.
13512 (do_initial_child_stuff): Remove debug registers references.
13513 Set context using the low target. Resume threads after
13514 setting the contexts.
13515 (child_continue): Remove dead variable. Remove debug
13516 registers references.
13517 (child_fetch_inferior_registers): Go through the low target.
13518 (do_child_store_inferior_registers): Remove.
13519 (child_store_inferior_registers): Go through the low target.
13520 (win32_resume): Remove debug registers references.
13521 Set context using the low target.
13522 (handle_exception): Change return type to void. Don't record
13523 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13524 first chance exception.
889bf7c5 13525 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13526 goto loop. Always return after waiting for debug event.
13527 (win32_wait): Convert to switch statement. Handle spurious
13528 events.
13529
13530 * win32-i386-low.c (debug_registers_changed,
13531 debug_registers_used): New.
13532 (initial_stuff): Rename to ...
13533 (i386_initial_stuff): ... this. Clear debug registers
13534 state variables.
13535 (store_debug_registers): Delete.
13536 (i386_get_thread_context): New.
13537 (load_debug_registers): Delete.
13538 (i386_set_thread_context): New.
13539 (i386_thread_added): New.
13540 (single_step): Rename to ...
13541 (i386_single_step): ... this.
13542 (do_fetch_inferior_registers): Rename to ...
13543 (i386_fetch_inferior_register): ... this.
13544 (i386_store_inferior_register): New.
13545 (the_low_target): Adapt to new interface.
13546
13547 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13548 (arm_get_thread_context): New.
13549 (arm_set_thread_context): New.
13550 (regptr): New.
13551 (do_fetch_inferior_registers): Rename to ...
13552 (arm_fetch_inferior_register): ... this.
13553 (arm_store_inferior_register): New.
13554 (arm_wince_breakpoint): Reimplement as unsigned long.
13555 (arm_wince_breakpoint_len): Define.
13556 (the_low_target): Adapt to new interface.
13557
13558 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13559 load_debug_registers. Add get_thread_context, set_thread_context,
13560 thread_added and store_inferior_register. Rename
13561 fetch_inferior_registers to fetch_inferior_register.
13562 (regptr): Remove declaration.
13563
dd6953e1
PA
135642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13565
13566 * linux-low.c (linux_detach): Change return type to int. Return 0.
13567 * spu-low.c (spu_detach): Likewise.
13568
444d6139
PA
135692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13570
13571 * target.h (target_ops): Change return type of detach to int.
13572 Add join.
13573 (join_inferior): New.
13574 * server.c (main): Don't skip detach support on mingw32.
13575 If the inferior doesn't support detaching return error.
13576 Call join_inferior instead of using waitpid.
13577 * linux-low.c (linux_join): New.
13578 (linux_target_op): Add linux_join.
13579 * spu-low.c (spu_join): New.
13580 (spu_target_ops): Add spu_join.
13581 * win32-low.c (win32_detach): Adapt to new interface.
13582 Reopen current_process_handle before detaching. Issue a child
13583 resume before detaching.
13584 (win32_join): New.
13585 (win32_target_op): Add win32_join.
13586
1d5315fe
PA
135872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13588
13589 * win32-low.c (win32-attach): Fix return value.
13590 * target.h (target_ops): Describe ATTACH return values.
13591
bf914831
PA
135922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13593
13594 * win32-low.c (GETPROCADDRESS): Define.
13595 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13596 (winapi_DebugSetProcessKillOnExit): Likewise.
13597 (win32_create_inferior): Force usage of ansi CreateProcessA.
13598 (win32_attach): Use GETPROCADDRESS.
13599 (win32_detach): Likewise.
13600
f72f3e60
PA
136012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13602
13603 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13604
ed50f18f
PA
136052007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13606
13607 * win32-low.c: Commit leftover changes from 2007-03-29.
13608
0c2ead7e
DJ
136092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13610
13611 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13612 fields short instead of int. Add explicit padding.
13613 (i387_cache_to_fsave): Remove unnecessary casts.
13614 (i387_fsave_to_cache): Doc fix.
13615 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13616
73725ff3
DJ
136172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13620 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13621
d99f33d8
PA
136222007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13623
13624 * configure.srv (arm*-*-mingw32ce*): Move near the other
13625 arm targets.
13626
68070c10
PA
136272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13628
2482afc6 13629 * configure.ac: Add errno checking.
68070c10
PA
13630 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13631 sys/file.h and malloc.h.
13632 (AC_CHECK_DECLS): Add perror.
13633 (srv_mingwce): Handle.
2482afc6 13634 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13635 win32-i386-low.o to srv_tgtobj.
13636 (i[34567]86-*-mingw*): Likewise.
13637 (arm*-*-mingw32ce*): Add case.
13638 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13639 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13640 [__MINGW32CE__] (strerror): New function.
13641 [__MINGW32CE__] (errno): Define to GetLastError.
13642 [__MINGW32CE__] (COUNTOF): New macro.
13643 (remote_open): Remove extra close call.
13644 * mem-break.c (delete_breakpoint_at): New function.
13645 * mem-break.h (delete_breakpoint_at): Declare.
13646 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13647 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13648 [USE_WIN32API] (read, write): Add char* casts.
13649 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13650 * server.h: Include wincecompat.h on Windows CE.
13651 [HAVE_ERRNO_H]: Check.
13652 (perror): Declare if not declared.
13653 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13654 (perror_with_name): Remove errno declaration.
13655 * wincecompat.h: New.
13656 * wincecompat.c: New.
13657 * win32-low.h: New.
13658 * win32-arm-low.c: New.
13659 * win32-i386-low.c: New.
13660 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13661 (OUTMSG2): Make it safe.
13662 (_T): New macro.
13663 (COUNTOF): New macro.
13664 (NUM_REGS): Get it from the low target.
13665 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13666 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13667 (thread_rec): Let low target handle debug registers.
13668 (child_add_thread): Likewise.
13669 (child_init_thread_list): Likewise.
13670 (continue_one_thread): Likewise.
13671 (regptr): New.
13672 (do_child_fetch_inferior_registers): Move to ...
13673 * win32-i386-low.c: ... here, and rename to ...
13674 (do_fetch_inferior_registers): ... this.
889bf7c5 13675 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13676 Go through the low target.
13677 (do_child_store_inferior_registers): Use regptr.
13678 (strwinerror): New function.
13679 (win32_create_inferior): Handle Windows CE.
13680 Use strwinerror instead of strerror on Windows error
13681 codes. Add program to the error output.
13682 Don't close the main thread handle on Windows CE.
13683 (win32_attach): Use coredll.dll on Windows CE.
13684 (win32_kill): Close current process and current
13685 thread handles.
13686 (win32_detach): Use coredll.dll on Windows CE.
13687 (win32_resume): Let low target handle debug registers, and
13688 step request.
13689 (handle_exception): Add/Remove initial breakpoint. Avoid
13690 non-existant WSTOPSIG on Windows CE.
13691 (win32_read_inferior_memory): Cast to remove warning.
13692 (win32_arch_string): Go through the low target.
13693 (initialize_low): Call set_breakpoint_data with the low
13694 target's breakpoint.
13695 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13696 FOP_REGNUM, mappings): Move to ...
13697 * win32-i386-low.c: ... here.
13698 * win32-low.c (win32_thread_info): Move to ...
13699 * win32-low.h: ... here.
13700 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13701 win32-arm-low.c and wincecompat.c.
13702 (all:): Add $EXEEXT.
13703 (install-only:): Likewise.
13704 (gdbserver:): Likewise.
13705 (gdbreplay:): Likewise.
13706 * config.in: Regenerate.
13707 * configure: Regenerate.
13708
41093d81
PA
137092007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13710
13711 * win32-low.c: Rename typedef thread_info to
13712 win32_thread_info throughout.
13713
544afa54
PA
137142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13715
13716 * win32-i386-low.c: Rename to ...
13717 * win32-low.c: ... this.
13718 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13719 * Makefile.in: Likewise.
13720
bce7165d
PA
137212007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13722
13723 * remote-utils.c (monitor_output): Constify msg parameter.
13724 * server.h (monitor_output): Likewise.
13725 * win32-i386-low.c (handle_output_debug_string): New.
13726 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13727 handle_output_debug_string.
13728 (get_child_debug_event): Likewise.
13729
506c7aa0
DJ
137302007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13731
13732 * server.c (main): Correct strtoul check.
13733
42c81e2a
DJ
137342007-03-27 Jon Ringle <jon@ringle.org>
13735
13736 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13737
9453113a
DJ
137382007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13739
13740 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13741
64a69107
DJ
137422007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * terminal.h: Check HAVE_SGTTY_H.
13745
137462007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13747
13748 * remote-utils.c (remote_open): Print out the assigned port number.
13749
c74d0ad8
DJ
137502007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13751
13752 * remote-utils.c (monitor_output): New function.
13753 * server.c (debug_threads): Define here.
13754 (monitor_show_help): New function.
13755 (handle_query): Handle qRcmd.
13756 (main): Do not handle 'd' packet.
13757 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13758 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13759 of debug_threads.
13760
de7c3b4a
PA
137612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13762
13763 * Makefile.in (EXEEXT): New.
13764 (clean): Use $(EXEEXT).
13765
ef57601b
PA
137662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13767
13768 * target.h (target_ops): Rename send_signal to request_interrupt,
13769 and remove enum target_signal parameter.
13770 * linux-low.c (linux_request_interrupt): Rename from
13771 linux_send_signal, and always send SIGINT.
13772 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13773 and always send SIGINT.
13774 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13775 of send_signal.
13776 (input_interrupt): Likewise.
13777
820f2bda
PA
137782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13779
13780 * server.c (get_features_xml): Check if target implemented
13781 arch_string.
13782 * win32-i386-low.c (win32_arch_string): New.
13783 (win32_target_ops): Add win32_arch_string as arch_string member.
13784
ab39bf24
UW
137852007-02-22 Markus Deuling <deuling@de.ibm.com>
13786
13787 * spu-low.c (spu_arch_string): New.
13788 (spu_target_ops): Add spu_arch_string.
13789
61ff6e04
DJ
137902007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13791
13792 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13793 * configure.ac: Do not check for terminal.h.
13794 * configure, config.in: Regenerated.
13795
fb1e4ffc
DJ
137962007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13797
13798 * Makefile.in (OBS): Add $(XML_BUILTIN).
13799 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13800 (clean): Update.
13801 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13802 (arm-with-iwmmxt.c): New.
13803 * config.in, configure: Regenerate.
13804 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13805 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13806 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13807 (arm*-*-linux*): Add iWMMXt and regset support.
13808 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13809 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13810 (arm_store_wmmxregset, target_regsets): New.
13811 * server.c (get_features_xml): Take annex argument. Check builtin
13812 XML documents.
13813 (handle_query): Handle multiple annexes.
13814
0f48aa01
DJ
138152007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13816
13817 * remote-utils.c [USE_WIN32API] (read, write): Define.
13818 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13819 write.
13820
23181151
DJ
138212007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13822
13823 * linux-i386-low.c (the_low_target): Set arch_string.
13824 * linux-x86-64-low.c (the_low_target): Likewise.
13825 * linux-low.c (linux_arch_string): New.
13826 (linux_target_ops): Add it.
13827 * linux-low.h (struct linux_target_ops): Add arch_string.
13828 * server.c (write_qxfer_response): Use const void * for DATA.
13829 (get_features_xml): New.
13830 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13831 * target.h (struct target_ops): Add arch_string method.
13832
9d606399
DJ
138332007-01-03 Denis Pilat <denis.pilat@st.com>
13834 Daniel Jacobowitz <dan@codesourcery.com>
13835
13836 * linux-low.c (linux_kill): Handle being called with no threads.
13837 * win32-i386-low.c (win32_kill): Likewise.
13838 (get_child_debug_event): Clear current_process_handle.
13839
138402006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13841 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * remote-utils.c (remote_open): Check the type of specified
13844 serial port devices before opening them.
13845 * server.c (main): Kill the inferior if an error occurs during
13846 the first remote_open.
13847
a5e13d24
DJ
138482006-12-05 Markus Deuling <deuling@de.ibm.com>
13849
13850 * README: Update supported targets.
13851
186947f7
DJ
138522006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * Makefile.in (clean): Remove reg-mips64.c.
13855 (reg-mips64.c, reg-mips64.o): New rules.
13856 * configure.srv: Handle mips64. Include regset support for mips.
13857 * linux-mips-low.c (union mips_register): New.
13858 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13859 (mips_breakpoint, mips_breakpoint_at): Use int.
13860 (mips_collect_register, mips_supply_register)
13861 (mips_collect_register_32bit, mips_supply_register_32bit)
13862 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13863 (mips_store_fpregset, target_regsets): New.
13864 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13865
a13e2c95
UW
138662006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13867
13868 * configure.srv: Add target "spu*-*-*".
13869 * Makefile.in (clean): Remove reg-spu.c.
13870 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13871 * spu-low.c: New file.
13872
cb7283db
DJ
138732006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13874
13875 * configure.ac: Correct td_thr_tls_get_addr test.
13876 * configure: Regenerated.
13877
89be2091
DJ
138782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13879
13880 * linux-low.c (linux_wait_for_event): Reformat. Use the
13881 pass_signals array.
13882 * remote-utils.c (decode_address_to_semicolon): New.
13883 * server.c (pass_signals, handle_general_set): New.
13884 (handle_query): Mention QPassSignals for qSupported.
13885 (main): Call handle_general_set.
13886 * server.h (pass_signals, decode_address_to_semicolon): New.
13887
000ef4f0
DJ
138882006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13889
13890 * server.c (handle_query): Correct error handling for read_auxv.
13891
b7149293
UW
138922005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13893
13894 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13895 and srv_linux_thread_db to yes.
13896 * linux-s390-low.c (s390_fill_gregset): New function.
13897 (target_regsets): Define data structure.
13898
dae5f5cf
DJ
138992006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13900
13901 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13902 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13903 * config.in, configure: Regenerated.
13904 * inferiors.c (gdb_id_to_thread): New function.
13905 (gdb_id_to_thread_id): Use it.
13906 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13907 * linux-low.h (struct process_info): Add th member.
13908 (thread_db_get_tls_address): New prototype.
13909 * remote-utils.c (decode_address): Make non-static.
13910 * server.c (handle_query): Handle qGetTLSAddr.
13911 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13912 * target.h (struct target_ops): Add get_tls_address.
13913 * thread-db.c (maybe_attach_thread): Save the thread handle.
13914 (thread_db_get_tls_address): New.
13915
32ca6d61
DJ
139162006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13919 (linux_resume_one_process): Take a siginfo_t *. Update all
13920 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13921 (struct pending_signals): Add a siginfo_t.
13922 (linux_wait_for_process): Always set last_status.
13923 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13924 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13925 * linux-low.h (struct process_info): Add last_status.
13926
5ffff7c1
DJ
139272006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * remote-utils.c (try_rle): New function.
13930 (putpkt_binary): Use it.
13931
8695c747
DJ
139322006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13935 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13936 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13937 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13938 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13939 point registers.
13940
290fadea
RS
139412006-08-08 Richard Sandiford <richard@codesourcery.com>
13942
13943 * server.c (terminal_fd): New variable.
13944 (old_foreground_pgrp): Likewise.
13945 (restore_old_foreground_pgrp): New function.
13946 (start_inferior): Record the terminal file descriptor in terminal_fd
13947 and its original foreground group in old_foreground_pgrp. Register
13948 restore_old_foreground_pgrp with atexit().
13949
9f2e1e63
DJ
139502006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13951
13952 * server.c (handle_query): Correct qPart to qXfer.
13953
b80864fb
DJ
139542006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13955
13956 * configure.ac: Check for more headers which are missing on
13957 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13958 * configure.srv: Add Cygwin and mingw32.
13959 * remote-utils.c: Don't include headers unconditionally which
13960 are missing on mingw32. Include <winsock.h> for mingw32.
13961 (remote_open): Adjust for mingw32 support. Flush
13962 standard error after writing to it.
13963 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13964 (unblock_async_io, enable_async_io, disable_async_io)
13965 (readchar, getpkt): Update for Winsock support.
13966 (prepare_resume_reply): Expect a protocol signal number.
13967 * server.c: Disable <sys/wait.h> on mingw32.
13968 (start_inferior): Adjust for mingw32 support. Flush
13969 standard error after writing to it.
13970 (attach_inferior): Likewise. Use protocol signal
13971 numbers.
13972 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13973 and names.
13974 * win32-i386-low.c: New file.
13975 * Makefile.in (XM_CLIBS): Set.
13976 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13977 (win32-i386-low.o): New dependency rule.
13978 * linux-low.c (linux_wait): Use target signal numbers.
13979 * target.h (struct target_ops): Doc fix.
13980 * server.h (target_signal_to_name): New prototype.
13981 * gdbreplay.c: Don't include headers unconditionally which
13982 are missing on mingw32. Include <winsock.h> for mingw32.
13983 (remote_close, remote_open): Adjust for Winsock support.
13984 * configure, config.in: Regenerated.
13985
0876f84a
DJ
139862006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13987
13988 * server.c (decode_xfer_read, write_qxfer_response): New.
13989 (handle_query): Take a packet length argument. Handle
13990 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13991 the qSupported response.
13992 (main): Update call to handle_query.
13993
01f9e8fa
DJ
139942006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13995
13996 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13997 (putpkt_binary): Renamed from putpkt and adjusted for binary
13998 data.
13999 (putpkt): New wrapper for putpkt_binary.
14000 (readchar): Don't mask off the high bit.
14001 (decode_X_packet): New function.
14002 * server.c (main): Call putpkt_binary if a handler sets the packet
14003 length. Save the length of the incoming packet. Handle 'X'.
14004 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14005
be2a5f71
DJ
140062006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14007
14008 * server.c (handle_query): Handle qSupported.
14009
ea025f5f
DJ
140102006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14011
14012 * remote-utils.c (all_symbols_looked_up): New variable.
14013 (look_up_one_symbol): Check it.
14014 * server.h (look_up_one_symbol): New declaration.
14015 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14016
9308fc88
DJ
140172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14018
14019 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14020 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14021 (PTRACE_GET_THREAD_AREA): Define.
14022 (ps_get_thread_area): New function.
14023
52fb6437
NS
140242006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14025
14026 * configure.srv (m68k*-*-uclinux*): New target.
14027 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14028 (linux_resume_one_process): Remove extraneous cast.
14029 (linux_read_offsets): New.
14030 (linux_target_op): Add linux_read_offsets on mmuless systems.
14031 * server.c (handle_query): Add qOffsets logic.
14032 * target.h (struct target_ops): Add read_offsets.
14033
21b0f40c
DJ
140342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14035
14036 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14037 (PTRACE_GET_THREAD_AREA): Define.
14038 (ps_get_thread_area): New function.
14039 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14040 (linux-x86-64-low.o): Update.
14041
0050a760
DJ
140422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * configure.ac: Remove checks for prfpregset_t.
14045 * gdb_proc_service.h: New file.
14046 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14047 new "gdb_proc_service.h".
14048 * proc-service.c: Likewise.
14049 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14050 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14051 * Makefile.in (gdb_proc_service_h): Updated.
14052 * configure, config.in: Regenerated.
14053
b92a518e
DJ
140542006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14055
14056 * remote-utils.c (prepare_resume_reply): Move declaration
14057 of gdb_id_from_wait to the top of the block.
14058
545587ee
DJ
140592006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14060
14061 * linux-low.c (regsets_store_inferior_registers): Read the regset
14062 from the target before filling it.
14063
9db87ebd
DJ
140642006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14065
14066 * server.c (attach_inferior): Return SIGTRAP for a successful
14067 attach.
14068
dd24457d
DJ
140692006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14070
14071 * Makefile.in (OBS): Add version.o.
14072 (STAGESTUFF): Delete.
14073 (version.o): Add dependencies.
14074 (version.c): Replace rule.
14075 (clean): Remove version.c.
14076 * server.c (gdbserver_version): New.
14077 (gdbserver_usage): Use printf.
14078 (main): Handle --version and --help.
14079 * server.h (version, host_name): Add declarations.
14080
6f0f660e
EZ
140812005-12-23 Eli Zaretskii <eliz@gnu.org>
14082
889bf7c5
PA
14083 * linux-arm-low.c:
14084 * linux-arm-low.c:
14085 * inferiors.c:
14086 * i387-fp.h:
14087 * i387-fp.c:
14088 * gdbreplay.c:
14089 * regcache.c:
14090 * proc-service.c:
14091 * mem-break.h:
14092 * mem-break.c:
14093 * linux-x86-64-low.c:
14094 * linux-sh-low.c:
14095 * linux-s390-low.c:
14096 * linux-ppc64-low.c:
14097 * linux-ppc-low.c:
14098 * linux-mips-low.c:
14099 * linux-m68k-low.c:
14100 * linux-m32r-low.c:
14101 * linux-low.h:
14102 * linux-low.c:
14103 * linux-ia64-low.c:
14104 * linux-i386-low.c:
14105 * linux-crisv32-low.c:
14106 * thread-db.c:
14107 * terminal.h:
14108 * target.h:
14109 * target.c:
14110 * server.h:
14111 * server.c:
14112 * remote-utils.c:
14113 * regcache.h:
14114 * utils.c:
14115 * Makefile.in:
14116 * configure.ac:
6f0f660e
EZ
14117 * gdbserver.1: Add (C) after Copyright. Update the FSF
14118 address.
14119
9d1fb177
DJ
141202005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14121
14122 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14123 (arm_breakpoint_at): Recognize both breakpoints.
14124 (the_low_target): Use the correct breakpoint instruction.
14125
011a70c2
DJ
141262005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14127
14128 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14129 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14130 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14131 (the_low_target): Update.
14132
7fb85e41
AS
141332005-10-25 Andreas Schwab <schwab@suse.de>
14134
14135 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14136
14137 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14138 (ia64_num_regs): Reduce to 462.
14139
3db0444b
DJ
141402005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14141
14142 * acinclude.m4: Correct quoting.
14143 * aclocal.m4: Regenerated.
14144
14145 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14146 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14147 (thread_db_init): Call thread_db_err_str.
14148 * configure.ac: Check for TD_VERSION.
14149 * config.in, configure: Regenerated.
14150
bee0189a
DJ
141512005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14152
14153 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14154
e9d25b98
DJ
141552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14156
14157 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14158 is not available. Define HAVE_PTRACE_GETREGS if it is.
14159 * config.in, configure: Regenerated.
14160 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14161 * linux-i386-low.c, linux-m68k-low.c: Update to use
14162 HAVE_PTRACE_GETREGS.
14163 * linux-low.c (regsets_fetch_inferior_registers)
14164 (regsets_store_inferior_registers): Only return 0 if we processed
14165 GENERAL_REGS.
14166 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14167 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14168
a06660f7
DJ
141692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14170
14171 * inferiors.c (struct thread_info): Add gdb_id.
14172 (add_thread): Add gdb_id argument.
14173 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14174 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14175 calls to add_thread.
14176 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14177 * server.c (handle_query): Use thread_to_gdb_id.
14178 (handle_v_cont, main): Use gdb_id_to_thread_id.
14179 * server.h (add_thread): Update prototype.
14180 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14181 prototypes.
14182
5a1f5858
DJ
141832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14186 left-padded registers.
14187 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14188 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14189
e122f1f5
SE
141902005-07-01 Steve Ellcey <sje@cup.hp.com>
14191
14192 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14193 * configure: Regenerate.
14194 * config.in: Regenerate.
14195 * server.h (NEED_DECLARATION_STRERROR):
14196 Replace with !HAVE_DECL_STRERROR.
14197
d592fa2f
DJ
141982005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14199
14200 * linux-low.c (linux_wait, linux_send_signal): Don't test
14201 an unsigned long variable for > 0 if it could be MAX_ULONG.
14202 * server.c (myresume): Likewise.
14203 * target.c (set_desired_inferior): Likewise.
14204
ccbd4912
MK
142052005-06-13 Mark Kettenis <kettenis@gnu.org>
14206
14207 * configure.ac: Simplify and improve check for socklen_t.
14208 * configure, config.in: Regenerate.
14209
f450004a
DJ
142102005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14211
14212 * acconfig.h: Remove.
14213 * configure.ac: Add a test for socklen_t. Use three-argument
14214 AC_DEFINE throughout.
14215 * config.in: Regenerated using autoheader 2.59.
14216 * configure: Regenerated.
14217
14218 * gdbreplay.c (socklen_t): Provide a default.
14219 (remote_open): Use socklen_t.
14220 * remote-utils.c (socklen_t): Provide a default.
14221 (remote_open): Use socklen_t.
14222 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14223 unsigned char.
14224
14225 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14226 char for buffers.
14227 * linux-low.c (linux_read_memory, linux_write_memory)
14228 (linux_read_auxv): Likewise.
14229 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14230 (check_mem_write): Likewise.
14231 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14232 Likewise.
14233 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14234 (registers_from_string, register_data): Likewise.
14235 * server.c (handle_query, main): Likewise.
14236 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14237 (decode_M_packet): Likewise.
14238 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14239 * target.h (struct target_ops): Update read_memory, write_memory,
14240 and read_auxv.
14241 (read_inferior_memory, write_inferior_memory): Update.
14242 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14243 to unsigned char *.
14244 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14245 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14246 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14247 linux-s390-low.c, linux-sh-low.c: Update for changes in
14248 read_inferior_memory and the_low_target->breakpoint.
14249
eee84df1
DJ
142502005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14253 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14254 * configure.srv: Add powerpc64-*-linux*.
14255 * linux-ppc64-low.c: New file.
14256
45b134e5
OF
142572005-05-23 Orjan Friberg <orjanf@axis.com>
14258
14259 * linux-cris-low.c: New file with support for CRIS.
14260 * linux-crisv32-low.c: Ditto for CRISv32.
14261 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14262 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14263 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14264 reg-crisv32.o, and reg-crisv32.c to make rules.
14265 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14266 recognized targets.
14267
48d93c75
UW
142682005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14269
14270 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14271 of sizeof (PTRACE_XFER_TYPE).
14272 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14273
e013ee27
OF
142742005-05-12 Orjan Friberg <orjanf@axis.com>
14275
889bf7c5 14276 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14277 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14278 pointers for hardware watchpoint support.
14279 * linux-low.h (struct linux_target_ops): Ditto.
14280 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14281 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14282 to linux_target_ops.
14283 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14284 reply packet.
14285 * server.c (main): Recognize 'Z' and 'z' packets.
14286
b0ded00b
UW
142872005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14288
14289 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14290 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14291 (the_low_target): Add new members.
14292
8643e2ad
DJ
142932005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14294
14295 * proc-service.c (ps_lgetregs): Search all_processes instead of
14296 all_threads.
14297
fc620387
DJ
142982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14299
14300 * server.c (start_inferior): Change return type to int.
14301 (attach_inferior): Change sigptr to int *.
14302 (handle_v_cont, handle_v_requests): Change signal to int *.
14303 (main): Change signal to int.
14304
143052005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14306
14307 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14308 * configure.srv: Add m32r*-*-linux*.
14309 * linux-m32r-low.c: New file.
14310
e0e76420
DJ
143112005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14312
14313 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14314
a1928bad
DJ
143152005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14318 Take unsigned long arguments for PIDs.
14319 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14320 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14321 (wait_for_sigstop, linux_resume_one_process)
14322 (regsets_fetch_inferior_registers, linux_send_signal)
14323 (linux_read_auxv): Likewise. Update the types of variables holding
14324 PIDs. Update format string specifiers.
14325 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14326 * remote-utils.c (prepare_resume_reply): Likewise.
14327 * server.c (cont_thread, general_thread, step_thread)
14328 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14329 unsigned long.
14330 (handle_query): Update format specifiers.
14331 (handle_v_cont, main): Use strtoul for thread IDs.
14332 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14333 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14334 (general_thread, step_thread, thread_from_wait)
14335 (old_thread_from_wait): Update.
14336 * target.h (struct thread_resume): Use unsigned long for THREAD.
14337 (struct target_ops): Use unsigned long for arguments to attach and
14338 thread_alive.
14339
dcdb98d2
DJ
143402005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14341
14342 * acinclude.m4: Include bfd/bfd.m4 directly.
14343 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14344 <agriffis@toolchain.org>.
14345 * aclocal.m4, configure: Regenerated.
14346
bec39cab
AC
143472005-01-07 Andrew Cagney <cagney@gnu.org>
14348
14349 * configure.ac: Rename configure.in, require autoconf 2.59.
14350 * configure: Re-generate.
14351
434c4c77
DJ
143522004-12-08 Daniel Jacobowitz <dan@debian.org>
14353
14354 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14355 LIBS when finished.
14356 * aclocal.m4: Regenerated.
14357 * configure: Regenerated.
14358
db1d3e1b
AS
143592004-11-21 Andreas Schwab <schwab@suse.de>
14360
14361 * linux-m68k-low.c (m68k_num_gregs): Define.
14362 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14363 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14364 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14365 (m68k_breakpoint_at): New. Add to the_low_target.
14366
14367 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14368 srv_linux_thread_db to yes.
14369
43360365
JB
143702004-10-20 Joel Brobecker <brobecker@gnat.com>
14371
14372 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14373 (ARCH_SET_FS): Likewise.
14374 (ARCH_GET_FS): Likewise.
14375 (ARCH_GET_GS): Likewise.
14376
fd500816
DJ
143772004-10-16 Daniel Jacobowitz <dan@debian.org>
14378
14379 * linux-i386-low.c (ps_get_thread_area): New.
14380 * linux-x86-64-low.c (ps_get_thread_area): New.
14381 * linux-low.c: Include <sys/syscall.h>.
14382 (linux_kill_one_process): Don't kill the first thread here.
14383 (linux_kill): Kill the first thread here.
14384 (kill_lwp): New function.
14385 (send_sigstop, linux_send_signal): Use it.
14386 * proc-service.c: Clean up #ifdefs.
14387 (fpregset_info): Delete.
14388 (ps_lgetregs): Update and enable implementation.
14389 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14390 implementations.
14391 * remote-utils.c (struct sym_cache, symbol_cache): New.
14392 (input_interrupt): Print a clearer message.
14393 (async_io_enabled): New variable.
14394 (enable_async_io, disable_async_io): Use it. Update comments.
14395 (look_up_one_symbol): Use the symbol cache.
14396 * thread-db.c (thread_db_look_up_symbols): New function.
14397 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14398
f6de3c42
DJ
143992004-10-16 Daniel Jacobowitz <dan@debian.org>
14400
14401 * configure.in: Test for -rdynamic.
14402 * configure: Regenerated.
14403 * Makefile (INTERNAL_LDFLAGS): New.
14404 (gdbserver, gdbreplay): Use it.
14405
2c0fc042
AC
144062004-09-02 Andrew Cagney <cagney@gnu.org>
14407
14408 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14409
075b3282
DJ
144102004-03-23 Daniel Jacobowitz <drow@mvista.com>
14411
14412 * linux-low.c (linux_wait): Clear all_processes list also.
14413
fa6a77dc
DJ
144142004-03-12 Daniel Jacobowitz <drow@mvista.com>
14415
14416 * linux-low.c: Include <errno.h>. Remove extern declaration of
14417 errno.
14418
6d782a97
DJ
144192004-03-12 Daniel Jacobowitz <drow@mvista.com>
14420
14421 * gdbreplay.c, server.h, utils.c: Update copyright years.
14422
3a7fb99b
DJ
144232004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14424
14425 * server.c (main): Print child status or termination signal from
14426 variable 'signal', not 'sig'.
14427
c3e735a6
DJ
144282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14429
14430 * linux-low.c (linux_read_memory): Change return type to
14431 int. Check for and return error from ptrace().
14432 * target.c (read_inferior_memory): Change return type to int. Pass
14433 back return status from the_target->read_memory().
14434 * target.h (struct target_ops): Adapt *read_memory() prototype.
14435 Update comment.
14436 (read_inferior_memory): Adapt prototype.
14437 * server.c (main): Return an error packet if
14438 read_inferior_memory() returns an error.
14439
a59d1c82
DJ
144402004-03-04 Daniel Jacobowitz <drow@mvista.com>
14441
14442 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14443 Unify with other clean targets.
14444
dc3f8883
DJ
144452004-02-29 Daniel Jacobowitz <drow@mvista.com>
14446
14447 * server.c (handle_v_cont): Call set_desired_inferior.
14448
89a208da
DJ
144492004-02-29 Daniel Jacobowitz <drow@mvista.com>
14450
14451 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14452
62ea82f5
DJ
144532004-02-29 Daniel Jacobowitz <drow@mvista.com>
14454
14455 * linux-low.c (linux_wait): Unblock async I/O.
14456 (linux_resume): Block and enable async I/O.
14457 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14458 * server.h (block_async_io, unblock_async_io): Add prototypes.
14459
6910d122
DJ
144602004-02-29 Daniel Jacobowitz <drow@mvista.com>
14461
14462 * remote-utils.c (remote_open): Print a status notice after
14463 opening a TCP port.
14464 * server.c (attach_inferior): Print a status notice after
14465 attaching.
14466
144672004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14468
14469 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14470
c89dc5d4
DJ
144712004-02-26 Daniel Jacobowitz <drow@mvista.com>
14472
14473 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14474 error packet.
14475 * server.c, target.h: Update copyright years.
14476
4b8dad4a
RM
144772004-02-25 Roland McGrath <roland@redhat.com>
14478
14479 * target.h (struct target_ops): New member `read_auxv'.
14480 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14481 * linux-low.c (linux_read_auxv): New function.
14482 (linux_target_ops): Initialize `read_auxv' member to that.
14483
d7446758
JB
144842004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14485
14486 Committed by Jim Blandy <jimb@redhat.com>.
14487
14488 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14489 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14490 instead of GPR_SIZE to distiguish s390 and s390x targets.
14491
5544ad89
DJ
144922004-01-31 Daniel Jacobowitz <drow@mvista.com>
14493
14494 * linux-low.c: Update copyright year.
14495 (check_removed_breakpoint): Clear pending_is_breakpoint.
14496 (linux_set_resume_request, linux_queue_one_thread)
14497 (resume_status_pending_p): New functions.
14498 (linux_continue_one_thread): Use process->resume.
14499 (linux_resume): Only resume threads if there are no pending events.
14500 * linux-low.h (struct process_info): Add resume request
14501 pointer.
14502
2a68b70e
DJ
145032004-01-30 Daniel Jacobowitz <drow@mvista.com>
14504
14505 * regcache.c (new_register_cache): Clear the allocated register
14506 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14507
64386c31
DJ
145082003-10-13 Daniel Jacobowitz <drow@mvista.com>
14509
14510 * linux-low.c (linux_resume): Take a struct thread_resume *
14511 argument.
14512 (linux_wait): Update call.
14513 (resume_ptr): New static variable.
14514 (linux_continue_one_thread): Renamed from
14515 linux_continue_one_process. Use resume_ptr.
14516 (linux_resume): Use linux_continue_one_thread.
14517 * server.c (handle_v_cont, handle_v_requests): New functions.
14518 (myresume): New function.
14519 (main): Handle 'v' case.
14520 * target.h (struct thread_resume): New type.
14521 (struct target_ops): Change argument of "resume" to struct
14522 thread_resume *.
14523 (myresume): Delete macro.
14524
c938e9b0
L
145252003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14526
14527 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14528 (uninstall): Support DESTDIR.
14529
7f313d07
BC
14530Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14531
14532 * configure.srv: Add xscale*linux copy of arm*linux entry.
14533
3b2fc2ea
DJ
145342003-07-24 Daniel Jacobowitz <drow@mvista.com>
14535
14536 * linux-arm-low.c (arm_reinsert_addr): New function.
14537 (the_low_target): Add arm_reinsert_addr.
14538
1c0a559e
MK
145392003-07-08 Mark Kettenis <kettenis@gnu.org>
14540
14541 * mem-break.c: Remove whitespace at end of file.
14542
43d5792c
DJ
145432003-06-28 Daniel Jacobowitz <drow@mvista.com>
14544
14545 * configure.in: Check whether we need to prototype strerror.
14546 * server.h: Optionally prototype strerror.
14547 * gdbreplay.c (perror_with_name): Use strerror.
14548 * linux-low.c (linux_attach_lwp): Use strerror.
14549 * utils.c (perror_with_name): Use strerror.
14550 * config.in, configure: Regenerated.
14551
c8a86edf
DJ
145522003-06-28 Daniel Jacobowitz <drow@mvista.com>
14553
14554 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14555 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14556
73d37363
DJ
145572003-06-20 Daniel Jacobowitz <drow@mvista.com>
14558
14559 * Makefile.in (SFILES): Update.
14560 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14561 low-sun3.c: Remove files.
14562
6ad8ae5c
DJ
145632003-06-17 Daniel Jacobowitz <drow@mvista.com>
14564
14565 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14566 (linux_detach_one_process, linux_detach): New functions.
14567 (linux_target_ops): Add linux_detach.
14568 * server.c (main): Handle 'D' packet.
14569 * target.h (struct target_ops): Add "detach" member.
14570 (detach_inferior): Define.
14571
1581182a
MK
145722003-06-13 Mark Kettenis <kettenis@gnu.org>
14573
14574 From Kelley Cook <kelleycook@wideopenwest.com>:
14575 * configure.srv: Accept i[34567]86 variants.
14576
e5379b03
DJ
145772003-06-05 Daniel Jacobowitz <drow@mvista.com>
14578
14579 * linux-low.c (linux_wait_for_event): Correct comment typos.
14580 (linux_resume_one_process): Call check_removed_breakpoint.
14581 (linux_send_signal): New function.
14582 (linux_target_ops): Add linux_send_signal.
14583 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14584 of kill.
14585 * target.h (struct target_ops): Add send_signal.
14586
2ff29de4
JB
145872003-05-29 Jim Blandy <jimb@redhat.com>
14588
14589 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14590 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14591 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14592 away part of the register's value.
14593
254787d4
DJ
145942003-03-26 Daniel Jacobowitz <drow@mvista.com>
14595
14596 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14597 (linux_wait_for_event, linux_init_signals): Likewise.
14598
94e10508
DJ
145992003-03-17 Daniel Jacobowitz <drow@mvista.com>
14600
14601 * configure.in: Check for stdlib.h.
14602 * configure: Regenerated.
14603 * config.in: Regenerated.
14604
4c0711e0
DJ
146052003-01-04 Andreas Schwab <schwab@suse.de>
14606
14607 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14608
ef66e766
AC
146092003-01-02 Andrew Cagney <ac131313@redhat.com>
14610
14611 * Makefile.in: Remove obsolete code.
14612
a1358604
DJ
146132002-11-20 Daniel Jacobowitz <drow@mvista.com>
14614
14615 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14616 defined(PT_FPR0_HI).
14617
23ce3b1c
DJ
146182002-11-17 Stuart Hughes <seh@zee2.com>
14619
14620 * linux-arm-low.c (arm_num_regs): Increase.
14621 (arm_regmap): Include status register.
14622
146232002-11-17 Daniel Jacobowitz <drow@mvista.com>
14624
14625 * linux-low.c (register_addr): Remove incorrect -1 check.
14626
a9fa9f7d
DJ
146272002-08-29 Daniel Jacobowitz <drow@mvista.com>
14628
14629 * linux-low.c (linux_create_inferior): Call setpgid. Return
14630 the new PID.
14631 (unstopped_p, linux_signal_pid): Remove.
14632 (linux_target_ops): Remove linux_signal_pid.
14633 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14634 global instead of target method.
14635 * target.h (struct target_ops): Remove signal_pid. Update comment
14636 for create_inferior.
14637 * server.c (signal_pid): New variable.
14638 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14639 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14640 (attach_inferior): Set signal_pid.
14641
17574093
DJ
146422002-08-23 Daniel Jacobowitz <drow@mvista.com>
14643
14644 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14645
146462002-08-20 Jim Blandy <jimb@redhat.com>
14647
14648 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14649 default for this.
14650
146512002-08-01 Andrew Cagney <cagney@redhat.com>
14652
14653 * Makefile.in: Make chill references obsolete.
14654
146552002-07-24 Kevin Buettner <kevinb@redhat.com>
14656
14657 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14658 * configure: Regenerate.
14659 * config.in: Regenerate.
14660
146612002-07-09 David O'Brien <obrien@FreeBSD.org>
14662
14663 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14664 (perror_with_name, remote_close, remote_open, expect, play): Static.
14665
146662002-07-04 Michal Ludvig <mludvig@suse.cz>
14667
4b8dad4a 14668 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14669 byte offsets instead of an array of indexes.
14670 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14671
146722002-06-13 Daniel Jacobowitz <drow@mvista.com>
14673
14674 * regcache.c: Add comment.
14675
146762002-06-11 Daniel Jacobowitz <drow@mvista.com>
14677
14678 * thread-db.c: New file.
14679 * proc-service.c: New file.
14680 * acinclude.m4: New file.
14681 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14682 proc-service.o, and thread-db.o.
14683 (linux-low.o): Add USE_THREAD_DB.
14684 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14685 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14686 * aclocal.m4: Regenerated.
14687 * config.in: Regenerated.
14688 * configure: Regenerated.
14689 * configure.in: Check for proc_service.h, sys/procfs.h,
14690 thread_db.h, and linux/elf.h headrs.
14691 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14692 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14693 Check for -lthread_db and thread support.
14694 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14695 PowerPC, and SuperH.
14696 * i387-fp.c: Constify arguments.
14697 * i387-fp.h: Likewise.
14698 * inferiors.c: (struct thread_info): Renamed from
14699 `struct inferior_info'. Remove PID member. Use generic inferior
14700 list header. All uses updated.
14701 (inferiors, signal_pid): Removed.
14702 (all_threads): New variable.
14703 (get_thread): Define.
14704 (add_inferior_to_list): New function.
14705 (for_each_inferior): New function.
14706 (change_inferior_id): New function.
14707 (add_inferior): Removed.
14708 (remove_inferior): New function.
14709 (add_thread): New function.
14710 (free_one_thread): New function.
14711 (remove_thread): New function.
14712 (clear_inferiors): Use for_each_inferior and free_one_thread.
14713 (find_inferior): New function.
14714 (find_inferior_id): New function.
14715 (inferior_target_data): Update argument type.
14716 (set_inferior_target_data): Likewise.
14717 (inferior_regcache_data): Likewise.
14718 (set_inferior_regcache_data): Likewise.
14719 * linux-low.c (linux_bp_reinsert): Remove.
14720 (all_processes, stopping_threads, using_thrads)
14721 (struct pending_signals, debug_threads, pid_of): New.
14722 (inferior_pid): Replace with macro.
14723 (struct inferior_linux_data): Remove.
14724 (get_stop_pc, add_process): New functions.
14725 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14726 Use add_process and add_thread.
14727 (linux_attach_lwp): New function, based on old linux_attach. Use
14728 add_process and add_thread. Set stop_expected for new threads.
14729 (linux_attach): New function.
14730 (linux_kill_one_process): New function.
14731 (linux_kill): Kill all LWPs.
14732 (linux_thread_alive): Use find_inferior_id.
14733 (check_removed_breakpoints, status_pending_p): New functions.
14734 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14735 Update. Use WNOHANG. Wait for cloned processes also. Update process
14736 struct for the found process.
14737 (linux_wait_for_event): New function.
14738 (linux_wait): Use it. Support LWPs.
14739 (send_sigstop, wait_for_sigstop, stop_all_processes)
14740 (linux_resume_one_process, linux_continue_one_process): New functions.
14741 (linux_resume): Support LWPs.
14742 (REGISTER_RAW_SIZE): Remove.
14743 (fetch_register): Use register_size instead. Call supply_register.
14744 (usr_store_inferior_registers): Likewise. Call collect_register.
14745 Fix recursive case.
14746 (regsets_fetch_inferior_registers): Improve error message.
14747 (regsets_store_inferior_registers): Add debugging.
14748 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14749 (unstopped_p, linux_signal_pid): New functions.
14750 (linux_target_ops): Add linux_signal_pid.
14751 (linux_init_signals): New function.
14752 (initialize_low): Call it. Initialize using_threads.
14753 * regcache.c (inferior_regcache_data): Add valid
14754 flag.
14755 (get_regcache): Fetch registers lazily. Add fetch argument
14756 and update all callers.
14757 (regcache_invalidate_one, regcache_invalidate): New
14758 functions.
14759 (new_register_cache): Renamed from create_register_cache.
14760 Return the new regcache.
14761 (free_register_cache): Change argument to a void *.
14762 (registers_to_string, registers_from_string): Call get_regcache
14763 with fetch flag set.
14764 (register_data): Make static. Pass fetch flag to get_regcache.
14765 (supply_register): Call get_regcache with fetch flag clear.
14766 (collect_register): Call get_regcache with fetch flag set.
14767 (collect_register_as_string): New function.
14768 * regcache.h: Update.
14769 * remote-utils.c (putpkt): Flush after debug output and use
14770 stderr.
14771 Handle input interrupts while waiting for an ACK.
14772 (input_interrupt): Use signal_pid method.
14773 (getpkt): Flush after debug output and use stderr.
14774 (outreg): Use collect_register_as_string.
14775 (new_thread_notify, dead_thread_notify): New functions.
14776 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14777 and general_thread.
14778 (look_up_one_symbol): Flush after debug output.
14779 * server.c (step_thread, server_waiting): New variables.
14780 (start_inferior): Don't use signal_pid. Update call to mywait.
14781 (attach_inferior): Update call to mywait.
14782 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14783 (main): Don't fetch/store registers explicitly. Use
14784 set_desired_inferior. Support proposed ``Hs'' packet. Update
14785 calls to mywait.
14786 * server.h: Update.
14787 (struct inferior_list, struct_inferior_list_entry): New.
14788 * target.c (set_desired_inferior): New.
14789 (write_inferior_memory): Constify.
14790 (mywait): New function.
14791 * target.h: Update.
14792 (struct target_ops): New signal_pid method.
14793 (mywait): Removed macro, added prototype.
14794
14795 * linux-low.h (regset_func): Removed.
14796 (regset_fill_func, regset_store_func): New.
14797 (enum regset_type): New.
14798 (struct regset_info): Add type field. Use new operation types.
14799 (struct linux_target_ops): stop_pc renamed to get_pc.
14800 Add decr_pc_after_break and breakpoint_at.
14801 (get_process, get_thread_proess, get_process_thread)
14802 (strut process_info, all_processes, linux_attach_lwp)
14803 (thread_db_init): New.
14804
14805 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14806 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14807 (the_low_target): Add new members.
14808 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14809 (i386_store_fpxregset): Constify.
14810 (target_regsets): Add new kind identifier.
14811 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14812 (i386_set_pc): Add debugging.
14813 (i386_breakpoint_at): New function.
14814 (the_low_target): Add new members.
14815 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14816 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14817 (mips_breakpoint_at): New.
14818 (the_low_target): Add new members.
14819 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14820 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14821 (the_low_target): Add new members.
14822 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14823 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14824 (the_low_target): Add new members.
14825 * linux-x86-64-low.c (target_regsets): Add new kind
14826 identifier.
14827
148282002-05-15 Daniel Jacobowitz <drow@mvista.com>
14829
14830 From Martin Pool <mbp@samba.org>:
14831 * server.c (gdbserver_usage): New function.
14832 (main): Call it.
14833
148342002-05-14 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14837 stop_at -> stop_pc.
14838
148392002-05-04 Andrew Cagney <ac131313@redhat.com>
14840
14841 * Makefile.in: Remove obsolete code.
14842
148432002-04-24 Michal Ludvig <mludvig@suse.cz>
14844
14845 * linux-low.c (regsets_fetch_inferior_registers),
14846 (regsets_store_inferior_registers): Removed cast to int from
14847 ptrace() calls.
14848 * regcache.h: Added declaration of struct inferior_info.
14849
148502002-04-20 Daniel Jacobowitz <drow@mvista.com>
14851
14852 * inferiors.c (struct inferior_info): Add regcache_data.
14853 (add_inferior): Call create_register_cache.
14854 (clear_inferiors): Call free_register_cache.
14855 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14856 * regcache.c (struct inferior_regcache_data): New.
14857 (registers): Remove.
14858 (get_regcache): New function.
14859 (create_register_cache, free_register_cache): New functions.
14860 (set_register_cache): Don't initialize the register cache here.
14861 (registers_to_string, registers_from_string, register_data): Call
14862 get_regcache.
14863 * regcache.h: Add prototypes.
14864 * server.h: Likewise.
14865
148662002-04-20 Daniel Jacobowitz <drow@mvista.com>
14867
14868 * mem-break.c: New file.
14869 * mem-break.h: New file.
14870 * Makefile.in: Add mem-break.o rule; update server.h
14871 dependencies.
14872 * inferiors.c (struct inferior_info): Add target_data
14873 member.
14874 (clear_inferiors): Free target_data member if set.
14875 (inferior_target_data, set_inferior_target_data): New functions.
14876 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14877 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14878 * linux-low.c (linux_bp_reinsert): New variable.
14879 (struct inferior_linux_data): New.
14880 (linux_create_inferior): Use set_inferior_target_data.
14881 (linux_attach): Likewise. Call add_inferior.
14882 (linux_wait_for_one_inferior): New function.
14883 (linux_wait): Call it.
14884 (linux_write_memory): Add const.
14885 (initialize_low): Call set_breakpoint_data.
14886 * linux-low.h (struct linux_target_ops): Add breakpoint
14887 handling members.
14888 * server.c (attach_inferior): Remove extra add_inferior
14889 call.
14890 * server.h: Include mem-break.h. Update inferior.c
14891 prototypes.
14892 * target.c (read_inferior_memory)
14893 (write_inferior_memory): New functions.
14894 * target.h (read_inferior_memory)
14895 (write_inferior_memory): Change macros to prototypes.
14896 (struct target_ops): Update comments. Add const to write_memory
14897 definition.
14898
148992002-04-11 Daniel Jacobowitz <drow@mvista.com>
14900
14901 * linux-low.c (usr_store_inferior_registers): Support
14902 registers which are allowed to fail to store.
14903 * linux-low.h (linux_target_ops): Likewise.
14904 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14905 (ppc_cannot_store_register): FPSCR may not be storable.
14906
149072002-04-09 Daniel Jacobowitz <drow@mvista.com>
14908
14909 * server.h: Include <string.h> if HAVE_STRING_H.
14910 * ChangeLog: Correct paths in last ChangeLog entry.
14911
149122002-04-09 Daniel Jacobowitz <drow@mvista.com>
14913
14914 * linux-low.h: Remove obsolete prototypes.
14915 (struct linux_target_ops): New.
14916 (extern the_low_target): New.
14917 * linux-low.c (num_regs, regmap): Remove declarations.
14918 (register_addr): Use the_low_target explicitly.
14919 (fetch_register): Likewise.
14920 (usr_fetch_inferior_registers): Likewise.
14921 (usr_store_inferior_registers): Likewise.
14922 * linux-arm-low.c (num_regs): Remove.
14923 (arm_num_regs): Define.
14924 (arm_regmap): Renamed from regmap, made static.
14925 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14926 made static.
14927 (arm_cannot_store_register): Renamed from cannot_store_register,
14928 made static.
14929 (the_low_target): New.
14930 * linux-i386-low.c (num_regs): Remove.
14931 (i386_num_regs): Define.
14932 (i386_regmap): Renamed from regmap, made static.
14933 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14934 made static.
14935 (i386_cannot_store_register): Renamed from cannot_store_register,
14936 made static.
14937 (the_low_target): New.
14938 * linux-ia64-low.c (num_regs): Remove.
14939 (ia64_num_regs): Define.
14940 (ia64_regmap): Renamed from regmap, made static.
14941 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14942 made static.
14943 (ia64_cannot_store_register): Renamed from cannot_store_register,
14944 made static.
14945 (the_low_target): New.
14946 * linux-m68k-low.c (num_regs): Remove.
14947 (m68k_num_regs): Define.
14948 (m68k_regmap): Renamed from regmap, made static.
14949 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14950 made static.
14951 (m68k_cannot_store_register): Renamed from cannot_store_register,
14952 made static.
14953 (the_low_target): New.
14954 * linux-mips-low.c (num_regs): Remove.
14955 (mips_num_regs): Define.
14956 (mips_regmap): Renamed from regmap, made static.
14957 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14958 made static.
14959 (mips_cannot_store_register): Renamed from cannot_store_register,
14960 made static.
14961 (the_low_target): New.
14962 * linux-ppc-low.c (num_regs): Remove.
14963 (ppc_num_regs): Define.
14964 (ppc_regmap): Renamed from regmap, made static.
14965 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14966 made static.
14967 (ppc_cannot_store_register): Renamed from cannot_store_register,
14968 made static.
14969 (the_low_target): New.
14970 * linux-s390-low.c (num_regs): Remove.
14971 (s390_num_regs): Define.
14972 (s390_regmap): Renamed from regmap, made static.
14973 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14974 made static.
14975 (s390_cannot_store_register): Renamed from cannot_store_register,
14976 made static.
14977 (the_low_target): New.
14978 * linux-sh-low.c (num_regs): Remove.
14979 (sh_num_regs): Define.
14980 (sh_regmap): Renamed from regmap, made static.
14981 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14982 made static.
14983 (sh_cannot_store_register): Renamed from cannot_store_register,
14984 made static.
14985 (the_low_target): New.
14986 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14987 (the_low_target): New.
14988
149892002-04-09 Daniel Jacobowitz <drow@mvista.com>
14990
14991 * Makefile.in: Add stamp-h target.
14992 * configure.in: Create stamp-h.
14993 * configure: Regenerated.
14994
149952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14996
14997 * inferiors.c: New file.
14998 * target.c: New file.
14999 * target.h: New file.
15000 * Makefile.in: Add target.o and inferiors.o. Update
15001 dependencies.
15002 * linux-low.c (inferior_pid): New static variable,
15003 moved from server.c.
15004 (linux_create_inferior): Renamed from create_inferior.
15005 Call add_inferior. Return 0 on success instead of a PID.
15006 (linux_attach): Renamed from myattach.
15007 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15008 (linux_thread_alive): Renamed from mythread_alive.
15009 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15010 child dies.
15011 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15012 (regsets_store_inferior_registers): Correct error message.
15013 Add missing ``return 0''.
15014 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15015 (linux_store_registers): Renamed from store_inferior_registers.
15016 (linux_read_memory): Renamed from read_inferior_memory.
15017 (linux_write_memory): Renamed from write_inferior_memory.
15018 (linux_target_ops): New structure.
15019 (initialize_low): Call set_target_ops ().
15020 * remote-utils.c (unhexify): New function.
15021 (hexify): New function.
15022 (input_interrupt): Send signals to ``signal_pid''.
15023 * server.c (inferior_pid): Remove.
15024 (start_inferior): Update create_inferior call.
15025 (attach_inferior): Call add_inferior.
15026 (handle_query): New function.
15027 (main): Call handle_query for `q' packets.
15028 * server.h: Include "target.h". Remove obsolete prototypes.
15029 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15030
150312002-04-09 Daniel Jacobowitz <drow@mvista.com>
15032
15033 * Makefile.in: Add WARN_CFLAGS. Update configury
15034 dependencies.
15035 * configure.in: Check for <string.h>
15036 * configure: Regenerate.
15037 * config.in: Regenerate.
15038 * gdbreplay.c: Include needed system headers.
15039 (remote_open): Remove strchr prototype.
15040 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15041 * regcache.c (supply_register): Change buf argument to const void *.
15042 (supply_register_by_name): Likewise.
15043 (collect_register): Change buf argument to void *.
15044 (collect_register_by_name): Likewise.
15045 * regcache.h: Add missing prototypes.
15046 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15047 * server.c (handle_query): New function.
15048 (attached): New static variable, moved out of main.
15049 (main): Quiet longjmp clobber warnings.
15050 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15051 * utils.c (error): Remove NORETURN.
15052 (fatal): Likewise.