]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
-Wwrite-strings: MI -info-os
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
65dd1e59
SM
12017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2
3 * Makefile.in (clean): Clear .deps.
4
8fa5b777
SM
52017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * .gitignore: Remove generated files, replace with wildcard.
8 * (clean): Replace removal of generated files with wildcard.
9 (version.c): Replace with...
10 (version-generated.c): ...this.
11 (xml-builtin.c): Replace with...
12 (xml-builtin-generated.c): ...this.
13 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
14 (%.c: *regformats*): Replace with...
15 (%-generated.c: *regformats*): ...this.
16
a12e714b
MF
172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
18
19 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
20 (xtensa_fill_gregset): Call collect_register_by_name for
21 threadptr register.
22 (xtensa_store_gregset): Call supply_register_by_name for
23 threadptr register.
24
1a09b50a
MF
252017-03-27 Max Filippov <jcmvbkbc@gmail.com>
26
27 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
28 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
29 (xtensa_store_gregset): Call supply_register for all registers in
30 a0_regnum..a0_regnum + C0_NREGS range.
31
1a01e7c6
SM
322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
33
34 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
35 (ax-ipa.o: ax.c): Remove.
36 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
37 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
38 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
39 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
40 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
41
36bc18a8
SM
422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
45 (print-utils-ipa.o: ../common/print-utils.c): Remove.
46 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
47 (errors-ipa.o: ../common/errors.c): Remove.
48 (format-ipa.o: ../common/format.c): Remove.
49 (common-utils-ipa.o: ../common/common-utils.c): Remove.
50
a8ebe3d5
SM
512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
52
53 * Makefile.in (%-ipa.o: %.c): New rule.
54 (tracepoint-ipa.o: tracepoint.c): Remove.
55 (utils-ipa.o: utils.c): Remove.
56 (remote-utils-ipa.o: remote-utils.c): Remove.
57 (regcache-ipa.o: regcache.c): Remove.
58 (i386-linux-ipa.o: i386-linux.c): Remove.
59 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
60 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
61 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
62 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
63 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
64 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
65 (amd64-linux-ipa.o: amd64-linux.c): Remove.
66 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
67 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
68 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
69 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
70 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
71 (aarch64-ipa.o: aarch64.c): Remove.
72 (s390-linux32-ipa.o: s390-linux32.c): Remove.
73 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
74 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
75 (s390-linux64-ipa.o: s390-linux64.c): Remove.
76 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
77 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
78 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
79 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
80 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
81 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
82 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
83 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
84 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
85 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
86 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
87 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
88 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
89 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
90 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
91 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
92 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
93 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
94 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
95 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
96 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
97 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
98 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
99 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
100 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
101 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
102 (tdesc-ipa.o: tdesc.c): Remove.
103 (x32-linux-ipa.o: x32-linux.c): Remove.
104 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
105 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
106
50cfacb7
SM
1072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
108
109 * Makefile.in (%.o: ../arch/%.c): New rule.
110 (arm.o: ../arch/arm.c): Remove.
111 (arm-linux.o: ../arch/arm-linux.c): Remove.
112 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
113 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
114
c5a22423
SM
1152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
116
117 * Makefile.in (%.o: ../nat/%.c): New rule.
118 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
119 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
120 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
121 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
122 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
123 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
124 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
125 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
126 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
127 (linux-personality.o: ../nat/linux-personality.c): Remove.
128 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
129 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
130 (x86-linux.o: ../nat/x86-linux.c): Remove.
131 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
132 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
133
6bda016b
SM
1342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
135
136 * Makefile.in (%.o: ../common/%.c): New rule.
137 (signals.o: ../common/signals.c): Remove.
138 (print-utils.o: ../common/print-utils.c): Remove.
139 (rsp-low.o: ../common/rsp-low.c): Remove.
140 (common-utils.o: ../common/common-utils.c): Remove.
141 (posix-strerror.o: ../common/posix-strerror.c): Remove.
142 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
143 (vec.o: ../common/vec.c): Remove.
144 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
145 (xml-utils.o: ../common/xml-utils.c): Remove.
146 (ptid.o: ../common/ptid.c): Remove.
147 (buffer.o: ../common/buffer.c): Remove.
148 (format.o: ../common/format.c): Remove.
149 (filestuff.o: ../common/filestuff.c): Remove.
150 (agent.o: ../common/agent.c): Remove.
151 (errors.o: ../common/errors.c): Remove.
152 (environ.o: ../common/environ.c): Remove.
153 (common-debug.o: ../common/common-debug.c): Remove.
154 (cleanups.o: ../common/cleanups.c): Remove.
155 (common-exceptions.o: ../common/common-exceptions.c): Remove.
156 (fileio.o: ../common/fileio.c): Remove.
157 (common-regcache.o: ../common/common-regcache.c): Remove.
158 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
159 (new-op.o: ../common/new-op.c): Remove.
160 (btrace-common.o: ../common/btrace-common.c): Remove.
161
21122961
SM
1622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
163
164 * Makefile.in (%.o: ../target/%.c): New rule.
165 (waitstatus.o: ../target/waitstatus.c): Remove.
166
c362e621
SM
1672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
168
169 * Makefile.in
170 (%.c: ../regformats/%.dat,
171 (%.c: ../regformats/arm/%.dat,
172 (%.c: ../regformats/i386/%.dat,
173 (%.c: ../regformats/rs6000/%.dat): New rules.
174 (aarch64.c): Remove.
175 (reg-arm.c): Remove.
176 (arm-with-iwmmxt.c): Remove.
177 (arm-with-vfpv2.c): Remove.
178 (arm-with-vfpv3.c): Remove.
179 (arm-with-neon.c): Remove.
180 (reg-bfin.c): Remove.
181 (reg-cris.c): Remove.
182 (reg-crisv32.c): Remove.
183 (i386.c): Remove.
184 (i386-linux.c): Remove.
185 (i386-avx.c): Remove.
186 (i386-avx-linux.c): Remove.
187 (i386-avx-avx512.c): Remove.
188 (i386-avx-avx512-linux.c): Remove.
189 (i386-mpx.c): Remove.
190 (i386-mpx-linux.c): Remove.
191 (i386-avx-mpx-avx512-pku.c): Remove.
192 (i386-avx-mpx-avx512-pku-linux.c): Remove.
193 (i386-avx-mpx.c): Remove.
194 (i386-avx-mpx-linux.c): Remove.
195 (i386-mmx.c): Remove.
196 (i386-mmx-linux.c): Remove.
197 (reg-ia64.c): Remove.
198 (reg-m32r.c): Remove.
199 (reg-m68k.c): Remove.
200 (reg-cf.c): Remove.
201 (mips-linux.c): Remove.
202 (mips-dsp-linux.c): Remove.
203 (mips64-linux.c): Remove.
204 (mips64-dsp-linux.c): Remove.
205 (nios2-linux.c): Remove.
206 (powerpc-32.c): Remove.
207 (powerpc-32l.c): Remove.
208 (powerpc-altivec32l.c): Remove.
209 (powerpc-cell32l.c): Remove.
210 (powerpc-vsx32l.c): Remove.
211 (powerpc-isa205-32l.c): Remove.
212 (powerpc-isa205-altivec32l.c): Remove.
213 (powerpc-isa205-vsx32l.c): Remove.
214 (powerpc-e500l.c): Remove.
215 (powerpc-64l.c): Remove.
216 (powerpc-altivec64l.c): Remove.
217 (powerpc-cell64l.c): Remove.
218 (powerpc-vsx64l.c): Remove.
219 (powerpc-isa205-64l.c): Remove.
220 (powerpc-isa205-altivec64l.c): Remove.
221 (powerpc-isa205-vsx64l.c): Remove.
222 (s390-linux32.c): Remove.
223 (s390-linux32v1.c): Remove.
224 (s390-linux32v2.c): Remove.
225 (s390-linux64.c): Remove.
226 (s390-linux64v1.c): Remove.
227 (s390-linux64v2.c): Remove.
228 (s390-te-linux64.c): Remove.
229 (s390-vx-linux64.c): Remove.
230 (s390-tevx-linux64.c): Remove.
231 (s390x-linux64.c): Remove.
232 (s390x-linux64v1.c): Remove.
233 (s390x-linux64v2.c): Remove.
234 (s390x-te-linux64.c): Remove.
235 (s390x-vx-linux64.c): Remove.
236 (s390x-tevx-linux64.c): Remove.
237 (tic6x-c64xp-linux.c): Remove.
238 (tic6x-c64x-linux.c): Remove.
239 (tic6x-c62x-linux.c): Remove.
240 (reg-sh.c): Remove.
241 (reg-sparc64.c): Remove.
242 (reg-spu.c): Remove.
243 (amd64.c): Remove.
244 (amd64-linux.c): Remove.
245 (amd64-avx.c): Remove.
246 (amd64-avx-linux.c): Remove.
247 (amd64-avx-avx512.c): Remove.
248 (amd64-avx-avx512-linux.c): Remove.
249 (amd64-mpx.c): Remove.
250 (amd64-mpx-linux.c): Remove.
251 (amd64-avx-mpx-avx512-pku.c): Remove.
252 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
253 (amd64-avx-mpx.c): Remove.
254 (amd64-avx-mpx-linux.c): Remove.
255 (x32.c): Remove.
256 (x32-linux.c): Remove.
257 (x32-avx.c): Remove.
258 (x32-avx-linux.c): Remove.
259 (x32-avx-avx512.c): Remove.
260 (x32-avx-avx512-linux.c): Remove.
261 (reg-xtensa.c): Remove.
262 (reg-tilegx.c): Remove.
263 (reg-tilegx32.c): Remove.
264
1672e0d9
SDJ
2652017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
266
267 * Makefile.in (SFILES): Add "common/environ.c".
268 (OBJS): Add "common/environ.h".
269
239b6d10
WT
2702017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
271
272 * configure.ac: Check if the fs_base and gs_base members of
273 `struct user_regs_struct' exist.
274 * config.in: Regenerated.
275 * configure: Likewise.
276
694b382c
AT
2772017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
278
279 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
280 target_read_memory.
281 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
282 (get_next_pcs_syscall_next_pc): Likewise.
283
7dc53023
LM
2842016-12-23 Luis Machado <lgustavo@codesourcery.com>
285
286 * win32-i386-low.c: Fix incorrect reference to a couple source files.
287 * nto-x86-low.c: Likewise.
288
ad02e4fe
SM
2892016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
290
291 * Makefile.in: Include disable-implicit-rules.mk.
292
dcb07cfa
PA
2932016-11-23 Pedro Alves <palves@redhat.com>
294
295 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
296 (debug_vprintf): Use std::chrono::steady_clock instead of
297 gettimeofday. Use '.' instead of ':'.
298 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
299 (get_timestamp): Use std::chrono::steady_clock instead of
300 gettimeofday.
301
8629c02c
SM
3022016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
303
304 * Makefile.in: Fix whitespace formatting.
305
b593ecca
SM
3062016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * Makefile.in (SFILES, OBS): Flatten list and order
309 alphabetically.
310
9986ba08
PA
3112016-11-23 Pedro Alves <palves@redhat.com>
312
313 * event-loop.c (handle_file_event): Use warning.
314 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
315 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
316 Use warning.
317
4eefa7bc
PA
3182016-11-23 Pedro Alves <palves@redhat.com>
319
320 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
321 output.
322 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
323 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
324 debug_printf and debug_flush for debug output.
325 * server.c (handle_general_set): Likewise.
326 * thread-db.c (try_thread_db_load): Use debug_printf for debug
327 output.
328
5443506e
SM
3292016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
330
331 * Makefile.in (.c.o): Replace rule with ...
332 (%.o: %.c): ... this one.
333
3b165252
SM
3342016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
335
336 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
337 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
338 make.
339 * configure.ac: Remove checks for the make program.
340 * configure: Re-generate.
341
0bcda685
PA
3422016-10-28 Pedro Alves <palves@redhat.com>
343
344 * Makefile.in (CXX_DIALECT): Get from configure.
345 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
346 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
347 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
348 * config.in: Regenerate.
349 * configure: Regenerate.
350
c3805894
YQ
3512016-10-27 Yao Qi <yao.qi@linaro.org>
352
353 * linux-low.c (linux_supports_range_stepping): Return true if
354 can_software_single_step return true.
355
89342618
YQ
3562016-10-27 Yao Qi <yao.qi@linaro.org>
357
358 * inferiors.c (find_inferior_in_random): New function.
359 * inferiors.h (find_inferior_in_random): Declare.
360 * linux-low.c (linux_wait_for_event_filtered): Call
361 find_inferior_in_random instead of find_inferior.
362
e3652c84
YQ
3632016-10-27 Yao Qi <yao.qi@linaro.org>
364
365 * linux-low.c (linux_wait_1): If single-step breakpoints are
366 inserted, remove them.
367
5a04c4cf
PA
3682016-10-26 Pedro Alves <palves@redhat.com>
369
370 * linux-low.c (handle_extended_wait): Link parent/child fork
371 threads.
372 (linux_wait_1): Unlink them.
373 (linux_set_resume_request): Ignore resume requests for
374 already-resumed and unhandled fork child threads.
375 * linux-low.h (struct lwp_info) <fork_relative>: New field.
376 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
377 New functions.
378 (handle_v_requests) <vCont>: Don't call require_running.
379 * server.h (in_queued_stop_replies): New declaration.
380
cb93dc7f
YQ
3812016-10-24 Yao Qi <yao.qi@linaro.org>
382
383 PR server/20733
384 * linux-aarch64-low.c (append_insns): Cast the return value to
385 'uint32_t *'.
386
a1078bea
YQ
3872016-10-10 Yao Qi <yao.qi@linaro.org>
388
389 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
390
1fb77080
SDJ
3912016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * target.c (target_supports_multi_process): New function, moved
394 from...
395 * target.h (target_supports_multi_process): ... here. Remove
396 macro.
397
39b5a3b9
TT
3982016-10-05 Tom Tromey <tom@tromey.com>
399
400 PR remote/20655:
401 * tracepoint.c (handle_tracepoint_bkpts): Check
402 ipa_error_tracepoint, not ipa_stopping_tracepoint.
403
c1d0b70a
YQ
4042016-10-05 Yao Qi <yao.qi@linaro.org>
405
406 * configure.srv: Update the path of arm-*.xml files.
407
0a69eedb
YQ
4082016-10-05 Terry Guo <terry.guo@arm.com>
409 Yao Qi <yao.qi@linaro.org>
410
411 * Makefile.in: Adjust the path of rules.
412 * configure.srv: Update the path of xml files.
413 * regformats/arm-with-iwmmxt.dat: Regenerated.
414 * regformats/arm-with-neon.dat: Likewise.
415 * regformats/arm-with-vfpv2.dat: Likewise.
416 * regformats/arm-with-vfpv3.dat Likewise.
417
17e16485
YQ
4182016-09-30 Yao Qi <yao.qi@linaro.org>
419
420 PR gdbserver/20627
421 * target.c (target_stop_and_wait): Don't call
422 target_continue_no_signal, use resume_stop instead.
423
edeeb602
YQ
4242016-09-26 Yao Qi <yao.qi@linaro.org>
425
426 * linux-low.c (linux_wait_1): Call debug_exit.
427
503b1c39
PA
4282016-09-23 Pedro Alves <palves@redhat.com>
429
430 * Makefile.in (SFILES): Add common/new-op.c.
431 (OBS): Add common/new-op.o.
432 (new-op.o): New rule.
433
74172ecf
SM
4342016-09-21 Simon Marchi <simon.marchi@ericsson.com>
435
436 * .gitinore: Ignore more files.
437
fc6cda2e
YQ
4382016-09-21 Yao Qi <yao.qi@linaro.org>
439
440 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
441 23.
442
bc1e6c81
SDJ
4432016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
444
445 * server.c (start_inferior): Call target_mourn_inferior instead of
446 mourn_inferior; pass ptid_t argument to it.
447 (resume): Likewise.
448 (handle_target_event): Likewise.
449 * target.c (target_mourn_inferior): New function.
450 * target.h (mourn_inferior): Delete macro.
451
0e00e962
AA
4522016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
453
454 * linux-low.c (lwp_is_stepping): New function.
455
1d8cb77d
CL
4562016-09-06 Carl Love <cel@us.ibm.com>
457
458 * server.c (start_inferior): Fixed comment, requested comment change
459 didn't get updated correctly. Removed reference to ptrace () call as
460 it is only true on Linux systems.
461
7313bced
CL
4622016-09-06 Carl Love <cel@us.ibm.com>
463
464 * server.c (start_inferior): Do not call
465 function target_post_create_inferior () if the
466 inferior process has already exited.
467
cf6de44d
PA
4682016-09-05 Pedro Alves <palves@redhat.com>
469
470 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
471 (COMPILE.pre, CC_LD): Use CXX directly.
472 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
473 * acinclude.m4: Don't include build-with-cxx.m4.
474 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
475 * configure: Regenerate.
476
c1da6748
AT
4772016-09-02 Akash Trehan <akash.trehan123@gmail.com>
478
479 PR gdb/19495
480 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
481 call writing data to own_buf.
482
f2b9e3df
SDJ
4832016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
484
485 * target.c (mywait): Call target_wait instead of
486 the_target->wait.
487 (target_wait): New function.
488
049a8570
SDJ
4892016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
490
491 * server.c (start_inferior): New variable 'ptid'. Replace calls
492 to the_target->resume by target_continue{,_no_signal}, depending
493 on the case.
494 * target.c (target_stop_and_wait): Call target_continue_no_signal
495 instead of the_target->resume.
496 (target_continue): New function.
497
3aa5cfa0
AT
4982016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
499
500 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
501
754653a7
AZ
5022016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
503
504 PR server/20491
505 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
506 ps_prochandle.
507 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
508 * linux-arm-low.c (ps_get_thread_area): Likewise.
509 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
510 * linux-m68k-low.c (ps_get_thread_area): Likewise.
511 * linux-mips-low.c (ps_get_thread_area): Likewise.
512 * linux-nios2-low.c (ps_get_thread_area): Likewise.
513 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
514 * linux-x86-low.c (ps_get_thread_area): Likewise.
515 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
516
ed036b40
PA
5172016-08-19 Pedro Alves <palves@redhat.com>
518
519 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
520
c8ef42ee
PA
5212016-08-19 Pedro Alves <palves@redhat.com>
522
523 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
524 comment. Use memcpy instead of casting through unsigned long.
525
9c235a72
PA
5262016-08-19 Pedro Alves <palves@redhat.com>
527
528 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
529 allocating around 0x80000000.
530
201506da
PA
5312016-08-19 Pedro Alves <palves@redhat.com>
532
533 PR gdb/20415
534 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
535 (x32-avx512-linux-ipa.o): New rules.
536 * configure.ac (x86_64-*-linux*): New x32 check.
537 * configure.srv (ipa_x32_linux_regobj): New.
538 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
539 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
540 descriptions.
541 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
542 descriptions.
543 * configure: Regenerate.
544
f348d89a
PA
5452016-08-09 Pedro Alves <palves@redhat.com>
546
547 PR gdb/18653
548 * Makefile.in (OBS): Add signals-state-save-restore.o.
549 (signals-state-save-restore.o): New rule.
550 * config.in: Regenerate.
551 * configure: Regenerate.
552 * linux-low.c: Include "signals-state-save-restore.h".
553 (linux_create_inferior): Call
554 restore_original_signals_state.
555 * server.c: Include "dispositions-save-restore.h".
556 (captured_main): Call save_original_signals_state.
557
1baf5149
PA
5582016-08-05 Pedro Alves <palves@redhat.com>
559
560 * configure: Regenerate.
561
fcd4a73d
YQ
5622016-08-04 Yao Qi <yao.qi@linaro.org>
563
564 * linux-low.c (regsets_fetch_inferior_registers): Check
565 errno is ESRCH or not.
566
979659d0
YQ
5672016-08-02 Yao Qi <yao.qi@linaro.org>
568
569 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
570 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
571 (thread_db_load_search): Update.
572 (try_thread_db_load_1): Don't look for td_ta_event_addr,
573 td_ta_set_event and td_ta_event_getmsg.
574
6598661d
PA
5752016-07-26 Pedro Alves <palves@redhat.com>
576
577 PR server/20414
578 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
579 of unsigned long for 64-bit registers and use uint32_t instead of
580 unsigned int for 32-bit registers.
581
9cf12d57
PA
5822016-07-26 Pedro Alves <palves@redhat.com>
583
584 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
585 to 'ptrace'.
586
305450ed
TT
5872016-07-21 Tom Tromey <tom@tromey.com>
588
589 * configure: Rebuild.
590
2583da7c
YQ
5912016-07-21 Yao Qi <yao.qi@linaro.org>
592
593 * mem-break.c (find_gdb_breakpoint): Cast bp to
594 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
595
21536b36
YQ
5962016-07-21 Yao Qi <yao.qi@linaro.org>
597
598 * server.c (handle_v_requests): Support s and S actions
599 if target_supports_software_single_step return true.
600
8901d193
YQ
6012016-07-21 Yao Qi <yao.qi@linaro.org>
602
603 * linux-low.c (resume_stopped_resumed_lwps): If resume request
604 is resume_step, call maybe_hw_step.
605 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
606 and unstop them.
607 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
608 breakpoints or not.
609 (proceed_one_lwp): If resume request is resume_step, install
610 reinsert breakpoints and call maybe_hw_step.
611
0e9a339e
YQ
6122016-07-21 Yao Qi <yao.qi@linaro.org>
613
614 * linux-low.c (proceed_one_lwp): Declare.
615 (linux_resume_one_thread): Remove local variable 'step'.
616 Lift code enqueue signal. Call proceed_one_lwp instead of
617 linux_resume_one_lwp.
618
4281b351
YQ
6192016-07-21 Yao Qi <yao.qi@linaro.org>
620
621 * linux-low.c (linux_resume_one_thread): Call
622 enqueue_pending_signal.
623
984a2c04
YQ
6242016-07-21 Yao Qi <yao.qi@linaro.org>
625
626 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
627 * inferiors.c (do_restore_current_thread_cleanup): New function.
628 (make_cleanup_restore_current_thread): Likewise.
629 * linux-low.c (install_software_single_step_breakpoints): Call
630 make_cleanup_restore_current_thread. Switch current_thread to
631 thread.
632
bec903c9
YQ
6332016-07-21 Yao Qi <yao.qi@linaro.org>
634
635 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
636 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
637 (clone_one_breakpoint): Likewise.
638 (delete_reinsert_breakpoints): Change parameter to thread.
639 Callers updated.
640 (has_reinsert_breakpoints): Likewise.
641 (uninsert_reinsert_breakpoints): Likewise.
642 (reinsert_reinsert_breakpoints): Likewise.
643 * mem-break.h (set_reinsert_breakpoint): Update declaration.
644 (delete_reinsert_breakpoints): Likewise.
645 (reinsert_reinsert_breakpoints): Likewise.
646 (uninsert_reinsert_breakpoints): Likewise.
647 (has_reinsert_breakpoints): Likewise.
648
63c40ec7
YQ
6492016-07-21 Yao Qi <yao.qi@linaro.org>
650
651 * inferiors.c (get_thread_process): Make parameter const.
652 * inferiors.h (get_thread_process): Update declaration.
653 * mem-break.c (clone_all_breakpoints): Remove all parameters.
654 Add new parameters child_thread and parent_thread. Callers
655 updated.
656 * mem-break.h (clone_all_breakpoints): Update declaration.
657
9aa76cd0
YQ
6582016-07-21 Yao Qi <yao.qi@linaro.org>
659
660 * mem-break.c (struct breakpoint) <cond_list>: Remove.
661 <command_list, handler>: Remove.
662 (struct gdb_breakpoint): New.
663 (struct other_breakpoint): New.
664 (struct reinsert_breakpoint): New.
665 (is_gdb_breakpoint): New function.
666 (any_persistent_commands): Update command_list if
667 is_gdb_breakpoint returns true.
668 (set_breakpoint): Create breakpoints according to their types.
669 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
670 (set_gdb_breakpoint_1): Likewise.
671 (set_gdb_breakpoint): Likewise.
672 (clear_breakpoint_conditions): Change parameter type to
673 'struct gdb_breakpoint *'.
674 (clear_breakpoint_commands): Likewise.
675 (clear_breakpoint_conditions_and_commands): Likewise.
676 (add_condition_to_breakpoint): Likewise.
677 (add_breakpoint_condition): Likewise.
678 (add_commands_to_breakpoint): Likewise.
679 (check_breakpoints): Check other_breakpoint.
680 (clone_one_breakpoint): Clone breakpopint according to its type.
681 * mem-break.h (struct gdb_breakpoint): Declare.
682 (set_gdb_breakpoint): Update declaration.
683 (clear_breakpoint_conditions_and_commands): Likewise.
684 (add_breakpoint_condition): Likewise.
685 (add_breakpoint_commands): Likewise.
686 * server.c (process_point_options): Change parameter type to
687 'struct gdb_breakpoint *'.
688
811f8301
YQ
6892016-07-21 Yao Qi <yao.qi@linaro.org>
690
691 * mem-break.c (set_breakpoint_at): Rename it to ...
692 (set_breakpoint_type_at): ... it.
693 (set_breakpoint_at): Call set_breakpoint_type_at.
694 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
695 * mem-break.h (set_breakpoint_at): Update comments.
696
b1c51e36
CLT
6972016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
698
699 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
700 to buf parameter.
701 (nios2_store_gregset): Likewise.
702
ced2dffb
PA
7032016-07-01 Pedro Alves <palves@redhat.com>
704 Antoine Tremblay <antoine.tremblay@ericsson.com>
705
706 * linux-low.c: Change interface to take the target lwp_info
707 pointer directly and return void. Handle detaching from a zombie
708 thread.
709 (linux_detach_lwp_callback): New function.
710 (linux_detach): Detach from the leader thread after detaching from
711 the clone threads.
712
2ac09a5b
YQ
7132016-06-28 Yao Qi <yao.qi@linaro.org>
714
715 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
716 for variable new_offset.
717 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
718 (aarch64_ftrace_insn_reloc_cb): Likewise.
719 (aarch64_ftrace_insn_reloc_tb): Likewise.
720 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
721 PRIx64 instead of PRIx32.
722
79e7fd4f
YQ
7232016-06-28 Yao Qi <yao.qi@linaro.org>
724
725 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
726 (the_low_target): Install arm_get_syscall_trapinfo.
727
061fc021
YQ
7282016-06-28 Yao Qi <yao.qi@linaro.org>
729
730 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
731 function.
732 (the_low_target): Install aarch64_get_syscall_trapinfo.
733
4cc32bec
YQ
7342016-06-28 Yao Qi <yao.qi@linaro.org>
735
736 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
737 Callers updated.
738 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
739 Remove parameter sysno.
740 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
741 sysret.
742
782c1122
AA
7432016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
744
745 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
746 (s390_emit_ne_goto): Likewise.
747 (s390_emit_lt_goto): Likewise.
748 (s390_emit_le_goto): Likewise.
749 (s390_emit_gt_goto): Likewise.
750 (s390_emit_ge_goto): Likewise.
751 (s390x_emit_eq_goto): Likewise.
752 (s390x_emit_ne_goto): Likewise.
753 (s390x_emit_lt_goto): Likewise.
754 (s390x_emit_le_goto): Likewise.
755 (s390x_emit_gt_goto): Likewise.
756 (s390x_emit_ge_goto): Likewise.
757 (s390_emit_ops_impl): Mark variable static.
758 (s390x_emit_ops): Likewise.
759
2e7b624b
YQ
7602016-06-17 Yao Qi <yao.qi@linaro.org>
761
762 * linux-low.c (handle_extended_wait): Call
763 uninsert_reinsert_breakpoints for the parent process. Remove
764 reinsert breakpoints from the child process. Reinsert them to
765 the parent process when vfork is done.
766 * mem-break.c (uninsert_reinsert_breakpoints): New function.
767 (reinsert_reinsert_breakpoints): New function.
768 * mem-break.h (uninsert_reinsert_breakpoints): Declare
769 (reinsert_reinsert_breakpoints): Declare.
770
8a81c5d7
YQ
7712016-06-17 Yao Qi <yao.qi@linaro.org>
772
773 * linux-low.c (handle_extended_wait): If the parent is doing
774 step-over, remove the reinsert breakpoints from the forked child.
775
f50bf8e5
YQ
7762016-06-17 Yao Qi <yao.qi@linaro.org>
777
778 * linux-low.c (unsuspend_all_lwps): Declare.
779 (linux_low_filter_event): If thread exited, call finish_step_over.
780 If step-over is finished, unsuspend other threads.
781
8376a3cb
YQ
7822016-06-17 Yao Qi <yao.qi@linaro.org>
783
784 * linux-low.c (linux_resume_one_lwp_throw): Assert
785 has_reinsert_breakpoints returns false.
786 * mem-break.c (delete_disabled_breakpoints): Assert
787 bp type isn't reinsert_breakpoint.
788
f79b145d
YQ
7892016-06-17 Yao Qi <yao.qi@linaro.org>
790
791 * linux-low.c (maybe_hw_step): New function.
792 (linux_resume_one_lwp_throw): Call maybe_hw_step.
793 (finish_step_over): Switch current_thread to lwp temporarily,
794 and assert has_reinsert_breakpoints returns true.
795 (proceed_one_lwp): Call maybe_hw_step.
796 * mem-break.c (has_reinsert_breakpoints): New function.
797 * mem-break.h (has_reinsert_breakpoints): Declare.
798
0ae534d2
JT
7992016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
800
801 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
802
fcdad592
YQ
8032016-05-17 Yao Qi <yao.qi@linaro.org>
804
805 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
806 instead of find_inferior.
807
9e784964
YQ
8082016-05-05 Yao Qi <yao.qi@linaro.org>
809
810 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
811 Initialize res to zero.
812
cf2ebb6e
YQ
8132016-05-05 Yao Qi <yao.qi@linaro.org>
814
815 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
816 to uint32_t.
817
c1aebf87
UW
8182016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
819
820 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
821 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
822 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
823
35fd2deb 8242016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 825 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
826
827 * tracepoint.c (write_inferior_int8): New function.
828 (cmd_qtenable_disable): Write enable flag using
829 write_inferior_int8.
830
484b3c32
YQ
8312016-04-25 Yao Qi <yao.qi@linaro.org>
832
833 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
834 (need_step_over_p): Return zero if the LWP has pending signals
835 can be delivered on software single step target.
836
85ba7d86
YQ
8372016-04-25 Yao Qi <yao.qi@linaro.org>
838
839 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
840 return instead of error.
841
3539aa13
YQ
8422016-04-22 Yao Qi <yao.qi@linaro.org>
843
844 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
845 to 23.
846
5b061e98
YQ
8472016-04-22 Yao Qi <yao.qi@linaro.org>
848
849 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
850 signal when stepping over breakpoint with software single
851 step.
852
3451269c
PA
8532016-04-21 Pedro Alves <palves@redhat.com>
854
855 * linux-s390-low.c (s390_collect_ptrace_register)
856 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
857 add casts.
858 (s390_check_regset): Use void * instead of gdb_byte *.
859
a2358508
PA
8602016-04-20 Pedro Alves <palves@redhat.com>
861
862 * configure: Renegerate.
863
6885166d
YQ
8642016-04-20 Yao Qi <yao.qi@linaro.org>
865
866 * linux-aarch32-low.c: Include "arch/arm-linux.h".
867 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
868 number 16.
869 (arm_store_gregset): Likewise.
870
2b863f51
WT
8712016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
872
873 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
874 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
875 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
876 (amd64-avx-mpx-linux.c): New rules.
877 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
878 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
879 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
880 (srv_amd64_regobj): Add amd64-avx-mpx.o.
881 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
882 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
883 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
884 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
885 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
886 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
887 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
888 * linux-x86-low.c (x86_linux_read_description): Add case for
889 X86_XSTATE_AVX_MPX_MASK.
890 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
891 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
892 init_registers_i386_avx_mpx_linux.
893 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
894 (initialize_low_tracepoint): Call
895 init_registers_i386_avx_mpx_linux.
896 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
897 (initialize_low_tracepoint): Call
898 init_registers_amd64_avx_mpx_linux.
899 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
900 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
901 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
902 declarations.
903
9b30624b
PA
9042016-04-18 Pedro Alves <palves@redhat.com>
905
906 * configure: Regenerate.
907
45e3745e
AT
9082016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
909
910 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
911 (aarch64_emit_sub): Likewise.
912
2afc13ff
PA
9132016-04-12 Pedro Alves <palves@redhat.com>
914
915 * utils.c (prepare_to_throw_exception): Delete.
916
6e774b13
SM
9172016-04-05 Simon Marchi <simon.marchi@ericsson.com>
918
919 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
920
4dca19f8
MK
9212016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
922
923 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
924
d0a9981f
MK
9252016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
926
927 * linux-aarch64-ipa.c: Add <elf.h> include.
928 * linux-ppc-ipa.c: Add <elf.h> include.
929 * linux-s390-ipa.c: Add <elf.h> include.
930
252db07e
MK
9312016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
932
933 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
934 (get_raw_reg_ptr): Likewise.
935 (get_trace_state_variable_value_ptr): Likewise.
936 (set_trace_state_variable_value_ptr): Likewise.
937 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
938 char *.
939
14e2b6d9
MK
9402016-03-31 Wei-cheng Wang <cole945@gmail.com>
941 Marcin Kościelnicki <koriakin@0x04.net>
942
943 PR/17221
944 * linux-ppc-low.c (emit_insns): New function.
945 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
946 (ppc_emit_prologue): New function.
947 (ppc_emit_epilogue): New function.
948 (ppc_emit_add): New function.
949 (ppc_emit_sub): New function.
950 (ppc_emit_mul): New function.
951 (ppc_emit_lsh): New function.
952 (ppc_emit_rsh_signed): New function.
953 (ppc_emit_rsh_unsigned): New function.
954 (ppc_emit_ext): New function.
955 (ppc_emit_zero_ext): New function.
956 (ppc_emit_log_not): New function.
957 (ppc_emit_bit_and): New function.
958 (ppc_emit_bit_or): New function.
959 (ppc_emit_bit_xor): New function.
960 (ppc_emit_bit_not): New function.
961 (ppc_emit_equal): New function.
962 (ppc_emit_less_signed): New function.
963 (ppc_emit_less_unsigned): New function.
964 (ppc_emit_ref): New function.
965 (ppc_emit_const): New function.
966 (ppc_emit_reg): New function.
967 (ppc_emit_pop): New function.
968 (ppc_emit_stack_flush): New function.
969 (ppc_emit_swap): New function.
970 (ppc_emit_stack_adjust): New function.
971 (ppc_emit_call): New function.
972 (ppc_emit_int_call_1): New function.
973 (ppc_emit_void_call_2): New function.
974 (ppc_emit_if_goto): New function.
975 (ppc_emit_goto): New function.
976 (ppc_emit_eq_goto): New function.
977 (ppc_emit_ne_goto): New function.
978 (ppc_emit_lt_goto): New function.
979 (ppc_emit_le_goto): New function.
980 (ppc_emit_gt_goto): New function.
981 (ppc_emit_ge_goto): New function.
982 (ppc_write_goto_address): New function.
983 (ppc_emit_ops_impl): New static variable.
984 (ppc64v1_emit_prologue): New function.
985 (ppc64v2_emit_prologue): New function.
986 (ppc64_emit_epilogue): New function.
987 (ppc64_emit_add): New function.
988 (ppc64_emit_sub): New function.
989 (ppc64_emit_mul): New function.
990 (ppc64_emit_lsh): New function.
991 (ppc64_emit_rsh_signed): New function.
992 (ppc64_emit_rsh_unsigned): New function.
993 (ppc64_emit_ext): New function.
994 (ppc64_emit_zero_ext): New function.
995 (ppc64_emit_log_not): New function.
996 (ppc64_emit_bit_and): New function.
997 (ppc64_emit_bit_or): New function.
998 (ppc64_emit_bit_xor): New function.
999 (ppc64_emit_bit_not): New function.
1000 (ppc64_emit_equal): New function.
1001 (ppc64_emit_less_signed): New function.
1002 (ppc64_emit_less_unsigned): New function.
1003 (ppc64_emit_ref): New function.
1004 (ppc64_emit_const): New function.
1005 (ppc64v1_emit_reg): New function.
1006 (ppc64v2_emit_reg): New function.
1007 (ppc64_emit_pop): New function.
1008 (ppc64_emit_stack_flush): New function.
1009 (ppc64_emit_swap): New function.
1010 (ppc64v1_emit_call): New function.
1011 (ppc64v2_emit_call): New function.
1012 (ppc64v1_emit_int_call_1): New function.
1013 (ppc64v2_emit_int_call_1): New function.
1014 (ppc64v1_emit_void_call_2): New function.
1015 (ppc64v2_emit_void_call_2): New function.
1016 (ppc64_emit_if_goto): New function.
1017 (ppc64_emit_eq_goto): New function.
1018 (ppc64_emit_ne_goto): New function.
1019 (ppc64_emit_lt_goto): New function.
1020 (ppc64_emit_le_goto): New function.
1021 (ppc64_emit_gt_goto): New function.
1022 (ppc64_emit_ge_goto): New function.
1023 (ppc64v1_emit_ops_impl): New static variable.
1024 (ppc64v2_emit_ops_impl): New static variable.
1025 (ppc_emit_ops): New function.
1026 (linux_low_target): Wire in ppc_emit_ops.
1027
a2174ba4
MK
10282016-03-31 Wei-cheng Wang <cole945@gmail.com>
1029 Marcin Kościelnicki <koriakin@0x04.net>
1030
1031 PR/17221
1032 * Makefile.in: Add powerpc-*-ipa.o
1033 * configure.srv: Add ipa_obj for powerpc*-linux.
1034 * linux-ppc-ipa.c: New file.
1035 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1036 includes.
1037 (PPC_FIELD): New macro.
1038 (PPC_SEXT): New macro.
1039 (PPC_OP6): New macro.
1040 (PPC_BO): New macro.
1041 (PPC_LI): New macro.
1042 (PPC_BD): New macro.
1043 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1044 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1045 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1046 (ppc_get_thread_area): New function.
1047 (is_elfv2_inferior): New function.
1048 (gen_ds_form): New function.
1049 (GEN_STD): New macro.
1050 (GEN_STDU): New macro.
1051 (GEN_LD): New macro.
1052 (GEN_LDU): New macro.
1053 (gen_d_form): New function.
1054 (GEN_ADDI): New macro.
1055 (GEN_ADDIS): New macro.
1056 (GEN_LI): New macro.
1057 (GEN_LIS): New macro.
1058 (GEN_ORI): New macro.
1059 (GEN_ORIS): New macro.
1060 (GEN_LWZ): New macro.
1061 (GEN_STW): New macro.
1062 (GEN_STWU): New macro.
1063 (gen_xfx_form): New function.
1064 (GEN_MFSPR): New macro.
1065 (GEN_MTSPR): New macro.
1066 (GEN_MFCR): New macro.
1067 (GEN_MTCR): New macro.
1068 (GEN_SYNC): New macro.
1069 (GEN_LWSYNC): New macro.
1070 (gen_x_form): New function.
1071 (GEN_OR): New macro.
1072 (GEN_MR): New macro.
1073 (GEN_LWARX): New macro.
1074 (GEN_STWCX): New macro.
1075 (GEN_CMPW): New macro.
1076 (gen_md_form): New function.
1077 (GEN_RLDICL): New macro.
1078 (GEN_RLDICR): New macro.
1079 (gen_i_form): New function.
1080 (GEN_B): New macro.
1081 (GEN_BL): New macro.
1082 (gen_b_form): New function.
1083 (GEN_BNE): New macro.
1084 (GEN_LOAD): New macro.
1085 (GEN_STORE): New macro.
1086 (gen_limm): New function.
1087 (gen_atomic_xchg): New function.
1088 (gen_call): New function.
1089 (ppc_relocate_instruction): New function.
1090 (ppc_install_fast_tracepoint_jump_pad): New function.
1091 (ppc_get_min_fast_tracepoint_insn_len): New function.
1092 (ppc_get_ipa_tdesc_idx): New function.
1093 (the_low_target): Wire in the new functions.
1094 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1095 tdescs.
1096 * linux-ppc-tdesc.h: New file.
1097
a13c4696
MK
10982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1099
1100 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1101 (alloc_jump_pad_buffer): New function.
1102 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1103 (alloc_jump_pad_buffer): New function.
1104 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1105 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1106 (alloc_jump_pad_buffer): New function.
1107 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1108 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1109 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1110 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1111
1cda1512
MK
11122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1113
1114 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1115 * linux-amd64-ipa.c: Likewise.
1116 * linux-i386-ipa.c: Likewise.
1117 * linux-s390-ipa.c: Likewise.
1118 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1119 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1120 set_trace_state_variable_value_ptr.
1121 (struct ipa_sym_addresses): Likewise.
1122 (symbol_list): Likewise.
1123 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1124 accessing gdb_collect directly.
1125 (gdb_collect_ptr_type): New typedef.
1126 (get_raw_reg_ptr_type): New typedef.
1127 (get_trace_state_variable_value_ptr_type): New typedef.
1128 (set_trace_state_variable_value_ptr_type): New typedef.
1129 (gdb_collect_ptr): New global.
1130 (get_raw_reg_ptr): New global.
1131 (get_trace_state_variable_value_ptr): New global.
1132 (set_trace_state_variable_value_ptr): New global.
1133 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1134 accessing get_raw_reg directly.
1135 (get_get_tsv_func_addr): Likewise for
1136 get_trace_state_variable_value_ptr.
1137 (get_set_tsv_func_addr): Likewise for
1138 set_trace_state_variable_value_ptr.
1139 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1140
72fb5488
SM
11412016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1144
28170b88
MK
11452016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1146
1147 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1148 packets.
1149 (relocate_instruction): Remove own_buf.
1150 * server.c (own_buf): Make global.
1151 (handle_v_requests): Make global.
1152 * server.h (own_buf): New declaration.
1153 (handle_v_requests): New prototype.
1154
f39e8743
MK
11552016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1156
1157 PR 18377
1158 * linux-s390-low.c (add_insns): New function.
1159 (s390_emit_prologue): New function.
1160 (s390_emit_epilogue): New function.
1161 (s390_emit_add): New function.
1162 (s390_emit_sub): New function.
1163 (s390_emit_mul): New function.
1164 (s390_emit_lsh): New function.
1165 (s390_emit_rsh_signed): New function.
1166 (s390_emit_rsh_unsigned): New function.
1167 (s390_emit_ext): New function.
1168 (s390_emit_log_not): New function.
1169 (s390_emit_bit_and): New function.
1170 (s390_emit_bit_or): New function.
1171 (s390_emit_bit_xor): New function.
1172 (s390_emit_bit_not): New function.
1173 (s390_emit_equal): New function.
1174 (s390_emit_less_signed): New function.
1175 (s390_emit_less_unsigned): New function.
1176 (s390_emit_ref): New function.
1177 (s390_emit_if_goto): New function.
1178 (s390_emit_goto): New function.
1179 (s390_write_goto_address): New function.
1180 (s390_emit_litpool): New function.
1181 (s390_emit_const): New function.
1182 (s390_emit_call): New function.
1183 (s390_emit_reg): New function.
1184 (s390_emit_pop): New function.
1185 (s390_emit_stack_flush): New function.
1186 (s390_emit_zero_ext): New function.
1187 (s390_emit_swap): New function.
1188 (s390_emit_stack_adjust): New function.
1189 (s390_emit_set_r2): New function.
1190 (s390_emit_int_call_1): New function.
1191 (s390_emit_void_call_2): New function.
1192 (s390_emit_eq_goto): New function.
1193 (s390_emit_ne_goto): New function.
1194 (s390_emit_lt_goto): New function.
1195 (s390_emit_le_goto): New function.
1196 (s390_emit_gt_goto): New function.
1197 (s390_emit_ge_goto): New function.
1198 (s390x_emit_prologue): New function.
1199 (s390x_emit_epilogue): New function.
1200 (s390x_emit_add): New function.
1201 (s390x_emit_sub): New function.
1202 (s390x_emit_mul): New function.
1203 (s390x_emit_lsh): New function.
1204 (s390x_emit_rsh_signed): New function.
1205 (s390x_emit_rsh_unsigned): New function.
1206 (s390x_emit_ext): New function.
1207 (s390x_emit_log_not): New function.
1208 (s390x_emit_bit_and): New function.
1209 (s390x_emit_bit_or): New function.
1210 (s390x_emit_bit_xor): New function.
1211 (s390x_emit_bit_not): New function.
1212 (s390x_emit_equal): New function.
1213 (s390x_emit_less_signed): New function.
1214 (s390x_emit_less_unsigned): New function.
1215 (s390x_emit_ref): New function.
1216 (s390x_emit_if_goto): New function.
1217 (s390x_emit_const): New function.
1218 (s390x_emit_call): New function.
1219 (s390x_emit_reg): New function.
1220 (s390x_emit_pop): New function.
1221 (s390x_emit_stack_flush): New function.
1222 (s390x_emit_zero_ext): New function.
1223 (s390x_emit_swap): New function.
1224 (s390x_emit_stack_adjust): New function.
1225 (s390x_emit_int_call_1): New function.
1226 (s390x_emit_void_call_2): New function.
1227 (s390x_emit_eq_goto): New function.
1228 (s390x_emit_ne_goto): New function.
1229 (s390x_emit_lt_goto): New function.
1230 (s390x_emit_le_goto): New function.
1231 (s390x_emit_gt_goto): New function.
1232 (s390x_emit_ge_goto): New function.
1233 (s390_emit_ops): New function.
1234 (struct linux_target_ops): Fill in emit_ops hook.
1235
abd9baf9
MK
12362016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1237
1238 PR 18377
1239 * Makefile.in: Add s390 IPA files.
1240 * configure.srv: Build IPA for s390.
1241 * linux-s390-ipa.c: New file.
1242 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1243 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1244 (tdesc_s390_linux32): Likewise.
1245 (init_registers_s390_linux32v1): Likewise.
1246 (tdesc_s390_linux32v1): Likewise.
1247 (init_registers_s390_linux32v2): Likewise.
1248 (tdesc_s390_linux32v2): Likewise.
1249 (init_registers_s390_linux64): Likewise.
1250 (tdesc_s390_linux64): Likewise.
1251 (init_registers_s390_linux64v1): Likewise.
1252 (tdesc_s390_linux64v1): Likewise.
1253 (init_registers_s390_linux64v2): Likewise.
1254 (tdesc_s390_linux64v2): Likewise.
1255 (init_registers_s390_te_linux64): Likewise.
1256 (tdesc_s390_te_linux64): Likewise.
1257 (init_registers_s390_vx_linux64): Likewise.
1258 (tdesc_s390_vx_linux64): Likewise.
1259 (init_registers_s390_tevx_linux64): Likewise.
1260 (tdesc_s390_tevx_linux64): Likewise.
1261 (init_registers_s390x_linux64): Likewise.
1262 (tdesc_s390x_linux64): Likewise.
1263 (init_registers_s390x_linux64v1): Likewise.
1264 (tdesc_s390x_linux64v1): Likewise.
1265 (init_registers_s390x_linux64v2): Likewise.
1266 (tdesc_s390x_linux64v2): Likewise.
1267 (init_registers_s390x_te_linux64): Likewise.
1268 (tdesc_s390x_te_linux64): Likewise.
1269 (init_registers_s390x_vx_linux64): Likewise.
1270 (tdesc_s390x_vx_linux64): Likewise.
1271 (init_registers_s390x_tevx_linux64): Likewise.
1272 (tdesc_s390x_tevx_linux64): Likewise.
1273 (have_hwcap_s390_vx): New static variable.
1274 (s390_arch_setup): Fill have_hwcap_s390_vx.
1275 (s390_get_thread_area): New function.
1276 (s390_ft_entry_gpr_esa): New const.
1277 (s390_ft_entry_gpr_zarch): New const.
1278 (s390_ft_entry_misc): New const.
1279 (s390_ft_entry_fr): New const.
1280 (s390_ft_entry_vr): New const.
1281 (s390_ft_main_31): New const.
1282 (s390_ft_main_64): New const.
1283 (s390_ft_exit_fr): New const.
1284 (s390_ft_exit_vr): New const.
1285 (s390_ft_exit_misc): New const.
1286 (s390_ft_exit_gpr_esa): New const.
1287 (s390_ft_exit_gpr_zarch): New const.
1288 (append_insns): New function.
1289 (s390_relocate_instruction): New function.
1290 (s390_install_fast_tracepoint_jump_pad): New function.
1291 (s390_get_min_fast_tracepoint_insn_len): New function.
1292 (s390_get_ipa_tdesc_idx): New function.
1293 (struct linux_target_ops): Wire in the above functions.
1294 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1295 * linux-s390-tdesc.h: New file.
1296
a4105d04
MK
12972016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1298
1299 * linux-s390-low.c (s390_supports_tracepoints): New function.
1300 (struct linux_target_ops): Fill supports_tracepoints hook.
1301
35ac8b3e
YQ
13022016-03-18 Yao Qi <yao.qi@linaro.org>
1303
1304 * linux-low.c (lwp_signal_can_be_delivered): New function.
1305 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1306
94610ec4
YQ
13072016-03-18 Yao Qi <yao.qi@linaro.org>
1308
1309 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1310 0 if signal is enqueued. Remove 'signal' from one debugging
1311 message. Move one debugging message to some lines below.
1312 Remove code setting 'signal' to 0.
1313
80aea927
YQ
13142016-03-18 Yao Qi <yao.qi@linaro.org>
1315
1316 * linux-low.c (linux_low_filter_event): Remove redundant
1317 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1318
b04fd3be
MK
13192016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1320
1321 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1322 (struct linux_target_ops): Wire in the above.
1323
c40c8d4b
YQ
13242016-03-03 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-low.c: Update comments to start_step_over.
1327
0f8288ae
YQ
13282016-03-03 Yao Qi <yao.qi@linaro.org>
1329
1330 PR server/19736
1331 * linux-low.c (handle_extended_wait): Set child suspended
1332 if event_lwp->bp_reinsert isn't zero.
1333
fdbd04a8
YQ
13342016-03-02 Yao Qi <yao.qi@linaro.org>
1335
1336 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1337 enqueue_pending_signal.
1338
6896a8fa
MK
13392016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1340
1341 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1342 is actually loaded.
1343
ab503087
MK
13442016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1345
1346 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1347 (s390_regmap_3264) [!__s390x__]: New global.
1348 (s390_collect_ptrace_register): Skip map entries containing -1.
1349 (s390_supply_ptrace_register): Ditto.
1350 (s390_fill_gprs_high): New function.
1351 (s390_store_gprs_high): New function.
1352 (s390_regsets): Add NT_S390_HIGH_GPRS.
1353 (s390_get_hwcap): Enable on 31-bit.
1354 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1355 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1356 Detect NT_S390_HIGH_GPRS.
1357 (s390_usrregs_info_3264): Enable on 31-bit.
1358 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1359 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1360
ae91f625
MK
13612016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1362
1363 PR gdb/13808
1364 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1365 * configure.srv: Ditto.
1366 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1367 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1368 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1369 (init_registers_amd64_linux): Remove prototype.
1370 (tdesc_amd64_linux): Remove declaration.
1371 (get_ipa_tdesc): New function.
1372 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1373 initialize remaining tdescs.
1374 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1375 (init_registers_i386_linux): Remove prototype.
1376 (tdesc_i386_linux): Remove declaration.
1377 (get_ipa_tdesc): New function.
1378 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1379 initialize remaining tdescs.
1380 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1381 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1382 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1383 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1384 (x86_get_ipa_tdesc_idx): New function.
1385 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1386 * linux-x86-tdesc.h: New file.
1387 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1388 (target_get_ipa_tdesc_idx): New macro.
1389 * tracepoint.c (ipa_tdesc_idx): New macro.
1390 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1391 (symbol_list): Add ipa_tdesc_idx.
1392 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1393 (ipa_tdesc): Remove.
1394 (ipa_tdesc_idx): New variable.
1395 (get_context_regcache): Use get_ipa_tdesc.
1396 (gdb_collect): Ditto.
1397 (gdb_probe): Ditto.
1398 * tracepoint.h (get_ipa_tdesc): New prototype.
1399 (ipa_tdesc): Remove.
1400
e7ad2f14
PA
14012016-02-24 Pedro Alves <palves@redhat.com>
1402
1403 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1404 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1405 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1406 Factor out common code between the USE_SIGTRAP_SIGINFO and
1407 !USE_SIGTRAP_SIGINFO blocks.
1408 (linux_low_filter_event): Call save_stop_reason instead of
1409 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1410 Update comments.
1411 (linux_wait_1): Update comments.
1412
657f9cde
WW
14132016-02-24 Wei-cheng Wang <cole945@gmail.com>
1414
1415 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1416 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1417 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1418 ppc_insert_point, ppc_remove_point.
1419
b00b61e1
MK
14202016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1421
1422 * linux-s390-low.c (s390_supports_z_point_type): New function.
1423 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1424
553cb527
YQ
14252016-02-16 Yao Qi <yao.qi@linaro.org>
1426
1427 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1428 PC. Get pc from regcache_read_pc.
1429
a5652c21
YQ
14302016-02-12 Yao Qi <yao.qi@linaro.org>
1431
1432 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1433 or linux_get_pc_32bit.
1434 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1435
ed443b61
YQ
14362016-02-12 Yao Qi <yao.qi@linaro.org>
1437
1438 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1439 arm_linux_get_next_pcs_fixup.
1440
020ecd38
MK
14412016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1442
1443 * tracepoint.c (x_tracepoint_action_download): Change
1444 write_inferior_data_ptr to write_inferior_data_pointer.
1445 (cmd_qtstart): Likewise.
1446 (write_inferior_data_ptr): Remove.
1447 (download_agent_expr): Change write_inferior_data_ptr to
1448 write_inferior_data_pointer.
1449 (download_tracepoint_1): Likewise.
1450 (download_tracepoint): Likewise.
1451 (download_trace_state_variables): Likewise.
1452
7cae9051
WW
14532016-02-11 Wei-cheng Wang <cole945@gmail.com>
1454 Marcin Kościelnicki <koriakin@0x04.net>
1455
1456 * tracepoint.c (struct tracepoint_action_ops): Remove.
1457 (struct tracepoint_action): Remove ops.
1458 (m_tracepoint_action_download, r_tracepoint_action_download)
1459 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1460 size and offset accordingly.
1461 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1462 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1463 (tracepoint_action_send, tracepoint_action_download): New functions.
1464 Helpers for trace action handlers.
1465 (add_tracepoint_action): Remove setup actions ops.
1466 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1467
9f6a71b4
YQ
14682016-02-10 Yao Qi <yao.qi@linaro.org>
1469
1470 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1471
1e94266c
SM
14722016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1473
1474 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1475 to AC_OUTPUT.
1476 * configure: Regenerate.
1477
8adce034
SM
14782016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1479
1480 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1481 void * to gdb_byte *.
1482 * linux-low.c (siginfo_fixup): Likewise.
1483 (linux_xfer_siginfo): Likewise.
1484 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1485 Likewise.
1486 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1487
93813b37
WT
14882016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1489
1490 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1491 to srv_tgtobj.
1492 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1493 to srv_tgtobj.
1494 * linux-x86-low.c [__x86_64__]: Include
1495 "nat/amd64-linux-siginfo.h".
1496 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1497 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1498 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1499 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1500 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1501 (cpt_si_fd, si_timerid, si_overrun): Move from
1502 nat/amd64-linux-siginfo.c.
1503 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1504
8424cc97
SM
15052016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1506
1507 * server.c (skip_to_semicolon): Remove.
1508 (process_point_options): Use strchrnul instead of
1509 skip_to_semicolon.
1510
4d18591b
YQ
15112016-01-26 Yao Qi <yao.qi@linaro.org>
1512
1513 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1514 * linux-low.c (install_software_single_step_breakpoints): Don't
1515 call regcache_read_pc.
1516 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1517 argument pc.
1518
d8020970
YQ
15192016-01-26 Yao Qi <yao.qi@linaro.org>
1520
1521 * linux-low.c (install_software_single_step_breakpoints): Call
1522 regcache_read_pc instead of get_pc.
1523
8b207339
YQ
15242016-01-26 Yao Qi <yao.qi@linaro.org>
1525
1526 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1527 (unblock_async_io): Rename to ...
1528 (block_unblock_async_io): ... it. New function.
1529 (enable_async_io): Don't install SIGIO handler. Unblock it
1530 instead.
1531 (disable_async_io): Don't ignore SIGIO. Block it instead.
1532 (initialize_async_io): Install SIGIO handler. Don't call
1533 unblock_async_io.
1534
18879fef
YQ
15352016-01-26 Yao Qi <yao.qi@linaro.org>
1536
1537 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1538 first character is '\003', call *the_target->request_interrupt.
1539
a0f8e08a
YQ
15402016-01-25 Yao Qi <yao.qi@linaro.org>
1541
1542 * remote-utils.c (new_thread_notify): Remove.
1543 (dead_thread_notify): Likewise.
1544 * remote-utils.h (new_thread_notify): Remove declaration.
1545 (dead_thread_notify): Likewise.
1546
cc5fd9ab
MK
15472016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1548
1549 * gdb.trace/pending.exp: Fix expected message on continue.
1550
99e8eb11
MK
15512016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1552
1553 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1554 it works properly on big-endian machines where sizeof (CORE_ADDR)
1555 != sizeof (void *).
1556
a994041d
PA
15572016-01-21 Pedro Alves <palves@redhat.com>
1558
1559 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1560 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1561 * configure: Regenerate.
1562
f7a6a40d
YQ
15632016-01-21 Yao Qi <yao.qi@linaro.org>
1564
1565 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1566 is_thumb and set it according to CPSR saved on the stack.
1567 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1568 arm_sigreturn_next_pc.
1569
6f69e520
YQ
15702016-01-18 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-low.c (linux_set_pc_64bit): New function.
1573 (linux_get_pc_64bit): New function.
1574 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1575 Declare.
1576 * linux-sparc-low.c (debug_threads): Remove declaration.
1577 (sparc_get_pc): Remove.
1578 (the_low_target): Use linux_get_pc_64bit instead of
1579 sparc_get_pc.
1580 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1581 (the_low_target): Use linux_get_pc_64bit and
1582 linux_set_pc_64bit.
1583
276d4552
YQ
15842016-01-18 Yao Qi <yao.qi@linaro.org>
1585
1586 * linux-arm-low.c (debug_threads): Remove declaration.
1587 (arm_get_pc, arm_set_pc): Remove.
1588 (the_low_target): Use linux_get_pc_32bit and
1589 linux_set_pc_32bit.
1590 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1591 (the_low_target): Use linux_get_pc_32bit and
1592 linux_set_pc_32bit.
1593 * linux-cris-low.c (debug_threads): Remove declaration.
1594 (cris_get_pc, cris_set_pc,): Remove.
1595 (the_low_target): Use linux_get_pc_32bit and
1596 linux_set_pc_32bit.
1597 * linux-crisv32-low.c (debug_threads): Remove declaration.
1598 (cris_get_pc, cris_set_pc): Remove.
1599 (the_low_target): Use linux_get_pc_32bit and
1600 linux_set_pc_32bit.
1601 * linux-low.c: Include inttypes.h.
1602 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1603 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1604 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1605 (the_low_target): Use linux_get_pc_32bit and
1606 linux_set_pc_32bit.
1607 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1608 (the_low_target): Use linux_get_pc_32bit and
1609 linux_set_pc_32bit.
1610 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1611 (the_low_target): Use linux_get_pc_32bit and
1612 linux_set_pc_32bit.
1613 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1614 (the_low_target): Use linux_get_pc_32bit and
1615 linux_set_pc_32bit.
1616 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1617 (the_low_target): Use linux_get_pc_32bit and
1618 linux_set_pc_32bit.
1619
eb0edac8
GB
16202016-01-18 Gary Benson <gbenson@redhat.com>
1621
1622 * configure.ac (AC_FUNC_FORK): New check.
1623 * config.in: Regenerate.
1624 * configure: Likewise.
1625
1b451dda
YQ
16262016-01-14 Yao Qi <yao.qi@linaro.org>
1627
1628 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1629 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1630 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1631 arm_get_next_pcs_ctor.
1632
82075af2
JS
16332016-01-12 Josh Stone <jistone@redhat.com>
1634 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1635
1636 * inferiors.h: Include "gdb_vecs.h".
1637 (struct process_info): Add syscalls_to_catch.
1638 * inferiors.c (remove_process): Free syscalls_to_catch.
1639 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1640 syscall_return stops.
1641 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1642 * server.c (handle_general_set): Handle QCatchSyscalls.
1643 (handle_query): Report support for QCatchSyscalls.
1644 * target.h (struct target_ops): Add supports_catch_syscall.
1645 (target_supports_catch_syscall): New macro.
1646 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1647 (struct lwp_info): Add syscall_state.
1648 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1649 Maintain syscall_state and syscalls_to_catch across exec.
1650 (get_syscall_trapinfo): New function, proxy to the_low_target.
1651 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1652 (linux_low_filter_event): Toggle syscall_state entry/return for
1653 syscall traps, and set it ignored for all others.
1654 (gdb_catching_syscalls_p): New function.
1655 (gdb_catch_this_syscall_p): New function.
1656 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1657 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1658 (linux_supports_catch_syscall): New function.
1659 (linux_target_ops): Install it.
1660 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1661 (the_low_target): Install it.
1662
8f13a3ce
MF
16632016-01-12 Mike Frysinger <vapier@gentoo.org>
1664
1665 * acinclude.m4: Include new ../warning.m4 file.
1666 * configure: Regenerated.
1667 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1668
5b3da067
MF
16692016-01-12 Mike Frysinger <vapier@gentoo.org>
1670
1671 * ax.c (is_goto_target): Mark static.
1672 * linux-low.c (register_addr): Likewise.
1673 (linux_fetch_registers, linux_store_registers): Likewise.
1674 * mem-break.c (any_persistent_commands): Fix old prototype.
1675 (add_commands_to_breakpoint): Mark static.
1676 * regcache.c (find_register_by_name): Delete unused func.
1677 * remote-utils.c (hex_or_minus_one): Mark static.
1678 * server.c (monitor_show_help): Mark static.
1679 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1680 handle_v_requests): Likewise.
1681
bc504a31
PA
16822016-01-12 Pedro Alves <palves@redhat.com>
1683
1684 Remove use of the registered trademark symbol throughout.
1685
5a0dd67a
YQ
16862016-01-08 Yao Qi <yao.qi@linaro.org>
1687
1688 * remote-utils.c (getpkt): If c is '\003', call target hook
1689 request_interrupt.
1690
b2ca446f
YQ
16912016-01-06 Yao Qi <yao.qi@linaro.org>
1692
1693 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1694 linux-aarch32-low.c.
1695 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1696 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1697 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1698 (thumb2_breakpoint): Declare.
1699 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1700 linux-aarch32-low.h.
1701 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1702 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1704
edd88788
JB
17052016-01-01 Joel Brobecker <brobecker@adacore.com>
1706
1707 * gdbreplay.c (gdbreplay_version): Change copyright year in
1708 version message.
1709 * server.c (gdbserver_version): Likewise.
1710
65da7f14
PP
17112015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1712
1713 * server.c (crc32_table): Delete.
1714 (crc32): Use libiberty's xcrc32 function.
1715
4abd5ed2
JB
17162015-12-22 Joel Brobecker <brobecker@adacore.com>
1717
1718 * lynx-low.c (lynx_delete_thread_callback): New function.
1719 (lynx_mourn): Properly delete our process and all of its
1720 threads. Remove call to clear_inferiors.
1721
0e50fe5c
JB
17222015-12-22 Joel Brobecker <brobecker@adacore.com>
1723
1724 * target.c (thread_search_callback): Add check that
1725 the thread_stopped target callback is not NULL before
1726 calling it.
1727
35adc03f
YQ
17282015-12-21 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1731 arm breakpoint.
1732
bd2b2909
AT
17332015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1734
1735 * server.c (handle_query): Call target_supports_software_single_step.
1736
7fe5e27e
AT
17372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1738
1739 * linux-low.c (single_step): New function.
1740 (linux_resume_one_lwp_throw): Call single_step.
1741 (start_step_over): Likewise.
1742
d9311bfa
AT
17432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1744
1745 * Makefile.in (SFILES): Append arch/arm-linux.c,
1746 arch/arm-get-next-pcs.c.
1747 (arm-linux.o): New rule.
1748 (arm-get-next-pcs.o): New rule.
1749 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1750 arm-linux.o.
1751 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1752 to linux-aarch32-low.c.
1753 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1754 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1755 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1756 (thumb2_breakpoint_len): Likewise.
1757 (arm_is_thumb_mode): Make non-static.
1758 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1759 from linux-aarch32-low.c.
1760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1761 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1762 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1763 (thumb2_breakpoint_len): Likewise.
1764 (arm_is_thumb_mode): New declaration.
1765 * linux-arm-low.c: Include arch/arm-linux.h
1766 aarch/arm-get-next-pcs.h, sys/syscall.h.
1767 (get_next_pcs_ops): New struct.
1768 (get_next_pcs_addr_bits_remove): New function.
1769 (get_next_pcs_is_thumb): New function.
1770 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1771 (arm_sigreturn_next_pc): Likewise.
1772 (get_next_pcs_syscall_next_pc): Likewise.
1773 (arm_gdbserver_get_next_pcs): Likewise.
1774 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1775 Initialize.
1776 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1777 * server.h: Include gdb_vecs.h.
1778
68ce2059
AT
17792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1780
1781 * Makefile.in (SFILES): Append common/common-regcache.c.
1782 (OBS): Append common-regcache.o.
1783 (common-regcache.o): New rule.
1784 * regcache.c (init_register_cache): Initialize cache to
1785 REG_UNAVAILABLE.
1786 (regcache_raw_read_unsigned): New function.
1787 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1788 register_status enum.
1789
fa5308bd
AT
17902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1791
1792 * linux-aarch64-low.c (the_low_targets): Rename
1793 breakpoint_reinsert_addr to get_next_pcs.
1794 * linux-arm-low.c (the_low_targets): Likewise.
1795 * linux-bfin-low.c (the_low_targets): Likewise.
1796 * linux-cris-low.c (the_low_targets): Likewise.
1797 * linux-crisv32-low.c (the_low_targets): Likewise.
1798 * linux-low.c (can_software_single_step): Likewise.
1799 (install_software_single_step_breakpoints): New function.
1800 (start_step_over): Use install_software_single_step_breakpoints.
1801 * linux-low.h: New CORE_ADDR vector.
1802 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1803 get_next_pcs.
1804 * linux-mips-low.c (the_low_targets): Likewise.
1805 * linux-nios2-low.c (the_low_targets): Likewise.
1806 * linux-sparc-low.c (the_low_targets): Likewise.
1807
4a6ed09b
PA
18082015-12-17 Pedro Alves <palves@redhat.com>
1809
1810 * linux-low.c (linux_kill_one_lwp): Remove references to
1811 LinuxThreads.
1812 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1813 to 'kill'.
1814 (linux_init_signals): Delete.
1815 (initialize_low): Adjust.
1816 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1817
7544db95
PA
18182015-12-16 Pedro Alves <palves@redhat.com>
1819
1820 * configure.ac (compiler warning flags): When testing a
1821 -Wno-foo option, check whether -Wfoo works instead.
1822 * configure: Regenerate.
1823
8020350c
DB
18242015-12-11 Don Breazeal <donb@codesourcery.com>
1825
1826 * server.c (process_serial_event): Don't exit from gdbserver
1827 in remote mode if there are still active inferiors.
1828
db91f502
YQ
18292015-12-11 Yao Qi <yao.qi@linaro.org>
1830
1831 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1832 arm_breakpoint_at if the process is 32-bit.
1833
b37a6290
YQ
18342015-12-11 Yao Qi <yao.qi@linaro.org>
1835
1836 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1837 arm breakpoint.
1838
17b1509a
YQ
18392015-12-07 Yao Qi <yao.qi@linaro.org>
1840
1841 * configure.srv: Append arm.o to srv_tgtobj for
1842 aarch64*-*-linux* target.
1843 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1844 from linux-arm-low.c.
1845 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1846 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1847 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1848 (thumb2_breakpoint_len): Likewise.
1849 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1850 (arm_breakpoint_kinds): Likewise.
1851 (arm_breakpoint_kind_from_pc): Likewise.
1852 (arm_sw_breakpoint_from_kind): Likewise.
1853 (arm_breakpoint_kind_from_current_state): Likewise.
1854 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1855 (arm_sw_breakpoint_from_kind): Declare.
1856 (arm_breakpoint_kind_from_current_state): Declare.
1857 (arm_breakpoint_at): Declare.
1858 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1859 arm_sw_breakpoint_from_kind if process is 32-bit.
1860 (aarch64_breakpoint_kind_from_pc): New function.
1861 (aarch64_breakpoint_kind_from_current_state): New function.
1862 (the_low_target): Initialize fields breakpoint_kind_from_pc
1863 and breakpoint_kind_from_current_state.
1864 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1865 linux-aarch32-low.c.
1866 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1867 (arm_breakpoint, arm_breakpoint_len): Likewise.
1868 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1869 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1870 (arm_is_thumb_mode): Likewise.
1871 (arm_breakpoint_at): Likewise.
1872 (arm_breakpoint_kind_from_pc): Likewise.
1873 (arm_sw_breakpoint_from_kind): Likewise.
1874 (arm_breakpoint_kind_from_current_state): Likewise.
1875
1876 Revert:
1877 2015-08-04 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1880 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1881 * server.c (extended_protocol): Remove "static".
1882 * server.h (extended_protocol): Declare it.
1883
ece66d65
JS
18842015-12-04 Josh Stone <jistone@redhat.com>
1885
1886 * target.h (struct target_ops) <arch_setup>: Rename to ...
1887 (struct target_ops) <post_create_inferior>: ... this.
1888 (target_arch_setup): Rename to ...
1889 (target_post_create_inferior): ... this, calling post_create_inferior.
1890 * server.c (start_inferior): Update target_arch_setup calls to
1891 target_post_create_inferior.
1892 * linux-low.c (linux_low_ptrace_options): Forward declare.
1893 (linux_arch_setup): Update its comment for general use.
1894 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1895 (struct linux_target_ops): Use linux_post_create_inferior.
1896 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1897 to post_create_inferior.
1898 * nto-low.c (struct nto_target_ops): Likewise.
1899 * spu-low.c (struct spu_target_ops): Likewise.
1900 * win32-low.c (struct win32_target_ops): Likewise.
1901
e58c48b4
AT
19022015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1903
1904 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1905
fbec8956
AT
19062015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1907
1908 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1909 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1910 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1911 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1912 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1913 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1914 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1915 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1916 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1917 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1918 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1919 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1920
9b4c5f87
AT
19212015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1922
1923 * linux-low.c (linux_look_up_symbols): Don't call
1924 linux_supports_traceclone.
1925 * linux-low.h (thread_db_init): Remove use_events argument.
1926 * thread-db.c (thread_db_use_event): Remove global variable.
1927 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1928 (struct thread_db) <td_create_bp>: Remove field.
1929 (thread_db_create_event): Remove function.
1930 (thread_db_enable_reporting): Likewise.
1931 (find_one_thread): Don't check for thread_db_use_events.
1932 (attach_thread): Likewise.
1933 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1934 (try_thread_db_load_1): Don't check for thread_db_use_events.
1935 (thread_db_init): Remove use_events argument and thread events
1936 handling.
1937 (remove_thread_event_breakpoints): Remove function.
1938 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1939
7d00775e
AT
19402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1941
1942 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1943 New function.
1944 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1945 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1947 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1948 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1949 Initialize.
1950 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1951 New function.
1952 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1953 * linux-low.c (can_hardware_single_step): Use
1954 supports_hardware_single_step.
1955 (can_software_single_step): New function.
1956 (start_step_over): Call can_software_single_step.
1957 (linux_supports_hardware_single_step): New function.
1958 (struct target_ops) <supports_software_single_step>: Initialize.
1959 * linux-low.h (struct linux_target_ops)
1960 <supports_hardware_single_step>: Initialize.
1961 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1963 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1964 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1965 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1966 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1967 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1968 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1969 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1970 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1971 Initialize.
1972 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1973 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1974 Initialize.
1975 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1977 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1978 New function.
1979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1980 * target.h (struct target_ops): <supports_software_single_step>:
1981 New field.
1982 (target_supports_software_single_step): New macro.
1983
2d97cd35
AT
19842015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1985
1986 * linux-low.c (linux_wait_1): Fix pc advance condition.
1987 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1988 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1989
769ef81f
AT
19902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1991
1992 * linux-arm-low.c (arm_is_thumb_mode): New function.
1993 (arm_breakpoint_at): Use arm_is_thumb_mode.
1994 (arm_breakpoint_kind_from_current_state): New function.
1995 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1996 Initialize.
1997 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1998 (linux_breakpoint_kind_from_current_state): New function.
1999 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2000 * linux-low.h (struct linux_target_ops)
2001 <breakpoint_kind_from_current_state>: New field.
2002 * target.h (struct target_ops): Likewise.
2003 (target_breakpoint_kind_from_current_state): New macro.
2004
1bebeeca
PA
20052015-11-30 Pedro Alves <palves@redhat.com>
2006
2007 * linux-low.c (linux_resume): Wake up the event loop before
2008 returning.
2009
a67a9fae
PA
20102015-11-30 Pedro Alves <palves@redhat.com>
2011
2012 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2013 check.
2014 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2015 to -1.
2016 * target.c (struct thread_search): New structure.
2017 (thread_search_callback): New function.
2018 (prev_general_thread): New global.
2019 (prepare_to_access_memory, done_accessing_memory): New functions.
2020 * target.h (prepare_to_access_memory, done_accessing_memory):
2021 Replace macros with function declarations.
2022
f2faf941
PA
20232015-11-30 Pedro Alves <palves@redhat.com>
2024
2025 PR 14618
2026 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2027 report TARGET_WAITKIND_NO_RESUMED.
2028 * remote-utils.c (prepare_resume_reply): Handle
2029 TARGET_WAITKIND_NO_RESUMED.
2030 * server.c (report_no_resumed): New global.
2031 (handle_query) <qSupported>: Handle "no-resumed+". Report
2032 "no-resumed+" support.
2033 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2034 return error if the client doesn't support no-resumed events.
2035 (push_stop_notification): New function.
2036 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2037 events if the client supports them.
2038
a681f9c9
PA
20392015-11-30 Pedro Alves <palves@redhat.com>
2040
2041 * linux-low.c (thread_still_has_status_pending_p): Don't check
2042 vCont;t here.
2043 (lwp_resumed): New function.
2044 (status_pending_p_callback): Return early if the LWP is not
2045 supposed to be resumed.
2046
65706a29
PA
20472015-11-30 Pedro Alves <palves@redhat.com>
2048
2049 * linux-low.c (handle_extended_wait): Assert that the LWP's
2050 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2051 thread create events, leave the new child's status pending.
2052 (linux_low_filter_event): If GDB wants to hear about thread exit
2053 events, leave the LWP marked dead and don't delete it.
2054 (linux_wait_for_event_filtered): Don't check for thread exit.
2055 (filter_exit_event): New function.
2056 (linux_wait_1): Use it, when returning an exit event.
2057 (linux_resume_one_lwp_throw): Assert that the LWP's
2058 waitstatus is TARGET_WAITKIND_IGNORE.
2059 * remote-utils.c (prepare_resume_reply): Handle
2060 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2061 * server.c (report_thread_events): New global.
2062 (handle_general_set): Handle QThreadEvents.
2063 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2064 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2065 TARGET_WAITKIND_THREAD_EXITED.
2066 * server.h (report_thread_events): Declare.
2067
56cf4bed
PA
20682015-11-30 Pedro Alves <palves@redhat.com>
2069
2070 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2071 the thread's last_resume_kind was resume_stop.
2072
500c1d85
PA
20732015-11-30 Pedro Alves <palves@redhat.com>
2074
2075 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2076 before returning.
2077
de979965
PA
20782015-11-30 Pedro Alves <palves@redhat.com>
2079
2080 * server.c (handle_v_requests): Handle vCtrlC.
2081
34c65914
PA
20822015-11-30 Pedro Alves <palves@redhat.com>
2083
2084 * gdbthread.h (find_any_thread_of_pid): Declare.
2085 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2086 functions.
2087 * server.c (handle_query): If current_thread is NULL, look for
2088 another thread of the selected process.
2089
79efa585 20902015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2091 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2092
2093 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2094 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2095 name in reply.
2096 * target.h (struct target_ops) <thread_name>: New field.
2097 (target_thread_name): New macro.
2098
80d82c19
JB
20992015-11-23 Joel Brobecker <brobecker@adacore.com>
2100
2101 * regcache.h (regcache_invalidate_pid): Add declaration.
2102 * regcache.c (regcache_invalidate_pid): New function, extracted
2103 from regcache_invalidate.
2104 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2105 Add trivial documentation comment.
2106 * lynx-low.c: Use regcache_invalidate_pid instead of
2107 regcache_invalidate.
2108
64da5dd5
JB
21092015-11-23 Joel Brobecker <brobecker@adacore.com>
2110
2111 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2112 and Elf64_auxv_t if the target is Android.
2113
37ce4055
DE
21142015-11-22 Doug Evans <xdje42@gmail.com>
2115
2116 * target.h: #include <sys/types.h>.
2117
06e03fff
PA
21182015-11-19 Pedro Alves <palves@redhat.com>
2119
2120 * linux-low.c (linux_process_qsupported): Change prototype.
2121 Adjust.
2122 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2123 Change prototype.
2124 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2125 and adjust to loop over all features.
2126 * server.c (handle_query) <qSupported>: Adjust to call
2127 target_process_qsupported once, passing it a vector of unprocessed
2128 features.
2129 * target.h (struct target_ops) <process_qsupported>: Change
2130 prototype.
2131 (target_process_qsupported): Adjust.
2132
9a084706
PA
21332015-11-19 Pedro Alves <palves@redhat.com>
2134
2135 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2136 mode.
2137 * configure: Regenerate.
2138
dad44a1f
PA
21392015-11-19 Pedro Alves <palves@redhat.com>
2140
2141 * configure: Regenerate.
2142
231c0592
YQ
21432015-11-19 Yao Qi <yao.qi@linaro.org>
2144
2145 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2146 type to uint32_t.
2147
6c1c9a8b
YQ
21482015-11-19 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2151 (struct aarch64_operand): Move enum out.
2152
9caa3311
YQ
21532015-11-19 Yao Qi <yao.qi@linaro.org>
2154
2155 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2156 struct user_fpsimd_state *.
2157 (aarch64_store_fpregset): Likewise.
2158
6a69a054
YQ
21592015-11-19 Yao Qi <yao.qi@linaro.org>
2160
2161 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2162 struct user_pt_regs *.
2163 (aarch64_store_gregset): Likewise.
2164
1798301e
PA
21652015-11-18 Pedro Alves <palves@redhat.com>
2166
2167 * Makefile.in (all_object_files): Add $IPA_OBJS.
2168
ce7715e2
PA
21692015-11-17 Pedro Alves <palves@redhat.com>
2170
2171 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2172 GDB_SIGNAL_0 and gdb_signal_to_string.
2173
c0879059
PA
21742015-11-17 Pedro Alves <palves@redhat.com>
2175
2176 * win32-low.c (handle_output_debug_string): Remove parameter.
2177 (win32_kill): Remove our_status local and adjust call to
2178 handle_output_debug_string.
2179 (get_child_debug_event): Adjust call to
2180 handle_output_debug_string.
2181
1996e237
SM
21822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2183
2184 * linux-mips-low.c (mips_fill_gregset): Add cast.
2185 (mips_store_gregset): Likewise.
2186 (mips_fill_fpregset): Likewise.
2187 (mips_store_fpregset): Likewise.
2188
cbec665b
SM
21892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2190
2191 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2192 priv.
2193
eb3e3c67
SM
21942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2195
2196 * linux-mips-low.c (mips_linux_new_thread): Change type of
2197 watch_type to enum target_hw_bp_type.
2198
171de4b8
SM
21992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2200
2201 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2202 Change return type to arm_hwbp_type.
2203
04248ead
SM
22042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2205
2206 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2207 (arm_store_gregset): Likewise.
2208 * linux-arm-low.c (arm_get_hwcap): Likewise.
2209 (arm_read_description): Likewise.
2210
04b3479c
SM
22112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2212
2213 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2214
2bc84e8a
SM
22152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2216
2217 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2218 (ppc_fill_vsxregset): Likewise.
2219 (ppc_store_vsxregset): Likewise.
2220 (ppc_fill_vrregset): Likewise.
2221 (ppc_store_vrregset): Likewise.
2222 (ppc_fill_evrregset): Likewise.
2223 (ppc_store_evrregset): Likewise.
2224
e6c5bb05
SM
22252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2226
2227 * linux-ppc-low.c (ppc_usrregs_info): Remove
2228 forward-declaration.
2229 (ppc_arch_setup): Move lower in file.
2230
7ea45d72
SM
22312015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2232
2233 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2234 (ps_pdwrite): Likewise.
2235
69291610
HW
22362015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2237
2238 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2239 to after assert checks.
2240
b42945fd
SM
22412015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * proc-service.c (ps_pdread): Add/adjust casts.
2244 (ps_pdwrite): Add/adjust casts.
2245
d6f85c84
SM
22462015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2247
2248 * server.c (handle_search_memory_1): Cast return value of
2249 memmem.
2250
f98cd059
SM
22512015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2252
2253 * server.c (write_qxfer_response): Change type of data to
2254 gdb_byte *.
2255
d2412fa5
PA
22562015-10-29 Pedro Alves <palves@redhat.com>
2257
2258 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2259
c17414a2
PA
22602015-10-29 Pedro Alves <palves@redhat.com>
2261
2262 * tracepoint.c (clear_installed_tracepoints): Add casts.
2263
e053fbc4
PA
22642015-10-29 Pedro Alves <palves@redhat.com>
2265
2266 * server.c (handle_v_cont, process_serial_event): Add enum
2267 gdb_signal casts to signal parsing code.
2268
add67df8
PA
22692015-10-29 Pedro Alves <palves@redhat.com>
2270
2271 * linux-low.h (NULL_REGSET): Define.
2272 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2273 * linux-arm-low.c (arm_regsets): Likewise.
2274 * linux-crisv32-low.c (cris_regsets): Likewise.
2275 * linux-m68k-low.c (m68k_regsets): Likewise.
2276 * linux-mips-low.c (mips_regsets): Likewise.
2277 * linux-nios2-low.c (nios2_regsets): Likewise.
2278 * linux-ppc-low.c (ppc_regsets): Likewise.
2279 * linux-s390-low.c (s390_regsets): Likewise.
2280 * linux-sh-low.c (sh_regsets): Likewise.
2281 * linux-sparc-low.c (sparc_regsets): Likewise.
2282 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2283 * linux-tile-low.c (tile_regsets): Likewise.
2284 * linux-x86-low.c (x86_regsets): Likewise.
2285 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2286
50bc912a
PA
22872015-10-29 Pedro Alves <palves@redhat.com>
2288
2289 * linux-low.h (NULL_REGSET): Define.
2290 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2291 * linux-arm-low.c (arm_regsets): Likewise.
2292 * linux-crisv32-low.c (cris_regsets): Likewise.
2293 * linux-m68k-low.c (m68k_regsets): Likewise.
2294 * linux-mips-low.c (mips_regsets): Likewise.
2295 * linux-nios2-low.c (nios2_regsets): Likewise.
2296 * linux-ppc-low.c (ppc_regsets): Likewise.
2297 * linux-s390-low.c (s390_regsets): Likewise.
2298 * linux-sh-low.c (sh_regsets): Likewise.
2299 * linux-sparc-low.c (sparc_regsets): Likewise.
2300 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2301 * linux-tile-low.c (tile_regsets): Likewise.
2302 * linux-x86-low.c (x86_regsets): Likewise.
2303 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2304
682b2546
DE
23052015-10-26 Doug Evans <dje@google.com>
2306
2307 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2308
963843d4
DE
23092015-10-26 Doug Evans <dje@google.com>
2310
2311 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2312
d41401ac
DE
23132015-10-26 Doug Evans <dje@google.com>
2314
2315 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2316 for debug_printf.
2317 (attach_thread, find_new_threads_callback): Ditto.
2318
3db28855
AT
23192015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2320
2321 * mem-break.h (set_breakpoint_data): Remove.
2322
fb78e89c
AT
23232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2324
2325 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2326 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2327 (initialize_low): Remove set_breakpoint_data call.
2328 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2329 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2330 (initialize_low): Remove set_breakpoint_data call.
2331 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2332 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2333 (initialize_low): Remove set_breakpoint_data call.
2334
2e6ee069
AT
23352015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2336
2337 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2338 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2339 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2340 * target.h (target_breakpoint_kind_from_pc): New macro.
2341
1652a986
AT
23422015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2343
2344 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2345 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2346 the default breakpoint kind.
2347
abeead09
AT
23482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2349
2350 * linux-arm-low.c (arm_supports_z_point_type): Add software
2351 breakpoint support.
2352
b0b4b501
AT
23532015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2354
2355 * linux-arm-low.c: Refactor breakpoint definitions.
2356 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2357 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2358
8689682c
AT
23592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2360
2361 * Makefile.in: Add arm.c/o.
2362 * configure.srv: Likewise.
2363 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2364 (arm_breakpoint_kind_from_pc): New function.
2365 (arm_sw_breakpoint_from_kind): Return proper kind.
2366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2367
27165294
AT
23682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2369
2370 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2371 removal.
2372 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2373 (struct raw_breakpoint) <size>: Remove.
2374 (struct raw_breakpoint) <kind>: Add.
2375 (bp_size): New function.
2376 (bp_opcode): Likewise.
2377 (find_raw_breakpoint_at): Adjust for kind.
2378 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2379 (remove_memory_breakpoint): Adjust for kind call bp_size.
2380 (set_raw_breakpoint_at): Adjust for kind.
2381 (set_breakpoint): Likewise.
2382 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2383 (delete_raw_breakpoint): Adjust for kind.
2384 (delete_breakpoint): Likewise.
2385 (find_gdb_breakpoint): Likewise.
2386 (set_gdb_breakpoint_1): Likewise.
2387 (set_gdb_breakpoint): Likewise.
2388 (delete_gdb_breakpoint_1): Likewise.
2389 (delete_gdb_breakpoint): Likewise.
2390 (uninsert_raw_breakpoint): Likewise.
2391 (reinsert_raw_breakpoint): Likewise.
2392 (set_breakpoint_data): Remove.
2393 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2394 (check_mem_read): Adjust for kind call bp_size.
2395 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2396 (clone_one_breakpoint): Adjust for kind.
2397 * mem-break.h (set_gdb_breakpoint): Likewise.
2398 (delete_gdb_breakpoint): Likewise.
2399 * server.c (process_serial_event): Likewise.
2400
dd373349
AT
24012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2402
2403 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2404 (struct linux_target_ops) <breakpoint>: Remove.
2405 (struct linux_target_ops) <breakpoint_len>: Remove.
2406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2408 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2409 (arm_sw_breakpoint_from_kind): New function.
2410 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2411 (struct linux_target_ops) <breakpoint>: Remove.
2412 (struct linux_target_ops) <breakpoint_len>: Remove.
2413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2415 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2416 (struct linux_target_ops) <breakpoint>: Remove.
2417 (struct linux_target_ops) <breakpoint_len>: Remove.
2418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2420 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2421 (struct linux_target_ops) <breakpoint>: Remove.
2422 (struct linux_target_ops) <breakpoint_len>: Remove.
2423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2425 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2426 and sw_breakpoint_from_kind to increment the pc.
2427 (linux_breakpoint_kind_from_pc): New function.
2428 (linux_sw_breakpoint_from_kind): New function.
2429 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2430 (initialize_low): Call breakpoint_kind_from_pc and
2431 sw_breakpoint_from_kind to replace breakpoint_data/len.
2432 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2433 New field.
2434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2435 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2436 (struct linux_target_ops) <breakpoint>: Remove.
2437 (struct linux_target_ops) <breakpoint_len>: Remove.
2438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2440 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2441 (struct linux_target_ops) <breakpoint>: Remove.
2442 (struct linux_target_ops) <breakpoint_len>: Remove.
2443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2445 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2446 (struct linux_target_ops) <breakpoint>: Remove.
2447 (struct linux_target_ops) <breakpoint_len>: Remove.
2448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2450 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2451 (struct linux_target_ops) <breakpoint>: Remove.
2452 (struct linux_target_ops) <breakpoint_len>: Remove.
2453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2455 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2456 (struct linux_target_ops) <breakpoint>: Remove.
2457 (struct linux_target_ops) <breakpoint_len>: Remove.
2458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2460 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2461 (struct linux_target_ops) <breakpoint>: Remove.
2462 (struct linux_target_ops) <breakpoint_len>: Remove.
2463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2465 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2466 (struct linux_target_ops) <breakpoint>: Remove.
2467 (struct linux_target_ops) <breakpoint_len>: Remove.
2468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2470 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2471 (struct linux_target_ops) <breakpoint>: Remove.
2472 (struct linux_target_ops) <breakpoint_len>: Remove.
2473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2475 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2476 (struct linux_target_ops) <breakpoint>: Remove.
2477 (struct linux_target_ops) <breakpoint_len>: Remove.
2478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2480 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2481 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2482 (struct linux_target_ops) <breakpoint>: Remove.
2483 (struct linux_target_ops) <breakpoint_len>: Remove.
2484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2486 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2487 (struct linux_target_ops) <breakpoint>: Remove.
2488 (struct linux_target_ops) <breakpoint_len>: Remove.
2489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2491
4cd98a19
AT
24922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2493
2494 * linux-cris-low.c (cris_get_pc): Remove void arg.
2495
774ee6d2
AR
24962015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2497
2498 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2499 variable name.
2500
833dcd29
AR
25012015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2502
2503 * inferiors.c (thread_pid_matches_callback): New function.
2504 (find_thread_process): New function.
2505 (remove_thread): Reset current_thread.
2506 (remove_process): Assert threads have been removed first.
2507
8d689ee5
YQ
25082015-10-15 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2511 if it is 3.
2512 (aarch64_remove_point): Likewise.
2513 * regcache.c (regcache_register_size): New function.
2514
1c2e1515
YQ
25152015-10-12 Yao Qi <yao.qi@linaro.org>
2516
2517 * linux-aarch64-low.c: Update all callers as emit_load_store
2518 is renamed to aarch64_emit_load_store.
2519
e1c587c3
YQ
25202015-10-12 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-aarch64-low.c: Update all callers of function renaming
2523 from emit_insn to aarch64_emit_insn.
2524
b6542f81
YQ
25252015-10-12 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2528 arch/aarch64-insn.h.
2529 (struct aarch64_memory_operand): Likewise.
2530 (ENCODE): Likewise.
2531 (emit_insn): Move to arch/aarch64-insn.c.
2532 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2533 (emit_load_store): Move to arch/aarch64-insn.c.
2534 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2535 (can_encode_int32): Remove.
2536
246994ce
YQ
25372015-10-12 Yao Qi <yao.qi@linaro.org>
2538
2539 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2540 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2541 (aarch64_relocate_instruction): Likewise.
2542 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2543 (struct aarch64_insn_visitor): Likewise.
2544
0badd99f
YQ
25452015-10-12 Yao Qi <yao.qi@linaro.org>
2546
2547 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2548 (struct aarch64_insn_visitor): New.
2549 (struct aarch64_insn_relocation_data): New.
2550 (aarch64_ftrace_insn_reloc_b): New function.
2551 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2552 (aarch64_ftrace_insn_reloc_cb): Likewise.
2553 (aarch64_ftrace_insn_reloc_tb): Likewise.
2554 (aarch64_ftrace_insn_reloc_adr): Likewise.
2555 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2556 (aarch64_ftrace_insn_reloc_others): Likewise.
2557 (visitor): New.
2558 (aarch64_relocate_instruction): Use visitor.
2559
dfaffe9d
YQ
25602015-10-12 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2563 int. Add argument buf.
2564 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2565 aarch64_relocate_instruction.
2566
70b439f0
YQ
25672015-10-12 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2570 argument insn. Remove local variable insn. Don't call
2571 target_read_uint32.
2572 (aarch64_install_fast_tracepoint_jump_pad): Call
2573 target_read_uint32.
2574
7781c06f
YQ
25752015-09-30 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2578 (emit_load_store_pair): Likewise.
2579
9a3c8263
SM
25802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2581
2582 * dll.c (match_dll): Add cast(s).
2583 (unloaded_dll): Likewise.
2584 * linux-low.c (second_thread_of_pid_p): Likewise.
2585 (delete_lwp_callback): Likewise.
2586 (count_events_callback): Likewise.
2587 (select_event_lwp_callback): Likewise.
2588 (linux_set_resume_request): Likewise.
2589 * server.c (accumulate_file_name_length): Likewise.
2590 (emit_dll_description): Likewise.
2591 (handle_qxfer_threads_worker): Likewise.
2592 (visit_actioned_threads): Likewise.
2593 * thread-db.c (any_thread_of): Likewise.
2594 * tracepoint.c (same_process_p): Likewise.
2595 (match_blocktype): Likewise.
2596 (build_traceframe_info_xml): Likewise.
2597
224c3ddb
SM
25982015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2601 assignment.
2602 (gdb_unparse_agent_expr): Likewise.
2603 * hostio.c (require_data): Likewise.
2604 (handle_pread): Likewise.
2605 * linux-low.c (disable_regset): Likewise.
2606 (fetch_register): Likewise.
2607 (store_register): Likewise.
2608 (get_dynamic): Likewise.
2609 (linux_qxfer_libraries_svr4): Likewise.
2610 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2611 (set_fast_tracepoint_jump): Likewise.
2612 (uninsert_fast_tracepoint_jumps_at): Likewise.
2613 (reinsert_fast_tracepoint_jumps_at): Likewise.
2614 (validate_inserted_breakpoint): Likewise.
2615 (clone_agent_expr): Likewise.
2616 * regcache.c (init_register_cache): Likewise.
2617 * remote-utils.c (putpkt_binary_1): Likewise.
2618 (decode_M_packet): Likewise.
2619 (decode_X_packet): Likewise.
2620 (look_up_one_symbol): Likewise.
2621 (relocate_instruction): Likewise.
2622 (monitor_output): Likewise.
2623 * server.c (handle_search_memory): Likewise.
2624 (handle_qxfer_exec_file): Likewise.
2625 (handle_qxfer_libraries): Likewise.
2626 (handle_qxfer): Likewise.
2627 (handle_query): Likewise.
2628 (handle_v_cont): Likewise.
2629 (handle_v_run): Likewise.
2630 (captured_main): Likewise.
2631 * target.c (write_inferior_memory): Likewise.
2632 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2633 * tracepoint.c (init_trace_buffer): Likewise.
2634 (add_tracepoint_action): Likewise.
2635 (add_traceframe): Likewise.
2636 (add_traceframe_block): Likewise.
2637 (cmd_qtdpsrc): Likewise.
2638 (cmd_qtdv): Likewise.
2639 (cmd_qtstatus): Likewise.
2640 (response_source): Likewise.
2641 (response_tsv): Likewise.
2642 (cmd_qtnotes): Likewise.
2643 (gdb_collect): Likewise.
2644 (initialize_tracepoint): Likewise.
2645
afbe19f8
PL
26462015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2647
2648 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2649 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2650 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2651 <NOP>: New.
2652 (enum aarch64_condition_codes): New enum.
2653 (w0): New static global.
2654 (fp): Likewise.
2655 (lr): Likewise.
2656 (struct aarch64_memory_operand) <type>: New
2657 MEMORY_OPERAND_POSTINDEX type.
2658 (postindex_memory_operand): New helper function.
2659 (emit_ret): New function.
2660 (emit_load_store_pair): New function, factored out of emit_stp
2661 with support for MEMORY_OPERAND_POSTINDEX.
2662 (emit_stp): Rewrite using emit_load_store_pair.
2663 (emit_ldp): New function.
2664 (emit_load_store): Likewise.
2665 (emit_ldr): Mention post-index instruction in comment.
2666 (emit_ldrh): New function.
2667 (emit_ldrb): New function.
2668 (emit_ldrsw): Mention post-index instruction in comment.
2669 (emit_str): Likewise.
2670 (emit_subs): New function.
2671 (emit_cmp): Likewise.
2672 (emit_and): Likewise.
2673 (emit_orr): Likewise.
2674 (emit_orn): Likewise.
2675 (emit_eor): Likewise.
2676 (emit_mvn): Likewise.
2677 (emit_lslv): Likewise.
2678 (emit_lsrv): Likewise.
2679 (emit_asrv): Likewise.
2680 (emit_mul): Likewise.
2681 (emit_sbfm): Likewise.
2682 (emit_sbfx): Likewise.
2683 (emit_ubfm): Likewise.
2684 (emit_ubfx): Likewise.
2685 (emit_csinc): Likewise.
2686 (emit_cset): Likewise.
2687 (emit_nop): Likewise.
2688 (emit_ops_insns): New helper function.
2689 (emit_pop): Likewise.
2690 (emit_push): Likewise.
2691 (aarch64_emit_prologue): New function.
2692 (aarch64_emit_epilogue): Likewise.
2693 (aarch64_emit_add): Likewise.
2694 (aarch64_emit_sub): Likewise.
2695 (aarch64_emit_mul): Likewise.
2696 (aarch64_emit_lsh): Likewise.
2697 (aarch64_emit_rsh_signed): Likewise.
2698 (aarch64_emit_rsh_unsigned): Likewise.
2699 (aarch64_emit_ext): Likewise.
2700 (aarch64_emit_log_not): Likewise.
2701 (aarch64_emit_bit_and): Likewise.
2702 (aarch64_emit_bit_or): Likewise.
2703 (aarch64_emit_bit_xor): Likewise.
2704 (aarch64_emit_bit_not): Likewise.
2705 (aarch64_emit_equal): Likewise.
2706 (aarch64_emit_less_signed): Likewise.
2707 (aarch64_emit_less_unsigned): Likewise.
2708 (aarch64_emit_ref): Likewise.
2709 (aarch64_emit_if_goto): Likewise.
2710 (aarch64_emit_goto): Likewise.
2711 (aarch64_write_goto_address): Likewise.
2712 (aarch64_emit_const): Likewise.
2713 (aarch64_emit_call): Likewise.
2714 (aarch64_emit_reg): Likewise.
2715 (aarch64_emit_pop): Likewise.
2716 (aarch64_emit_stack_flush): Likewise.
2717 (aarch64_emit_zero_ext): Likewise.
2718 (aarch64_emit_swap): Likewise.
2719 (aarch64_emit_stack_adjust): Likewise.
2720 (aarch64_emit_int_call_1): Likewise.
2721 (aarch64_emit_void_call_2): Likewise.
2722 (aarch64_emit_eq_goto): Likewise.
2723 (aarch64_emit_ne_goto): Likewise.
2724 (aarch64_emit_lt_goto): Likewise.
2725 (aarch64_emit_le_goto): Likewise.
2726 (aarch64_emit_gt_goto): Likewise.
2727 (aarch64_emit_ge_got): Likewise.
2728 (aarch64_emit_ops_impl): New static global variable.
2729 (aarch64_emit_ops): New target function, return
2730 &aarch64_emit_ops_impl.
2731 (struct linux_target_ops): Install it.
2732
bb903df0
PL
27332015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2734
2735 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2736 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2737 aarch64-ipa.o.
2738 * linux-aarch64-ipa.c: New file.
2739 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2740 and endian.h.
2741 (aarch64_get_thread_area): New target method.
2742 (extract_signed_bitfield): New helper function.
2743 (aarch64_decode_ldr_literal): New function.
2744 (enum aarch64_opcodes): New enum.
2745 (struct aarch64_register): New struct.
2746 (struct aarch64_operand): New struct.
2747 (x0): New static global.
2748 (x1): Likewise.
2749 (x2): Likewise.
2750 (x3): Likewise.
2751 (x4): Likewise.
2752 (w2): Likewise.
2753 (ip0): Likewise.
2754 (sp): Likewise.
2755 (xzr): Likewise.
2756 (aarch64_register): New helper function.
2757 (register_operand): Likewise.
2758 (immediate_operand): Likewise.
2759 (struct aarch64_memory_operand): New struct.
2760 (offset_memory_operand): New helper function.
2761 (preindex_memory_operand): Likewise.
2762 (enum aarch64_system_control_registers): New enum.
2763 (ENCODE): New macro.
2764 (emit_insn): New helper function.
2765 (emit_b): New function.
2766 (emit_bcond): Likewise.
2767 (emit_cb): Likewise.
2768 (emit_tb): Likewise.
2769 (emit_blr): Likewise.
2770 (emit_stp): Likewise.
2771 (emit_ldp_q_offset): Likewise.
2772 (emit_stp_q_offset): Likewise.
2773 (emit_load_store): Likewise.
2774 (emit_ldr): Likewise.
2775 (emit_ldrsw): Likewise.
2776 (emit_str): Likewise.
2777 (emit_ldaxr): Likewise.
2778 (emit_stxr): Likewise.
2779 (emit_stlr): Likewise.
2780 (emit_data_processing_reg): Likewise.
2781 (emit_data_processing): Likewise.
2782 (emit_add): Likewise.
2783 (emit_sub): Likewise.
2784 (emit_mov): Likewise.
2785 (emit_movk): Likewise.
2786 (emit_mov_addr): Likewise.
2787 (emit_mrs): Likewise.
2788 (emit_msr): Likewise.
2789 (emit_sevl): Likewise.
2790 (emit_wfe): Likewise.
2791 (append_insns): Likewise.
2792 (can_encode_int32_in): New helper function.
2793 (aarch64_relocate_instruction): New function.
2794 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2795 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2796 (struct linux_target_ops): Install aarch64_get_thread_area,
2797 aarch64_install_fast_tracepoint_jump_pad and
2798 aarch64_get_min_fast_tracepoint_insn_len.
2799
787749ea
PL
28002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2801
2802 * Makefile.in (aarch64-insn.o): New rule.
2803 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2804
9812b2e6
YQ
28052015-09-21 Yao Qi <yao.qi@linaro.org>
2806
2807 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2808
18fe412b
YQ
28092015-09-21 Yao Qi <yao.qi@linaro.org>
2810
2811 * tracepoint.c (max_jump_pad_size): Remove.
2812
a0cc84cd
YQ
28132015-09-18 Yao Qi <yao.qi@linaro.org>
2814
2815 * linux-aarch64-low.c: Don't include sys/uio.h.
2816 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2817
d78908cf
WW
28182015-09-16 Wei-cheng Wang <cole945@gmail.com>
2819
2820 * tracepoint.c (eval_result_type): Change prototype.
2821 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2822
d57e0d50
PA
28232015-09-15 Pedro Alves <palves@redhat.com>
2824
2825 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2826 Check whether to report exec events instead of checking whether
2827 multiprocess is enabled.
2828
5a676acc
PA
28292015-09-15 Pedro Alves <palves@redhat.com>
2830
2831 PR remote/18965
2832 * remote-utils.c (prepare_resume_reply): Merge
2833 TARGET_WAITKIND_VFORK_DONE switch case with the
2834 TARGET_WAITKIND_FORKED case.
2835
7c5d0fad
YQ
28362015-09-15 Yao Qi <yao.qi@linaro.org>
2837
2838 * server.c (handle_query): Check string comparison using
2839 "else if" instead of "if".
2840
750ce8d1
YQ
28412015-09-15 Yao Qi <yao.qi@linaro.org>
2842
2843 * server.c (vCont_supported): New global variable.
2844 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2845 matches. Append ";vContSupported+" to own_buf.
2846 (handle_v_requests): Append ";s;S" to own_buf if target supports
2847 hardware single step or vCont_supported is false.
2848 (capture_main): Set vCont_supported to zero.
2849
70b90b91
YQ
28502015-09-15 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2853 it to ...
2854 (linux_supports_hardware_single_step): ... New function.
2855 (linux_target_ops): Update.
2856 * lynx-low.c (lynx_target_ops): Set field
2857 supports_hardware_single_step to target_can_do_hardware_single_step.
2858 * nto-low.c (nto_target_ops): Likewise.
2859 * spu-low.c (spu_target_ops): Likewise.
2860 * win32-low.c (win32_target_ops): Likewise.
2861 * target.c (target_can_do_hardware_single_step): New function.
2862 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2863 Remove. <supports_hardware_single_step>: New field.
2864 (target_supports_conditional_breakpoints): Remove.
2865 (target_supports_hardware_single_step): New macro.
2866 (target_can_do_hardware_single_step): Declare.
2867 * server.c (handle_query): Use target_supports_hardware_single_step
2868 instead of target_supports_conditional_breakpoints.
2869
ade90bde
YQ
28702015-09-15 Yao Qi <yao.qi@linaro.org>
2871
2872 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2873 function.
2874 (struct linux_target_ops the_low_target): Install
2875 aarch64_linux_siginfo_fixup.
2876
94585166
DB
28772015-09-11 Don Breazeal <donb@codesourcery.com>
2878 Luis Machado <lgustavo@codesourcery.com>
2879
2880 * linux-low.c (linux_mourn): Static declaration.
2881 (linux_arch_setup): Move in front of
2882 handle_extended_wait.
2883 (linux_arch_setup_thread): New function.
2884 (handle_extended_wait): Handle exec events. Call
2885 linux_arch_setup_thread. Make event_lwp argument a
2886 pointer-to-a-pointer.
2887 (check_zombie_leaders): Do not check stopped threads.
2888 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2889 (linux_low_filter_event): Add lwp and thread for exec'ing
2890 non-leader thread if leader thread has been deleted.
2891 Refactor code into linux_arch_setup_thread and call it.
2892 Pass child lwp pointer by reference to handle_extended_wait.
2893 (linux_wait_for_event_filtered): Update comment.
2894 (linux_wait_1): Prevent clobbering exec event status.
2895 (linux_supports_exec_events): New function.
2896 (linux_target_ops) <supports_exec_events>: Initialize new member.
2897 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2898 new member.
2899 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2900 * server.c (report_exec_events): New global variable.
2901 (handle_query): Handle qSupported query for exec-events feature.
2902 (captured_main): Initialize report_exec_events.
2903 * server.h (report_exec_events): Declare new global variable.
2904 * target.h (struct target_ops) <supports_exec_events>: New
2905 member.
2906 (target_supports_exec_events): New macro.
2907 * win32-low.c (win32_target_ops) <supports_exec_events>:
2908 Initialize new member.
2909
0568462b
MM
29102015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2911
2912 * linux-low.c (linux_low_enable_btrace): Remove.
2913 (linux_target_ops): Replace linux_low_enable_btrace with
2914 linux_enable_btrace.
2915
39edd165
YQ
29162015-09-03 Yao Qi <yao.qi@linaro.org>
2917
2918 * linux-aarch64-low.c (aarch64_insert_point): Call
2919 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2920 returns true.
2921
1db33b5a
UW
29222015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2923
2924 * linux-low.c (check_stopped_by_breakpoint): Use
2925 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2926
ab290430
PA
29272015-08-27 Pedro Alves <palves@redhat.com>
2928
2929 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2930
8d749320
SM
29312015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2932
6711b7f8
SM
2933 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2934 the XNEW-family equivalent.
8d749320
SM
2935 (compile_bytecodes): Likewise.
2936 * dll.c (loaded_dll): Likewise.
2937 * event-loop.c (append_callback_event): Likewise.
2938 (create_file_handler): Likewise.
2939 (create_file_event): Likewise.
2940 * hostio.c (handle_open): Likewise.
2941 * inferiors.c (add_thread): Likewise.
2942 (add_process): Likewise.
2943 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2944 * linux-arm-low.c (arm_new_process): Likewise.
2945 (arm_new_thread): Likewise.
2946 * linux-low.c (add_to_pid_list): Likewise.
2947 (linux_add_process): Likewise.
2948 (handle_extended_wait): Likewise.
2949 (add_lwp): Likewise.
2950 (enqueue_one_deferred_signal): Likewise.
2951 (enqueue_pending_signal): Likewise.
2952 (linux_resume_one_lwp_throw): Likewise.
2953 (linux_resume_one_thread): Likewise.
2954 (linux_read_memory): Likewise.
2955 (linux_write_memory): Likewise.
2956 * linux-mips-low.c (mips_linux_new_process): Likewise.
2957 (mips_linux_new_thread): Likewise.
2958 (mips_add_watchpoint): Likewise.
2959 * linux-x86-low.c (initialize_low_arch): Likewise.
2960 * lynx-low.c (lynx_add_process): Likewise.
2961 * mem-break.c (set_raw_breakpoint_at): Likewise.
2962 (set_breakpoint): Likewise.
2963 (add_condition_to_breakpoint): Likewise.
2964 (add_commands_to_breakpoint): Likewise.
2965 (clone_agent_expr): Likewise.
2966 (clone_one_breakpoint): Likewise.
2967 * regcache.c (new_register_cache): Likewise.
2968 * remote-utils.c (look_up_one_symbol): Likewise.
2969 * server.c (queue_stop_reply): Likewise.
2970 (start_inferior): Likewise.
2971 (queue_stop_reply_callback): Likewise.
2972 (handle_target_event): Likewise.
2973 * spu-low.c (fetch_ppc_memory): Likewise.
2974 (store_ppc_memory): Likewise.
2975 * target.c (set_target_ops): Likewise.
2976 * thread-db.c (thread_db_load_search): Likewise.
2977 (try_thread_db_load_1): Likewise.
2978 * tracepoint.c (add_tracepoint): Likewise.
2979 (add_tracepoint_action): Likewise.
2980 (create_trace_state_variable): Likewise.
2981 (cmd_qtdpsrc): Likewise.
2982 (cmd_qtro): Likewise.
2983 (add_while_stepping_state): Likewise.
2984 * win32-low.c (child_add_thread): Likewise.
2985 (get_image_name): Likewise.
2986
ed8b7b42
YQ
29872015-08-25 Yao Qi <yao.qi@linaro.org>
2988
2989 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2990
db3cb7cb
YQ
29912015-08-25 Yao Qi <yao.qi@linaro.org>
2992
2993 * Makefile.in (aarch64-linux.o): New rule.
2994 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2995 srv_tgtobj.
2996 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2997 (aarch64_init_debug_reg_state): Make it extern.
2998 (aarch64_linux_prepare_to_resume): Remove.
2999
f6011a1c
YQ
30002015-08-25 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3003 lwp_arch_private_info and ptid_of_lwp.
3004
88e2cf7e
YQ
30052015-08-25 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3008 Find proc_info by find_process_pid. All callers updated.
3009
5e35436e
YQ
30102015-08-25 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3013 Remove.
3014 (debug_reg_change_callback): Remove.
3015 (aarch64_notify_debug_reg_change): Remove.
3016
4a8a7965
YQ
30172015-08-25 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3020 Call current_lwp_ptid.
3021
32a271ee
YQ
30222015-08-25 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-aarch64-low.c (debug_reg_change_callback): Use
3025 debug_printf.
3026
0d51c8d7
YQ
30272015-08-25 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3030
31a43dd5
YQ
30312015-08-25 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3034
8ee52567
YQ
30352015-08-25 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3038 the code.
3039
ff3f0f45
YQ
30402015-08-25 Yao Qi <yao.qi@linaro.org>
3041
3042 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3043 Remove.
3044 (debug_reg_change_callback): Remove argument entry and add argument
3045 lwp. Remove local variable thread. Don't print thread id in the
3046 debugging output. Don't check whether pid of thread equals to pid.
3047 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3048 iterate_over_lwps instead find_inferior.
3049
3d40fbb5
PA
30502015-08-24 Pedro Alves <palves@redhat.com>
3051
3052 * inferiors.c (get_first_process): New function.
3053 * inferiors.h (get_first_process): New declaration.
3054 * remote-utils.c (read_ptid): Default to the first process in the
3055 list, instead of to the current thread's process.
3056
438e1e42
PA
30572015-08-24 Pedro Alves <palves@redhat.com>
3058
3059 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3060 * event-loop.c: Likewise.
3061 * remote-utils.c: Likewise.
3062 * tracepoint.c: Likewise.
3063
a8c6d4fc
PA
30642015-08-24 Pedro Alves <palves@redhat.com>
3065
3066 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3067 ptid_get_lwp.
3068
99b0bb12
PA
30692015-08-21 Pedro Alves <palves@redhat.com>
3070
3071 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3072 instead of literal 1.
3073
f8904751
PA
30742015-08-21 Pedro Alves <palves@redhat.com>
3075
3076 * tdesc.c (default_description): Explicitly zero-initialize.
3077
465a859e
PA
30782015-08-21 Pedro Alves <palves@redhat.com>
3079
3080 PR gdb/18749
3081 * inferiors.c (remove_thread): Discard any pending stop reply for
3082 this thread.
3083 * server.c (remove_all_on_match_pid): Rename to ...
3084 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3085 instead of a pid.
3086 (discard_queued_stop_replies): Change parameter to a ptid. Now
3087 extern.
3088 (handle_v_kill, kill_inferior_callback, captured_main)
3089 (process_serial_event): Adjust.
3090 * server.h (discard_queued_stop_replies): Declare.
3091
f0db101d
PA
30922015-08-21 Pedro Alves <palves@redhat.com>
3093
3094 * linux-low.c (wait_for_sigstop): Always switch to no thread
3095 selected if the previously current thread dies.
3096 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3097 process instead of the current thread's.
3098 * remote-utils.c (input_interrupt): Don't check if there's no
3099 current thread.
3100 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3101 current thread to the general thread fails, error out.
3102 (handle_qxfer_auxv, handle_qxfer_libraries)
3103 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3104 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3105 (handle_query): Check if there's a thread selected instead of
3106 checking whether there's any thread in the thread list.
3107 (handle_qxfer_threads, handle_qxfer_btrace)
3108 (handle_qxfer_btrace_conf): Don't error out early if there's no
3109 thread in the thread list.
3110 (handle_v_cont, myresume): Don't set the current thread to the
3111 continue thread.
3112 (process_serial_event) <Hg handling>: Also set thread_id if the
3113 previous general thread is still alive.
3114 (process_serial_event) <g/G handling>: If setting the current
3115 thread to the general thread fails, error out.
3116 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3117 thread's lwp instead of the current thread's.
3118 * target.c (set_desired_thread): If the desired thread was not
3119 found, leave the current thread pointing to NULL. Return an int
3120 (boolean) indicating success.
3121 * target.h (set_desired_thread): Change return type to int.
3122
40045d91
MF
31232015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3124
3125 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3126 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3127 #includes.
3128 (ps_get_thread_area): New function.
3129
45face3b
GB
31302015-08-19 Gary Benson <gbenson@redhat.com>
3131
3132 * hostio.c (handle_pread): Do not attempt to read more data
3133 than hostio_reply_with_data can fit in a packet.
3134
16d5f642
JB
31352015-08-18 Joel Brobecker <brobecker@adacore.com>
3136
3137 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3138
a738da3a
MF
31392015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3140
3141 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3142
33ebda9d
PA
31432015-08-06 Pedro Alves <palves@redhat.com>
3144
3145 * tracepoint.c (expr_eval_result): Now an int.
3146
a44892be
PA
31472015-08-06 Pedro Alves <palves@redhat.com>
3148
3149 * gdbthread.h (struct regcache): Forward declare.
3150 (struct thread_info) <regcache_data>: Now a struct regcache
3151 pointer.
3152 * inferiors.c (inferior_regcache_data)
3153 (set_inferior_regcache_data): Now work with struct regcache
3154 pointers.
3155 * inferiors.h (struct regcache): Forward declare.
3156 (inferior_regcache_data, set_inferior_regcache_data): Now work
3157 with struct regcache pointers.
3158 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3159 (free_register_cache_thread): Remove struct regcache pointer
3160 casts.
3161
608a1e46
PA
31622015-08-06 Pedro Alves <palves@redhat.com>
3163
3164 * server.c (captured_main): On error, print the exception message
3165 to stderr, and if run_once is set, throw a quit.
3166
f0ce0d3a
PA
31672015-08-06 Pedro Alves <palves@redhat.com>
3168
3169 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3170 the current thread.
3171
bf47e248
PA
31722015-08-06 Pedro Alves <palves@redhat.com>
3173
3174 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3175 reading beyond the passed in buffer length.
3176
b6b9ffcc
PL
31772015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3178
3179 * tracepoint.c (symbol_list) <required>: Remove.
3180
863d01bd
PA
31812015-08-06 Pedro Alves <palves@redhat.com>
3182
3183 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3184 count if stopping and suspending threads.
3185 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3186 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3187 (linux_detach): Complete an ongoing step-over.
3188 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3189 throughout.
3190 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3191 (linux_wait_1): If passing a signal to the inferior after
3192 finishing a step-over, unsuspend and re-resume all lwps. If we
3193 see a single-step event but the thread should be continuing, don't
3194 pass the trap to gdb.
3195 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3196 internal_error instead of gdb_assert.
3197 (enqueue_pending_signal): New function.
3198 (check_ptrace_stopped_lwp_gone): Add debug output.
3199 (start_step_over): Use internal_error instead of gdb_assert.
3200 (complete_ongoing_step_over): New function.
3201 (linux_resume_one_thread): Don't resume a suspended thread.
3202 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3203 it stepping.
3204
00db26fa
PA
32052015-08-06 Pedro Alves <palves@redhat.com>
3206
3207 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3208 (linux_thread_alive): Use lwp_is_marked_dead.
3209 (extended_event_reported): Delete.
3210 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3211 instead of extended_event_reported.
3212 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3213 as well.
3214 (lwp_is_marked_dead): New function.
3215 (lwp_running): Use lwp_is_marked_dead.
3216 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3217 comment.
3218
ad071a30
PA
32192015-08-06 Pedro Alves <palves@redhat.com>
3220
3221 * linux-low.c (linux_wait_1): Move fork event output out of the
3222 !report_to_gdb check. Pass event_child->waitstatus to
3223 target_waitstatus_to_string instead of ourstatus.
3224
524b57e6
YQ
32252015-08-04 Yao Qi <yao.qi@linaro.org>
3226
3227 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3228 if current_thread is 32 bit.
3229
6085d6f6
YQ
32302015-08-04 Yao Qi <yao.qi@linaro.org>
3231
3232 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3233 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3234 * server.c (extended_protocol): Remove "static".
3235 * server.h (extended_protocol): Declare it.
3236
8a7e4587
YQ
32372015-08-04 Yao Qi <yao.qi@linaro.org>
3238
3239 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3240 both aarch64 and aarch32.
3241 (aarch64_set_pc): Likewise.
3242
3b53ae99
YQ
32432015-08-04 Yao Qi <yao.qi@linaro.org>
3244
3245 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3246 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3247 arm-with-neon.xml to srv_xmlfiles.
3248 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3249 (is_64bit_tdesc): New function.
3250 (aarch64_linux_read_description): New function.
3251 (aarch64_arch_setup): Call aarch64_linux_read_description.
3252 (regs_info): Rename to regs_info_aarch64.
3253 (aarch64_regs_info): Return right regs_info.
3254 (initialize_low_arch): Call initialize_low_arch_aarch32.
3255
bd9e6534
YQ
32562015-08-04 Yao Qi <yao.qi@linaro.org>
3257
3258 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3259 * linux-aarch32-low.c: New file.
3260 * linux-aarch32-low.h: New file.
3261 * linux-arm-low.c (arm_fill_gregset): Move it to
3262 linux-aarch32-low.c.
3263 (arm_store_gregset): Likewise.
3264 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3265 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3266 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3267 (regs_info): Rename to regs_info_arm.
3268 (arm_regs_info): Return regs_info_aarch32 if
3269 have_ptrace_getregset is 1 and target description is
3270 arm_with_neon or arm_with_vfpv3.
3271 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3272 Call initialize_low_arch_aarch32 instead.
3273
ded48a5e
YQ
32742015-08-04 Yao Qi <yao.qi@linaro.org>
3275
3276 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3277 * linux-low.c: ... here.
3278 * linux-low.h (have_ptrace_getregset): Declare it.
3279
96e9210f
PA
32802015-08-04 Pedro Alves <palves@redhat.com>
3281
3282 * thread-db.c (struct thread_db): Use new typedefs.
3283 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3284 CHK calls.
3285 (disable_thread_event_reporting): Cast result of dlsym to
3286 destination function pointer type.
3287 (thread_db_mourn): Use td_ta_delete_ftype.
3288
af60a1ef
SL
32892015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3290
3291 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3292 arch variant.
3293 (CDX_BREAKPOINT): Define for R2.
3294 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3295 (the_low_target): Add comments.
3296
e8b41681
YQ
32972015-07-30 Yao Qi <yao.qi@linaro.org>
3298
3299 * linux-arm-low.c (arm_hwcap): Remove it.
3300 (arm_read_description): New local variable arm_hwcap. Don't
3301 set arm_hwcap to zero.
3302
89abb039
YQ
33032015-07-30 Yao Qi <yao.qi@linaro.org>
3304
3305 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3306 Use regcache->tdesc instead.
3307 (arm_store_wmmxregset): Likewise.
3308 (arm_fill_vfpregset): Likewise.
3309 (arm_store_vfpregset): Likewise.
3310
deca266c
YQ
33112015-07-30 Yao Qi <yao.qi@linaro.org>
3312
3313 * linux-arm-low.c: Include arch/arm.h.
3314 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3315 (arm_store_gregset): Likewise.
3316
aa58a496
SM
33172015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3318
3319 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3320 ptrace's 4th parameter.
3321
50904b25
YQ
33222015-07-27 Yao Qi <yao.qi@linaro.org>
3323
3324 * configure.srv (case aarch64*-*-linux*): Don't set
3325 srv_linux_usrregs.
3326
5826e159
PA
33272015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3328
3329 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3330 sys/ptrace.h.
3331 * linux-arm-low.c: Likewise.
3332 * linux-cris-low.c: Likewise.
3333 * linux-crisv32-low.c: Likewise.
3334 * linux-low.c: Likewise.
3335 * linux-m68k-low.c: Likewise.
3336 * linux-mips-low.c: Likewise.
3337 * linux-nios2-low.c: Likewise.
3338 * linux-s390-low.c: Likewise.
3339 * linux-sparc-low.c: Likewise.
3340 * linux-tic6x-low.c: Likewise.
3341 * linux-tile-low.c: Likewise.
3342 * linux-x86-low.c: Likewise.
3343
54019719
PA
33442015-07-24 Pedro Alves <palves@redhat.com>
3345
3346 * config.in: Regenerate.
3347 * configure: Regenerate.
3348
eb7aa561
PA
33492015-07-24 Pedro Alves <palves@redhat.com>
3350
3351 * acinclude.m4: Include ../ptrace.m4.
3352 * configure.ac: Call GDB_AC_PTRACE.
3353 * config.in, configure: Regenerate.
3354
55d7b841
YQ
33552015-07-24 Yao Qi <yao.qi@linaro.org>
3356
3357 * linux-low.c (linux_create_inferior): Remove setting to
3358 proc->priv->new_inferior.
3359 (linux_attach): Likewise.
3360 (linux_low_filter_event): Likewise.
3361 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3362
c06cbd92
YQ
33632015-07-24 Yao Qi <yao.qi@linaro.org>
3364
3365 * linux-low.c (linux_arch_setup): New function.
3366 (linux_low_filter_event): If proc->tdesc is NULL and
3367 proc->attached is true, call the_low_target.arch_setup.
3368 Otherwise, keep status pending, and return.
3369 (linux_resume_one_lwp_throw): Don't call get_pc if
3370 thread->while_stepping isn't NULL. Don't call
3371 get_thread_regcache if proc->tdesc is NULL.
3372 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3373 (linux_target_ops): Install arch_setup.
3374 * server.c (start_inferior): Call the_target->arch_setup.
3375 * target.h (struct target_ops) <arch_setup>: New field.
3376 (target_arch_setup): New marco.
3377 * lynx-low.c (lynx_target_ops): Update.
3378 * nto-low.c (nto_target_ops): Update.
3379 * spu-low.c (spu_target_ops): Update.
3380 * win32-low.c (win32_target_ops): Update.
3381
5ae3ebba
YQ
33822015-07-24 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-low.c (linux_add_process): Don't set
3385 proc->priv->new_inferior.
3386 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3387 (linux_attach): Likewise.
3388
eb97750b
YQ
33892015-07-24 Yao Qi <yao.qi@linaro.org>
3390
3391 * server.c (start_inferior): Code refactor.
3392
51aee833
YQ
33932015-07-24 Yao Qi <yao.qi@linaro.org>
3394
3395 * server.c (process_serial_event): Set general_thread.
3396
af1b22f3
YQ
33972015-07-21 Yao Qi <yao.qi@linaro.org>
3398
3399 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3400 aarch64_linux_get_debug_reg_capacity.
3401
554717a3
YQ
34022015-07-17 Yao Qi <yao.qi@linaro.org>
3403
3404 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3405 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3406 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3407 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3408 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3409 (AARCH64_HWP_ALIGNMENT): Likewise.
3410 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3411 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3412 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3413 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3414 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3415 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3416 (struct aarch64_debug_reg_state): Likewise.
3417 (struct arch_lwp_info): Likewise.
3418 (aarch64_align_watchpoint): Likewise.
3419 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3420 (aarch64_watchpoint_length): Likewise.
3421 (aarch64_point_encode_ctrl_reg): Likewise
3422 (aarch64_point_is_aligned): Likewise.
3423 (aarch64_align_watchpoint): Likewise.
3424 (aarch64_linux_set_debug_regs):
3425 (aarch64_dr_state_insert_one_point): Likewise.
3426 (aarch64_dr_state_remove_one_point): Likewise.
3427 (aarch64_handle_breakpoint): Likewise.
3428 (aarch64_handle_aligned_watchpoint): Likewise.
3429 (aarch64_handle_unaligned_watchpoint): Likewise.
3430 (aarch64_handle_watchpoint): Likewise.
3431
c67ca4de
YQ
34322015-07-17 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3435 and don't aarch64_get_debug_reg_state. All callers update.
3436 (aarch64_handle_aligned_watchpoint): Likewise.
3437 (aarch64_handle_unaligned_watchpoint): Likewise.
3438 (aarch64_handle_watchpoint): Likewise.
3439 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3440 (aarch64_remove_point): Likewise.
3441
25abf979
YQ
34422015-07-17 Yao Qi <yao.qi@linaro.org>
3443
3444 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3445 debug_printf.
3446 (aarch64_handle_unaligned_watchpoint): Likewise.
3447
db1ff28b
JK
34482015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3449
3450 Revert the previous 3 commits:
3451 Move gdb_regex* to common/
3452 Move linux_find_memory_regions_full & co.
3453 gdbserver build-id attribute generator
3454
700ca40f
JK
34552015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3456 Jan Kratochvil <jan.kratochvil@redhat.com>
3457
3458 gdbserver build-id attribute generator.
3459 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3460 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3461 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3462 (find_phdr): New.
3463 (get_dynamic): Use find_pdhr to traverse program headers.
3464 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3465 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3466 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3467 (get_hex_build_id): New.
3468 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3469 to reply XML document.
3470
9904185c
JK
34712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3472 Jan Kratochvil <jan.kratochvil@redhat.com>
3473
3474 * target.c: Include target/target-utils.h and fcntl.h.
3475 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3476 (target_fileio_read_stralloc): New functions.
3477
6e5b4429
JK
34782015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3479
3480 * Makefile.in (OBS): Add gdb_regex.o.
3481 (gdb_regex.o): New.
3482 * config.in: Rebuilt.
3483 * configure: Rebuilt.
3484
ddc98fbf
JK
34852015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3486 Jan Kratochvil <jan.kratochvil@redhat.com>
3487
3488 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3489 * Makefile.in (OBS): Add target-utils.o.
3490 (linux-maps.o, target-utils.o): New.
3491 * configure.srv (srv_linux_obj): Add linux-maps.o.
3492
e57bb7a0
PL
34932015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3494
3495 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3496 function, return 1.
3497 (the_low_target): Install it.
3498
586b02a9
PA
34992015-07-14 Pedro Alves <palves@redhat.com>
3500
3501 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3502 Instead, ignore ECHILD, and throw an error for other errnos.
3503
58c1b36c
PA
35042015-07-10 Pedro Alves <palves@redhat.com>
3505
3506 * event-loop.c (struct callback_event) <data>: Change type to
3507 gdb_client_data instance instead of gdb_client_data pointer.
3508 (append_callback_event): Adjust.
3509
421530db
PL
35102015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3511
3512 * linux-aarch64-low.c: Add comments for each linux_target_ops
3513 method. Remove comments already covered in target_ops and
3514 linux_target_ops definitions.
3515 (the_low_target): Add comments for each unimplemented method.
3516
c2d65f38
YQ
35172015-07-09 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-aarch64-low.c (aarch64_regmap): Remove.
3520 (aarch64_usrregs_info): Remove.
3521 (regs_info): Set field usrregs to NULL.
3522
b20a6524
MM
35232015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3524
3525 * linux-low.c: Include "rsp-low.h"
3526 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3527 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3528 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3529 (handle_btrace_enable_pt): New.
3530 (handle_btrace_general_set): Support "pt".
3531 (handle_btrace_conf_general_set): Support "pt:size".
3532
96c97461
PL
35332015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3534
3535 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3536 Z_PACKET_SW_BP.
3537
37d66942
PL
35382015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3539
3540 * linux-aarch64-low.c: Remove comment about endianness.
3541 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3542 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3543 memcmp.
3544
dc06243f
GB
35452015-06-24 Gary Benson <gbenson@redhat.com>
3546
3547 * linux-i386-ipa.c (stdint.h): Do not include.
3548 * lynx-i386-low.c (stdint.h): Likewise.
3549 * lynx-ppc-low.c (stdint.h): Likewise.
3550 * mem-break.c (stdint.h): Likewise.
3551 * thread-db.c (stdint.h): Likewise.
3552 * tracepoint.c (stdint.h): Likewise.
3553 * win32-low.c (stdint.h): Likewise.
3554
124e13d9
SM
35552015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3556
3557 * server.c (write_qxfer_response): Update call to
3558 remote_escape_output.
3559
909c2cda
JK
35602015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3561 Jan Kratochvil <jan.kratochvil@redhat.com>
3562
3563 Merge multiple hex conversions.
3564 * gdbreplay.c (tohex): Rename to 'fromhex'.
3565 (logchar): Use fromhex.
3566
24c05f46
JK
35672015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3568
3569 * server.c (handle_qxfer_libraries): Set `version' attribute for
3570 <library-list>.
3571
14d2069a
GB
35722015-06-10 Gary Benson <gbenson@redhat.com>
3573
3574 * target.h (struct target_ops) <multifs_open>: New field.
3575 <multifs_unlink>: Likewise.
3576 <multifs_readlink>: Likewise.
3577 * linux-low.c (nat/linux-namespaces.h): New include.
3578 (linux_target_ops): Initialize the_target->multifs_open,
3579 the_target->multifs_unlink and the_target->multifs_readlink.
3580 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3581 * hostio.c (hostio_fs_pid): New static variable.
3582 (hostio_handle_new_gdb_connection): New function.
3583 (handle_setfs): Likewise.
3584 (handle_open): Use the_target->multifs_open as appropriate.
3585 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3586 (handle_readlink): Use the_target->multifs_readlink as
3587 appropriate.
3588 (handle_vFile): Handle vFile:setfs packets.
3589 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3590 after target_handle_new_gdb_connection.
3591
4b8b5e72
GB
35922015-06-10 Gary Benson <gbenson@redhat.com>
3593
3594 * configure.ac (AC_CHECK_FUNCS): Add setns.
3595 * config.in: Regenerate.
3596 * configure: Likewise.
3597 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3598 (linux-namespaces.o): New rule.
3599 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3600
3ac2e371
GB
36012015-06-09 Gary Benson <gbenson@redhat.com>
3602
3603 * hostio.c (handle_open): Process mode argument with
3604 fileio_to_host_mode.
3605
ca9b78ce
YQ
36062015-06-01 Yao Qi <yao.qi@linaro.org>
3607
3608 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3609 * linux-x86-low.c: Likewise.
3610
bfacd19d
DB
36112015-05-28 Don Breazeal <donb@codesourcery.com>
3612
3613 * linux-low.c (handle_extended_wait): Initialize
3614 thread_info.last_resume_kind for new fork children.
3615
452003ef
PA
36162015-05-15 Pedro Alves <palves@redhat.com>
3617
3618 * target.h (target_handle_new_gdb_connection): Rewrite using if
3619 wrapped in do/while.
3620
1041a03c
JB
36212015-05-14 Joel Brobecker <brobecker@adacore.com>
3622
3623 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3624 * configure, config.in: Regenerate.
3625 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3626 Declare typedef.
3627
c269dbdb
DB
36282015-05-12 Don Breazeal <donb@codesourcery.com>
3629
3630 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3631 PTRACE_EVENT_VFORK_DONE.
3632 (linux_low_ptrace_options, extended_event_reported): Add vfork
3633 events.
3634 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3635 and "vforkdone" for RSP 'T' Stop Reply Packet.
3636 * server.h (report_vfork_events): Declare
3637 global variable.
3638
3a8a0396
DB
36392015-05-12 Don Breazeal <donb@codesourcery.com>
3640
3641 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3642 (the_low_target) <new_fork>: Initialize new member.
3643 * linux-arm-low.c (arm_new_fork): New function.
3644 (the_low_target) <new_fork>: Initialize new member.
3645 * linux-low.c (handle_extended_wait): Call new target function
3646 new_fork.
3647 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3648 * linux-mips-low.c (mips_add_watchpoint): New function
3649 extracted from mips_insert_point.
3650 (the_low_target) <new_fork>: Initialize new member.
3651 (mips_linux_new_fork): New function.
3652 (mips_insert_point): Call mips_add_watchpoint.
3653 * linux-x86-low.c (x86_linux_new_fork): New function.
3654 (the_low_target) <new_fork>: Initialize new member.
3655
de0d863e
DB
36562015-05-12 Don Breazeal <donb@codesourcery.com>
3657
3658 * linux-low.c (handle_extended_wait): Implement return value,
3659 rename argument 'event_child' to 'event_lwp', handle
3660 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3661 (linux_low_ptrace_options): New function.
3662 (linux_low_filter_event): Call linux_low_ptrace_options,
3663 use different argument fo linux_enable_event_reporting,
3664 use return value from handle_extended_wait.
3665 (extended_event_reported): New function.
3666 (linux_wait_1): Call extended_event_reported and set
3667 status to report fork events.
3668 (linux_write_memory): Add pid to debug message.
3669 (reset_lwp_ptrace_options_callback): New function.
3670 (linux_handle_new_gdb_connection): New function.
3671 (linux_target_ops): Initialize new structure member.
3672 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3673 * lynx-low.c: Initialize new structure member.
3674 * remote-utils.c (prepare_resume_reply): Implement stop reason
3675 "fork" for "T" stop message.
3676 * server.c (handle_query): Call handle_new_gdb_connection.
3677 * server.h (report_fork_events): Declare global flag.
3678 * target.h (struct target_ops) <handle_new_gdb_connection>:
3679 New member.
3680 (target_handle_new_gdb_connection): New macro.
3681 * win32-low.c: Initialize new structure member.
3682
ddcbc397
DB
36832015-05-12 Don Breazeal <donb@codesourcery.com>
3684
3685 * mem-break.c (APPEND_TO_LIST): Define macro.
3686 (clone_agent_expr): New function.
3687 (clone_one_breakpoint): New function.
3688 (clone_all_breakpoints): New function.
3689 * mem-break.h: Declare new functions.
3690
89245bc0
DB
36912015-05-12 Don Breazeal <donb@codesourcery.com>
3692
3693 * linux-low.c (linux_supports_fork_events): New function.
3694 (linux_supports_vfork_events): New function.
3695 (linux_target_ops): Initialize new structure members.
3696 (initialize_low): Call linux_check_ptrace_features.
3697 * lynx-low.c (lynx_target_ops): Initialize new structure
3698 members.
3699 * server.c (report_fork_events, report_vfork_events):
3700 New global flags.
3701 (handle_query): Add new features to qSupported packet and
3702 response.
3703 (captured_main): Initialize new global variables.
3704 * target.h (struct target_ops) <supports_fork_events>:
3705 New member.
3706 <supports_vfork_events>: New member.
3707 (target_supports_fork_events): New macro.
3708 (target_supports_vfork_events): New macro.
3709 * win32-low.c (win32_target_ops): Initialize new structure
3710 members.
3711
835205d0
GB
37122015-05-12 Gary Benson <gbenson@redhat.com>
3713
3714 * server.c (handle_qxfer_exec_file): Use current process
3715 if annex is empty.
3716
21e94bd9
SL
37172015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3718
3719 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3720 Remove HAVE_PTRACE_GETREGS conditionals.
3721 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3722 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3723
45614f15
YQ
37242015-05-08 Yao Qi <yao.qi@linaro.org>
3725
3726 * linux-low.c (linux_supports_conditional_breakpoints): New
3727 function.
3728 (linux_target_ops): Install new target method.
3729 * lynx-low.c (lynx_target_ops): Install NULL hook for
3730 supports_conditional_breakpoints.
3731 * nto-low.c (nto_target_ops): Likewise.
3732 * spu-low.c (spu_target_ops): Likewise.
3733 * win32-low.c (win32_target_ops): Likewise.
3734 * server.c (handle_query): Check
3735 target_supports_conditional_breakpoints.
3736 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3737 New field.
3738 (target_supports_conditional_breakpoints): New macro.
3739
80ad801e
PA
37402015-05-06 Pedro Alves <palves@redhat.com>
3741
3742 PR server/18081
3743 * server.c (start_inferior): If the process exits, mourn it.
3744
819843c7
GB
37452015-04-21 Gary Benson <gbenson@redhat.com>
3746
3747 * hostio.c (fileio_open_flags_to_host): Factored out to
3748 fileio_to_host_openflags in common/fileio.c. Single use
3749 updated.
3750
a2d5a9d7
MF
37512015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3752
3753 * linux-xtensa-low.c (xtensa_fill_gregset)
3754 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3755 XCHAL_HAVE_LOOP.
3756
deb44829
MF
37572015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3758
3759 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3760 (regs_info): Replace usrregs pointer with NULL.
3761
e57f1de3
GB
37622015-04-17 Gary Benson <gbenson@redhat.com>
3763
3764 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3765 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3766 * server.c (handle_qxfer_exec_file): New function.
3767 (qxfer_packets): Add exec-file entry.
3768 (handle_query): Report qXfer:exec-file:read as supported packet.
3769
62828379
RN
37702015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3771
3772 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3773
b88bb450
GB
37742015-04-09 Gary Benson <gbenson@redhat.com>
3775
3776 * hostio-errno.c (errno_to_fileio_error): Remove function.
3777 Update caller to use remote_fileio_to_fio_error.
3778
c8f4bfdd
YQ
37792015-04-09 Yao Qi <yao.qi@linaro.org>
3780
3781 * linux-low.c (linux_insert_point): Call
3782 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3783 (linux_remove_point): Call remove_memory_breakpoint if type is
3784 raw_bkpt_type_sw.
3785 * linux-x86-low.c (x86_insert_point): Don't call
3786 insert_memory_breakpoint.
3787 (x86_remove_point): Don't call remove_memory_breakpoint.
3788
41f98f02
PA
37892015-04-01 Pedro Alves <palves@redhat.com>
3790 Cleber Rosa <crosa@redhat.com>
3791
3792 * server.c (gdbserver_usage): Reorganize and extend the usage
3793 message.
3794
2bf6fb9d
PA
37952015-03-24 Pedro Alves <palves@redhat.com>
3796
3797 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3798 output. Also dump TRAP_TRACE.
3799 (linux_low_filter_event): In debug output, distinguish a
3800 resume_stop SIGSTOP from a delayed SIGSTOP.
3801
369f6daa
GB
38022015-03-24 Gary Benson <gbenson@redhat.com>
3803
3804 * linux-x86-low.c (x86_linux_new_thread): Moved to
3805 nat/x86-linux.c.
3806 (x86_linux_prepare_to_resume): Likewise.
3807
8e5d4070
GB
38082015-03-24 Gary Benson <gbenson@redhat.com>
3809
3810 * Makefile.in (x86-linux-dregs.o): New rule.
3811 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3812 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3813 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3814 (x86_linux_dr_get): Likewise.
3815 (x86_linux_dr_set): Likewise.
3816 (update_debug_registers_callback): Likewise.
3817 (x86_linux_dr_set_addr): Likewise.
3818 (x86_linux_dr_get_addr): Likewise.
3819 (x86_linux_dr_set_control): Likewise.
3820 (x86_linux_dr_get_control): Likewise.
3821 (x86_linux_dr_get_status): Likewise.
3822 (x86_linux_update_debug_registers): Likewise.
3823
2b95d440
GB
38242015-03-24 Gary Benson <gbenson@redhat.com>
3825
3826 * linux-x86-low.c (x86_linux_update_debug_registers):
3827 New function, factored out from...
3828 (x86_linux_prepare_to_resume): ...this.
3829
14b0bc68
GB
38302015-03-24 Gary Benson <gbenson@redhat.com>
3831
3832 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3833 (x86_linux_dr_set): Likewise.
3834 (update_debug_registers_callback): Likewise.
3835 (x86_linux_dr_set_addr): Likewise.
3836 (x86_linux_dr_get_addr): Likewise.
3837 (x86_linux_dr_set_control): Likewise.
3838 (x86_linux_dr_get_control): Likewise.
3839 (x86_linux_dr_get_status): Likewise.
3840 (x86_linux_prepare_to_resume): Likewise.
3841
5dfe6ca8
GB
38422015-03-24 Gary Benson <gbenson@redhat.com>
3843
3844 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3845 Use perror_with_name. Pass string through gettext.
3846 (x86_linux_dr_set): Likewise.
3847
d33472ad
GB
38482015-03-24 Gary Benson <gbenson@redhat.com>
3849
3850 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3851 (x86_linux_dr_set_addr): ...this.
3852 (x86_dr_low_get_addr): Rename to...
3853 (x86_linux_dr_get_addr): ...this.
3854 (x86_dr_low_set_control): Rename to...
3855 (x86_linux_dr_set_control): ...this.
3856 (x86_dr_low_get_control): Rename to...
3857 (x86_linux_dr_get_control): ...this.
3858 (x86_dr_low_get_status): Rename to...
3859 (x86_linux_dr_get_status): ...this.
3860 (x86_dr_low): Update with new function names.
3861
4b134ca1
GB
38622015-03-24 Gary Benson <gbenson@redhat.com>
3863
3864 * Makefile.in (x86-linux.o): New rule.
3865 * configure.srv: Add x86-linux.o to relevant targets.
3866 * linux-low.c (lwp_set_arch_private_info): New function.
3867 (lwp_arch_private_info): Likewise.
3868 * linux-x86-low.c: Include nat/x86-linux.h.
3869 (arch_lwp_info): Removed structure.
3870 (update_debug_registers_callback):
3871 Use lwp_set_debug_registers_changed.
3872 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3873 and lwp_set_debug_registers_changed.
3874 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3875
34c703da
GB
38762015-03-24 Gary Benson <gbenson@redhat.com>
3877
3878 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3879 * linux-arm-low.c (arm_new_thread): Likewise.
3880 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3881 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3882 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3883 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3884
cff068da
GB
38852015-03-24 Gary Benson <gbenson@redhat.com>
3886
3887 * linux-low.c (ptid_of_lwp): New function.
3888 (lwp_is_stopped): Likewise.
3889 (lwp_stop_reason): Likewise.
3890 * linux-x86-low.c (update_debug_registers_callback):
3891 Use lwp_is_stopped.
3892 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3893 lwp_stop_reason.
3894
b2f7c7e8
GB
38952015-03-24 Gary Benson <gbenson@redhat.com>
3896
3897 * linux-low.h (linux_stop_lwp): Remove declaration.
3898
6d4ee8c6
GB
38992015-03-24 Gary Benson <gbenson@redhat.com>
3900
3901 * linux-low.h: Include nat/linux-nat.h.
3902 * linux-low.c (iterate_over_lwps_args): New structure.
3903 (iterate_over_lwps_filter): New function.
3904 (iterate_over_lwps): Likewise.
3905 * linux-x86-low.c (update_debug_registers_callback):
3906 Update signature to what iterate_over_lwps expects.
3907 Remove PID check that iterate_over_lwps now performs.
3908 (x86_dr_low_set_addr): Use iterate_over_lwps.
3909 (x86_dr_low_set_control): Likewise.
3910
70a0bb6b
GB
39112015-03-24 Gary Benson <gbenson@redhat.com>
3912
3913 * linux-x86-low.c (x86_debug_reg_state): New function.
3914 (x86_linux_prepare_to_resume): Use the above.
3915
7b669087
GB
39162015-03-24 Gary Benson <gbenson@redhat.com>
3917
3918 * linux-low.c (current_lwp_ptid): New function.
3919 * linux-x86-low.c: Include nat/linux-nat.h.
3920 (x86_dr_low_get_addr): Use current_lwp_ptid.
3921 (x86_dr_low_get_control): Likewise.
3922 (x86_dr_low_get_status): Likewise.
3923
eef49a3d
PA
39242015-03-20 Pedro Alves <palves@redhat.com>
3925
3926 * tracepoint.c (cmd_qtstatus): Make "str" const.
3927
b2333d22
PA
39282015-03-20 Pedro Alves <palves@redhat.com>
3929
3930 * server.c (handle_general_set): Make "req_str" const.
3931
23f238d3
PA
39322015-03-19 Pedro Alves <palves@redhat.com>
3933
3934 * linux-low.c (linux_resume_one_lwp): Rename to ...
3935 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3936 instead call perror_with_name.
3937 (check_ptrace_stopped_lwp_gone): New function.
3938 (linux_resume_one_lwp): Reimplement as wrapper around
3939 linux_resume_one_lwp_throw that swallows errors if the LWP is
3940 gone.
3941
91baf43f
PA
39422015-03-19 Pedro Alves <palves@redhat.com>
3943
3944 * linux-low.c (count_events_callback, select_event_lwp_callback):
3945 No longer check whether the thread has resume_stop as last resume
3946 kind.
3947
8bf3b159
PA
39482015-03-19 Pedro Alves <palves@redhat.com>
3949
3950 * linux-low.c (count_events_callback, select_event_lwp_callback):
3951 Use the lwp's status_pending_p field, not the thread's.
3952
b90fc188
PA
39532015-03-19 Pedro Alves <palves@redhat.com>
3954
3955 * linux-low.c (select_event_lwp_callback): Update comments to
3956 no longer mention SIGTRAP.
3957
464b0089
GB
39582015-03-18 Gary Benson <gbenson@redhat.com>
3959
3960 * server.c (handle_query): Do not report vFile:fstat as supported.
3961
aa9e327f
GB
39622015-03-11 Gary Benson <gbenson@redhat.com>
3963
3964 * hostio.c (sys/types.h): New include.
3965 (sys/stat.h): Likewise.
3966 (common-remote-fileio.h): Likewise.
3967 (handle_fstat): New function.
3968 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3969
791c0056
GB
39702015-03-11 Gary Benson <gbenson@redhat.com>
3971
3972 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3973 struct stat.st_blocks and struct stat.st_blksize.
3974 * configure: Regenerate.
3975 * config.in: Likewise.
3976 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3977 (OBS): Add common-remote-fileio.o.
3978 (common-remote-fileio.o): New rule.
3979
9a9df970
PA
39802015-03-09 Pedro Alves <palves@redhat.com>
3981
3982 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3983 'struct sockaddr' pointer in 'accept' call.
3984
9eb1356e
PA
39852015-03-09 Pedro Alves <palves@redhat.com>
3986
3987 Revert:
3988 2015-03-07 Pedro Alves <palves@redhat.com>
3989 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3990 or <winsock2.h> here. Instead include "gdb_socket.h".
3991 (remote_open): Use union gdb_sockaddr_u.
3992 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3993 or <winsock2.h> here. Instead include "gdb_socket.h".
3994 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3995 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3996 or <sys/un.h>.
3997 (init_named_socket, gdb_agent_helper_thread): Use union
3998 gdb_sockaddr_u.
3999
aac331e4
PA
40002015-03-07 Pedro Alves <palves@redhat.com>
4001
4002 * configure.ac (build_warnings): Move
4003 -Wdeclaration-after-statement to the C-specific set.
4004 * configure: Regenerate.
4005
366c75fc
PA
40062015-03-07 Pedro Alves <palves@redhat.com>
4007
4008 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4009 or <winsock2.h> here. Instead include "gdb_socket.h".
4010 (remote_open): Use union gdb_sockaddr_u.
4011 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4012 or <winsock2.h> here. Instead include "gdb_socket.h".
4013 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4014 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4015 or <sys/un.h>.
4016 (init_named_socket, gdb_agent_helper_thread): Use union
4017 gdb_sockaddr_u.
4018
492d29ea
PA
40192015-03-07 Pedro Alves <palves@redhat.com>
4020
4021 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4022 instead.
4023
60a191ed
YQ
40242015-03-06 Yao Qi <yao.qi@linaro.org>
4025
4026 * linux-aarch64-low.c (aarch64_insert_point): Use
4027 show_debug_regs as a boolean.
4028 (aarch64_remove_point): Likewise.
4029
f5771b1d
PA
40302015-03-05 Pedro Alves <palves@redhat.com>
4031
4032 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4033 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4034 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4035 * nto-low.c (nto_target_ops): Likewise.
4036 * spu-low.c (spu_target_ops): Likewise.
4037 * win32-low.c (win32_target_ops): Likewise.
4038
3e572f71
PA
40392015-03-04 Pedro Alves <palves@redhat.com>
4040
72f4393d 4041 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4042 Decide whether a breakpoint triggered based on the SIGTRAP's
4043 siginfo.si_code.
72f4393d
L
4044 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4045 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4046 (linux_low_filter_event): Check for breakpoints before checking
4047 watchpoints.
4048 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4049 siginfo.si_code.
72f4393d
L
4050 (linux_stopped_by_sw_breakpoint)
4051 (linux_supports_stopped_by_sw_breakpoint)
4052 (linux_stopped_by_hw_breakpoint)
4053 (linux_supports_stopped_by_hw_breakpoint): New functions.
4054 (linux_target_ops): Install new target methods.
3e572f71 4055
1ec68e26
PA
40562015-03-04 Pedro Alves <palves@redhat.com>
4057
4058 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4059 * server.c (swbreak_feature, hwbreak_feature): New globals.
4060 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4061 (captured_main): Clear swbreak_feature and hwbreak_feature.
4062 * server.h (swbreak_feature, hwbreak_feature): Declare.
4063 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4064 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4065 supports_stopped_by_hw_breakpoint>: New fields.
4066 (target_supports_stopped_by_sw_breakpoint)
4067 (target_stopped_by_sw_breakpoint)
4068 (target_supports_stopped_by_hw_breakpoint)
4069 (target_stopped_by_hw_breakpoint): Declare.
4070
15c66dd6
PA
40712015-03-04 Pedro Alves <palves@redhat.com>
4072
4073 enum lwp_stop_reason -> enum target_stop_reason
4074 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4075 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4076 (linux_wait_1, stuck_in_jump_pad_callback)
4077 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4078 (linux_stopped_by_watchpoint):
4079 * linux-low.h (enum lwp_stop_reason): Delete.
4080 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4081 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4082
98fc70d6
YQ
40832015-03-04 Yao Qi <yao.qi@linaro.org>
4084
4085 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4086
dd2ac174
GB
40872015-03-03 Gary Benson <gbenson@redhat.com>
4088
4089 * hostio.c (handle_vFile): Fix prefix lengths.
4090
d68e53f4
MM
40912015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4092
4093 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4094 ptr_bits.
4095
bf2d68ab
AA
40962015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4097
4098 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4099 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4100 (clean): Add "rm -f" for above C files.
4101 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4102 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4103 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4104 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4105 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4106 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4107 (init_registers_s390x_vx_linux64)
4108 (init_registers_s390x_tevx_linux64)
4109 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4110 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4111 declarations.
4112 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4113 (s390_store_vxrs_high): New functions.
4114 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4115 NT_S390_VXRS_HIGH.
4116 (s390_arch_setup): Add logic for selecting one of the new target
4117 descriptions. Activate the new vector regsets if applicable.
4118 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4119 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4120 and init_registers_s390x_tevx_linux64.
4121
c966a859
PA
41222015-03-01 Pedro Alves <palves@redhat.com>
4123
4124 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4125 parameter.
4126
4180215b
PA
41272015-02-27 Pedro Alves <palves@redhat.com>
4128
4129 * linux-x86-low.c (u_debugreg_offset): New function.
4130 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4131
749bab01
PA
41322015-02-27 Pedro Alves <palves@redhat.com>
4133
4134 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4135 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4136 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4137 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4138 (ps_lsetfpregs, ps_getpid)
4139 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4140 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4141 (ps_lsetxregs, ps_plog): Declare.
4142
3c14e5a3
PA
41432015-02-27 Pedro Alves <palves@redhat.com>
4144
4145 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4146 IP_AGENT_EXPORT_FUNC.
4147 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4148 IP_AGENT_EXPORT_FUNC.
4149 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4150 (IP_AGENT_EXPORT): Delete.
4151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4153 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4154 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4155 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4156 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4157 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4158 (traceframe_read_count, traceframe_write_count)
4159 (traceframes_created, trace_state_variables, get_raw_reg)
4160 (get_trace_state_variable_value, set_trace_state_variable_value)
4161 (ust_loaded, helper_thread_id, cmd_buf): Use
4162 IPA_SYM_EXPORTED_NAME.
4163 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4164 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4165 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4166 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4167 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4168 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4169 EXTERN_C_PUSH/EXTERN_C_POP.
4170 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4171 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4172 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4173 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4174 (traceframe_write_count, traceframe_read_count)
4175 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4176 (about_to_request_buffer_space, get_trace_state_variable_value)
4177 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4178 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4179 EXTERN_C_PUSH/EXTERN_C_POP.
4180 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4181 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4182 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4183 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4184 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4185 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4186 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4187 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4188 Define.
4189 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4190 (IP_AGENT_EXPORT_VAR_DECL): Define.
4191 (tracing): Declare.
4192 (gdb_agent_get_raw_reg): Declare.
4193
fe978cb0
PA
41942015-02-27 Tom Tromey <tromey@redhat.com>
4195 Pedro Alves <palves@redhat.com>
4196
4197 Rename symbols whose names are reserved C++ keywords throughout.
4198
3bc3d82a
PA
41992015-02-27 Pedro Alves <palves@redhat.com>
4200
4201 * Makefile.in (COMPILER): New, get it from autoconf.
4202 (CXX): Get from autoconf instead.
4203 (COMPILE.pre): Use COMPILER.
4204 (CC-LD): Rename to ...
4205 (CC_LD): ... this. Use COMPILER.
4206 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4207 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4208 * acinclude.m4: Include build-with-cxx.m4.
4209 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4210 Disable -Werror by default if building in C++ mode.
4211 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4212 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4213 the C++ compiler. Save/restore CXXFLAGS too.
4214 * configure: Regenerate.
4215
07697489
PA
42162015-02-27 Pedro Alves <palves@redhat.com>
4217
4218 * acinclude.m4: Include libiberty.m4.
4219 * configure.ac: Call libiberty_INIT.
4220 * config.in, configure: Regenerate.
4221
9beb7c4e
PA
42222015-02-26 Pedro Alves <palves@redhat.com>
4223
4224 * linux-low.c (linux_wait_1): When incrementing the PC past a
4225 program breakpoint always use the_low_target.breakpoint_len as
4226 increment, rather than the maximum between that and
4227 the_low_target.decr_pc_after_break.
4228
8090aef2
PA
42292015-02-23 Pedro Alves <palves@redhat.com>
4230
4231 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4232 thread was doing a step-over; always adjust the PC if
4233 we stepped over a permanent breakpoint.
4234 (linux_wait_1): If we stepped over breakpoint that was on top of a
4235 permanent breakpoint, manually advance the PC past it.
4236
bc9540e8
PA
42372015-02-23 Pedro Alves <palves@redhat.com>
4238
4239 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4240 modes.
4241 (x86_fill_gregset, x86_store_gregset): Use it when handling
4242 $orig_eax.
4243
2db9a427
PA
42442015-02-20 Pedro Alves <palves@redhat.com>
4245
4246 * thread-db.c: Include "nat/linux-procfs.h".
4247 (thread_db_init): Skip listing new threads if the kernel supports
4248 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4249
afa8d396
PA
42502015-02-20 Pedro Alves <palves@redhat.com>
4251
4252 * linux-low.c (status_pending_p_callback): Use ptid_match.
4253
c9587f88
AT
42542015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4255
4256 PR breakpoints/16812
4257 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4258 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4259 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4260
b05ec7a5
AT
42612015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4262
4263 PR breakpoints/15956
4264 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4265
d33501a5
MM
42662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4267
4268 * linux-low.c (linux_low_btrace_conf): Print size.
4269 * server.c (handle_btrace_conf_general_set): New.
4270 (hanle_general_set): Call handle_btrace_conf_general_set.
4271 (handle_query): Report Qbtrace-conf:bts:size as supported.
4272
f4abbc16
MM
42732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4274
4275 * linux-low.c (linux_low_enable_btrace): Update parameters.
4276 (linux_low_btrace_conf): New.
4277 (linux_target_ops)<to_btrace_conf>: Initialize.
4278 * server.c (current_btrace_conf): New.
4279 (handle_btrace_enable): Rename to ...
4280 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4281 to target_enable_btrace. Update comment. Update users.
4282 (handle_qxfer_btrace_conf): New.
4283 (qxfer_packets): Add btrace-conf entry.
4284 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4285 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4286 (target_ops)<read_btrace_conf>: New.
4287 (target_enable_btrace): Update parameters.
4288 (target_read_btrace_conf): New.
4289
043c3577
MM
42902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4291
4292 * server.c (handle_btrace_general_set): Remove call to
4293 target_supports_btrace.
4294 (supported_btrace_packets): New.
4295 (handle_query): Call supported_btrace_packets.
4296 * target.h: include btrace-common.h.
4297 (btrace_target_info): Removed.
4298 (supports_btrace, target_supports_btrace): Update parameters.
4299
734b0e4b
MM
43002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4301
4302 * Makefile.in (SFILES): Add common/btrace-common.c.
4303 (OBS): Add common/btrace-common.o.
4304 (btrace-common.o): Add build rules.
4305 * linux-low: Include btrace-common.h.
4306 (linux_low_read_btrace): Use struct btrace_data. Call
4307 btrace_data_init and btrace_data_fini.
4308
d6c146e9
PA
43092015-02-06 Pedro Alves <palves@redhat.com>
4310
4311 * thread-db.c (find_new_threads_callback): Add debug output.
4312
20ba1ce6
PA
43132015-02-04 Pedro Alves <palves@redhat.com>
4314
4315 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4316 (resume_stopped_resumed_lwps): New function.
4317 (linux_wait_for_event_filtered): Use it.
4318
8cc73a39
SDJ
43192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4320
4321 * Makefile.in (SFILES): Add linux-personality.c.
4322 (linux-personality.o): New rule.
4323 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4324 list of objects to be built.
4325 * linux-low.c: Include nat/linux-personality.h.
4326 (linux_create_inferior): Remove code to disable address space
4327 randomization (moved to ../nat/linux-personality.c). Create
4328 cleanup to disable address space randomization.
4329
fb23d554
SDJ
43302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4331
4332 * Makefile.in (posix-strerror.o): New rule.
4333 (mingw-strerror.o): Likewise.
4334 * configure: Regenerated.
4335 * configure.ac: Source file ../common/common.host. Initialize new
4336 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4337
cdf43629
YQ
43382015-01-14 Yao Qi <yao@codesourcery.com>
4339
4340 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4341 (ppc-linux.o): New rule.
4342 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4343 * configure.ac: AC_CHECK_FUNCS(getauxval).
4344 * config.in: Re-generated.
4345 * configure: Re-generated.
4346 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4347 ppc64_64bit_inferior_p
4348
514c5338
YQ
43492015-01-14 Yao Qi <yao@codesourcery.com>
4350
4351 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4352 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4353 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4354 (PT_ORIG_R3, PT_TRAP): Likewise.
4355 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4356 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4357 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4358
3368c1e5
JB
43592015-01-10 Joel Brobecker <brobecker@adacore.com>
4360
4361 * i387-fp.c (i387_cache_to_xsave): In look over
4362 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4363 zmmh_low_space field by use of zmmh_high_space.
4364
582511be
PA
43652015-01-09 Pedro Alves <palves@redhat.com>
4366
4367 * linux-low.c (step_over_bkpt): Move higher up in the file.
4368 (handle_extended_wait): Don't store the stop_pc here.
4369 (get_stop_pc): Adjust comments and rename to ...
4370 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4371 stopped for a software breakpoint or hardware breakpoint.
4372 (thread_still_has_status_pending_p): New function.
4373 (status_pending_p_callback): Use
4374 thread_still_has_status_pending_p. If the event is no longer
4375 interesting, resume the LWP.
4376 (handle_tracepoints): Add assert.
4377 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4378 (wstatus_maybe_breakpoint): New function.
4379 (cancel_breakpoint): Delete function.
4380 (check_stopped_by_watchpoint): New function, factored out from
4381 linux_low_filter_event.
4382 (lp_status_maybe_breakpoint): Delete function.
4383 (linux_low_filter_event): Remove filter_ptid argument.
4384 Leave thread group exits pending here. Store the LWP's stop PC.
4385 Always leave events pending.
4386 (linux_wait_for_event_filtered): Pull all events out of the
4387 kernel, and leave them all pending.
4388 (count_events_callback, select_event_lwp_callback): Consider all
4389 events.
4390 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4391 (select_event_lwp): Only give preference to the stepping LWP in
4392 all-stop mode. Adjust comments.
4393 (ignore_event): New function.
4394 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4395 references to cancel_breakpoints. Adjust to renames. Also give
4396 equal priority to all LWPs that have had events in non-stop mode.
4397 If reporting a software breakpoint event, unadjust the LWP's PC.
4398 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4399 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4400 Adjust.
4401 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4402 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4403 (linux_stopped_by_watchpoint): Adjust.
4404 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4405 * linux-low.h (enum lwp_stop_reason): New.
4406 (struct lwp_info) <stop_pc>: Adjust comment.
4407 <stopped_by_watchpoint>: Delete field.
4408 <stop_reason>: New field.
4409 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4410 * mem-break.c (software_breakpoint_inserted_here)
4411 (hardware_breakpoint_inserted_here): New function.
4412 * mem-break.h (software_breakpoint_inserted_here)
4413 (hardware_breakpoint_inserted_here): Declare.
4414 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4415 (cancel_breakpoints): Delete.
4416 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4417 (upload_fast_traceframes): Remove references to
4418 cancel_breakpoints.
4419
a33e3959
PA
44202015-01-09 Pedro Alves <palves@redhat.com>
4421
4422 * thread-db.c (find_new_threads_callback): Ignore thread if the
4423 kernel thread ID is -1.
4424
8784d563
PA
44252015-01-09 Pedro Alves <palves@redhat.com>
4426
4427 * linux-low.c (linux_attach_fail_reason_string): Move to
4428 nat/linux-ptrace.c, and rename.
4429 (linux_attach_lwp): Update comment.
4430 (attach_proc_task_lwp_callback): New function.
4431 (linux_attach): Adjust to rename and use
4432 linux_proc_attach_tgid_threads.
4433 (linux_attach_fail_reason_string): Delete declaration.
4434
76f2b779
JB
44352015-01-01 Joel Brobecker <brobecker@adacore.com>
4436
4437 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4438 * server.c (gdbserver_version): Likewise.
4439
fafcc06a
SDJ
44402014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4441
4442 * remote-utils.c: Include ctype.h.
4443 (input_interrupt): Explicitly handle the case when the char
4444 received is the NUL byte. Improve the printing of non-ASCII
4445 characters.
4446
beed38b8
JB
44472014-12-16 Joel Brobecker <brobecker@adacore.com>
4448
4449 * linux-low.c (linux_low_filter_event): Update call to
4450 linux_enable_event_reporting following the addition of
4451 a new parameter to that function.
4452
bf330350
CU
44532014-12-16 Catalin Udma <catalin.udma@freescale.com>
4454
4455 PR server/17457
4456 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4457 (AARCH64_FPCR_REGNO): Likewise.
4458 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4459 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4460 (aarch64_store_fpregset): Likewise.
4461
5227d625
JB
44622014-12-15 Joel Brobecker <brobecker@adacore.com>
4463
4464 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4465 Remove FIXME comment about assumption about N.
4466
f93b65a0
JB
44672014-12-13 Joel Brobecker <brobecker@adacore.com>
4468
4469 * configure.ac: If large-file support is disabled in GDBserver,
4470 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4471 * configure: Regenerate.
4472
e5a9158d
AA
44732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4474
4475 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4476 warning upon ENODATA from ptrace.
4477 * linux-s390-low.c (s390_store_tdb): New.
4478 (s390_regsets): Add regset for NT_S390_TDB.
4479
feea5f36
AA
44802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4481
4482 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4483 without a fill_function.
4484 * linux-s390-low.c (s390_fill_last_break): Remove.
4485 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4486 (s390_arch_setup): Use regset's size instead of fill_function for
4487 loop end condition.
4488
098dbe61
AA
44892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4490
4491 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4492 the regset's store function when ptrace returned an error.
4493 * regcache.c (get_thread_regcache): Invalidate register cache
4494 before fetching inferior's registers.
4495
28eef672
AA
44962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4497
4498 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4499 while-loop as for-loop.
4500 (regsets_store_inferior_registers): Likewise.
4501
bdca27a2
YQ
45022014-11-28 Yao Qi <yao@codesourcery.com>
4503
4504 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4505 * config.in, configure: Re-generate.
4506 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4507 is defined.
4508
9c232dda
YQ
45092014-11-21 Yao Qi <yao@codesourcery.com>
4510
4511 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4512 (AC_CHECK_HEADERS): Remove malloc.h.
4513 * configure: Re-generated.
4514 * config.in: Re-generated.
4515 * server.h: Don't include alloca.h and malloc.h.
4516 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4517 Don't include malloc.h.
4518
43968415
JB
45192014-11-17 Joel Brobecker <brobecker@adacore.com>
4520
4521 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4522 corresponding ERRNO check in same block.
4523
40e91bc7
PA
45242014-11-12 Pedro Alves <palves@redhat.com>
4525
4526 * server.c (cont_thread): Update comment.
4527 (start_inferior, attach_inferior): No longer clear cont_thread.
4528 (handle_v_cont): No longer set cont_thread.
4529 (captured_main): Clear cont_thread each time a GDB connects.
4530
c2c118cf
PA
45312014-11-12 Pedro Alves <palves@redhat.com>
4532
4533 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4534 thread, and don't resume all threads if the Hc thread has exited.
4535
78708b7c
PA
45362014-11-12 Pedro Alves <palves@redhat.com>
4537
4538 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4539 the process group instead of to a specific LWP.
4540
a2abc7de
PA
45412014-10-15 Pedro Alves <palves@redhat.com>
4542
4543 PR server/17487
4544 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4545 parameter.
4546 (arm_set_thread_context): Delete.
4547 (the_low_target): Adjust.
4548 * win32-i386-low.c (debug_registers_changed)
4549 (debug_registers_used): Delete.
4550 (update_debug_registers_callback): New function.
4551 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4552 needing to update their debug registers.
4553 (win32_get_current_dr): New function.
4554 (x86_dr_low_get_addr, x86_dr_low_get_control)
4555 (x86_dr_low_get_status): Fetch the debug register from the thread
4556 record's context.
4557 (i386_initial_stuff): Adjust.
4558 (i386_get_thread_context): Remove current_event parameter. Don't
4559 clear debug_registers_changed nor copy DR values to
4560 debug_reg_state.
4561 (i386_set_thread_context): Delete.
4562 (i386_prepare_to_resume): New function.
4563 (i386_thread_added): Mark the thread as needing to update irs
4564 debug registers.
4565 (the_low_target): Remove i386_set_thread_context and install
4566 i386_prepare_to_resume.
4567 * win32-low.c (win32_get_thread_context): Adjust.
4568 (win32_set_thread_context): Use SetThreadContext
4569 directly.
4570 (win32_prepare_to_resume): New function.
4571 (win32_require_context): New function, factored out from ...
4572 (thread_rec): ... this.
4573 (continue_one_thread): Call win32_prepare_to_resume on each thread
4574 we're about to continue.
4575 (win32_resume): Call win32_prepare_to_resume on the event thread.
4576 * win32-low.h (struct win32_thread_info)
4577 <debug_registers_changed>: New field.
4578 (struct win32_target_ops): Change prototype of set_thread_context,
4579 delete set_thread_context and add prepare_to_resume.
4580 (win32_require_context): New declaration.
4581
a442d071
GB
45822014-10-08 Gary Benson <gbenson@redhat.com>
4583
4584 * server.h: Do not include common-exceptions.h.
4585
6f1947e8
GB
45862014-10-08 Gary Benson <gbenson@redhat.com>
4587
4588 * server.h: Do not include cleanups.h.
4589
63b434a4
JH
45902014-09-30 James Hogan <james.hogan@imgtec.com>
4591
4592 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4593 mips64-dsp-linux.c.
4594
c4d9ceb6
YQ
45952014-09-23 Yao Qi <yao@codesourcery.com>
4596
4597 * linux-low.c (lp_status_maybe_breakpoint): New function.
4598 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4599 (count_events_callback): Likewise.
4600 (select_event_lwp_callback): Likewise.
4601 (cancel_breakpoints_callback): Likewise.
4602
89a5711c
DB
46032014-09-19 Don Breazeal <donb@codesourcery.com>
4604
4605 * linux-low.c (handle_extended_wait): Call
4606 linux_ptrace_get_extended_event.
4607 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4608 linux_is_extended_waitstatus.
4609
bffc0964
JB
46102014-09-16 Joel Brobecker <brobecker@adacore.com>
4611
4612 * Makefile.in (CPPFLAGS): Define.
4613 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4614 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4615
0bfdf32f
GB
46162014-09-16 Gary Benson <gbenson@redhat.com>
4617
4618 * inferiors.h (current_inferior): Renamed as...
4619 (current_thread): New variable. All uses updated.
4620 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4621 (maybe_move_out_of_jump_pad): Likewise.
4622 (cancel_breakpoint): Likewise.
4623 (linux_low_filter_event): Likewise.
4624 (wait_for_sigstop): Likewise.
4625 (linux_resume_one_lwp): Likewise.
4626 (need_step_over_p): Likewise.
4627 (start_step_over): Likewise.
4628 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4629 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4630 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4631 and save_inferior as saved_thread.
4632 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4633 saved_thread.
4634 (regcache_invalidate_thread): Likewise.
4635 * remote-utils.c (prepare_resume_reply): Likewise.
4636 * thread-db.c (thread_db_get_tls_address): Likewise.
4637 (disable_thread_event_reporting): Likewise.
4638 (remove_thread_event_breakpoints): Likewise.
4639 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4640 as saved_thread.
4641 * target.h (set_desired_inferior): Renamed as...
4642 (set_desired_thread): New declaration. All uses updated.
4643 * server.c (myresume): Updated comment to reference thread instead
4644 of inferior.
4645 (handle_serial_event): Likewise.
4646 (handle_target_event): Likewise.
4647
361c8ade
GB
46482014-09-12 Tom Tromey <tromey@redhat.com>
4649 Gary Benson <gbenson@redhat.com>
4650
4651 * regcache.h: Include common-regcache.h.
4652 (regcache_read_pc): Don't declare.
4653 * regcache.c (get_thread_regcache_for_ptid): New function.
4654
bd9269f7
GB
46552014-09-11 Tom Tromey <tromey@redhat.com>
4656 Gary Benson <gbenson@redhat.com>
4657
4658 * symbol.c: New file.
4659 * Makefile.in (SFILES): Add symbol.c.
4660 (OBS): Add symbol.o.
4661
f8c1d06b
GB
46622014-09-11 Gary Benson <gbenson@redhat.com>
4663
4664 * target.c (target_stop_ptid, target_continue_ptid): New
4665 functions.
4666
721ec300
GB
46672014-09-11 Tom Tromey <tromey@redhat.com>
4668 Gary Benson <gbenson@redhat.com>
4669
4670 * target.h: Include target/target.h.
4671 * target.c (target_read_memory, target_read_uint32)
4672 (target_write_memory): New functions.
4673
c5e92cca
GB
46742014-09-11 Gary Benson <gbenson@redhat.com>
4675
4676 * server.h (debug_hw_points): Don't declare.
4677 * server.c (debug_hw_points): Don't define. Replace all uses
4678 with show_debug_regs.
4679 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4680 all uses with show_debug_regs.
4681
2e4bb98a
EBM
46822014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4683
4684 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4685 endianness into account.
4686 (ppc_supply_ptrace_register): Likewise.
4687
ac740bc7
JH
46882014-09-03 James Hogan <james.hogan@imgtec.com>
4689
4690 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4691 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4692
97ea6506
GB
46932014-09-03 Gary Benson <gbenson@redhat.com>
4694
4695 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4696 ALL_DEBUG_ADDRESS_REGISTERS.
4697
df7e5265
GB
46982014-09-02 Gary Benson <gbenson@redhat.com>
4699
4700 * i386-low.h: Renamed as...
4701 * x86-low.h: New file. All type, function and variable name
4702 prefixes changed from "i386_" to "x86_". All references updated.
4703 * i386-low.c: Renamed as...
4704 * x86-low.c: New file. All type, function and variable name
4705 prefixes changed from "i386_" to "x86_". All references updated.
4706
ed859da7
GB
47072014-09-02 Gary Benson <gbenson@redhat.com>
4708
4709 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4710 (x86_linux_new_thread): Likewise.
4711
860789c7
GB
47122014-08-29 Gary Benson <gbenson@redhat.com>
4713
4714 * server.h (setjmp.h): Do not include.
4715 (toplevel): Do not declare.
4716 (common-exceptions.h): Include.
4717 (cleanups.h): Likewise.
4718 * server.c (toplevel): Do not define.
4719 (exit_code): New static global.
4720 (detach_or_kill_for_exit_cleanup): New function.
4721 (main): New function. Original main renamed to...
4722 (captured_main): New function.
4723 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4724
ff55e1b5
GB
47252014-08-29 Gary Benson <gbenson@redhat.com>
4726
4727 * Makefile.in (SFILES): Add common/common-exceptions.c.
4728 (OBS): Add common-exceptions.o.
4729 (common-exceptions.o): New rule.
4730 * utils.c (prepare_to_throw_exception): New function.
4731
e9bcb658
GB
47322014-08-29 Gary Benson <gbenson@redhat.com>
4733
4734 * config.in: Regenerate.
4735 * configure: Likewise.
4736
e3180625
GB
47372014-08-29 Gary Benson <gbenson@redhat.com>
4738
4739 * Makefile.in (SFILES): Add common/cleanups.c.
4740 (OBS): cleanups.o.
4741 (cleanups.o): New rule.
4742
e3d6ba5d
GB
47432014-08-29 Gary Benson <gbenson@redhat.com>
4744
4745 * utils.c (internal_vwarning): New function.
4746
7096e886
GB
47472014-08-28 Gary Benson <gbenson@redhat.com>
4748
4749 * utils.h (fatal): Remove declaration.
4750 * utils.c (fatal): Remove function.
4751
14ce3192
GB
47522014-08-28 Gary Benson <gbenson@redhat.com>
4753
4754 * tracepoint.c (gdb_agent_init): Replace fatal with
4755 perror_with_name.
4756 (initialize_tracepoint): Likewise.
4757
50278d59
GB
47582014-08-28 Gary Benson <gbenson@redhat.com>
4759
4760 * remote-utils.c (remote_prepare): Replace fatal with error.
4761
aa96c426
GB
47622014-08-28 Gary Benson <gbenson@redhat.com>
4763
4764 * linux-low.c (linux_async): Replace fatal with warning.
4765 Tidy up and return.
4766 (linux_start_non_stop): Return -1 if linux_async failed.
4767
f7160e97
GB
47682014-08-28 Gary Benson <gbenson@redhat.com>
4769
4770 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4771 gdb_assert.
4772 (i386_dr_low_get_addr): Remove vague comment.
4773 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4774 gdb_assert.
4775
38e08fca
GB
47762014-08-28 Gary Benson <gbenson@redhat.com>
4777
4778 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4779 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4780 internal_error.
4781 (linux_resume_one_lwp): Likewise.
4782 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4783 gdb_assert.
4784 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4785 with internal_error.
4786 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4787 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4788 (find_register_by_name): Replace fatal with internal_error.
4789 (find_regno): Likewise.
4790 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4791 * thread-db.c (thread_db_create_event): Likewise.
4792 (thread_db_load_search): Likewise.
4793 (try_thread_db_load_1): Likewise.
4794 * tracepoint.c (get_jump_space_head): Replace fatal with
4795 internal_error.
4796 (claim_trampoline_space): Likewise.
4797 (have_fast_tracepoint_trampoline_buffer): Likewise.
4798 (cmd_qtstart): Likewise.
4799 (stop_tracing): Likewise.
4800 (fast_tracepoint_collecting): Likewise.
4801 (target_malloc): Likewise.
4802 (download_tracepoint): Likewise.
4803 (download_trace_state_variables): Replace check with gdb_assert.
4804 (upload_fast_traceframes): Replace fatal with internal_error.
4805
34abf635
GB
48062014-08-19 Tom Tromey <tromey@redhat.com>
4807 Gary Benson <gbenson@redhat.com>
4808
4809 * Makefile.in (SFILES): Add common/common-debug.c.
4810 (OBS): Add common-debug.o.
4811 (common-debug.o): New rule.
4812 * debug.h (debug_printf): Don't declare.
4813 * debug.c (debug_printf): Renamed and rewritten as...
4814 (debug_vprintf): New function.
4815
f6e94d78
GB
48162014-08-19 Gary Benson <gbenson@redhat.com>
4817
4818 * utils.h: Do not include print-utils.h.
4819
9239eeab
GB
48202014-08-19 Tom Tromey <tromey@redhat.com>
4821 Gary Benson <gbenson@redhat.com>
4822
4823 * server.h: Add static assertion.
4824 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4825
ef87c8bb
GB
48262014-08-19 Tom Tromey <tromey@redhat.com>
4827 Gary Benson <gbenson@redhat.com>
4828
4829 * Makefile.in (SFILES): Add common/errors.c.
4830 (OBS): Add errors.o.
4831 (IPA_OBS): Add errors-ipa.o.
4832 (errors.o): New rule.
4833 (errors-ipa.o): Likewise.
4834 * utils.h (perror_with_name, error, warning): Don't declare.
4835 * utils.c (warning): Renamed and rewritten as...
4836 (vwarning): New function.
4837 (error): Renamed and rewritten as...
4838 (verror): New function.
4839 (internal_error): Renamed and rewritten as...
4840 (internal_verror): New function.
4841
bb974a24
GB
48422014-08-07 Gary Benson <gbenson@redhat.com>
4843
4844 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4845 * configure: Regenerate.
4846 * config.in: Likewise.
4847 * server.h: Do not include errno.h.
4848 * event-loop.c: Likewise.
4849 * hostio-errno.c: Likewise.
4850 * linux-low.c: Likewise.
4851 * remote-utils.c: Likewise.
4852 * spu-low.c: Likewise.
4853 * utils.c: Likewise.
4854 * gdbreplay.c: Unconditionally include errno.h.
4855
6d3d12eb
GB
48562014-08-07 Gary Benson <gbenson@redhat.com>
4857
4858 * server.h: Do not include string.h.
4859 * event-loop.c: Likewise.
4860 * linux-low.c: Likewise.
4861 * regcache.c: Likewise.
4862 * remote-utils.c: Likewise.
4863 * spu-low.c: Likewise.
4864 * utils.c: Likewise.
4865
dccbb609
GB
48662014-08-07 Gary Benson <gbenson@redhat.com>
4867
4868 * server.h: Do not include gdb_assert.h.
4869
e76df0d0
GB
48702014-08-07 Gary Benson <gbenson@redhat.com>
4871
4872 * server.h: Do not include common-utils.h.
4873
4cb9c816
GB
48742014-08-07 Gary Benson <gbenson@redhat.com>
4875
4876 * server.h: Do not include ptid.h.
4877 * notif.h: Likewise.
4878
3995eeee
GB
48792014-08-07 Gary Benson <gbenson@redhat.com>
4880
4881 * server.h: Do not include gdb_locale.h.
4882
cb9f1a9b
GB
48832014-08-07 Gary Benson <gbenson@redhat.com>
4884
4885 * server.h: Do not include gdb/signals.h.
4886 * win32-low.c: Likewise.
4887
a5fceff8
GB
48882014-08-07 Gary Benson <gbenson@redhat.com>
4889
4890 * server.h: Do not include pathmax.h.
4891
b9391142
GB
48922014-08-07 Gary Benson <gbenson@redhat.com>
4893
4894 * server.h: Do not include libiberty.h.
4895 * linux-bfin-low.c: Likewise.
4896
0e443c87
GB
48972014-08-07 Gary Benson <gbenson@redhat.com>
4898
4899 * server.h: Do not include ansidecl.h.
4900
8ebb3f56
GB
49012014-08-07 Gary Benson <gbenson@redhat.com>
4902
4903 * linux-x86-low.c: Do not include stddef.h.
4904 * lynx-ppc-low.c: Likewise.
4905 * tracepoint.c: Likewise.
4906
8980bdf6
GB
49072014-08-07 Gary Benson <gbenson@redhat.com>
4908
4909 * server.h: Do not include stdarg.h.
4910 * nto-low.c: Likewise.
4911
d7096f71
GB
49122014-08-07 Gary Benson <gbenson@redhat.com>
4913
4914 * server.h: Do not include stdlib.h.
4915 * inferiors.c: Likewise.
4916 * linux-low.c: Likewise.
4917 * regcache.c: Likewise.
4918 * spu-low.c: Likewise.
4919 * tracepoint.c: Likewise.
4920 * utils.c: Likewise.
4921
d02f550d
GB
49222014-08-07 Gary Benson <gbenson@redhat.com>
4923
4924 * server.h: Do not include stdio.h.
4925 * linux-low.c: Likewise.
4926 * remote-utils.c: Likewise.
4927 * spu-low.c: Likewise.
4928 * utils.c: Likewise.
4929 * wincecompat.c: Likewise.
4930
87f6c4e3
GB
49312014-08-06 Gary Benson <gbenson@redhat.com>
4932
4933 * regcache.c (init_register_cache): Move conditionals inside if.
4934
7089dca4
GB
49352014-08-06 Gary Benson <gbenson@redhat.com>
4936
4937 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4938
462f517e
GB
49392014-07-31 Gary Benson <gbenson@redhat.com>
4940
4941 * ax.h: Do not include server.h.
4942 * gdbthread.h: Likewise.
4943 * lynx-low.h: Likewise.
4944 * notif.h: Likewise.
4945
976411d6
GB
49462014-07-30 Gary Benson <gbenson@redhat.com>
4947
4948 * server.h: Include common-defs.h.
4949 Do not include config.h or build-gnulib-gdbserver/config.h.
4950
d41f6d8e
GB
49512014-07-30 Gary Benson <gbenson@redhat.com>
4952
4953 * hostio-errno.c: Move server.h to top of includes list.
4954 * inferiors.c: Likewise.
4955 * linux-x86-low.c: Likewise.
4956 * notif.c: Include server.h.
4957
314c6a35
TT
49582014-07-24 Tom Tromey <tromey@redhat.com>
4959 Gary Benson <gbenson@redhat.com>
4960
4961 * server.h (CORE_ADDR): Now unsigned.
4962
69ff6be5
PA
49632014-07-16 Pedro Alves <palves@redhat.com>
4964
4965 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4966
ce9e3fe7
PA
49672014-07-15 Pedro Alves <palves@redhat.com>
4968
4969 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4970 copy.
4971
e76126e8
PA
49722014-07-11 Pedro Alves <palves@redhat.com>
4973
4974 * linux-low.c (kill_wait_lwp): New function, based on
4975 kill_one_lwp_callback, but use my_waitpid directly.
4976 (kill_one_lwp_callback, linux_kill): Use it.
4977
8e9db26e
PA
49782014-06-23 Pedro Alves <palves@redhat.com>
4979
4980 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4981 before setting DR0..DR3.
4982
698b3e08
GB
49832014-06-20 Gary Benson <gbenson@redhat.com>
4984
4985 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4986 * configure: Regenerated.
4987 * config.in: Likewise.
4988
125f8a3d
GB
49892014-06-20 Gary Benson <gbenson@redhat.com>
4990
4991 * Makefile.in (SFILES): Update locations for files moved
4992 from common to nat.
4993 (object file files): Reordered.
4994
42995dbd
GB
49952014-06-20 Gary Benson <gbenson@redhat.com>
4996
4997 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4998 (i386_dr_low_set_addr): Likewise.
4999 (i386_dr_low_get_addr): Likewise.
5000 (i386_dr_low_can_set_control): Likewise.
5001 (i386_dr_low_set_control): Likewise.
5002 (i386_dr_low_get_control): Likewise.
5003 (i386_dr_low_get_status): Likewise.
5004 (i386_get_debug_register_length): Likewise.
5005 * linux-x86-low.c (i386_dr_low_set_addr):
5006 Changed signature. Made static.
5007 (i386_dr_low_get_addr): Likewise.
5008 (i386_dr_low_set_control): Likewise.
5009 (i386_dr_low_get_control): Likewise.
5010 (i386_dr_low_get_status): Likewise.
5011 (i386_dr_low): New global variable.
5012 * win32-i386-low.c (i386_dr_low_set_addr):
5013 Changed signature. Made static.
5014 (i386_dr_low_get_addr): Likewise.
5015 (i386_dr_low_set_control): Likewise.
5016 (i386_dr_low_get_control): Likewise.
5017 (i386_dr_low_get_status): Likewise.
5018 (i386_dr_low): New global variable.
5019
e1d2394b
MS
50202014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5021
5022 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5023 * Makefile.in (AR, AR_FLAGS): Define.
5024 * configure: Regenerate.
5025
3a8ee006
GB
50262014-06-19 Gary Benson <gbenson@redhat.com>
5027
5028 * Makefile.in (i386-dregs.o): New rule.
5029 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5030 * i386-low.c (target.h): Remove include.
5031 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5032 (DR_CONTROL_SHIFT): Likewise.
5033 (DR_CONTROL_SIZE): Likewise.
5034 (DR_RW_EXECUTE): Likewise.
5035 (DR_RW_WRITE): Likewise.
5036 (DR_RW_READ): Likewise.
5037 (DR_RW_IORW): Likewise.
5038 (DR_LEN_1): Likewise.
5039 (DR_LEN_2): Likewise.
5040 (DR_LEN_4): Likewise.
5041 (DR_LEN_8): Likewise.
5042 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5043 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5044 (DR_ENABLE_SIZE): Likewise.
5045 (DR_LOCAL_SLOWDOWN): Likewise.
5046 (DR_GLOBAL_SLOWDOWN): Likewise.
5047 (DR_CONTROL_RESERVED): Likewise.
5048 (I386_DR_CONTROL_MASK): Likewise.
5049 (I386_DR_VACANT): Likewise.
5050 (I386_DR_LOCAL_ENABLE): Likewise.
5051 (I386_DR_GLOBAL_ENABLE): Likewise.
5052 (I386_DR_DISABLE): Likewise.
5053 (I386_DR_SET_RW_LEN): Likewise.
5054 (I386_DR_GET_RW_LEN): Likewise.
5055 (I386_DR_WATCH_HIT): Likewise.
5056 (i386_wp_op_t): Likewise.
5057 (i386_show_dr): Likewise.
5058 (i386_length_and_rw_bits): Likewise.
5059 (i386_insert_aligned_watchpoint): Likewise.
5060 (i386_remove_aligned_watchpoint): Likewise.
5061 (i386_handle_nonaligned_watchpoint): Likewise.
5062 i386_update_inferior_debug_regs(): Likewise.
5063 (i386_dr_insert_watchpoint): Likewise.
5064 (i386_dr_remove_watchpoint): Likewise.
5065 (i386_dr_region_ok_for_watchpoint): Likewise.
5066 (i386_dr_stopped_data_address): Likewise.
5067 (i386_dr_stopped_by_watchpoint): Likewise.
5068
8f26655c
GB
50692014-06-19 Gary Benson <gbenson@redhat.com>
5070
5071 * i386-low.c (i386_dr_show): Renamed to
5072 i386_show_dr and made static. All uses updated.
5073 (i386_dr_length_and_rw_bits): Renamed to
5074 i386_length_and_rw_bits and made static.
5075 All uses updated.
5076 (i386_dr_insert_aligned_watchpoint): Renamed to
5077 i386_insert_aligned_watchpoint and made static.
5078 All uses updated.
5079 (i386_dr_remove_aligned_watchpoint): Renamed to
5080 i386_remove_aligned_watchpoint and made static.
5081 All uses updated.
5082 (i386_dr_update_inferior_debug_regs): Renamed to
5083 i386_update_inferior_debug_regs and made static.
5084 All uses updated.
5085
b9228891
GB
50862014-06-18 Gary Benson <gbenson@redhat.com>
5087
5171def3
GB
5088 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5089 (i386_dr_low_can_set_control): Likewise.
5090 (i386_get_debug_register_length): Likewise.
5091 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5092 (i386_dr_low_can_set_control): Likewise.
5093 (i386_get_debug_register_length): Likewise.
5094
50952014-06-17 Gary Benson <gbenson@redhat.com>
5096
b9228891
GB
5097 * i386-low.h (i386-dregs.h): New include.
5098 (DR_FIRSTADDR): Now in i386-dregs.h.
5099 (DR_LASTADDR): Likewise.
5100 (DR_NADDR): Likewise.
5101 (DR_STATUS): Likewise.
5102 (DR_CONTROL): Likewise.
5103 (i386_debug_reg_state): Likewise.
5104 (i386_dr_insert_watchpoint): Likewise.
5105 (i386_dr_remove_watchpoint): Likewise.
5106 (i386_dr_region_ok_for_watchpoint): Likewise.
5107 (i386_dr_stopped_data_address): Likewise.
5108 (i386_dr_stopped_by_watchpoint): Likewise.
5109 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5110
4be83cc2
GB
51112014-06-18 Gary Benson <gbenson@redhat.com>
5112
5113 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5114 i386_dr_insert_watchpoint.
5115 (i386_low_remove_watchpoint): Renamed to
5116 i386_dr_remove_watchpoint.
5117 (i386_low_region_ok_for_watchpoint): Renamed to
5118 i386_dr_region_ok_for_watchpoint.
5119 (i386_low_stopped_data_address): Renamed to
5120 i386_dr_stopped_data_address.
5121 (i386_low_stopped_by_watchpoint): Renamed to
5122 i386_dr_stopped_by_watchpoint.
5123 * i386-low.c (i386_show_dr): Renamed to
5124 i386_dr_show and made nonstatic. All uses updated.
5125 (i386_length_and_rw_bits): Renamed to
5126 i386_dr_length_and_rw_bits and made nonstatic.
5127 All uses updated.
5128 (i386_insert_aligned_watchpoint): Renamed to
5129 i386_dr_insert_aligned_watchpoint and made nonstatic.
5130 All uses updated.
5131 (i386_remove_aligned_watchpoint): Renamed to
5132 i386_dr_remove_aligned_watchpoint and made nonstatic.
5133 All uses updated.
5134 (i386_update_inferior_debug_regs): Renamed to
5135 i386_dr_update_inferior_debug_regs and made nonstatic.
5136 All uses updated.
5137 (i386_low_insert_watchpoint): Renamed to
5138 i386_dr_insert_watchpoint. All uses updated.
5139 (i386_low_remove_watchpoint): Renamed to
5140 i386_dr_remove_watchpoint. All uses updated.
5141 (i386_low_region_ok_for_watchpoint): Renamed to
5142 i386_dr_region_ok_for_watchpoint. All uses updated.
5143 (i386_low_stopped_data_address): Renamed to
5144 i386_dr_stopped_data_address. All uses updated.
5145 (i386_low_stopped_by_watchpoint): Renamed to
5146 i386_dr_stopped_by_watchpoint. All uses updated.
5147
131aa0d4
GB
51482014-06-18 Gary Benson <gbenson@redhat.com>
5149
5150 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5151 (i386_dr_low_can_set_control): Likewise.
5152 (i386_insert_aligned_watchpoint): New check.
5153
d9305f7f
GB
51542014-06-18 Gary Benson <gbenson@redhat.com>
5155
5156 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5157 Renamed to state.
5158
e927c9fc
GB
51592014-06-18 Gary Benson <gbenson@redhat.com>
5160
5161 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5162 instead of fatal and error.
5163 (i386_handle_nonaligned_watchpoint): Likewise.
5164
1b6d4134
GB
51652014-06-18 Gary Benson <gbenson@redhat.com>
5166
5167 * i386-low.c (i386_get_debug_register_length): New macro.
5168 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5169 (i386_show_dr): Use debug_printf instead of fprintf. Use
5170 phex to format values.
5171
6e62758f
GB
51722014-06-18 Gary Benson <gbenson@redhat.com>
5173
5174 * i386-low.h: Comment changes.
5175 * i386-low.c: Likewise.
5176
fc6e2f03
GB
51772014-06-18 Gary Benson <gbenson@redhat.com>
5178
5179 * i386-low.c: Whitespace changes.
5180
f9d1eeed
TT
51812014-06-12 Tom Tromey <tromey@redhat.com>
5182
5183 * utils.c (freeargv): Remove.
5184
0b04e523
TT
51852014-06-12 Tom Tromey <tromey@redhat.com>
5186
5187 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5188 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5189 (parse_debug_format_options): Likewise.
5190 (gdbserver_usage): Likewise.
5191 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5192 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5193 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5194 against libiberty.
5195 ($(LIBGNU)): Depend on libiberty.
5196 (all-lib): Recurse into all subdirs.
5197 (install-only): Invoke "install" target in subdirs.
5198 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5199 targets.
5200 * configure: Rebuild.
5201 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5202 for vasprintf, vsnprintf, or gettimeofday.
5203 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5204 srv_tgtobj.
5205
270c9937
JB
52062014-06-05 Joel Brobecker <brobecker@adacore.com>
5207
5208 * development.sh: Delete.
5209 * Makefile.in (config.status): Adjust dependency on development.sh.
5210 * configure.ac: Adjust development.sh source call.
5211 * configure: Regenerate.
5212
0a261ed8
PA
52132014-06-02 Pedro Alves <palves@redhat.com>
5214
5215 * ax.c (gdb_free_agent_expr): New function.
5216 * ax.h (gdb_free_agent_expr): New declaration.
5217 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5218 list.
5219 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5220 static.
5221 (clear_breakpoint_conditions_and_commands): New function.
5222 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5223 (clear_breakpoint_conditions_and_commands): New declaration.
5224
e9dae05e
RR
52252014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5226
5227 * linux-aarch64-low.c (asm/ptrace.h): Include.
5228
5876f503
JK
52292014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5230
5231 Fix TLS access for -static -pthread.
5232 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5233 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5234 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5235
802e8e6d
PA
52362014-05-20 Pedro Alves <palves@redhat.com>
5237
5238 * linux-aarch64-low.c (aarch64_insert_point)
5239 (aarch64_remove_point): No longer check whether the type is
5240 supported here. Adjust to new interface.
5241 (the_low_target): Install aarch64_supports_z_point_type as
5242 supports_z_point_type method.
5243 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5244 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5245 instead of a Z packet char. Adjust.
5246 (arm_supports_z_point_type): New function.
5247 (arm_insert_point, arm_remove_point): Adjust to new interface.
5248 (the_low_target): Install arm_supports_z_point_type.
5249 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5250 (cris_insert_point, cris_remove_point): Adjust to new interface.
5251 Don't check whether the type is supported here.
5252 (the_low_target): Install cris_supports_z_point_type.
5253 * linux-low.c (linux_supports_z_point_type): New function.
5254 (linux_insert_point, linux_remove_point): Adjust to new interface.
5255 * linux-low.h (struct linux_target_ops) <insert_point,
5256 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5257 raw_breakpoint pointer parameter.
5258 <supports_z_point_type>: New method.
5259 * linux-mips-low.c (mips_supports_z_point_type): New function.
5260 (mips_insert_point, mips_remove_point): Adjust to new interface.
5261 Use mips_supports_z_point_type.
5262 (the_low_target): Install mips_supports_z_point_type.
5263 * linux-ppc-low.c (the_low_target): Install NULL as
5264 supports_z_point_type method.
5265 * linux-s390-low.c (the_low_target): Install NULL as
5266 supports_z_point_type method.
5267 * linux-sparc-low.c (the_low_target): Install NULL as
5268 supports_z_point_type method.
5269 * linux-x86-low.c (x86_supports_z_point_type): New function.
5270 (x86_insert_point): Adjust to new insert_point interface. Use
5271 insert_memory_breakpoint. Adjust to new
5272 i386_low_insert_watchpoint interface.
5273 (x86_remove_point): Adjust to remove_point interface. Use
5274 remove_memory_breakpoint. Adjust to new
5275 i386_low_remove_watchpoint interface.
5276 (the_low_target): Install x86_supports_z_point_type.
5277 * lynx-low.c (lynx_target_ops): Install NULL as
5278 supports_z_point_type callback.
5279 * nto-low.c (nto_supports_z_point_type): New.
5280 (nto_insert_point, nto_remove_point): Adjust to new interface.
5281 (nto_target_ops): Install nto_supports_z_point_type.
5282 * mem-break.c: Adjust intro comment.
5283 (struct raw_breakpoint) <raw_type, size>: New fields.
5284 <inserted>: Update comment.
5285 <shlib_disabled>: Delete field.
5286 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5287 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5288 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5289 (raw_bkpt_type_to_target_hw_bp_type): New function.
5290 (find_enabled_raw_code_breakpoint_at): New function.
5291 (find_raw_breakpoint_at): New type and size parameters. Use them.
5292 (insert_memory_breakpoint): New function, based off
5293 set_raw_breakpoint_at.
5294 (remove_memory_breakpoint): New function.
5295 (set_raw_breakpoint_at): Reimplement.
5296 (set_breakpoint): New, based on set_breakpoint_at.
5297 (set_breakpoint_at): Reimplement.
5298 (delete_raw_breakpoint): Go through the_target->remove_point
5299 instead of assuming memory breakpoints.
5300 (find_gdb_breakpoint_at): Delete.
5301 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5302 (find_gdb_breakpoint): New function.
5303 (set_gdb_breakpoint_at): Delete.
5304 (z_type_supported): New function.
5305 (set_gdb_breakpoint_1): New function, loosely based off
5306 set_gdb_breakpoint_at.
5307 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5308 (delete_gdb_breakpoint_at): Delete.
5309 (delete_gdb_breakpoint_1): New function, loosely based off
5310 delete_gdb_breakpoint_at.
5311 (delete_gdb_breakpoint): New function.
5312 (clear_gdb_breakpoint_conditions): Rename to ...
5313 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5314 breakpoint.
5315 (add_condition_to_breakpoint): Make static.
5316 (add_breakpoint_condition): Take a struct breakpoint pointer
5317 instead of an address. Adjust.
5318 (gdb_condition_true_at_breakpoint): Rename to ...
5319 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5320 z_type parameter.
5321 (gdb_condition_true_at_breakpoint): Reimplement.
5322 (add_breakpoint_commands): Take a struct breakpoint pointer
5323 instead of an address. Adjust.
5324 (gdb_no_commands_at_breakpoint): Rename to ...
5325 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5326 parameter. Return true if no breakpoint was found. Change debug
5327 output.
5328 (gdb_no_commands_at_breakpoint): Reimplement.
5329 (run_breakpoint_commands): Rename to ...
5330 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5331 and change return type to boolean.
5332 (run_breakpoint_commands): New function.
5333 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5334 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5335 breakpoint. Go through the_target->remove_point instead of
5336 assuming memory breakpoint.
5337 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5338 software and hardware breakpoints.
5339 (reinsert_raw_breakpoint): Go through the_target->insert_point
5340 instead of assuming memory breakpoint.
5341 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5342 software and hardware breakpoints.
5343 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5344 Check both software and hardware breakpoints.
5345 (validate_inserted_breakpoint): Assert the breakpoint is a
5346 software breakpoint. Set the inserted flag to -1 instead of
5347 setting shlib_disabled.
5348 (delete_disabled_breakpoints): Adjust.
5349 (validate_breakpoints): Only validate software breakpoints.
5350 Adjust to inserted flag change.
5351 (check_mem_read, check_mem_write): Skip breakpoint types other
5352 than software breakpoints. Adjust to inserted flag change.
5353 * mem-break.h (enum raw_bkpt_type): New enum.
5354 (raw_breakpoint, struct process_info): Forward declare.
5355 (Z_packet_to_target_hw_bp_type): Delete declaration.
5356 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5357 (set_gdb_breakpoint, delete_gdb_breakpoint)
5358 (clear_breakpoint_conditions): New declarations.
5359 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5360 (breakpoint_inserted_here): Update comment.
5361 (add_breakpoint_condition, add_breakpoint_commands): Replace
5362 address parameter with a breakpoint pointer parameter.
5363 (gdb_breakpoint_here): Update comment.
5364 (delete_gdb_breakpoint_at): Delete.
5365 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5366 * server.c (process_point_options): Take a struct breakpoint
5367 pointer instead of an address. Adjust.
5368 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5369 delete_gdb_breakpoint.
5370 * spu-low.c (spu_target_ops): Install NULL as
5371 supports_z_point_type method.
5372 * target.h: Include mem-break.h.
5373 (struct target_ops) <prepare_to_access_memory>: Update comment.
5374 <supports_z_point_type>: New field.
5375 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5376 instead of a char. Also take a raw breakpoint pointer.
5377 * win32-arm-low.c (the_low_target): Install NULL as
5378 supports_z_point_type.
5379 * win32-i386-low.c (i386_supports_z_point_type): New function.
5380 (i386_insert_point, i386_remove_point): Adjust to new interface.
5381 (the_low_target): Install i386_supports_z_point_type.
5382 * win32-low.c (win32_supports_z_point_type): New function.
5383 (win32_insert_point, win32_remove_point): Adjust to new interface.
5384 (win32_target_ops): Install win32_supports_z_point_type.
5385 * win32-low.h (struct win32_target_ops):
5386 <supports_z_point_type>: New method.
5387 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5388 instead of a char. Also take a raw breakpoint pointer.
5389
932539e3
PA
53902014-05-20 Pedro Alves <palves@redhat.com>
5391
5392 * mem-break.h: Include break-common.h.
5393 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5394 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5395 (Z_packet_to_target_hw_bp_type): New declaration.
5396 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5397 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5398 (Z_PACKET_ACCESS_WP): Delete macros.
5399 (Z_packet_to_hw_type): Delete function.
5400 * i386-low.h: Don't include break-common.h here.
5401 (Z_packet_to_hw_type): Delete declaration.
5402 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5403 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5404 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5405 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5406 * linux-aarch64-low.c: Don't include break-common.h here.
5407 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5408 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5409 (Z_packet_to_target_hw_bp_type): Delete function.
5410 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5411 function.
5412 (mips_insert_point, mips_remove_point): Use
5413 Z_packet_to_target_hw_bp_type.
5414
4ff0d3d8
PA
54152014-05-20 Pedro Alves <palves@redhat.com>
5416
5417 * linux-aarch64-low.c: Include break-common.h.
5418 (enum target_point_type): Delete.
5419 (Z_packet_to_point_type): Rename to ...
5420 (Z_packet_to_target_hw_bp_type): ... this, and return a
5421 target_hw_bp_type instead.
5422 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5423 instead of an enum target_point_type.
5424 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5425 breakpoint type.
5426 (aarch64_dr_state_insert_one_point)
5427 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5428 (aarch64_handle_aligned_watchpoint)
5429 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5430 Take an enum target_hw_bp_type instead of an enum
5431 target_point_type.
5432 (aarch64_supports_z_point_type): New function.
5433 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5434 use Z_packet_to_target_hw_bp_type.
5435
786dc519
JB
54362014-05-20 Joel Brobecker <brobecker@adacore.com>
5437
5438 * configure.ac: Only use -Werror by default when DEVELOPMENT
5439 is true.
5440 * configure: Regenerate.
5441
9e0aa64f
JK
54422014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5443
5444 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5445 * linux-x86-low.c (X86_64_USER_REGS): New.
5446 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5447
2b577b92
YQ
54482014-04-28 Yao Qi <yao@codesourcery.com>
5449
5450 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5451 name.
5452
94611da2
PA
54532014-04-25 Pedro Alves <palves@redhat.com>
5454
5455 PR server/16255
5456 * linux-low.c (linux_attach_fail_reason_string): New function.
5457 (linux_attach_lwp): Delete.
5458 (linux_attach_lwp_1): Rename to ...
5459 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5460 argument. Remove "initial" parameter. Return int instead of
5461 void. Don't error or warn here.
5462 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5463 failure to attach to the tgid. Call warning when failing to
5464 attach to an lwp.
5465 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5466 argument. Remove "initial" parameter. Return int instead of
5467 void. Don't error or warn here.
5468 (linux_attach_fail_reason_string): New declaration.
5469 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5470 interface change. Use linux_attach_fail_reason_string.
5471
01f9f808
MS
54722014-04-24 Michael Sturm <michael.sturm@mintel.com>
5473 Walfred Tedeschi <walfred.tedeschi@intel.com>
5474
5475 * Makefile.in: Added rules to handle new files
5476 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5477 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5478 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5479 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5480 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5481 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5482 x32-avx512-linux.o.
5483 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5484 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5485 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5486 i386/x32-avx512.xml.
5487 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5488 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5489 i386/x32-avx512-linux.xml.
5490 * i387-fp.c (num_avx512_k_registers): New constant for number
5491 of K registers.
5492 (num_avx512_zmmh_low_registers): New constant for number of
5493 lower ZMM registers (0-15).
5494 (num_avx512_zmmh_high_registers): New constant for number of
5495 higher ZMM registers (16-31).
5496 (num_avx512_ymmh_registers): New contant for number of higher
5497 YMM registers (ymm16-31 added by avx521 on x86_64).
5498 (num_avx512_xmm_registers): New constant for number of higher
5499 XMM registers (xmm16-31 added by AVX512 on x86_64).
5500 (struct i387_xsave): Add space for AVX512 registers.
5501 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5502 Add code to handle AVX512 registers.
5503 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5504 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5505 prototypei from generated file.
5506 (tdesc_amd64_avx512_linux): Likewise.
5507 (init_registers_x32_avx512_linux): Likewise.
5508 (tdesc_x32_avx512_linux): Likewise.
5509 (init_registers_i386_avx512_linux): Likewise.
5510 (tdesc_i386_avx512_linux): Likewise.
5511 (x86_64_regmap): Add AVX512 registers.
5512 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5513 mask.
5514 (initialize_low_arch): Add code to initialize AVX512 registers.
5515
51aa91f9
PA
55162014-04-23 Pedro Alves <palves@redhat.com>
5517
5518 * mem-break.c (find_gdb_breakpoint_at): Make static.
5519 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5520
a4165e94
PA
55212014-04-23 Pedro Alves <palves@redhat.com>
5522
5523 * i386-low.c: Don't include break-common.h here.
5524 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5525 prototype to take target_hw_bp_type as argument instead of a Z
5526 packet char.
5527 * i386-low.h: Include break-common.h here.
5528 (Z_packet_to_hw_type): Declare.
5529 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5530 prototypes.
5531 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5532 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5533 (x86_remove_point): Convert the packet number to a
5534 target_hw_bp_type before calling i386_low_remove_watchpoint.
5535 * win32-i386-low.c (i386_insert_point): Convert the packet number
5536 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5537 (i386_remove_point): Convert the packet number to a
5538 target_hw_bp_type before calling i386_low_remove_watchpoint.
5539
b8acf843
PA
55402014-04-23 Pedro Alves <palves@redhat.com>
5541
5542 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5543
d708bcd1
PA
55442014-04-10 Pedro Alves <palves@redhat.com>
5545
5546 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5547 Check if the condition or command is NULL before checking if the
5548 breakpoint is known. On success, return true.
5549 * mem-break.h (add_breakpoint_condition): Document return.
5550 (add_breakpoint_commands): Add describing comment.
5551 * server.c (skip_to_semicolon): New function.
5552 (process_point_options): Use it.
5553
2eec7d5b
PA
55542014-04-09 Pedro Alves <palves@redhat.com>
5555
5556 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5557 to lwpid_of.
5558
fa96cb38
PA
55592014-02-27 Pedro Alves <palves@redhat.com>
5560
5561 PR 12702
5562 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5563 macros.
5564 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5565 output.
5566 (last_thread_of_process_p): Take a PID argument instead of a
5567 thread pointer.
5568 (linux_wait_for_lwp): Delete.
5569 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5570 functions.
5571 (linux_low_filter_event): New function, party factored out from
5572 linux_wait_for_event.
5573 (linux_wait_for_event): Rename to ...
5574 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5575 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5576 sigsuspend. Check for zombie leaders.
5577 (linux_wait_for_event): Reimplement as wrapper around
5578 linux_wait_for_event_filtered.
5579 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5580 a normal or signal exit is seen, it's the whole process exiting.
5581 (wait_for_sigstop): No longer a for_each_inferior callback.
5582 Rewrite on top of linux_wait_for_event_filtered.
5583 (stop_all_lwps): Call wait_for_sigstop directly.
5584 * server.c (resume, handle_target_event): Handle
5585 TARGET_WAITKIND_NO_RESUMED.
5586
d763de10
JB
55872014-02-26 Joel Brobecker <brobecker@adacore.com>
5588
5589 * win32-low.c (psapi_get_dll_name,
5590 * win32_CreateToolhelp32Snapshot): Delete.
5591 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5592 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5593 Delete.
5594 (handle_load_dll): Add function description.
5595 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5596
850a0f76
JB
55972014-02-26 Joel Brobecker <brobecker@adacore.com>
5598
5599 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5600 Add comment.
5601 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5602 base address when calling win32_add_one_solib.
5603 (handle_load_dll): Delete local variable load_addr.
5604 Remove 0x1000 offset applied to DLL base address when calling
5605 win32_add_one_solib.
5606 (handle_unload_dll): Add comment.
5607
f25b3fc3
JB
56082014-02-26 Joel Brobecker <brobecker@adacore.com>
5609
5610 * win32-low.c (win32_add_all_dlls): Renames
5611 win32_ensure_ntdll_loaded. Rewrite function documentation.
5612 Adjust implementation to always load all DLLs.
5613 Add 0x1000 offset to DLL base address when calling
5614 win32_add_one_solib.
5615 (child_initialization_done): New static global.
5616 (do_initial_child_stuff): Set child_initialization_done to
5617 zero during child initialization, and 1 after. Replace call
5618 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5619 Add comment.
5620 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5621 (handle_unload_dll): Add function documentation.
5622 (get_child_debug_event): Ignore load and unload DLL events
5623 during child initialization.
5624
d86d4aaf
DE
56252014-02-20 Doug Evans <dje@google.com>
5626
3bc32da3 5627 Remove global all_lwps.
d86d4aaf
DE
5628 * inferiors.h (ptid_of): Move here from linux-low.h.
5629 (pid_of, lwpid_of): Ditto.
5630 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5631 parameter is a struct thread_info * now.
5632 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5633 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5634 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5635 directly.
5636 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5637 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5638 * linux-arm-low.c (update_registers_callback): Update, "entry"
5639 parameter is a struct thread_info * now.
5640 Fetch lwpid from current_inferior directly.
5641 (arm_insert_point): Pass &all_threads to find_inferior instead of
5642 &all_lwps.
5643 (arm_remove_point): Ditto.
5644 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5645 (arm_prepare_to_resume): Fetch pid from thread.
5646 (arm_read_description): Fetch lwpid from current_inferior directly.
5647 * linux-low.c (all_lwps): Delete.
5648 (delete_lwp): Delete call to remove_inferior.
5649 (handle_extended_wait): Fetch lwpid from thread.
5650 (add_lwp): Don't set lwp->entry.id. Remove call to
5651 add_inferior_to_list.
5652 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5653 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5654 (kill_one_lwp_callback): Ditto.
5655 (linux_kill): Don't dereference NULL pointer.
5656 Fetch ptid,lwpid from thread.
5657 (get_detach_signal): Fetch ptid from thread.
5658 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5659 Simplify call to regcache_invalidate_thread.
5660 (delete_lwp_callback): Update, "entry" parameter is a
5661 struct thread_info * now. Fetch pid from thread.
5662 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5663 (status_pending_p_callback): Update, "entry" parameter is a
5664 struct thread_info * now. Fetch ptid from thread.
5665 (find_lwp_pid): Update, "entry" parameter is a
5666 struct thread_info * now.
5667 (linux_wait_for_lwp): Fetch pid from thread.
5668 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5669 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5670 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5671 (dequeue_one_deferred_signal): Ditto.
5672 (cancel_breakpoint): Fetch ptid from current_inferior.
5673 (linux_wait_for_event): Pass &all_threads to find_inferior,
5674 not &all_lwps. Fetch ptid, lwpid from thread.
5675 (count_events_callback): Update, "entry" parameter is a
5676 struct thread_info * now.
5677 (select_singlestep_lwp_callback): Ditto.
5678 (select_event_lwp_callback): Ditto.
5679 (cancel_breakpoints_callback): Ditto.
5680 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5681 not &all_lwps.
5682 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5683 (unsuspend_one_lwp): Update, "entry" parameter is a
5684 struct thread_info * now.
5685 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5686 not &all_lwps.
5687 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5688 Fetch lwpid from thread, not lwp.
5689 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5690 Pass &all_threads to find_inferior, not &all_lwps.
5691 (send_sigstop): Fetch lwpid from thread, not lwp.
5692 (send_sigstop_callback): Update, "entry" parameter is a
5693 struct thread_info * now.
5694 (suspend_and_send_sigstop_callback): Ditto.
5695 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5696 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5697 struct thread_info * now.
5698 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5699 from thread, lwp.
5700 (lwp_running): Update, "entry" parameter is a
5701 struct thread_info * now.
5702 (stop_all_lwps): Fetch ptid from thread.
5703 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5704 (linux_resume_one_lwp): Fetch lwpid from thread.
5705 (linux_set_resume_request): Update, "entry" parameter is a
5706 struct thread_info * now. Fetch pid, lwpid from thread.
5707 (resume_status_pending_p): Update, "entry" parameter is a
5708 struct thread_info * now.
5709 (need_step_over_p): Ditto. Fetch lwpid from thread.
5710 (start_step_over): Fetch lwpid from thread.
5711 (linux_resume_one_thread): Update, "entry" parameter is a
5712 struct thread_info * now. Fetch lwpid from thread.
5713 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5714 (proceed_one_lwp): Update, "entry" parameter is a
5715 struct thread_info * now. Fetch lwpid from thread.
5716 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5717 struct thread_info * now.
5718 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5719 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5720 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5721 directly.
5722 (regsets_store_inferior_registers): Ditto.
5723 (fetch_register, store_register): Ditto.
5724 (linux_read_memory, linux_write_memory): Ditto.
5725 (linux_request_interrupt): Ditto.
5726 (linux_read_auxv): Ditto.
5727 (linux_xfer_siginfo): Ditto.
5728 (linux_qxfer_spu): Ditto.
5729 (linux_qxfer_libraries_svr4): Ditto.
5730 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5731 moved to inferiors.h.
5732 (get_lwp): Delete.
5733 (get_thread_lwp): Update.
5734 (struct lwp_info): Delete member "entry". Simplify comment for
5735 member "thread".
5736 (all_lwps): Delete.
5737 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5738 current_inferior directly.
5739 (update_watch_registers_callback): Update, "entry" parameter is a
5740 struct thread_info * now. Fetch pid from thread.
5741 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5742 (mips_insert_point): Fetch lwpid from current_inferior.
5743 Pass &all_threads to find_inferior, not &all_lwps.
5744 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5745 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5746 directly.
5747 (mips_stopped_data_address): Ditto.
5748 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5749 directly.
5750 * linux-tile-low.c (tile_arch_setup): Ditto.
5751 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5752 (update_debug_registers_callback): Update, "entry" parameter is a
5753 struct thread_info * now. Fetch pid from thread.
5754 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5755 Pass &all_threads to find_inferior, not &all_lwps.
5756 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5757 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5758 Pass &all_threads to find_inferior, not &all_lwps.
5759 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5760 (i386_dr_low_get_status): Ditto.
5761 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5762 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5763 (x86_linux_read_description): Ditto.
5764 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5765
3b8361aa
DE
57662014-02-20 Doug Evans <dje@google.com>
5767
5768 * inferiors.c (get_first_inferior): Fix buglet.
5769
f7667f0d
DE
57702014-02-19 Doug Evans <dje@google.com>
5771
5772 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5773 * inferiors.c (add_thread): Change result type to struct thread_info *.
5774 All callers updated.
5775 (add_lwp): Call add_thread here instead of in callers.
5776 All callers updated.
5777 * linux-low.h (get_lwp_thread): Rewrite.
5778 (struct lwp_info): New member "thread".
5779
b3312d80
DE
57802014-02-19 Doug Evans <dje@google.com>
5781
5782 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5783 All callers updated.
5784
ecc6f45c
DE
57852014-02-19 Doug Evans <dje@google.com>
5786
5787 * inferiors.c (add_thread): Fix whitespace.
5788
649ebbca
DE
57892014-02-19 Doug Evans <dje@google.com>
5790
5791 * dll.c (clear_dlls): Replace accessing list implemention details
5792 with API function.
5793 * gdbthread.h (get_first_thread): Declare.
5794 * inferiors.c (for_each_inferior_with_data): New function.
5795 (get_first_thread): New function.
5796 (find_thread_ptid): Simplify.
5797 (get_first_inferior): New function.
5798 (clear_list): Delete.
5799 (one_inferior_p): New function.
5800 (clear_inferior_list): New function.
5801 (clear_inferiors): Update.
5802 * inferiors.h (for_each_inferior_with_data): Declare.
5803 (clear_inferior_list): Declare.
5804 (one_inferior_p): Declare.
5805 (get_first_inferior): Declare.
5806 * linux-low.c (linux_wait_for_event): Replace accessing list
5807 implemention details with API function.
5808 * server.c (target_running): Ditto.
5809 (accumulate_file_name_length): New function.
5810 (emit_dll_description): New function.
5811 (handle_qxfer_libraries): Replace accessing list implemention
5812 details with API function.
5813 (handle_qxfer_threads_worker): New function.
5814 (handle_qxfer_threads_proper): Replace accessing list implemention
5815 details with API function.
5816 (handle_query): Ditto.
5817 (visit_actioned_threads_callback_ftype): New typedef.
5818 (visit_actioned_threads_data): New struct.
5819 (visit_actioned_threads): Rewrite to be find_inferior callback.
5820 (resume): Call find_inferior.
5821 (handle_status): Replace accessing list implemention
5822 details with API function.
5823 (process_serial_event): Replace accessing list implemention details
5824 with API function.
5825 * target.c (set_desired_inferior): Replace accessing list implemention
5826 details with API function.
5827 * tracepoint.c (same_process_p): New function.
5828 (gdb_agent_about_to_close): Replace accessing list implemention
5829 details with API function.
5830 * win32-low.c (child_delete_thread): Replace accessing list
5831 implemention details with API function.
5832 (match_dll_by_basename): New function.
5833 (dll_is_loaded_by_basename): New function.
5834 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5835 details call to dll_is_loaded_by_basename.
5836
80894984
DE
58372014-02-19 Doug Evans <dje@google.com>
5838
5839 * dll.h (struct dll_info): Add comment.
5840 * gdbthread.h (struct thread_info): Add comment.
5841 (current_ptid): Simplify.
5842 * inferiors.c (add_process): Update.
5843 (remove_process): Update.
5844 * inferiors.h (struct process_info): Rename member "head" to "entry".
5845 * linux-low.c (delete_lwp): Update.
5846 (add_lwp): Update.
5847 (last_thread_of_process_p): Update.
5848 (kill_one_lwp_callback, linux_kill): Update.
5849 (status_pending_p_callback): Update.
5850 (wait_for_sigstop): Update. Simplify read of ptid.
5851 (start_step_over): Update.
5852 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5853 (get_lwp_thread): Update.
5854 (struct lwp_info): Rename member "head" to "entry".
5855 * regcache.h (inferior_list_entry): Delete.
5856 * server.c (kill_inferior_callback): Update.
5857 (detach_or_kill_inferior_callback): Update.
5858 (print_started_pid): Update.
5859 (print_attached_pid): Update.
5860 (process_serial_event): Simplify read of ptid.
5861 * thread-db.c (thread_db_create_event): Update.
5862 (thread_db_get_tls_address): Update.
5863 * win32-low.c (current_inferior_ptid): Simplify.
5864
46917d26
TT
58652014-02-19 Tom Tromey <tromey@redhat.com>
5866
5867 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5868 argument.
5869 (target_supports_btrace): Update.
5870
0759a81e
YQ
58712014-02-14 Yao Qi <yao@codesourcery.com>
5872
5873 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5874 (rsp-low-ipa.o): New target.
5875
a7191e8b
TT
58762014-02-12 Tom Tromey <tromey@redhat.com>
5877
5878 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5879 convert_ascii_to_int.
5880 * regcache.c (registers_to_string): Likewise.
5881 * remote-utils.c (decode_M_packet): Likewise.
5882 * server.c (process_serial_event): Likewise.
5883
ff0e980e
TT
58842014-02-12 Tom Tromey <tromey@redhat.com>
5885
5886 * server.c (handle_query, handle_v_run): Use hex2bin, not
5887 unhexify.
5888 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5889
e9371aff
TT
58902014-02-12 Tom Tromey <tromey@redhat.com>
5891
5892 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5893 convert_int_to_ascii.
5894 * regcache.c (registers_to_string, collect_register_as_string):
5895 Likewise.
5896 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5897 Likewise.
5898 * server.c (process_serial_event): Likewise.
5899 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5900 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5901
971dc0b8
TT
59022014-02-12 Tom Tromey <tromey@redhat.com>
5903
5904 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5905 bin2hex, not hexify.
5906 * tracepoint.c (cmd_qtstatus): Likewise.
5907
0a822afb
TT
59082014-02-12 Tom Tromey <tromey@redhat.com>
5909
5910 * remote-utils.c (monitor_output): Pass explicit length to
5911 hexify.
5912
9c3d6531
TT
59132014-02-12 Tom Tromey <tromey@redhat.com>
5914
5915 * tracepoint.c: Include rsp-low.h.
5916 * server.c: Include rsp-low.h.
5917 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5918 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5919 declare.
5920 * remote-utils.c: Include rsp-low.h.
5921 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5922 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5923 (convert_int_to_ascii, convert_ascii_to_int): Move to
5924 common/rsp-low.c.
5925 * regcache.c: Include rsp-low.h.
5926 * ax.c: Include rsp-low.h.
5927 * Makefile.in (SFILES): Add common/rsp-low.c.
5928 (OBS): Add rsp-low.o.
5929 (rsp-low.o): New target.
5930
01fd3ea5
TT
59312014-02-12 Tom Tromey <tromey@redhat.com>
5932
5933 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5934 Include print-utils.h.
5935 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5936 (plongest, thirty_two, phex_nz): Remove.
5937 * Makefile.in (SFILES): Add common/print-utils.c.
5938 (OBS): Add print-utils.o.
5939 (print-utils-ipa.o): New target.
5940 (print-utils.o): New target.
5941 (IPA_OBJS): Add print-utils-ipa.o.
5942
e99dc820
TT
59432014-02-06 Tom Tromey <tromey@redhat.com>
5944
5945 * Makefile.in (SFILES): Fix indentation.
5946
ee1e2d4f
DE
59472014-02-05 Doug Evans <dje@google.com>
5948
5949 * linux-low.c (linux_wait_for_event): Improve comment.
5950 (linux_wait_1): Keep current_inferior in sync with event_child.
5951
f5a02773
DE
59522014-01-22 Doug Evans <dje@google.com>
5953
5954 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5955
87ce2a04
DE
59562014-01-22 Doug Evans <dje@google.com>
5957
5958 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5959 * configure: Regenerate.
5960 * config.in: Regenerate.
5961 * Makefile.in (SFILES): Add debug.c.
5962 (OBS): Add debug.o.
5963 * debug.c: New file.
5964 * debug.h: New file.
5965 * linux-aarch64-low.c (*): Update all debugging printfs to use
5966 debug_printf instead of fprintf.
5967 * linux-arm-low.c (*): Ditto.
5968 * linux-cris-low.c (*): Ditto.
5969 * linux-crisv32-low.c (*): Ditto.
5970 * linux-m32r-low.c (*): Ditto.
5971 * linux-sparc-low.c (*): Ditto.
5972 * linux-x86.c (*): Ditto.
5973 * linux-low.c (*): Ditto.
5974 (linux_wait_1): Add calls to debug_enter, debug_exit.
5975 (linux_wait): Remove redundant debugging printf.
5976 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5977 (linux_resume, unstop_all_lwps): Ditto.
5978 * mem-break.c (*): Update all debugging printfs to use
5979 debug_printf instead of fprintf.
5980 * remote-utils.c (*): Ditto.
5981 * thread-db.c (*): Ditto.
5982 * server.c #include <ctype.h>, "gdb_vecs.h".
5983 (debug_threads): Moved to debug.c.
5984 (*): Update all debugging printfs to use debug_printf instead of
5985 fprintf.
5986 (start_inferior): Replace call to fflush with call to debug_flush.
5987 (monitor_show_help): Mention set debug-format.
5988 (parse_debug_format_options): New function.
5989 (handle_monitor_command): Handle "monitor set debug-format".
5990 (gdbserver_usage): Mention --debug-format.
5991 (main): Parse --debug-format.
5992 * server.h (debug_threads): Declaration moved to debug.h.
5993 #include "debug.h".
5994 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5995 trace_debug_1 that uses debug_printf.
5996 (tracepoint_look_up_symbols): Update all debugging printfs to use
5997 debug_printf instead of fprintf.
5998
e671835b
BS
59992014-01-20 Baruch Siach <baruch@tkos.co.il>
6000
6001 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6002 sys/ptrace.h.
6003
b5737fa9
PA
60042014-01-17 Pedro Alves <palves@redhat.com>
6005
ea38d2a9 6006 PR build/16445
c7faa97a
PA
6007 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6008 defined after including gdb_proc_service.h.
b5737fa9 6009
40ed484e
DE
60102014-01-16 Doug Evans <dje@google.com>
6011
6012 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6013 (match_dll): Use it.
6014
969c39fb
MM
60152014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6016
6017 * target.h (target_ops) <read_btrace>: Change parameters and
6018 return type to allow error reporting.
6019 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6020 trace reading errors on.
6021 * linux-low.c (linux_low_read_btrace): Pass trace reading
6022 errors on.
6023 (linux_low_disable_btrace): New.
6024
ab7f45ba
DE
60252014-01-15 Doug Evans <dje@google.com>
6026
6027 * inferiors.c (thread_id_to_gdb_id): Delete.
6028 * inferiors.h (thread_id_to_gdb_id): Delete.
6029
66af0f44
EZ
60302014-01-13 Eli Zaretskii <eliz@gnu.org>
6031
6032 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6033 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6034 versions.
6035
9939e131
PA
60362014-01-08 Pedro Alves <palves@redhat.com>
6037
6038 * server.c (handle_status): Don't discard previous queued stop
6039 replies or thread's pending status here.
6040 (main) <disconnection>: Do it here instead.
6041
b7ea362b
PA
60422014-01-08 Pedro Alves <palves@redhat.com>
6043
6044 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6045 * server.c (visit_actioned_threads, handle_pending_status): New
6046 function.
6047 (handle_v_cont): Factor out parts to ...
6048 (resume): ... this new function. If in all-stop, and a thread
6049 being resumed has a pending status, report it without actually
6050 resuming.
6051 (myresume): Adjust to use the new 'resume' function.
6052 (clear_pending_status_callback, set_pending_status_callback)
6053 (find_status_pending_thread_callback): New functions.
6054 (handle_status): Handle the case of multiple threads having
6055 interesting statuses to report. Report threads' real last signal
6056 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6057 with an interesting thread to report the status for, instead of
6058 always reporting the status of the first thread.
6059
28498c42
JB
60602014-01-01 Joel Brobecker <brobecker@adacore.com>
6061
6062 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6063 * gdbreplay.c (gdbreplay_version): Likewise.
6064
f45c82da
YZ
60652013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6066
6067 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6068 iov.iov_len with the real length in use.
6069
379a5e2d
JB
60702013-12-13 Joel Brobecker <brobecker@adacore.com>
6071
6072 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6073 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6074 for all targets that use win32-low.c.
6075 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6076 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6077
4210d83e
PA
60782013-12-13 Pedro Alves <palves@redhat.com>
6079
6080 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6081 if equal to TARGET_WAITKIND_LOADED.
6082 * win32-low.c (cached_status): New static global.
6083 (win32_wait): Add declaration.
6084 (do_initial_child_stuff): Flush all initial pending debug events
6085 up to the initial breakpoint.
6086 (win32_wait): If CACHED_STATUS was set, return that instead
6087 of doing a real wait. Remove the code resuming the execution
6088 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6089 during the initial phase. Also remove the code changing
6090 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6091 TARGET_WAITKIND_STOPPED.
6092
e7f0d979
YQ
60932013-12-11 Yao Qi <yao@codesourcery.com>
6094
6095 * notif.c (handle_notif_ack): Return 0 if no notification
6096 matches.
6097
ebcf782c
DE
60982013-11-20 Doug Evans <dje@google.com>
6099
6100 * linux-low.c (linux_set_resume_request): Fix comment.
6101
20ad9378
DE
61022013-11-20 Doug Evans <dje@google.com>
6103
6104 * linux-low.c (resume_status_pending_p): Tweak comment.
6105
a196ebeb
WT
61062013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6107
6108 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6109 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6110 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6111 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6112 (srv_amd64_regobj): Add amd64-mpx.o.
6113 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6114 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6115 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6116 * i387-fp.c (num_pl_bnd_register) Added constant.
6117 (num_pl_bnd_cfg_registers) Added constant.
6118 (struct i387_xsave) Added reserved area and MPX fields.
6119 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6120 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6121 function.
6122 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6123 (init_registers_amd64_mpx_linux): Declare new function.
6124 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6125 (x86_64_regmap): Add MPX registers.
6126 (x86_linux_read_description): Add MPX case.
6127 (initialize_low_arch): Initialize MPX targets.
6128
0080a2f6
TT
61292013-11-18 Tom Tromey <tromey@redhat.com>
6130
6131 * configure: Rebuild.
6132 * configure.ac: Don't check for stdlib.h.
6133 * gdbreplay.c: Unconditionally include stdlib.h.
6134
2978b111
TT
61352013-11-18 Tom Tromey <tromey@redhat.com>
6136
6137 * config.in: Rebuild.
6138 * configure: Rebuild.
6139 * configure.ac: Don't use AC_HEADER_DIRENT.
6140
a3d08894
TT
61412013-11-18 Tom Tromey <tromey@redhat.com>
6142
6143 * server.h: Don't check HAVE_STRING_H.
6144 * gdbreplay.c: Don't check HAVE_STRING_H.
6145 * configure: Rebuild.
6146
0a5dd17d
TT
61472013-11-18 Tom Tromey <tromey@redhat.com>
6148
6149 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6150 LIBGNU.
6151
1bd2f0ba
TT
61522013-11-08 Tom Tromey <tromey@redhat.com>
6153
6154 * configure, config.in: Rebuild.
6155 * configure.ac: Remove unused configury.
6156
3266f10b
TT
61572013-11-08 Tom Tromey <tromey@redhat.com>
6158
6159 * acinclude.m4: Include common.m4, codeset.m4.
6160 * configure, config.in: Rebuild.
6161 * configure.ac: Use GDB_AC_COMMON.
6162
6682d959
AA
61632013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6164
6165 * linux-s390-low.c (HWCAP_S390_TE): New define.
6166 (s390_arch_setup): Consider the TE field in the HWCAP for
6167 determining 'have_regset_tdb'.
6168
fd0a4d76
SDJ
61692013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6170
6171 PR gdb/16014
6172 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6173 call to sizeof.
6174
1a3d890b
PA
61752013-10-02 Pedro Alves <palves@redhat.com>
6176
6177 * server.c (process_serial_event): Don't output "GDBserver
6178 exiting" if GDB is connected through stdio.
6179 * target.c (mywait): Likewise, be silent if GDB is connected
6180 through stdio.
6181
97ad4581
JB
61822013-10-01 Joel Brobecker <brobecker@adacore.com>
6183
6184 * lynx-low.c (lynx_add_threads_after_attach): New function.
6185 (lynx_attach): Remove call to add_thread. Add call to
6186 lynx_add_threads_after_attach instead.
6187
5b4e221c
MF
61882013-09-28 Mike Frysinger <vapier@gentoo.org>
6189
6190 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6191 * config.in, configure: Regenerated.
6192
ee47b2f8
YQ
61932013-09-18 Yao Qi <yao@codesourcery.com>
6194
6195 PR server/15959
6196 * server.c (start_inferior): Clear 'resume_info'.
6197
d6707650 61982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6199
d6707650
JW
6200 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6201 for each register.
6202
9243dd0e 62032013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6204
9243dd0e
JW
6205 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6206 linux-tile-low.o to srv_tgtobj.
6207
c623a6ef
WN
62082013-09-16 Will Newton <will.newton@linaro.org>
6209
6210 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6211 out regs.
6212
fb71d39e
PA
62132013-09-06 Pedro Alves <palves@redhat.com>
6214
6215 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6216 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6217 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6218 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6219 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6220 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6221
8e7e9910
PA
62222013-09-06 Pedro Alves <palves@redhat.com>
6223
6224 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6225 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6226
7c3a12ca
PA
62272013-09-06 Pedro Alves <palves@redhat.com>
6228
6229 * linux-amd64-ipa.c: Include tracepoint.h.
6230 * linux-i386-ipa.c: Include tracepoint.h.
6231
8eb3d7b6
RW
62322013-09-06 Ricard Wanderlof <ricardw@axis.com>
6233
6234 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6235 (ps_get_thread_area): New function.
6236
eddddb9d
RW
62372013-09-06 Ricard Wanderlof <ricardw@axis.com>
6238
6239 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6240 (initialize_low_arch): Call init_registers_crisv32 rather than
6241 init_register_crisv32.
6242
533b0600
PA
62432013-09-05 Pedro Alves <palves@redhat.com>
6244
6245 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6246 to ...
6247 * hostio.h: ... this new file.
6248 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6249 win32-low.c: Include hostio.h.
6250
0ce3d3b5
PA
62512013-09-05 Pedro Alves <palves@redhat.com>
6252
6253 * server.h (gdb_client_data, handler_func, callback_handler_func)
6254 (delete_file_handler, add_file_handler, append_callback_event)
6255 (delete_callback_event, start_event_loop, initialize_event_loop):
6256 Move to event-loop.h and include it.
6257 * event-loop.h: New file.
6258
799cdc37
PA
62592013-09-05 Pedro Alves <palves@redhat.com>
6260
6261 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6262 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6263 (loaded_dll, unloaded_dll): Move to ...
6264 * dll.h: ... this new file.
6265 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6266
6a6bbd9d
PA
62672013-09-05 Pedro Alves <palves@redhat.com>
6268
6269 * server.h (current_process, get_thread_process, all_processes)
6270 (add_inferior_to_list, for_each_inferior, current_inferior)
6271 (remove_inferior, add_process, remove_process, find_process_pid)
6272 (have_started_inferiors_p, have_attached_inferiors_p)
6273 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6274 (clear_inferiors, find_inferior, find_inferior_id)
6275 (inferior_target_data, set_inferior_target_data)
6276 (inferior_regcache_data, set_inferior_regcache_data): Move to
6277 inferiors.h, and include it.
6278 * inferiors.h: New file.
6279
f699aaba
PA
62802013-09-05 Pedro Alves <palves@redhat.com>
6281
6282 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6283 Move ...
72f4393d 6284 * ax.h: ... here.
f699aaba 6285
c144c7a0
PA
62862013-09-05 Pedro Alves <palves@redhat.com>
6287
6288 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6289 tracepoint.h.
6290 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6291 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6292 (handle_tracepoint_general_set, handle_tracepoint_query)
6293 (tracepoint_finished_step, tracepoint_was_hit)
6294 (release_while_stepping_state_list, current_traceframe)
6295 (in_readonly_region, traceframe_read_mem)
6296 (fetch_traceframe_registers, traceframe_read_sdata)
6297 (traceframe_read_info, struct fast_tpoint_collect_status)
6298 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6299 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6300 (supply_fast_tracepoint_registers)
6301 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6302 (ipa_tdesc, claim_trampoline_space)
6303 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6304 (agent_mem_read, agent_get_trace_state_variable_value)
6305 (agent_set_trace_state_variable_value, agent_tsv_read)
6306 (agent_mem_read_string, get_raw_reg_func_addr)
6307 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6308 * tracepoint.h: ... this new file.
6309
ff42e6ab
PA
63102013-09-05 Pedro Alves <palves@redhat.com>
6311
6312 * server.h (perror_with_name, error, fatal, warning, paddress)
6313 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6314 include it.
6315 * utils.h: New file.
6316
541af0f4
PA
63172013-09-05 Pedro Alves <palves@redhat.com>
6318
6319 * server.h (remote_debug, noack_mode, transport_is_reliable)
6320 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6321 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6322 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6323 (write_enn, initialize_async_io, enable_async_io)
6324 (disable_async_io, check_remote_input_interrupt_request)
6325 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6326 (dead_thread_notify, prepare_resume_reply)
6327 (decode_address_to_semicolon, decode_address, decode_m_packet)
6328 (decode_M_packet, decode_X_packet, decode_xfer_write)
6329 (decode_search_memory_packet, unhexify, hexify)
6330 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6331 (look_up_one_symbol, relocate_instruction)
6332 (monitor_output): Move to remote-utils.h, and include it.
6333 * remote-utils.h: New file.
6334
eebdf26b
PA
63352013-09-05 Pedro Alves <palves@redhat.com>
6336
6337 * server.h (_): Delete.
6338
3aafd2ff
PA
63392013-09-02 Pedro Alves <palves@redhat.com>
6340
6341 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6342 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6343 allocated.
6344 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6345
cee83bcb
PM
63462013-09-02 Pierre Muller <muller@sourceware.org>
6347
6348 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6349 or WriteProcessMemory complete successfully and handle
6350 ERROR_PARTIAL_COPY error.
6351
9a13b2fa
PA
63522013-09-02 Pedro Alves <palves@redhat.com>
6353
6354 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6355 error instead of EIO.
6356
602e3198
JK
63572013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6358
6359 PR server/15604
6360 * linux-low.c: Include filestuff.h.
6361 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6362 * lynx-low.c: Include filestuff.h.
6363 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6364 * server.c: Include filestuff.h.
6365 (main): Call notice_open_fds.
6366 * spu-low.c: Include filestuff.h.
6367 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6368
96d7229d
LM
63692013-08-22 Luis Machado <lgustavo@codesourcery.com>
6370
6371 * Makefile.in: Explain why ../target and ../nat are not
6372 listed as include file search paths.
6373 (linux-waitpid.o): New object file rule.
6374 * configure.srv (srv_native_linux_obj): New variable.
6375 Replace all occurrences of linux native object files with
6376 $srv_native_linux_obj.
6377 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6378 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6379 (linux_enable_event_reporting): Remove declaration.
6380 (my_waitpid): Moved to common/linux-waitpid.c.
6381 (linux_wait_for_event): Pass ptid when calling
6382 linux_enable_event_reporting.
6383 (linux_supports_tracefork_flag): Remove.
6384 (linux_enable_event_reporting): Likewise.
6385 (linux_tracefork_grandchild): Remove.
6386 (STACK_SIZE): Moved to common/linux-ptrace.c.
6387 (linux_tracefork_child): Remove.
6388 (linux_test_for_tracefork): Remove.
6389 (linux_look_up_symbols): Call linux_supports_traceclone.
6390 (initialize_low): Remove call to linux_test_for_tracefork.
6391 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6392 common/linux-ptrace.h.
6393 (PTRACE_TYPE_ARG4): Likewise.
6394 Include linux-ptrace.h.
6395
32940073
PA
63962013-08-21 Pedro Alves <palves@redhat.com>
6397
6398 * config.in: Renegerate.
6399
33b60d58 64002013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6401
33b60d58
LM
6402 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6403 (SFILES): Remove $(srcdir)/common/target-common.c and
6404 add $(srcdir)/target/waitstatus.c.
6405 (OBS): Remove target-common.o and add waitstatus.o.
6406 (server_h): Remove $(srcdir)/../common/target-common.h and
6407 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6408 and $(srcdir)/../target/waitstatus.h.
6409 (target-common.o): Remove.
6410 (waitstatus.o): New target object file.
6411 * target.h: Do not include target-common.h and
6412 include target/resume.h, target/wait.h and
6413 target/waitstatus.h.
6414
b8e1b30e
LM
64152013-08-13 Luis Machado <lgustavo@codesourcery.com>
6416
6417 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6418 to PTRACE_TYPE_ARG3.
6419 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6420 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6421 PTRACE_TYPE_ARG4.
6422 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6423 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6424
7a60ad40
YQ
64252013-07-27 Jie Zhang <jie@codesourcery.com>
6426 Daniel Jacobowitz <dan@codesourcery.com>
6427 Yao Qi <yao@codesourcery.com>
6428
6429 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6430 (mips-linux-watch.o): New rule.
6431 (mips_linux_watch_h): New variable.
6432 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6433 srv_tgtobj.
6434 * linux-mips-low.c: Include mips-linux-watch.h.
6435 (struct arch_process_info, struct arch_lwp_info): New.
6436 (update_watch_registers_callback): New function.
6437 (mips_linux_new_process, mips_linux_new_thread) New functions.
6438 (mips_linux_prepare_to_resume, mips_insert_point): New
6439 functions.
6440 (mips_remove_point, mips_stopped_by_watchpoint): New
6441 functions.
6442 (rsp_bp_type_to_target_hw_bp_type): New function.
6443 (mips_stopped_data_address): New function.
6444 (the_low_target): Add watchpoint support functions.
6445
de6f69ad
YQ
64462013-07-27 Yao Qi <yao@codesourcery.com>
6447
6448 * i386-low.c: Include break-common.h.
6449 (enum target_hw_bp_type): Remove.
6450
3360c0bf
LM
64512013-07-24 Luis Machado <lgustavo@codesourcery.com>
6452
6453 * Makefile.in (SFILES): /common/target-common.c.
6454 (OBS): Add target-common.o.
6455 (server_h): Add $(srcdir)/../common/target-common.h.
6456 (target-common.o): New target.
6457 * server.c (queue_stop_reply_callback): Free
6458 status string after use.
6459 * target.c (target_waitstatus_to_string): Remove.
6460 * target.h: Include target-common.h.
6461 (resume_kind): Likewise.
6462 (target_waitkind): Likewise.
6463 (target_waitstatus): Likewise.
6464 (TARGET_WNOHANG): Likewise.
6465
bd885420
YQ
64662013-07-04 Yao Qi <yao@codesourcery.com>
6467
6468 * Makefile.in (host_alias): Use @host_noncanonical@.
6469 (target_alias): Use @target_noncanonical@.
6470 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6471 ACX_NONCANONICAL_HOST.
6472 * configure: Regenerated.
6473
6474 Revert:
6475 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6476
6477 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6478 * configure: Rebuild.
6479 * Makefile.in (version_host, version_target): Get from configure.
6480 (version.c): Use $(version_host) and $(version_target).
6481
17ef446e
PA
64822013-07-03 Pedro Alves <palves@redhat.com>
6483
6484 * Makefile.in (config.status): Depend on development.sh.
6485 * acinclude.m4: Include libmcheck.m4.
6486 * configure: Regenerate.
6487
7a9a7487
MG
64882013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6489
6490 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6491 attribute inside the parentheses.
6492 (winapi_DebugSetProcessKillOnExit): Ditto.
6493 (winapi_DebugBreakProcess): Ditto.
6494 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6495
49b64de6
MG
64962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6497
6498 * notif.h (notif_event): Add a dummy member to avoid compiler
6499 errors.
6500
d5749ee7
PA
65012013-07-01 Pedro Alves <palves@redhat.com>
6502
6503 * hostio.c (HOSTIO_PATH_MAX): Define.
6504 (require_filename, handle_open, handle_unlink, handle_readlink):
6505 Use it.
6506
d8d2a3ee
PA
65072013-07-01 Pedro Alves <palves@redhat.com>
6508
6509 * server.h: Include "pathmax.h".
6510 * linux-low.c: Don't include sys/param.h.
6511 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6512 MAXPATHLEN.
6513 * win32-low.c: Don't include sys/param.h.
6514 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6515
bc7dea8d
PA
65162013-07-01 Pedro Alves <palves@redhat.com>
6517
6518 * event-loop.c: Don't check HAVE_UNISTD_H before including
6519 <unistd.h>.
6520 * gdbreplay.c: Likewise.
6521 * remote-utils.c: Likewise.
6522 * server.c: Likewise.
6523 * configure.ac: Don't check for unistd.h.
6524 * configure: Regenerate.
6525
d6c2da54
TT
65262013-06-28 Tom Tromey <tromey@redhat.com>
6527
6528 * Makefile.in (version.c): Use version.in, not
6529 common/version.in.
6530
257b6bec
MG
65312013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6532
6533 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6534 * configure: Rebuild.
6535 * Makefile.in (version_host, version_target): Get from configure.
6536 (version.c): Use $(version_host) and $(version_target).
6537
86ebe149
DK
65382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6539
6540 Fix trace-status to output user name without trailing colon.
6541 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6542
f30aa5af
DK
65432013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6544
6545 Fix trace-status to output proper start-time and stop-time.
6546 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6547 output start time and stop time in hex as gdb expects.
6548
28a93511
YQ
65492013-06-26 Pedro Alves <pedro@codesourcery.com>
6550
6551 * tracepoint.c (build_traceframe_info_xml): Output trace state
6552 variables present in the trace buffer.
6553
01208463
TT
65542013-06-24 Tom Tromey <tromey@redhat.com>
6555
6556 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6557 create-version.sh.
6558 (version.o): Remove.
6559 * gdbreplay.c: Include version.h.
6560 (version, host_name): Don't declare.
6561 * server.h: Include version.h.
6562 (version, host_name): Don't declare.
6563
760256f9
PA
65642013-06-12 Pedro Alves <palves@redhat.com>
6565
6566 * linux-x86-low.c (linux_is_elf64): Delete global.
6567 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6568 with local linux_pid_exe_is_elf_64_file use.
6569
030031ee
PA
65702013-06-11 Pedro Alves <palves@redhat.com>
6571
6572 * linux-low.c (regset_disabled, disable_regset): New functions.
6573 (regsets_fetch_inferior_registers)
6574 (regsets_store_inferior_registers): Use them.
6575 (initialize_regsets_info); Don't allocate the disabled_regsets
6576 array here.
6577 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6578 comment.
6579
5da6eb0a
PA
65802013-06-11 Pedro Alves <palves@redhat.com>
6581
6582 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6583 xmalloc.
6584
7e5aaa09
PA
65852013-06-11 Pedro Alves <palves@redhat.com>
6586
6587 * linux-x86-low.c (initialize_low_arch): Call
6588 init_registers_x32_avx_linux.
6589
d878444c
JK
65902013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6591
6592 Fix compatibility with Android Bionic.
6593 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6594 it is not empty.
6595
3aee8918
PA
65962013-06-07 Pedro Alves <palves@redhat.com>
6597
5f2b57b5 6598 PR server/14823
3aee8918
PA
6599 * Makefile.in (OBS): Add tdesc.o.
6600 (IPA_OBJS): Add tdesc-ipa.o.
6601 (tdesc-ipa.o): New rule.
6602 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6603 interface.
6604 * linux-low.c (new_inferior): Delete.
6605 (disabled_regsets, num_regsets): Delete.
6606 (linux_add_process): Adjust to set the new per-process
6607 new_inferior flag.
6608 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6609 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6610 was a stop. When calling arch_setup, switch the current inferior
6611 to the thread that got an event.
6612 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6613 (regsets_fetch_inferior_registers)
6614 (regsets_store_inferior_registers): New regsets_info parameter.
6615 Adjust to use it.
6616 (linux_register_in_regsets): New regs_info parameter. Adjust to
6617 use it.
6618 (register_addr, fetch_register, store_register): New usrregs_info
6619 parameter. Adjust to use it.
6620 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6621 parameter regs_info. Adjust to use it.
6622 (linux_fetch_registers): Get the current inferior's regs_info, and
6623 adjust to use it.
6624 (linux_store_registers): Ditto.
6625 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6626 (initialize_low): Don't initialize the target_regsets here. Call
6627 initialize_low_arch.
6628 * linux-low.h (target_regsets): Delete declaration.
6629 (struct regsets_info): New.
6630 (struct usrregs_info): New.
6631 (struct regs_info): New.
6632 (struct process_info_private) <new_inferior>: New field.
6633 (struct linux_target_ops): Delete the num_regs, regmap, and
6634 regset_bitmap fields. New field regs_info.
6635 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6636 * i387-fp.c (num_xmm_registers): Delete.
6637 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6638 calls to new interface.
6639 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6640 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6641 Infer the number of xmm registers from the regcache's target
6642 description.
6643 * i387-fp.h (num_xmm_registers): Delete.
6644 * inferiors.c (add_thread): Don't install the thread's regcache
6645 here.
6646 * proc-service.c (gregset_info): Fetch the current inferior's
6647 regs_info. Adjust to use it.
6648 * regcache.c: Include tdesc.h.
6649 (register_bytes, reg_defs, num_registers)
6650 (gdbserver_expedite_regs): Delete.
6651 (get_thread_regcache): If the thread doesn't have a regcache yet,
6652 create one, instead of aborting gdbserver.
6653 (regcache_invalidate_one): Rename to ...
6654 (regcache_invalidate_thread): ... this.
6655 (regcache_invalidate_one): New.
6656 (regcache_invalidate): Only invalidate registers of the current
6657 process.
6658 (init_register_cache): Add target_desc parameter, and use it.
6659 (new_register_cache): Ditto. Assert the target description has a
6660 non zero registers_size.
6661 (regcache_cpy): Add assertions. Adjust.
6662 (realloc_register_cache, set_register_cache): Delete.
6663 (registers_to_string, registers_from_string): Adjust.
6664 (find_register_by_name, find_regno, find_register_by_number)
6665 (register_cache_size): Add target_desc parameter, and use it.
6666 (free_register_cache_thread, free_register_cache_thread_one)
6667 (regcache_release, register_cache_size): New.
6668 (register_size): Add target_desc parameter, and use it.
6669 (register_data, supply_register, supply_register_zeroed)
6670 (supply_regblock, supply_register_by_name, collect_register)
6671 (collect_register_as_string, collect_register_by_name): Adjust.
6672 * regcache.h (struct target_desc): Forward declare.
6673 (struct regcache) <tdesc>: New field.
6674 (init_register_cache, new_register_cache): Add target_desc
6675 parameter.
6676 (regcache_invalidate_thread): Declare.
6677 (regcache_invalidate_one): Delete declaration.
6678 (regcache_release): Declare.
6679 (find_register_by_number, register_cache_size, register_size)
6680 (find_regno): Add target_desc parameter.
6681 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6682 declarations.
6683 * remote-utils.c: Include tdesc.h.
6684 (outreg, prepare_resume_reply): Adjust.
6685 * server.c: Include tdesc.h.
6686 (gdbserver_xmltarget): Delete declaration.
6687 (get_features_xml, process_serial_event): Adjust.
6688 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6689 declare.
6690 (struct process_info) <tdesc>: New field.
6691 (ipa_tdesc): Declare.
6692 * tdesc.c: New file.
6693 * tdesc.h: New file.
6694 * tracepoint.c: Include tdesc.h.
6695 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6696 (get_context_regcache): Adjust to pass ipa_tdesc down.
6697 (do_action_at_tracepoint): Adjust to get the register cache size
6698 from the context regcache's description.
6699 (traceframe_walk_blocks): Adjust to get the register cache size
6700 from the current trace frame's description.
6701 (traceframe_get_pc): Adjust to get current trace frame's
6702 description and pass it down.
6703 (gdb_collect): Adjust to get the register cache size from the
6704 IPA's description.
6705 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6706 (gdbserver_xmltarget): Delete.
6707 (initialize_low_tracepoint): Set the ipa's target description.
6708 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6709 (initialize_low_tracepoint): Set the ipa's target description.
6710 * linux-x86-low.c: Include tdesc.h.
6711 [__x86_64__] (is_64bit_tdesc): New.
6712 (ps_get_thread_area, x86_get_thread_area): Use it.
6713 (i386_cannot_store_register): Rename to ...
6714 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6715 (i386_cannot_fetch_register): Rename to ...
6716 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6717 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6718 to new interface.
6719 (target_regsets): Rename to ...
6720 (x86_regsets): ... this.
6721 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6722 interface.
6723 (x86_siginfo_fixup): Use is_64bit_tdesc.
6724 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6725 (tdesc_x32_avx_linux, tdesc_x32_linux)
6726 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6727 Declare.
6728 (x86_linux_update_xmltarget): Delete.
6729 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6730 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6731 (AMD64_LINUX_USER64_CS): New.
6732 (x86_linux_read_description): New, based on
6733 x86_linux_update_xmltarget.
6734 (same_process_callback): New.
6735 (x86_arch_setup_process_callback): New.
6736 (x86_linux_update_xmltarget): New.
6737 (x86_regsets_info): New.
6738 (amd64_linux_regs_info): New.
6739 (i386_linux_usrregs_info): New.
6740 (i386_linux_regs_info): New.
6741 (x86_linux_regs_info): New.
6742 (x86_arch_setup): Reimplement.
6743 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6744 (x86_emit_ops): Ditto.
6745 (the_low_target): Adjust. Install x86_linux_regs_info,
6746 x86_cannot_fetch_register, and x86_cannot_store_register.
6747 (initialize_low_arch): New.
6748 * linux-ia64-low.c (tdesc_ia64): Declare.
6749 (ia64_fetch_register): Adjust.
6750 (ia64_usrregs_info, regs_info): New globals.
6751 (ia64_regs_info): New function.
6752 (the_low_target): Adjust.
6753 (initialize_low_arch): New function.
6754 * linux-sparc-low.c (tdesc_sparc64): Declare.
6755 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6756 Adjust.
6757 (sparc_arch_setup): New function.
6758 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6759 (the_low_target): Adjust.
6760 (initialize_low_arch): New function.
6761 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6762 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6763 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6764 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6765 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6766 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6767 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6768 (tdesc_powerpc_isa205_vsx64l): Declare.
6769 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6770 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6771 (ppc_set_pc, ppc_get_hwcap): Adjust.
6772 (ppc_usrregs_info): Forward declare.
6773 (!__powerpc64__) ppc_regmap_adjusted: New global.
6774 (ppc_arch_setup): Adjust to the current process'es target
6775 description.
6776 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6777 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6778 (ppc_store_evrregset): Adjust.
6779 (target_regsets): Rename to ...
6780 (ppc_regsets): ... this, and make static.
6781 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6782 (ppc_regs_info): New function.
6783 (the_low_target): Adjust.
6784 (initialize_low_arch): New function.
6785 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6786 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6787 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6788 (tdesc_s390x_linux64v2): Declare.
6789 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6790 (s390_fill_gregset, s390_store_last_break): Adjust.
6791 (target_regsets): Rename to ...
6792 (s390_regsets): ... this, and make static.
6793 (s390_get_pc, s390_set_pc): Adjust.
6794 (s390_get_hwcap): New target_desc parameter, and use it.
6795 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6796 (s390_arch_setup): Adjust to set the current process'es target
6797 description. Don't adjust the regmap.
6798 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6799 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6800 (regs_info_3264): New globals.
6801 (s390_regs_info): New function.
6802 (the_low_target): Adjust.
6803 (initialize_low_arch): New function.
6804 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6805 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6806 [__mips64] (init_registers_mips_linux)
6807 (init_registers_mips_dsp_linux): Delete defines.
6808 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6809 (have_dsp): New global.
6810 (mips_read_description): New, based on mips_arch_setup.
6811 (mips_arch_setup): Reimplement.
6812 (get_usrregs_info): New function.
6813 (mips_cannot_fetch_register, mips_cannot_store_register)
6814 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6815 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6816 (target_regsets): Rename to ...
6817 (mips_regsets): ... this, and make static.
6818 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6819 (dsp_regs_info, regs_info): New globals.
6820 (mips_regs_info): New function.
6821 (the_low_target): Adjust.
6822 (initialize_low_arch): New function.
6823 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6824 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6825 Declare.
6826 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6827 (arm_read_description): New, with bits factored from
6828 arm_arch_setup.
6829 (arm_arch_setup): Reimplement.
6830 (target_regsets): Rename to ...
6831 (arm_regsets): ... this, and make static.
6832 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6833 (arm_regs_info): New function.
6834 (the_low_target): Adjust.
6835 (initialize_low_arch): New function.
6836 * linux-m68k-low.c (tdesc_m68k): Declare.
6837 (target_regsets): Rename to ...
6838 (m68k_regsets): ... this, and make static.
6839 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6840 (m68k_regs_info): New function.
6841 (m68k_arch_setup): New function.
6842 (the_low_target): Adjust.
6843 (initialize_low_arch): New function.
6844 * linux-sh-low.c (tdesc_sharch): Declare.
6845 (target_regsets): Rename to ...
6846 (sh_regsets): ... this, and make static.
6847 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6848 (sh_regs_info, sh_arch_setup): New functions.
6849 (the_low_target): Adjust.
6850 (initialize_low_arch): New function.
6851 * linux-bfin-low.c (tdesc_bfin): Declare.
6852 (bfin_arch_setup): New function.
6853 (bfin_usrregs_info, regs_info): New globals.
6854 (bfin_regs_info): New function.
6855 (the_low_target): Adjust.
6856 (initialize_low_arch): New function.
6857 * linux-cris-low.c (tdesc_cris): Declare.
6858 (cris_arch_setup): New function.
6859 (cris_usrregs_info, regs_info): New globals.
6860 (cris_regs_info): New function.
6861 (the_low_target): Adjust.
6862 (initialize_low_arch): New function.
6863 * linux-cris-low.c (tdesc_crisv32): Declare.
6864 (cris_arch_setup): New function.
6865 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6866 (cris_regs_info): New function.
6867 (the_low_target): Adjust.
6868 (initialize_low_arch): New function.
6869 * linux-m32r-low.c (tdesc_m32r): Declare.
6870 (m32r_arch_setup): New function.
6871 (m32r_usrregs_info, regs_info): New globals.
6872 (m32r_regs_info): Adjust.
6873 (initialize_low_arch): New function.
6874 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6875 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6876 (tic6x_usrregs_info): Forward declare.
6877 (tic6x_read_description): New function, based on ...
6878 (tic6x_arch_setup): ... this. Reimplement.
6879 (target_regsets): Rename to ...
6880 (tic6x_regsets): ... this, and make static.
6881 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6882 (tic6x_regs_info): New function.
6883 (the_low_target): Adjust.
6884 (initialize_low_arch): New function.
6885 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6886 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6887 (target_regsets): Rename to ...
6888 (xtensa_regsets): ... this, and make static.
6889 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6890 globals.
6891 (xtensa_arch_setup, xtensa_regs_info): New functions.
6892 (the_low_target): Adjust.
6893 (initialize_low_arch): New function.
6894 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6895 (nios2_arch_setup): Set the current process'es tdesc.
6896 (target_regsets): Rename to ...
6897 (nios2_regsets): ... this.
6898 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6899 (nios2_regs_info): New function.
6900 (the_low_target): Adjust.
6901 (initialize_low_arch): New function.
a261b8f5
PA
6902 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6903 (aarch64_arch_setup): Set the current process'es tdesc.
6904 (target_regsets): Rename to ...
6905 (aarch64_regsets): ... this.
6906 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6907 (aarch64_regs_info): New function.
6908 (the_low_target): Adjust.
6909 (initialize_low_arch): New function.
3aee8918
PA
6910 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6911 globals.
6912 (target_regsets): Rename to ...
6913 (tile_regsets): ... this.
6914 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6915 (tile_regs_info): New function.
6916 (tile_arch_setup): Set the current process'es tdesc.
6917 (the_low_target): Adjust.
6918 (initialize_low_arch): New function.
6919 * spu-low.c (tdesc_spu): Declare.
6920 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6921 * win32-arm-low.c (tdesc_arm): Declare.
6922 (arm_arch_setup): New function.
6923 (the_low_target): Install arm_arch_setup instead of
6924 init_registers_arm.
6925 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6926 (init_windows_x86): Rename to ...
6927 (i386_arch_setup): ... this. Set `win32_tdesc'.
6928 (the_low_target): Adjust.
6929 * win32-low.c (win32_tdesc): New global.
6930 (child_add_thread): Don't create the thread cache here.
6931 (do_initial_child_stuff): Set the new process'es tdesc.
6932 * win32-low.h (struct target_desc): Forward declare.
6933 (win32_tdesc): Declare.
6934 * lynx-i386-low.c (tdesc_i386): Declare global.
6935 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6936 * lynx-low.c (lynx_tdesc): New global.
6937 (lynx_add_process): Set the new process'es tdesc.
6938 * lynx-low.h (struct target_desc): Forward declare.
6939 (lynx_tdesc): Declare global.
6940 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6941 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6942 * nto-low.c (nto_tdesc): New global.
6943 (do_attach): Set the new process'es tdesc.
6944 * nto-low.h (struct target_desc): Forward declare.
6945 (nto_tdesc): Declare.
6946 * nto-x86-low.c (tdesc_i386): Declare.
6947 (nto_x86_arch_setup): Set `nto_tdesc'.
6948
b1fbec62
GB
69492013-06-04 Gary Benson <gbenson@redhat.com>
6950
6951 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6952 to qSupported response when appropriate.
6953 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6954 with nonzero-length annex.
6955 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6956 arguments supplied in annex.
6957
d1ec4ce7
DE
69582013-05-31 Doug Evans <dje@google.com>
6959
ac44adcb 6960 PR server/15594
d1ec4ce7
DE
6961 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6962 64 bits in 64-cross-32 environment.
6963
9b25f2d3
PA
69642013-05-28 Pedro Alves <palves@redhat.com>
6965
6966 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6967 (aarch64-without-fpu.c): Delete rule.
6968 * configure.srv (aarch64*-*-linux*): Remove references to
6969 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6970 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6971 declaration.
6972
6740dc9c
PA
69732013-05-24 Pedro Alves <palves@redhat.com>
6974
6975 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6976 instead of strchr/decode_address. Error if the range isn't split
6977 with a ','. Don't assume there's be a ':' in the action.
6978
c2d6af84
PA
69792013-05-23 Yao Qi <yao@codesourcery.com>
6980 Pedro Alves <palves@redhat.com>
6981
6982 * linux-low.c (lwp_in_step_range): New function.
6983 (linux_wait_1): If the thread was range stepping and stopped
6984 outside the stepping range, report the stop to GDB. Otherwise,
6985 continue stepping. Add range stepping debug output.
6986 (linux_set_resume_request): Copy the step range from the resume
6987 request to the lwp.
6988 (linux_supports_range_stepping): New.
6989 (linux_target_ops) <supports_range_stepping>: Set to
6990 linux_supports_range_stepping.
6991 * linux-low.h (struct linux_target_ops)
6992 <supports_range_stepping>: New field.
6993 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6994 * linux-x86-low.c (x86_supports_range_stepping): New.
6995 (the_low_target) <supports_range_stepping>: Set to
6996 x86_supports_range_stepping.
6997 * server.c (handle_v_cont): Handle 'r' action.
6998 (handle_v_requests): Append ";r" if the target supports range
6999 stepping.
7000 * target.h (struct thread_resume) <step_range_start,
7001 step_range_end>: New fields.
7002 (struct target_ops) <supports_range_stepping>:
7003 New field.
7004 (target_supports_range_stepping): New macro.
7005
58794e1a
JB
70062013-05-17 Joel Brobecker <brobecker@adacore.com>
7007
7008 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7009 confusion in comment.
7010
d631c5a7
JB
70112013-05-17 Joel Brobecker <brobecker@adacore.com>
7012
7013 * lynx-low.c (struct process_info_private): New type.
7014 (lynx_add_process): New function.
7015 (lynx_create_inferior, lynx_attach): Replace calls to
7016 add_process by calls to lynx_add_process.
7017 (lynx_resume): If PTID is null, then try using
7018 current_process()->private->last_wait_event_ptid.
7019 Add comments.
7020 (lynx_clear_inferiors): Delete. The contents of that function
7021 has been inlined in lynx_mourn;
7022 (lynx_wait_1): Save the ptid in the process's private data.
7023 (lynx_mourn): Free the process' private data. Replace call
7024 to lynx_clear_inferiors by call to clear_inferiors.
7025
96f7a20f
YQ
70262013-05-17 Yao Qi <yao@codesourcery.com>
7027
7028 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7029 the right place.
7030
db0dfaa0
LM
70312013-05-16 Luis Machado <lgustavo@codesourcery.com>
7032
7033 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7034 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7035 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7036 PT_TEXT_END_ADDR guards. Update comments.
7037 (linux_target_op) <read_offsets>: Conditionally define to
7038 linux_read_offsets if the target is UCLIBC and if it defines
7039 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7040
68f5f838
SL
70412013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7042 Andrew Jenner <andrew@codesourcery.com>
7043
7044 * Makefile.in (SFILES): Add linux-nios2-low.c.
7045 (clean): Add action to delete nios2-linux.c.
7046 (nios2-linux.c): New rule.
7047 * configure.srv: Add nios2*-*-linux*.
7048 * linux-nios2-low.c: New.
7049
1ebff1fd
HAQ
70502013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7051
7052 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7053
f6150862
HZ
70542013-04-25 Hui Zhu <hui@codesourcery.com>
7055
7056 PR gdb/15186
f6150862
HZ
7057 * ax.c (ax_printf): Add fflush.
7058
614c279d
TT
70592013-04-22 Tom Tromey <tromey@redhat.com>
7060
7061 * Makefile.in (SFILES): Add filestuff.c.
7062 (OBS): Add filestuff.o.
7063 (filestuff.o): New target.
7064 * config.in, configure: Rebuild.
7065 * configure.ac: Check for fdwalk, pipe2.
7066
7d4e5717
PA
70672013-04-17 Pedro Alves <palves@redhat.com>
7068
7069 * configure.ac (USE_THREAD_DB): Delete variable.
7070 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7071 Don't AC_SUBST USE_THREAD_DB.
7072 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7073 * config.in, configure: Regenerate.
7074
d5c93e41
PA
70752013-04-16 Pedro Alves <palves@redhat.com>
7076
7077 * linux-low.h (struct lwp_info) <thread_known>: Move under
7078 the USE_THREAD_DB #ifdef.
7079
04f5fe89
PA
70802013-04-16 Pedro Alves <palves@redhat.com>
7081
7082 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7083 (linux-low.o): Delete rule.
7084 * linux-low.h: Always include "gdb_thread_db.h" instead of
7085 conditionally including thread_db.h.
7086 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7087 HAVE_THREAD_DB_H.
7088
480b27bf
JK
70892013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7090
7091 * Makefile.in (install-only): Fix make install regression.
7092
43662968
JK
70932013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7094
7095 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7096 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7097 installation.
7098 * gdbserver.1: Remove.
7099
3e74e146
PA
71002013-03-22 Pedro Alves <palves@redhat.com>
7101
7102 * linux-low.c (handle_extended_wait): Don't call
7103 linux_enable_event_reporting.
7104
a8347a2a
TT
71052013-03-15 Tony Theodore <tonyt@logyst.com>
7106
7107 PR build/9098:
7108 * Makefile.in (SHELL): Use @SHELL@.
7109
eeb56fa7
SDJ
71102013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7111
7112 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7113 compiler warning.
7114
4fa7e2ff
JB
71152013-03-13 Joel Brobecker <brobecker@adacore.com>
7116
7117 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7118 Remove extraneous NULL element.
7119
8ddb1965
YQ
71202013-03-13 Yao Qi <yao@codesourcery.com>
7121
7122 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7123 'V' block in trace frame.
7124
9accd112
MM
71252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7126
7127 * target.h (struct target_ops): Add btrace ops.
7128 (target_supports_btrace): New macro.
7129 (target_enable_btrace): New macro.
7130 (target_disable_btrace): New macro.
7131 (target_read_btrace): New macro.
7132 * gdbthread.h (struct thread_info): Add btrace field.
7133 * server.c: Include btrace-common.h.
7134 (handle_btrace_general_set): New function.
7135 (handle_btrace_enable): New function.
7136 (handle_btrace_disable): New function.
7137 (handle_general_set): Call handle_btrace_general_set.
7138 (handle_qxfer_btrace): New function.
7139 (struct qxfer qxfer_packets[]): Add btrace entry.
7140 * inferiors.c (remove_thread): Disable btrace.
7141 * linux-low: Include linux-btrace.h.
7142 (linux_low_enable_btrace): New function.
7143 (linux_low_read_btrace): New function.
7144 (linux_target_ops): Add btrace ops.
7145 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7146 Add srv_linux_btrace=yes.
7147 (x86_64-*-linux*): Add linux-btrace.o.
7148 Add srv_linux_btrace=yes.
7149 * configure.ac: Define HAVE_LINUX_BTRACE.
7150 * config.in: Regenerated.
7151 * configure: Regenerated.
7152
5cc22e4c
MM
71532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7154
7155 * server.c (handle_qxfer): Preserve error message if -3 is
7156 returned.
7157 (qxfer): Document the -3 return value.
7158
7c97f91e
MM
71592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7160
7161 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7162 (linux_btrace_h): New variable.
7163 (linux-btrace.o): New rule.
7164
be9a119c 71652013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7166 Hafiz Abid Qadeer <abidh@codesourcery.com>
7167
7168 * tracepoint.c (trace_buffer_size): New global.
7169 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7170 (init_trace_buffer): Change to one-argument function. Allocate
7171 trace buffer memory.
7172 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7173 handle QTBuffer:size packet.
7174 (cmd_bigqtbuffer_size): New function.
7175 (initialize_tracepoint): Call init_trace_buffer with
7176 DEFAULT_TRACE_BUFFER_SIZE.
7177 * server.c (handle_query): Add QTBuffer:size in the
7178 supported packets.
7179
e64f7499
YQ
71802013-03-07 Yao Qi <yao@codesourcery.com>
7181
7182 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7183 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7184 of -1.
7185 (cmd_qtsp): Adjust condition. Do post increment.
7186 Set cur_action and cur_step_action back to 0.
7187
f0ae6fc3
PA
71882013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7189
7190 PR server/15236
7191 * linux-low.c (linux_write_memory): Return early success if LEN is
7192 zero.
7193
b5b0b0af
CV
71942013-03-05 Corinna Vinschen <vinschen@redhat.de>
7195
334ad4a8 7196 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7197
589bc927
TT
71982013-02-28 Tom Tromey <tromey@redhat.com>
7199
7200 * configure.ac: Invoke AC_SYS_LARGEFILE.
7201 * configure, config.in: Rebuild.
7202
dfe07582
CV
72032013-02-28 Corinna Vinschen <vinschen@redhat.com>
7204
7205 * win32-low.c: Throughout, fix format strings and casts of
7206 printf-like functions to avoid type related warnings on all
7207 platforms.
7208 (get_child_debug_event): Print dwDebugEventCode as hex since
7209 that's how it's usually documented.
7210
736cd585
YQ
72112013-02-28 Yao Qi <yao@codesourcery.com>
7212
7213 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7214 pulongest.
7215
e1f58301
JW
72162013-02-27 Jiong Wang <jiwang@tilera.com>
7217
7218 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7219 (reg-tilegx32.c): New rule.
7220 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7221 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7222 different register info initializer according to elf class.
7223 (init_registers_tilgx32): New function. The tilegx32 register info
7224 initializer.
7225 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7226 (tile_store_gregset): Likewise.
7227
d171ca78
YQ
72282013-02-27 Yao Qi <yao@codesourcery.com>
7229
7230 * server.c (process_point_options): Print debug message when
7231 debug_threads is true.
7232
282bbdf3
YQ
72332013-02-26 Yao Qi <yao@codesourcery.com>
7234
7235 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7236
aca22551
PA
72372013-02-19 Pedro Alves <palves@redhat.com>
7238 Kai Tietz <ktietz@redhat.com>
7239
7240 PR gdb/15161
7241
7242 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7243 instead of strtoul to extract address from packet.
7244 (process_serial_event) <'z'>: Likewise.
7245
4f3cee1c
YQ
72462013-02-18 Yao Qi <yao@codesourcery.com>
7247
7248 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7249
8e1d55a3
PA
72502013-02-14 Pedro Alves <palves@redhat.com>
7251
7252 Plug memory leak.
7253
7254 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7255 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7256
458820da
PA
72572013-02-14 Pedro Alves <palves@redhat.com>
7258
7259 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7260
baea0dae
PA
72612013-02-14 Pedro Alves <palves@redhat.com>
7262
7263 * tracepoint.c (save_string): Delete.
7264 (add_tracepoint_action): Use savestring instead of save_string.
7265
0b1afbb3
PA
72662013-02-12 Pedro Alves <palves@redhat.com>
7267
7268 * linux-xtensa-low.c: Ditto.
7269 * xtensa-xtregs.c: Ditto.
7270
8a4ac37e
PA
72712013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7272
7273 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7274 thread_db.
7275
148de6bb
MS
72762013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7277
7278 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7279 aarch64_num_wp_regs and aarch64_num_bp_regs to
7280 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7281
55fac6e0
MS
72822013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7283
7284 * linux-aarch64-low.c (ps_get_thread_area): Replace
7285 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7286
176eb98c
MS
72872013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7288 Marcus Shawcroft <marcus.shawcroft@arm.com>
7289 Nigel Stephens <nigel.stephens@arm.com>
7290 Yufeng Zhang <yufeng.zhang@arm.com>
7291
7292 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7293 (aarch64.c, aarch64-without-fpu.c): New targets.
7294 * configure.srv (aarch64*-*-linux*): New.
7295 * linux-aarch64-low.c: New file.
7296
56f7af9c
MS
72972013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7298
43aaf8b6 7299 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7300 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7301 (dequeue_one_deferred_signal, linux_resume_one_thread)
7302 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7303 (linux_tracefork_grandchild, linux_test_for_tracefork)
7304 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7305 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7306 where the argument is 0.
7307
60f662b0
YQ
73082013-01-25 Yao Qi <yao@codesourcery.com>
7309
7310 * event-loop.c: Include "queue.h".
7311 (gdb_event_p): New typedef.
7312 (struct gdb_event) <next_event>: Remove.
7313 (event_queue): Change to QUEUE(gdb_event_p).
7314 (async_queue_event): Remove.
7315 (gdb_event_xfree): New.
7316 (initialize_event_loop): New.
7317 (process_event): Use API from QUEUE.
7318 (wait_for_event): Likewise.
7319 * server.c (main): Call initialize_event_loop.
7320 * server.h (initialize_event_loop): Declare.
7321
5ae4861a
YQ
73222013-01-18 Yao Qi <yao@codesourcery.com>
7323
7324 * ax.h (struct eval_agent_expr_context): New.
7325 (gdb_eval_agent_expr): Update declaration.
7326 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7327 TFRAME. Add new argument CTX.
7328 * server.h (struct eval_agent_expr_context): Declare.
7329 (agent_mem_read, agent_tsv_read): Update declaration.
7330 (agent_mem_read_string): Likewise.
7331 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7332 (add_traceframe_block): Add new argument TPOINT.
7333 Increase TPOINT->traceframe_usage.
7334 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7335 eval_tracepoint_agent_expr.
7336 (condition_true_at_tracepoint): Likewise.
7337 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7338 (agent_mem_read_string, agent_tsv_read): Likewise.
7339
85e00e85
YQ
73402013-01-16 Yao Qi <yao@codesourcery.com>
7341
7342 * linux-low.c (linux_resume_one_lwp): Don't check
7343 'lwp->bp_reinsert != 0'.
7344
4039cf45
JB
73452013-01-07 Joel Brobecker <brobecker@adacore.com>
7346 Pedro Alves <palves@redhat.com>
7347
7348 * lynx-low.c (ptrace_request_to_str): Define a temporary
7349 macro and use it to simplify this function's implementation.
7350
9044dee2
JB
73512013-01-07 Joel Brobecker <brobecker@adacore.com>
7352
7353 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7354 sets errno.
7355
e6352c8f
JB
73562013-01-07 Joel Brobecker <brobecker@adacore.com>
7357
7358 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7359
50681a27
JB
73602013-01-07 Joel Brobecker <brobecker@adacore.com>
7361
7362 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7363
3f6e77ef
JB
73642013-01-07 Joel Brobecker <brobecker@adacore.com>
7365
7366 * lynx-low.c (lynx_resume): Use the resume_info parameter
7367 to determine the ptid for the lynx_ptrace call, unless
7368 it is equal to minus_one_ptid, in which case we use the
7369 ptid of the current_inferior.
7370 (lynx_wait_1): After having received a thread create/exit
7371 event, resume the inferior's execution using the signaling
7372 thread's ptid, rather than the old ptid.
7373
7fda33ae
JB
73742013-01-07 Joel Brobecker <brobecker@adacore.com>
7375
7376 * lynx-low.c (lynx_resume): Delete variable ret.
7377
b9786c74
JB
73782013-01-01 Joel Brobecker <brobecker@adacore.com>
7379
7380 * gdbreplay.c (gdbreplay_version): Update copyright year.
7381 * server.c (gdbserver_version): Likewise.
7382
8b93d60f
JB
73832012-12-17 Joel Brobecker <brobecker@adacore.com>
7384
7385 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7386 new thread.
7387
037335a7
JB
73882012-12-17 Joel Brobecker <brobecker@adacore.com>
7389
7390 * lynx-low.c (ptrace_request_to_str): Add handling for
7391 PTRACE_GETTRACESIG.
7392
52d4cbd8
JB
73932012-12-17 Joel Brobecker <brobecker@adacore.com>
7394
7395 * lynx-low.c (lynx_attach): Delete variable new_process.
7396
ab8f6ca9
JB
73972012-12-17 Joel Brobecker <brobecker@adacore.com>
7398
7399 * lynx-low.c (lynx_create_inferior): Delete variable
7400 new_process.
7401
78cbc024
JB
74022012-12-17 Joel Brobecker <brobecker@adacore.com>
7403
7404 * lynx-low.c (ptrace_request_to_str): Do not handle
7405 PTRACE_GETTHREADLIST if this macro does not exist.
7406
14a00470
YQ
74072012-12-15 Yao Qi <yao@codesourcery.com>
7408
7409 * Makefile.in (OBS): Add notif.o.
7410 * notif.c, notif.h: New.
7411 * server.c: Include "notif.h".
7412 (struct vstop_notif) <next>: Remove.
7413 <base>: New field.
7414 (queue_stop_reply): Update.
7415 (push_event, send_next_stop_reply): Remove.
7416 (discard_queued_stop_replies): Update.
7417 (notif_stop): New variable.
7418 (handle_v_stopped): Remove.
7419 (handle_v_requests): Don't call handle_v_stopped. Call
7420 handle_ack_notif instead.
7421 (queue_stop_reply_callback): Call notif_event_enque instead
7422 of queue_stop_reply.
7423 (handle_status): Don't call send_next_stop_reply, call
7424 notif_write_event instead.
7425 (kill_inferior_callback): Likewise.
7426 (detach_or_kill_inferior_callback): Likewise.
7427 (main): Call initialize_notif.
7428 (process_serial_event): Call QUEUE_is_empty.
7429 (handle_target_event): Call notif_push instead of push event.
7430 * server.h (push_event): Remove declaration.
7431
61c125b9
TT
74322012-12-10 Tom Tromey <tromey@redhat.com>
7433
7434 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7435 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7436 macros.
7437 (.c.o): Rewrite.
7438 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7439 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7440 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7441 (amd64-linux-ipa.o, ax.o): Rewrite.
7442 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7443 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7444 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7445 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7446 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7447 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7448 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7449 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7450 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7451 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7452 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7453 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7454 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7455 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7456 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7457 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7458 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7459 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7460 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7461 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7462 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7463 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7464 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7465 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7466 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7467 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7468 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7469 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7470 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7471 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7472 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7473 (reg-tilegx.o): Remove.
7474 (all_object_files): New macro.
7475 Include .deps files.
7476 * aclocal.m4, configure: Rebuild.
7477 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7478 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7479 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7480
e90e9ad9
TT
74812012-12-05 Tom Tromey <tromey@redhat.com>
7482
7483 PR gdb/14917:
7484 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7485
02d403bf 74862012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7487
7488 * configure.ac: Check for linux/perf_event.h.
7489 * config.in: Regenerated.
7490 * configure: Regenerated.
7491
0270a750
PA
74922012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7493
7494 * hostio.c (handle_readlink): Decrease buffer size
7495 parameter passed to readlink by one byte.
7496
8c29b58e
YQ
74972012-11-26 Yao Qi <yao@codesourcery.com>
7498
7499 * configure.ac (build_warnings): Append '-Wempty-body'.
7500 * configure: Regenerated.
7501 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7502 body.
7503
8bdce1ff
PM
75042012-11-15 Pierre Muller <muller@sourceware.org>
7505
7506 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7507 * config.in: Regenerate.
7508 * configure: Regenerate.
7509 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7510 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7511 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7512 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7513 header.
7514 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7515 instead of <sys/wait.h> header.
7516 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7517
02d403bf 75182012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7519
7520 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7521 (various make rules): Remove -DGDBSERVER
7522
fbd5db48
YQ
75232012-11-09 Yao Qi <yao@codesourcery.com>
7524
7525 * spu-low.c (current_ptid): Move it to ..
7526 * gdbthread.h: ... here. New.
7527 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7528 * server.c (myresume, process_serial_event): Likewise.
7529 * thread-db.c (thread_db_find_new_threads): Likewise.
7530 * tracepoint.c (run_inferior_command): Likewise.
7531
b3dc46ff
AB
75322012-10-01 Andrew Burgess <aburgess@broadcom.com>
7533
7534 * server.c (handle_search_memory_1): Include access length in
7535 warning message.
7536
07c04788
HPN
75372012-09-05 Michael Brandt <michael.brandt@axis.com>
7538
7539 * linux-crisv32-low.c: Fix compile errors.
7540
918d227b
YQ
75412012-09-04 Yao Qi <yao@codesourcery.com>
7542
7543 * tracepoint.c (cmd_qtsv): Adjust debug message.
7544 Don't check CUR_TPOINT.
7545
18c1b81a
YQ
75462012-08-28 Yao Qi <yao@codesourcery.com>
7547
7548 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7549 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7550 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7551 Remove declarations of xmalloc, xreallloc, xstrdup and
7552 freeargv.
7553 * Makefile.in (libiberty_h): New.
7554 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7555 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7556
dc82f37b
YQ
75572012-08-23 Yao Qi <yao@codesourcery.com>
7558
7559 * server.h: Remove declaration of 'xsnprintf'.
7560
406b1477
KS
75612012-08-22 Keith Seitz <keiths@redhat.com>
7562
7563 * server.h: Include build-gnulib-gbserver/config.h.
7564 * gdbreplay.c: Likewise.
7565
e6712ff1
DE
75662012-08-08 Doug Evans <dje@google.com>
7567
7568 * Makefile.in (SFILES): Add gdb_vecs.c.
7569 (OBS): Add gdb_vecs.o.
7570 (gdb_vecs_h, host_defs_h): New variables.
7571 (thread-db.o): Add $(gdb_vecs_h) dependency.
7572 (gdb_vecs.o): New rule.
7573 * thread-db.c: #include "gdb_vecs.h".
7574 (thread_db_load_search): Use a vector to iterate over path elements.
7575 Handle text appearing after "$pdir".
7576
7577 * configure.ac: Add check for strstr.
7578 * config.in: Regenerate.
7579 * configure: Regenerate.
7580
7c3270ae
UW
75812012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7582
7583 * hostio.c (handle_pread): If pread fails, fall back to attempting
7584 lseek/read.
7585 (handle_pwrite): Likewise for pwrite.
7586
b62e2b27
UW
75872012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7588
7589 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7590 between unsupported TYPE and unimplementable ADDR/LEN combination.
7591 (arm_insert_point): Act on new return value.
7592
78a99e91
PA
75932012-07-31 Pedro Alves <palves@redhat.com>
7594
7595 * server.c (process_point_options): Only skip tokens if we find
7596 one that is unrecognized. Don't treat 'X' specially while
7597 skipping unrecognized tokens.
7598
fcf303ab
UW
75992012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7600
7601 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7602 to 4-byte-align HW breakpoint addresses for Thumb.
7603
7255706c
YQ
76042012-07-27 Yao Qi <yao@codesourcery.com>
7605
7606 PR remote/14161.
7607
7608 * server.h: Declare gdb_agent_about_to_close.
7609 * target.c (kill_inferior): Include "agent.h".
7610 New. Send command 'kill'.
7611 * target.h (kill_inferior): Removed macro.
7612 * tracepoint.c (gdb_agent_about_to_close): New.
7613 (gdb_agent_helper_thread): Handle command 'close'.
7614 Wait endlessly until the inferior stops.
7615 Install gdb_agent_remove_socket to atexit hook.
7616 (agent_socket_name): New static variable.
7617 (gdb_agent_socket_init): Replace local variable 'name' with
7618 'agent_socket_name'.
7619 (gdb_agent_remove_socket): New.
7620
5a3f286f
YQ
76212012-07-27 Yao Qi <yao@codesourcery.com>
7622
7623 * server.c (process_point_options): Stop at 'X' when parsing.
7624
961bd387
ME
76252012-07-19 Michael Eager <eager@eagercon.com>
7626
a261b8f5 7627 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7628 to hw_execute.
7629 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7630 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7631 hardware breakpoint.
7632
aa7c7447
JK
76332012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7634
7635 * gdbserver/linux-low.c (initialize_low): Call
7636 linux_ptrace_init_warnings.
7637
7f216e7c
DE
76382012-07-02 Doug Evans <dje@google.com>
7639
7640 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7641 pointer to int.
7642
d3ce09f5
SS
76432012-07-02 Stan Shebs <stan@codesourcery.com>
7644
7645 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7646 (ax.o): Add it to build rule.
7647 (ax-ipa.o): Ditto.
7648 (OBS): Add format.o.
7649 (IPA_OBS): Add format.o.
7650 * server.c (handle_query): Claim support for breakpoint commands.
7651 (process_point_options): Add command case.
7652 (process_serial_event): Leave running if there are printfs in
7653 effect.
7654 * mem-break.h (any_persistent_commands): Declare.
7655 (add_breakpoint_commands): Declare.
7656 (gdb_no_commands_at_breakpoint): Declare.
7657 (run_breakpoint_commands): Declare.
7658 * mem-break.c (struct point_command_list): New struct.
7659 (struct breakpoint): New field command_list.
7660 (any_persistent_commands): New function.
7661 (add_commands_to_breakpoint): New function.
7662 (add_breakpoint_commands): New function.
7663 (gdb_no_commands_at_breakpoint): New function.
7664 (run_breakpoint_commands): New function.
7665 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7666 locally.
7667 * ax.c: Include format.h.
7668 (ax_printf): New function.
7669 (gdb_eval_agent_expr): Add printf opcode.
7670
2f8f6aed
YQ
76712012-06-13 Yao Qi <yao@codesourcery.com>
7672
7673 * server.c (start_inferior): Remove duplicated writes to fields
7674 'last_resume_kind' and 'last_status' of 'current_inferior'.
7675
0c9070b3
YQ
76762012-06-12 Yao Qi <yao@codesourcery.com>
7677 Pedro Alves <palves@redhat.com>
7678
7679 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7680 comment.
7681 * server.c (handle_v_cont): Extend comment.
7682
c52daf70
YQ
76832012-06-11 Yao Qi <yao@codesourcery.com>
7684
7685 * linux-low.c (linux_attach): Add 'static'.
7686
d38bbb0a
YQ
76872012-06-06 Yao Qi <yao@codesourcery.com>
7688
7689 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7690
89dc0afd
JK
76912012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7692
7693 Fix gcc -flto compilation warning.
7694 * server.c (main): Make variable multi_mode and attach volatile.
7695
75f62ce7
TJB
76962012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7697
7698 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7699 if the platform doesn't know about it.
7700
65f479b6
PA
77012012-05-30 Jeff Kenton <jkenton@tilera.com>
7702
7703 * Makefile.in (SFILES): Add linux-tile-low.c.
7704 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7705 * configure.srv: Handle tilegx-*-linux*.
7706 * linux-tile-low.c: New file.
7707
0c5bf5a9
JK
77082012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7709
7710 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7711
a493e3e2
PA
77122012-05-24 Pedro Alves <palves@redhat.com>
7713
7714 PR gdb/7205
7715
43aaf8b6 7716 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7717
2ea28649
PA
77182012-05-24 Pedro Alves <palves@redhat.com>
7719
7720 PR gdb/7205
7721
7722 Replace target_signal with gdb_signal throughout.
7723
8d409d16
MR
77242012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7725
7726 * linux-low.c (linux_store_registers): Avoid the copying sequence
7727 when no data has been retrieved by ptrace.
7728
23512c01
MGD
77292012-05-22 Will Deacon <will.deacon@arm.com>
7730
7731 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7732 Include asm/ptrace.h.
7733 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7734 already defined.
7735
4934b29e
MR
77362012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7737
7738 * linux-low.c (linux_store_registers): Don't re-retrieve data
7739 with ptrace that has already been obtained from /proc. Always
7740 copy any data retrieved with ptrace to the buffer supplied.
7741
bde24c0a
PA
77422012-05-11 Yao Qi <yao@codesourcery.com>
7743 Pedro Alves <palves@redhat.com>
7744
7745 * linux-low.c (enum stopping_threads_kind): New.
7746 (stopping_threads): Change type to `enum stopping_threads_kind'.
7747 (handle_extended_wait): If stopping and suspending threads, leave
7748 the new_lwp suspended too.
7749 (linux_wait_for_event): Adjust.
7750 (stop_all_lwps): Set `stopping_threads' to
7751 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7752 whether we're suspending threads or just stopping them. Assert no
7753 recursion happens.
7754
623b6bdf
YQ
77552012-04-29 Yao Qi <yao@codesourcery.com>
7756
7757 * server.h: Move some code to ...
7758 * gdbthread.h: ... here. New.
7759 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7760 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7761 (nto-low.o, win32-low.o): Likewise.
7762 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7763 * regcache.c, remote-utils.c, server.c: Likewise.
7764 * target.c, tracepoint.c, win32-low.c: Likewise.
7765
f15f9948
TJB
77662012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7767
7768 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7769 (PTRACE_ARG4_TYPE): Likewise.
7770 (PTRACE_XFER_TYPE): Likewise.
7771 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7772 ptrace to PTRACE_ARG3_TYPE.
7773 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7774 (PTRACE_ARG4_TYPE): Likewise.
7775 (PTRACE_XFER_TYPE): Likewise.
7776 (linux_detach_one_lwp): Cast fourth argument of
7777 ptrace to long then PTRACE_ARG4_TYPE.
7778 (regsets_fetch_inferior_registers): Cast third argument of
7779 ptrace to long then PTRACE_ARG3_TYPE.
7780 (regsets_store_inferior_registers): Likewise.
7781
38ea300a
PA
77822012-04-20 Pedro Alves <palves@redhat.com>
7783
7784 * configure: Regenerate.
7785
c971b7fa
PA
77862012-04-19 Pedro Alves <palves@redhat.com>
7787
43aaf8b6 7788 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7789 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7790 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7791 (all, install-only, uninstall, clean-info, all-lib, clean): No
7792 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7793 (maintainer-clean realclean distclean): Use subdir_do.
7794 (subdir_do): New.
7795 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7796 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7797 * acinclude.m4: Include acx_configure_dir.m4.
7798 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7799 calls. Call AC_PROG_RANLIB. Configure gnulib using
7800 ACX_CONFIGURE_DIR.
7801 (GNULIB): New.
7802 (GNULIB_STDINT_H): Adjust.
7803 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7804 * gdbreplay.c: Include build-gnulib/config.h.
7805 * server.h: Likewise.
7806 * aclocal.m4: Regenerate.
7807 * config.in: Regenerate.
7808 * configure: Regenerate.
c971b7fa 7809
809277f8
PA
78102012-04-19 Pedro Alves <palves@redhat.com>
7811
7812 * Makefile.in (LIBGNU, INCGNU): Adjust.
7813 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7814 (all, install-only, uninstall, clean-info, all-lib, clean)
7815 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7816 * configure.ac: Adjust AC_OUTPUT output.
7817 * aclocal.m4: Regenerate.
7818 * configure: Regenerate.
7819
fd9bb8b8
PA
78202012-04-19 Pedro Alves <palves@redhat.com>
7821
7822 * Makefile.in (generated_files): New.
7823 (server_h): Remove the explicit dependency on config.h, and depend
7824 on $generated_files.
7825
1c298c66
PA
78262012-04-19 Pedro Alves <palves@redhat.com>
7827
7828 * Makefile.in (INCGNU): Add -Ignulib.
7829
57c4b50b
PA
78302012-04-19 Pedro Alves <palves@redhat.com>
7831
7832 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7833 (INCGNU): ... this, and spell out -I here.
7834 (GNULIB_LIB): Rename to ...
7835 (LIBGNU): ... this.
7836 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7837
1030e047
PA
78382012-04-19 Pedro Alves <palves@redhat.com>
7839
7840 * config.in: Regenerate.
7841
447d4319
PA
78422012-04-19 Pedro Alves <palves@redhat.com>
7843
7844 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7845 * server.h (memmem): Remove declaration.
7846 * config.in: Regenerate.
7847 * configure: Regenerate.
7848
aad9eab9
YQ
78492012-04-19 Yao Qi <yao@codesourcery.com>
7850
7851 * Makefile.in (SFILES): Add common/vec.c.
7852 (OBS): Add vec.o.
7853 (vec.o): New rule.
7854
3e10640f
YQ
78552012-04-19 Yao Qi <yao@codesourcery.com>
7856
7857 * remote-utils.c (prepare_resume_reply): Replace with macro
7858 target_core_of_thread.
7859 * server.c (handle_qxfer_threads_proper): Likewise.
7860 * target.h (traget_core_of_thread): New macro.
7861
71622373
PA
78622012-04-18 Pedro Alves <palves@redhat.com>
7863
7864 * aclocal.m4: Regenerate.
7865 * configure: Regenerate.
7866
80d26939
YQ
78672012-04-16 Yao Qi <yao@codesourcery.com>
7868
7869 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7870 duplicated on address.
7871
42476b70
YQ
78722012-04-16 Yao Qi <yao@codesourcery.com>
7873
7874 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7875 (struct tracepoint_action_ops) <send>: New field.
7876 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7877 (agent_expr_send, x_tracepoint_action_send): New.
7878 (l_tracepoint_action_send): New.
7879 (cmd_qtdp): Download and install tracepoint
7880 according to `use_agent'.
7881 (run_inferior_command): Add one more parameter `len'.
7882 Update callers.
7883 (tracepoint_send_agent): New.
7884 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7885
7bc83639
YQ
78862012-04-16 Yao Qi <yao@codesourcery.com>
7887
7888 * tracepoint.c (download_tracepoints): Moved to ...
7889 (cmd_qtstart): ... here.
7890
5f18041e
YQ
78912012-04-14 Yao Qi <yao@codesourcery.com>
7892
7893 * tracepoint.c: Include inttypes.h.
7894 (struct collect_memory_action): Use sized types.
7895 (struct tracepoint): Likewise.
7896 (cmd_qtdp, stop_tracing): Update print specifiers.
7897 (cmd_qtp, response_tracepoint): Likewise.
7898 (collect_data_at_tracepoint): Likewise.
7899 (collect_data_at_step): Likewise.
7900
55a8c076
YQ
79012012-04-14 Yao Qi <yao@codesourcery.com>
7902
7903 Import gnulib module inttypes.
7904 * aclocal.m4, config.in, configure: Regenerated.
7905
dc750257
YQ
79062012-04-14 Yao Qi <yao@codesourcery.com>
7907
7908 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7909 Makefile and config.status at last.
7910
0ab5faf9
YQ
79112012-04-13 Yao Qi <yao@codesourcery.com>
7912
7913 * tracepoint.c: Include stdint.h unconditionally.
7914
18f5fd81
TJB
79152012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7916
7917 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7918 on BFD_HAVE_SYS_PROCFS_TYPE.
7919 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7920 * configure: Regenerate.
7921 * config.in: Likewise.
7922
4d47af5c
L
79232012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7924
7925 * Makefile.in (clean): Also remove x32.c x32-linux.c
7926 x32-avx.c x32-avx-linux.c.
7927 (x32.o): New target.
7928 (x32.c): Likewise.
7929 (x32-linux.o): Likewise.
7930 (x32-linux.c): Likewise.
7931 (x32-avx.o): Likewise.
7932 (x32-avx.c): Likewise.
7933 (x32-avx-linux.o): Likewise.
7934 (x32-avx-linux.c): Likewise.
7935
7936 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7937 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7938 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7939 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7940 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7941 i386/x32-avx-linux.xml.
7942
7943 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7944 (init_registers_x32_avx_linux): Likwise.
7945 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7946 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7947
ecedbe58
PA
79482012-04-13 Pedro Alves <palves@redhat.com>
7949
7950 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7951 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7952 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7953 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7954 the sub-make.
7955
c92b5177
L
79562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7957
7958 * linux-x86-low.c (compat_x32_clock_t): New.
7959 (compat_x32_siginfo_t): Likewise.
7960 (compat_x32_siginfo_from_siginfo): Likewise.
7961 (siginfo_from_compat_x32_siginfo): Likewise.
7962 (linux_is_elf64): Likewise.
7963 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7964 and siginfo_from_compat_x32_siginfo for x32.
7965 (x86_arch_setup): Set linux_is_elf64.
7966
214d508e
L
79672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7968
7969 PR gdb/13969
7970 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7971 e_machine field.
7972 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7973 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7974 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7975 compatible with process.
7976
c9a1864a
YQ
79772012-04-12 Yao Qi <yao@codesourcery.com>
7978
7979 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7980 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7981 (install-only, install-info, clean): Handle sub dir gnulib.
7982 (all-lib, am--refresh): New targets.
7983 (memmem.o): Remove target.
7984 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7985 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7986 (AC_REPLACE_FUNCS): Remove memmem.
7987 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7988 (AC_OUTPUT): Generate Makefile in gnulib/.
7989 * aclocal.m4, config.in, configure: Regenerated.
7990
367ba2c2
MR
79912012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7992
7993 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7994
9d236627
PA
79952012-04-05 Pedro Alves <palves@redhat.com>
7996
7997 -Werror=strict-aliasing
7998
7999 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8000 pointer.
8001
111217b3
PA
80022012-04-04 Pedro Alves <palves@redhat.com>
8003
8004 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8005 (sparc_store_gregset_from_stack, sparc_store_gregset)
8006 (sparc_breakpoint_at): Fix formatting.
8007
8365dcf5
TJB
80082012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8009
8010 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8011 are available.
8012 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8013 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8014 * config.in: Regenerate.
8015 * configure: Likewise.
8016
689cc2ae
PA
80172012-03-29 Pedro Alves <palves@redhat.com>
8018
8019 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8020 Correct ptrace arguments.
8021
c14dfd32
PA
80222012-03-28 Pedro Alves <palves@redhat.com>
8023
8024 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8025 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8026 (IA64_FR1_REGNUM): New defines.
8027 (ia64_fetch_register): New.
8028 (the_low_target): Install it.
8029 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8030 field.
8031 * linux-low.c (linux_fetch_registers): Try the
8032 the_low_target.fetch_register hook first.
8033
8034 * linux-arm-low.c (the_low_target): Adjust.
8035 * linux-bfin-low.c (the_low_target): Adjust.
8036 * linux-cris-low.c (the_low_target): Adjust.
8037 * linux-crisv32-low.c (the_low_target): Adjust.
8038 * linux-m32r-low.c (the_low_target): Adjust.
8039 * linux-m68k-low.c (the_low_target): Adjust.
8040 * linux-mips-low.c (the_low_target): Adjust.
8041 * linux-ppc-low.c (the_low_target): Adjust.
8042 * linux-s390-low.c (the_low_target): Adjust.
8043 * linux-sh-low.c (the_low_target): Adjust.
8044 * linux-sparc-low.c (the_low_target): Adjust.
8045 * linux-tic6x-low.c (the_low_target): Adjust.
8046 * linux-x86-low.c (the_low_target): Adjust.
8047 * linux-xtensa-low.c (the_low_target): Adjust.
8048
63c88e13
PA
80492012-03-26 Pedro Alves <palves@redhat.com>
8050
8051 * server.c (handle_qxfer_libraries): Don't bail early if
8052 the_target->qxfer_libraries_svr4 is not NULL.
8053
fb723180
PA
80542012-03-26 Pedro Alves <palves@redhat.com>
8055
8056 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8057
0afae3cf
PA
80582012-03-23 Pedro Alves <palves@redhat.com>
8059
8060 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8061 "library-list-svr4" element's start tag when the the DSO list is
8062 empty.
8063
485f1ee4
PA
80642012-03-23 Pedro Alves <palves@redhat.com>
8065
8066 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8067 a variable whose type size is the same as the inferior's pointer
8068 size.
8069
a5362b9a
TS
80702012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8071
8072 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8073 struct siginfo.
8074 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8075 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8076 * linux-low.h: Include <signal.h>.
8077 (struct siginfo): Remove forward declaration.
8078 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8079 struct siginfo.
8080
d226c142
MF
80812012-03-21 Mike Frysinger <vapier@gentoo.org>
8082
8083 * .gitignore: Ignore more files.
8084
122f36ef
PA
80852012-03-19 Pedro Alves <palves@redhat.com>
8086 Jan Kratochvil <jan.kratochvil@redhat.com>
8087
8088 * server.c (cont_thread, general_thread): Add describing comments.
8089 (start_inferior): Clear `cont_thread'.
8090 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8091 of a process.
8092
fc3e5175
YQ
80932012-03-15 Yao Qi <yao@codesourcery.com>
8094
8095 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8096 handling to ...
8097 (cmd_qtdp): ... here.
8098
8d0d92cd
YQ
80992012-03-15 Yao Qi <yao@codesourcery.com>
8100
8101 * tracepoint.c (struct tracepoint_action_ops): New.
8102 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8103 (m_tracepoint_action_download): New.
8104 (r_tracepoint_action_download): New.
8105 (x_tracepoint_action_download): New.
8106 (l_tracepoint_action_download): New.
8107 (add_tracepoint_action): Install `action->ops' according type.
8108 (download_tracepoint_1): Move code `download' function pointer
8109 of various tracepoint_action_ops.
8110
87b0bb13
JK
81112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8112
8113 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8114 linux_ptrace_attach_warnings.
8115
5f572dec
JK
81162012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8117
8118 * Makefile.in (linux-ptrace.o): New.
8119 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8120 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8121 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8122 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8123 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8124 of these targets.
8125 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8126
f4647387
YQ
81272012-03-08 Yao Qi <yao@codesourcery.com>
8128 Pedro Alves <palves@redhat.com>
8129
8130 Fix PR server/13392.
8131 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8132 offset of JMP insn.
8133 * tracepoint.c (remove_tracepoint): New.
8134 (cmd_qtdp): Call remove_tracepoint when failed to install.
8135
9b224c5e
PA
81362012-03-07 Pedro Alves <palves@redhat.com>
8137
8138 * linux-low.c (get_detach_signal): New.
8139 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8140 Pass on pending signals to PTRACE_DETACH. Check the result of the
8141 ptrace call.
8142 * server.c (program_signals, program_signals_p): New.
8143 (handle_general_set): Handle QProgramSignals.
8144 * server.h (program_signals, program_signals_p): Declare.
8145
e237a7e2
JK
81462012-03-05 Pedro Alves <palves@redhat.com>
8147 Jan Kratochvil <jan.kratochvil@redhat.com>
8148
8149 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8150 New comment why.
8151
5808517f
YQ
81522012-03-03 Yao Qi <yao@codesourcery.com>
8153
8154 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8155 agent_look_up_symbols.
8156
58b4daa5
YQ
81572012-03-03 Yao Qi <yao@codesourcery.com>
8158
8159 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8160 (linux-x86-low.o): Likewise.
8161 * server.h: Remove in_process_agent_loaded.
8162 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8163 common/agent.c.
8164 Update callers.
8165
8ffcbaaf
YQ
81662012-03-03 Yao Qi <yao@codesourcery.com>
8167
8168 * tracepoint.c (gdb_agent_capability): New global.
8169 (in_process_agent_loaded_ust): Renamed to
8170 `in_process_agent_supports_ust'.
8171 Update callers.
8172 (in_process_agent_supports_ust): Call agent_capability_check.
8173 (clear_installed_tracepoints): Assert that agent supports
8174 agent.
8175
d1feda86
YQ
81762012-03-03 Yao Qi <yao@codesourcery.com>
8177
8178 * linux-low.c (linux_supports_agent): New.
8179 (linux_target_ops): Initialize field `supports_agent' with
8180 linux_supports_agent.
8181 * target.h (struct target_ops) <supports_agent>: New.
8182 (target_supports_agent): New macro.
8183 * server.c (handle_general_set): Handle packet 'QAgent'.
8184 (handle_query): Send `QAgent+'.
8185 * Makefile.in (server.o): Depends on agent.h.
8186
2fa291ac
YQ
81872012-03-03 Yao Qi <yao@codesourcery.com>
8188
8189 * Makefile.in (OBS): Add agent.o.
8190 Add new rule for agent.o.
8191 Track dependence of tracepoint.c on agent.h.
8192 * tracepoint.c (run_inferior_command_1):
8193 (run_inferior_command): Call agent_run_command.
8194 (gdb_ust_connect_sync_socket): Deleted. Move it to
8195 common/agent.c.
8196 (resume_thread, stop_thread): Likewise.
8197 (gdb_ust_socket_init): Renamed to ...
8198 (gdb_agent_socket_init): ... New.
8199 (gdb_ust_thread): Renamed to ...
8200 (gdb_agent_helper_thread): ... New.
8201 (gdb_ust_init): Move some code to ...
8202 (gdb_agent_init): ... here. New.
8203 [HAVE_UST]: Call gdb_ust_init.
8204 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8205 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8206 * config.in, configure: Regenerated.
8207
05044653
PA
82082012-03-02 Pedro Alves <palves@redhat.com>
8209
8210 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8211 * linux-low.c (struct simple_pid_list): New.
8212 (stopped_pids): New a struct simple_pid_list pointer.
8213 (add_to_pid_list, pull_pid_from_list): New.
8214 (handle_extended_wait): Don't assume the first signal new children
8215 report is SIGSTOP. Adjust call to pull_pid_from_list.
8216 (linux_wait_for_lwp): Adjust.
8217
8d00225b
YQ
82182012-03-02 Yao Qi <yao@codesourcery.com>
8219
8220 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8221 debug log.
8222
19560ba5
YQ
82232012-03-02 Yao Qi <yao@codesourcery.com>
8224
8225 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8226 `stop_pc' and `tpoint'. Update caller.
8227
1faeff08
MR
82282012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8229
8230 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8231 * linux-low.c (use_linux_regsets): New macro.
8232 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8233 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8234 (linux_register_in_regsets): New function.
8235 (usr_fetch_inferior_registers): Skip registers covered by
8236 regsets.
8237 (usr_store_inferior_registers): Likewise.
8238 (usr_fetch_inferior_registers): New macro.
8239 (usr_store_inferior_registers): Likewise.
8240 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8241 (linux_store_registers): Likewise.
8242 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8243 prototype.
8244 (init_registers_mips64_dsp_linux): Likewise.
8245 (init_registers_mips_linux): New macro.
8246 (init_registers_mips_dsp_linux): Likewise.
8247 (mips_dsp_num_regs): Likewise.
8248 (DSP_BASE, DSP_CONTROL): New fallback macros.
8249 (mips_base_regs): New macro.
8250 (mips_regmap): Use it. Fix the size.
8251 (mips_dsp_regmap): New variable.
8252 (mips_dsp_regset_bitmap): Likewise.
8253 (mips_arch_setup): New function.
8254 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8255 than mips_regmap.
8256 (mips_cannot_store_register): Likewise.
8257 (the_low_target): Update .arch_setup, .num_regs and .regmap
8258 initializers. Add .regset_bitmap initializer.
8259 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8260 initializer.
8261 * linux-bfin-low.c (the_low_target): Likewise.
8262 * linux-cris-low.c (the_low_target): Likewise.
8263 * linux-crisv32-low.c (the_low_target): Likewise.
8264 * linux-ia64-low.c (the_low_target): Likewise.
8265 * linux-m32r-low.c (the_low_target): Likewise.
8266 * linux-m68k-low.c (the_low_target): Likewise.
8267 * linux-ppc-low.c (the_low_target): Likewise.
8268 * linux-s390-low.c (the_low_target): Likewise.
8269 * linux-sh-low.c (the_low_target): Likewise.
8270 * linux-sparc-low.c (the_low_target): Likewise.
8271 * linux-tic6x-low.c (the_low_target): Likewise.
8272 * linux-x86-low.c (the_low_target): Likewise.
8273 * linux-xtensa-low.c (the_low_target): Likewise.
8274 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8275 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8276 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8277 srv_xmlfiles.
8278 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8279 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8280
c03e6ccc
YQ
82812012-02-29 Yao Qi <yao@codesourcery.com>
8282 Pedro Alves <palves@redhat.com>
8283
8284 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8285 `step_over_finished' is true.
8286
644cebc9
PA
82872012-02-27 Pedro Alves <palves@redhat.com>
8288
8289 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8290 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8291
c14d7ab2
PA
82922012-02-27 Pedro Alves <palves@redhat.com>
8293
8294 PR server/9684
8295 * linux-low.c (pid_is_stopped): New.
8296 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8297
412c89dd
LM
82982012-02-25 Luis Machado <lgustavo@codesourcery.com>
8299
8300 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8301 of conditions.
8302
b745defe
MR
83032012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8304
8305 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8306
9f3a5c85
LM
83072012-02-24 Luis Machado <lgustavo@codesourcery>
8308
8309 * server.c (handle_query): Advertise support for target-side
8310 breakpoint condition evaluation.
8311 (process_point_options): New function.
8312 (process_serial_event): When inserting a breakpoint, check for
8313 a target-side condition that should be evaluated.
8314
8315 * mem-break.c: Include regcache.h and ax.h.
8316 (point_cond_list_t): New data structure.
8317 (breakpoint) <cond_list>: New field.
8318 (find_gdb_breakpoint_at): Make non-static.
8319 (delete_gdb_breakpoint_at): Clear any target-side
8320 conditions.
8321 (clear_gdb_breakpoint_conditions): New function.
8322 (add_condition_to_breakpoint): Likewise.
8323 (add_breakpoint_condition): Likewise.
8324 (gdb_condition_true_at_breakpoint): Likewise.
8325 (gdb_breakpoint_here): Return result directly instead
8326 of going through a local variable.
8327
8328 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8329 (clear_gdb_breakpoint_conditions): Likewise.
8330 (add_breakpoint_condition): Likewise.
8331 (gdb_condition_true_at_breakpoint): Likewise.
8332
8333 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8334 (need_step_over_p): Take target-side breakpoint condition into
8335 consideration.
8336
5e1dc496
LM
83372012-02-24 Luis Machado <lgustavo@codesourcery>
8338
8339 * server.h: Include tracepoint.h.
8340 (agent_mem_read, agent_get_trace_state_variable_value,
8341 agent_set_trace_state_variable_value,
8342 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8343 get_set_tsv_func_addr): New prototypes.
8344
8345 * ax.h: New include file.
8346 * ax.c: New source file.
8347
8348 * tracepoint.c: Include ax.h.
8349 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8350 agent_expr, eval_result_type): Move to ax.h.
8351 (parse_agent_expr): Rename to ...
8352 (gdb_parse_agent_expr): ... this, make it non-static and move
8353 to ax.h.
8354 (unparse_agent_expr) Rename to ...
8355 (gdb_unparse_agent_expr): ... this, make it non-static and move
8356 to ax.h.
8357 (eval_agent_expr): Rename to ...
8358 (eval_tracepoint_agent_expr): ... this.
8359 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8360 forward declarations.
8361 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8362 (agent_get_trace_state_variable_value): New function.
8363 (agent_set_trace_state_variable_value): New function.
8364 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8365 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8366 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8367 (condition_true_at_tracepoint): Likewise.
8368 (parse_agent_expr): Rename to ...
8369 (gdb_parse_agent_expr): ... this and move to ax.c.
8370 (unparse_agent_expr): Rename to ...
8371 (gdb_unparse_agent_expr): ... this and move to ax.c.
8372 (gdb_agent_op_name): Move to ax.c.
8373 (eval_agent_expr): Rename to ...
8374 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8375 and move to ax.c.
8376 (eval_tracepoint_agent_expr): New function.
8377 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8378 non-static.
5e1dc496
LM
8379 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8380 ax.c.
8381 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8382 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8383 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8384 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8385 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8386 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8387 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8388 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8389 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8390 (compile_bytecodes): Remove forward declaration.
8391 (is_goto_target): Move to ax.c.
8392 (compile_bytecodes): Move to ax.c and call
8393 agent_get_trace_state_variable_value (...) and
8394 agent_set_trace_state_variable_value (...).
8395
8396 * Makefile.in: Update ax.c and IPA dependencies.
8397
277e4e52
PA
83982012-02-24 Pedro Alves <palves@redhat.com>
8399
8400 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8401 (cmd_bigqtbuffer_circular): ... this. Only handle
8402 'QTBuffer:circular:'.
8403 (handle_tracepoint_general_set): Adjust.
8404
bf4c19f7
YQ
84052012-02-16 Yao Qi <yao@codesourcery.com>
8406
8407 * inferiors.c: Move code to ...
8408 * dll.c: .... here. New.
8409 * server.h: Declare clear_dlls.
8410 * Makefile.in (SFILES): Add dll.c.
8411 (OBS): Add dll.o
8412 (dll.o): New rule.
8413
d73f2619
YQ
84142012-02-11 Yao Qi <yao@codesourcery.com>
8415
8416 * server.c: (handle_monitor_command): Add a new parameter
8417 `own_buf'.
8418 (handle_query): Update caller.
8419
f8255c2a
JB
84202012-02-09 Joel Brobecker <brobecker@adacore.com>
8421
8422 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8423 * configure, config.in: Regenerate.
8424 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8425 is not defined.
8426
da84f473
PA
84272012-02-02 Pedro Alves <palves@redhat.com>
8428
8429 Try SIGKILL first, then PTRACE_KILL.
8430 * linux-low.c (linux_kill_one_lwp): New.
8431 (linux_kill_one_lwp): Rename to ...
8432 (kill_one_lwp_callback): ... this. Use the new
8433 linux_kill_one_lwp.
8434
e886a173
PA
84352012-02-02 Pedro Alves <palves@redhat.com>
8436
8437 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8438 inferior.
8439
be07f1a2
PA
84402012-01-27 Pedro Alves <palves@redhat.com>
8441
8442 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8443 (elf_64_file_p): Make static.
8444 (linux_pid_exe_is_elf_64_file): New.
8445 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8446 Delete declarations.
8447 (linux_pid_exe_is_elf_64_file): Declare.
8448 * linux-x86-low.c (x86_arch_setup): Use
8449 linux_pid_exe_is_elf_64_file.
8450
d8301ad1
JK
84512012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8452
8453 * linux-low.c (linux_wait_for_event_1): Rename to ...
8454 (linux_wait_for_event): ... here and merge it with former
8455 linux_wait_for_event - new variable wait_ptid, use it.
8456 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8457
01b17894
PA
84582012-01-23 Pedro Alves <palves@redhat.com>
8459
8460 * server.c (main): Avoid yet another case of infinite loop while
8461 detaching/killing after a longjmp.
8462
e825046f
JK
84632012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8464
8465 Code cleanup.
8466 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8467
b9e7b9c3
UW
84682012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8469
8470 * hostio.c (handle_readlink): New function.
8471 (handle_vFile): Call it to handle "vFile:readlink" packets.
8472
901f9912
UW
84732012-01-20 Pedro Alves <palves@redhat.com>
8474 Ulrich Weigand <ulrich.weigand@linaro.org>
8475
8476 * server.c (handle_v_requests): Only support vAttach and vRun to
8477 start multiple processes when in extended protocol mode.
8478
fc1ab1a0
PA
84792012-01-17 Pedro Alves <palves@redhat.com>
8480
8481 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8482 memalign plus mprotect to allocate the scratch buffer.
8483
7d5d4e98
PA
84842012-01-13 Pedro Alves <palves@redhat.com>
8485
8486 * server.c (attach_inferior): Clear `cont_thread'.
8487
f128d5e9
PA
84882012-01-13 Pedro Alves <palves@redhat.com>
8489
8490 * server.c (main): Avoid infinite loop while detaching/killing
8491 after a longjmp.
8492
06db92f0
DE
84932012-01-09 Doug Evans <dje@google.com>
8494
8495 * server.c (start_inferior): Set last_ptid in --wrapper case.
8496
32d92999
YQ
84972012-01-06 Yao Qi <yao@codesourcery.com>
8498
8499 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8500 defined.
8501 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8502
5e0a92a9
YQ
85032012-01-04 Yao Qi <yao@codesourcery.com>
8504
8505 * tracepoint.c (cmd_qtdp): Print debug message
8506 for static tracepoint.
8507
ae639e8c
YQ
85082012-01-04 Yao Qi <yao@codesourcery.com>
8509
8510 * tracepoint.c (trace_vdebug): Differentiate debug message
8511 between gdbserver and IPA.
8512
f72429c5
YQ
85132012-01-03 Yao Qi <yao@codesourcery.com>
8514
8515 * tracepoint.c (tracepoint_was_hit): Don't collect for
8516 static tracepoint.
8517
12c3e59c
JB
85182012-01-02 Joel Brobecker <brobecker@adacore.com>
8519
8520 * terminal.h: Reformat copyright header.
8521
67827812
JB
85222012-01-02 Joel Brobecker <brobecker@adacore.com>
8523
8524 * server.c (gdbserver_version): Update copyright year.
8525 * gdbreplay.c (gdbreplay_version): Likewise.
8526
3e52c33d
JK
85272011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8528
8529 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8530
8531 Revert:
8532 2011-12-18 Hui Zhu <teawater@gmail.com>
8533 * linux-low.c (linux_create_inferior): Save return value to ret.
8534
66f1260e
HZ
85352011-12-18 Hui Zhu <teawater@gmail.com>
8536
8537 * linux-low.c (linux_create_inferior): Save return value to ret.
8538
e77616d7
DE
85392011-12-16 Doug Evans <dje@google.com>
8540
e7b06c57
DE
8541 * linux-low.c (linux_create_inferior): If stdio connection,
8542 redirect stdin from /dev/null, stdout to stderr.
8543 * remote-utils.c (remote_is_stdio): New static global.
8544 (remote_connection_is_stdio): New function.
8545 (remote_prepare): Handle stdio connection.
8546 (remote_open): Ditto.
8547 (remote_close): Don't close stdin for stdio connections.
8548 (read_prim,write_prim): New functions. Replace all calls to
8549 read/write to these.
8550 * server.c (main): Watch for "-" argument. Move call to
8551 remote_prepare before start_inferior.
8552 * server.h (STDIO_CONNECTION_NAME): New macro.
8553 (remote_connection_is_stdio): Declare.
8554
e77616d7
DE
8555 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8556 in debugging output.
8557
82067193
YQ
85582011-12-15 Yao Qi <yao@codesourcery.com>
8559
8560 * tracepoint.c: Include sys/syscall.h.
8561 (gdb_ust_thread): Remove preprocessor conditional.
8562
82bfbe7e
PA
85632011-12-14 Pedro Alves <pedro@codesourcery.com>
8564
8565 * linux-low.c (linux_detach_one_lwp): Call
8566 the_low_target.prepare_to_resume before detaching.
8567
712c6575
YQ
85682011-12-14 Yao Qi <yao@codesourcery.com>
8569
8570 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8571 of write.
8572
d54d1edf
YQ
85732011-12-14 Yao Qi <yao@codesourcery.com>
8574
8575 * i386-low.c (i386_low_stopped_data_address): Initialize local
8576 variable `control'.
8577
6210a125
PA
85782011-12-13 Pedro Alves <pedro@codesourcery.com>
8579
8580 PR remote/13492
8581
8582 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8583 DR_CONTROL unless necessary. Extend comments.
8584 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8585 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8586
2ece8244
YQ
85872011-12-13 Yao Qi <yao@codesourcery.com>
8588
8589 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8590 macros.
8591 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8592
784867a5
JK
85932011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8594
8595 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8596 Print new debug message for such case.
8597
6bf36717
JK
85982011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8599
8600 Fix overlapping memcpy.
8601 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8602 the read_inferior_memory transfer.
8603 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8604 write_inferior_memory transfer.
8605 (set_fast_tracepoint_jump): New variable buf. Use it for the
8606 read_inferior_memory and write_inferior_memory transfers.
8607 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8608 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8609 Use it for the write_inferior_memory transfer.
8610 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8611 buffers.
8612
50275556
MR
86132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8614
8615 * linux-low.c (fetch_register, store_register): Make code
8616 consistent, fix formatting.
8617
7325beb4
MR
86182011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8619
8620 * linux-low.c (usr_store_inferior_registers): Factor out code
8621 to handle individual registers into...
8622 (store_register): ... this new function.
8623
c642a434
UW
86242011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8625
8626 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8627 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8628 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8629 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8630 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8631 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8632 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8633 (srv_xmlfiles): Add new XML files.
8634
8635 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8636 and <sys/uio.h>.
8637 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8638 (init_registers_s390_linux32v1): Add prototype.
8639 (init_registers_s390_linux32v2): Likewise.
8640 (init_registers_s390_linux64v1): Likewise.
8641 (init_registers_s390_linux64v2): Likewise.
8642 (init_registers_s390x_linux64v1): Likewise.
8643 (init_registers_s390x_linux64v2): Likewise.
8644 (s390_num_regs): Increment to 52.
8645 (s390_regmap): Add orig_r2 register.
8646 (s390_num_regs_3264): Increment to 68.
8647 (s390_regmap_3264): Add orig_r2 register.
8648 (s390_collect_ptrace_register): Handle orig_r2 register.
8649 (s390_supply_ptrace_register): Likewise.
8650 (s390_fill_last_break): New function.
8651 (s390_store_last_break): Likewise.
8652 (s390_fill_system_call): New function.
8653 (s390_store_system_call): Likewise.
8654 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8655 register sets.
8656 (s390_check_regset): New function.
8657 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8658 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8659 Update target_regsets for available register sets.
8660
2268b414
JK
86612011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8662 Jan Kratochvil <jan.kratochvil@redhat.com>
8663
8664 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8665 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8666 New.
8667 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8668 * linux-low.h (struct process_info_private): New member r_debug.
8669 * server.c (handle_qxfer_libraries): Call
8670 the_target->qxfer_libraries_svr4.
8671 (handle_qxfer_libraries_svr4): New function.
8672 (qxfer_packets): New entry "libraries-svr4".
8673 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8674 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8675 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8676 PACKET_qXfer_libraries_svr4.
8677
d6db1fab
UW
86782011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8679
8680 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8681 PSW address/mask between 8-byte and 16-byte formats.
8682 (s390_supply_ptrace_register): Likewise.
8683 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8684 basic addressing mode bit.
8685
242f5f1c
SS
86862011-11-24 Stan Shebs <stan@codesourcery.com>
8687
8688 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8689
f196051f
SS
86902011-11-17 Stan Shebs <stan@codesourcery.com>
8691
8692 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8693 (tracing_start_time): New global.
8694 (tracing_stop_time): New global.
8695 (tracing_user_name): New global.
8696 (tracing_notes): New global.
8697 (tracing_stop_note): New global.
8698 (cmd_qtstart): Set traceframe_usage, start_time.
8699 (stop_tracing): Set stop_time.
8700 (cmd_qtstatus): Report additional status.
8701 (cmd_qtp): New function.
8702 (handle_tracepoint_query): Call it.
8703 (cmd_qtnotes): New function.
8704 (handle_tracepoint_general_set): Call it.
8705 (get_timestamp): Rename from tsv_get_timestamp.
8706
405f8e94
SS
87072011-11-14 Stan Shebs <stan@codesourcery.com>
8708 Kwok Cheung Yeung <kcy@codesourcery.com>
8709
8710 * linux-x86-low.c (small_jump_insn): New.
8711 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8712 trampoline and error message, build a trampoline and issue a small
8713 jump instruction to it.
8714 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8715 trampoline and error message.
8716 (x86_get_min_fast_tracepoint_insn_len): New.
8717 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8718 * linux-low.h (struct linux_target_ops): Add arguments to
8719 install_fast_tracepoint_jump_pad operation, add new operation.
8720 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8721 arguments.
8722 (linux_get_min_fast_tracepoint_insn_len): New function.
8723 (linux_target_op): Add new operation.
8724 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8725 (gdb_trampoline_buffer_end): Ditto.
8726 (gdb_trampoline_buffer_error): Ditto.
8727 (struct ipa_sym_addresses): Add fields for new IPA variables.
8728 (symbol_list): Add entries for new IPA variables.
8729 (struct tracepoint): Add fields to hold the address range of the
8730 trampoline used by the tracepoint.
8731 (trampoline_buffer_head): New static variable.
8732 (trampoline_buffer_tail): Ditto.
8733 (claim_trampoline_space): New function.
8734 (have_fast_tracepoint_trampoline_buffer): New function.
8735 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8736 structure.
8737 (install_fast_tracepoint): Ditto, also add error buffer argument.
8738 (cmd_qtminftpilen): New function.
8739 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8740 (fast_tracepoint_from_trampoline_address): New function.
8741 (fast_tracepoint_collecting): Handle trampoline as part of jump
8742 pad space.
8743 (set_trampoline_buffer_space): New function.
8744 (initialize_tracepoint): Initialize new IPA variables.
8745 * target.h (struct target_ops): Add arguments to
8746 install_fast_tracepoint_jump_pad operation, add new
8747 get_min_fast_tracepoint_insn_len operation.
8748 (target_get_min_fast_tracepoint_insn_len): New.
8749 (install_fast_tracepoint_jump_pad): Add arguments.
8750 * server.h (IPA_BUFSIZ): Define.
8751 * linux-i386-ipa.c: Include extra header files.
8752 (initialize_fast_tracepoint_trampoline_buffer): New function.
8753 (initialize_low_tracepoint): Call it.
8754 * server.h (set_trampoline_buffer_space): Declare.
8755 (claim_trampoline_space): Ditto.
8756 (have_fast_tracepoint_trampoline_buffer): Ditto.
8757
1e4d1764
YQ
87582011-11-14 Yao Qi <yao@codesourcery.com>
8759
8760 * server.c (handle_query): Handle InstallInTrace for qSupported.
8761 * tracepoint.c (add_tracepoint): Sort list.
8762 (install_tracepoint, download_tracepoint): New.
8763 (cmd_qtdp): Call them to install and download tracepoints.
8764 (sort_tracepoints): Removed.
8765 (cmd_qtstart): Update.
8766
5c73ff4e
YQ
87672011-11-14 Yao Qi <yao@codesourcery.com>
8768
8769 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8770 * mem-break.h: Declare.
8771 * tracepoint.c (cmd_qtstart): Move some code to ...
8772 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8773 New.
8774 (download_tracepoints): Move some code to ...
8775 (download_tracepoint_1): ... here. New.
8776
86a30030
YQ
87772011-11-08 Yao Qi <yao@codesourcery.com>
8778
8779 * remote-utils.c (relocate_instruction): A comment fix.
8780
8d26e50c
JB
87812011-11-07 Joel Brobecker <brobecker@adacore.com>
8782
8783 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8784 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8785 dr_status_mirror and dr_control_mirror from debug_reg_state.
8786 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8787 (i386_initial_stuff): Remove use of deleted globals.
8788 (i386_get_thread_context, i386_set_thread_context,
8789 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8790 from debug_reg_state.
8791
a59306a3
YQ
87922011-11-05 Yao Qi <yao@codesourcery.com>
8793
8794 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8795 address as TPOINT's.
8796
3065dfb6
SS
87972011-11-02 Stan Shebs <stan@codesourcery.com>
8798
8799 * tracepoint.c (agent_mem_read_string): New function.
8800 (eval_agent_expr): Call it for tracenz.
8801 * server.c (handle_query): Report support for tracenz.
8802
fd0d8c7c
YQ
88032011-11-02 Yao Qi <yao@codesourcery.com>
8804
8805 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8806
609086b1
YQ
88072011-11-02 Yao Qi <yao@codesourcery.com>
8808
8809 * target.h: Fix a typo in comment.
8810
b9fd1791
PA
88112011-10-31 Pedro Alves <pedro@codesourcery.com>
8812
8813 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8814 clobber the breakpoints' shadows with fast tracepoint jumps.
8815 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8816 * target.c (write_inferior_memory): Also pass MYADDR down to
8817 check_mem_write.
8818
03583c20
UW
88192011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8820
8821 * configure.ac: Check support for personality routine.
8822 * configure: Regenerate.
8823 * config.in: Likewise.
8824 * linux-low.c: Include <sys/personality.h>.
8825 Define ADDR_NO_RANDOMIZE if necessary.
8826 (linux_create_inferior): Disable address space randomization when
8827 forking inferior, if requested.
8828 (linux_supports_disable_randomization): New function.
8829 (linux_target_ops): Install it.
8830 * server.h (disable_randomization): Declare.
8831 * server.c (disable_randomization): New global variable.
8832 (handle_general_set): Handle QDisableRandomization.
8833 (handle_query): Likewise for qSupported.
8834 (main): Support --disable-randomization and --no-disable-randomization
8835 command line arguments.
8836 * target.h (struct target_ops): Add supports_disable_randomization.
8837 (target_supports_disable_randomization): New macro.
8838
723b724b
MF
88392011-09-29 Mike Frysinger <vapier@gentoo.org>
8840
8841 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8842 ifdef check.
8843 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8844 [!PT_GETDSBT] (target_loadmap): New definition.
8845 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8846 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8847 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8848 and PT_GETDSBT to LINUX_LOADMAP.
8849 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8850 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8851
55329a5c 88522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8853
8854 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8855 (arm_linux_hwbp_cap): New static variable.
8856 (arm_linux_get_hwbp_cap): Replace by ...
8857 (arm_linux_init_hwbp_cap): ... this new function.
8858 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8859 (arm_linux_get_hw_watchpoint_count): Likewise.
8860 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8861 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8862 (arm_prepare_to_resume): Use perror_with_name instead of error.
8863
55329a5c 88642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8865
8866 * linux-arm-low.c: Include <signal.h>.
8867 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8868 (struct arm_linux_hwbp_cap): New data type.
8869 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8870 (struct arm_linux_hw_breakpoint): New data type.
8871 (MAX_BPTS, MAX_WPTS): Define.
8872 (struct arch_process_info, struct arch_lwp_info): New data types.
8873 (arm_linux_get_hwbp_cap): New function.
8874 (arm_linux_get_hw_breakpoint_count): Likewise.
8875 (arm_linux_get_hw_watchpoint_count): Likewise.
8876 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8877 (arm_hwbp_control_initialize): Likewise.
8878 (arm_hwbp_control_is_enabled): Likewise.
8879 (arm_hwbp_control_is_initialized): Likewise.
8880 (arm_hwbp_control_disable): Likewise.
8881 (arm_linux_hw_breakpoint_equal): Likewise.
8882 (arm_linux_hw_point_initialize): Likewise.
8883 (struct update_registers_data): New data structure.
8884 (update_registers_callback: New function.
8885 (arm_insert_point): Likewise.
8886 (arm_remove_point): Likewise.
8887 (arm_stopped_by_watchpoint): Likewise.
8888 (arm_stopped_data_address): Likewise.
8889 (arm_new_process): Likewise.
8890 (arm_new_thread): Likewise.
8891 (arm_prepare_to_resume): Likewise.
8892 (the_low_target): Register arm_insert_point, arm_remove_point,
8893 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8894 arm_new_thread, and arm_prepare_to_resume.
8895
6b9801d4
SS
88962011-09-15 Stan Shebs <stan@codesourcery.com>
8897
8898 * server.h (struct emit_ops): Add compare-goto fields.
8899 * tracepoint.c (gdb_agent_op_sizes): New table.
8900 (emit_eq_goto): New function.
8901 (emit_ne_goto): New function.
8902 (emit_lt_goto): New function.
8903 (emit_le_goto): New function.
8904 (emit_gt_goto): New function.
8905 (emit_ge_goto): New function.
8906 (is_goto_target): New function.
8907 (compile_bytecodes): Recognize special cases of compare-goto
8908 combinations and call specialized emitters for them.
8909 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8910 (amd64_emit_ne_goto): New function.
8911 (amd64_emit_lt_goto): New function.
8912 (amd64_emit_le_goto): New function.
8913 (amd64_emit_gt_goto): New function.
8914 (amd64_emit_ge_goto): New function.
8915 (amd64_emit_ops): Add the new functions.
8916 (i386_emit_eq_goto): New function.
8917 (i386_emit_ne_goto): New function.
8918 (i386_emit_lt_goto): New function.
8919 (i386_emit_le_goto): New function.
8920 (i386_emit_gt_goto): New function.
8921 (i386_emit_ge_goto): New function.
8922 (i386_emit_ops): Add the new functions.
8923
bf15cbda
SS
89242011-09-08 Stan Shebs <stan@codesourcery.com>
8925
8926 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8927 (i386_emit_epilogue): Restore %ebx.
8928
943ca1dd
JZ
89292011-08-31 Jie Zhang <jzhang918@gmail.com>
8930
8931 * server.c (step_thread): Remove definition.
8932 (process_serial_event): Don't handle Hs.
8933 * server.h (step_thread): Remove declaration.
8934 * target.c (set_desired_inferior): Remove use of step_thread.
8935
e3deef73
LM
89362011-08-24 Luis Machado <lgustavo@codesourcery.com>
8937
8938 * linux-low.c: Include linux-procfs.h.
8939 (linux_attach_lwp_1): Update comments.
8940 (linux_attach): Scan for existing threads when attaching to a
8941 process that is the tgid.
8942 * Makefile.in: Update dependencies.
8943
13da1c97
LM
89442011-08-24 Luis Machado <lgustavo@codesourcery.com>
8945
8946 * configure.srv: Add linux-procfs.o dependencies.
8947
881127c9
YQ
89482011-08-14 Yao Qi <yao@codesourcery.com>
8949
8950 * target.h (struct target_ops): Fix indent.
8951 * win32-low.c (win32_target_ops): Fix comment.
8952
58dbd541
YQ
89532011-08-14 Andrew Jenner <andrew@codesourcery.com>
8954 Yao Qi <yao@codesourcery.com>
8955
8956 * Makefile.in (clean): Remove tic6x-*.c files.
8957 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8958 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8959 (tic6x-c64xp-linux.c): Likewise.
8960 * configure.srv: Add support for tic6x-*-uclinux.
8961 * linux-tic6x-low.c: New.
8962 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8963
78d85199
YQ
89642011-08-14 Andrew Stubbs <ams@codesourcery.com>
8965 Yao Qi <yao@codesourcery.com>
8966
8967 * target.h (struct target_ops): Add read_loadmap.
8968 * linux-low.c (struct target_loadseg): New type.
8969 (struct target_loadmap): New type.
8970 (linux_read_loadmap): New function.
8971 (linux_target_ops): Add linux_read_loadmap.
8972 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8973 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8974 to NULL.
78d85199 8975
a959a88d
EZ
89762011-08-05 Eli Zaretskii <eliz@gnu.org>
8977
8978 * win32-low.c: Include <stdint.h>.
8979
1ced966e
PA
89802011-07-22 Pedro Alves <pedro@codesourcery.com>
8981
8982 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8983 to the inferior here.
8984 (i386_remove_aligned_watchpoint): Ditto.
8985 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8986 fit part of the watchpoint in the debug registers.
8987 (i386_update_inferior_debug_regs): New.
8988 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8989 registers, and only update the inferior on success.
8990 (i386_low_remove_watchpoint): Ditto.
8991
d26e3629
KY
89922011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8993
8994 * linux-low.c (compare_ints, unique, list_threads, show_process,
8995 linux_core_of_thread): Delete.
8996 (linux_target_ops): Change linux_core_of_thread to
8997 linux_common_core_of_thread.
8998 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8999 * utils.c (malloc_failure): Change type of argument.
9000 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9001 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9002 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9003 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9004 (IPA_OBJS): Add common-utils-ipa.o.
9005 (ptid_h, linux_osdata_h): New macros.
9006 (server_h): Add common/common-utils.h, common/xml-utils.h,
9007 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9008 common/ptid.h.
9009 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9010 ptid.o, buffer.o): New rules.
9011 (linux-low.o): Add common/linux-osdata.h as a dependency.
9012 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9013 * configure.ac: Add AC_HEADER_DIRENT check.
9014 * config.in: Regenerate.
9015 * configure: Regenerate.
9016 * remote-utils.c (xml_escape_text): Delete.
9017 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9018 buffer_xml_printf): Move to common/buffer.c.
9019 * server.c (main): Remove call to initialize_inferiors.
9020 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9021 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9022 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9023 internal_error, gdb_assert, gdb_assert_fail): Delete.
9024 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9025 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9026 common/buffer.h.
9027 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9028 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9029 initialize_inferiors): Delete.
9030
2275a1a7
PA
90312011-07-20 Pedro Alves <pedro@codesourcery.com>
9032
9033 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9034 symbol error.
9035
0a5b1e09
PA
90362011-05-31 Pedro Alves <pedro@codesourcery.com>
9037
9038 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9039 assertion.
9040 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9041
6938fd34
YQ
90422011-05-26 Yao Qi <yao@codesourcery.com>
9043
9044 * Makefile.in (thread-db.o): Track dependence to
9045 common/gdb_thread_db.h.
9046 * thread-db.c: include gdb_thread_db.h from right place.
9047
b481f9e0
TT
90482011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9049
9050 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9051 __FILE__ and __LINE__ to internal_error.
9052
98a5dd13
DE
90532011-05-13 Doug Evans <dje@google.com>
9054
9055 * thread-db.c (try_thread_db_load_from_sdir): New function.
9056 (try_thread_db_load_from_dir): New function.
9057 (thread_db_load_search): Handle $sdir, ignore $pdir.
9058 Remove trying of system directories if search of
9059 libthread-db-search-path fails, that is now done via $sdir.
9060
d248b706
KY
90612011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9062
9063 * server.c (handle_query): Add EnableDisableTracepoints to the list
9064 of supported features.
43aaf8b6 9065 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9066 tracepoints.
43aaf8b6
PA
9067 (cmd_qtenable_disable): New.
9068 (cmd_qtstart): Install tracepoints even if disabled.
9069 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9070 receiving a QTEnable or QTDisable packet.
9071 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9072 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9073 tracepoints.
9074 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9075
84e578fb
DE
90762011-05-10 Doug Evans <dje@google.com>
9077
9078 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9079
71f55dd8
DE
90802011-05-04 Doug Evans <dje@google.com>
9081
9082 * linux-low.c (linux_join): Skip process lookup.
9083 * spu-low.c (spu_join): Ditto.
9084 * server.c (join_inferiors_callback): Delete.
9085 (process_serial_event): For 'D' packet (detach) call join_inferior
9086 directly.
9087
4d393d60
JM
90882011-05-04 Joseph Myers <joseph@codesourcery.com>
9089
9090 * README: Don't mention xscale*-*-linux*.
9091 * configure.srv (xscale*-*-linux*): Don't handle target.
9092
b00ad6ff
NF
90932011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9094
9095 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9096 casting pointers.
9097 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9098 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9099 (i386_emit_void_call_2): Likewise.
9100
af96c192
YQ
91012011-04-26 Yao Qi <yao@codesourcery.com>
9102
43aaf8b6
PA
9103 * linux-low.c: Move common macros to linux-ptrace.h.
9104 Include linux-ptrace.h.
af96c192
YQ
9105 * Makefile.in (linux_ptrace_h): New.
9106 (linux-low.o): Depends on linux-ptrace.h.
9107
03f2bd59
JK
91082011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9109
9110 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9111 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9112 (remote_prepare): New function with most of the TCP code from ...
9113 (remote_open): ... here. Detect PORT here unconditionally. Move also
9114 setting transport_is_reliable.
9115 * server.c (run_once): New variable.
9116 (gdbserver_usage): Document it.
9117 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9118 the first run if RUN_ONCE.
9119 * server.h (run_once, remote_prepare): New declarations.
9120
7a9dd1b2
TT
91212011-04-19 Tom Tromey <tromey@redhat.com>
9122
9123 * win32-low.c (handle_load_dll): Remove duplicate "the".
9124
81239425
PM
91252011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9126
9127 Remove support for old Cygwin 1.5 versions.
9128 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9129 function to avoid warning.
9130 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9131 warning.
9132
9e0627f1
PM
91332011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9134
9135 * gdbserver/server.h (Macro _): Define it if not available.
9136
588eebee
MS
91372011-03-14 Michael Snyder <msnyder@vmware.com>
9138
348af9f7 9139 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9140
43f70d4c
JB
91412011-03-10 Joel Brobecker <brobecker@adacore.com>
9142
9143 * Makefile.in (maintainer-clean realclean distclean): Remove
9144 "make ... subdir_do" command.
9145
348af9f7
MS
91462011-03-10 Michael Snyder <msnyder@vmware.com>
9147
9148 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9149
9150 * server.c (handle_v_run): Free alloced buffer on early return.
9151
e637a4f5
YQ
91522011-03-09 Yao Qi <yao@codesourcery.com>
9153
9154 Revert:
9155 2011-03-04 Yao Qi <yao@codesourcery.com>
9156
9157 * Makefile.in: Remove GNU make feature --directory.
9158
9159 2011-03-05 Yao Qi <yao@codesourcery.com>
9160
9161 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9162 (subdir_do): New make target. Copied from gdb/Makefile.
9163 (maintainer-clean, realclean, distclean, clean): Call corresponding
9164 make targets in common/Makefile.
9165
9166 2011-02-11 Yao Qi <yao@codesourcery.com>
9167
9168 * configure.ac: Call AC_PROG_RANLIB.
9169 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9170 * configure: Regenerate.
9171
e6edda56
JK
91722011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9173
9174 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9175
e5141119
JB
91762011-03-06 Yao Qi <yao@codesourcery.com>
9177
9178 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9179
64794aa4
JB
91802011-03-05 Yao Qi <yao@codesourcery.com>
9181
9182 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9183 (subdir_do): New make target. Copied from gdb/Makefile.
9184 (maintainer-clean, realclean, distclean, clean): Call corresponding
9185 make targets in common/Makefile.
9186
7a762829
YQ
91872011-03-04 Yao Qi <yao@codesourcery.com>
9188
9189 * Makefile.in: Remove GNU make feature --directory.
9190
348af9f7
MS
91912011-03-04 Michael Snyder <msnyder@vmware.com>
9192
9193 * server.c (queue_stop_reply): Call xmalloc not malloc.
9194
91952011-03-02 Michael Snyder <msnyder@vmware.com>
9196
9197 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9198
9f72fee2
MS
91992011-02-28 Michael Snyder <msnyder@vmware.com>
9200
588eebee
MS
9201 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9202 (cmd_qtframe): Ditto.
9203 (cmd_qtbuffer): Ditto.
9204 (cmd_bigqtbuffer): Ditto.
9205
9f72fee2
MS
9206 * utils.c (decimal2str): Initialize 'width' to nine, then
9207 don't mess with it.
9208
8040bd49
UW
92092011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9210
9211 * hostio.c (require_data): Free *data, not data.
9212
7e52cbd0
JK
92132011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9214
9215 * hostio.c (require_data): Use free, not xfree.
9216
9130f83e
MS
92172011-02-27 Michael Snyder <msnyder@vmware.com>
9218
4b812f4e
MS
9219 * server.c (handle_query): Discard unused value.
9220
9130f83e
MS
9221 * hostio.c (require_data): Free malloc memory before returning
9222 error.
9223
69d37113
MS
92242011-02-26 Michael Snyder <msnyder@vmware.com>
9225
9226 * linux-low.c (list_threads): Call closedir for dirent.
9227
35f5825a
MS
92282011-02-27 Michael Snyder <msnyder@vmware.com>
9229
2a589cef
MS
9230 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9231 a case statement falls through.
9232
0adea5f7
MS
9233 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9234
35f5825a
MS
9235 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9236 in comparison.
9237
238f1c74
MS
92382011-02-26 Michael Snyder <msnyder@vmware.com>
9239
9240 * utils.c (decimal2str): Eliminate dead code and dead param.
9241 (pulongest): Drop dead param from call to decimal2str.
9242 (plongest): Ditto.
9243
633ff500
JB
92442011-02-24 Joel Brobecker <brobecker@adacore.com>
9245
9246 Revert the following patch (not approved yet):
9247 2011-02-21 Hui Zhu <teawater@gmail.com>
9248 * tracepoint.c (tp_printf): New function.
9249 (eval_agent_expr): Handle gdb_agent_op_printf.
9250
f9c6ff72
HZ
92512011-02-21 Hui Zhu <teawater@gmail.com>
9252
9253 * tracepoint.c (tp_printf): New function.
9254 (eval_agent_expr): Handle gdb_agent_op_printf.
9255
94d5e490
TT
92562011-02-18 Tom Tromey <tromey@redhat.com>
9257
9258 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9259 (tracepoint.o): Likewise.
9260 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9261 (gdb_agent_op_names): Likewise.
9262
c7f96d2b
TT
92632011-02-18 Tom Tromey <tromey@redhat.com>
9264
9265 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9266 gdb_agent_op_rot>: New constants.
9267 (gdb_agent_op_names): Add pick and roll.
9268 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9269 cases.
9270
0feedb2c
JK
92712011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9272
9273 * aclocal.m4: Regenerated with aclocal-1.11.1.
9274
b3b9301e
PA
92752011-02-14 Pedro Alves <pedro@codesourcery.com>
9276
9277 * server.c (handle_qxfer_traceframe_info): New.
9278 (qxfer_packets): Register "traceframe-info".
9279 (handle_query): Report support for qXfer:traceframe-info:read+.
9280 * tracepoint.c (match_blocktype): New.
9281 (traceframe_find_block_type): Rename to ...
9282 (traceframe_walk_blocks): ... this. Add callback filter argument,
9283 and use it.
9284 (traceframe_find_block_type): New, reimplemented on top of
9285 traceframe_walk_blocks.
9286 (build_traceframe_info_xml): New.
9287 (traceframe_read_info): New.
9288 * server.h (traceframe_read_info): Declare.
9289
4f3e6fb7
YQ
92902011-02-11 Yao Qi <yao@codesourcery.com>
9291
9292 * configure.ac: Call AC_PROG_RANLIB.
9293 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9294 * configure: Regenerate.
9295
764880b7
PA
92962011-02-07 Pedro Alves <pedro@codesourcery.com>
9297
9298 * server.c (gdb_read_memory): Change return semantics to allow
9299 partial transfers.
9300 (handle_search_memory_1): Adjust.
9301 (process_serial_event) <'m' packet>: Handle partial transfers.
9302 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9303
1c79eb8a
PA
93042011-01-28 Pedro Alves <pedro@codesourcery.com>
9305
9306 * regcache.c (init_register_cache): Initialize
9307 regcache->register_status.
9308 (free_register_cache): Release regcache->register_status.
9309 (regcache_cpy): Copy register_status.
9310 (registers_to_string): Print 'x's for unavailable registers.
9311 (supply_register): Mark the register's status valid or
9312 unavailable, depending on whether a buffer was passed in or not.
9313 (supply_register_zeroed): New.
9314 (supply_regblock): Mark the registers' status valid or
9315 unavailable, depending on whether a buffer was passed in or not.
9316 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9317 (struct regcache): New `register_status' field.
9318 (supply_register_zeroed): Declare.
9319 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9320 supply_register_zeroed, rather than passing a NULL buffer to
9321 supply_register.
9322 * tracepoint.c (fetch_traceframe_registers): Update comment.
9323
85724a0e
PA
93242011-01-28 Pedro Alves <pedro@codesourcery.com>
9325
9326 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9327 buffer explicit.
9328
d08aafef
PA
93292011-01-25 Pedro Alves <pedro@codesourcery.com>
9330
9331 * server.h (decode_xfer_write): Change prototype.
9332 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9333 and don't extract the annex here.
9334 * server.c (decode_xfer_read): Remove `annex' parameter,
9335 and don't extract the annex here.
9336 (decode_xfer): New.
9337 (struct qxfer): New.
9338 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9339 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9340 (handle_qxfer_statictrace): New functions, abstracted out from
9341 handle_query, and made to use the struct qxfer interface.
9342 (handle_threads_qxfer_proper): Rename to ...
9343 (handle_qxfer_threads_proper): ... this.
9344 (handle_threads_qxfer): Rename to ...
9345 (handle_qxfer_threads): ... this. Adjust.
9346 (qxfer_packets): New array.
9347 (handle_qxfer): New function.
9348 (handle_query): Use handle_qxfer.
9349
493e2a69
MS
93502011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9351
9352 * gdbreplay.c: Shorten lines of >= 80 columns.
9353 * linux-low.c: Ditto.
9354 * linux-ppc-low.c: Ditto.
9355 * linux-s390-low.c: Ditto.
9356 * linux-sparc-low.c: Ditto.
9357 * linux-x86-low.c: Ditto.
9358 * linux-xtensa-low.c: Ditto.
9359 * mem-break.c: Ditto.
9360 * nto-low.c: Ditto.
9361 * regcache.h: Ditto.
9362 * remote-utils.c: Ditto.
9363 * server.c: Ditto.
9364 * server.h: Ditto.
9365 * thread-db.c: Ditto.
9366 * tracepoint.c: Ditto.
9367 * utils.c: Ditto.
9368 * win32-low.h: Ditto.
9369
44944448
JB
93702011-01-05 Joel Brobecker <brobecker@adacore.com>
9371
9372 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9373 update.
9374
71ce852c
JB
93752011-01-01 Joel Brobecker <brobecker@adacore.com>
9376
9377 * server.c (gdbserver_version): Update copyright year in version
9378 output.
9379 * gdbreplay.c (gdbreplay_version): Ditto.
9380
eb826dc6
MF
93812010-12-29 Jie Zhang <jie.zhang@analog.com>
9382
9383 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9384 * linux-bfin-low.c: New file.
9385 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9386 PT_DATA_ADDR for BFIN targets.
9387 * Makefile.in (SFILES): Add linux-bfin-low.c.
9388 (clean): Remove reg-bfin.c.
9389 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9390 * README: Mention supported Blackfin targets.
9391
39ab222a
MF
93922010-12-23 Mike Frysinger <vapier@gentoo.org>
9393
9394 * .gitignore: New file.
9395
a1f2ce7d
MF
93962010-11-16 Mike Frysinger <vapier@gentoo.org>
9397
9398 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9399
f474844c
JZ
94002010-10-22 Jie Zhang <jie@codesourcery.com>
9401
9402 * Makefile.in: Add FLAGS_TO_PASS variable.
9403 (install): Remove dependency of install-only and recursively
9404 invoke make for install-only.
9405
f1048712
DE
94062010-10-04 Doug Evans <dje@google.com>
9407
9408 * Makefile.in (uninstall): Use $(DESTDIR).
9409
b53a1623
PA
94102010-09-24 Pedro Alves <pedro@codesourcery.com>
9411
e6ee044d
PA
9412 PR gdb/11842
9413
b53a1623
PA
9414 * linux-x86-low.c (compat_siginfo_from_siginfo)
9415 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9416 si_code is < 0. Check for si_code == SI_TIMER before checking for
9417 si_code < 0.
9418
fa1bd1e4
JB
94192010-09-13 Joel Brobecker <brobecker@adacore.com>
9420
9421 * lynx-i386-low.c: New file.
9422 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9423
47fac8f8
JB
94242010-09-13 Joel Brobecker <brobecker@adacore.com>
9425
9426 * lynx-low.c (ptrace_request_to_str): Remove handling for
9427 request values that have been removed in LynxOS 5.x.
9428
1adfc54d
JB
94292010-09-13 Joel Brobecker <brobecker@adacore.com>
9430
9431 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9432 <ptrace.h>
9433
c2a66c29
NS
94342010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9435
9436 * configure.ac: Add --enable-inprocess-agent option.
9437 * configure: Rebuilt.
9438
32fcada3
YQ
94392010-09-06 Yao Qi <yao@codesourcery.com>
9440
9441 * linux-low.c (linux_kill): Remove unused variable.
9442 (linux_stabilize_threads): Likewise.
9443 * server.c (start_inferior): Likewise.
9444 (queue_stop_reply_callback): Likewise.
9445 * tracepoint.c (do_action_at_tracepoint): Likewise.
9446
0cccb683
YQ
94472010-09-06 Yao Qi <yao@codesourcery.com>
9448
9449 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9450 on return.
9451
423ec54c
JK
94522010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9453
9454 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9455
12ac6819
PA
94562010-09-06 Pedro Alves <pedro@codesourcery.com>
9457
9458 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9459 "$(IPA_DEPFILES)".
9460
8ed54b31
JB
94612010-09-01 Joel Brobecker <brobecker@adacore.com>
9462
9463 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9464 gdbserver/lynx-ppc-low.c: New files.
9465 * Makefile.in (lynx_low_h): New variable.
9466 (lynx-low.o, lynx-ppc-low.o): New rules.
9467 * configure.ac: On LynxOS, link with -lnetinet.
9468 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9469 * configure: regenerate.
9470
bb0116a4
JB
94712010-09-01 Joel Brobecker <brobecker@adacore.com>
9472
9473 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9474 * configure.ac: Add check for vasprintf and vsnprintf.
9475 * configure, config.in: Regenerate.
9476 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9477
a778ab81 94782010-09-01 Joel Brobecker <brobecker@adacore.com>
9479
9480 * gdbreplay.c: Move include of alloca.h up, next to include of
9481 malloc.h.
9482 * server.h: Add include of malloc.h.
9483 * mem-break.c: Remove include of malloc.h.
9484 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9485
8b034a19 94862010-09-01 Joel Brobecker <brobecker@adacore.com>
9487
9488 * Makefile.in (memmem.o): Build with -Wno-error.
9489
94902010-09-01 Joel Brobecker <brobecker@adacore.com>
9491
9492 * utils.c (xsnprintf): Make non-static.
9493 * server.h: Add xsnprintf declaration.
9494 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9495 replace calls to snprintf by calls to xsnprintf throughout.
9496
94972010-09-01 Joel Brobecker <brobecker@adacore.com>
9498
9499 * configure.ac: Add configure check for alloca.
9500 * configure, config.in: Regenerate.
9501 * server.h: Include alloca.h if it exists.
9502 * gdbreplay.c: Include alloca.h if it exists.
9503
1a981360
PA
95042010-08-28 Pedro Alves <pedro@codesourcery.com>
9505
9506 * linux-low.c (__SIGRTMIN): Define if not already defined.
9507 (linux_create_inferior): Check for __ANDROID__ rather than
9508 __SIGRTMIN.
9509 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9510 are already deferred.
9511 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9512 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9513 stopped and already has a pending signal to report.
9514 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9515 a pending signal to report or is moving out of a jump pad.
9516 (linux_init_signals): Check for __ANDROID__ rather than
9517 __SIGRTMIN.
9518
b4d51a55
PA
95192010-08-28 Pedro Alves <pedro@codesourcery.com>
9520
9521 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9522 debug_threads check. Avoid a linear search when not doing debug
9523 output.
9524
ec48365d
PA
95252010-08-27 Pedro Alves <pedro@codesourcery.com>
9526
9527 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9528 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9529 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9530 (process_event): Change local fd's type to gdb_fildes_t.
9531 (create_file_handler): Adjust prototype.
9532 (delete_file_handler): Adjust prototype.
9533 (handle_file_event): Adjust prototype. Use pfildes.
9534 (create_file_event): Adjsut prototype.
9535 * remote-utils.c (remote_desc, listen_desc): Change type to
9536 gdb_fildes_t.
9537 * server.h: New gdb_fildes_t typedef.
9538 [USE_WIN32API]: Include winsock2.h.
9539 (delete_file_handler, add_file_handler): Adjust prototypes.
9540 (pfildes): Declare.
9541 * utils.c (pfildes): New.
9542
854d88f0
PA
95432010-08-27 Pedro Alves <pedro@codesourcery.com>
9544
9545 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9546 * configure: Regenerate.
9547
0146f85b
PA
95482010-08-27 Pedro Alves <pedro@codesourcery.com>
9549
9550 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9551 (linux_done_accessing_memory): ... this.
9552 (linux_target_ops): Adjust.
9553 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9554 * nto-low.c (nto_target_ops): Adjust comment.
9555 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9556 * spu-low.c (spu_target_ops): Adjust comment.
9557 * target.h (target_ops): Rename unprepare_to_access_memory field
9558 to done_accessing_memory.
9559 (unprepare_to_access_memory): Rename to ...
9560 (done_accessing_memory): ... this.
9561
90d74c30
PA
95622010-08-26 Pedro Alves <pedro@codesourcery.com>
9563
9564 * linux-low.c (linux_prepare_to_access_memory): New.
9565 (linux_unprepare_to_access_memory): New.
9566 (linux_target_ops): Install them.
9567 * server.c (read_memory): Rename to ...
9568 (gdb_read_memory): ... this. Use
9569 prepare_to_access_memory/prepare_to_access_memory.
9570 (write_memory): Rename to ...
9571 (gdb_write_memory): ... this. Use
9572 prepare_to_access_memory/prepare_to_access_memory.
9573 (handle_search_memory_1): Adjust.
9574 (process_serial_event): Adjust.
9575 * target.h (struct target_ops): New fields
9576 prepare_to_access_memory and unprepare_to_access_memory.
9577 (prepare_to_access_memory, unprepare_to_access_memory): New.
9578 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9579 prepare_to_access_memory/prepare_to_access_memory.
9580 * nto-low.c (nto_target_ops): Adjust.
9581 * spu-low.c (spu_target_ops): Adjust.
9582 * win32-low.c (win32_target_ops): Adjust.
9583
fd467969
PA
95842010-08-26 Pedro Alves <pedro@codesourcery.com>
9585
9586 * Makefile.in (WARN_CFLAGS): Get it from configure.
9587 (WERROR_CFLAGS): New.
9588 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9589 * configure.ac: Introduce --enable-werror, which adds -Werror to
9590 the compiler command line. Enabled by default. Disable with
9591 --disable-werror. Add -Wdeclaration-after-statement
9592 Wpointer-arith and -Wformat-nonliteral to warning flags.
9593 * configure: Regenerate.
9594
331e2f5f
PA
95952010-08-26 Pedro Alves <pedro@codesourcery.com>
9596
9597 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9598
e581f2b4
PA
95992010-08-26 Pedro Alves <pedro@codesourcery.com>
9600
9601 * gdbreplay.c (remote_error): New.
9602 (gdbchar): New.
9603 (expect): Use gdbchar. Check for error reading from GDB.
9604 Clarify sync error output.
9605 (play): Check for errors writing to GDB.
9606 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9607 * remote-utils.c (getpkt): Check for errors writing to the remote
9608 descriptor.
9609
3c11dd79
PA
96102010-08-25 Pedro Alves <pedro@codesourcery.com>
9611
9612 * linux-low.c (linux_wait_1): Move non-debugging code out of
9613 `debug_threads' control.
9614
d20a8ad9
PA
96152010-08-25 Pedro Alves <pedro@codesourcery.com>
9616
9617 * linux-low.c (linux_wait_1): Don't set last_status here.
9618 * server.c (push_event, queue_stop_reply_callback): Assert we're
9619 not pushing a TARGET_WAITKIND_IGNORE event.
9620 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9621 (myresume, handle_target_event): Set the thread's last_resume_kind
9622 and last_status from the target returned status.
9623
964e4306
PA
96242010-08-25 Pedro Alves <pedro@codesourcery.com>
9625
9626 PR threads/10729
9627
9628 * linux-x86-low.c (update_debug_registers_callback): New.
9629 (i386_dr_low_set_addr): Use it.
9630 (i386_dr_low_get_addr): New.
9631 (i386_dr_low_set_control): Use update_debug_registers_callback.
9632 (i386_dr_low_get_control): New.
9633 (i386_dr_low_get_status): Adjust.
9634 * linux-low.c (linux_stop_lwp): New.
9635 * linux-low.h (linux_stop_lwp): Declare.
9636
9637 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9638 argument instead of a i386_debug_reg_state.
9639 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9640 a i386_debug_reg_state.
9641 (i386_insert_aligned_watchpoint): Adjust.
9642 (i386_remove_aligned_watchpoint): Adjust.
9643 (i386_low_stopped_data_address): Read the debug registers from the
9644 inferior instead of from the mirrors.
9645 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9646 (i386_dr_low_get_addr): Declare.
9647 (i386_dr_low_get_control): Declare.
9648 (i386_dr_low_get_status): Change prototype.
9649
9650 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9651 (i386_dr_low_get_addr): New.
9652 (i386_dr_low_get_control): New.
9653 (i386_dr_low_get_status): Adjust prototype. Return
9654 dr_status_mirror.
9655 (i386_initial_stuff): Clear dr_status_mirror and
9656 dr_control_mirror.
9657 (i386_get_thread_context): Adjust.
9658 (i386_set_thread_context): Adjust.
9659 (i386_thread_added): Adjust.
9660
5f21a75b
PA
96612010-08-24 Pedro Alves <pedro@codesourcery.com>
9662
9663 * linux-low.h (linux_thread_area): Delete declaration.
9664
3e4c1235
TS
96652010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9666
9667 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9668 after its termination.
9669
1971b033
PA
96702010-08-09 Pedro Alves <pedro@codesourcery.com>
9671
9672 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9673 (gdb_wants_all_stopped): Delete.
9674 (linux_wait_1): Don't call them.
9675 * server.c (handle_v_cont): Tag all threads as want-stopped.
9676 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9677 stopped as "client-wants-stopped".
9678
310444ac
PA
96792010-07-31 Pedro Alves <pedro@codesourcery.com>
9680
9681 * Makefile.in (signals_h): New.
9682 (server_h): Depend on it.
9683 (server.o): Don't depend on $(signals_def).
9684 (signals.o): Depend on $(signals_def).
9685
a19cae16
JK
96862010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9687
9688 * Makefile.in (signals_def): New.
9689 (server_h): Append include/gdb/signals.h and signals_def.
9690 (server.o): Append signals_def.
9691
30d50328
JK
96922010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9693
9694 * server.c (handle_target_event): Use target_signal_to_host for
9695 resume_info.sig initialization.
9696 * target.h (struct thread_resume) <sig>: New comment.
9697
5c3216e2
OS
96982010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9699
c6f46ca0
OS
9700 * server.c (handle_query): strcpy() the returned string from paddress()
9701 instead of sprintf().
5c3216e2
OS
9702 * utils.c (paddress): Return phex_nz().
9703
6bd31874
JB
97042010-07-07 Joel Brobecker <brobecker@adacore.com>
9705
9706 * server.c (handle_v_cont): Call mourn_inferior if process
9707 just exited.
9708 (myresume): Likewise.
9709
0fb4aa4b
PA
97102010-07-01 Pedro Alves <pedro@codesourcery.com>
9711
9712 Static tracepoints, and integration with UST.
9713
9714 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9715 * mem-break.c (uninsert_all_breakpoints)
9716 (reinsert_all_breakpoints): New.
9717 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9718 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9719 (gdb_agent_ust_loaded, helper_thread_id)
9720 (gdb_agent_helper_thread_id): New macros.
9721 (struct ipa_sym_addresses): Add addr_ust_loaded,
9722 addr_helper_thread_id, addr_cmd_buf.
9723 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9724 (in_process_agent_loaded_ust): New.
9725 (write_e_ust_not_loaded): New.
9726 (maybe_write_ipa_ust_not_loaded): New.
9727 (struct collect_static_trace_data_action): New.
9728 (enum tracepoint_type) <static_tracepoint>: New.
9729 (struct tracepoint) <handle>: Mention static tracepoints.
9730 (struct static_tracepoint_ctx): New.
9731 (CMD_BUF_SIZE): New.
9732 (add_tracepoint_action): Handle static tracepoint actions.
9733 (unprobe_marker_at): New.
9734 (clear_installed_tracepoints): Handle static tracepoints.
9735 (cmd_qtdp): Handle static tracepoints.
9736 (probe_marker_at): New.
9737 (cmd_qtstart): Handle static tracepoints.
9738 (response_tracepoint): Handle static tracepoints.
9739 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9740 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9741 (get_context_regcache): Handle static tracepoints.
9742 (do_action_at_tracepoint): Handle static tracepoint actions.
9743 (traceframe_find_block_type): Handle static trace data blocks.
9744 (traceframe_read_sdata): New.
9745 (download_tracepoints): Download static tracepoint actions.
9746 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9747 (GDB_PROBE_NAME): New.
9748 (ust_ops): New.
9749 (GET_UST_SYM): New.
9750 (USTF): New.
9751 (dlsym_ust): New.
9752 (ust_marker_to_static_tracepoint): New.
9753 (gdb_probe): New.
9754 (collect_ust_data_at_tracepoint): New.
9755 (gdb_ust_probe): New.
9756 (UNIX_PATH_MAX, SOCK_DIR): New.
9757 (gdb_ust_connect_sync_socket): New.
9758 (resume_thread, stop_thread): New.
9759 (run_inferior_command): New.
9760 (init_named_socket): New.
9761 (gdb_ust_socket_init): New.
9762 (cstr_to_hexstr): New.
9763 (next_st): New.
9764 (first_marker, next_marker): New.
9765 (response_ust_marker): New.
9766 (cmd_qtfstm, cmd_qtsstm): New.
9767 (unprobe_marker_at, probe_marker_at): New.
9768 (cmd_qtstmat, gdb_ust_thread): New.
9769 (gdb_ust_init): New.
9770 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9771 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9772 (ST_REGENTRY): New.
9773 (x86_64_st_collect_regmap): New.
9774 (X86_64_NUM_ST_COLLECT_GREGS): New.
9775 (AMD64_RIP_REGNUM): New.
9776 (supply_static_tracepoint_registers): New.
9777 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9778 (ST_REGENTRY): New.
9779 (i386_st_collect_regmap): New.
9780 (i386_NUM_ST_COLLECT_GREGS): New.
9781 (supply_static_tracepoint_registers): New.
9782 * server.c (handle_query): Handle qXfer:statictrace:read.
9783 <qSupported>: Report support for StaticTracepoints, and
9784 qXfer:statictrace:read features.
9785 * server.h (traceframe_read_sdata)
9786 (supply_static_tracepoint_registers): Declare.
9787 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9788 (unpack_varlen_hex): Include in IPA build.
9789 * Makefile.in (ustlibs, ustinc): New.
9790 (IPA_OBJS): Add remote-utils-ipa.o.
9791 ($(IPA_LIB)): Link -ldl and -lpthread.
9792 (UST_CFLAGS): New.
9793 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9794 * config.in, configure: Regenerate.
9795
9e4344e5
PA
97962010-06-20 Ian Lance Taylor <iant@google.com>
9797 Pedro Alves <pedro@codesourcery.com>
9798
9799 * linux-x86-low.c (always_true): Delete.
9800 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9801 trying to fool the compiler with always_true.
9802
c6beb2cb
PA
98032010-06-20 Pedro Alves <pedro@codesourcery.com>
9804
9805 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9806 conditions in gdbserver.
9807
d2ed6730
UW
98082010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9809
9810 * spu-low.c (spu_read_memory): Wrap around local store limit.
9811 (spu_write_memory): Likewise.
9812
4e29fb54
PA
98132010-06-15 Pedro Alves <pedro@codesourcery.com>
9814
9815 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9816 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9817 LONGEST uses.
9818 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9819 uses.
9820 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9821 uses with LONGEST uses.
9822
6a271cae
PA
98232010-06-14 Stan Shebs <stan@codesourcery.com>
9824 Pedro Alves <pedro@codesourcery.com>
9825
9826 Bytecode compiler.
9827
9828 * linux-x86-low.c: Include limits.h.
9829 (add_insns): New.
9830 (always_true): New.
9831 (EMIT_ASM): New.
9832 (EMIT_ASM32): New.
9833 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9834 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9835 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9836 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9837 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9838 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9839 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9840 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9841 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9842 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9843 (amd64_emit_void_call_2): New.
9844 (amd64_emit_ops): New.
9845 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9846 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9847 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9848 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9849 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9850 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9851 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9852 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9853 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9854 (i386_emit_stack_adjust, i386_emit_int_call_1)
9855 (i386_emit_void_call_2): New.
9856 (i386_emit_ops): New.
9857 (x86_emit_ops): New.
9858 (the_low_target): Install x86_emit_ops.
9859 * server.h (struct emit_ops): New.
9860 (get_raw_reg_func_addr): Declare.
9861 (current_insn_ptr, emit_error): Declare.
9862 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9863 (set_trace_state_variable_value): New defines.
9864 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9865 addr_get_trace_state_variable_value and
9866 addr_set_trace_state_variable_value.
9867 (symbol_list): New fields for get_raw_reg,
9868 get_trace_state_variable_value and set_trace_state_variable_value.
9869 (condfn): New typedef.
9870 (struct tracepoint): New field `compiled_cond'.
9871 (do_action_at_tracepoint): Clear compiled_cond.
9872 (get_trace_state_variable_value, set_trace_state_variable_value):
9873 Export in the IPA.
9874 (condition_true_at_tracepoint): If there's a compiled condition,
9875 run that.
9876 (current_insn_ptr, emit_error): New globals.
9877 (struct bytecode_address): New.
9878 (get_raw_reg_func_addr): New.
9879 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9880 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9881 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9882 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9883 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9884 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9885 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9886 (compile_tracepoint_condition, compile_bytecodes): New.
9887 * target.h (emit_ops): Forward declare.
9888 (struct target_ops): New field emit_ops.
9889 (target_emit_ops): New.
9890 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9891 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9892 * linux-low.c (linux_emit_ops): New.
9893 (linux_target_ops): Install it.
9894 * linux-low.h (struct linux_target_ops): New field emit_ops.
9895
92b72907
UW
98962010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9897
9898 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9899 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9900
fa593d66
PA
99012010-06-01 Pedro Alves <pedro@codesourcery.com>
9902 Stan Shebs <stan@codesourcery.com>
9903
9904 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9905 (all): Depend on $(extra_libraries).
9906 (install-only): Install the IPA.
9907 (IPA_OBJS, IPA_LIB): New.
9908 (clean): Remove the IPA lib.
9909 (IPAGENT_CFLAGS): New.
9910 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9911 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9912 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9913 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9914 * configure.ac: Check for atomic builtins support in the compiler.
9915 (IPA_DEPFILES, extra_libraries): Define.
9916 * configure.srv (ipa_obj): Add description.
9917 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9918 (i[34567]86-*-linux*): Set ipa_obj.
9919 (x86_64-*-linux*): Set ipa_obj.
9920 * linux-low.c (stabilizing_threads): New.
9921 (supports_fast_tracepoints): New.
9922 (linux_detach): Stabilize threads before detaching.
9923 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9924 the lwp is either not stabilizing, or is moving out of a jump pad.
9925 (linux_fast_tracepoint_collecting): New.
9926 (maybe_move_out_of_jump_pad): New.
9927 (enqueue_one_deferred_signal): New.
9928 (dequeue_one_deferred_signal): New.
9929 (linux_wait_for_event_1): If moving out of a jump pad, defer
9930 pending signals to later.
9931 (linux_stabilize_threads): New.
9932 (linux_wait_1): Check if threads need moving out of jump pads, and
9933 do it if so.
9934 (stuck_in_jump_pad_callback): New.
9935 (move_out_of_jump_pad_callback): New.
9936 (lwp_running): New.
9937 (linux_resume_one_lwp): Handle moving out of jump pads.
9938 (linux_set_resume_request): Dequeue deferred signals.
9939 (need_step_over_p): Also step over fast tracepoint jumps.
9940 (start_step_over): Also uninsert fast tracepoint jumps.
9941 (finish_step_over): Also reinsert fast tracepoint jumps.
9942 (linux_install_fast_tracepoint_jump): New.
9943 (linux_target_ops): Install linux_stabilize_threads and
9944 linux_install_fast_tracepoint_jump_pad.
9945 * linux-low.h (linux_target_ops) <get_thread_area,
9946 install_fast_tracepoint_jump_pad>: New fields.
9947 (struct lwp_info) <collecting_fast_tracepoint,
9948 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9949 (linux_get_thread_area): Declare.
9950 * linux-x86-low.c (jump_insn): New.
9951 (x86_get_thread_area): New.
9952 (append_insns): New.
9953 (push_opcode): New.
9954 (amd64_install_fast_tracepoint_jump_pad): New.
9955 (i386_install_fast_tracepoint_jump_pad): New.
9956 (x86_install_fast_tracepoint_jump_pad): New.
9957 (the_low_target): Install x86_get_thread_area and
9958 x86_install_fast_tracepoint_jump_pad.
9959 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9960 (struct fast_tracepoint_jump): New.
9961 (fast_tracepoint_jump_insn): New.
9962 (fast_tracepoint_jump_shadow): New.
9963 (find_fast_tracepoint_jump_at): New.
9964 (fast_tracepoint_jump_here): New.
9965 (delete_fast_tracepoint_jump): New.
9966 (set_fast_tracepoint_jump): New.
9967 (uninsert_fast_tracepoint_jumps_at): New.
9968 (reinsert_fast_tracepoint_jumps_at): New.
9969 (set_breakpoint_at): Use write_inferior_memory.
9970 (uninsert_raw_breakpoint): Use write_inferior_memory.
9971 (check_mem_read): Mask out fast tracepoint jumps.
9972 (check_mem_write): Mask out fast tracepoint jumps.
9973 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9974 (set_fast_tracepoint_jump): Declare.
9975 (delete_fast_tracepoint_jump)
9976 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9977 (reinsert_fast_tracepoint_jumps_at): Declare.
9978 * regcache.c: Don't compile many functions when building the
9979 in-process agent library.
9980 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9981 the register buffer in the heap.
9982 (free_register_cache): If the register buffer isn't owned by the
9983 regcache, don't free it.
9984 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9985 pre-existing register caches.
9986 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9987 type.
9988 (convert_ascii_to_int): : Constify `from' parameter type.
9989 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9990 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9991 the needed buffer in-place.
9992 (relocate_instruction): New.
9993 * server.c (handle_query) <qSymbols>: If the target supports
9994 tracepoints, give it a chance of looking up symbols. Report
9995 support for fast tracepoints.
9996 (handle_status): Stabilize threads.
9997 (process_serial_event): Adjust.
9998 * server.h (struct fast_tracepoint_jump): Forward declare.
9999 (struct process_info) <fast_tracepoint_jumps>: New field.
10000 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10001 (decode_X_packet, decode_M_packet): Adjust.
10002 (relocate_instruction): Declare.
10003 (in_process_agent_loaded): Declare.
10004 (tracepoint_look_up_symbols): Declare.
10005 (struct fast_tpoint_collect_status): Declare.
10006 (fast_tracepoint_collecting): Declare.
10007 (force_unlock_trace_buffer): Declare.
10008 (handle_tracepoint_bkpts): Declare.
10009 (initialize_low_tracepoint)
10010 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10011 * target.h (struct target_ops) <stabilize_threads,
10012 install_fast_tracepoint_jump_pad>: New fields.
10013 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10014 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10015 [HAVE_STDINT_H]: Include stdint.h.
10016 (trace_debug_1): Rename to ...
10017 (trace_vdebug): ... this.
10018 (trace_debug): Rename to ...
10019 (trace_debug_1): ... this. Add `level' parameter.
10020 (trace_debug): New.
10021 (ATTR_USED, ATTR_NOINLINE): New.
10022 (IP_AGENT_EXPORT): New.
10023 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10024 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10025 (about_to_request_buffer_space, trace_buffer_is_full)
10026 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10027 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10028 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10029 (traceframe_write_count, traceframes_created)
10030 (trace_state_variables)
10031 New renaming defines.
10032 (struct ipa_sym_addresses): New.
10033 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10034 (symbol_list): New.
10035 (ipa_sym_addrs): New.
10036 (all_tracepoint_symbols_looked_up): New.
10037 (in_process_agent_loaded): New.
10038 (write_e_ipa_not_loaded): New.
10039 (maybe_write_ipa_not_loaded): New.
10040 (tracepoint_look_up_symbols): New.
10041 (debug_threads) [IN_PROCESS_AGENT]: New.
10042 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10043 (UNKNOWN_SIDE_EFFECTS): New.
10044 (stop_tracing): New.
10045 (flush_trace_buffer): New.
10046 (stop_tracing_bkpt): New.
10047 (flush_trace_buffer_bkpt): New.
10048 (read_inferior_integer): New.
10049 (read_inferior_uinteger): New.
10050 (read_inferior_data_pointer): New.
10051 (write_inferior_data_pointer): New.
10052 (write_inferior_integer): New.
10053 (write_inferior_uinteger): New.
10054 (struct collect_static_trace_data_action): Delete.
10055 (enum tracepoint_type): New.
10056 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10057 <actions_str, step_actions, step_actions_str>: Only include in
10058 GDBserver.
fa593d66
PA
10059 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10060 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10061 (tracepoints): Use IP_AGENT_EXPORT.
10062 (last_tracepoint): Don't include in the IPA.
10063 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10064 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10065 (alloced_trace_state_variables): New.
10066 (trace_state_variables): Use IP_AGENT_EXPORT.
10067 (traceframe_t): Delete unused variable.
10068 (circular_trace_buffer): Don't include in the IPA.
10069 (trace_buffer_start): Delete.
10070 (struct trace_buffer_control): New.
10071 (trace_buffer_free): Delete.
10072 (struct ipa_trace_buffer_control): New.
10073 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10074 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10075 New.
10076 (trace_buffer_ctrl): New.
10077 (TRACE_BUFFER_CTRL_CURR): New.
10078 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10079 Reimplement as macros.
10080 (trace_buffer_wrap): Delete.
10081 (traceframe_write_count, traceframe_read_count)
10082 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10083 (struct tracepoint_hit_ctx) <type>: New field.
10084 (struct fast_tracepoint_ctx): New.
10085 (memory_barrier): New.
10086 (cmpxchg): New.
10087 (record_tracepoint_error): Update atomically in the IPA.
10088 (clear_inferior_trace_buffer): New.
10089 (about_to_request_buffer_space): New.
10090 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10091 updating the same buffer.
10092 (add_tracepoint): Default the tracepoint's type to trap
10093 tracepoint, and orig_size to -1.
10094 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10095 internal variables.
10096 (create_trace_state_variable): New parameter `gdb'. Handle it.
10097 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10098 (cmd_qtdp): Handle fast tracepoints.
10099 (cmd_qtdv): Adjust.
10100 (max_jump_pad_size): New.
10101 (gdb_jump_pad_head): New.
10102 (get_jump_space_head): New.
10103 (claim_jump_space): New.
10104 (sort_tracepoints): New.
10105 (MAX_JUMP_SIZE): New.
10106 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10107 IPA.
10108 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10109 support. Upload fast traceframes, and delete internal IPA
10110 breakpoints.
10111 (stop_tracing_handler): New.
10112 (flush_trace_buffer_handler): New.
10113 (cmd_qtstop): Upload fast tracepoints.
10114 (response_tracepoint): Handle fast tracepoints.
10115 (tracepoint_finished_step): Upload fast traceframes. Set the
10116 tracepoint hit context's tracepoint type.
10117 (handle_tracepoint_bkpts): New.
10118 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10119 type. Add comment about fast tracepoints.
10120 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10121 non-existing action_str field.
10122 (get_context_regcache): Handle fast tracepoints.
10123 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10124 to the regcache.
10125 (fast_tracepoint_from_jump_pad_address): New.
10126 (fast_tracepoint_from_ipa_tpoint_address): New.
10127 (collecting_t): New.
10128 (force_unlock_trace_buffer): New.
10129 (fast_tracepoint_collecting): New.
10130 (collecting): New.
10131 (gdb_collect): New.
10132 (write_inferior_data_ptr): New.
10133 (target_tp_heap): New.
10134 (target_malloc): New.
10135 (download_agent_expr): New.
10136 (UALIGN): New.
10137 (download_tracepoints): New.
10138 (download_trace_state_variables): New.
10139 (upload_fast_traceframes): New.
10140 (IPA_FIRST_TRACEFRAME): New.
10141 (IPA_NEXT_TRACEFRAME_1): New.
10142 (IPA_NEXT_TRACEFRAME): New.
10143 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10144 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10145 (gdb_jump_pad_buffer_end): New.
10146 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10147 (initialize_tracepoint): Adjust.
10148 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10149 buffer. Initialize the low module.
10150 * utils.c (PREFIX, TOOLNAME): New.
10151 (malloc_failure): Use PREFIX.
10152 (error): In the IPA, an error causes an exit.
10153 (fatal, warning): Use PREFIX.
10154 (internal_error): Use TOOLNAME.
10155 (NUMCELLS): Increase to 10.
10156 * configure, config.in: Regenerate.
10157
d149dd1d
PA
101582010-06-01 Pedro Alves <pedro@codesourcery.com>
10159
10160 * server.c (handle_query) <qSupported>: Do two passes over the
10161 qSupported string to avoid nesting strtok.
10162
f6528abd
JK
101632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10164
10165 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10166 (CDEPS): New.
10167 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10168 -Wl,--dynamic-list.
10169 * configure: Regenerate.
10170 * proc-service.list: New.
10171
ca2a87a0
JK
101722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10173
10174 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10175 New comment.
10176
363a6e9f
OS
101772010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10178
10179 * gdbreplay.c (remote_open): Check error return from socket() call by
10180 its equality to -1 not by it being negative.
10181 * remote-utils.c (remote_open): Likewise.
10182
d23b6cb1
PA
101832010-05-23 Pedro Alves <pedro@codesourcery.com>
10184
10185 * config.h: Regenerate.
10186
28d3cf85
MK
101872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10188
10189 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10190 doesn't provide PTRACE_GET_THREAD_AREA.
10191
fea36a59
MK
101922010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10193
10194 * linux-m68k-low.c: Include <asm/ptrace.h>
10195 (ps_get_thread_area): Implement.
10196
24b066ba
DE
101972010-05-03 Doug Evans <dje@google.com>
10198
10199 * event-loop.c (struct callback_event): New struct.
10200 (callback_list): New global.
10201 (append_callback_event, delete_callback_event): New functions.
10202 (process_callback): New function.
10203 (start_event_loop): Call it.
10204 * remote-utils.c (NOT_SCHEDULED): Define.
10205 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10206 moved out of readchar.
10207 (readchar): Rewrite. Call reschedule before returning.
10208 (reset_readchar): New function.
10209 (remote_close): Call it.
10210 (process_remaining, reschedule): New functions.
10211 * server.h (callback_handler_func): New typedef.
10212 (append_callback_event, delete_callback_event): Declare.
10213
9836d6ea
PA
102142010-05-03 Pedro Alves <pedro@codesourcery.com>
10215
10216 * proc-service.c (ps_pglobal_lookup): Use
10217 thread_db_look_up_one_symbol.
10218 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10219 parameter. Use it instead of all_symbols_looked_up.
10220 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10221 field.
10222 (all_symbols_looked_up): Don't declare.
10223 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10224 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10225 field.
10226 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10227 Set all_symbols_looked_up here.
10228 (thread_db_look_up_one_symbol): New.
10229 (thread_db_get_tls_address): Adjust.
10230 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10231 thread_db object on the heap, and tentatively set it in the
10232 process structure.
10233 (thread_db_init): Don't set all_symbols_looked_up here.
10234 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10235
7984d532
PA
102362010-05-03 Pedro Alves <pedro@codesourcery.com>
10237
10238 * linux-low.c (linux_kill, linux_detach): Adjust.
10239 (status_pending_p_callback): Remove redundant statement. Check
10240 for !TARGET_WAITIKIND_IGNORE, instead of
10241 TARGET_WAITKIND_STOPPED.
10242 (handle_tracepoints): Make sure LWP is locked. Adjust.
10243 (linux_wait_for_event_1): Adjust.
10244 (linux_cancel_breakpoints): New.
10245 (unsuspend_one_lwp): New.
10246 (unsuspend_all_lwps): New.
10247 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10248 (send_sigstop_callback): Change return type to int, add new
10249 `except' parameter and handle it.
10250 (suspend_and_send_sigstop_callback): New.
10251 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10252 pass them down. If SUSPEND, also increment the lwp's suspend
10253 count.
10254 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10255 (need_step_over_p): Don't consider suspended LWPs.
10256 (start_step_over): Adjust.
10257 (proceed_one_lwp): Change return type to int, add new `except'
10258 parameter and handle it.
10259 (unsuspend_and_proceed_one_lwp): New.
10260 (proceed_all_lwps): Use find_inferior instead of
10261 for_each_inferior.
10262 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10263 also decrement the suspend count of LWPs. Pass `except' down,
10264 instead of hacking its suspend count.
10265 (linux_pause_all): Add `freeze' parameter. Adjust.
10266 (linux_unpause_all): New.
10267 (linux_target_ops): Install linux_unpause_all.
10268 * server.c (handle_status): Adjust.
10269 * target.h (struct target_ops): New fields `unpause_all' and
10270 `cancel_breakpoints'. Add new parameter to `pause_all'.
10271 (pause_all): Add new `freeze' parameter.
10272 (unpause_all): New.
10273 (cancel_breakpoints): New.
10274 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10275 cancel breakpoints.
10276 (cmd_qtstart): Pause threads.
10277 (stop_tracing): Pause threads, and cancel breakpoints.
10278 * win32-low.c (win32_target_ops): Adjust.
10279
e471f25b
PA
102802010-05-03 Pedro Alves <pedro@codesourcery.com>
10281
10282 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10283 the inferior right away from here...
10284 (linux_wait_1): ... to here, and adjust to check the thread's
10285 last_resume_kind instead of the lwp's step or stop_expected flags.
10286
1915ef4f
PA
102872010-05-02 Pedro Alves <pedro@codesourcery.com>
10288
10289 * README: Use consistent `GDB' and `GDBserver' spellings.
10290
f9e39928
PA
102912010-05-02 Pedro Alves <pedro@codesourcery.com>
10292
10293 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10294 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10295 (linux_detach_one_lwp): Assume the lwp is stopped.
10296 (any_thread_of): Delete.
10297 (linux_detach): Stop all lwps here. Don't blindly delete all
10298 breakpoints.
10299 (delete_lwp_callback): New.
10300 (linux_mourn): Delete all lwps of the process that is gone.
10301 (linux_wait_1): Don't delete the last lwp of the process here.
10302 * mem-break.h (mark_breakpoints_out): Declare.
10303 * mem-break.c (mark_breakpoints_out): New.
10304 (free_all_breakpoints): Use it.
10305 * server.c (handle_target_event): If the process is gone, mark
10306 breakpoints out.
10307 * thread-db.c (struct thread_db) <create_bp>: New field.
10308 (thread_db_enable_reporting): Fix prototype. Store a thread event
10309 breakpoint reference in the thread_db struct.
10310 (thread_db_load_search): Clear the thread_db object.
10311 (try_thread_db_load_1): Ditto.
10312 (switch_to_process): New.
10313 (disable_thread_event_reporting): Use it.
10314 (remove_thread_event_breakpoints): New.
10315 (thread_db_detach, thread_db_mourn): Use it.
10316
1e7fc18c
PA
103172010-05-01 Pedro Alves <pedro@codesourcery.com>
10318
10319 * linux-low.c (linux_enable_event_reporting): New.
10320 (linux_wait_for_event_1, handle_extended_wait): Use it.
10321
02fc4de7
PA
103222010-04-30 Pedro Alves <pedro@codesourcery.com>
10323
10324 * linux-low.c (linux_kill_one_lwp, linux_kill)
10325 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10326 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10327 SIGSTOP even if the LWP is stopped.
10328 (send_sigstop_callback): New.
10329 (stop_all_lwps): Use send_sigstop_callback instead.
10330 (linux_resume_one_thread): Adjust.
10331 (proceed_one_lwp): Still proceed an LWP that the client has
10332 requested to stop, if we haven't reported it as stopped yet. Make
10333 sure that LWPs the client want stopped, have a pending SIGSTOP.
10334
bc3b5632
DE
103352010-04-26 Doug Evans <dje@google.com>
10336
ae1ada35
DE
10337 * server.c (handle_general_set): Make static.
10338
bc3b5632
DE
10339 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10340 Print received char after testing for error/eof instead of before.
10341 (input_interrupt): Tweak comment.
10342
65730243
DE
103432010-04-23 Doug Evans <dje@google.com>
10344
10345 * server.c (start_inferior): Print inferior argv if --debug.
10346
a8ae7dc0
AR
103472010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10348
10349 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10350 * nto-x86-low.c: Include server.h
10351
1c07cc19
PM
103522010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10353
10354 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10355 be consistent with other sources of this directory.
10356 (init_registers_amd64): Correct name of source file of this function
10357 in the comment.
10358
e0a61e09
PM
103592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10360
10361 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10362 64-bit executables.
10363
54709339
PM
103642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10365
10366 * win32-i386-low.c: Add 64-bit support.
10367 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10368 (init_registers_amd64): Declare.
10369 (mappings): Add 64-bit version of array.
10370 (init_windows_x86): New function.
10371 (the_low_target): Change init_arch field to init_windows_x86.
10372
e8f0053d
PM
103732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10374
10375 * win32-low.c: Adapt to support also 64-bit architecture.
10376 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10377 (get_image_name): Use SIZE_T type for local variable `done'.
10378 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10379 (toolhelp_get_dll_name): Idem.
10380 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10381 Use uintptr_t typecast to avoid warning.
10382 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10383 (handle_exception): Use phex_nz to avoid warning.
10384 (win32_wait): Remove unused local variable `process'.
10385
c481e77e
PM
103862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10387
10388 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10389 `amd64-avx.o'.
10390
12ea4b69
PM
103912010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10392
10393 * configure.ac: Use `ws2_32' library for srv_mingw.
10394 * configure: Regenerate.
10395 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10396 * remote-utils.c: Likewise.
10397
f6d1620c
L
103982010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10399
10400 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10401 if __x86_64__ is defined.
10402
8e642873
PM
104032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10404
10405 * configure: Regenerate.
10406
711e434b
PM
104072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10408
10409 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10410 * target.h (target_ops): New get_tib_address field.
10411 * win32-low.h (win32_thread_info): Add thread_local_base field.
10412 * win32-low.c (child_add_thread): Add tlb argument.
10413 Set thread_local_base field to TLB.
10414 (get_child_debug_event): Adapt to child_add_thread change.
10415 (win32_get_tib_address): New function.
10416 (win32_target_ops): Set get_tib_address field to
10417 win32_get_tib_address.
10418 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10419
505106cd
PA
104202010-04-12 Pedro Alves <pedro@codesourcery.com>
10421
505106cd
PA
10422 * linux-low.c (linux_mourn): Also remove the process.
10423 * server.c (handle_target_event): Don't remove the process here.
10424 * nto-low.c (nto_mourn): New.
10425 (nto_target_ops): Install it.
10426 * spu-low.c (spu_mourn): New.
10427 (spu_target_ops): Install it.
10428 * win32-low.c (win32_mourn): New.
10429 (win32_target_ops): Install it.
10430
e8470a06
PA
104312010-04-12 Pedro Alves <pedro@codesourcery.com>
10432
10433 * server.h (buffer_xml_printf): Remove redundant `;'.
10434
45ba0d02
PA
104352010-04-12 Pedro Alves <pedro@codesourcery.com>
10436
10437 * regcache.c (set_register_cache): Invalidate regcaches before
10438 changing the register cache layout.
10439 (regcache_invalidate_one): Allow a NULL regcache.
10440 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10441 regcaches before changing the register cache layout or the target
10442 regsets.
10443
59e04013
L
104442010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10445
10446 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10447 variable warning on Linux/x86-64.
10448
8336d594
PA
104492010-04-11 Pedro Alves <pedro@codesourcery.com>
10450
10451 GDBserver disconnected tracing support.
10452
10453 * linux-low.c (linux_remove_process): Delete.
10454 (add_lwp): Don't set last_resume_kind here.
10455 (linux_kill): Use `mourn'.
10456 (linux_detach): Use `thread_db_detach', and `mourn'.
10457 (linux_mourn): New.
10458 (linux_attach_lwp_1): Adjust comment.
10459 (linux_attach): last_resume_kind moved the thread_info; adjust.
10460 (status_pending_p_callback): Adjust.
10461 (linux_wait_for_event_1): Adjust.
10462 (count_events_callback, select_singlestep_lwp_callback)
10463 (select_event_lwp_callback, cancel_breakpoints_callback)
10464 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10465 (proceed_one_lwp): Adjust.
10466 (linux_async): Add debug output.
10467 (linux_thread_stopped): New.
10468 (linux_pause_all): New.
10469 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10470 linux_pause_all.
10471 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10472 (thread_db_free): Delete declaration.
10473 (thread_db_detach, thread_db_mourn): Declare.
10474 * thread-db.c (thread_db_init): Use thread_db_mourn.
10475 (thread_db_free): Delete, split in two.
10476 (disable_thread_event_reporting): New.
10477 (thread_db_detach): New.
10478 (thread_db_mourn): New.
10479
10480 * server.h (struct thread_info) <last_resume_kind>: New field.
10481 <attached>: Add comment.
10482 <gdb_detached>: New field.
10483 (handler_func): Change return type to int.
10484 (handle_serial_event, handle_target_event): Ditto.
10485 (gdb_connected): Declare.
10486 (tracing): Delete.
10487 (disconnected_tracing): Declare.
10488 (stop_tracing): Declare.
10489
10490 * server.c (handle_query) <qSupported>: Report support for
10491 disconnected tracing.
10492 (queue_stop_reply_callback): Account for running threads.
10493 (gdb_wants_thread_stopped): New.
10494 (gdb_wants_all_threads_stopped): New.
10495 (gdb_reattached_process): New.
10496 (handle_status): Clear the `gdb_detached' flag of all processes.
10497 In all-stop, stop all threads.
10498 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10499 (process_serial_event): If the remote connection breaks, or if an
10500 exit was forced with "monitor exit", force an event loop exit.
10501 Handle disconnected tracing on detach.
10502 (handle_serial_event): Adjust.
10503 (handle_target_event): If GDB isn't connected, forward events back
10504 to the inferior, unless the last process exited, in which case,
10505 exit gdbserver. Adjust interface.
10506
10507 * remote-utils.c (remote_open): Don't block in accept. Instead
10508 register an event loop source on the listen socket file
10509 descriptor. Refactor bits into ...
10510 (listen_desc): ... this new global.
10511 (gdb_connected): ... this new function.
10512 (enable_async_notification): ... this new function.
10513 (handle_accept_event): ... this new function.
10514 (remote_close): Clear remote_desc.
10515
10516 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10517
10518 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10519 New fields.
10520 (mourn_inferior): Define.
10521 (target_process_qsupported): Avoid the dangling else problem.
10522 (thread_stopped): Define.
10523 (pause_all): Define.
10524 (target_waitstatus_to_string): Declare.
10525 * target.c (target_waitstatus_to_string): New.
10526
10527 * tracepoint.c (tracing): Make extern.
10528 (disconnected_tracing): New.
10529 (stop_tracing): Make extern. Handle tracing stops due to GDB
10530 disconnecting.
10531 (cmd_qtdisconnected): New.
10532 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10533 (handle_tracepoint_general_set): Handle QTDisconnected.
10534
10535 * event-loop.c (event_handler_func): Change return type to int.
10536 (process_event): Bail out if the event handler wants the event
10537 loop to stop.
10538 (handle_file_event): Ditto.
10539 (start_event_loop): Bail out if the event handler wants the event
10540 loop to stop.
10541
10542 * nto-low.c (nto_target_ops): Adjust.
10543 * spu-low.c (spu_wait): Don't remove the process here.
10544 (spu_target_ops): Adjust.
10545 * win32-low.c (win32_wait): Don't remove the process here.
10546 (win32_target_ops): Adjust.
10547
5d267c4c
PA
105482010-04-11 Pedro Alves <pedro@codesourcery.com>
10549
10550 * regcache.c (realloc_register_cache): Invalidate inferior's
10551 regcache before recreating it.
10552
623ccd72
PA
105532010-04-09 Pedro Alves <pedro@codesourcery.com>
10554
10555 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10556
219f2f23
PA
105572010-04-09 Stan Shebs <stan@codesourcery.com>
10558 Pedro Alves <pedro@codesourcery.com>
10559
10560 * server.h (LONGEST): New.
10561 (struct thread_info) <while_stepping>: New field.
10562 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10563 Declare.
10564 (initialize_tracepoint, handle_tracepoint_general_set)
10565 (handle_tracepoint_query, tracepoint_finished_step)
10566 (tracepoint_was_hit, release_while_stepping_state_list):
10567 (current_traceframe): Declare.
10568 * server.c (handle_general_set): Handle tracepoint packets.
10569 (read_memory): New.
10570 (write_memory): New.
10571 (handle_search_memory_1): Use read_memory.
10572 (handle_query): Report support for conditional tracepoints, trace
10573 state variables, and tracepoint sources. Handle tracepoint
10574 queries.
10575 (main): Initialize the tracepoints module.
10576 (process_serial_event): Handle traceframe reads/writes.
10577
10578 * linux-low.c (handle_tracepoints): New.
10579 (linux_wait_1): Call it.
10580 (linux_resume_one_lwp): Handle while-stepping.
10581 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10582 (linux_target_ops): Install them.
10583 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10584 New field.
10585 * linux-x86-low.c (x86_supports_tracepoints): New.
10586 (the_low_target). Install it.
10587
10588 * mem-break.h (delete_breakpoint): Declare.
10589 * mem-break.c (delete_breakpoint): Make external.
10590
10591 * target.h (struct target_ops): Add `supports_tracepoints',
10592 `read_pc', and `write_pc' fields.
10593 (target_supports_tracepoints): Define.
10594 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10595 (phex_nz): New.
10596
10597 * regcache.h (struct regcache) <registers_owned>: New field.
10598 (init_register_cache, regcache_cpy): Declare.
10599 (regcache_read_pc, regcache_write_pc): Declare.
10600 (register_cache_size): Declare.
10601 (supply_regblock): Declare.
10602 * regcache.c (init_register_cache): New.
10603 (new_register_cache): Use it.
10604 (regcache_cpy): New.
10605 (register_cache_size): New.
10606 (supply_regblock): New.
10607 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10608
219f2f23
PA
10609 * tracepoint.c: New.
10610
10611 * Makefile.in (OBS): Add tracepoint.o.
10612 (tracepoint.o): New rule.
10613
3a13a53b
L
106142010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10615
10616 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10617 (i386-mmx.o): New.
10618 (i386-mmx.c): Likewise.
10619 (i386-mmx-linux.o): Likewise.
10620 (i386-mmx-linux.c): Likewise.
10621
10622 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10623 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10624 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10625 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10626
10627 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10628 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10629 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10630
1570b33e
L
106312010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10632
10633 * Makefile.in (clean): Updated.
10634 (i386-avx.o): New.
10635 (i386-avx.c): Likewise.
10636 (i386-avx-linux.o): Likewise.
10637 (i386-avx-linux.c): Likewise.
10638 (amd64-avx.o): Likewise.
10639 (amd64-avx.c): Likewise.
10640 (amd64-avx-linux.o): Likewise.
10641 (amd64-avx-linux.c): Likewise.
10642
10643 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10644 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10645 (srv_amd64_regobj): Add amd64-avx.o.
10646 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10647 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10648 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10649 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10650 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10651 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10652 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10653
10654 * i387-fp.c: Include "i386-xstate.h".
10655 (i387_xsave): New.
10656 (i387_cache_to_xsave): Likewise.
10657 (i387_xsave_to_cache): Likewise.
10658 (x86_xcr0): Likewise.
10659
10660 * i387-fp.h (i387_cache_to_xsave): Likewise.
10661 (i387_xsave_to_cache): Likewise.
10662 (x86_xcr0): Likewise.
10663
10664 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10665 * linux-crisv32-low.c (target_regsets): Likewise.
10666 * linux-m68k-low.c (target_regsets): Likewise.
10667 * linux-mips-low.c (target_regsets): Likewise.
10668 * linux-ppc-low.c (target_regsets): Likewise.
10669 * linux-s390-low.c (target_regsets): Likewise.
10670 * linux-sh-low.c (target_regsets): Likewise.
10671 * linux-sparc-low.c (target_regsets): Likewise.
10672 * linux-xtensa-low.c (target_regsets): Likewise.
10673
10674 * linux-low.c: Include <sys/uio.h>.
10675 (regsets_fetch_inferior_registers): Support nt_type.
10676 (regsets_store_inferior_registers): Likewise.
10677 (linux_process_qsupported): New.
10678 (linux_target_ops): Add linux_process_qsupported.
10679
10680 * linux-low.h (regset_info): Add nt_type.
10681 (linux_target_ops): Add process_qsupported.
10682
10683 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10684 and <sys/uio.h>.
10685 (init_registers_i386_avx_linux): New.
10686 (init_registers_amd64_avx_linux): Likewise.
10687 (xmltarget_i386_linux_no_xml): Likewise.
10688 (xmltarget_amd64_linux_no_xml): Likewise.
10689 (PTRACE_GETREGSET): Likewise.
10690 (PTRACE_SETREGSET): Likewise.
10691 (x86_fill_xstateregset): Likewise.
10692 (x86_store_xstateregset): Likewise.
10693 (use_xml): Likewise.
10694 (x86_linux_update_xmltarget): Likewise.
10695 (x86_linux_process_qsupported): Likewise.
10696 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10697 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10698 init_registers_i386_linux here. Call
10699 x86_linux_update_xmltarget.
10700 (the_low_target): Add x86_linux_process_qsupported.
10701
10702 * server.c (handle_query): Call target_process_qsupported.
10703
10704 * target.h (target_ops): Add process_qsupported.
10705 (target_process_qsupported): New.
10706
fc7238bb
PA
107072010-04-03 Pedro Alves <pedro@codesourcery.com>
10708
10709 * inferiors.c (add_thread): Set last_status kind to
10710 TARGET_WAITKIND_IGNORE.
10711 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10712 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10713 (linux_wait_1): Move `thread' local definition to block that uses
10714 it. Don't NULL initialize `event_child'.
10715 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10716 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10717 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10718
bdabb078
PA
107192010-04-01 Pedro Alves <pedro@codesourcery.com>
10720
10721 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10722 an extended waitstatus, or by a watchpoint.
10723 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10724 thread was stepping or has been stopped by a watchpoint.
10725
d3bbe7a0
PA
107262010-04-01 Pedro Alves <pedro@codesourcery.com>
10727
10728 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10729 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10730 of another, then delete the previous, and validate all
10731 breakpoints.
10732 (validate_inserted_breakpoint): New.
10733 (delete_disabled_breakpoints): New.
10734 (validate_breakpoints): New.
10735 (check_mem_read): Validate breakpoints before trusting their
10736 shadow. Delete disabled breakpoints.
10737 (check_mem_write): Validate breakpoints before trusting they
10738 should be inserted. Delete disabled breakpoints.
10739 * mem-break.h (validate_breakpoints):
10740 * server.c (handle_query): Validate breakpoints when we see a
10741 qSymbol query.
10742
8b07ae33
PA
107432010-04-01 Pedro Alves <pedro@codesourcery.com>
10744
10745 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10746 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10747 if we could tell there's a GDB breakpoint at stop_pc.
10748 (need_step_over_p): Don't do a step over if we find a GDB
10749 breakpoint at the resume PC.
10750
10751 * mem-break.c (struct raw_breakpoint): New.
10752 (enum bkpt_type): New type `gdb_breakpoint'.
10753 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10754 fields. New field `raw'.
10755 (find_raw_breakpoint_at): New.
10756 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10757 breakpoint instead.
10758 (set_breakpoint_at): Adjust.
10759 (delete_raw_breakpoint): New.
10760 (release_breakpoint): New.
10761 (delete_breakpoint): Rename to...
10762 (delete_breakpoint_1): ... this. Add proc parameter. Use
10763 release_breakpoint. Return ENOENT.
10764 (delete_breakpoint): Reimplement.
10765 (find_breakpoint_at): Delete.
10766 (find_gdb_breakpoint_at): New.
10767 (delete_breakpoint_at): Delete.
10768 (set_gdb_breakpoint_at): New.
10769 (delete_gdb_breakpoint_at): New.
10770 (gdb_breakpoint_here): New.
10771 (set_reinsert_breakpoint): Use release_breakpoint.
10772 (uninsert_breakpoint): Rename to ...
10773 (uninsert_raw_breakpoint): ... this.
10774 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10775 (reinsert_raw_breakpoint): Change parameter type to
10776 raw_breakpoint.
10777 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10778 instead.
10779 (check_breakpoints): Adjust. Use release_breakpoint.
10780 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10781 (breakpoint_inserted_here): Ditto.
10782 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10783 Don't trust the breakpoint's shadow if it is not inserted.
10784 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10785 (delete_all_breakpoints): Adjust.
10786 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10787 use delete_breakpoint_1.
10788
10789 * mem-break.h (breakpoints_supported): Delete declaration.
10790 (set_gdb_breakpoint_at): Declare.
10791 (gdb_breakpoint_here): Declare.
10792 (delete_breakpoint_at): Delete.
10793 (delete_gdb_breakpoint_at): Declare.
10794
10795 * server.h (struct raw_breakpoint): Forward declare.
10796 (struct process_info): New field `raw_breakpoints'.
10797
10798 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10799 breakpoints.
10800
6bf5e0ba
PA
108012010-03-24 Pedro Alves <pedro@codesourcery.com>
10802
10803 * linux-low.c (status_pending_p_callback): Fix comment.
10804 (linux_wait_for_event_1): Move most of the internal breakpoint
10805 handling from here...
10806 (linux_wait_1): ... to here.
10807 (count_events_callback): New.
10808 (select_singlestep_lwp_callback): New.
10809 (select_event_lwp_callback): New.
10810 (cancel_breakpoints_callback): New.
10811 (select_event_lwp): New.
10812 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10813 priority to all LWPs that have had events that should be reported
10814 to the client. Cancel breakpoints when about to reporting the
10815 event to the client, not while stopping lwps. No longer cancel
10816 finished single-steps here.
10817 (cancel_finished_single_step): Delete.
10818 (cancel_finished_single_steps): Delete.
10819
414a389f
PA
108202010-03-24 Pedro Alves <pedro@codesourcery.com>
10821
10822 * mem-break.c (enum bkpt_type): New.
10823 (struct breakpoint): New field `type'.
10824 (set_breakpoint_at): Change return type to struct breakpoint
10825 pointer. Set type to `other_breakpoint' by default.
10826 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10827 in the breakpoint list.
10828 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10829 (reinsert_breakpoint): Rename to ...
10830 (reinsert_raw_breakpoint): ... this.
10831 (reinsert_breakpoints_at): Adjust.
10832 * mem-break.h (struct breakpoint): Declare.
10833 (set_breakpoint_at): Change return type to struct breakpoint
10834 pointer.
10835
2280c721
PA
108362010-03-24 Pedro Alves <pedro@codesourcery.com>
10837
10838 * server.c (handle_query): Assign, not compare.
10839
d50171e4
PA
108402010-03-24 Pedro Alves <pedro@codesourcery.com>
10841
10842 Teach linux gdbserver to step-over-breakpoints.
10843
10844 * linux-low.c (can_hardware_single_step): New.
10845 (supports_breakpoints): New.
10846 (handle_extended_wait): If stopping threads, read the stop pc of
10847 the new cloned LWP.
10848 (get_pc): New.
10849 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10850 low target doesn't support retrieving the PC.
10851 (add_lwp): Set last_resume_kind to resume_continue.
10852 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10853 (linux_attach): Don't clear stop_expected. Set the lwp's
10854 last_resume_kind to resume_stop.
10855 (linux_detach_one_lwp): Don't check for removed breakpoints.
10856 (check_removed_breakpoint): Delete.
10857 (status_pending_p): Rename to ...
10858 (status_pending_p_callback): ... this. Don't check for removed
10859 breakpoints. Don't consider threads that are stopped from GDB's
10860 perspective.
10861 (linux_wait_for_lwp): Always read the stop_pc here.
10862 (cancel_breakpoint): New.
10863 (step_over_bkpt): New global.
10864 (linux_wait_for_event_1): Implement stepping over breakpoints.
10865 (gdb_wants_lwp_stopped): New.
10866 (gdb_wants_all_stopped): New.
10867 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10868 single-step traps here. Store the thread's last reported target
10869 wait status.
10870 (send_sigstop): Don't clear stop_expected. Always set it,
10871 instead.
10872 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10873 (cancel_finished_single_step): New.
10874 (cancel_finished_single_steps): New.
10875 (wait_for_sigstop): Don't cancel finished single-step traps here.
10876 (linux_resume_one_lwp): Don't check for removed breakpoints.
10877 Don't set `step' on non-hardware step archs.
10878 (linux_set_resume_request): Ignore resume_stop requests if already
10879 stopping or stopped. Set the lwp's last_resume_kind.
10880 (resume_status_pending_p): Don't check for removed breakpoints.
10881 (need_step_over_p): New.
10882 (start_step_over): New.
10883 (finish_step_over): New.
10884 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10885 requests. Clear the thread's last reported target waitstatus.
10886 Don't use the `suspended' flag. Don't consider pending breakpoints.
10887 (linux_resume): Start a step-over if necessary.
10888 (proceed_one_lwp): New.
10889 (proceed_all_lwps): New.
10890 (unstop_all_lwps): New.
10891 * linux-low.h (struct lwp_info): Rewrite comment for the
10892 `suspended' flag. Add the `stop_pc' field. Delete the
10893 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10894 Add `'last_resume_kind' and `need_step_over' fields.
10895 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10896 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10897 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10898 (set_raw_breakpoint_at): New.
10899 (set_breakpoint_at): Rewrite to use it.
10900 (reinsert_breakpoint_handler): Delete.
10901 (set_reinsert_breakpoint): New.
10902 (reinsert_breakpoint_by_bp): Delete.
10903 (delete_reinsert_breakpoints): New.
10904 (uninsert_breakpoint): Rewrite.
10905 (uninsert_breakpoints_at): New.
10906 (reinsert_breakpoint): Rewrite.
10907 (reinsert_breakpoints_at): New.
10908 (check_breakpoints): Rewrite.
10909 (breakpoint_here): New.
10910 (breakpoint_inserted_here): New.
10911 (check_mem_read): Adjust.
10912 * mem-break.h (breakpoints_supported, breakpoint_here)
10913 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10914 (reinsert_breakpoint_by_bp): Delete declaration.
10915 (delete_reinsert_breakpoints): Declare.
10916 (reinsert_breakpoint): Delete declaration.
10917 (reinsert_breakpoints_at): Declare.
10918 (uninsert_breakpoint): Delete declaration.
10919 (uninsert_breakpoints_at): Declare.
10920 (check_breakpoints): Adjust prototype.
10921 * server.h: Adjust include order.
10922 (struct thread_info): Declare here. Add a `last_status' field.
10923
30ba68cb
MS
109242010-03-23 Michael Snyder <msnyder@vmware.com>
10925
10926 * server.c (crc32): New function.
10927 (handle_query): Add handling for 'qCRC:' request.
10928
b9a881c2
PA
109292010-03-23 Pedro Alves <pedro@codesourcery.com>
10930
10931 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10932 lwp had been stopped by a watchpoint.
10933
e92d13d5
PA
109342010-03-16 Pedro Alves <pedro@codesourcery.com>
10935
10936 * server.h (internal_error): Declare.
10937 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10938 * utils.c (internal_error): New function.
10939
64daa791
AS
109402010-03-15 Andreas Schwab <schwab@redhat.com>
10941
10942 * configure.srv: Fix typo setting srv_regobj.
10943
f52cd8cd
PA
109442010-03-15 Pedro Alves <pedro@codesourcery.com>
10945
10946 * linux-low.c (fetch_register): Avoid passing a non string literal
10947 format to `error'.
10948 (usr_store_inferior_registers): Ditto.
10949
93ae6fdc
PA
109502010-03-14 Pedro Alves <pedro@codesourcery.com>
10951
10952 * linux-low.c (linux_write_memory): Bail out early if peeking
10953 memory failed.
10954
c3adc08c
PA
109552010-03-14 Pedro Alves <pedro@codesourcery.com>
10956
10957 * linux-low.h (struct lwp_info): New fields
10958 `stopped_by_watchpoint' and `stopped_data_address'.
10959 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10960 here, and cache them in the lwp object.
10961 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10962 directly.
10963 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10964 field.
10965 (linux_stopped_by_watchpoint): Rewrite.
10966 (linux_stopped_data_address): Rewrite.
10967
bce522a2
PA
109682010-03-06 Simo Melenius <simo.melenius@iki.fi>
10969
10970 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10971 switching the current inferior, not before.
10972
90884b2b
L
109732010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10974
10975 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10976 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10977 i386-linux.c and amd64-linux.c.
10978 (reg-i386.o): Removed.
10979 (reg-i386.c): Likewise.
10980 (reg-i386-linux.o): Likewise.
10981 (reg-i386-linux.c): Likewise.
10982 (reg-x86-64.o): Likewise.
10983 (reg-x86-64.c): Likewise.
10984 (reg-x86-64-linux.o): Likewise.
10985 (reg-x86-64-linux.c): Likewise.
10986 (i386.o): New.
10987 (i386.c): Likewise.
10988 (i386-linux.o): Likewise.
10989 (i386-linux.c): Likewise.
10990 (amd64.o): Likewise.
10991 (amd64.c): Likewise.
10992 (amd64-linux.o): Likewise.
10993 (amd64-linux.c): Likewise.
10994
10995 * configure.srv (srv_i386_regobj): New.
10996 (srv_i386_linux_regobj): Likewise.
10997 (srv_amd64_regobj): Likewise.
10998 (srv_amd64_linux_regobj): Likewise.
10999 (srv_i386_32bit_xmlfiles): Likewise.
11000 (srv_i386_64bit_xmlfiles): Likewise.
11001 (srv_i386_xmlfiles): Likewise.
11002 (srv_amd64_xmlfiles): Likewise.
11003 (srv_i386_linux_xmlfiles): Likewise.
11004 (srv_amd64_linux_xmlfiles): Likewise.
11005 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11006 srv_xmlfiles to $srv_i386_xmlfiles.
11007 (i[34567]86-*-mingw32ce*): Likewise.
11008 (i[34567]86-*-mingw*): Likewise.
11009 (i[34567]86-*-nto*): Likewise.
11010 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11011 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11012 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11013 (x86_64-*-linux*): Likewise.
11014
11015 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11016 (init_registers_amd64_linux): New.
11017 (x86_arch_setup): Replace init_registers_x86_64_linux with
11018 init_registers_amd64_linux.
11019
193f13e6
MK
110202010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11021
11022 * configure.ac: Check for libdl. If it is not available link against
11023 static libthread_db.
11024 * configure: Regenerate.
11025
85d721b8
PA
110262010-02-22 Pedro Alves <pedro@codesourcery.com>
11027
11028 PR9605
11029
11030 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11031 handing a read watchpoint.
11032 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11033
6076632b
DE
110342010-02-12 Doug Evans <dje@google.com>
11035
11036 * linux-low.c (linux_supports_tracefork_flag): Document.
11037 (linux_look_up_symbols): Add comment.
11038
3327ccf7
L
110392010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11040
11041 * regcache.c (supply_register): Clear regcache if buf is NULL.
11042
0718675c 110432010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11044 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11045
11046 * inferiors.c (find_inferior): Add function documentation.
11047 (unloaded_dll): Handle the case where the unloaded dll has not
11048 been previously registered in the dll list.
11049
177321bd
DJ
110502010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11051
11052 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11053 (thumb2_breakpoint): New.
11054 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11055
2b009048
DJ
110562010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11057
11058 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11059 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11060 breakpoints.
11061
3be029c7
PA
110622010-01-21 Pedro Alves <pedro@codesourcery.com>
11063
11064 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11065
18f5de3b
JK
110662010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11067
11068 * linux-s390-low.c (s390_collect_ptrace_register)
11069 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11070
3743bb4f
DE
110712010-01-21 Doug Evans <dje@google.com>
11072
14ce3065
DE
11073 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11074 (PTRACE_ARG4_TYPE): New macro.
11075 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11076 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11077 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11078 (usr_store_inferior_registers): Ditto.
11079 (linux_read_memory, linux_write_memory): Ditto.
11080 (linux_test_for_tracefork): Ditto.
11081
3743bb4f
DE
11082 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11083 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11084
8b315be5
PA
110852010-01-21 Pedro Alves <pedro@codesourcery.com>
11086
11087 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11088 target.
11089
85492558
PA
110902010-01-21 Pedro Alves <pedro@codesourcery.com>
11091
11092 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11093 prototype to take a regcache. Adjust.
11094
442ea881
PA
110952010-01-20 Pedro Alves <pedro@codesourcery.com>
11096
11097 * regcache.h (struct thread_info): Forward declare.
11098 (struct regcache): New.
11099 (new_register_cache): Adjust prototype.
11100 (get_thread_regcache): Declare.
11101 (free_register_cache): Adjust prototype.
11102 (registers_to_string, registers_from_string): Ditto.
11103 (supply_register, supply_register_by_name, collect_register)
11104 (collect_register_as_string, collect_register_by_name): Ditto.
11105 * regcache.c (struct inferior_regcache_data): Delete.
11106 (get_regcache): Rename to ...
11107 (get_thread_regcache): ... this. Adjust. Switch inferior before
11108 fetching registers.
11109 (regcache_invalidate_one): Adjust.
11110 (regcache_invalidate): Fix prototype.
11111 (new_register_cache): Return the new register cache.
11112 (free_register_cache): Change prototype.
11113 (realloc_register_cache): Adjust.
11114 (registers_to_string): Change prototype to take a regcache. Adjust.
11115 (registers_from_string): Ditto.
11116 (register_data): Ditto.
11117 (supply_register): Ditto.
11118 (supply_register_by_name): Ditto.
11119 (collect_register): Ditto.
11120 (collect_register_as_string): Ditto.
11121 (collect_register_by_name): Ditto.
11122 * server.c (process_serial_event): Adjust.
11123 * linux-low.h (regset_fill_func, regset_store_func): Change
11124 prototype.
11125 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11126 Change prototype.
11127 * linux-low.c (get_stop_pc): Adjust.
11128 (check_removed_breakpoint): Adjust.
11129 (linux_wait_for_event): Adjust.
11130 (linux_resume_one_lwp): Adjust.
11131 (fetch_register): Add regcache parameter. Adjust.
11132 (usr_store_inferior_registers): Ditto.
11133 (regsets_fetch_inferior_registers): Ditto.
11134 (regsets_store_inferior_registers): Ditto.
11135 (linux_fetch_registers, linux_store_registers): Ditto.
11136 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11137 regcache. Adjust.
43aaf8b6
PA
11138 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11139 Ditto.
442ea881
PA
11140 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11141 prototype to take a regcache.
11142 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11143 * remote-utils.c (convert_ascii_to_int, outreg)
11144 (prepare_resume_reply): Change prototype to take a regcache.
11145 Adjust.
11146 * target.h (struct target_ops) <fetch_registers, store_registers>:
11147 Change prototype to take a regcache.
11148 (fetch_inferior_registers, store_inferior_registers): Change
11149 prototype to take a regcache. Adjust.
11150 * proc-service.c (ps_lgetregs): Adjust.
11151 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11152 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11153 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11154 take a regcache. Adjust.
11155 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11156 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11157 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11158 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11159 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11160 (cris_cannot_fetch_register):
11161 (cris_breakpoint_at): Change prototype to take a regcache.
11162 Adjust.
11163 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11164 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11165 to take a regcache. Adjust.
11166 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11167 Adjust.
11168 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11169 take a regcache. Adjust.
11170 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11171 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11172 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11173 * linux-mips-low.c (mips_get_pc):
11174 (mips_set_pc): Change prototype to take a regcache. Adjust.
11175 (mips_reinsert_addr): Adjust.
11176 (mips_collect_register): Change prototype to take a regcache.
11177 Adjust.
11178 (mips_supply_register):
11179 (mips_collect_register_32bit, mips_supply_register_32bit)
11180 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11181 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11182 * linux-ppc-low.c (ppc_supply_ptrace_register)
11183 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11184 (parse_spufs_run): Adjust.
11185 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11186 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11187 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11188 take a regcache. Adjust.
11189 * linux-s390-low.c (s390_collect_ptrace_register)
11190 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11191 (s390_set_pc): Change prototype to take a regcache. Adjust.
11192 (s390_arch_setup): Adjust.
11193 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11194 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11195 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11196 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11197 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11198 regcache. Adjust.
11199 (sparc_breakpoint_at): Adjust.
11200 * linux-xtensa-low.c (xtensa_fill_gregset):
11201 (xtensa_store_gregset):
11202 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11203 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11204 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11205 prototype to take a regcache. Adjust.
11206 * win32-arm-low.c (arm_fetch_inferior_register)
11207 (arm_store_inferior_register): Change prototype to take a
11208 regcache. Adjust.
11209 * win32-i386-low.c (i386_fetch_inferior_register)
11210 (i386_store_inferior_register): Change prototype to take a
11211 regcache. Adjust.
11212 * win32-low.c (child_fetch_inferior_registers)
11213 (child_store_inferior_registers): Change prototype to take a
11214 regcache. Adjust.
11215 (win32_wait): Adjust.
11216 (win32_fetch_inferior_registers): Change prototype to take a
11217 regcache. Adjust.
11218 (win32_store_inferior_registers): Adjust.
11219 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11220 store_inferior_register>: Change prototype to take a regcache.
11221
60c3d7b0
DE
112222010-01-20 Doug Evans <dje@google.com>
11223
11224 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11225 #ifdef.
11226 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11227 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11228
dc146f7c
VP
112292010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11230
11231 * linux-low.c (linux_core_of_thread): New.
11232 (compare_ints, show_process, list_threads): New.
11233 (linux_qxfer_osdata): Report threads and cores.
11234 (linux_target_op): Register linux_core_of_thread.
11235 * remote-utils.c (prepare_resume_reply): Report the core.
11236 (buffer_xml_printf): Support %d specifier.
11237 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11238 New.
11239 (handle_query): Handle qXfer:threads. Announce availability
11240 thereof.
11241 * target.h (struct target_ops): New field core_of_thread.
11242
7803799a
UW
112432010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11244
11245 * Makefile.in (clean): Remove new generated files.
11246 (reg-s390.o, reg-s390.c): Remove rules.
11247 (reg-s390x.o, reg-s390x.c): Likewise.
11248 (s390-linux32.o, s390-linux32.c): Add rules.
11249 (s390-linux64.o, s390-linux64.c): Likewise.
11250 (s390x-linux64.o, s390x-linux64.c): Likewise.
11251 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11252 * linux-s390-low.c: Include <elf.h>.
11253 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11254 (init_registers_s390): Remove prototype.
11255 (init_registers_s390x): Likewise.
11256 (init_registers_s390_linux32): Add prototype.
11257 (init_registers_s390_linux64): Likewise.
11258 (init_registers_s390x_linux64): Likewise.
11259 (s390_num_regs_3264): New define.
11260 (s390_regmap_3264): New global variable.
11261 (s390_cannot_fetch_register): Remove obsolete check.
11262 (s390_cannot_store_register): Likewise.
11263 (s390_collect_ptrace_register): Handle upper/lower register halves.
11264 (s390_supply_ptrace_register): Likewise.
11265 (s390_fill_gregset): Update to register number changes.
11266 (s390_get_hwcap): New routine.
11267 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11268 Install appropriate regmap and register set.
11269
6e7ffa39
JB
112702010-01-01 Joel Brobecker <brobecker@adacore.com>
11271
11272 * server.c (gdbserver_version): Update copyright year to 2010.
11273 * gdbreplay.c (gdbreplay_version): Likewise.
11274
957f3f49
DE
112752009-12-28 Doug Evans <dje@google.com>
11276
11277 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11278 elf/external.h. Include <elf.h> instead but only if necessary.
11279
ca5c370d
PA
112802009-12-28 Pedro Alves <pedro@codesourcery.com>
11281
11282 * linux-low.c (linux_remove_process): Remove `detaching'
11283 parameter. Don't release/detach from thread_db here.
11284 (linux_kill): Release/detach from thread_db here, ...
11285 (linux_detach): ... and here, before actually detaching.
11286 (linux_wait_1): ... and here, when a process exits.
11287 * thread-db.c (any_thread_of): New.
11288 (thread_db_free): Switch the current inferior to a thread of the
11289 passed in process.
11290
4ee62156
DE
112912009-12-21 Doug Evans <dje@google.com>
11292
d90e6a88
DE
11293 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11294
c5f62d5f
DE
11295 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11296 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11297 warning ifndef __NR_tkill. Move setting of errno there too.
11298 Delete unnecessary resetting of errno after syscall.
11299 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11300
10e86dd7
DE
11301 * configure.ac: Check for dladdr.
11302 * config.in: Regenerate.
11303 * configure: Regenerate.
11304 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11305 (try_thread_db_load): Update.
11306
4ee62156
DE
11307 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11308
00f515da
DE
113092009-12-18 Doug Evans <dje@google.com>
11310
e9464885
DE
11311 * event-loop.c: Include unistd.h if it exists.
11312
07d4f67e
DE
11313 * linux-low.c (my_waitpid): Move definition away from being in
11314 between linux_tracefork_child/linux_test_for_tracefork.
11315
00f515da
DE
11316 * gdb_proc_service.h (psaddr_t): Fix type.
11317 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11318 signature to match glibc.
11319
1de1badb
DE
113202009-12-16 Doug Evans <dje@google.com>
11321
11322 * linux-low.c (linux_read_memory): Fix argument to read.
11323
aeeb81d1
PA
113242009-11-26 Pedro Alves <pedro@codesourcery.com>
11325
11326 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11327 events, don't leave current_inferior pointing at null.
11328
10357975
PA
113292009-11-26 Pedro Alves <pedro@codesourcery.com>
11330
11331 * win32-low.c (LOG): Delete.
11332 (OUTMSG): Output to stderr.
11333 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11334 on compile time LOG macro.
11335 (win32_wait): Fix debug output.
11336
cf6e3471
PA
113372009-11-26 Pedro Alves <pedro@codesourcery.com>
11338
11339 * win32-low.c (win32_add_one_solib): If the dll name is
11340 "ntdll.dll", prepend the system directory to the dll path.
11341
0c85e18e
MK
113422009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11343
11344 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11345
9ac544ce 113462009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11347 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11348
11349 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11350 * configure.ac: Check for __mcoldfire__ and set
11351 gdb_cv_m68k_is_coldfire.
11352 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11353 reg-cf.o and reg-m68k.o.
11354 * configure: Regenerated.
11355
fd7dd3e6
PA
113562009-11-16 Pedro Alves <pedro@codesourcery.com>
11357
11358 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11359 Pass it to thread_db_free.
11360 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11361 proper `detaching' argument to linux_remove_process.
11362 * linux-low.h (thread_db_free): Add `detaching' parameter.
11363 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11364 to thread_db_free.
11365 (thread_db_free): Add `detaching' parameter. Only
11366 call td_ta_clear_event if detaching from process.
11367
75aa492e
MK
113682009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11369
11370 * thread-db.c (thread_db_free): Fix typo.
11371
21e1bee4
PP
113722009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11373
11374 PR gdb/10838
11375 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11376
8838b45e
NS
113772009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11378
11379 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11380 with an i686 compiler.
11381 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11382 needed.
11383 * configure: Rebuilt.
11384
8a35fb51
SL
113852009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11386
11387 PR gdb/10783
11388
11389 * server.c (handle_search_memory_1): Correct read_addr initialization
11390 in loop for searching subsequent chunks.
11391
96f15937
PP
113922009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11393
11394 * configure.ac: New --with-libthread-db option.
11395 * thread-db.c: Allow direct dependence on libthread_db.
11396 (thread_db_free): Adjust.
11397 * config.in: Regenerate.
11398 * configure: Likewise.
889bf7c5 11399
5f7d1694
PP
114002009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11401
11402 PR gdb/10757
11403 * thread-db.c (attach_thread): New function.
11404 (maybe_attach_thread): Return success/failure.
11405 (find_new_threads_callback): Adjust.
889bf7c5
PA
11406 (thread_db_find_new_threads): Loop until no new threads.
11407
88e3b899
PA
114082009-10-13 Pedro Alves <pedro@codesourcery.com>
11409
11410 * proc-service.c (ps_lgetregs): Formatting.
11411
cdbfd419
PP
114122009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11413
11414 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11415 * configure.ac: Adjust.
11416 * linux-low.h (struct process_info_private): Move members to struct
11417 thread_db.
11418 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11419 * linux-low.c (linux_remove_process): Adjust.
11420 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11421 * server.c (handle_query): Move code ...
11422 (handle_monitor_command): ... here. New function.
11423 * target.h (struct target_ops): New member.
11424 * thread-db.c (struct thread_db): New.
11425 (libthread_db_search_path): New variable.
11426 (thread_db_create_event, thread_db_enable_reporting)
11427 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11428 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11429 (try_thread_db_load_1, dladdr_to_soname): New functions.
11430 (try_thread_db_load, thread_db_load_search): New functions.
11431 (thread_db_init): Search for libthread_db.
11432 (thread_db_free): New function.
11433 (thread_db_handle_monitor_command): Likewise.
11434 * config.in: Regenerate.
11435 * configure: Regenerate.
889bf7c5 11436
4168d2d6
UW
114372009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11438
11439 * spu-low.c (spu_kill): Wait for inferior to terminate.
11440 Call clear_inferiors.
11441 (spu_detach): Call clear_inferiors.
11442
81ecdfbb
RW
114432009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11444
11445 * aclocal.m4: Regenerate.
11446 * config.in: Likewise.
11447 * configure: Likewise.
11448
0b9ff2c0
UW
114492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11450
11451 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11452 (parse_spufs_run): New function.
11453 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11454 (ppc_breakpoint_at): Handle SPU breakpoints.
11455
efcbbd14
UW
114562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11457
11458 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11459 (SPUFS_MAGIC): Define.
11460 (spu_enumerate_spu_ids): New function.
11461 (linux_qxfer_spu): New function.
11462 (linux_target_ops): Install linux_qxfer_spu.
11463
f4d9bade
UW
114642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11465
11466 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11467 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11468 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11469 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11470 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11471 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11472 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11473 (init_registers_powerpc_cell32l): Add prototype.
11474 (init_registers_powerpc_cell64l): Likewise.
11475 (ppc_arch_setup): Detect Cell/B.E. architecture.
11476
96e946ca
RW
114772009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11478
11479 * Makefile.in (datarootdir): New variable.
11480
58d6951d
DJ
114812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11482
11483 * linux-low.c (linux_write_memory): Update debugging output.
11484 * Makefile.in (clean): Add new descriptions.
11485 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11486 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11487 * configure.srv: Add new files for arm*-*-linux*.
11488 * linux-arm-low.c: Add new declarations.
11489 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11490 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11491 (HWCAP_VFPv3D16): New.
11492 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11493 instead of __IWMMXT__.
11494 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11495 (arm_arch_setup): New.
11496 (target_regsets): Remove #ifdef. Add VFP regset.
11497 (the_low_target): Use arm_arch_setup.
11498
12b42a12
DJ
114992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11500
11501 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11502 the main thread again.
11503
ac8c974e
AR
115042009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11505
11506 Adding Neutrino gdbserver.
11507 * configure: Regenerated.
11508 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11509 * configure.srv (i[34567]86-*-nto*): New target.
11510 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11511 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11512 (nto_comctrl) [__QNX__]: New function.
11513 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11514
4424e0c3 115152009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11516
11517 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11518 srv_tgtobj.
11519
912cf4ba
PA
115202009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11521 Pedro Alves <pedro@codesourcery.com>
11522
11523 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11524 don't support CONTEXT_EXTENDED_REGISTERS.
11525 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11526 (the_low_target): Install them.
11527 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11528 failing with ERROR_PIPE_NOT_CONNECTED.
11529
aa5ca48f
DE
115302009-06-30 Doug Evans <dje@google.com>
11531 Pierre Muller <muller@ics.u-strasbg.fr>
11532
11533 Add h/w watchpoint support to x86-linux, win32-i386.
11534 * Makefile.in (SFILES): Add i386-low.c
11535 (i386_low_h): Define.
11536 (i386-low.o): Add dependencies.
11537 (linux-x86-low.o): Add i386-low.h dependency.
11538 (win32-i386-low.o): Ditto.
11539 * i386-low.c: New file.
11540 * i386-low.h: New file.
11541 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11542 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11543 * linux-low.c (linux_add_process): Initialize arch_private.
11544 (linux_remove_process): Free arch_private.
11545 (add_lwp): Initialize arch_private.
11546 (delete_lwp): Free arch_private.
11547 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11548 provided.
11549 * linux-low.h (process_info_private): New member arch_private.
11550 (lwp_info): New member arch_private.
11551 (linux_target_ops): New members new_process, new_thread,
11552 prepare_to_resume.
11553 (ptid_of): New macro.
11554 * linux-x86-low.c: Include stddef.h, i386-low.h.
11555 (arch_process_info): New struct.
11556 (arch_lwp_info): New struct.
11557 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11558 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11559 (i386_dr_low_get_status): New function.
11560 (x86_insert_point, x86_remove_point): New functions.
11561 (x86_stopped_by_watchpoint): New function.
11562 (x86_stopped_data_address): New function.
11563 (x86_linux_new_process, x86_linux_new_thread): New functions.
11564 (x86_linux_prepare_to_resume): New function.
11565 (the_low_target): Add entries for insert_point, remove_point,
11566 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11567 prepare_to_resume.
11568 * server.c (debug_hw_points): New global.
11569 (monitor_show_help): Document set debug-hw-points.
11570 (handle_query): Process "set debug-hw-points".
11571 * server.h (debug_hw_points): Declare.
11572 (paddress): Declare.
11573 * utils.c (NUMCELLS, CELLSIZE): New macros.
11574 (get_sell, xsnprintf, paddress): New functions.
11575 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11576 remove_point, stopped_by_watchpoint, stopped_data_address.
11577 * win32-i386-low.c: Include i386-low.h.
11578 (debug_reg_state): Replaces dr.
11579 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11580 (i386_dr_low_get_status): New function.
11581 (i386_insert_point, i386_remove_point): New functions.
11582 (i386_stopped_by_watchpoint): New function.
11583 (i386_stopped_data_address): New function.
11584 (i386_initial_stuff): Update.
11585 (get_thread_context,set_thread_context,i386_thread_added): Update.
11586 (the_low_target): Add entries for insert_point,
11587 remove_point, stopped_by_watchpoint, stopped_data_address.
11588 * win32-low.c (win32_insert_watchpoint): New function.
11589 (win32_remove_watchpoint): New function.
11590 (win32_stopped_by_watchpoint): New function.
11591 (win32_stopped_data_address): New function.
11592 (win32_target_ops): Add entries for insert_watchpoint,
11593 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11594 * win32-low.h (win32_target_ops): New members insert_point,
11595 remove_point, stopped_by_watchpoint, stopped_data_address.
11596
d993e290
PA
115972009-06-25 Pedro Alves <pedro@codesourcery.com>
11598
11599 * server.c (process_serial_event): Re-return unsupported, not
11600 error, if the type isn't recognized. Re-allow supporting only
11601 insert or remove packets. Also call require_running for
11602 breakpoints. Add missing break statement to default case. Tidy.
11603 * target.h (struct target_ops): Rename insert_watchpoint to
11604 insert_point, and remove_watchpoint to remove_point.
11605
11606 * linux-low.h (struct linux_target_ops): Likewise.
11607 * linux-low.c (linux_insert_watchpoint): Rename to ...
11608 (linux_insert_point): ... this. Adjust.
11609 (linux_remove_watchpoint): Rename to ...
11610 (linux_remove_point): ... this. Adjust.
11611 (linux_target_ops): Adjust.
11612 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11613 (cris_insert_point): ... this.
11614 (cris_remove_watchpoint): Rename to ...
11615 (cris_remove_point): ... this.
11616 (the_low_target): Adjust.
11617
0f54c268
PM
116182009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11619
11620 * server.c (handle_v_kill): Pass signal_pid to
11621 kill_inferior if multi_process is zero.
11622
c6314022
AR
116232009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11624
11625 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11626 * target.h (target_ops): Comment for *_watchpoint to make it clear
11627 the functions can get types '0' and '1'.
11628
4463ce24
AR
116292009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11630
11631 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11632 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11633 * regcache.c (get_regcache): Likewise.
11634 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11635 * win32-low.c (child_fetch_inferior_registers): Remove check for
11636 regno 0.
11637
cf8fd78b
PA
116382009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11639 Pedro Alves <pedro@codesourcery.com>
11640
11641 * target.h (struct target_ops) <supports_multi_process>: New
11642 callback.
11643 (target_supports_multi_process): New.
11644 * server.c (handle_query): Even if GDB reports support, only
11645 enable multi-process if the target also supports it. Report
11646 multi-process support only if the target backend supports it.
11647 * linux-low.c (linux_supports_multi_process): New function.
11648 (linux_target_ops): Install it as target_supports_multi_process
11649 callback.
11650
47c0c975
DE
116512009-05-24 Doug Evans <dje@google.com>
11652
e09875d4
DE
11653 Global renaming of find_thread_pid to find_thread_ptid.
11654 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11655 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11656 All callers updated.
11657
e27d73f6
DE
11658 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11659 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11660 directly.
11661
47c0c975
DE
11662 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11663 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11664 (linux_resume_one_lwp): Ditto.
11665
2acc282a
DE
116662009-05-23 Doug Evans <dje@google.com>
11667
11668 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11669 from struct inferior_list_entry * to struct lwp_info *.
11670 All callers updated.
11671
9f1036c1
DE
116722009-05-13 Doug Evans <dje@google.com>
11673
11674 * linux-x86-low.c: Don't include assert.h.
11675 (x86_siginfo_fixup): Use fatal, not assert.
11676 (x86_arch_setup): Fix comment.
11677
d0722149
DE
116782009-05-12 Doug Evans <dje@google.com>
11679
11680 Biarch support for i386/amd64 gdbserver.
11681 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11682 Add linux-x86-low.c.
11683 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11684 (linux-x86-low.o): Add.
11685 * linux-x86-64-low.c: Delete.
11686 * linux-i386-low.c: Delete.
11687 * linux-x86-low.c: New file.
11688 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11689 linux-x86-low.o.
11690 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11691 linux-x86-low.o.
11692 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11693 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11694 (linux_child_pid_to_exec_file): New function.
11695 (elf_64_header_p, elf_64_file_p): New functions.
11696 (siginfo_fixup): New function.
11697 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11698 give target a chance to convert layout.
11699 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11700 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11701
fdeb2a12
DE
117022009-05-07 Doug Evans <dje@google.com>
11703
11704 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11705 (regsets_store_inferior_registers): Ditto.
11706
a6dbe5df
PA
117072009-05-06 Pedro Alves <pedro@codesourcery.com>
11708
11709 PR server/10048
11710
11711 * linux-low.c (must_set_ptrace_flags): Delete.
11712 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11713 of the global.
11714 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11715 `lwp->must_set_ptrace_flags' instead.
ba42693b 11716 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11717 (linux_wait_1): ... not here.
11718
5091eb23
DE
117192009-04-30 Doug Evans <dje@google.com>
11720
9f767825
DE
11721 * inferiors.c (started_inferior_callback): New function.
11722 (attached_inferior_callback): New function.
11723 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11724 * server.c (print_started_pid, print_attached_pid): New functions.
11725 (detach_or_kill_for_exit): New function.
11726 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11727 * server.h (have_started_inferiors_p): Declare.
11728 (have_attached_inferiors_p): Declare.
11729
5091eb23
DE
11730 * inferiors.c (remove_process): Fix memory leak, free process.
11731 * linux-low.c (linux_remove_process): New function.
11732 (linux_kill): Call it instead of remove_process.
11733 (linux_detach, linux_wait_1): Ditto.
11734
155c8968
PA
117352009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11736
11737 * configure.srv: Add x86 Windows CE target.
11738
7fe519cb
UW
117392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11740
11741 * inferiors.c (get_thread_process): Make global.
11742 * server.h (get_thread_process): Add prototype.
11743 * thread-db.c (find_one_thread): Use get_thread_process
11744 instead of current_process.
11745 (thread_db_get_tls_address): Do not crash if called when
11746 thread layer is not yet initialized.
11747
5472f405
UW
117482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11749
11750 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11751 * spu-low.c (current_tid): Rename to ...
11752 (current_ptid): ... this.
11753 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11754 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11755 ptid_get_lwp (current_ptid) instead of current_tid.
11756 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11757 instead of current_tid. Use find_process_pid to verify pid
11758 argument is valid. Pass proper argument to remove_process.
11759 (spu_thread_alive): Compare current_ptid instead of current_tid.
11760 (spu_resume): Likewise.
11761
55ac2b99
PA
117622009-04-02 Pedro Alves <pedro@codesourcery.com>
11763
11764 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11765 variable.
11766
95954743
PA
117672009-04-01 Pedro Alves <pedro@codesourcery.com>
11768
11769 Implement the multiprocess extensions, and add linux multiprocess
11770 support.
11771
11772 * server.h (ULONGEST): Declare.
11773 (struct ptid, ptid_t): New.
11774 (minus_one_ptid, null_ptid): Declare.
11775 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11776 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11777 (struct inferior_list_entry): Change `id' type from unsigned from
11778 to ptid_t.
11779 (struct sym_cache, struct breakpoint, struct
11780 process_info_private): Forward declare.
11781 (struct process_info): Declare.
11782 (current_process): Declare.
11783 (all_processes): Declare.
11784 (initialize_inferiors): Declare.
11785 (add_thread): Adjust to use ptid_t.
11786 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11787 (add_process, remove_process, find_thread_pid): Declare.
11788 (find_inferior_id): Adjust to use ptid_t.
11789 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11790 (multi_process): Declare.
11791 (push_event): Adjust to use ptid_t.
11792 (read_ptid, write_ptid): Declare.
11793 (prepare_resume_reply): Adjust to use ptid_t.
11794 (clear_symbol_cache): Declare.
11795 * inferiors.c (all_processes): New.
11796 (null_ptid, minus_one_ptid): New.
11797 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11798 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11799 (add_thread): Change unsigned long to ptid. Remove gdb_id
11800 parameter. Adjust.
11801 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11802 (gdb_id_to_thread): Rename to ...
11803 (find_thread_pid): ... this. Change unsigned long to ptid.
11804 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11805 (loaded_dll, pull_pid_from_list): Adjust.
11806 (add_process, remove_process, find_process_pid)
11807 (get_thread_process, current_process, initialize_inferiors): New.
11808 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11809 (struct target_waitstatus) <related_pid>: Ditto.
11810 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11811 return type to int.
11812 (struct target_ops) <join>: Add `pid' argument.
11813 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11814 (struct target_ops) <wait>: Add `ptid' field. Change return type
11815 to ptid.
11816 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11817 (mywait): Add `ptid' argument. Change return type to ptid_t.
11818 (target_pid_to_str): Declare.
11819 * target.c (set_desired_inferior): Adjust to use ptids.
11820 (mywait): Add new `ptid' argument. Adjust.
11821 (target_pid_to_str): New.
11822 * mem-break.h (free_all_breakpoints): Declare.
11823 * mem-break.c (breakpoints): Delelete.
11824 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11825 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11826 to use per-process breakpoint list.
11827 (free_all_breakpoints): New.
11828 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11829 (symbol_cache, all_symbols_looked_up): Delete.
11830 (hexchars): New.
11831 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11832 read_ptid): New.
11833 (prepare_resume_reply): Change ptid argument's type from unsigned
11834 long to ptid_t. Adjust. Implement W;process and X;process.
11835 (free_sym_cache, clear_symbol_cache): New.
11836 (look_up_one_symbol): Adjust to per-process symbol cache. *
11837 * server.c (cont_thread, general_thread, step_thread): Change type
11838 to ptid_t.
11839 (attached): Delete.
11840 (multi_process): New.
11841 (last_ptid): Change type to ptid_t.
11842 (struct vstop_notif) <ptid>: Change type to ptid_t.
11843 (queue_stop_reply, push_event): Change `ptid' argument's type to
11844 ptid_t.
11845 (discard_queued_stop_replies): Add `pid' argument.
11846 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11847 changes. Don't reference the `attached' global.
11848 (attach_inferior): Adjust to mywait interface changes.
11849 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11850 features. Handle and report "multiprocess+". Handle
11851 "qAttached:PID".
11852 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11853 changes.
11854 (handle_v_kill): New.
11855 (handle_v_stopped): Adjust to use target_pid_to_str.
11856 (handle_v_requests): Allow multiple attaches and runs when
11857 multiprocess extensions are in effect. Handle "vKill".
11858 (myresume): Adjust to use ptids.
11859 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11860 (handle_status): Adjust to discard_queued_stop_replies interface
11861 change.
11862 (first_thread_of, kill_inferior_callback)
11863 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11864 (main): Call initialize_inferiors. Adjust to use ptids, killing
11865 and detaching from all inferiors. Handle multiprocess packet
11866 variants.
11867 * linux-low.h: Include gdb_proc_service.h.
11868 (struct process_info_private): New.
11869 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11870 <lwpid_of>: Use ptid_get_lwp.
11871 (get_lwp_thread): Adjust.
11872 (struct lwp_info): Add `dead' member.
11873 (find_lwp_pid): Declare.
11874 * linux-low.c (thread_db_active): Delete.
11875 (new_inferior): Adjust comment.
11876 (inferior_pid): Delete.
11877 (linux_add_process): New.
11878 (handle_extended_wait): Adjust.
11879 (add_lwp): Change unsigned long to ptid.
11880 (linux_create_inferior): Add process to processes table. Adjust
11881 to use ptids. Don't set new_inferior here.
11882 (linux_attach_lwp): Rename to ...
11883 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11884 it. Adjust to use ptids.
11885 (linux_attach_lwp): New.
11886 (linux_attach): Add process to processes table. Don't set
11887 new_inferior here.
11888 (struct counter): New.
11889 (second_thread_of_pid_p, last_thread_of_process_p): New.
11890 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11891 multiple processes.
11892 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11893 processes. Remove process from process table.
11894 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11895 to multiple processes.
11896 (any_thread_of): New.
11897 (linux_detach): Add `pid' argument, and handle it. Remove process
11898 from processes table.
11899 (linux_join): Add `pid' argument. Handle it.
11900 (linux_thread_alive): Change unsighed long argument to ptid_t.
11901 Consider dead lwps as not being alive.
11902 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11903 threads we're not interested in.
11904 (same_lwp, find_lwp_pid): New.
11905 (linux_wait_for_lwp): Change `pid' argument's type from int to
11906 ptid_t. Adjust.
11907 (linux_wait_for_event): Rename to ...
11908 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11909 from int to ptid_t. Adjust.
11910 (linux_wait_for_event): New.
11911 (linux_wait_1): Add `ptid' argument. Change return type to
11912 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11913 that exit from the process table.
11914 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11915 Adjust.
11916 (mark_lwp_dead): New.
11917 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11918 stopping all threads, mark its main lwp as dead.
11919 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11920 ptids.
11921 (fetch_register, usr_store_inferior_registers)
11922 (regsets_fetch_inferior_registers)
11923 (regsets_store_inferior_registers, linux_read_memory)
11924 (linux_write_memory): Inline `inferior_pid'.
11925 (linux_look_up_symbols): Adjust to use per-process
11926 `thread_db_active'.
11927 (linux_request_interrupt): Adjust to use ptids.
11928 (linux_read_auxv): Inline `inferior_pid'.
11929 (initialize_low): Don't reference thread_db_active.
11930 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11931 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11932 (ps_getpid): Return the pid of the current inferior.
11933 * thread-db.c (proc_handle, thread_agent): Delete.
11934 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11935 per-process data.
11936 (find_one_thread): Change argument type to ptid_t. Adjust to
11937 per-process data.
11938 (maybe_attach_thread): Adjust to per-process data and ptids.
11939 (thread_db_find_new_threads): Ditto.
11940 (thread_db_init): Ditto.
11941 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11942 processes table. Adjust to use ptids.
11943 (spu_kill, spu_detach): Adjust interface. Remove process from
11944 processes table.
11945 (spu_join, spu_thread_alive): Adjust interface.
11946 (spu_wait): Adjust interface. Remove process from processes
11947 table. Adjust to use ptids.
11948 * win32-low.c (current_inferior_tid): Delete.
11949 (current_inferior_ptid): New.
11950 (debug_event_ptid): New.
11951 (thread_rec): Take a ptid. Adjust.
11952 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11953 (child_delete_thread): Ditto.
11954 (do_initial_child_stuff): Add `attached' argument. Add process to
11955 processes table.
11956 (child_fetch_inferior_registers, child_store_inferior_registers):
11957 Adjust.
11958 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11959 (win32_attach): Pass 1 to do_initial_child_stuff.
11960 (win32_kill): Adjust interface. Remove process from processes
11961 table.
11962 (win32_detach): Ditto.
11963 (win32_join): Adjust interface.
11964 (win32_thread_alive): Take a ptid.
11965 (win32_resume): Adjust to use ptids.
11966 (get_child_debug_event): Ditto.
11967 (win32_wait): Adjust interface. Remove exiting process from
11968 processes table.
11969
bd99dc85
PA
119702009-04-01 Pedro Alves <pedro@codesourcery.com>
11971
11972 Non-stop mode support.
11973
11974 * server.h (non_stop): Declare.
11975 (gdb_client_data, handler_func): Declare.
11976 (delete_file_handler, add_file_handler, start_event_loop):
11977 Declare.
11978 (handle_serial_event, handle_target_event, push_event)
11979 (putpkt_notif): Declare.
11980 * target.h (enum resume_kind): New.
11981 (struct thread_resume): Replace `step' field by `kind' field.
11982 (TARGET_WNOHANG): Define.
11983 (struct target_ops) <wait>: Add `options' argument.
11984 <supports_non_stop, async, start_non_stop>: New fields.
11985 (target_supports_non_stop, target_async): New.
11986 (start_non_stop): Declare.
11987 (mywait): Add `options' argument.
11988 * target.c (mywait): Add `options' argument. Print child exit
11989 notifications here.
11990 (start_non_stop): New.
11991 * server.c (non_stop, own_buf, mem_buf): New globals.
11992 (struct vstop_notif): New.
11993 (notif_queue): New global.
11994 (queue_stop_reply, push_event, discard_queued_stop_replies)
11995 (send_next_stop_reply): New.
11996 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11997 interface changes.
11998 (attach_inferior): In non-stop mode, don't wait for the target
11999 here.
12000 (handle_general_set): Handle QNonStop.
12001 (handle_query): When handling qC, return the current general
12002 thread, instead of the first thread of the list.
12003 (handle_query): If the backend supports non-stop mode, include
12004 QNonStop+ in the qSupported query response.
12005 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12006 and non-stop mode.
12007 (handle_v_attach, handle_v_run): Handle non-stop mode.
12008 (handle_v_stopped): New.
12009 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12010 (myresume): Adjust to use resume_kind. Handle non-stop.
12011 (queue_stop_reply_callback): New.
12012 (handle_status): Handle non-stop mode.
12013 (main): Clear non_stop flag on reconnection. Use the event-loop.
12014 Refactor serial protocol handling from here ...
12015 (process_serial_event): ... to this new function. When GDB
12016 selects any thread, select one here. In non-stop mode, wait until
12017 GDB acks all pending events before exiting.
12018 (handle_serial_event, handle_target_event): New.
12019 * remote-utils.c (remote_open): Install remote_desc in the event
12020 loop.
12021 (remote_close): Remove remote_desc from the event loop.
12022 (putpkt_binary): Rename to...
12023 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12024 (putpkt_binary): New as wrapper around putpkt_binary_1.
12025 (putpkt_notif): New.
12026 (prepare_resume_reply): In non-stop mode, don't change the
12027 general_thread.
12028 * event-loop.c: New.
12029 * Makefile.in (OBJ): Add event-loop.o.
12030 (event-loop.o): New rule.
12031
12032 * linux-low.h (pid_of): Moved here.
12033 (lwpid_of): New.
12034 (get_lwp_thread): Use lwpid_of.
12035 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12036 * linux-low.c (pid_of): Delete.
12037 (inferior_pid): Use lwpid_of.
12038 (linux_event_pipe): New.
12039 (target_is_async_p): New.
12040 (delete_lwp): New.
12041 (handle_extended_wait): Use lwpid_of.
12042 (add_lwp): Don't set lwpid field.
12043 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12044 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12045 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12046 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12047 first. Adjust to linux_wait_for_event interface changes. Use
12048 lwpid_of.
12049 (linux_detach): Don't delete the main lwp here.
12050 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12051 (status_pending_p): Don't consider explicitly suspended lwps.
12052 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12053 pointer. Add OPTIONS argument. Change return type to int. Use
12054 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12055 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12056 pointer. Add status pointer argument. Return a pid instead of a
12057 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12058 changes. In non-stop mode, don't switch to a random thread.
12059 (linux_wait): Rename to...
12060 (linux_wait_1): ... this. Add target_options argument, and handle
12061 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12062 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12063 clean exit and signal exit code. Don't stop all threads in
12064 non-stop mode. In all-stop mode, only stop all threads when
12065 reporting a stop to GDB. Handle explicit thread stop requests.
12066 (async_file_flush, async_file_mark): New.
12067 (linux_wait): New.
12068 (send_sigstop): Use lwpid_of.
12069 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12070 interface changes. In non-stop mode, don't switch to a random
12071 thread.
12072 (linux_resume_one_lwp): Use lwpid_of.
12073 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12074 (linux_resume_one_thread): ... this. Handle resume_stop. In
12075 non-stop mode, don't look for pending flag in all threads.
12076 (resume_status_pending_p): Don't consider explicitly suspended
12077 threads.
12078 (my_waitpid): Reimplement. Emulate __WALL.
12079 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12080 Use lwpid_of.
12081 (sigchld_handler, linux_supports_non_stop, linux_async)
12082 (linux_start_non_stop): New.
12083 (linux_target_ops): Register linux_supports_non_stop, linux_async
12084 and linux_start_non_stop.
12085 (initialize_low): Install SIGCHLD handler.
12086 * thread-db.c (thread_db_create_event, find_one_thread)
12087 (thread_db_get_tls_address): Use lwpid_of.
12088 * win32-low.c (win32_detach): Adjust to use resume_kind.
12089 (win32_wait): Add `options' argument.
12090 * spu-low.c (spu_resume): Adjust to use resume_kind.
12091 (spu_wait): Add `options' argument.
12092
5b1c542e
PA
120932009-04-01 Pedro Alves <pedro@codesourcery.com>
12094
12095 Decouple target code from remote protocol.
12096
12097 * target.h (enum target_waitkind): New.
12098 (struct target_waitstatus): New.
12099 (struct target_ops) <wait>: Return an unsigned long. Take a
12100 target_waitstatus pointer instead of a char pointer.
12101 (mywait): Likewise.
12102 * target.c (mywait): Change prototype to return an unsigned long.
12103 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12104 * server.h (thread_from_wait, old_thread_from_wait): Delete
12105 declarations.
12106 (prepare_resume_reply): Change prototype to take a
12107 target_waitstatus.
12108 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12109 (last_status, last_ptid): New.
12110 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12111 pid instead of a signal.
12112 (attach_inferior): Remove "status" and "signal" parameters.
12113 Adjust.
12114 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12115 not as an address.
12116 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12117 (handle_v_requests, myresume): Remove "status" and "signal"
12118 parameters. Adjust.
12119 (handle_status): New.
12120 (main): Delete local `status'. Adjust.
12121 * remote-utils.c: Include target.h.
12122 (prepare_resume_reply): Change prototype to take a
12123 target_waitstatus. Adjust.
12124
12125 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12126 interface.
12127 * spu-low.c (spu_wait): Adjust.
12128 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12129 Delete.
12130 (win32_wait): Adjust.
12131
2bd7c093
PA
121322009-04-01 Pedro Alves <pedro@codesourcery.com>
12133
12134 * target.h (struct thread_resume): Delete leave_stopped member.
12135 (struct target_ops): Add a `n' argument to the `resume' callback.
12136 * server.c (start_inferior): Adjust.
12137 (handle_v_cont, myresume): Adjust.
12138 * linux-low.c (check_removed_breakpoint): Adjust to resume
12139 interface change, and to removed leave_stopped field.
12140 (resume_ptr): Delete.
12141 (struct thread_resume_array): New.
12142 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12143 resume interface change.
12144 (linux_continue_one_thread, linux_queue_one_thread)
12145 (resume_status_pending_p): Check if the resume field is NULL
12146 instead of checking the leave_stopped member.
12147 (linux_resume): Adjust to the target resume interface change.
12148 * spu-low.c (spu_resume): Adjust to the target resume interface
12149 change.
12150 * win32-low.c (win32_detach, win32_resume): Ditto.
12151
c35fafde
PA
121522009-04-01 Pedro Alves <pedro@codesourcery.com>
12153
12154 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12155 flag.
12156 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12157 pending.
12158 (linux_continue_one_thread): Only preserve the stepping flag if
12159 there's a pending breakpoint.
12160
0a59d50b
PA
121612009-03-31 Pedro Alves <pedro@codesourcery.com>
12162
12163 * server.c (main): After the inferior having exited, call
12164 remote_close before exiting gdbserver.
12165
f04c6d38
TJB
121662009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12167
12168 Fix size of FPSCR in Power 7 processors.
12169 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12170 (PPC_FEATURE_HAS_DFP): New #define.
12171 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12172 size of the FPSCR.
12173
78e5cee6
PA
121742009-03-23 Pedro Alves <pedro@codesourcery.com>
12175
12176 * server.c (handle_query) Whitespace and formatting.
12177
1b3f6016
PA
121782009-03-22 Pedro Alves <pedro@codesourcery.com>
12179
12180 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12181 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12182 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12183 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12184 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12185 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12186 Makefile.in, configure.ac: Fix whitespace throughout.
12187 * configure: Regenerate.
12188
a07b2135
PA
121892009-03-22 Pedro Alves <pedro@codesourcery.com>
12190
12191 * inferiors.c (find_inferior): Make it safe for the callback
12192 function to delete the currently iterated inferior.
12193
67cc2626
PA
121942009-03-22 Pedro Alves <pedro@codesourcery.com>
12195
12196 * Makefile.in (linuw_low_h): Move higher.
12197 (thread-db.o): Depend on $(linux_low_h).
12198
54a0b537
PA
121992009-03-17 Pedro Alves <pedro@codesourcery.com>
12200
12201 Rename "process" to "lwp" throughout.
12202
12203 * linux-low.c (all_processes): Rename to...
12204 (all_lwps): ... this.
12205 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12206 (add_process): Rename to ...
12207 (add_lwp): ... this. Adjust.
12208 (linux_create_inferior): Adjust.
12209 (linux_attach_lwp): Adjust.
12210 (linux_attach): Adjust.
12211 (linux_kill_one_process): Rename to ...
12212 (linux_kill_one_lwp): ... this. Adjust.
12213 (linux_kill): Adjust.
12214 (linux_detach_one_process): Rename to ...
12215 (linux_detach_one_lwp): ... this. Adjust.
12216 (linux_detach): Adjust.
12217 (check_removed_breakpoint): Adjust.
12218 (status_pending_p): Adjust.
12219 (linux_wait_for_process): Rename to ...
12220 (linux_wait_for_lwp): ... this. Adjust.
12221 (linux_wait_for_event): Adjust.
12222 (send_sigstop): Adjust.
12223 (wait_for_sigstop): Adjust.
12224 (stop_all_processes): Rename to ...
12225 (stop_all_lwps): ... this.
12226 (linux_resume_one_process): Rename to ...
12227 (linux_resume_one_lwp): ... this. Adjust.
12228 (linux_set_resume_request, linux_continue_one_thread)
12229 (linux_queue_one_thread, resume_status_pending_p)
12230 (usr_store_inferior_registers, regsets_store_inferior_registers)
12231 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12232 Adjust.
12233 * linux-low.h (get_process): Rename to ...
12234 (get_lwp): ... this. Adjust.
12235 (get_thread_process): Rename to ...
12236 (get_thread_lwp): ... this. Adjust.
12237 (get_process_thread): Rename to ...
12238 (get_lwp_thread): ... this. Adjust.
12239 (struct process_info): Rename to ...
12240 (struct lwp_info): ... this.
12241 (all_processes): Rename to ...
12242 (all_lwps): ... this.
12243 * proc-service.c (ps_lgetregs): Adjust.
12244 * thread-db.c (thread_db_create_event, find_one_thread)
12245 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12246
0b16c5cf
PA
122472009-03-14 Pedro Alves <pedro@codesourcery.com>
12248
12249 * server.c (handle_query): Handle "qAttached".
12250
32de4b9d
NS
122512009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12252
12253 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12254 GPLv3, update license URL.
12255
2aecd87f
DE
122562009-03-01 Doug Evans <dje@google.com>
12257
93efd302 12258 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12259 (server_h): Add gdb_signals.h.
12260 (signals.o): Update.
12261 * server.h (target_signal_from_host,target_signal_to_host_p)
12262 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12263
86b1f9c5
PM
122642009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12265
12266 * remote-utils.c (getpkt): Also generate remote-debug
12267 information if noack_mode is set.
12268
4aa995e1
PA
122692009-02-06 Pedro Alves <pedro@codesourcery.com>
12270
12271 * server.c (handle_query): Report qXfer:siginfo:read and
12272 qXfer:siginfo:write as supported and handle them.
12273 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12274 * linux-low.c (linux_xfer_siginfo): New.
12275 (linux_target_ops): Set it.
12276
62709adf
PA
122772009-01-26 Pedro Alves <pedro@codesourcery.com>
12278
12279 * server.c (gdbserver_usage): Mention --remote-debug.
12280 (main): Accept '--remote-debug' switch.
12281
aef93bd7
DE
122822009-01-18 Doug Evans <dje@google.com>
12283
12284 * regcache.c (new_register_cache): No need to check result of xcalloc.
12285 * server.c (handle_search_memory): Back out calls to xmalloc,
12286 result is checked and error is returned to user upon failure.
12287 (handle_query): Ditto. Add more checks for result of malloc.
12288 (handle_v_cont): Check result of malloc, report error back to
12289 user upon failure.
12290 (handle_v_run): Ditto. Call freeargv.
12291 * server.h (freeargv): Declare.
12292 * utils.c (freeargv): New fn.
12293
54363045
DE
122942009-01-15 Doug Evans <dje@google.com>
12295
f626972c
DE
12296 * gdbreplay.c (perror_with_name): Make arg const char *.
12297 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12298 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12299 * utils.c (perror_with_name): Make arg const char *.
54363045 12300
18aae699
PA
123012009-01-14 Pedro Alves <pedro@codesourcery.com>
12302
12303 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12304 when handling a EXIT_PROCESS_DEBUG_EVENT.
12305
ff703abe
JB
123062009-01-06 Joel Brobecker <brobecker@adacore.com>
12307
12308 * gdbreplay.c (gdbreplay_version): Update copyright year.
12309 * server.c (gdbserver_version): Likewise.
12310
f21cc1a2 123112009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12312
12313 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12314 (handle_extended_wait): Improve comment.
0e21c1ec 12315
bca929d3
DE
123162008-12-13 Doug Evans <dje@google.com>
12317
12318 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12319 * server.h (ATTR_MALLOC): New macro.
12320 (xmalloc,xcalloc,xstrdup): Declare.
12321 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12322 * inferiors.c: Ditto.
12323 * linux-low.c: Ditto.
12324 * mem-break.c: Ditto.
12325 * regcache.c: Ditto.
12326 * remote-utils.c: Ditto.
12327 * server.c: Ditto.
12328 * target.c: Ditto.
12329 * win32-low.c: Ditto.
12330
97438e3f
DE
123312008-12-12 Doug Evans <dje@google.com>
12332
896c7fbb
DE
12333 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12334 in debugging printf.
12335
97438e3f
DE
12336 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12337
e3b886f8
DE
123382008-12-09 Doug Evans <dje@google.com>
12339
12340 * linux-low.h (struct process_info): Delete member tid, unused.
12341 * thread-db.c (find_one_thread): Update.
12342 (maybe_attach_thread): Update.
12343
07e059b5
VP
123442008-12-02 Pedro Alves <pedro@codesourcery.com>
12345
889bf7c5
PA
12346 * target.h (struct target_ops): Add qxfer_osdata member.
12347 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12348 and dirent.h.
12349 (linux_qxfer_osdata): New functions.
12350 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12351 callback.
12352 * server.c (handle_query): Handle "qXfer:osdata:read:".
12353 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12354 (buffer_xml_printf): New functions.
12355 * server.h (struct buffer): New.
12356 (buffer_grow_str, buffer_grow_str0): New macros.
12357 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12358 (buffer_xml_printf): Declare.
07e059b5 12359
4cab47ab
DE
123602008-11-24 Doug Evans <dje@google.com>
12361
12362 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12363
f142445f
DJ
123642008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * server.c (handle_v_run): Always use the supplied argument list.
12367
d0107bb6 123682008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12369
d0107bb6
BW
12370 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12371 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12372
2c4ad781
TJB
123732008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12374
12375 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12376 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12377 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12378 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12379 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12380 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12381 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12382 XML target descriptions.
12383 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12384 when inferior is running on an ISA 2.05 or later processor. Add
12385 special case to return offset for full 64-bit slot of FPSCR when
12386 in 32-bits.
12387
dfb64f85
DJ
123882008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12389
12390 * Makefile.in (SFILES, clean): Added sparc64 files.
12391 (reg-sparc64.o, reg-sparc64.c): New.
12392 * configure.srv (sparc*-*-linux*): New configuration.
12393 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12394 syscall arguments for SPARC.
12395 (regsets_store_inferior_registers): Likewise.
12396 * linux-sparc-low.c: New file.
12397
66b6e1dd
DE
123982008-10-21 Doug Evans <dje@google.com>
12399
12400 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12401 (READLINE_DIR,READLINE_DEP): Delete.
12402 (INTERNAL_CFLAGS): Update.
12403 (LINTFLAGS): Update.
12404
9b710a42
PA
124052008-10-10 Pedro Alves <pedro@codesourcery.com>
12406
12407 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12408 whole argv from the last run, not just argv[0].
12409
5822d809
PA
124102008-09-08 Pedro Alves <pedro@codesourcery.com>
12411
12412 * regcache.c (new_register_cache): Return NULL if the register
12413 cache size isn't known yet.
12414 (free_register_cache): Avoid dereferencing a NULL regcache.
12415
74aac56f
DJ
124162008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12417
12418 * configure.srv: Merge MIPS and MIPS64.
12419
400b20f5
MR
124202008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12421
12422 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12423
677c5bb1
LM
124242008-08-18 Luis Machado <luisgpm@br.ibm.com>
12425
12426 * Makefile.in: Add required vsx dependencies.
12427
12428 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12429 Declare init_registers_powerpc_vsx32l.
12430 Declare init_registers_powerpc_vsx64l.
12431 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12432 (ppc_arch_setup): Check for VSX in hwcap.
12433 (ppc_fill_vsxregset): New function.
12434 (ppc_store_vsxregset): New function.
12435 Add new VSX entry in regset_info target_regsets.
12436
12437 * configure.srv: Add new VSX dependencies.
12438
a6f3e723
SL
124392008-08-12 Pedro Alves <pedro@codesourcery.com>
12440
12441 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12442 (remote_open): Set or clear transport_is_reliable.
12443 (putpkt_binary): Don't expect acks in noack mode.
12444 (getpkt): Don't send ack/nac in noack mode.
12445 * server.c (handle_general_set): Handle QStartNoAckMode.
12446 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12447 qSupported.
12448 (main): Reset noack_mode on every connection.
12449 * server.h (noack_mode): Declare.
12450
a417dc56
RW
124512008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12452
12453 * Makefile.in (GDBREPLAY_OBS): New variable.
12454 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12455
3221518c
UW
124562008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12457 Daniel Jacobowitz <dan@codesourcery.com>
12458
12459 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12460 (usr_store_inferior_registers): Likewise.
12461 (regsets_store_inferior_registers): Likewise.
12462
ec56be1b
PA
124632008-07-31 Rolf Jansen <rj@surtec.com>
12464 Pedro Alves <pedro@codesourcery.com>
12465
12466 * configure.ac: Check for memmem declaration.
12467 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12468 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12469 (disable_packet_qfThreadInfo): Unconditionally compile.
12470 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12471 * configure, config.in: Regenerate.
12472
2fe5e3ff
DE
124732008-07-28 Doug Kwan <dougkwan@google.com>
12474
12475 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12476 (linux_write_memory): Remove declaration of errno.
12477
836acd6d
UW
124782008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12479
12480 * linux-low.c (handle_extended_wait): Do not use "status"
12481 variable uninitialized.
12482
aeba519e
PA
124832008-07-07 Pedro Alves <pedro@codesourcery.com>
12484
12485 * server.c (handle_v_attach): Inhibit reporting dll changes.
12486
db42f210
PA
124872008-06-27 Pedro Alves <pedro@codesourcery.com>
12488
12489 * remote-utils.c (prepare_resume_reply): If requested, don't
12490 output "thread:TID" in the T stop reply.
12491
12492 * server.c (disable_packet_vCont, disable_packet_Tthread)
12493 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12494 (handle_query): If requested, disable support for qC, qfThreadInfo
12495 and qsThreadInfo.
12496 (handle_v_requests): If requested, disable support for vCont.
12497 (gdbserver_show_disableable): New.
12498 (main): Handle --disable-packet and --disable-packet=LIST.
12499
12500 * server.h (disable_packet_vCont, disable_packet_Tthread)
12501 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12502
8e4c5421
CD
125032008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12504
12505 * server.c (gdbserver_usage): Mention --version.
12506
6e23a804
DJ
125072008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12508
12509 * Makefile.in (gdbreplay.o): New rule.
12510
90aa6a40
JM
125112008-06-06 Joseph Myers <joseph@codesourcery.com>
12512
12513 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12514 message, not gdbserver.
12515
c16158bc 125162008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12517 Nathan Sidwell <nathan@codesourcery.com>
12518 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12519
12520 * acinclude.m4: Include ../../config/acx.m4.
12521 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12522 * configure, config.in: Regenerate.
12523 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12524 * server.c (gdbserver_version): Print PKGVERSION.
12525 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12526 (main): Adjust gdbserver_usage calls.
12527 * gdbreplay.c (version, host_name): Add declarations.
12528 (gdbreplay_version, gdbreplay_usage): New.
12529 (main): Accept --version and --help options.
12530
aeb75bf5
DJ
125312008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12532
12533 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12534 (arm_breakpoint_at): Handle Thumb.
12535 (the_low_target): Add comment.
12536
76b233dd
UW
125372008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12538
12539 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12540
08388c79
DE
125412008-05-09 Doug Evans <dje@google.com>
12542
a3c83fae
DE
12543 * server.h (decode_search_memory_packet): Declare.
12544 * remote-utils.c (decode_search_memory_packet): New fn.
12545 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12546 (handle_search_memory): New fn.
12547 (handle_query): Process qSearch:memory packets.
12548
bb9c3d36
UW
125492008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12550
12551 * regcache.c (registers_length): Remove.
12552 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12553 full register packet.
12554 * regcache.h (registers_length): Remove prototype.
12555 * server.h (PBUFSIZ): Define to 16384.
12556
7284e1be
UW
125572008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12558
12559 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12560 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12561 powerpc-64l.o, and powerpc-altivec64l.o.
12562 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12563 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12564 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12565 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12566 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12567 to srv_xmlfiles.
12568
12569 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12570 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12571 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12572 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12573 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12574 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12575 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12576 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12577 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12578 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12579 (clean): Update.
12580
12581 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12582 (init_registers_powerpc_32l): ... this new prototype.
12583 (init_registers_powerpc_32): Remove, replace by ...
12584 (init_registers_powerpc_altivec32l): ... this new prototype.
12585 (init_registers_powerpc_e500): Remove, replace by ...
12586 (init_registers_powerpc_e500l): ... this new prototype.
12587 (init_registers_ppc64): Remove, replace by ...
12588 (init_registers_powerpc_64l): ... this new prototype.
12589 (init_registers_powerpc_64): Remove, replace by ...
12590 (init_registers_powerpc_altivec64l): ... this new prototype.
12591 (ppc_num_regs): Set to 73.
12592 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12593 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12594 (ppc_cannot_store_register): Handle orig_r3 and trap.
12595 (ppc_arch_setup): Update init_registers_... calls.
12596 (ppc_fill_gregset): Handle orig_r3 and trap.
12597
12598 * inferiors.c (clear_inferiors): Reset current_inferior.
12599
fdc59709
PB
126002008-04-23 Paolo Bonzini <bonzini@gnu.org>
12601
889bf7c5
PA
12602 * acinclude.m4: Add override.m4.
12603 * configure: Regenerate.
fdc59709 12604
c9b2f845
UW
126052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12608 initial call to init_register_ppc64.
12609
550512b8
UW
126102008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12611
43aaf8b6
PA
12612 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12613 single powerpc*-*-linux* case.
550512b8
UW
12614 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12615
b6430ec3
UW
126162008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12617
12618 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12619 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12620 from reg_xmlfiles.
12621 * linux-ppc-low.c: Include <elf.h>.
12622 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12623 (ppc_hwcap): New global variable.
12624 (ppc_regmap): Remove __SPE__ #ifdef sections.
12625 (ppc_regmap_e500): New global variable.
12626 (ppc_cannot_store_register): Update __SPE__ special case.
12627 (ppc_get_hwcap): New function.
12628 (ppc_arch_setup): Use it to determine whether inferior supports
12629 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12630 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12631 Do not access registers if target does not support AltiVec.
12632 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12633 Do not access registers if target does not support SPE.
12634 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12635
52fa2412
UW
126362008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12637
12638 * linux-low.c (disabled_regsets, num_regsets): New.
12639 (use_regsets_p): Delete.
12640 (linux_wait_for_process): Clear disabled_regsets.
12641 (regsets_fetch_inferior_registers): Check and set it.
12642 (regsets_store_inferior_registers): Likewise.
12643 (linux_fetch_registers, linux_store_registers): Do not use
12644 use_regsets_p.
12645 (initialize_low): Allocate disabled_regsets.
12646
e28b3332
DJ
126472008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12648
12649 * Makefile.in (LIBOBJS): New.
12650 (OBS): Use LIBOBJS.
12651 (memmem.o): New rule.
12652 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12653 * configure: Regenerated.
12654
4536995d
UW
126552008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12656
12657 * server.c (handle_query): Never return "unsupported" for
12658 qXfer:features:read queries.
12659
221c031f
UW
126602008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12661
12662 * server.c (get_features_xml): Fix inverted condition.
12663 (handle_query): Always support qXfer:feature:read.
12664
ccd213ac
DJ
126652008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12666
12667 * server.c (wrapper_argv): New.
12668 (start_inferior): Handle wrapper_argv. If set, expect an extra
12669 trap.
12670 (gdbserver_usage): Document --wrapper.
12671 (main): Parse --wrapper.
12672
6fe305f7
UW
126732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12674
12675 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12676 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12677 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12678 (ppc_set_pc): Likewise.
12679 (ppc_arch_setup): New function.
12680 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12681 of collect_register.
889bf7c5 12682 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12683
5b0a002e
UW
126842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12685
12686 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12687 instead of linux-ppc64-low.o.
12688 * linux-ppc64-low.c: Remove file.
12689 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12690 (linux-ppc64-low.o): Remove rule.
12691
12692 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12693 (init_registers_powerpc_64): Likewise.
12694 (ppc_regmap): Conditionally define depending on __powerpc64__.
12695 (ppc_cannot_store_register): Do not special-case "fpscr" when
12696 compiled on __powerpc64__.
12697 (ppc_collect_ptrace_register): New function.
12698 (ppc_supply_ptrace_register): New function.
12699 (ppc_breakpoint): Change type to "unsigned int".
12700 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12701 (the_low_target): Conditionally provide initializers for the
889bf7c5 12702 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12703 collect_ptrace_register and supply_ptrace_register members.
12704
9b4b61c8
UW
127052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12706
12707 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12708 * server.c (gdbserver_xmltarget): Define.
12709 (get_features_xml): Use it to replace "target.xml" and arch_string.
12710
12711 * configure.srv: Remove srv_xmltarget. Add XML files that were
12712 mentioned there to srv_xmlfiles instead. Remove conditional tests
12713 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12714 srv_xmlfiles and srv_regobj to include all possible choices.
12715 * configure.ac (srv_xmltarget): Remove.
12716 (srv_xmlfiles): Do not add "target.xml".
12717 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12718 checks for supplementary target information.
12719 * configure: Regenerate.
12720 * Makefile.in (XML_TARGET): Remove.
12721 (target.xml): Remove rule.
12722 (clean): Do not clean up target.xml.
12723 (.PRECIOUS): Do not mention target.xml.
12724
12725 * target.h (struct target_ops): Remove arch_string member.
12726 * linux-low.c (linux_arch_string): Remove.
12727 (linux_target_ops): Remove arch_string initializer.
12728 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12729 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12730 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12731 * spu-low.c (spu_arch_string): Remove.
12732 (spu_target_ops): Remove arch_string initializer.
12733 * win32-low.c (win32_arch_string): Remove.
12734 (win32_target_ops): Remove arch_string initializer.
12735 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12736 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12737 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12738
ee1a7ae4
UW
127392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12740
12741 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12742 by collect_ptrace_register and supply_ptrace_register hooks.
12743 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12744 instead of checking for the_low_target.left_pad_xfer.
12745 (usr_store_inferior_registers): Use collect_ptrace_register callback
12746 instead of checking for the_low_target.left_pad_xfer.
12747
12748 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12749 (s390_supply_ptrace_register): Likewise.
12750 (s390_fill_gregset): Call s390_collect_ptrace_register.
12751 (the_low_target): Update.
12752
12753 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12754 (ppc_supply_ptrace_register): Likewise.
12755 (the_low_target): Update.
12756
12757 * linux-i386-low.c (the_low_target): Update.
12758 * linux-x86-64-low.c (the_low_target): Update.
12759
d61ddec4
UW
127602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12761
12762 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12763 reg-s390.o and reg-s390x.o.
12764
12765 * linux-low.c (new_inferior): New global variable.
12766 (linux_create_inferior, linux_attach): Set it.
12767 (linux_wait_for_process): Call the_low_target.arch_setup after the
12768 target has stopped for the first time.
12769 (initialize_low): Do not call the_low_target.arch_setup.
12770
12771 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12772 (s390_set_pc): Likewise.
12773 (s390_arch_setup): New function.
12774 (the_low_target): Use s390_arch_setup as arch_setup routine.
12775
12776 * regcache.c (realloc_register_cache): New function.
12777 (set_register_cache): Call it for each existing regcache.
12778
d05b4ac3
UW
127792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12780
12781 * server.h (init_registers): Remove prototype.
12782
12783 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12784 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12785 instead of init_registers ().
12786 * linux-arm-low.c (init_registers_arm): Add prototype.
12787 (init_registers_arm_with_iwmmxt): Likewise.
12788 (the_low_target): Add initializer for arch_setup field.
12789 * linux-cris-low.c (init_registers_cris): Add prototype.
12790 (the_low_target): Add initializer for arch_setup field.
12791 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12792 (the_low_target): Add initializer for arch_setup field.
12793 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12794 (the_low_target): Add initializer for arch_setup field.
12795 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12796 (the_low_target): Add initializer for arch_setup field.
12797 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12798 (the_low_target): Add initializer for arch_setup field.
12799 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12800 (the_low_target): Add initializer for arch_setup field.
12801 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12802 (init_registers_mips64_linux): Likewise.
12803 (the_low_target): Add initializer for arch_setup field.
12804 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12805 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12806 (the_low_target): Add initializer for arch_setup field.
12807 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12808 (init_registers_powerpc_64): Likewise.
12809 (the_low_target): Add initializer for arch_setup field.
12810 * linux-s390-low.c (init_registers_s390): Add prototype.
12811 (init_registers_s390x): Likewise.
12812 (the_low_target): Add initializer for arch_setup field.
12813 * linux-sh-low.c (init_registers_sh): Add prototype.
12814 (the_low_target): Add initializer for arch_setup field.
12815 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12816 (the_low_target): Add initializer for arch_setup field.
12817 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12818 (the_low_target): Add initializer for arch_setup field.
12819
12820 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12821 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12822 instead of init_registers ().
12823 * win32-arm-low.c (init_registers_arm): Add prototype.
12824 (the_low_target): Add initializer for arch_setup field.
12825 * win32-i386-low.c (init_registers_i386): Add prototype.
12826 (the_low_target): Add initializer for arch_setup field.
12827
12828 * spu-low.c (init_registers_spu): Add prototype.
12829 (initialize_low): Call initialie_registers_spu () instead of
12830 initialize_registers ().
12831
fd96d250
PA
128322008-02-19 Pedro Alves <pedro@codesourcery.com>
12833
12834 * server.c (handle_v_requests): When handling the vRun and vAttach
12835 packets, if already debugging a process, don't kill it. Return an
12836 error instead.
12837
d41b6bb4
DJ
128382008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12839
12840 * server.c (handle_query): Correct length check.
12841
5ac588cf
PA
128422008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12843
12844 * win32-low.c (do_initial_child_stuff): Add process handle
12845 parameter. Set current_process_handle and current_process_id from the
12846 parameters. Clear globals.
12847 (win32_create_inferior): Don't set current_process_handle and
12848 current_process_id here. Instead pass them on the call to
12849 do_initial_child_stuff.
12850 (win32_attach): Likewise.
12851 (win32_clear_inferiors): New.
12852 (win32_kill): Don't close the current process handle or the
12853 current thread handle here. Instead call win32_clear_inferiors.
12854 (win32_detach): Don't open a new handle to the process. Call
12855 win32_clear_inferiors.
12856 (win32_join): Don't rely on current_process_handle; open a new
12857 handle using the process id.
12858 (win32_wait): Call win32_clear_inferiors when the inferior process
12859 has exited.
12860
ecd7ecbc
DJ
128612008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12862
12863 * server.c (monitor_show_help): Add "exit".
12864
1525d545
MG
128652008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12866
ecd7ecbc 12867 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12868 (clean): Add reg-xtensa.c.
12869 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12870 * configure.srv (xtensa*-*-linux*) New target.
12871 * linux-xtensa-low.c: New.
12872 * xtensa-xtregs.c: New.
1525d545 12873
59a016f0
PA
128742008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12875
12876 * hostio.c: Don't include errno.h.
12877 (errno_to_fileio_errno): Move to hostio-errno.
12878 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12879 error number outputting to the target->hostio_last_error callback.
12880 (hostio_packet_error): Use FILEIO_EINVAL directly.
12881 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12882 calls to hostio_error.
12883 * hostio-errno.c: New.
12884 * server.h (hostio_last_error_from_errno): Declare.
12885 * target.h (target_ops): Add hostio_last_error member.
12886 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12887 as hostio_last_error handler.
889bf7c5 12888 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12889 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12890 (wince_hostio_last_error): New functions.
12891 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12892 as hostio_last_error handler.
12893 (win32_target_ops) [!_WIN32_WCE]: Register
12894 hostio_last_error_from_errno as hostio_last_error handler.
12895 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12896 (hostio-errno.o): New rule.
12897 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12898 * configure.srv (srv_hostio_err_objs): New variable. Default to
12899 hostio-errno.o.
12900 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12901 * configure: Regenerate.
12902
2d717e4f
DJ
129032008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12904
12905 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12906 (linux_kill, linux_detach): Clean up the process list.
12907 * remote-utils.c (remote_open): Improve port number parsing.
12908 (putpkt_binary, input_interrupt): Only send interrupts if the target
12909 is running.
12910 * server.c (extended_protocol): Make static.
12911 (attached): Define earlier.
12912 (exit_requested, response_needed, program_argv): New variables.
12913 (target_running): New.
12914 (start_inferior): Clear attached here.
12915 (attach_inferior): Set attached here.
12916 (require_running): Define.
12917 (handle_query): Use require_running and target_running. Implement
12918 "monitor exit".
12919 (handle_v_attach, handle_v_run): New.
12920 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12921 (gdbserver_usage): Update.
12922 (main): Redo argument parsing. Handle --debug and --multi. Handle
12923 --attach along with other options or after the port. Save
12924 program_argv. Support no initial program. Resynchronize
12925 communication with GDB after an error. Handle "monitor exit".
12926 Use require_running and target_running. Always allow the extended
12927 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12928 restart in extended mode.
12929 * README: Refer to the GDB manual. Update --attach usage.
12930
7407e2de
AS
129312007-12-20 Andreas Schwab <schwab@suse.de>
12932
12933 * linux-low.c (STACK_SIZE): Define.
12934 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12935 (linux_test_for_tracefork): Likewise.
12936
b65d95c5
DJ
129372007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12938
12939 * linux-low.c (linux_wait_for_event): Update messages. Do not
12940 reinsert auto-delete breakpoints.
12941 * mem-break.c (struct breakpoint): Change return type of handler to
12942 int.
12943 (set_breakpoint_at): Update handler type.
12944 (reinsert_breakpoint_handler): Return 1 instead of calling
12945 delete_breakpoint.
12946 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12947 setting a new one.
12948 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12949 * mem-break.h (set_breakpoint_at): Update handler type.
12950 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12951 * win32-low.c (auto_delete_breakpoint): New.
12952 (get_child_debug_event): Use it.
12953
4e799345
DJ
129542007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12955
12956 * configure.ac: Check for pread and pwrite.
12957 * hostio.c (handle_pread): Fall back to lseek and read.
12958 (handle_pwrite): Fall back to lseek and write.
12959 * config.in, configure: Regenerated.
12960
27524b67
DJ
129612007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * server.c (myresume): Add own_buf argument.
12964 (main): Update calls.
12965
a20d5e98
DJ
129662007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12967
12968 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12969 * remote-utils.c (remote_open): Do not call disable_async_io.
12970 (block_async_io): Delete.
12971 (unblock_async_io): Make static.
12972 (initialize_async_io): New.
12973 * server.c (handle_v_cont): Handle async I/O here.
12974 (myresume): Likewise. Move other common resume tasks here...
12975 (main): ... from here. Call initialize_async_io. Disable async
12976 I/O before the main loop.
12977 * server.h (initialize_async_io): Declare.
12978 (block_async_io, unblock_async_io): Delete prototypes.
12979 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12980
b79d787e
DJ
129812007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12982
12983 * remote-utils.c (readchar): Allow binary data in received messages.
12984
d97903b2
PA
129852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12986
12987 * win32-low.c (attaching): New global.
12988 (win32_create_inferior): Clear the `attaching' global.
12989 (win32_attach): Set the `attaching' global.
12990 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12991 attaching. Only set a breakpoint at the entry point if not
12992 attaching.
12993
311de423
PA
129942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12995
12996 * server.c (main): Don't report dll events on the initial
12997 connection on attaches.
12998
6c2d16d2
PA
129992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13000
13001 * server.c (main): Relax numerical bases supported for the pid of
13002 the --attach command line argument.
13003
5ca906e6
PA
130042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13005
13006 * win32-low.c (win32_attach): Call OpenProcess before
13007 DebugActiveProcess, not after. Add last error output to error
13008 call.
13009
9c6c8194
PA
130102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13011
13012 * win32-low.c (win32_get_thread_context)
13013 (win32_set_thread_context): New functions.
13014 (thread_rec): Use win32_get_thread_context.
13015 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13016 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13017 field.
13018
4d5d1aaa
PA
130192007-12-03 Leo Zayas
13020 Pedro Alves <pedro_alves@portugalmail.pt>
13021
13022 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13023 global variables.
13024 (child_add_thread): Minor cleanup.
13025 (child_continue): Resume artificially suspended threads before
13026 calling ContinueDebugEvent.
13027 (suspend_one_thread): New.
13028 (fake_breakpoint_event): New.
13029 (get_child_debug_event): Change return type to int. Check here if
13030 gdb sent an interrupt request. If a soft interrupt was requested,
13031 fake a breakpoint event. Return 0 if there is no event to handle,
13032 and 1 otherwise.
13033 (win32_wait): Don't check here if gdb sent an interrupt request.
13034 Ensure there is a valid event to handle.
13035 (win32_request_interrupt): Add soft interruption method as last
13036 resort.
13037
c436e841
PA
130382007-12-03 Leo Zayas
13039 Pedro Alves <pedro_alves@portugalmail.pt>
13040
13041 * win32-low.h (win32_thread_info): Add descriptions to the
13042 structure members. Replace `suspend_count' counter by a
13043 `suspended' flag.
13044 * win32-low.c (thread_rec): Update condition of when to get the
13045 context from the inferior. Rely on ContextFlags being set if it
13046 has already been retrieved. Only suspend the inferior thread if
13047 we haven't already. Warn if that fails.
13048 (continue_one_thread): s/suspend_count/suspended/. Only call
13049 ResumeThread once. Warn if that fails.
13050
e7b5fa67
PA
130512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13052
13053 * win32-low.c (win32_wait): Don't read from the inferior when it
13054 has already exited.
13055
a385171d
PA
130562007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13057
13058 * Makefile.in (win32_low_h): New variable.
13059 (win32-low.o): Add dependency on $(win32_low_h).
13060 (win32-arm-low.o, win32-i386-low.o): New rules.
13061
f80c84b3
DJ
130622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13063
13064 * hostio.c: Correct copyright year.
13065
a6b151f1
DJ
130662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13067
13068 * Makefile.in (OBS): Add hostio.o.
13069 (hostio.o): New rule.
13070 * server.h (handle_vFile): Declare.
13071 * hostio.c: New file.
13072 * server.c (handle_v_requests): Take packet_len and new_packet_len
13073 for binary packets. Call handle_vFile.
13074 (main): Update call to handle_v_requests.
13075
f9387fc3
DJ
130762007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13077
13078 * linux-low.c: Include <sched.h>.
13079
51c2684e
DJ
130802007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13081
13082 * linux-low.c (linux_tracefork_grandchild): New.
13083 (linux_tracefork_child): Use clone.
13084 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13085
75f83163
JB
130862007-10-31 Joel Brobecker <brobecker@adacore.com>
13087
13088 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13089
da5898ce
DJ
130902007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13093
24a09b5f
DJ
130942007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13095
13096 * inferiors.c (change_inferior_id): Delete.
13097 (add_pid_to_list, pull_pid_from_list): New.
13098 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13099 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13100 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13101 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13102 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13103 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13104 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13105 (using_threads): Always set to 1.
13106 (handle_extended_wait): New.
13107 (add_process): Do not set TID.
13108 (linux_create_inferior): Set must_set_ptrace_flags.
13109 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13110 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13111 (linux_thread_alive): Rename TID argument to LWPID.
13112 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13113 (linux_wait_for_event): Do not use TID or check using_threads. Update
13114 call to dead_thread_notify. Call handle_extended_wait.
13115 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13116 (send_sigstop): Delete sigstop_sent.
13117 (wait_for_sigstop): Avoid TID.
13118 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13119 (linux_test_for_tracefork): New.
13120 (linux_lookup_signals): Use thread_db_active and
13121 linux_supports_tracefork_flag.
13122 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13123 * linux-low.h (get_process_thread): Avoid TID.
13124 (struct process_ifo): Move thread_known and tid to the end. Remove
13125 sigstop_sent.
13126 (linux_attach_lwp, thread_db_init): Update prototypes.
13127 * server.h (change_inferior_id): Delete prototype.
13128 (add_pid_to_list, pull_pid_from_list): New prototypes.
13129 * thread-db.c (thread_db_use_events): New.
13130 (find_first_thread): Rename to...
13131 (find_one_thread): ...this. Update callers and messages. Do not
13132 call fatal. Check thread_db_use_events. Do not call
13133 change_inferior_id or new_thread_notify.
13134 (maybe_attach_thread): Update. Do not call new_thread_notify.
13135 (thread_db_init): Set thread_db_use_events. Check use_events.
13136 * utils.c (fatal, warning): Correct message prefix.
13137
30ed0a8f
DJ
131382007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13139
13140 * Makefile.in (clean): Remove new files.
13141 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13142 (powerpc-64.o, powerpc-64.c): New rules.
13143 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13144 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13145 with SPE.
13146 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13147 SPE targets.
13148 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13149 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13150 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13151 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13152 (target_regsets): Add AltiVec and SPE register sets.
13153 * configure.ac: Check for AltiVec and SPE.
13154 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13155 (ppc_fill_vrregset, ppc_store_vrregset): New.
13156 (target_regsets): Add AltiVec register set.
13157 * configure: Regenerated.
13158
fd462a61
DJ
131592007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13160
13161 * linux-low.c (O_LARGEFILE): Define.
13162 (linux_read_memory): Use /proc/PID/mem.
13163 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13164 * configure, config.in: Regenerated.
13165
69f223ed
DJ
131662007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13167
13168 * linux-low.c (linux_wait_for_event): Do not pass signals while
13169 single-stepping.
13170
aec18585
PA
131712007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13172
13173 * win32-low.c (create_process): New.
13174 (win32_create_inferior): Use create_process instead of
13175 CreateProcess. If create_process failed retry appending an ".exe"
13176 suffix. Store the GetLastError result immediatelly after
13177 create_process calls and use it on the call to error.
13178
34d86ddd
PA
131792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13180
13181 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13182
5a0e3bd0
JB
131832007-08-23 Joel Brobecker <brobecker@adacore.com>
13184
13185 * configure.ac: Switch license to GPLv3.
13186
f88c79e6
MS
131872007-08-01 Michael Snyder <msnyder@access-company.com>
13188
13189 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13190
6b3d9b83
PA
131912007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13192
13193 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13194 typedef.
13195 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13196 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13197 CloseToolhelp32Snapshot.
13198 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13199 CloseToolhelp32Snapshot.
13200
c588c53c
MS
132012007-07-27 Michael Snyder <michael.snyder@access-company.com>
13202
13203 * server.c (main): Check for inferior exit before main loop.
13204
aa0403d9
PA
132052007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13206
13207 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13208 instead of on tmp_desc.
13209
255e7678
DJ
132102007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13211 Daniel Jacobowitz <dan@codesourcery.com>
13212
13213 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13214 (add_thread): Minor cleanups.
13215 (clear_inferiors): Move lower in the file. Clear the DLL
13216 list.
13217 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13218 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13219 (xml_escape_text): New.
13220 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13221 for qSupported.
13222 (handle_v_cont): Report errors.
13223 (gdbserver_version): Update.
13224 (main): Correct size of own_buf. Do not report initial DLL events.
13225 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13226 (unloaded_dll, xml_escape_text): New.
13227 * win32-low.c (enum target_waitkind): Update comments.
13228 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13229 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13230 (win32_EnumProcessModules, win32_GetModuleInformation)
13231 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13232 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13233 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13234 (win32_Module32First, win32_Module32Next, load_toolhelp)
13235 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13236 (get_child_debug_event): Handle DLL events.
13237 (win32_wait): Likewise.
13238
0d37add9
DJ
132392007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13240
13241 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13242 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13243
45e2715e
PA
132442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13245
13246 * win32-low.c (handle_output_debug_string): Ignore event if not
13247 waiting.
13248
c5674cf1
PA
132492007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13250
13251 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13252
2bbe3cc1
DJ
132532007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13254
13255 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13256
ae13219e
DJ
132572007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13258
13259 * inferiors.c (change_inferior_id): Add comment.
13260 * linux-low.c (check_removed_breakpoint): Add an early
13261 prototype. Improve debug output.
13262 (linux_attach): Doc update.
13263 (linux_detach_one_process, linux_detach): Clean up before releasing
13264 each process.
13265 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13266 * linux-low.h (struct process_info): Doc improvement.
13267 * mem-break.c (delete_all_breakpoints): New.
13268 * mem-break.h (delete_all_breakpoints): New prototype.
13269 * thread-db.c (find_first_thread): New.
13270 (thread_db_create_event): Call it instead of
13271 thread_db_find_new_threads. Clean up unused variables.
13272 (maybe_attach_thread): Remove first thread handling.
13273 (thread_db_find_new_threads): Use find_first_thread.
13274 (thread_db_get_tls_address): Likewise.
13275
4105de34
DJ
132762007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13277
13278 * thread-db.c (thread_db_find_new_threads): Add prototype.
13279 (thread_db_create_event): Check for the main thread before adding
13280 a new thread.
13281 (maybe_attach_thread): Only enable event reporting if TID == 0.
13282 (thread_db_get_tls_address): Check for new threads.
13283
2b876972
DJ
132842007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13285
13286 * linux-low.c (linux_create_inferior): Try execv before execvp.
13287 * spu-low.c (spu_create_inferior): Likewise.
13288
7a245884
DJ
132892007-06-13 Mike Frysinger <vapier@gentoo.org>
13290
13291 * linux-low.c (linux_create_inferior): Change execv to execvp.
13292 * spu-low.c (spu_create_inferior): Likewies.
13293
117ce543
DJ
132942007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13295
13296 * Makefile.in (clean): Clean new files instead of deleted ones.
13297 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13298 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13299 rules.
13300 * configure.srv: Specify XML files and new regformats for MIPS and
13301 MIPS64 GNU/Linux.
13302 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13303 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13304 an entry for the restart register.
13305 (mips_cannot_fetch_register, mips_cannot_store_register)
13306 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13307 register names to match the XML descriptions.
13308 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13309 restart register instead of $0.
13310
0e7f50da
UW
133112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13312 Markus Deuling <deuling@de.ibm.com>
13313
13314 * remote-utils.c (decode_xfer_write): New function.
13315 * server.h (decode_xfer_write): Add prototype.
13316 * server.c (handle_query): Add PACKET_LEN argument. Support
13317 qXfer:spu:read and qXfer:spu:write packets.
13318 (main): Pass packet_len to handle_query.
13319 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13320 * target.h (target_ops): Add qxfer_spu.
13321
374c1d38
UW
133222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13323
13324 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13325 accessing non-seekable spufs files.
13326
bb63802a
UW
133272007-05-16 Markus Deuling <deuling@de.ibm.com>
13328
889bf7c5 13329 * server.c (handle_query): Add reply for qC packet.
bb63802a 13330
7390519e
PA
133312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13332 Leo Zayas <lerele@champenstudios@com>
13333
13334 * server.h (check_remote_input_interrupt_request): New function.
13335 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13336 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13337 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13338 (check_remote_input_interrupt_request): New function.
13339 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13340 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13341 winapi_GenerateConsoleCtrlEvent): New typedefs.
13342 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13343 to 250 ms.
13344 (win32_wait): Check for remote interrupt request
13345 with check_remote_input_interrupt_request.
13346 (win32_request_interrupt): New function.
13347 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13348
34b34921
PA
133492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13350
13351 * win32-low.c (debug_registers_changed,
13352 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13353 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13354 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13355 (thread_rec): Get context using the low target.
13356 (child_add_thread): Call thread_added on the low target,
13357 which does the same thing.
13358 (regptr): Delete.
13359 (do_initial_child_stuff): Remove debug registers references.
13360 Set context using the low target. Resume threads after
13361 setting the contexts.
13362 (child_continue): Remove dead variable. Remove debug
13363 registers references.
13364 (child_fetch_inferior_registers): Go through the low target.
13365 (do_child_store_inferior_registers): Remove.
13366 (child_store_inferior_registers): Go through the low target.
13367 (win32_resume): Remove debug registers references.
13368 Set context using the low target.
13369 (handle_exception): Change return type to void. Don't record
13370 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13371 first chance exception.
889bf7c5 13372 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13373 goto loop. Always return after waiting for debug event.
13374 (win32_wait): Convert to switch statement. Handle spurious
13375 events.
13376
13377 * win32-i386-low.c (debug_registers_changed,
13378 debug_registers_used): New.
13379 (initial_stuff): Rename to ...
13380 (i386_initial_stuff): ... this. Clear debug registers
13381 state variables.
13382 (store_debug_registers): Delete.
13383 (i386_get_thread_context): New.
13384 (load_debug_registers): Delete.
13385 (i386_set_thread_context): New.
13386 (i386_thread_added): New.
13387 (single_step): Rename to ...
13388 (i386_single_step): ... this.
13389 (do_fetch_inferior_registers): Rename to ...
13390 (i386_fetch_inferior_register): ... this.
13391 (i386_store_inferior_register): New.
13392 (the_low_target): Adapt to new interface.
13393
13394 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13395 (arm_get_thread_context): New.
13396 (arm_set_thread_context): New.
13397 (regptr): New.
13398 (do_fetch_inferior_registers): Rename to ...
13399 (arm_fetch_inferior_register): ... this.
13400 (arm_store_inferior_register): New.
13401 (arm_wince_breakpoint): Reimplement as unsigned long.
13402 (arm_wince_breakpoint_len): Define.
13403 (the_low_target): Adapt to new interface.
13404
13405 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13406 load_debug_registers. Add get_thread_context, set_thread_context,
13407 thread_added and store_inferior_register. Rename
13408 fetch_inferior_registers to fetch_inferior_register.
13409 (regptr): Remove declaration.
13410
dd6953e1
PA
134112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13412
13413 * linux-low.c (linux_detach): Change return type to int. Return 0.
13414 * spu-low.c (spu_detach): Likewise.
13415
444d6139
PA
134162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13417
13418 * target.h (target_ops): Change return type of detach to int.
13419 Add join.
13420 (join_inferior): New.
13421 * server.c (main): Don't skip detach support on mingw32.
13422 If the inferior doesn't support detaching return error.
13423 Call join_inferior instead of using waitpid.
13424 * linux-low.c (linux_join): New.
13425 (linux_target_op): Add linux_join.
13426 * spu-low.c (spu_join): New.
13427 (spu_target_ops): Add spu_join.
13428 * win32-low.c (win32_detach): Adapt to new interface.
13429 Reopen current_process_handle before detaching. Issue a child
13430 resume before detaching.
13431 (win32_join): New.
13432 (win32_target_op): Add win32_join.
13433
1d5315fe
PA
134342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13435
13436 * win32-low.c (win32-attach): Fix return value.
13437 * target.h (target_ops): Describe ATTACH return values.
13438
bf914831
PA
134392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13440
13441 * win32-low.c (GETPROCADDRESS): Define.
13442 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13443 (winapi_DebugSetProcessKillOnExit): Likewise.
13444 (win32_create_inferior): Force usage of ansi CreateProcessA.
13445 (win32_attach): Use GETPROCADDRESS.
13446 (win32_detach): Likewise.
13447
f72f3e60
PA
134482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13449
13450 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13451
ed50f18f
PA
134522007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13453
13454 * win32-low.c: Commit leftover changes from 2007-03-29.
13455
0c2ead7e
DJ
134562007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13459 fields short instead of int. Add explicit padding.
13460 (i387_cache_to_fsave): Remove unnecessary casts.
13461 (i387_fsave_to_cache): Doc fix.
13462 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13463
73725ff3
DJ
134642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13465
13466 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13467 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13468
d99f33d8
PA
134692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * configure.srv (arm*-*-mingw32ce*): Move near the other
13472 arm targets.
13473
68070c10
PA
134742007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13475
2482afc6 13476 * configure.ac: Add errno checking.
68070c10
PA
13477 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13478 sys/file.h and malloc.h.
13479 (AC_CHECK_DECLS): Add perror.
13480 (srv_mingwce): Handle.
2482afc6 13481 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13482 win32-i386-low.o to srv_tgtobj.
13483 (i[34567]86-*-mingw*): Likewise.
13484 (arm*-*-mingw32ce*): Add case.
13485 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13486 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13487 [__MINGW32CE__] (strerror): New function.
13488 [__MINGW32CE__] (errno): Define to GetLastError.
13489 [__MINGW32CE__] (COUNTOF): New macro.
13490 (remote_open): Remove extra close call.
13491 * mem-break.c (delete_breakpoint_at): New function.
13492 * mem-break.h (delete_breakpoint_at): Declare.
13493 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13494 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13495 [USE_WIN32API] (read, write): Add char* casts.
13496 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13497 * server.h: Include wincecompat.h on Windows CE.
13498 [HAVE_ERRNO_H]: Check.
13499 (perror): Declare if not declared.
13500 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13501 (perror_with_name): Remove errno declaration.
13502 * wincecompat.h: New.
13503 * wincecompat.c: New.
13504 * win32-low.h: New.
13505 * win32-arm-low.c: New.
13506 * win32-i386-low.c: New.
13507 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13508 (OUTMSG2): Make it safe.
13509 (_T): New macro.
13510 (COUNTOF): New macro.
13511 (NUM_REGS): Get it from the low target.
13512 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13513 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13514 (thread_rec): Let low target handle debug registers.
13515 (child_add_thread): Likewise.
13516 (child_init_thread_list): Likewise.
13517 (continue_one_thread): Likewise.
13518 (regptr): New.
13519 (do_child_fetch_inferior_registers): Move to ...
13520 * win32-i386-low.c: ... here, and rename to ...
13521 (do_fetch_inferior_registers): ... this.
889bf7c5 13522 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13523 Go through the low target.
13524 (do_child_store_inferior_registers): Use regptr.
13525 (strwinerror): New function.
13526 (win32_create_inferior): Handle Windows CE.
13527 Use strwinerror instead of strerror on Windows error
13528 codes. Add program to the error output.
13529 Don't close the main thread handle on Windows CE.
13530 (win32_attach): Use coredll.dll on Windows CE.
13531 (win32_kill): Close current process and current
13532 thread handles.
13533 (win32_detach): Use coredll.dll on Windows CE.
13534 (win32_resume): Let low target handle debug registers, and
13535 step request.
13536 (handle_exception): Add/Remove initial breakpoint. Avoid
13537 non-existant WSTOPSIG on Windows CE.
13538 (win32_read_inferior_memory): Cast to remove warning.
13539 (win32_arch_string): Go through the low target.
13540 (initialize_low): Call set_breakpoint_data with the low
13541 target's breakpoint.
13542 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13543 FOP_REGNUM, mappings): Move to ...
13544 * win32-i386-low.c: ... here.
13545 * win32-low.c (win32_thread_info): Move to ...
13546 * win32-low.h: ... here.
13547 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13548 win32-arm-low.c and wincecompat.c.
13549 (all:): Add $EXEEXT.
13550 (install-only:): Likewise.
13551 (gdbserver:): Likewise.
13552 (gdbreplay:): Likewise.
13553 * config.in: Regenerate.
13554 * configure: Regenerate.
13555
41093d81
PA
135562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13557
13558 * win32-low.c: Rename typedef thread_info to
13559 win32_thread_info throughout.
13560
544afa54
PA
135612007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13562
13563 * win32-i386-low.c: Rename to ...
13564 * win32-low.c: ... this.
13565 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13566 * Makefile.in: Likewise.
13567
bce7165d
PA
135682007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13569
13570 * remote-utils.c (monitor_output): Constify msg parameter.
13571 * server.h (monitor_output): Likewise.
13572 * win32-i386-low.c (handle_output_debug_string): New.
13573 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13574 handle_output_debug_string.
13575 (get_child_debug_event): Likewise.
13576
506c7aa0
DJ
135772007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13578
13579 * server.c (main): Correct strtoul check.
13580
42c81e2a
DJ
135812007-03-27 Jon Ringle <jon@ringle.org>
13582
13583 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13584
9453113a
DJ
135852007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13586
13587 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13588
64a69107
DJ
135892007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * terminal.h: Check HAVE_SGTTY_H.
13592
135932007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13594
13595 * remote-utils.c (remote_open): Print out the assigned port number.
13596
c74d0ad8
DJ
135972007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13598
13599 * remote-utils.c (monitor_output): New function.
13600 * server.c (debug_threads): Define here.
13601 (monitor_show_help): New function.
13602 (handle_query): Handle qRcmd.
13603 (main): Do not handle 'd' packet.
13604 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13605 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13606 of debug_threads.
13607
de7c3b4a
PA
136082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13609
13610 * Makefile.in (EXEEXT): New.
13611 (clean): Use $(EXEEXT).
13612
ef57601b
PA
136132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13614
13615 * target.h (target_ops): Rename send_signal to request_interrupt,
13616 and remove enum target_signal parameter.
13617 * linux-low.c (linux_request_interrupt): Rename from
13618 linux_send_signal, and always send SIGINT.
13619 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13620 and always send SIGINT.
13621 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13622 of send_signal.
13623 (input_interrupt): Likewise.
13624
820f2bda
PA
136252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13626
13627 * server.c (get_features_xml): Check if target implemented
13628 arch_string.
13629 * win32-i386-low.c (win32_arch_string): New.
13630 (win32_target_ops): Add win32_arch_string as arch_string member.
13631
ab39bf24
UW
136322007-02-22 Markus Deuling <deuling@de.ibm.com>
13633
13634 * spu-low.c (spu_arch_string): New.
13635 (spu_target_ops): Add spu_arch_string.
13636
61ff6e04
DJ
136372007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13638
13639 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13640 * configure.ac: Do not check for terminal.h.
13641 * configure, config.in: Regenerated.
13642
fb1e4ffc
DJ
136432007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13644
13645 * Makefile.in (OBS): Add $(XML_BUILTIN).
13646 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13647 (clean): Update.
13648 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13649 (arm-with-iwmmxt.c): New.
13650 * config.in, configure: Regenerate.
13651 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13652 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13653 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13654 (arm*-*-linux*): Add iWMMXt and regset support.
13655 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13656 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13657 (arm_store_wmmxregset, target_regsets): New.
13658 * server.c (get_features_xml): Take annex argument. Check builtin
13659 XML documents.
13660 (handle_query): Handle multiple annexes.
13661
0f48aa01
DJ
136622007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13663
13664 * remote-utils.c [USE_WIN32API] (read, write): Define.
13665 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13666 write.
13667
23181151
DJ
136682007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13669
13670 * linux-i386-low.c (the_low_target): Set arch_string.
13671 * linux-x86-64-low.c (the_low_target): Likewise.
13672 * linux-low.c (linux_arch_string): New.
13673 (linux_target_ops): Add it.
13674 * linux-low.h (struct linux_target_ops): Add arch_string.
13675 * server.c (write_qxfer_response): Use const void * for DATA.
13676 (get_features_xml): New.
13677 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13678 * target.h (struct target_ops): Add arch_string method.
13679
9d606399
DJ
136802007-01-03 Denis Pilat <denis.pilat@st.com>
13681 Daniel Jacobowitz <dan@codesourcery.com>
13682
13683 * linux-low.c (linux_kill): Handle being called with no threads.
13684 * win32-i386-low.c (win32_kill): Likewise.
13685 (get_child_debug_event): Clear current_process_handle.
13686
136872006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13688 Daniel Jacobowitz <dan@codesourcery.com>
13689
13690 * remote-utils.c (remote_open): Check the type of specified
13691 serial port devices before opening them.
13692 * server.c (main): Kill the inferior if an error occurs during
13693 the first remote_open.
13694
a5e13d24
DJ
136952006-12-05 Markus Deuling <deuling@de.ibm.com>
13696
13697 * README: Update supported targets.
13698
186947f7
DJ
136992006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13700
13701 * Makefile.in (clean): Remove reg-mips64.c.
13702 (reg-mips64.c, reg-mips64.o): New rules.
13703 * configure.srv: Handle mips64. Include regset support for mips.
13704 * linux-mips-low.c (union mips_register): New.
13705 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13706 (mips_breakpoint, mips_breakpoint_at): Use int.
13707 (mips_collect_register, mips_supply_register)
13708 (mips_collect_register_32bit, mips_supply_register_32bit)
13709 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13710 (mips_store_fpregset, target_regsets): New.
13711 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13712
a13e2c95
UW
137132006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13714
13715 * configure.srv: Add target "spu*-*-*".
13716 * Makefile.in (clean): Remove reg-spu.c.
13717 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13718 * spu-low.c: New file.
13719
cb7283db
DJ
137202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13721
13722 * configure.ac: Correct td_thr_tls_get_addr test.
13723 * configure: Regenerated.
13724
89be2091
DJ
137252006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * linux-low.c (linux_wait_for_event): Reformat. Use the
13728 pass_signals array.
13729 * remote-utils.c (decode_address_to_semicolon): New.
13730 * server.c (pass_signals, handle_general_set): New.
13731 (handle_query): Mention QPassSignals for qSupported.
13732 (main): Call handle_general_set.
13733 * server.h (pass_signals, decode_address_to_semicolon): New.
13734
000ef4f0
DJ
137352006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13736
13737 * server.c (handle_query): Correct error handling for read_auxv.
13738
b7149293
UW
137392005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13740
13741 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13742 and srv_linux_thread_db to yes.
13743 * linux-s390-low.c (s390_fill_gregset): New function.
13744 (target_regsets): Define data structure.
13745
dae5f5cf
DJ
137462006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13749 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13750 * config.in, configure: Regenerated.
13751 * inferiors.c (gdb_id_to_thread): New function.
13752 (gdb_id_to_thread_id): Use it.
13753 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13754 * linux-low.h (struct process_info): Add th member.
13755 (thread_db_get_tls_address): New prototype.
13756 * remote-utils.c (decode_address): Make non-static.
13757 * server.c (handle_query): Handle qGetTLSAddr.
13758 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13759 * target.h (struct target_ops): Add get_tls_address.
13760 * thread-db.c (maybe_attach_thread): Save the thread handle.
13761 (thread_db_get_tls_address): New.
13762
32ca6d61
DJ
137632006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13764
13765 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13766 (linux_resume_one_process): Take a siginfo_t *. Update all
13767 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13768 (struct pending_signals): Add a siginfo_t.
13769 (linux_wait_for_process): Always set last_status.
13770 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13771 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13772 * linux-low.h (struct process_info): Add last_status.
13773
5ffff7c1
DJ
137742006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * remote-utils.c (try_rle): New function.
13777 (putpkt_binary): Use it.
13778
8695c747
DJ
137792006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13782 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13783 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13784 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13785 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13786 point registers.
13787
290fadea
RS
137882006-08-08 Richard Sandiford <richard@codesourcery.com>
13789
13790 * server.c (terminal_fd): New variable.
13791 (old_foreground_pgrp): Likewise.
13792 (restore_old_foreground_pgrp): New function.
13793 (start_inferior): Record the terminal file descriptor in terminal_fd
13794 and its original foreground group in old_foreground_pgrp. Register
13795 restore_old_foreground_pgrp with atexit().
13796
9f2e1e63
DJ
137972006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * server.c (handle_query): Correct qPart to qXfer.
13800
b80864fb
DJ
138012006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13802
13803 * configure.ac: Check for more headers which are missing on
13804 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13805 * configure.srv: Add Cygwin and mingw32.
13806 * remote-utils.c: Don't include headers unconditionally which
13807 are missing on mingw32. Include <winsock.h> for mingw32.
13808 (remote_open): Adjust for mingw32 support. Flush
13809 standard error after writing to it.
13810 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13811 (unblock_async_io, enable_async_io, disable_async_io)
13812 (readchar, getpkt): Update for Winsock support.
13813 (prepare_resume_reply): Expect a protocol signal number.
13814 * server.c: Disable <sys/wait.h> on mingw32.
13815 (start_inferior): Adjust for mingw32 support. Flush
13816 standard error after writing to it.
13817 (attach_inferior): Likewise. Use protocol signal
13818 numbers.
13819 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13820 and names.
13821 * win32-i386-low.c: New file.
13822 * Makefile.in (XM_CLIBS): Set.
13823 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13824 (win32-i386-low.o): New dependency rule.
13825 * linux-low.c (linux_wait): Use target signal numbers.
13826 * target.h (struct target_ops): Doc fix.
13827 * server.h (target_signal_to_name): New prototype.
13828 * gdbreplay.c: Don't include headers unconditionally which
13829 are missing on mingw32. Include <winsock.h> for mingw32.
13830 (remote_close, remote_open): Adjust for Winsock support.
13831 * configure, config.in: Regenerated.
13832
0876f84a
DJ
138332006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13834
13835 * server.c (decode_xfer_read, write_qxfer_response): New.
13836 (handle_query): Take a packet length argument. Handle
13837 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13838 the qSupported response.
13839 (main): Update call to handle_query.
13840
01f9e8fa
DJ
138412006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13842
13843 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13844 (putpkt_binary): Renamed from putpkt and adjusted for binary
13845 data.
13846 (putpkt): New wrapper for putpkt_binary.
13847 (readchar): Don't mask off the high bit.
13848 (decode_X_packet): New function.
13849 * server.c (main): Call putpkt_binary if a handler sets the packet
13850 length. Save the length of the incoming packet. Handle 'X'.
13851 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13852
be2a5f71
DJ
138532006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13854
13855 * server.c (handle_query): Handle qSupported.
13856
ea025f5f
DJ
138572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * remote-utils.c (all_symbols_looked_up): New variable.
13860 (look_up_one_symbol): Check it.
13861 * server.h (look_up_one_symbol): New declaration.
13862 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13863
9308fc88
DJ
138642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13865
13866 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13867 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13868 (PTRACE_GET_THREAD_AREA): Define.
13869 (ps_get_thread_area): New function.
13870
52fb6437
NS
138712006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13872
13873 * configure.srv (m68k*-*-uclinux*): New target.
13874 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13875 (linux_resume_one_process): Remove extraneous cast.
13876 (linux_read_offsets): New.
13877 (linux_target_op): Add linux_read_offsets on mmuless systems.
13878 * server.c (handle_query): Add qOffsets logic.
13879 * target.h (struct target_ops): Add read_offsets.
13880
21b0f40c
DJ
138812006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13882
13883 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13884 (PTRACE_GET_THREAD_AREA): Define.
13885 (ps_get_thread_area): New function.
13886 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13887 (linux-x86-64-low.o): Update.
13888
0050a760
DJ
138892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * configure.ac: Remove checks for prfpregset_t.
13892 * gdb_proc_service.h: New file.
13893 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13894 new "gdb_proc_service.h".
13895 * proc-service.c: Likewise.
13896 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13897 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13898 * Makefile.in (gdb_proc_service_h): Updated.
13899 * configure, config.in: Regenerated.
13900
b92a518e
DJ
139012006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13902
13903 * remote-utils.c (prepare_resume_reply): Move declaration
13904 of gdb_id_from_wait to the top of the block.
13905
545587ee
DJ
139062006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13907
13908 * linux-low.c (regsets_store_inferior_registers): Read the regset
13909 from the target before filling it.
13910
9db87ebd
DJ
139112006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * server.c (attach_inferior): Return SIGTRAP for a successful
13914 attach.
13915
dd24457d
DJ
139162006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * Makefile.in (OBS): Add version.o.
13919 (STAGESTUFF): Delete.
13920 (version.o): Add dependencies.
13921 (version.c): Replace rule.
13922 (clean): Remove version.c.
13923 * server.c (gdbserver_version): New.
13924 (gdbserver_usage): Use printf.
13925 (main): Handle --version and --help.
13926 * server.h (version, host_name): Add declarations.
13927
6f0f660e
EZ
139282005-12-23 Eli Zaretskii <eliz@gnu.org>
13929
889bf7c5
PA
13930 * linux-arm-low.c:
13931 * linux-arm-low.c:
13932 * inferiors.c:
13933 * i387-fp.h:
13934 * i387-fp.c:
13935 * gdbreplay.c:
13936 * regcache.c:
13937 * proc-service.c:
13938 * mem-break.h:
13939 * mem-break.c:
13940 * linux-x86-64-low.c:
13941 * linux-sh-low.c:
13942 * linux-s390-low.c:
13943 * linux-ppc64-low.c:
13944 * linux-ppc-low.c:
13945 * linux-mips-low.c:
13946 * linux-m68k-low.c:
13947 * linux-m32r-low.c:
13948 * linux-low.h:
13949 * linux-low.c:
13950 * linux-ia64-low.c:
13951 * linux-i386-low.c:
13952 * linux-crisv32-low.c:
13953 * thread-db.c:
13954 * terminal.h:
13955 * target.h:
13956 * target.c:
13957 * server.h:
13958 * server.c:
13959 * remote-utils.c:
13960 * regcache.h:
13961 * utils.c:
13962 * Makefile.in:
13963 * configure.ac:
6f0f660e
EZ
13964 * gdbserver.1: Add (C) after Copyright. Update the FSF
13965 address.
13966
9d1fb177
DJ
139672005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13968
13969 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13970 (arm_breakpoint_at): Recognize both breakpoints.
13971 (the_low_target): Use the correct breakpoint instruction.
13972
011a70c2
DJ
139732005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13974
13975 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13976 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13977 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13978 (the_low_target): Update.
13979
7fb85e41
AS
139802005-10-25 Andreas Schwab <schwab@suse.de>
13981
13982 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13983
13984 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13985 (ia64_num_regs): Reduce to 462.
13986
3db0444b
DJ
139872005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13988
13989 * acinclude.m4: Correct quoting.
13990 * aclocal.m4: Regenerated.
13991
13992 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13993 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13994 (thread_db_init): Call thread_db_err_str.
13995 * configure.ac: Check for TD_VERSION.
13996 * config.in, configure: Regenerated.
13997
bee0189a
DJ
139982005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13999
14000 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14001
e9d25b98
DJ
140022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14003
14004 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14005 is not available. Define HAVE_PTRACE_GETREGS if it is.
14006 * config.in, configure: Regenerated.
14007 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14008 * linux-i386-low.c, linux-m68k-low.c: Update to use
14009 HAVE_PTRACE_GETREGS.
14010 * linux-low.c (regsets_fetch_inferior_registers)
14011 (regsets_store_inferior_registers): Only return 0 if we processed
14012 GENERAL_REGS.
14013 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14014 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14015
a06660f7
DJ
140162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14017
14018 * inferiors.c (struct thread_info): Add gdb_id.
14019 (add_thread): Add gdb_id argument.
14020 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14021 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14022 calls to add_thread.
14023 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14024 * server.c (handle_query): Use thread_to_gdb_id.
14025 (handle_v_cont, main): Use gdb_id_to_thread_id.
14026 * server.h (add_thread): Update prototype.
14027 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14028 prototypes.
14029
5a1f5858
DJ
140302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14033 left-padded registers.
14034 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14035 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14036
e122f1f5
SE
140372005-07-01 Steve Ellcey <sje@cup.hp.com>
14038
14039 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14040 * configure: Regenerate.
14041 * config.in: Regenerate.
14042 * server.h (NEED_DECLARATION_STRERROR):
14043 Replace with !HAVE_DECL_STRERROR.
14044
d592fa2f
DJ
140452005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14046
14047 * linux-low.c (linux_wait, linux_send_signal): Don't test
14048 an unsigned long variable for > 0 if it could be MAX_ULONG.
14049 * server.c (myresume): Likewise.
14050 * target.c (set_desired_inferior): Likewise.
14051
ccbd4912
MK
140522005-06-13 Mark Kettenis <kettenis@gnu.org>
14053
14054 * configure.ac: Simplify and improve check for socklen_t.
14055 * configure, config.in: Regenerate.
14056
f450004a
DJ
140572005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * acconfig.h: Remove.
14060 * configure.ac: Add a test for socklen_t. Use three-argument
14061 AC_DEFINE throughout.
14062 * config.in: Regenerated using autoheader 2.59.
14063 * configure: Regenerated.
14064
14065 * gdbreplay.c (socklen_t): Provide a default.
14066 (remote_open): Use socklen_t.
14067 * remote-utils.c (socklen_t): Provide a default.
14068 (remote_open): Use socklen_t.
14069 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14070 unsigned char.
14071
14072 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14073 char for buffers.
14074 * linux-low.c (linux_read_memory, linux_write_memory)
14075 (linux_read_auxv): Likewise.
14076 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14077 (check_mem_write): Likewise.
14078 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14079 Likewise.
14080 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14081 (registers_from_string, register_data): Likewise.
14082 * server.c (handle_query, main): Likewise.
14083 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14084 (decode_M_packet): Likewise.
14085 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14086 * target.h (struct target_ops): Update read_memory, write_memory,
14087 and read_auxv.
14088 (read_inferior_memory, write_inferior_memory): Update.
14089 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14090 to unsigned char *.
14091 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14092 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14093 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14094 linux-s390-low.c, linux-sh-low.c: Update for changes in
14095 read_inferior_memory and the_low_target->breakpoint.
14096
eee84df1
DJ
140972005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14098
14099 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14100 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14101 * configure.srv: Add powerpc64-*-linux*.
14102 * linux-ppc64-low.c: New file.
14103
45b134e5
OF
141042005-05-23 Orjan Friberg <orjanf@axis.com>
14105
14106 * linux-cris-low.c: New file with support for CRIS.
14107 * linux-crisv32-low.c: Ditto for CRISv32.
14108 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14109 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14110 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14111 reg-crisv32.o, and reg-crisv32.c to make rules.
14112 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14113 recognized targets.
14114
48d93c75
UW
141152005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14116
14117 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14118 of sizeof (PTRACE_XFER_TYPE).
14119 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14120
e013ee27
OF
141212005-05-12 Orjan Friberg <orjanf@axis.com>
14122
889bf7c5 14123 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14124 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14125 pointers for hardware watchpoint support.
14126 * linux-low.h (struct linux_target_ops): Ditto.
14127 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14128 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14129 to linux_target_ops.
14130 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14131 reply packet.
14132 * server.c (main): Recognize 'Z' and 'z' packets.
14133
b0ded00b
UW
141342005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14135
14136 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14137 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14138 (the_low_target): Add new members.
14139
8643e2ad
DJ
141402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14141
14142 * proc-service.c (ps_lgetregs): Search all_processes instead of
14143 all_threads.
14144
fc620387
DJ
141452005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * server.c (start_inferior): Change return type to int.
14148 (attach_inferior): Change sigptr to int *.
14149 (handle_v_cont, handle_v_requests): Change signal to int *.
14150 (main): Change signal to int.
14151
141522005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14153
14154 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14155 * configure.srv: Add m32r*-*-linux*.
14156 * linux-m32r-low.c: New file.
14157
e0e76420
DJ
141582005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14159
14160 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14161
a1928bad
DJ
141622005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14163
14164 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14165 Take unsigned long arguments for PIDs.
14166 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14167 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14168 (wait_for_sigstop, linux_resume_one_process)
14169 (regsets_fetch_inferior_registers, linux_send_signal)
14170 (linux_read_auxv): Likewise. Update the types of variables holding
14171 PIDs. Update format string specifiers.
14172 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14173 * remote-utils.c (prepare_resume_reply): Likewise.
14174 * server.c (cont_thread, general_thread, step_thread)
14175 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14176 unsigned long.
14177 (handle_query): Update format specifiers.
14178 (handle_v_cont, main): Use strtoul for thread IDs.
14179 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14180 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14181 (general_thread, step_thread, thread_from_wait)
14182 (old_thread_from_wait): Update.
14183 * target.h (struct thread_resume): Use unsigned long for THREAD.
14184 (struct target_ops): Use unsigned long for arguments to attach and
14185 thread_alive.
14186
dcdb98d2
DJ
141872005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14188
14189 * acinclude.m4: Include bfd/bfd.m4 directly.
14190 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14191 <agriffis@toolchain.org>.
14192 * aclocal.m4, configure: Regenerated.
14193
bec39cab
AC
141942005-01-07 Andrew Cagney <cagney@gnu.org>
14195
14196 * configure.ac: Rename configure.in, require autoconf 2.59.
14197 * configure: Re-generate.
14198
434c4c77
DJ
141992004-12-08 Daniel Jacobowitz <dan@debian.org>
14200
14201 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14202 LIBS when finished.
14203 * aclocal.m4: Regenerated.
14204 * configure: Regenerated.
14205
db1d3e1b
AS
142062004-11-21 Andreas Schwab <schwab@suse.de>
14207
14208 * linux-m68k-low.c (m68k_num_gregs): Define.
14209 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14210 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14211 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14212 (m68k_breakpoint_at): New. Add to the_low_target.
14213
14214 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14215 srv_linux_thread_db to yes.
14216
43360365
JB
142172004-10-20 Joel Brobecker <brobecker@gnat.com>
14218
14219 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14220 (ARCH_SET_FS): Likewise.
14221 (ARCH_GET_FS): Likewise.
14222 (ARCH_GET_GS): Likewise.
14223
fd500816
DJ
142242004-10-16 Daniel Jacobowitz <dan@debian.org>
14225
14226 * linux-i386-low.c (ps_get_thread_area): New.
14227 * linux-x86-64-low.c (ps_get_thread_area): New.
14228 * linux-low.c: Include <sys/syscall.h>.
14229 (linux_kill_one_process): Don't kill the first thread here.
14230 (linux_kill): Kill the first thread here.
14231 (kill_lwp): New function.
14232 (send_sigstop, linux_send_signal): Use it.
14233 * proc-service.c: Clean up #ifdefs.
14234 (fpregset_info): Delete.
14235 (ps_lgetregs): Update and enable implementation.
14236 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14237 implementations.
14238 * remote-utils.c (struct sym_cache, symbol_cache): New.
14239 (input_interrupt): Print a clearer message.
14240 (async_io_enabled): New variable.
14241 (enable_async_io, disable_async_io): Use it. Update comments.
14242 (look_up_one_symbol): Use the symbol cache.
14243 * thread-db.c (thread_db_look_up_symbols): New function.
14244 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14245
f6de3c42
DJ
142462004-10-16 Daniel Jacobowitz <dan@debian.org>
14247
14248 * configure.in: Test for -rdynamic.
14249 * configure: Regenerated.
14250 * Makefile (INTERNAL_LDFLAGS): New.
14251 (gdbserver, gdbreplay): Use it.
14252
2c0fc042
AC
142532004-09-02 Andrew Cagney <cagney@gnu.org>
14254
14255 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14256
075b3282
DJ
142572004-03-23 Daniel Jacobowitz <drow@mvista.com>
14258
14259 * linux-low.c (linux_wait): Clear all_processes list also.
14260
fa6a77dc
DJ
142612004-03-12 Daniel Jacobowitz <drow@mvista.com>
14262
14263 * linux-low.c: Include <errno.h>. Remove extern declaration of
14264 errno.
14265
6d782a97
DJ
142662004-03-12 Daniel Jacobowitz <drow@mvista.com>
14267
14268 * gdbreplay.c, server.h, utils.c: Update copyright years.
14269
3a7fb99b
DJ
142702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14271
14272 * server.c (main): Print child status or termination signal from
14273 variable 'signal', not 'sig'.
14274
c3e735a6
DJ
142752004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14276
14277 * linux-low.c (linux_read_memory): Change return type to
14278 int. Check for and return error from ptrace().
14279 * target.c (read_inferior_memory): Change return type to int. Pass
14280 back return status from the_target->read_memory().
14281 * target.h (struct target_ops): Adapt *read_memory() prototype.
14282 Update comment.
14283 (read_inferior_memory): Adapt prototype.
14284 * server.c (main): Return an error packet if
14285 read_inferior_memory() returns an error.
14286
a59d1c82
DJ
142872004-03-04 Daniel Jacobowitz <drow@mvista.com>
14288
14289 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14290 Unify with other clean targets.
14291
dc3f8883
DJ
142922004-02-29 Daniel Jacobowitz <drow@mvista.com>
14293
14294 * server.c (handle_v_cont): Call set_desired_inferior.
14295
89a208da
DJ
142962004-02-29 Daniel Jacobowitz <drow@mvista.com>
14297
14298 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14299
62ea82f5
DJ
143002004-02-29 Daniel Jacobowitz <drow@mvista.com>
14301
14302 * linux-low.c (linux_wait): Unblock async I/O.
14303 (linux_resume): Block and enable async I/O.
14304 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14305 * server.h (block_async_io, unblock_async_io): Add prototypes.
14306
6910d122
DJ
143072004-02-29 Daniel Jacobowitz <drow@mvista.com>
14308
14309 * remote-utils.c (remote_open): Print a status notice after
14310 opening a TCP port.
14311 * server.c (attach_inferior): Print a status notice after
14312 attaching.
14313
143142004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14315
14316 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14317
c89dc5d4
DJ
143182004-02-26 Daniel Jacobowitz <drow@mvista.com>
14319
14320 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14321 error packet.
14322 * server.c, target.h: Update copyright years.
14323
4b8dad4a
RM
143242004-02-25 Roland McGrath <roland@redhat.com>
14325
14326 * target.h (struct target_ops): New member `read_auxv'.
14327 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14328 * linux-low.c (linux_read_auxv): New function.
14329 (linux_target_ops): Initialize `read_auxv' member to that.
14330
d7446758
JB
143312004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14332
14333 Committed by Jim Blandy <jimb@redhat.com>.
14334
14335 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14336 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14337 instead of GPR_SIZE to distiguish s390 and s390x targets.
14338
5544ad89
DJ
143392004-01-31 Daniel Jacobowitz <drow@mvista.com>
14340
14341 * linux-low.c: Update copyright year.
14342 (check_removed_breakpoint): Clear pending_is_breakpoint.
14343 (linux_set_resume_request, linux_queue_one_thread)
14344 (resume_status_pending_p): New functions.
14345 (linux_continue_one_thread): Use process->resume.
14346 (linux_resume): Only resume threads if there are no pending events.
14347 * linux-low.h (struct process_info): Add resume request
14348 pointer.
14349
2a68b70e
DJ
143502004-01-30 Daniel Jacobowitz <drow@mvista.com>
14351
14352 * regcache.c (new_register_cache): Clear the allocated register
14353 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14354
64386c31
DJ
143552003-10-13 Daniel Jacobowitz <drow@mvista.com>
14356
14357 * linux-low.c (linux_resume): Take a struct thread_resume *
14358 argument.
14359 (linux_wait): Update call.
14360 (resume_ptr): New static variable.
14361 (linux_continue_one_thread): Renamed from
14362 linux_continue_one_process. Use resume_ptr.
14363 (linux_resume): Use linux_continue_one_thread.
14364 * server.c (handle_v_cont, handle_v_requests): New functions.
14365 (myresume): New function.
14366 (main): Handle 'v' case.
14367 * target.h (struct thread_resume): New type.
14368 (struct target_ops): Change argument of "resume" to struct
14369 thread_resume *.
14370 (myresume): Delete macro.
14371
c938e9b0
L
143722003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14373
14374 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14375 (uninstall): Support DESTDIR.
14376
7f313d07
BC
14377Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14378
14379 * configure.srv: Add xscale*linux copy of arm*linux entry.
14380
3b2fc2ea
DJ
143812003-07-24 Daniel Jacobowitz <drow@mvista.com>
14382
14383 * linux-arm-low.c (arm_reinsert_addr): New function.
14384 (the_low_target): Add arm_reinsert_addr.
14385
1c0a559e
MK
143862003-07-08 Mark Kettenis <kettenis@gnu.org>
14387
14388 * mem-break.c: Remove whitespace at end of file.
14389
43d5792c
DJ
143902003-06-28 Daniel Jacobowitz <drow@mvista.com>
14391
14392 * configure.in: Check whether we need to prototype strerror.
14393 * server.h: Optionally prototype strerror.
14394 * gdbreplay.c (perror_with_name): Use strerror.
14395 * linux-low.c (linux_attach_lwp): Use strerror.
14396 * utils.c (perror_with_name): Use strerror.
14397 * config.in, configure: Regenerated.
14398
c8a86edf
DJ
143992003-06-28 Daniel Jacobowitz <drow@mvista.com>
14400
14401 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14402 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14403
73d37363
DJ
144042003-06-20 Daniel Jacobowitz <drow@mvista.com>
14405
14406 * Makefile.in (SFILES): Update.
14407 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14408 low-sun3.c: Remove files.
14409
6ad8ae5c
DJ
144102003-06-17 Daniel Jacobowitz <drow@mvista.com>
14411
14412 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14413 (linux_detach_one_process, linux_detach): New functions.
14414 (linux_target_ops): Add linux_detach.
14415 * server.c (main): Handle 'D' packet.
14416 * target.h (struct target_ops): Add "detach" member.
14417 (detach_inferior): Define.
14418
1581182a
MK
144192003-06-13 Mark Kettenis <kettenis@gnu.org>
14420
14421 From Kelley Cook <kelleycook@wideopenwest.com>:
14422 * configure.srv: Accept i[34567]86 variants.
14423
e5379b03
DJ
144242003-06-05 Daniel Jacobowitz <drow@mvista.com>
14425
14426 * linux-low.c (linux_wait_for_event): Correct comment typos.
14427 (linux_resume_one_process): Call check_removed_breakpoint.
14428 (linux_send_signal): New function.
14429 (linux_target_ops): Add linux_send_signal.
14430 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14431 of kill.
14432 * target.h (struct target_ops): Add send_signal.
14433
2ff29de4
JB
144342003-05-29 Jim Blandy <jimb@redhat.com>
14435
14436 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14437 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14438 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14439 away part of the register's value.
14440
254787d4
DJ
144412003-03-26 Daniel Jacobowitz <drow@mvista.com>
14442
14443 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14444 (linux_wait_for_event, linux_init_signals): Likewise.
14445
94e10508
DJ
144462003-03-17 Daniel Jacobowitz <drow@mvista.com>
14447
14448 * configure.in: Check for stdlib.h.
14449 * configure: Regenerated.
14450 * config.in: Regenerated.
14451
4c0711e0
DJ
144522003-01-04 Andreas Schwab <schwab@suse.de>
14453
14454 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14455
ef66e766
AC
144562003-01-02 Andrew Cagney <ac131313@redhat.com>
14457
14458 * Makefile.in: Remove obsolete code.
14459
a1358604
DJ
144602002-11-20 Daniel Jacobowitz <drow@mvista.com>
14461
14462 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14463 defined(PT_FPR0_HI).
14464
23ce3b1c
DJ
144652002-11-17 Stuart Hughes <seh@zee2.com>
14466
14467 * linux-arm-low.c (arm_num_regs): Increase.
14468 (arm_regmap): Include status register.
14469
144702002-11-17 Daniel Jacobowitz <drow@mvista.com>
14471
14472 * linux-low.c (register_addr): Remove incorrect -1 check.
14473
a9fa9f7d
DJ
144742002-08-29 Daniel Jacobowitz <drow@mvista.com>
14475
14476 * linux-low.c (linux_create_inferior): Call setpgid. Return
14477 the new PID.
14478 (unstopped_p, linux_signal_pid): Remove.
14479 (linux_target_ops): Remove linux_signal_pid.
14480 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14481 global instead of target method.
14482 * target.h (struct target_ops): Remove signal_pid. Update comment
14483 for create_inferior.
14484 * server.c (signal_pid): New variable.
14485 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14486 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14487 (attach_inferior): Set signal_pid.
14488
17574093
DJ
144892002-08-23 Daniel Jacobowitz <drow@mvista.com>
14490
14491 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14492
144932002-08-20 Jim Blandy <jimb@redhat.com>
14494
14495 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14496 default for this.
14497
144982002-08-01 Andrew Cagney <cagney@redhat.com>
14499
14500 * Makefile.in: Make chill references obsolete.
14501
145022002-07-24 Kevin Buettner <kevinb@redhat.com>
14503
14504 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14505 * configure: Regenerate.
14506 * config.in: Regenerate.
14507
145082002-07-09 David O'Brien <obrien@FreeBSD.org>
14509
14510 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14511 (perror_with_name, remote_close, remote_open, expect, play): Static.
14512
145132002-07-04 Michal Ludvig <mludvig@suse.cz>
14514
4b8dad4a 14515 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14516 byte offsets instead of an array of indexes.
14517 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14518
145192002-06-13 Daniel Jacobowitz <drow@mvista.com>
14520
14521 * regcache.c: Add comment.
14522
145232002-06-11 Daniel Jacobowitz <drow@mvista.com>
14524
14525 * thread-db.c: New file.
14526 * proc-service.c: New file.
14527 * acinclude.m4: New file.
14528 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14529 proc-service.o, and thread-db.o.
14530 (linux-low.o): Add USE_THREAD_DB.
14531 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14532 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14533 * aclocal.m4: Regenerated.
14534 * config.in: Regenerated.
14535 * configure: Regenerated.
14536 * configure.in: Check for proc_service.h, sys/procfs.h,
14537 thread_db.h, and linux/elf.h headrs.
14538 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14539 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14540 Check for -lthread_db and thread support.
14541 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14542 PowerPC, and SuperH.
14543 * i387-fp.c: Constify arguments.
14544 * i387-fp.h: Likewise.
14545 * inferiors.c: (struct thread_info): Renamed from
14546 `struct inferior_info'. Remove PID member. Use generic inferior
14547 list header. All uses updated.
14548 (inferiors, signal_pid): Removed.
14549 (all_threads): New variable.
14550 (get_thread): Define.
14551 (add_inferior_to_list): New function.
14552 (for_each_inferior): New function.
14553 (change_inferior_id): New function.
14554 (add_inferior): Removed.
14555 (remove_inferior): New function.
14556 (add_thread): New function.
14557 (free_one_thread): New function.
14558 (remove_thread): New function.
14559 (clear_inferiors): Use for_each_inferior and free_one_thread.
14560 (find_inferior): New function.
14561 (find_inferior_id): New function.
14562 (inferior_target_data): Update argument type.
14563 (set_inferior_target_data): Likewise.
14564 (inferior_regcache_data): Likewise.
14565 (set_inferior_regcache_data): Likewise.
14566 * linux-low.c (linux_bp_reinsert): Remove.
14567 (all_processes, stopping_threads, using_thrads)
14568 (struct pending_signals, debug_threads, pid_of): New.
14569 (inferior_pid): Replace with macro.
14570 (struct inferior_linux_data): Remove.
14571 (get_stop_pc, add_process): New functions.
14572 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14573 Use add_process and add_thread.
14574 (linux_attach_lwp): New function, based on old linux_attach. Use
14575 add_process and add_thread. Set stop_expected for new threads.
14576 (linux_attach): New function.
14577 (linux_kill_one_process): New function.
14578 (linux_kill): Kill all LWPs.
14579 (linux_thread_alive): Use find_inferior_id.
14580 (check_removed_breakpoints, status_pending_p): New functions.
14581 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14582 Update. Use WNOHANG. Wait for cloned processes also. Update process
14583 struct for the found process.
14584 (linux_wait_for_event): New function.
14585 (linux_wait): Use it. Support LWPs.
14586 (send_sigstop, wait_for_sigstop, stop_all_processes)
14587 (linux_resume_one_process, linux_continue_one_process): New functions.
14588 (linux_resume): Support LWPs.
14589 (REGISTER_RAW_SIZE): Remove.
14590 (fetch_register): Use register_size instead. Call supply_register.
14591 (usr_store_inferior_registers): Likewise. Call collect_register.
14592 Fix recursive case.
14593 (regsets_fetch_inferior_registers): Improve error message.
14594 (regsets_store_inferior_registers): Add debugging.
14595 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14596 (unstopped_p, linux_signal_pid): New functions.
14597 (linux_target_ops): Add linux_signal_pid.
14598 (linux_init_signals): New function.
14599 (initialize_low): Call it. Initialize using_threads.
14600 * regcache.c (inferior_regcache_data): Add valid
14601 flag.
14602 (get_regcache): Fetch registers lazily. Add fetch argument
14603 and update all callers.
14604 (regcache_invalidate_one, regcache_invalidate): New
14605 functions.
14606 (new_register_cache): Renamed from create_register_cache.
14607 Return the new regcache.
14608 (free_register_cache): Change argument to a void *.
14609 (registers_to_string, registers_from_string): Call get_regcache
14610 with fetch flag set.
14611 (register_data): Make static. Pass fetch flag to get_regcache.
14612 (supply_register): Call get_regcache with fetch flag clear.
14613 (collect_register): Call get_regcache with fetch flag set.
14614 (collect_register_as_string): New function.
14615 * regcache.h: Update.
14616 * remote-utils.c (putpkt): Flush after debug output and use
14617 stderr.
14618 Handle input interrupts while waiting for an ACK.
14619 (input_interrupt): Use signal_pid method.
14620 (getpkt): Flush after debug output and use stderr.
14621 (outreg): Use collect_register_as_string.
14622 (new_thread_notify, dead_thread_notify): New functions.
14623 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14624 and general_thread.
14625 (look_up_one_symbol): Flush after debug output.
14626 * server.c (step_thread, server_waiting): New variables.
14627 (start_inferior): Don't use signal_pid. Update call to mywait.
14628 (attach_inferior): Update call to mywait.
14629 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14630 (main): Don't fetch/store registers explicitly. Use
14631 set_desired_inferior. Support proposed ``Hs'' packet. Update
14632 calls to mywait.
14633 * server.h: Update.
14634 (struct inferior_list, struct_inferior_list_entry): New.
14635 * target.c (set_desired_inferior): New.
14636 (write_inferior_memory): Constify.
14637 (mywait): New function.
14638 * target.h: Update.
14639 (struct target_ops): New signal_pid method.
14640 (mywait): Removed macro, added prototype.
14641
14642 * linux-low.h (regset_func): Removed.
14643 (regset_fill_func, regset_store_func): New.
14644 (enum regset_type): New.
14645 (struct regset_info): Add type field. Use new operation types.
14646 (struct linux_target_ops): stop_pc renamed to get_pc.
14647 Add decr_pc_after_break and breakpoint_at.
14648 (get_process, get_thread_proess, get_process_thread)
14649 (strut process_info, all_processes, linux_attach_lwp)
14650 (thread_db_init): New.
14651
14652 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14653 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14654 (the_low_target): Add new members.
14655 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14656 (i386_store_fpxregset): Constify.
14657 (target_regsets): Add new kind identifier.
14658 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14659 (i386_set_pc): Add debugging.
14660 (i386_breakpoint_at): New function.
14661 (the_low_target): Add new members.
14662 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14663 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14664 (mips_breakpoint_at): New.
14665 (the_low_target): Add new members.
14666 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14667 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14668 (the_low_target): Add new members.
14669 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14670 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14671 (the_low_target): Add new members.
14672 * linux-x86-64-low.c (target_regsets): Add new kind
14673 identifier.
14674
146752002-05-15 Daniel Jacobowitz <drow@mvista.com>
14676
14677 From Martin Pool <mbp@samba.org>:
14678 * server.c (gdbserver_usage): New function.
14679 (main): Call it.
14680
146812002-05-14 Daniel Jacobowitz <drow@mvista.com>
14682
14683 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14684 stop_at -> stop_pc.
14685
146862002-05-04 Andrew Cagney <ac131313@redhat.com>
14687
14688 * Makefile.in: Remove obsolete code.
14689
146902002-04-24 Michal Ludvig <mludvig@suse.cz>
14691
14692 * linux-low.c (regsets_fetch_inferior_registers),
14693 (regsets_store_inferior_registers): Removed cast to int from
14694 ptrace() calls.
14695 * regcache.h: Added declaration of struct inferior_info.
14696
146972002-04-20 Daniel Jacobowitz <drow@mvista.com>
14698
14699 * inferiors.c (struct inferior_info): Add regcache_data.
14700 (add_inferior): Call create_register_cache.
14701 (clear_inferiors): Call free_register_cache.
14702 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14703 * regcache.c (struct inferior_regcache_data): New.
14704 (registers): Remove.
14705 (get_regcache): New function.
14706 (create_register_cache, free_register_cache): New functions.
14707 (set_register_cache): Don't initialize the register cache here.
14708 (registers_to_string, registers_from_string, register_data): Call
14709 get_regcache.
14710 * regcache.h: Add prototypes.
14711 * server.h: Likewise.
14712
147132002-04-20 Daniel Jacobowitz <drow@mvista.com>
14714
14715 * mem-break.c: New file.
14716 * mem-break.h: New file.
14717 * Makefile.in: Add mem-break.o rule; update server.h
14718 dependencies.
14719 * inferiors.c (struct inferior_info): Add target_data
14720 member.
14721 (clear_inferiors): Free target_data member if set.
14722 (inferior_target_data, set_inferior_target_data): New functions.
14723 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14724 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14725 * linux-low.c (linux_bp_reinsert): New variable.
14726 (struct inferior_linux_data): New.
14727 (linux_create_inferior): Use set_inferior_target_data.
14728 (linux_attach): Likewise. Call add_inferior.
14729 (linux_wait_for_one_inferior): New function.
14730 (linux_wait): Call it.
14731 (linux_write_memory): Add const.
14732 (initialize_low): Call set_breakpoint_data.
14733 * linux-low.h (struct linux_target_ops): Add breakpoint
14734 handling members.
14735 * server.c (attach_inferior): Remove extra add_inferior
14736 call.
14737 * server.h: Include mem-break.h. Update inferior.c
14738 prototypes.
14739 * target.c (read_inferior_memory)
14740 (write_inferior_memory): New functions.
14741 * target.h (read_inferior_memory)
14742 (write_inferior_memory): Change macros to prototypes.
14743 (struct target_ops): Update comments. Add const to write_memory
14744 definition.
14745
147462002-04-11 Daniel Jacobowitz <drow@mvista.com>
14747
14748 * linux-low.c (usr_store_inferior_registers): Support
14749 registers which are allowed to fail to store.
14750 * linux-low.h (linux_target_ops): Likewise.
14751 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14752 (ppc_cannot_store_register): FPSCR may not be storable.
14753
147542002-04-09 Daniel Jacobowitz <drow@mvista.com>
14755
14756 * server.h: Include <string.h> if HAVE_STRING_H.
14757 * ChangeLog: Correct paths in last ChangeLog entry.
14758
147592002-04-09 Daniel Jacobowitz <drow@mvista.com>
14760
14761 * linux-low.h: Remove obsolete prototypes.
14762 (struct linux_target_ops): New.
14763 (extern the_low_target): New.
14764 * linux-low.c (num_regs, regmap): Remove declarations.
14765 (register_addr): Use the_low_target explicitly.
14766 (fetch_register): Likewise.
14767 (usr_fetch_inferior_registers): Likewise.
14768 (usr_store_inferior_registers): Likewise.
14769 * linux-arm-low.c (num_regs): Remove.
14770 (arm_num_regs): Define.
14771 (arm_regmap): Renamed from regmap, made static.
14772 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14773 made static.
14774 (arm_cannot_store_register): Renamed from cannot_store_register,
14775 made static.
14776 (the_low_target): New.
14777 * linux-i386-low.c (num_regs): Remove.
14778 (i386_num_regs): Define.
14779 (i386_regmap): Renamed from regmap, made static.
14780 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14781 made static.
14782 (i386_cannot_store_register): Renamed from cannot_store_register,
14783 made static.
14784 (the_low_target): New.
14785 * linux-ia64-low.c (num_regs): Remove.
14786 (ia64_num_regs): Define.
14787 (ia64_regmap): Renamed from regmap, made static.
14788 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14789 made static.
14790 (ia64_cannot_store_register): Renamed from cannot_store_register,
14791 made static.
14792 (the_low_target): New.
14793 * linux-m68k-low.c (num_regs): Remove.
14794 (m68k_num_regs): Define.
14795 (m68k_regmap): Renamed from regmap, made static.
14796 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14797 made static.
14798 (m68k_cannot_store_register): Renamed from cannot_store_register,
14799 made static.
14800 (the_low_target): New.
14801 * linux-mips-low.c (num_regs): Remove.
14802 (mips_num_regs): Define.
14803 (mips_regmap): Renamed from regmap, made static.
14804 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14805 made static.
14806 (mips_cannot_store_register): Renamed from cannot_store_register,
14807 made static.
14808 (the_low_target): New.
14809 * linux-ppc-low.c (num_regs): Remove.
14810 (ppc_num_regs): Define.
14811 (ppc_regmap): Renamed from regmap, made static.
14812 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14813 made static.
14814 (ppc_cannot_store_register): Renamed from cannot_store_register,
14815 made static.
14816 (the_low_target): New.
14817 * linux-s390-low.c (num_regs): Remove.
14818 (s390_num_regs): Define.
14819 (s390_regmap): Renamed from regmap, made static.
14820 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14821 made static.
14822 (s390_cannot_store_register): Renamed from cannot_store_register,
14823 made static.
14824 (the_low_target): New.
14825 * linux-sh-low.c (num_regs): Remove.
14826 (sh_num_regs): Define.
14827 (sh_regmap): Renamed from regmap, made static.
14828 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14829 made static.
14830 (sh_cannot_store_register): Renamed from cannot_store_register,
14831 made static.
14832 (the_low_target): New.
14833 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14834 (the_low_target): New.
14835
148362002-04-09 Daniel Jacobowitz <drow@mvista.com>
14837
14838 * Makefile.in: Add stamp-h target.
14839 * configure.in: Create stamp-h.
14840 * configure: Regenerated.
14841
148422002-04-09 Daniel Jacobowitz <drow@mvista.com>
14843
14844 * inferiors.c: New file.
14845 * target.c: New file.
14846 * target.h: New file.
14847 * Makefile.in: Add target.o and inferiors.o. Update
14848 dependencies.
14849 * linux-low.c (inferior_pid): New static variable,
14850 moved from server.c.
14851 (linux_create_inferior): Renamed from create_inferior.
14852 Call add_inferior. Return 0 on success instead of a PID.
14853 (linux_attach): Renamed from myattach.
14854 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14855 (linux_thread_alive): Renamed from mythread_alive.
14856 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14857 child dies.
14858 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14859 (regsets_store_inferior_registers): Correct error message.
14860 Add missing ``return 0''.
14861 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14862 (linux_store_registers): Renamed from store_inferior_registers.
14863 (linux_read_memory): Renamed from read_inferior_memory.
14864 (linux_write_memory): Renamed from write_inferior_memory.
14865 (linux_target_ops): New structure.
14866 (initialize_low): Call set_target_ops ().
14867 * remote-utils.c (unhexify): New function.
14868 (hexify): New function.
14869 (input_interrupt): Send signals to ``signal_pid''.
14870 * server.c (inferior_pid): Remove.
14871 (start_inferior): Update create_inferior call.
14872 (attach_inferior): Call add_inferior.
14873 (handle_query): New function.
14874 (main): Call handle_query for `q' packets.
14875 * server.h: Include "target.h". Remove obsolete prototypes.
14876 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14877
148782002-04-09 Daniel Jacobowitz <drow@mvista.com>
14879
14880 * Makefile.in: Add WARN_CFLAGS. Update configury
14881 dependencies.
14882 * configure.in: Check for <string.h>
14883 * configure: Regenerate.
14884 * config.in: Regenerate.
14885 * gdbreplay.c: Include needed system headers.
14886 (remote_open): Remove strchr prototype.
14887 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14888 * regcache.c (supply_register): Change buf argument to const void *.
14889 (supply_register_by_name): Likewise.
14890 (collect_register): Change buf argument to void *.
14891 (collect_register_by_name): Likewise.
14892 * regcache.h: Add missing prototypes.
14893 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14894 * server.c (handle_query): New function.
14895 (attached): New static variable, moved out of main.
14896 (main): Quiet longjmp clobber warnings.
14897 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14898 * utils.c (error): Remove NORETURN.
14899 (fatal): Likewise.