]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
436252de
SM
12017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (handle_v_cont): Initialize thread_resume::thread
4 with null_ptid.
5
9bf2a700
PA
62017-04-05 Pedro Alves <palves@redhat.com>
7
8 * configure: Regenerate.
9
a121b7c1
PA
102017-04-05 Pedro Alves <palves@redhat.com>
11
12 * gdbreplay.c (sync_error): Constify.
13 * linux-x86-low.c (push_opcode): Constify.
14
21c8a587
PA
152017-04-05 Pedro Alves <palves@redhat.com>
16
17 * win32-low.c (get_child_debug_event)
18 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
19 Report TARGET_WAITKIND_SPURIOUS instead.
20
fb32b4f7
PA
212017-04-05 Pedro Alves <palves@redhat.com>
22
23 * remote-utils.c (remote_prepare, remote_open): Constify.
24 * remote-utils.h (remote_prepare, remote_open): Constify.
25 * server.c (captured_main): Constify 'port' handling.
26
65dd1e59
SM
272017-04-04 Simon Marchi <simon.marchi@ericsson.com>
28
29 * Makefile.in (clean): Clear .deps.
30
8fa5b777
SM
312017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * .gitignore: Remove generated files, replace with wildcard.
34 * (clean): Replace removal of generated files with wildcard.
35 (version.c): Replace with...
36 (version-generated.c): ...this.
37 (xml-builtin.c): Replace with...
38 (xml-builtin-generated.c): ...this.
39 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
40 (%.c: *regformats*): Replace with...
41 (%-generated.c: *regformats*): ...this.
42
a12e714b
MF
432017-03-27 Max Filippov <jcmvbkbc@gmail.com>
44
45 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
46 (xtensa_fill_gregset): Call collect_register_by_name for
47 threadptr register.
48 (xtensa_store_gregset): Call supply_register_by_name for
49 threadptr register.
50
1a09b50a
MF
512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
52
53 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
54 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
55 (xtensa_store_gregset): Call supply_register for all registers in
56 a0_regnum..a0_regnum + C0_NREGS range.
57
1a01e7c6
SM
582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
59
60 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
61 (ax-ipa.o: ax.c): Remove.
62 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
63 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
64 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
65 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
66 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
67
36bc18a8
SM
682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
71 (print-utils-ipa.o: ../common/print-utils.c): Remove.
72 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
73 (errors-ipa.o: ../common/errors.c): Remove.
74 (format-ipa.o: ../common/format.c): Remove.
75 (common-utils-ipa.o: ../common/common-utils.c): Remove.
76
a8ebe3d5
SM
772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * Makefile.in (%-ipa.o: %.c): New rule.
80 (tracepoint-ipa.o: tracepoint.c): Remove.
81 (utils-ipa.o: utils.c): Remove.
82 (remote-utils-ipa.o: remote-utils.c): Remove.
83 (regcache-ipa.o: regcache.c): Remove.
84 (i386-linux-ipa.o: i386-linux.c): Remove.
85 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
86 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
87 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
88 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
89 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
90 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
91 (amd64-linux-ipa.o: amd64-linux.c): Remove.
92 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
93 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
94 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
95 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
96 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
97 (aarch64-ipa.o: aarch64.c): Remove.
98 (s390-linux32-ipa.o: s390-linux32.c): Remove.
99 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
100 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
101 (s390-linux64-ipa.o: s390-linux64.c): Remove.
102 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
103 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
104 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
105 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
106 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
107 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
108 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
109 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
110 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
111 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
112 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
113 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
114 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
115 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
116 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
117 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
118 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
119 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
120 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
121 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
122 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
123 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
124 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
125 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
126 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
127 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
128 (tdesc-ipa.o: tdesc.c): Remove.
129 (x32-linux-ipa.o: x32-linux.c): Remove.
130 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
131 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
132
50cfacb7
SM
1332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
134
135 * Makefile.in (%.o: ../arch/%.c): New rule.
136 (arm.o: ../arch/arm.c): Remove.
137 (arm-linux.o: ../arch/arm-linux.c): Remove.
138 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
139 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
140
c5a22423
SM
1412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
142
143 * Makefile.in (%.o: ../nat/%.c): New rule.
144 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
145 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
146 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
147 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
148 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
149 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
150 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
151 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
152 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
153 (linux-personality.o: ../nat/linux-personality.c): Remove.
154 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
155 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
156 (x86-linux.o: ../nat/x86-linux.c): Remove.
157 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
158 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
159
6bda016b
SM
1602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
161
162 * Makefile.in (%.o: ../common/%.c): New rule.
163 (signals.o: ../common/signals.c): Remove.
164 (print-utils.o: ../common/print-utils.c): Remove.
165 (rsp-low.o: ../common/rsp-low.c): Remove.
166 (common-utils.o: ../common/common-utils.c): Remove.
167 (posix-strerror.o: ../common/posix-strerror.c): Remove.
168 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
169 (vec.o: ../common/vec.c): Remove.
170 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
171 (xml-utils.o: ../common/xml-utils.c): Remove.
172 (ptid.o: ../common/ptid.c): Remove.
173 (buffer.o: ../common/buffer.c): Remove.
174 (format.o: ../common/format.c): Remove.
175 (filestuff.o: ../common/filestuff.c): Remove.
176 (agent.o: ../common/agent.c): Remove.
177 (errors.o: ../common/errors.c): Remove.
178 (environ.o: ../common/environ.c): Remove.
179 (common-debug.o: ../common/common-debug.c): Remove.
180 (cleanups.o: ../common/cleanups.c): Remove.
181 (common-exceptions.o: ../common/common-exceptions.c): Remove.
182 (fileio.o: ../common/fileio.c): Remove.
183 (common-regcache.o: ../common/common-regcache.c): Remove.
184 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
185 (new-op.o: ../common/new-op.c): Remove.
186 (btrace-common.o: ../common/btrace-common.c): Remove.
187
21122961
SM
1882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
189
190 * Makefile.in (%.o: ../target/%.c): New rule.
191 (waitstatus.o: ../target/waitstatus.c): Remove.
192
c362e621
SM
1932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * Makefile.in
196 (%.c: ../regformats/%.dat,
197 (%.c: ../regformats/arm/%.dat,
198 (%.c: ../regformats/i386/%.dat,
199 (%.c: ../regformats/rs6000/%.dat): New rules.
200 (aarch64.c): Remove.
201 (reg-arm.c): Remove.
202 (arm-with-iwmmxt.c): Remove.
203 (arm-with-vfpv2.c): Remove.
204 (arm-with-vfpv3.c): Remove.
205 (arm-with-neon.c): Remove.
206 (reg-bfin.c): Remove.
207 (reg-cris.c): Remove.
208 (reg-crisv32.c): Remove.
209 (i386.c): Remove.
210 (i386-linux.c): Remove.
211 (i386-avx.c): Remove.
212 (i386-avx-linux.c): Remove.
213 (i386-avx-avx512.c): Remove.
214 (i386-avx-avx512-linux.c): Remove.
215 (i386-mpx.c): Remove.
216 (i386-mpx-linux.c): Remove.
217 (i386-avx-mpx-avx512-pku.c): Remove.
218 (i386-avx-mpx-avx512-pku-linux.c): Remove.
219 (i386-avx-mpx.c): Remove.
220 (i386-avx-mpx-linux.c): Remove.
221 (i386-mmx.c): Remove.
222 (i386-mmx-linux.c): Remove.
223 (reg-ia64.c): Remove.
224 (reg-m32r.c): Remove.
225 (reg-m68k.c): Remove.
226 (reg-cf.c): Remove.
227 (mips-linux.c): Remove.
228 (mips-dsp-linux.c): Remove.
229 (mips64-linux.c): Remove.
230 (mips64-dsp-linux.c): Remove.
231 (nios2-linux.c): Remove.
232 (powerpc-32.c): Remove.
233 (powerpc-32l.c): Remove.
234 (powerpc-altivec32l.c): Remove.
235 (powerpc-cell32l.c): Remove.
236 (powerpc-vsx32l.c): Remove.
237 (powerpc-isa205-32l.c): Remove.
238 (powerpc-isa205-altivec32l.c): Remove.
239 (powerpc-isa205-vsx32l.c): Remove.
240 (powerpc-e500l.c): Remove.
241 (powerpc-64l.c): Remove.
242 (powerpc-altivec64l.c): Remove.
243 (powerpc-cell64l.c): Remove.
244 (powerpc-vsx64l.c): Remove.
245 (powerpc-isa205-64l.c): Remove.
246 (powerpc-isa205-altivec64l.c): Remove.
247 (powerpc-isa205-vsx64l.c): Remove.
248 (s390-linux32.c): Remove.
249 (s390-linux32v1.c): Remove.
250 (s390-linux32v2.c): Remove.
251 (s390-linux64.c): Remove.
252 (s390-linux64v1.c): Remove.
253 (s390-linux64v2.c): Remove.
254 (s390-te-linux64.c): Remove.
255 (s390-vx-linux64.c): Remove.
256 (s390-tevx-linux64.c): Remove.
257 (s390x-linux64.c): Remove.
258 (s390x-linux64v1.c): Remove.
259 (s390x-linux64v2.c): Remove.
260 (s390x-te-linux64.c): Remove.
261 (s390x-vx-linux64.c): Remove.
262 (s390x-tevx-linux64.c): Remove.
263 (tic6x-c64xp-linux.c): Remove.
264 (tic6x-c64x-linux.c): Remove.
265 (tic6x-c62x-linux.c): Remove.
266 (reg-sh.c): Remove.
267 (reg-sparc64.c): Remove.
268 (reg-spu.c): Remove.
269 (amd64.c): Remove.
270 (amd64-linux.c): Remove.
271 (amd64-avx.c): Remove.
272 (amd64-avx-linux.c): Remove.
273 (amd64-avx-avx512.c): Remove.
274 (amd64-avx-avx512-linux.c): Remove.
275 (amd64-mpx.c): Remove.
276 (amd64-mpx-linux.c): Remove.
277 (amd64-avx-mpx-avx512-pku.c): Remove.
278 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
279 (amd64-avx-mpx.c): Remove.
280 (amd64-avx-mpx-linux.c): Remove.
281 (x32.c): Remove.
282 (x32-linux.c): Remove.
283 (x32-avx.c): Remove.
284 (x32-avx-linux.c): Remove.
285 (x32-avx-avx512.c): Remove.
286 (x32-avx-avx512-linux.c): Remove.
287 (reg-xtensa.c): Remove.
288 (reg-tilegx.c): Remove.
289 (reg-tilegx32.c): Remove.
290
1672e0d9
SDJ
2912017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
292
293 * Makefile.in (SFILES): Add "common/environ.c".
294 (OBJS): Add "common/environ.h".
295
239b6d10
WT
2962017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
297
298 * configure.ac: Check if the fs_base and gs_base members of
299 `struct user_regs_struct' exist.
300 * config.in: Regenerated.
301 * configure: Likewise.
302
694b382c
AT
3032017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
304
305 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
306 target_read_memory.
307 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
308 (get_next_pcs_syscall_next_pc): Likewise.
309
7dc53023
LM
3102016-12-23 Luis Machado <lgustavo@codesourcery.com>
311
312 * win32-i386-low.c: Fix incorrect reference to a couple source files.
313 * nto-x86-low.c: Likewise.
314
ad02e4fe
SM
3152016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
316
317 * Makefile.in: Include disable-implicit-rules.mk.
318
dcb07cfa
PA
3192016-11-23 Pedro Alves <palves@redhat.com>
320
321 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
322 (debug_vprintf): Use std::chrono::steady_clock instead of
323 gettimeofday. Use '.' instead of ':'.
324 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
325 (get_timestamp): Use std::chrono::steady_clock instead of
326 gettimeofday.
327
8629c02c
SM
3282016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
329
330 * Makefile.in: Fix whitespace formatting.
331
b593ecca
SM
3322016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
333
334 * Makefile.in (SFILES, OBS): Flatten list and order
335 alphabetically.
336
9986ba08
PA
3372016-11-23 Pedro Alves <palves@redhat.com>
338
339 * event-loop.c (handle_file_event): Use warning.
340 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
341 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
342 Use warning.
343
4eefa7bc
PA
3442016-11-23 Pedro Alves <palves@redhat.com>
345
346 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
347 output.
348 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
349 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
350 debug_printf and debug_flush for debug output.
351 * server.c (handle_general_set): Likewise.
352 * thread-db.c (try_thread_db_load): Use debug_printf for debug
353 output.
354
5443506e
SM
3552016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * Makefile.in (.c.o): Replace rule with ...
358 (%.o: %.c): ... this one.
359
3b165252
SM
3602016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
361
362 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
363 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
364 make.
365 * configure.ac: Remove checks for the make program.
366 * configure: Re-generate.
367
0bcda685
PA
3682016-10-28 Pedro Alves <palves@redhat.com>
369
370 * Makefile.in (CXX_DIALECT): Get from configure.
371 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
372 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
373 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
374 * config.in: Regenerate.
375 * configure: Regenerate.
376
c3805894
YQ
3772016-10-27 Yao Qi <yao.qi@linaro.org>
378
379 * linux-low.c (linux_supports_range_stepping): Return true if
380 can_software_single_step return true.
381
89342618
YQ
3822016-10-27 Yao Qi <yao.qi@linaro.org>
383
384 * inferiors.c (find_inferior_in_random): New function.
385 * inferiors.h (find_inferior_in_random): Declare.
386 * linux-low.c (linux_wait_for_event_filtered): Call
387 find_inferior_in_random instead of find_inferior.
388
e3652c84
YQ
3892016-10-27 Yao Qi <yao.qi@linaro.org>
390
391 * linux-low.c (linux_wait_1): If single-step breakpoints are
392 inserted, remove them.
393
5a04c4cf
PA
3942016-10-26 Pedro Alves <palves@redhat.com>
395
396 * linux-low.c (handle_extended_wait): Link parent/child fork
397 threads.
398 (linux_wait_1): Unlink them.
399 (linux_set_resume_request): Ignore resume requests for
400 already-resumed and unhandled fork child threads.
401 * linux-low.h (struct lwp_info) <fork_relative>: New field.
402 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
403 New functions.
404 (handle_v_requests) <vCont>: Don't call require_running.
405 * server.h (in_queued_stop_replies): New declaration.
406
cb93dc7f
YQ
4072016-10-24 Yao Qi <yao.qi@linaro.org>
408
409 PR server/20733
410 * linux-aarch64-low.c (append_insns): Cast the return value to
411 'uint32_t *'.
412
a1078bea
YQ
4132016-10-10 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
416
1fb77080
SDJ
4172016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
418
419 * target.c (target_supports_multi_process): New function, moved
420 from...
421 * target.h (target_supports_multi_process): ... here. Remove
422 macro.
423
39b5a3b9
TT
4242016-10-05 Tom Tromey <tom@tromey.com>
425
426 PR remote/20655:
427 * tracepoint.c (handle_tracepoint_bkpts): Check
428 ipa_error_tracepoint, not ipa_stopping_tracepoint.
429
c1d0b70a
YQ
4302016-10-05 Yao Qi <yao.qi@linaro.org>
431
432 * configure.srv: Update the path of arm-*.xml files.
433
0a69eedb
YQ
4342016-10-05 Terry Guo <terry.guo@arm.com>
435 Yao Qi <yao.qi@linaro.org>
436
437 * Makefile.in: Adjust the path of rules.
438 * configure.srv: Update the path of xml files.
439 * regformats/arm-with-iwmmxt.dat: Regenerated.
440 * regformats/arm-with-neon.dat: Likewise.
441 * regformats/arm-with-vfpv2.dat: Likewise.
442 * regformats/arm-with-vfpv3.dat Likewise.
443
17e16485
YQ
4442016-09-30 Yao Qi <yao.qi@linaro.org>
445
446 PR gdbserver/20627
447 * target.c (target_stop_and_wait): Don't call
448 target_continue_no_signal, use resume_stop instead.
449
edeeb602
YQ
4502016-09-26 Yao Qi <yao.qi@linaro.org>
451
452 * linux-low.c (linux_wait_1): Call debug_exit.
453
503b1c39
PA
4542016-09-23 Pedro Alves <palves@redhat.com>
455
456 * Makefile.in (SFILES): Add common/new-op.c.
457 (OBS): Add common/new-op.o.
458 (new-op.o): New rule.
459
74172ecf
SM
4602016-09-21 Simon Marchi <simon.marchi@ericsson.com>
461
462 * .gitinore: Ignore more files.
463
fc6cda2e
YQ
4642016-09-21 Yao Qi <yao.qi@linaro.org>
465
466 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
467 23.
468
bc1e6c81
SDJ
4692016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
470
471 * server.c (start_inferior): Call target_mourn_inferior instead of
472 mourn_inferior; pass ptid_t argument to it.
473 (resume): Likewise.
474 (handle_target_event): Likewise.
475 * target.c (target_mourn_inferior): New function.
476 * target.h (mourn_inferior): Delete macro.
477
0e00e962
AA
4782016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
479
480 * linux-low.c (lwp_is_stepping): New function.
481
1d8cb77d
CL
4822016-09-06 Carl Love <cel@us.ibm.com>
483
484 * server.c (start_inferior): Fixed comment, requested comment change
485 didn't get updated correctly. Removed reference to ptrace () call as
486 it is only true on Linux systems.
487
7313bced
CL
4882016-09-06 Carl Love <cel@us.ibm.com>
489
490 * server.c (start_inferior): Do not call
491 function target_post_create_inferior () if the
492 inferior process has already exited.
493
cf6de44d
PA
4942016-09-05 Pedro Alves <palves@redhat.com>
495
496 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
497 (COMPILE.pre, CC_LD): Use CXX directly.
498 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
499 * acinclude.m4: Don't include build-with-cxx.m4.
500 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
501 * configure: Regenerate.
502
c1da6748
AT
5032016-09-02 Akash Trehan <akash.trehan123@gmail.com>
504
505 PR gdb/19495
506 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
507 call writing data to own_buf.
508
f2b9e3df
SDJ
5092016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
510
511 * target.c (mywait): Call target_wait instead of
512 the_target->wait.
513 (target_wait): New function.
514
049a8570
SDJ
5152016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
516
517 * server.c (start_inferior): New variable 'ptid'. Replace calls
518 to the_target->resume by target_continue{,_no_signal}, depending
519 on the case.
520 * target.c (target_stop_and_wait): Call target_continue_no_signal
521 instead of the_target->resume.
522 (target_continue): New function.
523
3aa5cfa0
AT
5242016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
525
526 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
527
754653a7
AZ
5282016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
529
530 PR server/20491
531 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
532 ps_prochandle.
533 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
534 * linux-arm-low.c (ps_get_thread_area): Likewise.
535 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
536 * linux-m68k-low.c (ps_get_thread_area): Likewise.
537 * linux-mips-low.c (ps_get_thread_area): Likewise.
538 * linux-nios2-low.c (ps_get_thread_area): Likewise.
539 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
540 * linux-x86-low.c (ps_get_thread_area): Likewise.
541 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
542
ed036b40
PA
5432016-08-19 Pedro Alves <palves@redhat.com>
544
545 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
546
c8ef42ee
PA
5472016-08-19 Pedro Alves <palves@redhat.com>
548
549 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
550 comment. Use memcpy instead of casting through unsigned long.
551
9c235a72
PA
5522016-08-19 Pedro Alves <palves@redhat.com>
553
554 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
555 allocating around 0x80000000.
556
201506da
PA
5572016-08-19 Pedro Alves <palves@redhat.com>
558
559 PR gdb/20415
560 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
561 (x32-avx512-linux-ipa.o): New rules.
562 * configure.ac (x86_64-*-linux*): New x32 check.
563 * configure.srv (ipa_x32_linux_regobj): New.
564 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
565 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
566 descriptions.
567 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
568 descriptions.
569 * configure: Regenerate.
570
f348d89a
PA
5712016-08-09 Pedro Alves <palves@redhat.com>
572
573 PR gdb/18653
574 * Makefile.in (OBS): Add signals-state-save-restore.o.
575 (signals-state-save-restore.o): New rule.
576 * config.in: Regenerate.
577 * configure: Regenerate.
578 * linux-low.c: Include "signals-state-save-restore.h".
579 (linux_create_inferior): Call
580 restore_original_signals_state.
581 * server.c: Include "dispositions-save-restore.h".
582 (captured_main): Call save_original_signals_state.
583
1baf5149
PA
5842016-08-05 Pedro Alves <palves@redhat.com>
585
586 * configure: Regenerate.
587
fcd4a73d
YQ
5882016-08-04 Yao Qi <yao.qi@linaro.org>
589
590 * linux-low.c (regsets_fetch_inferior_registers): Check
591 errno is ESRCH or not.
592
979659d0
YQ
5932016-08-02 Yao Qi <yao.qi@linaro.org>
594
595 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
596 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
597 (thread_db_load_search): Update.
598 (try_thread_db_load_1): Don't look for td_ta_event_addr,
599 td_ta_set_event and td_ta_event_getmsg.
600
6598661d
PA
6012016-07-26 Pedro Alves <palves@redhat.com>
602
603 PR server/20414
604 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
605 of unsigned long for 64-bit registers and use uint32_t instead of
606 unsigned int for 32-bit registers.
607
9cf12d57
PA
6082016-07-26 Pedro Alves <palves@redhat.com>
609
610 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
611 to 'ptrace'.
612
305450ed
TT
6132016-07-21 Tom Tromey <tom@tromey.com>
614
615 * configure: Rebuild.
616
2583da7c
YQ
6172016-07-21 Yao Qi <yao.qi@linaro.org>
618
619 * mem-break.c (find_gdb_breakpoint): Cast bp to
620 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
621
21536b36
YQ
6222016-07-21 Yao Qi <yao.qi@linaro.org>
623
624 * server.c (handle_v_requests): Support s and S actions
625 if target_supports_software_single_step return true.
626
8901d193
YQ
6272016-07-21 Yao Qi <yao.qi@linaro.org>
628
629 * linux-low.c (resume_stopped_resumed_lwps): If resume request
630 is resume_step, call maybe_hw_step.
631 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
632 and unstop them.
633 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
634 breakpoints or not.
635 (proceed_one_lwp): If resume request is resume_step, install
636 reinsert breakpoints and call maybe_hw_step.
637
0e9a339e
YQ
6382016-07-21 Yao Qi <yao.qi@linaro.org>
639
640 * linux-low.c (proceed_one_lwp): Declare.
641 (linux_resume_one_thread): Remove local variable 'step'.
642 Lift code enqueue signal. Call proceed_one_lwp instead of
643 linux_resume_one_lwp.
644
4281b351
YQ
6452016-07-21 Yao Qi <yao.qi@linaro.org>
646
647 * linux-low.c (linux_resume_one_thread): Call
648 enqueue_pending_signal.
649
984a2c04
YQ
6502016-07-21 Yao Qi <yao.qi@linaro.org>
651
652 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
653 * inferiors.c (do_restore_current_thread_cleanup): New function.
654 (make_cleanup_restore_current_thread): Likewise.
655 * linux-low.c (install_software_single_step_breakpoints): Call
656 make_cleanup_restore_current_thread. Switch current_thread to
657 thread.
658
bec903c9
YQ
6592016-07-21 Yao Qi <yao.qi@linaro.org>
660
661 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
662 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
663 (clone_one_breakpoint): Likewise.
664 (delete_reinsert_breakpoints): Change parameter to thread.
665 Callers updated.
666 (has_reinsert_breakpoints): Likewise.
667 (uninsert_reinsert_breakpoints): Likewise.
668 (reinsert_reinsert_breakpoints): Likewise.
669 * mem-break.h (set_reinsert_breakpoint): Update declaration.
670 (delete_reinsert_breakpoints): Likewise.
671 (reinsert_reinsert_breakpoints): Likewise.
672 (uninsert_reinsert_breakpoints): Likewise.
673 (has_reinsert_breakpoints): Likewise.
674
63c40ec7
YQ
6752016-07-21 Yao Qi <yao.qi@linaro.org>
676
677 * inferiors.c (get_thread_process): Make parameter const.
678 * inferiors.h (get_thread_process): Update declaration.
679 * mem-break.c (clone_all_breakpoints): Remove all parameters.
680 Add new parameters child_thread and parent_thread. Callers
681 updated.
682 * mem-break.h (clone_all_breakpoints): Update declaration.
683
9aa76cd0
YQ
6842016-07-21 Yao Qi <yao.qi@linaro.org>
685
686 * mem-break.c (struct breakpoint) <cond_list>: Remove.
687 <command_list, handler>: Remove.
688 (struct gdb_breakpoint): New.
689 (struct other_breakpoint): New.
690 (struct reinsert_breakpoint): New.
691 (is_gdb_breakpoint): New function.
692 (any_persistent_commands): Update command_list if
693 is_gdb_breakpoint returns true.
694 (set_breakpoint): Create breakpoints according to their types.
695 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
696 (set_gdb_breakpoint_1): Likewise.
697 (set_gdb_breakpoint): Likewise.
698 (clear_breakpoint_conditions): Change parameter type to
699 'struct gdb_breakpoint *'.
700 (clear_breakpoint_commands): Likewise.
701 (clear_breakpoint_conditions_and_commands): Likewise.
702 (add_condition_to_breakpoint): Likewise.
703 (add_breakpoint_condition): Likewise.
704 (add_commands_to_breakpoint): Likewise.
705 (check_breakpoints): Check other_breakpoint.
706 (clone_one_breakpoint): Clone breakpopint according to its type.
707 * mem-break.h (struct gdb_breakpoint): Declare.
708 (set_gdb_breakpoint): Update declaration.
709 (clear_breakpoint_conditions_and_commands): Likewise.
710 (add_breakpoint_condition): Likewise.
711 (add_breakpoint_commands): Likewise.
712 * server.c (process_point_options): Change parameter type to
713 'struct gdb_breakpoint *'.
714
811f8301
YQ
7152016-07-21 Yao Qi <yao.qi@linaro.org>
716
717 * mem-break.c (set_breakpoint_at): Rename it to ...
718 (set_breakpoint_type_at): ... it.
719 (set_breakpoint_at): Call set_breakpoint_type_at.
720 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
721 * mem-break.h (set_breakpoint_at): Update comments.
722
b1c51e36
CLT
7232016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
724
725 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
726 to buf parameter.
727 (nios2_store_gregset): Likewise.
728
ced2dffb
PA
7292016-07-01 Pedro Alves <palves@redhat.com>
730 Antoine Tremblay <antoine.tremblay@ericsson.com>
731
732 * linux-low.c: Change interface to take the target lwp_info
733 pointer directly and return void. Handle detaching from a zombie
734 thread.
735 (linux_detach_lwp_callback): New function.
736 (linux_detach): Detach from the leader thread after detaching from
737 the clone threads.
738
2ac09a5b
YQ
7392016-06-28 Yao Qi <yao.qi@linaro.org>
740
741 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
742 for variable new_offset.
743 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
744 (aarch64_ftrace_insn_reloc_cb): Likewise.
745 (aarch64_ftrace_insn_reloc_tb): Likewise.
746 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
747 PRIx64 instead of PRIx32.
748
79e7fd4f
YQ
7492016-06-28 Yao Qi <yao.qi@linaro.org>
750
751 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
752 (the_low_target): Install arm_get_syscall_trapinfo.
753
061fc021
YQ
7542016-06-28 Yao Qi <yao.qi@linaro.org>
755
756 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
757 function.
758 (the_low_target): Install aarch64_get_syscall_trapinfo.
759
4cc32bec
YQ
7602016-06-28 Yao Qi <yao.qi@linaro.org>
761
762 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
763 Callers updated.
764 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
765 Remove parameter sysno.
766 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
767 sysret.
768
782c1122
AA
7692016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
770
771 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
772 (s390_emit_ne_goto): Likewise.
773 (s390_emit_lt_goto): Likewise.
774 (s390_emit_le_goto): Likewise.
775 (s390_emit_gt_goto): Likewise.
776 (s390_emit_ge_goto): Likewise.
777 (s390x_emit_eq_goto): Likewise.
778 (s390x_emit_ne_goto): Likewise.
779 (s390x_emit_lt_goto): Likewise.
780 (s390x_emit_le_goto): Likewise.
781 (s390x_emit_gt_goto): Likewise.
782 (s390x_emit_ge_goto): Likewise.
783 (s390_emit_ops_impl): Mark variable static.
784 (s390x_emit_ops): Likewise.
785
2e7b624b
YQ
7862016-06-17 Yao Qi <yao.qi@linaro.org>
787
788 * linux-low.c (handle_extended_wait): Call
789 uninsert_reinsert_breakpoints for the parent process. Remove
790 reinsert breakpoints from the child process. Reinsert them to
791 the parent process when vfork is done.
792 * mem-break.c (uninsert_reinsert_breakpoints): New function.
793 (reinsert_reinsert_breakpoints): New function.
794 * mem-break.h (uninsert_reinsert_breakpoints): Declare
795 (reinsert_reinsert_breakpoints): Declare.
796
8a81c5d7
YQ
7972016-06-17 Yao Qi <yao.qi@linaro.org>
798
799 * linux-low.c (handle_extended_wait): If the parent is doing
800 step-over, remove the reinsert breakpoints from the forked child.
801
f50bf8e5
YQ
8022016-06-17 Yao Qi <yao.qi@linaro.org>
803
804 * linux-low.c (unsuspend_all_lwps): Declare.
805 (linux_low_filter_event): If thread exited, call finish_step_over.
806 If step-over is finished, unsuspend other threads.
807
8376a3cb
YQ
8082016-06-17 Yao Qi <yao.qi@linaro.org>
809
810 * linux-low.c (linux_resume_one_lwp_throw): Assert
811 has_reinsert_breakpoints returns false.
812 * mem-break.c (delete_disabled_breakpoints): Assert
813 bp type isn't reinsert_breakpoint.
814
f79b145d
YQ
8152016-06-17 Yao Qi <yao.qi@linaro.org>
816
817 * linux-low.c (maybe_hw_step): New function.
818 (linux_resume_one_lwp_throw): Call maybe_hw_step.
819 (finish_step_over): Switch current_thread to lwp temporarily,
820 and assert has_reinsert_breakpoints returns true.
821 (proceed_one_lwp): Call maybe_hw_step.
822 * mem-break.c (has_reinsert_breakpoints): New function.
823 * mem-break.h (has_reinsert_breakpoints): Declare.
824
0ae534d2
JT
8252016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
826
827 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
828
fcdad592
YQ
8292016-05-17 Yao Qi <yao.qi@linaro.org>
830
831 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
832 instead of find_inferior.
833
9e784964
YQ
8342016-05-05 Yao Qi <yao.qi@linaro.org>
835
836 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
837 Initialize res to zero.
838
cf2ebb6e
YQ
8392016-05-05 Yao Qi <yao.qi@linaro.org>
840
841 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
842 to uint32_t.
843
c1aebf87
UW
8442016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
845
846 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
847 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
848 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
849
35fd2deb 8502016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 851 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
852
853 * tracepoint.c (write_inferior_int8): New function.
854 (cmd_qtenable_disable): Write enable flag using
855 write_inferior_int8.
856
484b3c32
YQ
8572016-04-25 Yao Qi <yao.qi@linaro.org>
858
859 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
860 (need_step_over_p): Return zero if the LWP has pending signals
861 can be delivered on software single step target.
862
85ba7d86
YQ
8632016-04-25 Yao Qi <yao.qi@linaro.org>
864
865 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
866 return instead of error.
867
3539aa13
YQ
8682016-04-22 Yao Qi <yao.qi@linaro.org>
869
870 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
871 to 23.
872
5b061e98
YQ
8732016-04-22 Yao Qi <yao.qi@linaro.org>
874
875 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
876 signal when stepping over breakpoint with software single
877 step.
878
3451269c
PA
8792016-04-21 Pedro Alves <palves@redhat.com>
880
881 * linux-s390-low.c (s390_collect_ptrace_register)
882 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
883 add casts.
884 (s390_check_regset): Use void * instead of gdb_byte *.
885
a2358508
PA
8862016-04-20 Pedro Alves <palves@redhat.com>
887
888 * configure: Renegerate.
889
6885166d
YQ
8902016-04-20 Yao Qi <yao.qi@linaro.org>
891
892 * linux-aarch32-low.c: Include "arch/arm-linux.h".
893 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
894 number 16.
895 (arm_store_gregset): Likewise.
896
2b863f51
WT
8972016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
898
899 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
900 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
901 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
902 (amd64-avx-mpx-linux.c): New rules.
903 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
904 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
905 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
906 (srv_amd64_regobj): Add amd64-avx-mpx.o.
907 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
908 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
909 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
910 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
911 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
912 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
913 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
914 * linux-x86-low.c (x86_linux_read_description): Add case for
915 X86_XSTATE_AVX_MPX_MASK.
916 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
917 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
918 init_registers_i386_avx_mpx_linux.
919 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
920 (initialize_low_tracepoint): Call
921 init_registers_i386_avx_mpx_linux.
922 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
923 (initialize_low_tracepoint): Call
924 init_registers_amd64_avx_mpx_linux.
925 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
926 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
927 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
928 declarations.
929
9b30624b
PA
9302016-04-18 Pedro Alves <palves@redhat.com>
931
932 * configure: Regenerate.
933
45e3745e
AT
9342016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
935
936 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
937 (aarch64_emit_sub): Likewise.
938
2afc13ff
PA
9392016-04-12 Pedro Alves <palves@redhat.com>
940
941 * utils.c (prepare_to_throw_exception): Delete.
942
6e774b13
SM
9432016-04-05 Simon Marchi <simon.marchi@ericsson.com>
944
945 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
946
4dca19f8
MK
9472016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
948
949 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
950
d0a9981f
MK
9512016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
952
953 * linux-aarch64-ipa.c: Add <elf.h> include.
954 * linux-ppc-ipa.c: Add <elf.h> include.
955 * linux-s390-ipa.c: Add <elf.h> include.
956
252db07e
MK
9572016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
958
959 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
960 (get_raw_reg_ptr): Likewise.
961 (get_trace_state_variable_value_ptr): Likewise.
962 (set_trace_state_variable_value_ptr): Likewise.
963 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
964 char *.
965
14e2b6d9
MK
9662016-03-31 Wei-cheng Wang <cole945@gmail.com>
967 Marcin Kościelnicki <koriakin@0x04.net>
968
969 PR/17221
970 * linux-ppc-low.c (emit_insns): New function.
971 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
972 (ppc_emit_prologue): New function.
973 (ppc_emit_epilogue): New function.
974 (ppc_emit_add): New function.
975 (ppc_emit_sub): New function.
976 (ppc_emit_mul): New function.
977 (ppc_emit_lsh): New function.
978 (ppc_emit_rsh_signed): New function.
979 (ppc_emit_rsh_unsigned): New function.
980 (ppc_emit_ext): New function.
981 (ppc_emit_zero_ext): New function.
982 (ppc_emit_log_not): New function.
983 (ppc_emit_bit_and): New function.
984 (ppc_emit_bit_or): New function.
985 (ppc_emit_bit_xor): New function.
986 (ppc_emit_bit_not): New function.
987 (ppc_emit_equal): New function.
988 (ppc_emit_less_signed): New function.
989 (ppc_emit_less_unsigned): New function.
990 (ppc_emit_ref): New function.
991 (ppc_emit_const): New function.
992 (ppc_emit_reg): New function.
993 (ppc_emit_pop): New function.
994 (ppc_emit_stack_flush): New function.
995 (ppc_emit_swap): New function.
996 (ppc_emit_stack_adjust): New function.
997 (ppc_emit_call): New function.
998 (ppc_emit_int_call_1): New function.
999 (ppc_emit_void_call_2): New function.
1000 (ppc_emit_if_goto): New function.
1001 (ppc_emit_goto): New function.
1002 (ppc_emit_eq_goto): New function.
1003 (ppc_emit_ne_goto): New function.
1004 (ppc_emit_lt_goto): New function.
1005 (ppc_emit_le_goto): New function.
1006 (ppc_emit_gt_goto): New function.
1007 (ppc_emit_ge_goto): New function.
1008 (ppc_write_goto_address): New function.
1009 (ppc_emit_ops_impl): New static variable.
1010 (ppc64v1_emit_prologue): New function.
1011 (ppc64v2_emit_prologue): New function.
1012 (ppc64_emit_epilogue): New function.
1013 (ppc64_emit_add): New function.
1014 (ppc64_emit_sub): New function.
1015 (ppc64_emit_mul): New function.
1016 (ppc64_emit_lsh): New function.
1017 (ppc64_emit_rsh_signed): New function.
1018 (ppc64_emit_rsh_unsigned): New function.
1019 (ppc64_emit_ext): New function.
1020 (ppc64_emit_zero_ext): New function.
1021 (ppc64_emit_log_not): New function.
1022 (ppc64_emit_bit_and): New function.
1023 (ppc64_emit_bit_or): New function.
1024 (ppc64_emit_bit_xor): New function.
1025 (ppc64_emit_bit_not): New function.
1026 (ppc64_emit_equal): New function.
1027 (ppc64_emit_less_signed): New function.
1028 (ppc64_emit_less_unsigned): New function.
1029 (ppc64_emit_ref): New function.
1030 (ppc64_emit_const): New function.
1031 (ppc64v1_emit_reg): New function.
1032 (ppc64v2_emit_reg): New function.
1033 (ppc64_emit_pop): New function.
1034 (ppc64_emit_stack_flush): New function.
1035 (ppc64_emit_swap): New function.
1036 (ppc64v1_emit_call): New function.
1037 (ppc64v2_emit_call): New function.
1038 (ppc64v1_emit_int_call_1): New function.
1039 (ppc64v2_emit_int_call_1): New function.
1040 (ppc64v1_emit_void_call_2): New function.
1041 (ppc64v2_emit_void_call_2): New function.
1042 (ppc64_emit_if_goto): New function.
1043 (ppc64_emit_eq_goto): New function.
1044 (ppc64_emit_ne_goto): New function.
1045 (ppc64_emit_lt_goto): New function.
1046 (ppc64_emit_le_goto): New function.
1047 (ppc64_emit_gt_goto): New function.
1048 (ppc64_emit_ge_goto): New function.
1049 (ppc64v1_emit_ops_impl): New static variable.
1050 (ppc64v2_emit_ops_impl): New static variable.
1051 (ppc_emit_ops): New function.
1052 (linux_low_target): Wire in ppc_emit_ops.
1053
a2174ba4
MK
10542016-03-31 Wei-cheng Wang <cole945@gmail.com>
1055 Marcin Kościelnicki <koriakin@0x04.net>
1056
1057 PR/17221
1058 * Makefile.in: Add powerpc-*-ipa.o
1059 * configure.srv: Add ipa_obj for powerpc*-linux.
1060 * linux-ppc-ipa.c: New file.
1061 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1062 includes.
1063 (PPC_FIELD): New macro.
1064 (PPC_SEXT): New macro.
1065 (PPC_OP6): New macro.
1066 (PPC_BO): New macro.
1067 (PPC_LI): New macro.
1068 (PPC_BD): New macro.
1069 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1070 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1071 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1072 (ppc_get_thread_area): New function.
1073 (is_elfv2_inferior): New function.
1074 (gen_ds_form): New function.
1075 (GEN_STD): New macro.
1076 (GEN_STDU): New macro.
1077 (GEN_LD): New macro.
1078 (GEN_LDU): New macro.
1079 (gen_d_form): New function.
1080 (GEN_ADDI): New macro.
1081 (GEN_ADDIS): New macro.
1082 (GEN_LI): New macro.
1083 (GEN_LIS): New macro.
1084 (GEN_ORI): New macro.
1085 (GEN_ORIS): New macro.
1086 (GEN_LWZ): New macro.
1087 (GEN_STW): New macro.
1088 (GEN_STWU): New macro.
1089 (gen_xfx_form): New function.
1090 (GEN_MFSPR): New macro.
1091 (GEN_MTSPR): New macro.
1092 (GEN_MFCR): New macro.
1093 (GEN_MTCR): New macro.
1094 (GEN_SYNC): New macro.
1095 (GEN_LWSYNC): New macro.
1096 (gen_x_form): New function.
1097 (GEN_OR): New macro.
1098 (GEN_MR): New macro.
1099 (GEN_LWARX): New macro.
1100 (GEN_STWCX): New macro.
1101 (GEN_CMPW): New macro.
1102 (gen_md_form): New function.
1103 (GEN_RLDICL): New macro.
1104 (GEN_RLDICR): New macro.
1105 (gen_i_form): New function.
1106 (GEN_B): New macro.
1107 (GEN_BL): New macro.
1108 (gen_b_form): New function.
1109 (GEN_BNE): New macro.
1110 (GEN_LOAD): New macro.
1111 (GEN_STORE): New macro.
1112 (gen_limm): New function.
1113 (gen_atomic_xchg): New function.
1114 (gen_call): New function.
1115 (ppc_relocate_instruction): New function.
1116 (ppc_install_fast_tracepoint_jump_pad): New function.
1117 (ppc_get_min_fast_tracepoint_insn_len): New function.
1118 (ppc_get_ipa_tdesc_idx): New function.
1119 (the_low_target): Wire in the new functions.
1120 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1121 tdescs.
1122 * linux-ppc-tdesc.h: New file.
1123
a13c4696
MK
11242016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1125
1126 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1127 (alloc_jump_pad_buffer): New function.
1128 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1129 (alloc_jump_pad_buffer): New function.
1130 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1131 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1132 (alloc_jump_pad_buffer): New function.
1133 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1134 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1135 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1136 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1137
1cda1512
MK
11382016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1139
1140 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1141 * linux-amd64-ipa.c: Likewise.
1142 * linux-i386-ipa.c: Likewise.
1143 * linux-s390-ipa.c: Likewise.
1144 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1145 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1146 set_trace_state_variable_value_ptr.
1147 (struct ipa_sym_addresses): Likewise.
1148 (symbol_list): Likewise.
1149 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1150 accessing gdb_collect directly.
1151 (gdb_collect_ptr_type): New typedef.
1152 (get_raw_reg_ptr_type): New typedef.
1153 (get_trace_state_variable_value_ptr_type): New typedef.
1154 (set_trace_state_variable_value_ptr_type): New typedef.
1155 (gdb_collect_ptr): New global.
1156 (get_raw_reg_ptr): New global.
1157 (get_trace_state_variable_value_ptr): New global.
1158 (set_trace_state_variable_value_ptr): New global.
1159 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1160 accessing get_raw_reg directly.
1161 (get_get_tsv_func_addr): Likewise for
1162 get_trace_state_variable_value_ptr.
1163 (get_set_tsv_func_addr): Likewise for
1164 set_trace_state_variable_value_ptr.
1165 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1166
72fb5488
SM
11672016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1168
1169 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1170
28170b88
MK
11712016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1172
1173 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1174 packets.
1175 (relocate_instruction): Remove own_buf.
1176 * server.c (own_buf): Make global.
1177 (handle_v_requests): Make global.
1178 * server.h (own_buf): New declaration.
1179 (handle_v_requests): New prototype.
1180
f39e8743
MK
11812016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1182
1183 PR 18377
1184 * linux-s390-low.c (add_insns): New function.
1185 (s390_emit_prologue): New function.
1186 (s390_emit_epilogue): New function.
1187 (s390_emit_add): New function.
1188 (s390_emit_sub): New function.
1189 (s390_emit_mul): New function.
1190 (s390_emit_lsh): New function.
1191 (s390_emit_rsh_signed): New function.
1192 (s390_emit_rsh_unsigned): New function.
1193 (s390_emit_ext): New function.
1194 (s390_emit_log_not): New function.
1195 (s390_emit_bit_and): New function.
1196 (s390_emit_bit_or): New function.
1197 (s390_emit_bit_xor): New function.
1198 (s390_emit_bit_not): New function.
1199 (s390_emit_equal): New function.
1200 (s390_emit_less_signed): New function.
1201 (s390_emit_less_unsigned): New function.
1202 (s390_emit_ref): New function.
1203 (s390_emit_if_goto): New function.
1204 (s390_emit_goto): New function.
1205 (s390_write_goto_address): New function.
1206 (s390_emit_litpool): New function.
1207 (s390_emit_const): New function.
1208 (s390_emit_call): New function.
1209 (s390_emit_reg): New function.
1210 (s390_emit_pop): New function.
1211 (s390_emit_stack_flush): New function.
1212 (s390_emit_zero_ext): New function.
1213 (s390_emit_swap): New function.
1214 (s390_emit_stack_adjust): New function.
1215 (s390_emit_set_r2): New function.
1216 (s390_emit_int_call_1): New function.
1217 (s390_emit_void_call_2): New function.
1218 (s390_emit_eq_goto): New function.
1219 (s390_emit_ne_goto): New function.
1220 (s390_emit_lt_goto): New function.
1221 (s390_emit_le_goto): New function.
1222 (s390_emit_gt_goto): New function.
1223 (s390_emit_ge_goto): New function.
1224 (s390x_emit_prologue): New function.
1225 (s390x_emit_epilogue): New function.
1226 (s390x_emit_add): New function.
1227 (s390x_emit_sub): New function.
1228 (s390x_emit_mul): New function.
1229 (s390x_emit_lsh): New function.
1230 (s390x_emit_rsh_signed): New function.
1231 (s390x_emit_rsh_unsigned): New function.
1232 (s390x_emit_ext): New function.
1233 (s390x_emit_log_not): New function.
1234 (s390x_emit_bit_and): New function.
1235 (s390x_emit_bit_or): New function.
1236 (s390x_emit_bit_xor): New function.
1237 (s390x_emit_bit_not): New function.
1238 (s390x_emit_equal): New function.
1239 (s390x_emit_less_signed): New function.
1240 (s390x_emit_less_unsigned): New function.
1241 (s390x_emit_ref): New function.
1242 (s390x_emit_if_goto): New function.
1243 (s390x_emit_const): New function.
1244 (s390x_emit_call): New function.
1245 (s390x_emit_reg): New function.
1246 (s390x_emit_pop): New function.
1247 (s390x_emit_stack_flush): New function.
1248 (s390x_emit_zero_ext): New function.
1249 (s390x_emit_swap): New function.
1250 (s390x_emit_stack_adjust): New function.
1251 (s390x_emit_int_call_1): New function.
1252 (s390x_emit_void_call_2): New function.
1253 (s390x_emit_eq_goto): New function.
1254 (s390x_emit_ne_goto): New function.
1255 (s390x_emit_lt_goto): New function.
1256 (s390x_emit_le_goto): New function.
1257 (s390x_emit_gt_goto): New function.
1258 (s390x_emit_ge_goto): New function.
1259 (s390_emit_ops): New function.
1260 (struct linux_target_ops): Fill in emit_ops hook.
1261
abd9baf9
MK
12622016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1263
1264 PR 18377
1265 * Makefile.in: Add s390 IPA files.
1266 * configure.srv: Build IPA for s390.
1267 * linux-s390-ipa.c: New file.
1268 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1269 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1270 (tdesc_s390_linux32): Likewise.
1271 (init_registers_s390_linux32v1): Likewise.
1272 (tdesc_s390_linux32v1): Likewise.
1273 (init_registers_s390_linux32v2): Likewise.
1274 (tdesc_s390_linux32v2): Likewise.
1275 (init_registers_s390_linux64): Likewise.
1276 (tdesc_s390_linux64): Likewise.
1277 (init_registers_s390_linux64v1): Likewise.
1278 (tdesc_s390_linux64v1): Likewise.
1279 (init_registers_s390_linux64v2): Likewise.
1280 (tdesc_s390_linux64v2): Likewise.
1281 (init_registers_s390_te_linux64): Likewise.
1282 (tdesc_s390_te_linux64): Likewise.
1283 (init_registers_s390_vx_linux64): Likewise.
1284 (tdesc_s390_vx_linux64): Likewise.
1285 (init_registers_s390_tevx_linux64): Likewise.
1286 (tdesc_s390_tevx_linux64): Likewise.
1287 (init_registers_s390x_linux64): Likewise.
1288 (tdesc_s390x_linux64): Likewise.
1289 (init_registers_s390x_linux64v1): Likewise.
1290 (tdesc_s390x_linux64v1): Likewise.
1291 (init_registers_s390x_linux64v2): Likewise.
1292 (tdesc_s390x_linux64v2): Likewise.
1293 (init_registers_s390x_te_linux64): Likewise.
1294 (tdesc_s390x_te_linux64): Likewise.
1295 (init_registers_s390x_vx_linux64): Likewise.
1296 (tdesc_s390x_vx_linux64): Likewise.
1297 (init_registers_s390x_tevx_linux64): Likewise.
1298 (tdesc_s390x_tevx_linux64): Likewise.
1299 (have_hwcap_s390_vx): New static variable.
1300 (s390_arch_setup): Fill have_hwcap_s390_vx.
1301 (s390_get_thread_area): New function.
1302 (s390_ft_entry_gpr_esa): New const.
1303 (s390_ft_entry_gpr_zarch): New const.
1304 (s390_ft_entry_misc): New const.
1305 (s390_ft_entry_fr): New const.
1306 (s390_ft_entry_vr): New const.
1307 (s390_ft_main_31): New const.
1308 (s390_ft_main_64): New const.
1309 (s390_ft_exit_fr): New const.
1310 (s390_ft_exit_vr): New const.
1311 (s390_ft_exit_misc): New const.
1312 (s390_ft_exit_gpr_esa): New const.
1313 (s390_ft_exit_gpr_zarch): New const.
1314 (append_insns): New function.
1315 (s390_relocate_instruction): New function.
1316 (s390_install_fast_tracepoint_jump_pad): New function.
1317 (s390_get_min_fast_tracepoint_insn_len): New function.
1318 (s390_get_ipa_tdesc_idx): New function.
1319 (struct linux_target_ops): Wire in the above functions.
1320 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1321 * linux-s390-tdesc.h: New file.
1322
a4105d04
MK
13232016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1324
1325 * linux-s390-low.c (s390_supports_tracepoints): New function.
1326 (struct linux_target_ops): Fill supports_tracepoints hook.
1327
35ac8b3e
YQ
13282016-03-18 Yao Qi <yao.qi@linaro.org>
1329
1330 * linux-low.c (lwp_signal_can_be_delivered): New function.
1331 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1332
94610ec4
YQ
13332016-03-18 Yao Qi <yao.qi@linaro.org>
1334
1335 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1336 0 if signal is enqueued. Remove 'signal' from one debugging
1337 message. Move one debugging message to some lines below.
1338 Remove code setting 'signal' to 0.
1339
80aea927
YQ
13402016-03-18 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-low.c (linux_low_filter_event): Remove redundant
1343 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1344
b04fd3be
MK
13452016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1346
1347 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1348 (struct linux_target_ops): Wire in the above.
1349
c40c8d4b
YQ
13502016-03-03 Yao Qi <yao.qi@linaro.org>
1351
1352 * linux-low.c: Update comments to start_step_over.
1353
0f8288ae
YQ
13542016-03-03 Yao Qi <yao.qi@linaro.org>
1355
1356 PR server/19736
1357 * linux-low.c (handle_extended_wait): Set child suspended
1358 if event_lwp->bp_reinsert isn't zero.
1359
fdbd04a8
YQ
13602016-03-02 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1363 enqueue_pending_signal.
1364
6896a8fa
MK
13652016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1366
1367 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1368 is actually loaded.
1369
ab503087
MK
13702016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1371
1372 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1373 (s390_regmap_3264) [!__s390x__]: New global.
1374 (s390_collect_ptrace_register): Skip map entries containing -1.
1375 (s390_supply_ptrace_register): Ditto.
1376 (s390_fill_gprs_high): New function.
1377 (s390_store_gprs_high): New function.
1378 (s390_regsets): Add NT_S390_HIGH_GPRS.
1379 (s390_get_hwcap): Enable on 31-bit.
1380 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1381 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1382 Detect NT_S390_HIGH_GPRS.
1383 (s390_usrregs_info_3264): Enable on 31-bit.
1384 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1385 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1386
ae91f625
MK
13872016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1388
1389 PR gdb/13808
1390 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1391 * configure.srv: Ditto.
1392 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1393 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1394 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1395 (init_registers_amd64_linux): Remove prototype.
1396 (tdesc_amd64_linux): Remove declaration.
1397 (get_ipa_tdesc): New function.
1398 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1399 initialize remaining tdescs.
1400 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1401 (init_registers_i386_linux): Remove prototype.
1402 (tdesc_i386_linux): Remove declaration.
1403 (get_ipa_tdesc): New function.
1404 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1405 initialize remaining tdescs.
1406 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1407 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1408 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1409 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1410 (x86_get_ipa_tdesc_idx): New function.
1411 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1412 * linux-x86-tdesc.h: New file.
1413 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1414 (target_get_ipa_tdesc_idx): New macro.
1415 * tracepoint.c (ipa_tdesc_idx): New macro.
1416 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1417 (symbol_list): Add ipa_tdesc_idx.
1418 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1419 (ipa_tdesc): Remove.
1420 (ipa_tdesc_idx): New variable.
1421 (get_context_regcache): Use get_ipa_tdesc.
1422 (gdb_collect): Ditto.
1423 (gdb_probe): Ditto.
1424 * tracepoint.h (get_ipa_tdesc): New prototype.
1425 (ipa_tdesc): Remove.
1426
e7ad2f14
PA
14272016-02-24 Pedro Alves <palves@redhat.com>
1428
1429 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1430 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1431 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1432 Factor out common code between the USE_SIGTRAP_SIGINFO and
1433 !USE_SIGTRAP_SIGINFO blocks.
1434 (linux_low_filter_event): Call save_stop_reason instead of
1435 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1436 Update comments.
1437 (linux_wait_1): Update comments.
1438
657f9cde
WW
14392016-02-24 Wei-cheng Wang <cole945@gmail.com>
1440
1441 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1442 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1443 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1444 ppc_insert_point, ppc_remove_point.
1445
b00b61e1
MK
14462016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1447
1448 * linux-s390-low.c (s390_supports_z_point_type): New function.
1449 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1450
553cb527
YQ
14512016-02-16 Yao Qi <yao.qi@linaro.org>
1452
1453 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1454 PC. Get pc from regcache_read_pc.
1455
a5652c21
YQ
14562016-02-12 Yao Qi <yao.qi@linaro.org>
1457
1458 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1459 or linux_get_pc_32bit.
1460 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1461
ed443b61
YQ
14622016-02-12 Yao Qi <yao.qi@linaro.org>
1463
1464 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1465 arm_linux_get_next_pcs_fixup.
1466
020ecd38
MK
14672016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1468
1469 * tracepoint.c (x_tracepoint_action_download): Change
1470 write_inferior_data_ptr to write_inferior_data_pointer.
1471 (cmd_qtstart): Likewise.
1472 (write_inferior_data_ptr): Remove.
1473 (download_agent_expr): Change write_inferior_data_ptr to
1474 write_inferior_data_pointer.
1475 (download_tracepoint_1): Likewise.
1476 (download_tracepoint): Likewise.
1477 (download_trace_state_variables): Likewise.
1478
7cae9051
WW
14792016-02-11 Wei-cheng Wang <cole945@gmail.com>
1480 Marcin Kościelnicki <koriakin@0x04.net>
1481
1482 * tracepoint.c (struct tracepoint_action_ops): Remove.
1483 (struct tracepoint_action): Remove ops.
1484 (m_tracepoint_action_download, r_tracepoint_action_download)
1485 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1486 size and offset accordingly.
1487 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1488 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1489 (tracepoint_action_send, tracepoint_action_download): New functions.
1490 Helpers for trace action handlers.
1491 (add_tracepoint_action): Remove setup actions ops.
1492 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1493
9f6a71b4
YQ
14942016-02-10 Yao Qi <yao.qi@linaro.org>
1495
1496 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1497
1e94266c
SM
14982016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1499
1500 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1501 to AC_OUTPUT.
1502 * configure: Regenerate.
1503
8adce034
SM
15042016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1505
1506 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1507 void * to gdb_byte *.
1508 * linux-low.c (siginfo_fixup): Likewise.
1509 (linux_xfer_siginfo): Likewise.
1510 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1511 Likewise.
1512 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1513
93813b37
WT
15142016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1515
1516 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1517 to srv_tgtobj.
1518 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1519 to srv_tgtobj.
1520 * linux-x86-low.c [__x86_64__]: Include
1521 "nat/amd64-linux-siginfo.h".
1522 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1523 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1524 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1525 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1526 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1527 (cpt_si_fd, si_timerid, si_overrun): Move from
1528 nat/amd64-linux-siginfo.c.
1529 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1530
8424cc97
SM
15312016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1532
1533 * server.c (skip_to_semicolon): Remove.
1534 (process_point_options): Use strchrnul instead of
1535 skip_to_semicolon.
1536
4d18591b
YQ
15372016-01-26 Yao Qi <yao.qi@linaro.org>
1538
1539 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1540 * linux-low.c (install_software_single_step_breakpoints): Don't
1541 call regcache_read_pc.
1542 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1543 argument pc.
1544
d8020970
YQ
15452016-01-26 Yao Qi <yao.qi@linaro.org>
1546
1547 * linux-low.c (install_software_single_step_breakpoints): Call
1548 regcache_read_pc instead of get_pc.
1549
8b207339
YQ
15502016-01-26 Yao Qi <yao.qi@linaro.org>
1551
1552 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1553 (unblock_async_io): Rename to ...
1554 (block_unblock_async_io): ... it. New function.
1555 (enable_async_io): Don't install SIGIO handler. Unblock it
1556 instead.
1557 (disable_async_io): Don't ignore SIGIO. Block it instead.
1558 (initialize_async_io): Install SIGIO handler. Don't call
1559 unblock_async_io.
1560
18879fef
YQ
15612016-01-26 Yao Qi <yao.qi@linaro.org>
1562
1563 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1564 first character is '\003', call *the_target->request_interrupt.
1565
a0f8e08a
YQ
15662016-01-25 Yao Qi <yao.qi@linaro.org>
1567
1568 * remote-utils.c (new_thread_notify): Remove.
1569 (dead_thread_notify): Likewise.
1570 * remote-utils.h (new_thread_notify): Remove declaration.
1571 (dead_thread_notify): Likewise.
1572
cc5fd9ab
MK
15732016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1574
1575 * gdb.trace/pending.exp: Fix expected message on continue.
1576
99e8eb11
MK
15772016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1578
1579 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1580 it works properly on big-endian machines where sizeof (CORE_ADDR)
1581 != sizeof (void *).
1582
a994041d
PA
15832016-01-21 Pedro Alves <palves@redhat.com>
1584
1585 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1586 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1587 * configure: Regenerate.
1588
f7a6a40d
YQ
15892016-01-21 Yao Qi <yao.qi@linaro.org>
1590
1591 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1592 is_thumb and set it according to CPSR saved on the stack.
1593 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1594 arm_sigreturn_next_pc.
1595
6f69e520
YQ
15962016-01-18 Yao Qi <yao.qi@linaro.org>
1597
1598 * linux-low.c (linux_set_pc_64bit): New function.
1599 (linux_get_pc_64bit): New function.
1600 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1601 Declare.
1602 * linux-sparc-low.c (debug_threads): Remove declaration.
1603 (sparc_get_pc): Remove.
1604 (the_low_target): Use linux_get_pc_64bit instead of
1605 sparc_get_pc.
1606 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1607 (the_low_target): Use linux_get_pc_64bit and
1608 linux_set_pc_64bit.
1609
276d4552
YQ
16102016-01-18 Yao Qi <yao.qi@linaro.org>
1611
1612 * linux-arm-low.c (debug_threads): Remove declaration.
1613 (arm_get_pc, arm_set_pc): Remove.
1614 (the_low_target): Use linux_get_pc_32bit and
1615 linux_set_pc_32bit.
1616 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1617 (the_low_target): Use linux_get_pc_32bit and
1618 linux_set_pc_32bit.
1619 * linux-cris-low.c (debug_threads): Remove declaration.
1620 (cris_get_pc, cris_set_pc,): Remove.
1621 (the_low_target): Use linux_get_pc_32bit and
1622 linux_set_pc_32bit.
1623 * linux-crisv32-low.c (debug_threads): Remove declaration.
1624 (cris_get_pc, cris_set_pc): Remove.
1625 (the_low_target): Use linux_get_pc_32bit and
1626 linux_set_pc_32bit.
1627 * linux-low.c: Include inttypes.h.
1628 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1629 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1630 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1631 (the_low_target): Use linux_get_pc_32bit and
1632 linux_set_pc_32bit.
1633 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1634 (the_low_target): Use linux_get_pc_32bit and
1635 linux_set_pc_32bit.
1636 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1637 (the_low_target): Use linux_get_pc_32bit and
1638 linux_set_pc_32bit.
1639 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1640 (the_low_target): Use linux_get_pc_32bit and
1641 linux_set_pc_32bit.
1642 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1643 (the_low_target): Use linux_get_pc_32bit and
1644 linux_set_pc_32bit.
1645
eb0edac8
GB
16462016-01-18 Gary Benson <gbenson@redhat.com>
1647
1648 * configure.ac (AC_FUNC_FORK): New check.
1649 * config.in: Regenerate.
1650 * configure: Likewise.
1651
1b451dda
YQ
16522016-01-14 Yao Qi <yao.qi@linaro.org>
1653
1654 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1655 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1656 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1657 arm_get_next_pcs_ctor.
1658
82075af2
JS
16592016-01-12 Josh Stone <jistone@redhat.com>
1660 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1661
1662 * inferiors.h: Include "gdb_vecs.h".
1663 (struct process_info): Add syscalls_to_catch.
1664 * inferiors.c (remove_process): Free syscalls_to_catch.
1665 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1666 syscall_return stops.
1667 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1668 * server.c (handle_general_set): Handle QCatchSyscalls.
1669 (handle_query): Report support for QCatchSyscalls.
1670 * target.h (struct target_ops): Add supports_catch_syscall.
1671 (target_supports_catch_syscall): New macro.
1672 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1673 (struct lwp_info): Add syscall_state.
1674 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1675 Maintain syscall_state and syscalls_to_catch across exec.
1676 (get_syscall_trapinfo): New function, proxy to the_low_target.
1677 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1678 (linux_low_filter_event): Toggle syscall_state entry/return for
1679 syscall traps, and set it ignored for all others.
1680 (gdb_catching_syscalls_p): New function.
1681 (gdb_catch_this_syscall_p): New function.
1682 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1683 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1684 (linux_supports_catch_syscall): New function.
1685 (linux_target_ops): Install it.
1686 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1687 (the_low_target): Install it.
1688
8f13a3ce
MF
16892016-01-12 Mike Frysinger <vapier@gentoo.org>
1690
1691 * acinclude.m4: Include new ../warning.m4 file.
1692 * configure: Regenerated.
1693 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1694
5b3da067
MF
16952016-01-12 Mike Frysinger <vapier@gentoo.org>
1696
1697 * ax.c (is_goto_target): Mark static.
1698 * linux-low.c (register_addr): Likewise.
1699 (linux_fetch_registers, linux_store_registers): Likewise.
1700 * mem-break.c (any_persistent_commands): Fix old prototype.
1701 (add_commands_to_breakpoint): Mark static.
1702 * regcache.c (find_register_by_name): Delete unused func.
1703 * remote-utils.c (hex_or_minus_one): Mark static.
1704 * server.c (monitor_show_help): Mark static.
1705 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1706 handle_v_requests): Likewise.
1707
bc504a31
PA
17082016-01-12 Pedro Alves <palves@redhat.com>
1709
1710 Remove use of the registered trademark symbol throughout.
1711
5a0dd67a
YQ
17122016-01-08 Yao Qi <yao.qi@linaro.org>
1713
1714 * remote-utils.c (getpkt): If c is '\003', call target hook
1715 request_interrupt.
1716
b2ca446f
YQ
17172016-01-06 Yao Qi <yao.qi@linaro.org>
1718
1719 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1720 linux-aarch32-low.c.
1721 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1722 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1723 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1724 (thumb2_breakpoint): Declare.
1725 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1726 linux-aarch32-low.h.
1727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1728 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1729 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1730
edd88788
JB
17312016-01-01 Joel Brobecker <brobecker@adacore.com>
1732
1733 * gdbreplay.c (gdbreplay_version): Change copyright year in
1734 version message.
1735 * server.c (gdbserver_version): Likewise.
1736
65da7f14
PP
17372015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1738
1739 * server.c (crc32_table): Delete.
1740 (crc32): Use libiberty's xcrc32 function.
1741
4abd5ed2
JB
17422015-12-22 Joel Brobecker <brobecker@adacore.com>
1743
1744 * lynx-low.c (lynx_delete_thread_callback): New function.
1745 (lynx_mourn): Properly delete our process and all of its
1746 threads. Remove call to clear_inferiors.
1747
0e50fe5c
JB
17482015-12-22 Joel Brobecker <brobecker@adacore.com>
1749
1750 * target.c (thread_search_callback): Add check that
1751 the thread_stopped target callback is not NULL before
1752 calling it.
1753
35adc03f
YQ
17542015-12-21 Yao Qi <yao.qi@linaro.org>
1755
1756 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1757 arm breakpoint.
1758
bd2b2909
AT
17592015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1760
1761 * server.c (handle_query): Call target_supports_software_single_step.
1762
7fe5e27e
AT
17632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1764
1765 * linux-low.c (single_step): New function.
1766 (linux_resume_one_lwp_throw): Call single_step.
1767 (start_step_over): Likewise.
1768
d9311bfa
AT
17692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1770
1771 * Makefile.in (SFILES): Append arch/arm-linux.c,
1772 arch/arm-get-next-pcs.c.
1773 (arm-linux.o): New rule.
1774 (arm-get-next-pcs.o): New rule.
1775 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1776 arm-linux.o.
1777 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1778 to linux-aarch32-low.c.
1779 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1780 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1781 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1782 (thumb2_breakpoint_len): Likewise.
1783 (arm_is_thumb_mode): Make non-static.
1784 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1785 from linux-aarch32-low.c.
1786 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1787 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1788 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1789 (thumb2_breakpoint_len): Likewise.
1790 (arm_is_thumb_mode): New declaration.
1791 * linux-arm-low.c: Include arch/arm-linux.h
1792 aarch/arm-get-next-pcs.h, sys/syscall.h.
1793 (get_next_pcs_ops): New struct.
1794 (get_next_pcs_addr_bits_remove): New function.
1795 (get_next_pcs_is_thumb): New function.
1796 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1797 (arm_sigreturn_next_pc): Likewise.
1798 (get_next_pcs_syscall_next_pc): Likewise.
1799 (arm_gdbserver_get_next_pcs): Likewise.
1800 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1801 Initialize.
1802 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1803 * server.h: Include gdb_vecs.h.
1804
68ce2059
AT
18052015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1806
1807 * Makefile.in (SFILES): Append common/common-regcache.c.
1808 (OBS): Append common-regcache.o.
1809 (common-regcache.o): New rule.
1810 * regcache.c (init_register_cache): Initialize cache to
1811 REG_UNAVAILABLE.
1812 (regcache_raw_read_unsigned): New function.
1813 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1814 register_status enum.
1815
fa5308bd
AT
18162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1817
1818 * linux-aarch64-low.c (the_low_targets): Rename
1819 breakpoint_reinsert_addr to get_next_pcs.
1820 * linux-arm-low.c (the_low_targets): Likewise.
1821 * linux-bfin-low.c (the_low_targets): Likewise.
1822 * linux-cris-low.c (the_low_targets): Likewise.
1823 * linux-crisv32-low.c (the_low_targets): Likewise.
1824 * linux-low.c (can_software_single_step): Likewise.
1825 (install_software_single_step_breakpoints): New function.
1826 (start_step_over): Use install_software_single_step_breakpoints.
1827 * linux-low.h: New CORE_ADDR vector.
1828 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1829 get_next_pcs.
1830 * linux-mips-low.c (the_low_targets): Likewise.
1831 * linux-nios2-low.c (the_low_targets): Likewise.
1832 * linux-sparc-low.c (the_low_targets): Likewise.
1833
4a6ed09b
PA
18342015-12-17 Pedro Alves <palves@redhat.com>
1835
1836 * linux-low.c (linux_kill_one_lwp): Remove references to
1837 LinuxThreads.
1838 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1839 to 'kill'.
1840 (linux_init_signals): Delete.
1841 (initialize_low): Adjust.
1842 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1843
7544db95
PA
18442015-12-16 Pedro Alves <palves@redhat.com>
1845
1846 * configure.ac (compiler warning flags): When testing a
1847 -Wno-foo option, check whether -Wfoo works instead.
1848 * configure: Regenerate.
1849
8020350c
DB
18502015-12-11 Don Breazeal <donb@codesourcery.com>
1851
1852 * server.c (process_serial_event): Don't exit from gdbserver
1853 in remote mode if there are still active inferiors.
1854
db91f502
YQ
18552015-12-11 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1858 arm_breakpoint_at if the process is 32-bit.
1859
b37a6290
YQ
18602015-12-11 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1863 arm breakpoint.
1864
17b1509a
YQ
18652015-12-07 Yao Qi <yao.qi@linaro.org>
1866
1867 * configure.srv: Append arm.o to srv_tgtobj for
1868 aarch64*-*-linux* target.
1869 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1870 from linux-arm-low.c.
1871 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1872 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1873 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1874 (thumb2_breakpoint_len): Likewise.
1875 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1876 (arm_breakpoint_kinds): Likewise.
1877 (arm_breakpoint_kind_from_pc): Likewise.
1878 (arm_sw_breakpoint_from_kind): Likewise.
1879 (arm_breakpoint_kind_from_current_state): Likewise.
1880 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1881 (arm_sw_breakpoint_from_kind): Declare.
1882 (arm_breakpoint_kind_from_current_state): Declare.
1883 (arm_breakpoint_at): Declare.
1884 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1885 arm_sw_breakpoint_from_kind if process is 32-bit.
1886 (aarch64_breakpoint_kind_from_pc): New function.
1887 (aarch64_breakpoint_kind_from_current_state): New function.
1888 (the_low_target): Initialize fields breakpoint_kind_from_pc
1889 and breakpoint_kind_from_current_state.
1890 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1891 linux-aarch32-low.c.
1892 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1893 (arm_breakpoint, arm_breakpoint_len): Likewise.
1894 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1895 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1896 (arm_is_thumb_mode): Likewise.
1897 (arm_breakpoint_at): Likewise.
1898 (arm_breakpoint_kind_from_pc): Likewise.
1899 (arm_sw_breakpoint_from_kind): Likewise.
1900 (arm_breakpoint_kind_from_current_state): Likewise.
1901
1902 Revert:
1903 2015-08-04 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1906 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1907 * server.c (extended_protocol): Remove "static".
1908 * server.h (extended_protocol): Declare it.
1909
ece66d65
JS
19102015-12-04 Josh Stone <jistone@redhat.com>
1911
1912 * target.h (struct target_ops) <arch_setup>: Rename to ...
1913 (struct target_ops) <post_create_inferior>: ... this.
1914 (target_arch_setup): Rename to ...
1915 (target_post_create_inferior): ... this, calling post_create_inferior.
1916 * server.c (start_inferior): Update target_arch_setup calls to
1917 target_post_create_inferior.
1918 * linux-low.c (linux_low_ptrace_options): Forward declare.
1919 (linux_arch_setup): Update its comment for general use.
1920 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1921 (struct linux_target_ops): Use linux_post_create_inferior.
1922 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1923 to post_create_inferior.
1924 * nto-low.c (struct nto_target_ops): Likewise.
1925 * spu-low.c (struct spu_target_ops): Likewise.
1926 * win32-low.c (struct win32_target_ops): Likewise.
1927
e58c48b4
AT
19282015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1929
1930 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1931
fbec8956
AT
19322015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1933
1934 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1935 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1936 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1937 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1938 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1939 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1940 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1941 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1942 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1943 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1944 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1945 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1946
9b4c5f87
AT
19472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1948
1949 * linux-low.c (linux_look_up_symbols): Don't call
1950 linux_supports_traceclone.
1951 * linux-low.h (thread_db_init): Remove use_events argument.
1952 * thread-db.c (thread_db_use_event): Remove global variable.
1953 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1954 (struct thread_db) <td_create_bp>: Remove field.
1955 (thread_db_create_event): Remove function.
1956 (thread_db_enable_reporting): Likewise.
1957 (find_one_thread): Don't check for thread_db_use_events.
1958 (attach_thread): Likewise.
1959 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1960 (try_thread_db_load_1): Don't check for thread_db_use_events.
1961 (thread_db_init): Remove use_events argument and thread events
1962 handling.
1963 (remove_thread_event_breakpoints): Remove function.
1964 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1965
7d00775e
AT
19662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1967
1968 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1969 New function.
1970 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1971 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1973 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1974 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1975 Initialize.
1976 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1977 New function.
1978 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1979 * linux-low.c (can_hardware_single_step): Use
1980 supports_hardware_single_step.
1981 (can_software_single_step): New function.
1982 (start_step_over): Call can_software_single_step.
1983 (linux_supports_hardware_single_step): New function.
1984 (struct target_ops) <supports_software_single_step>: Initialize.
1985 * linux-low.h (struct linux_target_ops)
1986 <supports_hardware_single_step>: Initialize.
1987 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1988 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1989 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1990 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1991 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1993 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1994 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1995 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1996 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1997 Initialize.
1998 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1999 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2000 Initialize.
2001 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2002 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2003 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2004 New function.
2005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2006 * target.h (struct target_ops): <supports_software_single_step>:
2007 New field.
2008 (target_supports_software_single_step): New macro.
2009
2d97cd35
AT
20102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2011
2012 * linux-low.c (linux_wait_1): Fix pc advance condition.
2013 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2014 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2015
769ef81f
AT
20162015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2017
2018 * linux-arm-low.c (arm_is_thumb_mode): New function.
2019 (arm_breakpoint_at): Use arm_is_thumb_mode.
2020 (arm_breakpoint_kind_from_current_state): New function.
2021 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2022 Initialize.
2023 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2024 (linux_breakpoint_kind_from_current_state): New function.
2025 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2026 * linux-low.h (struct linux_target_ops)
2027 <breakpoint_kind_from_current_state>: New field.
2028 * target.h (struct target_ops): Likewise.
2029 (target_breakpoint_kind_from_current_state): New macro.
2030
1bebeeca
PA
20312015-11-30 Pedro Alves <palves@redhat.com>
2032
2033 * linux-low.c (linux_resume): Wake up the event loop before
2034 returning.
2035
a67a9fae
PA
20362015-11-30 Pedro Alves <palves@redhat.com>
2037
2038 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2039 check.
2040 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2041 to -1.
2042 * target.c (struct thread_search): New structure.
2043 (thread_search_callback): New function.
2044 (prev_general_thread): New global.
2045 (prepare_to_access_memory, done_accessing_memory): New functions.
2046 * target.h (prepare_to_access_memory, done_accessing_memory):
2047 Replace macros with function declarations.
2048
f2faf941
PA
20492015-11-30 Pedro Alves <palves@redhat.com>
2050
2051 PR 14618
2052 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2053 report TARGET_WAITKIND_NO_RESUMED.
2054 * remote-utils.c (prepare_resume_reply): Handle
2055 TARGET_WAITKIND_NO_RESUMED.
2056 * server.c (report_no_resumed): New global.
2057 (handle_query) <qSupported>: Handle "no-resumed+". Report
2058 "no-resumed+" support.
2059 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2060 return error if the client doesn't support no-resumed events.
2061 (push_stop_notification): New function.
2062 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2063 events if the client supports them.
2064
a681f9c9
PA
20652015-11-30 Pedro Alves <palves@redhat.com>
2066
2067 * linux-low.c (thread_still_has_status_pending_p): Don't check
2068 vCont;t here.
2069 (lwp_resumed): New function.
2070 (status_pending_p_callback): Return early if the LWP is not
2071 supposed to be resumed.
2072
65706a29
PA
20732015-11-30 Pedro Alves <palves@redhat.com>
2074
2075 * linux-low.c (handle_extended_wait): Assert that the LWP's
2076 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2077 thread create events, leave the new child's status pending.
2078 (linux_low_filter_event): If GDB wants to hear about thread exit
2079 events, leave the LWP marked dead and don't delete it.
2080 (linux_wait_for_event_filtered): Don't check for thread exit.
2081 (filter_exit_event): New function.
2082 (linux_wait_1): Use it, when returning an exit event.
2083 (linux_resume_one_lwp_throw): Assert that the LWP's
2084 waitstatus is TARGET_WAITKIND_IGNORE.
2085 * remote-utils.c (prepare_resume_reply): Handle
2086 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2087 * server.c (report_thread_events): New global.
2088 (handle_general_set): Handle QThreadEvents.
2089 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2090 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2091 TARGET_WAITKIND_THREAD_EXITED.
2092 * server.h (report_thread_events): Declare.
2093
56cf4bed
PA
20942015-11-30 Pedro Alves <palves@redhat.com>
2095
2096 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2097 the thread's last_resume_kind was resume_stop.
2098
500c1d85
PA
20992015-11-30 Pedro Alves <palves@redhat.com>
2100
2101 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2102 before returning.
2103
de979965
PA
21042015-11-30 Pedro Alves <palves@redhat.com>
2105
2106 * server.c (handle_v_requests): Handle vCtrlC.
2107
34c65914
PA
21082015-11-30 Pedro Alves <palves@redhat.com>
2109
2110 * gdbthread.h (find_any_thread_of_pid): Declare.
2111 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2112 functions.
2113 * server.c (handle_query): If current_thread is NULL, look for
2114 another thread of the selected process.
2115
79efa585 21162015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2117 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2118
2119 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2120 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2121 name in reply.
2122 * target.h (struct target_ops) <thread_name>: New field.
2123 (target_thread_name): New macro.
2124
80d82c19
JB
21252015-11-23 Joel Brobecker <brobecker@adacore.com>
2126
2127 * regcache.h (regcache_invalidate_pid): Add declaration.
2128 * regcache.c (regcache_invalidate_pid): New function, extracted
2129 from regcache_invalidate.
2130 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2131 Add trivial documentation comment.
2132 * lynx-low.c: Use regcache_invalidate_pid instead of
2133 regcache_invalidate.
2134
64da5dd5
JB
21352015-11-23 Joel Brobecker <brobecker@adacore.com>
2136
2137 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2138 and Elf64_auxv_t if the target is Android.
2139
37ce4055
DE
21402015-11-22 Doug Evans <xdje42@gmail.com>
2141
2142 * target.h: #include <sys/types.h>.
2143
06e03fff
PA
21442015-11-19 Pedro Alves <palves@redhat.com>
2145
2146 * linux-low.c (linux_process_qsupported): Change prototype.
2147 Adjust.
2148 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2149 Change prototype.
2150 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2151 and adjust to loop over all features.
2152 * server.c (handle_query) <qSupported>: Adjust to call
2153 target_process_qsupported once, passing it a vector of unprocessed
2154 features.
2155 * target.h (struct target_ops) <process_qsupported>: Change
2156 prototype.
2157 (target_process_qsupported): Adjust.
2158
9a084706
PA
21592015-11-19 Pedro Alves <palves@redhat.com>
2160
2161 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2162 mode.
2163 * configure: Regenerate.
2164
dad44a1f
PA
21652015-11-19 Pedro Alves <palves@redhat.com>
2166
2167 * configure: Regenerate.
2168
231c0592
YQ
21692015-11-19 Yao Qi <yao.qi@linaro.org>
2170
2171 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2172 type to uint32_t.
2173
6c1c9a8b
YQ
21742015-11-19 Yao Qi <yao.qi@linaro.org>
2175
2176 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2177 (struct aarch64_operand): Move enum out.
2178
9caa3311
YQ
21792015-11-19 Yao Qi <yao.qi@linaro.org>
2180
2181 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2182 struct user_fpsimd_state *.
2183 (aarch64_store_fpregset): Likewise.
2184
6a69a054
YQ
21852015-11-19 Yao Qi <yao.qi@linaro.org>
2186
2187 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2188 struct user_pt_regs *.
2189 (aarch64_store_gregset): Likewise.
2190
1798301e
PA
21912015-11-18 Pedro Alves <palves@redhat.com>
2192
2193 * Makefile.in (all_object_files): Add $IPA_OBJS.
2194
ce7715e2
PA
21952015-11-17 Pedro Alves <palves@redhat.com>
2196
2197 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2198 GDB_SIGNAL_0 and gdb_signal_to_string.
2199
c0879059
PA
22002015-11-17 Pedro Alves <palves@redhat.com>
2201
2202 * win32-low.c (handle_output_debug_string): Remove parameter.
2203 (win32_kill): Remove our_status local and adjust call to
2204 handle_output_debug_string.
2205 (get_child_debug_event): Adjust call to
2206 handle_output_debug_string.
2207
1996e237
SM
22082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2209
2210 * linux-mips-low.c (mips_fill_gregset): Add cast.
2211 (mips_store_gregset): Likewise.
2212 (mips_fill_fpregset): Likewise.
2213 (mips_store_fpregset): Likewise.
2214
cbec665b
SM
22152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2216
2217 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2218 priv.
2219
eb3e3c67
SM
22202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2221
2222 * linux-mips-low.c (mips_linux_new_thread): Change type of
2223 watch_type to enum target_hw_bp_type.
2224
171de4b8
SM
22252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2226
2227 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2228 Change return type to arm_hwbp_type.
2229
04248ead
SM
22302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2231
2232 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2233 (arm_store_gregset): Likewise.
2234 * linux-arm-low.c (arm_get_hwcap): Likewise.
2235 (arm_read_description): Likewise.
2236
04b3479c
SM
22372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2238
2239 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2240
2bc84e8a
SM
22412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2242
2243 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2244 (ppc_fill_vsxregset): Likewise.
2245 (ppc_store_vsxregset): Likewise.
2246 (ppc_fill_vrregset): Likewise.
2247 (ppc_store_vrregset): Likewise.
2248 (ppc_fill_evrregset): Likewise.
2249 (ppc_store_evrregset): Likewise.
2250
e6c5bb05
SM
22512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2252
2253 * linux-ppc-low.c (ppc_usrregs_info): Remove
2254 forward-declaration.
2255 (ppc_arch_setup): Move lower in file.
2256
7ea45d72
SM
22572015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2258
2259 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2260 (ps_pdwrite): Likewise.
2261
69291610
HW
22622015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2263
2264 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2265 to after assert checks.
2266
b42945fd
SM
22672015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2268
2269 * proc-service.c (ps_pdread): Add/adjust casts.
2270 (ps_pdwrite): Add/adjust casts.
2271
d6f85c84
SM
22722015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * server.c (handle_search_memory_1): Cast return value of
2275 memmem.
2276
f98cd059
SM
22772015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2278
2279 * server.c (write_qxfer_response): Change type of data to
2280 gdb_byte *.
2281
d2412fa5
PA
22822015-10-29 Pedro Alves <palves@redhat.com>
2283
2284 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2285
c17414a2
PA
22862015-10-29 Pedro Alves <palves@redhat.com>
2287
2288 * tracepoint.c (clear_installed_tracepoints): Add casts.
2289
e053fbc4
PA
22902015-10-29 Pedro Alves <palves@redhat.com>
2291
2292 * server.c (handle_v_cont, process_serial_event): Add enum
2293 gdb_signal casts to signal parsing code.
2294
add67df8
PA
22952015-10-29 Pedro Alves <palves@redhat.com>
2296
2297 * linux-low.h (NULL_REGSET): Define.
2298 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2299 * linux-arm-low.c (arm_regsets): Likewise.
2300 * linux-crisv32-low.c (cris_regsets): Likewise.
2301 * linux-m68k-low.c (m68k_regsets): Likewise.
2302 * linux-mips-low.c (mips_regsets): Likewise.
2303 * linux-nios2-low.c (nios2_regsets): Likewise.
2304 * linux-ppc-low.c (ppc_regsets): Likewise.
2305 * linux-s390-low.c (s390_regsets): Likewise.
2306 * linux-sh-low.c (sh_regsets): Likewise.
2307 * linux-sparc-low.c (sparc_regsets): Likewise.
2308 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2309 * linux-tile-low.c (tile_regsets): Likewise.
2310 * linux-x86-low.c (x86_regsets): Likewise.
2311 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2312
50bc912a
PA
23132015-10-29 Pedro Alves <palves@redhat.com>
2314
2315 * linux-low.h (NULL_REGSET): Define.
2316 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2317 * linux-arm-low.c (arm_regsets): Likewise.
2318 * linux-crisv32-low.c (cris_regsets): Likewise.
2319 * linux-m68k-low.c (m68k_regsets): Likewise.
2320 * linux-mips-low.c (mips_regsets): Likewise.
2321 * linux-nios2-low.c (nios2_regsets): Likewise.
2322 * linux-ppc-low.c (ppc_regsets): Likewise.
2323 * linux-s390-low.c (s390_regsets): Likewise.
2324 * linux-sh-low.c (sh_regsets): Likewise.
2325 * linux-sparc-low.c (sparc_regsets): Likewise.
2326 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2327 * linux-tile-low.c (tile_regsets): Likewise.
2328 * linux-x86-low.c (x86_regsets): Likewise.
2329 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2330
682b2546
DE
23312015-10-26 Doug Evans <dje@google.com>
2332
2333 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2334
963843d4
DE
23352015-10-26 Doug Evans <dje@google.com>
2336
2337 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2338
d41401ac
DE
23392015-10-26 Doug Evans <dje@google.com>
2340
2341 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2342 for debug_printf.
2343 (attach_thread, find_new_threads_callback): Ditto.
2344
3db28855
AT
23452015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2346
2347 * mem-break.h (set_breakpoint_data): Remove.
2348
fb78e89c
AT
23492015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2350
2351 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2353 (initialize_low): Remove set_breakpoint_data call.
2354 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2355 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2356 (initialize_low): Remove set_breakpoint_data call.
2357 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2358 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2359 (initialize_low): Remove set_breakpoint_data call.
2360
2e6ee069
AT
23612015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2362
2363 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2364 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2365 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2366 * target.h (target_breakpoint_kind_from_pc): New macro.
2367
1652a986
AT
23682015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2369
2370 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2371 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2372 the default breakpoint kind.
2373
abeead09
AT
23742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2375
2376 * linux-arm-low.c (arm_supports_z_point_type): Add software
2377 breakpoint support.
2378
b0b4b501
AT
23792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2380
2381 * linux-arm-low.c: Refactor breakpoint definitions.
2382 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2383 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2384
8689682c
AT
23852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2386
2387 * Makefile.in: Add arm.c/o.
2388 * configure.srv: Likewise.
2389 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2390 (arm_breakpoint_kind_from_pc): New function.
2391 (arm_sw_breakpoint_from_kind): Return proper kind.
2392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2393
27165294
AT
23942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2395
2396 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2397 removal.
2398 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2399 (struct raw_breakpoint) <size>: Remove.
2400 (struct raw_breakpoint) <kind>: Add.
2401 (bp_size): New function.
2402 (bp_opcode): Likewise.
2403 (find_raw_breakpoint_at): Adjust for kind.
2404 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2405 (remove_memory_breakpoint): Adjust for kind call bp_size.
2406 (set_raw_breakpoint_at): Adjust for kind.
2407 (set_breakpoint): Likewise.
2408 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2409 (delete_raw_breakpoint): Adjust for kind.
2410 (delete_breakpoint): Likewise.
2411 (find_gdb_breakpoint): Likewise.
2412 (set_gdb_breakpoint_1): Likewise.
2413 (set_gdb_breakpoint): Likewise.
2414 (delete_gdb_breakpoint_1): Likewise.
2415 (delete_gdb_breakpoint): Likewise.
2416 (uninsert_raw_breakpoint): Likewise.
2417 (reinsert_raw_breakpoint): Likewise.
2418 (set_breakpoint_data): Remove.
2419 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2420 (check_mem_read): Adjust for kind call bp_size.
2421 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2422 (clone_one_breakpoint): Adjust for kind.
2423 * mem-break.h (set_gdb_breakpoint): Likewise.
2424 (delete_gdb_breakpoint): Likewise.
2425 * server.c (process_serial_event): Likewise.
2426
dd373349
AT
24272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2428
2429 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2430 (struct linux_target_ops) <breakpoint>: Remove.
2431 (struct linux_target_ops) <breakpoint_len>: Remove.
2432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2434 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2435 (arm_sw_breakpoint_from_kind): New function.
2436 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2437 (struct linux_target_ops) <breakpoint>: Remove.
2438 (struct linux_target_ops) <breakpoint_len>: Remove.
2439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2441 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2442 (struct linux_target_ops) <breakpoint>: Remove.
2443 (struct linux_target_ops) <breakpoint_len>: Remove.
2444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2446 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2447 (struct linux_target_ops) <breakpoint>: Remove.
2448 (struct linux_target_ops) <breakpoint_len>: Remove.
2449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2451 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2452 and sw_breakpoint_from_kind to increment the pc.
2453 (linux_breakpoint_kind_from_pc): New function.
2454 (linux_sw_breakpoint_from_kind): New function.
2455 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2456 (initialize_low): Call breakpoint_kind_from_pc and
2457 sw_breakpoint_from_kind to replace breakpoint_data/len.
2458 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2459 New field.
2460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2461 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2462 (struct linux_target_ops) <breakpoint>: Remove.
2463 (struct linux_target_ops) <breakpoint_len>: Remove.
2464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2466 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2467 (struct linux_target_ops) <breakpoint>: Remove.
2468 (struct linux_target_ops) <breakpoint_len>: Remove.
2469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2472 (struct linux_target_ops) <breakpoint>: Remove.
2473 (struct linux_target_ops) <breakpoint_len>: Remove.
2474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2476 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2477 (struct linux_target_ops) <breakpoint>: Remove.
2478 (struct linux_target_ops) <breakpoint_len>: Remove.
2479 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2481 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2492 (struct linux_target_ops) <breakpoint>: Remove.
2493 (struct linux_target_ops) <breakpoint_len>: Remove.
2494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2496 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2497 (struct linux_target_ops) <breakpoint>: Remove.
2498 (struct linux_target_ops) <breakpoint_len>: Remove.
2499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2501 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2502 (struct linux_target_ops) <breakpoint>: Remove.
2503 (struct linux_target_ops) <breakpoint_len>: Remove.
2504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2506 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2507 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2508 (struct linux_target_ops) <breakpoint>: Remove.
2509 (struct linux_target_ops) <breakpoint_len>: Remove.
2510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2512 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2513 (struct linux_target_ops) <breakpoint>: Remove.
2514 (struct linux_target_ops) <breakpoint_len>: Remove.
2515 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2516 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2517
4cd98a19
AT
25182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2519
2520 * linux-cris-low.c (cris_get_pc): Remove void arg.
2521
774ee6d2
AR
25222015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2523
2524 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2525 variable name.
2526
833dcd29
AR
25272015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2528
2529 * inferiors.c (thread_pid_matches_callback): New function.
2530 (find_thread_process): New function.
2531 (remove_thread): Reset current_thread.
2532 (remove_process): Assert threads have been removed first.
2533
8d689ee5
YQ
25342015-10-15 Yao Qi <yao.qi@linaro.org>
2535
2536 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2537 if it is 3.
2538 (aarch64_remove_point): Likewise.
2539 * regcache.c (regcache_register_size): New function.
2540
1c2e1515
YQ
25412015-10-12 Yao Qi <yao.qi@linaro.org>
2542
2543 * linux-aarch64-low.c: Update all callers as emit_load_store
2544 is renamed to aarch64_emit_load_store.
2545
e1c587c3
YQ
25462015-10-12 Yao Qi <yao.qi@linaro.org>
2547
2548 * linux-aarch64-low.c: Update all callers of function renaming
2549 from emit_insn to aarch64_emit_insn.
2550
b6542f81
YQ
25512015-10-12 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2554 arch/aarch64-insn.h.
2555 (struct aarch64_memory_operand): Likewise.
2556 (ENCODE): Likewise.
2557 (emit_insn): Move to arch/aarch64-insn.c.
2558 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2559 (emit_load_store): Move to arch/aarch64-insn.c.
2560 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2561 (can_encode_int32): Remove.
2562
246994ce
YQ
25632015-10-12 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2566 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2567 (aarch64_relocate_instruction): Likewise.
2568 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2569 (struct aarch64_insn_visitor): Likewise.
2570
0badd99f
YQ
25712015-10-12 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2574 (struct aarch64_insn_visitor): New.
2575 (struct aarch64_insn_relocation_data): New.
2576 (aarch64_ftrace_insn_reloc_b): New function.
2577 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2578 (aarch64_ftrace_insn_reloc_cb): Likewise.
2579 (aarch64_ftrace_insn_reloc_tb): Likewise.
2580 (aarch64_ftrace_insn_reloc_adr): Likewise.
2581 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2582 (aarch64_ftrace_insn_reloc_others): Likewise.
2583 (visitor): New.
2584 (aarch64_relocate_instruction): Use visitor.
2585
dfaffe9d
YQ
25862015-10-12 Yao Qi <yao.qi@linaro.org>
2587
2588 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2589 int. Add argument buf.
2590 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2591 aarch64_relocate_instruction.
2592
70b439f0
YQ
25932015-10-12 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2596 argument insn. Remove local variable insn. Don't call
2597 target_read_uint32.
2598 (aarch64_install_fast_tracepoint_jump_pad): Call
2599 target_read_uint32.
2600
7781c06f
YQ
26012015-09-30 Yao Qi <yao.qi@linaro.org>
2602
2603 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2604 (emit_load_store_pair): Likewise.
2605
9a3c8263
SM
26062015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2607
2608 * dll.c (match_dll): Add cast(s).
2609 (unloaded_dll): Likewise.
2610 * linux-low.c (second_thread_of_pid_p): Likewise.
2611 (delete_lwp_callback): Likewise.
2612 (count_events_callback): Likewise.
2613 (select_event_lwp_callback): Likewise.
2614 (linux_set_resume_request): Likewise.
2615 * server.c (accumulate_file_name_length): Likewise.
2616 (emit_dll_description): Likewise.
2617 (handle_qxfer_threads_worker): Likewise.
2618 (visit_actioned_threads): Likewise.
2619 * thread-db.c (any_thread_of): Likewise.
2620 * tracepoint.c (same_process_p): Likewise.
2621 (match_blocktype): Likewise.
2622 (build_traceframe_info_xml): Likewise.
2623
224c3ddb
SM
26242015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2625
2626 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2627 assignment.
2628 (gdb_unparse_agent_expr): Likewise.
2629 * hostio.c (require_data): Likewise.
2630 (handle_pread): Likewise.
2631 * linux-low.c (disable_regset): Likewise.
2632 (fetch_register): Likewise.
2633 (store_register): Likewise.
2634 (get_dynamic): Likewise.
2635 (linux_qxfer_libraries_svr4): Likewise.
2636 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2637 (set_fast_tracepoint_jump): Likewise.
2638 (uninsert_fast_tracepoint_jumps_at): Likewise.
2639 (reinsert_fast_tracepoint_jumps_at): Likewise.
2640 (validate_inserted_breakpoint): Likewise.
2641 (clone_agent_expr): Likewise.
2642 * regcache.c (init_register_cache): Likewise.
2643 * remote-utils.c (putpkt_binary_1): Likewise.
2644 (decode_M_packet): Likewise.
2645 (decode_X_packet): Likewise.
2646 (look_up_one_symbol): Likewise.
2647 (relocate_instruction): Likewise.
2648 (monitor_output): Likewise.
2649 * server.c (handle_search_memory): Likewise.
2650 (handle_qxfer_exec_file): Likewise.
2651 (handle_qxfer_libraries): Likewise.
2652 (handle_qxfer): Likewise.
2653 (handle_query): Likewise.
2654 (handle_v_cont): Likewise.
2655 (handle_v_run): Likewise.
2656 (captured_main): Likewise.
2657 * target.c (write_inferior_memory): Likewise.
2658 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2659 * tracepoint.c (init_trace_buffer): Likewise.
2660 (add_tracepoint_action): Likewise.
2661 (add_traceframe): Likewise.
2662 (add_traceframe_block): Likewise.
2663 (cmd_qtdpsrc): Likewise.
2664 (cmd_qtdv): Likewise.
2665 (cmd_qtstatus): Likewise.
2666 (response_source): Likewise.
2667 (response_tsv): Likewise.
2668 (cmd_qtnotes): Likewise.
2669 (gdb_collect): Likewise.
2670 (initialize_tracepoint): Likewise.
2671
afbe19f8
PL
26722015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2673
2674 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2675 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2676 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2677 <NOP>: New.
2678 (enum aarch64_condition_codes): New enum.
2679 (w0): New static global.
2680 (fp): Likewise.
2681 (lr): Likewise.
2682 (struct aarch64_memory_operand) <type>: New
2683 MEMORY_OPERAND_POSTINDEX type.
2684 (postindex_memory_operand): New helper function.
2685 (emit_ret): New function.
2686 (emit_load_store_pair): New function, factored out of emit_stp
2687 with support for MEMORY_OPERAND_POSTINDEX.
2688 (emit_stp): Rewrite using emit_load_store_pair.
2689 (emit_ldp): New function.
2690 (emit_load_store): Likewise.
2691 (emit_ldr): Mention post-index instruction in comment.
2692 (emit_ldrh): New function.
2693 (emit_ldrb): New function.
2694 (emit_ldrsw): Mention post-index instruction in comment.
2695 (emit_str): Likewise.
2696 (emit_subs): New function.
2697 (emit_cmp): Likewise.
2698 (emit_and): Likewise.
2699 (emit_orr): Likewise.
2700 (emit_orn): Likewise.
2701 (emit_eor): Likewise.
2702 (emit_mvn): Likewise.
2703 (emit_lslv): Likewise.
2704 (emit_lsrv): Likewise.
2705 (emit_asrv): Likewise.
2706 (emit_mul): Likewise.
2707 (emit_sbfm): Likewise.
2708 (emit_sbfx): Likewise.
2709 (emit_ubfm): Likewise.
2710 (emit_ubfx): Likewise.
2711 (emit_csinc): Likewise.
2712 (emit_cset): Likewise.
2713 (emit_nop): Likewise.
2714 (emit_ops_insns): New helper function.
2715 (emit_pop): Likewise.
2716 (emit_push): Likewise.
2717 (aarch64_emit_prologue): New function.
2718 (aarch64_emit_epilogue): Likewise.
2719 (aarch64_emit_add): Likewise.
2720 (aarch64_emit_sub): Likewise.
2721 (aarch64_emit_mul): Likewise.
2722 (aarch64_emit_lsh): Likewise.
2723 (aarch64_emit_rsh_signed): Likewise.
2724 (aarch64_emit_rsh_unsigned): Likewise.
2725 (aarch64_emit_ext): Likewise.
2726 (aarch64_emit_log_not): Likewise.
2727 (aarch64_emit_bit_and): Likewise.
2728 (aarch64_emit_bit_or): Likewise.
2729 (aarch64_emit_bit_xor): Likewise.
2730 (aarch64_emit_bit_not): Likewise.
2731 (aarch64_emit_equal): Likewise.
2732 (aarch64_emit_less_signed): Likewise.
2733 (aarch64_emit_less_unsigned): Likewise.
2734 (aarch64_emit_ref): Likewise.
2735 (aarch64_emit_if_goto): Likewise.
2736 (aarch64_emit_goto): Likewise.
2737 (aarch64_write_goto_address): Likewise.
2738 (aarch64_emit_const): Likewise.
2739 (aarch64_emit_call): Likewise.
2740 (aarch64_emit_reg): Likewise.
2741 (aarch64_emit_pop): Likewise.
2742 (aarch64_emit_stack_flush): Likewise.
2743 (aarch64_emit_zero_ext): Likewise.
2744 (aarch64_emit_swap): Likewise.
2745 (aarch64_emit_stack_adjust): Likewise.
2746 (aarch64_emit_int_call_1): Likewise.
2747 (aarch64_emit_void_call_2): Likewise.
2748 (aarch64_emit_eq_goto): Likewise.
2749 (aarch64_emit_ne_goto): Likewise.
2750 (aarch64_emit_lt_goto): Likewise.
2751 (aarch64_emit_le_goto): Likewise.
2752 (aarch64_emit_gt_goto): Likewise.
2753 (aarch64_emit_ge_got): Likewise.
2754 (aarch64_emit_ops_impl): New static global variable.
2755 (aarch64_emit_ops): New target function, return
2756 &aarch64_emit_ops_impl.
2757 (struct linux_target_ops): Install it.
2758
bb903df0
PL
27592015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2760
2761 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2762 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2763 aarch64-ipa.o.
2764 * linux-aarch64-ipa.c: New file.
2765 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2766 and endian.h.
2767 (aarch64_get_thread_area): New target method.
2768 (extract_signed_bitfield): New helper function.
2769 (aarch64_decode_ldr_literal): New function.
2770 (enum aarch64_opcodes): New enum.
2771 (struct aarch64_register): New struct.
2772 (struct aarch64_operand): New struct.
2773 (x0): New static global.
2774 (x1): Likewise.
2775 (x2): Likewise.
2776 (x3): Likewise.
2777 (x4): Likewise.
2778 (w2): Likewise.
2779 (ip0): Likewise.
2780 (sp): Likewise.
2781 (xzr): Likewise.
2782 (aarch64_register): New helper function.
2783 (register_operand): Likewise.
2784 (immediate_operand): Likewise.
2785 (struct aarch64_memory_operand): New struct.
2786 (offset_memory_operand): New helper function.
2787 (preindex_memory_operand): Likewise.
2788 (enum aarch64_system_control_registers): New enum.
2789 (ENCODE): New macro.
2790 (emit_insn): New helper function.
2791 (emit_b): New function.
2792 (emit_bcond): Likewise.
2793 (emit_cb): Likewise.
2794 (emit_tb): Likewise.
2795 (emit_blr): Likewise.
2796 (emit_stp): Likewise.
2797 (emit_ldp_q_offset): Likewise.
2798 (emit_stp_q_offset): Likewise.
2799 (emit_load_store): Likewise.
2800 (emit_ldr): Likewise.
2801 (emit_ldrsw): Likewise.
2802 (emit_str): Likewise.
2803 (emit_ldaxr): Likewise.
2804 (emit_stxr): Likewise.
2805 (emit_stlr): Likewise.
2806 (emit_data_processing_reg): Likewise.
2807 (emit_data_processing): Likewise.
2808 (emit_add): Likewise.
2809 (emit_sub): Likewise.
2810 (emit_mov): Likewise.
2811 (emit_movk): Likewise.
2812 (emit_mov_addr): Likewise.
2813 (emit_mrs): Likewise.
2814 (emit_msr): Likewise.
2815 (emit_sevl): Likewise.
2816 (emit_wfe): Likewise.
2817 (append_insns): Likewise.
2818 (can_encode_int32_in): New helper function.
2819 (aarch64_relocate_instruction): New function.
2820 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2821 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2822 (struct linux_target_ops): Install aarch64_get_thread_area,
2823 aarch64_install_fast_tracepoint_jump_pad and
2824 aarch64_get_min_fast_tracepoint_insn_len.
2825
787749ea
PL
28262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2827
2828 * Makefile.in (aarch64-insn.o): New rule.
2829 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2830
9812b2e6
YQ
28312015-09-21 Yao Qi <yao.qi@linaro.org>
2832
2833 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2834
18fe412b
YQ
28352015-09-21 Yao Qi <yao.qi@linaro.org>
2836
2837 * tracepoint.c (max_jump_pad_size): Remove.
2838
a0cc84cd
YQ
28392015-09-18 Yao Qi <yao.qi@linaro.org>
2840
2841 * linux-aarch64-low.c: Don't include sys/uio.h.
2842 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2843
d78908cf
WW
28442015-09-16 Wei-cheng Wang <cole945@gmail.com>
2845
2846 * tracepoint.c (eval_result_type): Change prototype.
2847 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2848
d57e0d50
PA
28492015-09-15 Pedro Alves <palves@redhat.com>
2850
2851 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2852 Check whether to report exec events instead of checking whether
2853 multiprocess is enabled.
2854
5a676acc
PA
28552015-09-15 Pedro Alves <palves@redhat.com>
2856
2857 PR remote/18965
2858 * remote-utils.c (prepare_resume_reply): Merge
2859 TARGET_WAITKIND_VFORK_DONE switch case with the
2860 TARGET_WAITKIND_FORKED case.
2861
7c5d0fad
YQ
28622015-09-15 Yao Qi <yao.qi@linaro.org>
2863
2864 * server.c (handle_query): Check string comparison using
2865 "else if" instead of "if".
2866
750ce8d1
YQ
28672015-09-15 Yao Qi <yao.qi@linaro.org>
2868
2869 * server.c (vCont_supported): New global variable.
2870 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2871 matches. Append ";vContSupported+" to own_buf.
2872 (handle_v_requests): Append ";s;S" to own_buf if target supports
2873 hardware single step or vCont_supported is false.
2874 (capture_main): Set vCont_supported to zero.
2875
70b90b91
YQ
28762015-09-15 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2879 it to ...
2880 (linux_supports_hardware_single_step): ... New function.
2881 (linux_target_ops): Update.
2882 * lynx-low.c (lynx_target_ops): Set field
2883 supports_hardware_single_step to target_can_do_hardware_single_step.
2884 * nto-low.c (nto_target_ops): Likewise.
2885 * spu-low.c (spu_target_ops): Likewise.
2886 * win32-low.c (win32_target_ops): Likewise.
2887 * target.c (target_can_do_hardware_single_step): New function.
2888 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2889 Remove. <supports_hardware_single_step>: New field.
2890 (target_supports_conditional_breakpoints): Remove.
2891 (target_supports_hardware_single_step): New macro.
2892 (target_can_do_hardware_single_step): Declare.
2893 * server.c (handle_query): Use target_supports_hardware_single_step
2894 instead of target_supports_conditional_breakpoints.
2895
ade90bde
YQ
28962015-09-15 Yao Qi <yao.qi@linaro.org>
2897
2898 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2899 function.
2900 (struct linux_target_ops the_low_target): Install
2901 aarch64_linux_siginfo_fixup.
2902
94585166
DB
29032015-09-11 Don Breazeal <donb@codesourcery.com>
2904 Luis Machado <lgustavo@codesourcery.com>
2905
2906 * linux-low.c (linux_mourn): Static declaration.
2907 (linux_arch_setup): Move in front of
2908 handle_extended_wait.
2909 (linux_arch_setup_thread): New function.
2910 (handle_extended_wait): Handle exec events. Call
2911 linux_arch_setup_thread. Make event_lwp argument a
2912 pointer-to-a-pointer.
2913 (check_zombie_leaders): Do not check stopped threads.
2914 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2915 (linux_low_filter_event): Add lwp and thread for exec'ing
2916 non-leader thread if leader thread has been deleted.
2917 Refactor code into linux_arch_setup_thread and call it.
2918 Pass child lwp pointer by reference to handle_extended_wait.
2919 (linux_wait_for_event_filtered): Update comment.
2920 (linux_wait_1): Prevent clobbering exec event status.
2921 (linux_supports_exec_events): New function.
2922 (linux_target_ops) <supports_exec_events>: Initialize new member.
2923 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2924 new member.
2925 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2926 * server.c (report_exec_events): New global variable.
2927 (handle_query): Handle qSupported query for exec-events feature.
2928 (captured_main): Initialize report_exec_events.
2929 * server.h (report_exec_events): Declare new global variable.
2930 * target.h (struct target_ops) <supports_exec_events>: New
2931 member.
2932 (target_supports_exec_events): New macro.
2933 * win32-low.c (win32_target_ops) <supports_exec_events>:
2934 Initialize new member.
2935
0568462b
MM
29362015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2937
2938 * linux-low.c (linux_low_enable_btrace): Remove.
2939 (linux_target_ops): Replace linux_low_enable_btrace with
2940 linux_enable_btrace.
2941
39edd165
YQ
29422015-09-03 Yao Qi <yao.qi@linaro.org>
2943
2944 * linux-aarch64-low.c (aarch64_insert_point): Call
2945 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2946 returns true.
2947
1db33b5a
UW
29482015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2949
2950 * linux-low.c (check_stopped_by_breakpoint): Use
2951 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2952
ab290430
PA
29532015-08-27 Pedro Alves <palves@redhat.com>
2954
2955 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2956
8d749320
SM
29572015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2958
6711b7f8
SM
2959 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2960 the XNEW-family equivalent.
8d749320
SM
2961 (compile_bytecodes): Likewise.
2962 * dll.c (loaded_dll): Likewise.
2963 * event-loop.c (append_callback_event): Likewise.
2964 (create_file_handler): Likewise.
2965 (create_file_event): Likewise.
2966 * hostio.c (handle_open): Likewise.
2967 * inferiors.c (add_thread): Likewise.
2968 (add_process): Likewise.
2969 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2970 * linux-arm-low.c (arm_new_process): Likewise.
2971 (arm_new_thread): Likewise.
2972 * linux-low.c (add_to_pid_list): Likewise.
2973 (linux_add_process): Likewise.
2974 (handle_extended_wait): Likewise.
2975 (add_lwp): Likewise.
2976 (enqueue_one_deferred_signal): Likewise.
2977 (enqueue_pending_signal): Likewise.
2978 (linux_resume_one_lwp_throw): Likewise.
2979 (linux_resume_one_thread): Likewise.
2980 (linux_read_memory): Likewise.
2981 (linux_write_memory): Likewise.
2982 * linux-mips-low.c (mips_linux_new_process): Likewise.
2983 (mips_linux_new_thread): Likewise.
2984 (mips_add_watchpoint): Likewise.
2985 * linux-x86-low.c (initialize_low_arch): Likewise.
2986 * lynx-low.c (lynx_add_process): Likewise.
2987 * mem-break.c (set_raw_breakpoint_at): Likewise.
2988 (set_breakpoint): Likewise.
2989 (add_condition_to_breakpoint): Likewise.
2990 (add_commands_to_breakpoint): Likewise.
2991 (clone_agent_expr): Likewise.
2992 (clone_one_breakpoint): Likewise.
2993 * regcache.c (new_register_cache): Likewise.
2994 * remote-utils.c (look_up_one_symbol): Likewise.
2995 * server.c (queue_stop_reply): Likewise.
2996 (start_inferior): Likewise.
2997 (queue_stop_reply_callback): Likewise.
2998 (handle_target_event): Likewise.
2999 * spu-low.c (fetch_ppc_memory): Likewise.
3000 (store_ppc_memory): Likewise.
3001 * target.c (set_target_ops): Likewise.
3002 * thread-db.c (thread_db_load_search): Likewise.
3003 (try_thread_db_load_1): Likewise.
3004 * tracepoint.c (add_tracepoint): Likewise.
3005 (add_tracepoint_action): Likewise.
3006 (create_trace_state_variable): Likewise.
3007 (cmd_qtdpsrc): Likewise.
3008 (cmd_qtro): Likewise.
3009 (add_while_stepping_state): Likewise.
3010 * win32-low.c (child_add_thread): Likewise.
3011 (get_image_name): Likewise.
3012
ed8b7b42
YQ
30132015-08-25 Yao Qi <yao.qi@linaro.org>
3014
3015 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3016
db3cb7cb
YQ
30172015-08-25 Yao Qi <yao.qi@linaro.org>
3018
3019 * Makefile.in (aarch64-linux.o): New rule.
3020 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3021 srv_tgtobj.
3022 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3023 (aarch64_init_debug_reg_state): Make it extern.
3024 (aarch64_linux_prepare_to_resume): Remove.
3025
f6011a1c
YQ
30262015-08-25 Yao Qi <yao.qi@linaro.org>
3027
3028 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3029 lwp_arch_private_info and ptid_of_lwp.
3030
88e2cf7e
YQ
30312015-08-25 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3034 Find proc_info by find_process_pid. All callers updated.
3035
5e35436e
YQ
30362015-08-25 Yao Qi <yao.qi@linaro.org>
3037
3038 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3039 Remove.
3040 (debug_reg_change_callback): Remove.
3041 (aarch64_notify_debug_reg_change): Remove.
3042
4a8a7965
YQ
30432015-08-25 Yao Qi <yao.qi@linaro.org>
3044
3045 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3046 Call current_lwp_ptid.
3047
32a271ee
YQ
30482015-08-25 Yao Qi <yao.qi@linaro.org>
3049
3050 * linux-aarch64-low.c (debug_reg_change_callback): Use
3051 debug_printf.
3052
0d51c8d7
YQ
30532015-08-25 Yao Qi <yao.qi@linaro.org>
3054
3055 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3056
31a43dd5
YQ
30572015-08-25 Yao Qi <yao.qi@linaro.org>
3058
3059 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3060
8ee52567
YQ
30612015-08-25 Yao Qi <yao.qi@linaro.org>
3062
3063 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3064 the code.
3065
ff3f0f45
YQ
30662015-08-25 Yao Qi <yao.qi@linaro.org>
3067
3068 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3069 Remove.
3070 (debug_reg_change_callback): Remove argument entry and add argument
3071 lwp. Remove local variable thread. Don't print thread id in the
3072 debugging output. Don't check whether pid of thread equals to pid.
3073 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3074 iterate_over_lwps instead find_inferior.
3075
3d40fbb5
PA
30762015-08-24 Pedro Alves <palves@redhat.com>
3077
3078 * inferiors.c (get_first_process): New function.
3079 * inferiors.h (get_first_process): New declaration.
3080 * remote-utils.c (read_ptid): Default to the first process in the
3081 list, instead of to the current thread's process.
3082
438e1e42
PA
30832015-08-24 Pedro Alves <palves@redhat.com>
3084
3085 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3086 * event-loop.c: Likewise.
3087 * remote-utils.c: Likewise.
3088 * tracepoint.c: Likewise.
3089
a8c6d4fc
PA
30902015-08-24 Pedro Alves <palves@redhat.com>
3091
3092 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3093 ptid_get_lwp.
3094
99b0bb12
PA
30952015-08-21 Pedro Alves <palves@redhat.com>
3096
3097 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3098 instead of literal 1.
3099
f8904751
PA
31002015-08-21 Pedro Alves <palves@redhat.com>
3101
3102 * tdesc.c (default_description): Explicitly zero-initialize.
3103
465a859e
PA
31042015-08-21 Pedro Alves <palves@redhat.com>
3105
3106 PR gdb/18749
3107 * inferiors.c (remove_thread): Discard any pending stop reply for
3108 this thread.
3109 * server.c (remove_all_on_match_pid): Rename to ...
3110 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3111 instead of a pid.
3112 (discard_queued_stop_replies): Change parameter to a ptid. Now
3113 extern.
3114 (handle_v_kill, kill_inferior_callback, captured_main)
3115 (process_serial_event): Adjust.
3116 * server.h (discard_queued_stop_replies): Declare.
3117
f0db101d
PA
31182015-08-21 Pedro Alves <palves@redhat.com>
3119
3120 * linux-low.c (wait_for_sigstop): Always switch to no thread
3121 selected if the previously current thread dies.
3122 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3123 process instead of the current thread's.
3124 * remote-utils.c (input_interrupt): Don't check if there's no
3125 current thread.
3126 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3127 current thread to the general thread fails, error out.
3128 (handle_qxfer_auxv, handle_qxfer_libraries)
3129 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3130 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3131 (handle_query): Check if there's a thread selected instead of
3132 checking whether there's any thread in the thread list.
3133 (handle_qxfer_threads, handle_qxfer_btrace)
3134 (handle_qxfer_btrace_conf): Don't error out early if there's no
3135 thread in the thread list.
3136 (handle_v_cont, myresume): Don't set the current thread to the
3137 continue thread.
3138 (process_serial_event) <Hg handling>: Also set thread_id if the
3139 previous general thread is still alive.
3140 (process_serial_event) <g/G handling>: If setting the current
3141 thread to the general thread fails, error out.
3142 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3143 thread's lwp instead of the current thread's.
3144 * target.c (set_desired_thread): If the desired thread was not
3145 found, leave the current thread pointing to NULL. Return an int
3146 (boolean) indicating success.
3147 * target.h (set_desired_thread): Change return type to int.
3148
40045d91
MF
31492015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3150
3151 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3152 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3153 #includes.
3154 (ps_get_thread_area): New function.
3155
45face3b
GB
31562015-08-19 Gary Benson <gbenson@redhat.com>
3157
3158 * hostio.c (handle_pread): Do not attempt to read more data
3159 than hostio_reply_with_data can fit in a packet.
3160
16d5f642
JB
31612015-08-18 Joel Brobecker <brobecker@adacore.com>
3162
3163 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3164
a738da3a
MF
31652015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3166
3167 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3168
33ebda9d
PA
31692015-08-06 Pedro Alves <palves@redhat.com>
3170
3171 * tracepoint.c (expr_eval_result): Now an int.
3172
a44892be
PA
31732015-08-06 Pedro Alves <palves@redhat.com>
3174
3175 * gdbthread.h (struct regcache): Forward declare.
3176 (struct thread_info) <regcache_data>: Now a struct regcache
3177 pointer.
3178 * inferiors.c (inferior_regcache_data)
3179 (set_inferior_regcache_data): Now work with struct regcache
3180 pointers.
3181 * inferiors.h (struct regcache): Forward declare.
3182 (inferior_regcache_data, set_inferior_regcache_data): Now work
3183 with struct regcache pointers.
3184 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3185 (free_register_cache_thread): Remove struct regcache pointer
3186 casts.
3187
608a1e46
PA
31882015-08-06 Pedro Alves <palves@redhat.com>
3189
3190 * server.c (captured_main): On error, print the exception message
3191 to stderr, and if run_once is set, throw a quit.
3192
f0ce0d3a
PA
31932015-08-06 Pedro Alves <palves@redhat.com>
3194
3195 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3196 the current thread.
3197
bf47e248
PA
31982015-08-06 Pedro Alves <palves@redhat.com>
3199
3200 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3201 reading beyond the passed in buffer length.
3202
b6b9ffcc
PL
32032015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3204
3205 * tracepoint.c (symbol_list) <required>: Remove.
3206
863d01bd
PA
32072015-08-06 Pedro Alves <palves@redhat.com>
3208
3209 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3210 count if stopping and suspending threads.
3211 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3212 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3213 (linux_detach): Complete an ongoing step-over.
3214 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3215 throughout.
3216 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3217 (linux_wait_1): If passing a signal to the inferior after
3218 finishing a step-over, unsuspend and re-resume all lwps. If we
3219 see a single-step event but the thread should be continuing, don't
3220 pass the trap to gdb.
3221 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3222 internal_error instead of gdb_assert.
3223 (enqueue_pending_signal): New function.
3224 (check_ptrace_stopped_lwp_gone): Add debug output.
3225 (start_step_over): Use internal_error instead of gdb_assert.
3226 (complete_ongoing_step_over): New function.
3227 (linux_resume_one_thread): Don't resume a suspended thread.
3228 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3229 it stepping.
3230
00db26fa
PA
32312015-08-06 Pedro Alves <palves@redhat.com>
3232
3233 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3234 (linux_thread_alive): Use lwp_is_marked_dead.
3235 (extended_event_reported): Delete.
3236 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3237 instead of extended_event_reported.
3238 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3239 as well.
3240 (lwp_is_marked_dead): New function.
3241 (lwp_running): Use lwp_is_marked_dead.
3242 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3243 comment.
3244
ad071a30
PA
32452015-08-06 Pedro Alves <palves@redhat.com>
3246
3247 * linux-low.c (linux_wait_1): Move fork event output out of the
3248 !report_to_gdb check. Pass event_child->waitstatus to
3249 target_waitstatus_to_string instead of ourstatus.
3250
524b57e6
YQ
32512015-08-04 Yao Qi <yao.qi@linaro.org>
3252
3253 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3254 if current_thread is 32 bit.
3255
6085d6f6
YQ
32562015-08-04 Yao Qi <yao.qi@linaro.org>
3257
3258 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3259 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3260 * server.c (extended_protocol): Remove "static".
3261 * server.h (extended_protocol): Declare it.
3262
8a7e4587
YQ
32632015-08-04 Yao Qi <yao.qi@linaro.org>
3264
3265 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3266 both aarch64 and aarch32.
3267 (aarch64_set_pc): Likewise.
3268
3b53ae99
YQ
32692015-08-04 Yao Qi <yao.qi@linaro.org>
3270
3271 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3272 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3273 arm-with-neon.xml to srv_xmlfiles.
3274 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3275 (is_64bit_tdesc): New function.
3276 (aarch64_linux_read_description): New function.
3277 (aarch64_arch_setup): Call aarch64_linux_read_description.
3278 (regs_info): Rename to regs_info_aarch64.
3279 (aarch64_regs_info): Return right regs_info.
3280 (initialize_low_arch): Call initialize_low_arch_aarch32.
3281
bd9e6534
YQ
32822015-08-04 Yao Qi <yao.qi@linaro.org>
3283
3284 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3285 * linux-aarch32-low.c: New file.
3286 * linux-aarch32-low.h: New file.
3287 * linux-arm-low.c (arm_fill_gregset): Move it to
3288 linux-aarch32-low.c.
3289 (arm_store_gregset): Likewise.
3290 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3291 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3292 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3293 (regs_info): Rename to regs_info_arm.
3294 (arm_regs_info): Return regs_info_aarch32 if
3295 have_ptrace_getregset is 1 and target description is
3296 arm_with_neon or arm_with_vfpv3.
3297 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3298 Call initialize_low_arch_aarch32 instead.
3299
ded48a5e
YQ
33002015-08-04 Yao Qi <yao.qi@linaro.org>
3301
3302 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3303 * linux-low.c: ... here.
3304 * linux-low.h (have_ptrace_getregset): Declare it.
3305
96e9210f
PA
33062015-08-04 Pedro Alves <palves@redhat.com>
3307
3308 * thread-db.c (struct thread_db): Use new typedefs.
3309 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3310 CHK calls.
3311 (disable_thread_event_reporting): Cast result of dlsym to
3312 destination function pointer type.
3313 (thread_db_mourn): Use td_ta_delete_ftype.
3314
af60a1ef
SL
33152015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3316
3317 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3318 arch variant.
3319 (CDX_BREAKPOINT): Define for R2.
3320 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3321 (the_low_target): Add comments.
3322
e8b41681
YQ
33232015-07-30 Yao Qi <yao.qi@linaro.org>
3324
3325 * linux-arm-low.c (arm_hwcap): Remove it.
3326 (arm_read_description): New local variable arm_hwcap. Don't
3327 set arm_hwcap to zero.
3328
89abb039
YQ
33292015-07-30 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3332 Use regcache->tdesc instead.
3333 (arm_store_wmmxregset): Likewise.
3334 (arm_fill_vfpregset): Likewise.
3335 (arm_store_vfpregset): Likewise.
3336
deca266c
YQ
33372015-07-30 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-arm-low.c: Include arch/arm.h.
3340 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3341 (arm_store_gregset): Likewise.
3342
aa58a496
SM
33432015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3344
3345 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3346 ptrace's 4th parameter.
3347
50904b25
YQ
33482015-07-27 Yao Qi <yao.qi@linaro.org>
3349
3350 * configure.srv (case aarch64*-*-linux*): Don't set
3351 srv_linux_usrregs.
3352
5826e159
PA
33532015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3354
3355 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3356 sys/ptrace.h.
3357 * linux-arm-low.c: Likewise.
3358 * linux-cris-low.c: Likewise.
3359 * linux-crisv32-low.c: Likewise.
3360 * linux-low.c: Likewise.
3361 * linux-m68k-low.c: Likewise.
3362 * linux-mips-low.c: Likewise.
3363 * linux-nios2-low.c: Likewise.
3364 * linux-s390-low.c: Likewise.
3365 * linux-sparc-low.c: Likewise.
3366 * linux-tic6x-low.c: Likewise.
3367 * linux-tile-low.c: Likewise.
3368 * linux-x86-low.c: Likewise.
3369
54019719
PA
33702015-07-24 Pedro Alves <palves@redhat.com>
3371
3372 * config.in: Regenerate.
3373 * configure: Regenerate.
3374
eb7aa561
PA
33752015-07-24 Pedro Alves <palves@redhat.com>
3376
3377 * acinclude.m4: Include ../ptrace.m4.
3378 * configure.ac: Call GDB_AC_PTRACE.
3379 * config.in, configure: Regenerate.
3380
55d7b841
YQ
33812015-07-24 Yao Qi <yao.qi@linaro.org>
3382
3383 * linux-low.c (linux_create_inferior): Remove setting to
3384 proc->priv->new_inferior.
3385 (linux_attach): Likewise.
3386 (linux_low_filter_event): Likewise.
3387 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3388
c06cbd92
YQ
33892015-07-24 Yao Qi <yao.qi@linaro.org>
3390
3391 * linux-low.c (linux_arch_setup): New function.
3392 (linux_low_filter_event): If proc->tdesc is NULL and
3393 proc->attached is true, call the_low_target.arch_setup.
3394 Otherwise, keep status pending, and return.
3395 (linux_resume_one_lwp_throw): Don't call get_pc if
3396 thread->while_stepping isn't NULL. Don't call
3397 get_thread_regcache if proc->tdesc is NULL.
3398 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3399 (linux_target_ops): Install arch_setup.
3400 * server.c (start_inferior): Call the_target->arch_setup.
3401 * target.h (struct target_ops) <arch_setup>: New field.
3402 (target_arch_setup): New marco.
3403 * lynx-low.c (lynx_target_ops): Update.
3404 * nto-low.c (nto_target_ops): Update.
3405 * spu-low.c (spu_target_ops): Update.
3406 * win32-low.c (win32_target_ops): Update.
3407
5ae3ebba
YQ
34082015-07-24 Yao Qi <yao.qi@linaro.org>
3409
3410 * linux-low.c (linux_add_process): Don't set
3411 proc->priv->new_inferior.
3412 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3413 (linux_attach): Likewise.
3414
eb97750b
YQ
34152015-07-24 Yao Qi <yao.qi@linaro.org>
3416
3417 * server.c (start_inferior): Code refactor.
3418
51aee833
YQ
34192015-07-24 Yao Qi <yao.qi@linaro.org>
3420
3421 * server.c (process_serial_event): Set general_thread.
3422
af1b22f3
YQ
34232015-07-21 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3426 aarch64_linux_get_debug_reg_capacity.
3427
554717a3
YQ
34282015-07-17 Yao Qi <yao.qi@linaro.org>
3429
3430 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3431 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3432 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3433 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3434 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3435 (AARCH64_HWP_ALIGNMENT): Likewise.
3436 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3437 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3438 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3439 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3440 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3441 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3442 (struct aarch64_debug_reg_state): Likewise.
3443 (struct arch_lwp_info): Likewise.
3444 (aarch64_align_watchpoint): Likewise.
3445 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3446 (aarch64_watchpoint_length): Likewise.
3447 (aarch64_point_encode_ctrl_reg): Likewise
3448 (aarch64_point_is_aligned): Likewise.
3449 (aarch64_align_watchpoint): Likewise.
3450 (aarch64_linux_set_debug_regs):
3451 (aarch64_dr_state_insert_one_point): Likewise.
3452 (aarch64_dr_state_remove_one_point): Likewise.
3453 (aarch64_handle_breakpoint): Likewise.
3454 (aarch64_handle_aligned_watchpoint): Likewise.
3455 (aarch64_handle_unaligned_watchpoint): Likewise.
3456 (aarch64_handle_watchpoint): Likewise.
3457
c67ca4de
YQ
34582015-07-17 Yao Qi <yao.qi@linaro.org>
3459
3460 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3461 and don't aarch64_get_debug_reg_state. All callers update.
3462 (aarch64_handle_aligned_watchpoint): Likewise.
3463 (aarch64_handle_unaligned_watchpoint): Likewise.
3464 (aarch64_handle_watchpoint): Likewise.
3465 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3466 (aarch64_remove_point): Likewise.
3467
25abf979
YQ
34682015-07-17 Yao Qi <yao.qi@linaro.org>
3469
3470 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3471 debug_printf.
3472 (aarch64_handle_unaligned_watchpoint): Likewise.
3473
db1ff28b
JK
34742015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3475
3476 Revert the previous 3 commits:
3477 Move gdb_regex* to common/
3478 Move linux_find_memory_regions_full & co.
3479 gdbserver build-id attribute generator
3480
700ca40f
JK
34812015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3482 Jan Kratochvil <jan.kratochvil@redhat.com>
3483
3484 gdbserver build-id attribute generator.
3485 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3486 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3487 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3488 (find_phdr): New.
3489 (get_dynamic): Use find_pdhr to traverse program headers.
3490 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3491 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3492 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3493 (get_hex_build_id): New.
3494 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3495 to reply XML document.
3496
9904185c
JK
34972015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3498 Jan Kratochvil <jan.kratochvil@redhat.com>
3499
3500 * target.c: Include target/target-utils.h and fcntl.h.
3501 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3502 (target_fileio_read_stralloc): New functions.
3503
6e5b4429
JK
35042015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3505
3506 * Makefile.in (OBS): Add gdb_regex.o.
3507 (gdb_regex.o): New.
3508 * config.in: Rebuilt.
3509 * configure: Rebuilt.
3510
ddc98fbf
JK
35112015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3512 Jan Kratochvil <jan.kratochvil@redhat.com>
3513
3514 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3515 * Makefile.in (OBS): Add target-utils.o.
3516 (linux-maps.o, target-utils.o): New.
3517 * configure.srv (srv_linux_obj): Add linux-maps.o.
3518
e57bb7a0
PL
35192015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3520
3521 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3522 function, return 1.
3523 (the_low_target): Install it.
3524
586b02a9
PA
35252015-07-14 Pedro Alves <palves@redhat.com>
3526
3527 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3528 Instead, ignore ECHILD, and throw an error for other errnos.
3529
58c1b36c
PA
35302015-07-10 Pedro Alves <palves@redhat.com>
3531
3532 * event-loop.c (struct callback_event) <data>: Change type to
3533 gdb_client_data instance instead of gdb_client_data pointer.
3534 (append_callback_event): Adjust.
3535
421530db
PL
35362015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3537
3538 * linux-aarch64-low.c: Add comments for each linux_target_ops
3539 method. Remove comments already covered in target_ops and
3540 linux_target_ops definitions.
3541 (the_low_target): Add comments for each unimplemented method.
3542
c2d65f38
YQ
35432015-07-09 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-aarch64-low.c (aarch64_regmap): Remove.
3546 (aarch64_usrregs_info): Remove.
3547 (regs_info): Set field usrregs to NULL.
3548
b20a6524
MM
35492015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3550
3551 * linux-low.c: Include "rsp-low.h"
3552 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3553 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3554 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3555 (handle_btrace_enable_pt): New.
3556 (handle_btrace_general_set): Support "pt".
3557 (handle_btrace_conf_general_set): Support "pt:size".
3558
96c97461
PL
35592015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3560
3561 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3562 Z_PACKET_SW_BP.
3563
37d66942
PL
35642015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3565
3566 * linux-aarch64-low.c: Remove comment about endianness.
3567 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3568 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3569 memcmp.
3570
dc06243f
GB
35712015-06-24 Gary Benson <gbenson@redhat.com>
3572
3573 * linux-i386-ipa.c (stdint.h): Do not include.
3574 * lynx-i386-low.c (stdint.h): Likewise.
3575 * lynx-ppc-low.c (stdint.h): Likewise.
3576 * mem-break.c (stdint.h): Likewise.
3577 * thread-db.c (stdint.h): Likewise.
3578 * tracepoint.c (stdint.h): Likewise.
3579 * win32-low.c (stdint.h): Likewise.
3580
124e13d9
SM
35812015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3582
3583 * server.c (write_qxfer_response): Update call to
3584 remote_escape_output.
3585
909c2cda
JK
35862015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3587 Jan Kratochvil <jan.kratochvil@redhat.com>
3588
3589 Merge multiple hex conversions.
3590 * gdbreplay.c (tohex): Rename to 'fromhex'.
3591 (logchar): Use fromhex.
3592
24c05f46
JK
35932015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3594
3595 * server.c (handle_qxfer_libraries): Set `version' attribute for
3596 <library-list>.
3597
14d2069a
GB
35982015-06-10 Gary Benson <gbenson@redhat.com>
3599
3600 * target.h (struct target_ops) <multifs_open>: New field.
3601 <multifs_unlink>: Likewise.
3602 <multifs_readlink>: Likewise.
3603 * linux-low.c (nat/linux-namespaces.h): New include.
3604 (linux_target_ops): Initialize the_target->multifs_open,
3605 the_target->multifs_unlink and the_target->multifs_readlink.
3606 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3607 * hostio.c (hostio_fs_pid): New static variable.
3608 (hostio_handle_new_gdb_connection): New function.
3609 (handle_setfs): Likewise.
3610 (handle_open): Use the_target->multifs_open as appropriate.
3611 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3612 (handle_readlink): Use the_target->multifs_readlink as
3613 appropriate.
3614 (handle_vFile): Handle vFile:setfs packets.
3615 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3616 after target_handle_new_gdb_connection.
3617
4b8b5e72
GB
36182015-06-10 Gary Benson <gbenson@redhat.com>
3619
3620 * configure.ac (AC_CHECK_FUNCS): Add setns.
3621 * config.in: Regenerate.
3622 * configure: Likewise.
3623 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3624 (linux-namespaces.o): New rule.
3625 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3626
3ac2e371
GB
36272015-06-09 Gary Benson <gbenson@redhat.com>
3628
3629 * hostio.c (handle_open): Process mode argument with
3630 fileio_to_host_mode.
3631
ca9b78ce
YQ
36322015-06-01 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3635 * linux-x86-low.c: Likewise.
3636
bfacd19d
DB
36372015-05-28 Don Breazeal <donb@codesourcery.com>
3638
3639 * linux-low.c (handle_extended_wait): Initialize
3640 thread_info.last_resume_kind for new fork children.
3641
452003ef
PA
36422015-05-15 Pedro Alves <palves@redhat.com>
3643
3644 * target.h (target_handle_new_gdb_connection): Rewrite using if
3645 wrapped in do/while.
3646
1041a03c
JB
36472015-05-14 Joel Brobecker <brobecker@adacore.com>
3648
3649 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3650 * configure, config.in: Regenerate.
3651 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3652 Declare typedef.
3653
c269dbdb
DB
36542015-05-12 Don Breazeal <donb@codesourcery.com>
3655
3656 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3657 PTRACE_EVENT_VFORK_DONE.
3658 (linux_low_ptrace_options, extended_event_reported): Add vfork
3659 events.
3660 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3661 and "vforkdone" for RSP 'T' Stop Reply Packet.
3662 * server.h (report_vfork_events): Declare
3663 global variable.
3664
3a8a0396
DB
36652015-05-12 Don Breazeal <donb@codesourcery.com>
3666
3667 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3668 (the_low_target) <new_fork>: Initialize new member.
3669 * linux-arm-low.c (arm_new_fork): New function.
3670 (the_low_target) <new_fork>: Initialize new member.
3671 * linux-low.c (handle_extended_wait): Call new target function
3672 new_fork.
3673 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3674 * linux-mips-low.c (mips_add_watchpoint): New function
3675 extracted from mips_insert_point.
3676 (the_low_target) <new_fork>: Initialize new member.
3677 (mips_linux_new_fork): New function.
3678 (mips_insert_point): Call mips_add_watchpoint.
3679 * linux-x86-low.c (x86_linux_new_fork): New function.
3680 (the_low_target) <new_fork>: Initialize new member.
3681
de0d863e
DB
36822015-05-12 Don Breazeal <donb@codesourcery.com>
3683
3684 * linux-low.c (handle_extended_wait): Implement return value,
3685 rename argument 'event_child' to 'event_lwp', handle
3686 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3687 (linux_low_ptrace_options): New function.
3688 (linux_low_filter_event): Call linux_low_ptrace_options,
3689 use different argument fo linux_enable_event_reporting,
3690 use return value from handle_extended_wait.
3691 (extended_event_reported): New function.
3692 (linux_wait_1): Call extended_event_reported and set
3693 status to report fork events.
3694 (linux_write_memory): Add pid to debug message.
3695 (reset_lwp_ptrace_options_callback): New function.
3696 (linux_handle_new_gdb_connection): New function.
3697 (linux_target_ops): Initialize new structure member.
3698 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3699 * lynx-low.c: Initialize new structure member.
3700 * remote-utils.c (prepare_resume_reply): Implement stop reason
3701 "fork" for "T" stop message.
3702 * server.c (handle_query): Call handle_new_gdb_connection.
3703 * server.h (report_fork_events): Declare global flag.
3704 * target.h (struct target_ops) <handle_new_gdb_connection>:
3705 New member.
3706 (target_handle_new_gdb_connection): New macro.
3707 * win32-low.c: Initialize new structure member.
3708
ddcbc397
DB
37092015-05-12 Don Breazeal <donb@codesourcery.com>
3710
3711 * mem-break.c (APPEND_TO_LIST): Define macro.
3712 (clone_agent_expr): New function.
3713 (clone_one_breakpoint): New function.
3714 (clone_all_breakpoints): New function.
3715 * mem-break.h: Declare new functions.
3716
89245bc0
DB
37172015-05-12 Don Breazeal <donb@codesourcery.com>
3718
3719 * linux-low.c (linux_supports_fork_events): New function.
3720 (linux_supports_vfork_events): New function.
3721 (linux_target_ops): Initialize new structure members.
3722 (initialize_low): Call linux_check_ptrace_features.
3723 * lynx-low.c (lynx_target_ops): Initialize new structure
3724 members.
3725 * server.c (report_fork_events, report_vfork_events):
3726 New global flags.
3727 (handle_query): Add new features to qSupported packet and
3728 response.
3729 (captured_main): Initialize new global variables.
3730 * target.h (struct target_ops) <supports_fork_events>:
3731 New member.
3732 <supports_vfork_events>: New member.
3733 (target_supports_fork_events): New macro.
3734 (target_supports_vfork_events): New macro.
3735 * win32-low.c (win32_target_ops): Initialize new structure
3736 members.
3737
835205d0
GB
37382015-05-12 Gary Benson <gbenson@redhat.com>
3739
3740 * server.c (handle_qxfer_exec_file): Use current process
3741 if annex is empty.
3742
21e94bd9
SL
37432015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3744
3745 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3746 Remove HAVE_PTRACE_GETREGS conditionals.
3747 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3748 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3749
45614f15
YQ
37502015-05-08 Yao Qi <yao.qi@linaro.org>
3751
3752 * linux-low.c (linux_supports_conditional_breakpoints): New
3753 function.
3754 (linux_target_ops): Install new target method.
3755 * lynx-low.c (lynx_target_ops): Install NULL hook for
3756 supports_conditional_breakpoints.
3757 * nto-low.c (nto_target_ops): Likewise.
3758 * spu-low.c (spu_target_ops): Likewise.
3759 * win32-low.c (win32_target_ops): Likewise.
3760 * server.c (handle_query): Check
3761 target_supports_conditional_breakpoints.
3762 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3763 New field.
3764 (target_supports_conditional_breakpoints): New macro.
3765
80ad801e
PA
37662015-05-06 Pedro Alves <palves@redhat.com>
3767
3768 PR server/18081
3769 * server.c (start_inferior): If the process exits, mourn it.
3770
819843c7
GB
37712015-04-21 Gary Benson <gbenson@redhat.com>
3772
3773 * hostio.c (fileio_open_flags_to_host): Factored out to
3774 fileio_to_host_openflags in common/fileio.c. Single use
3775 updated.
3776
a2d5a9d7
MF
37772015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3778
3779 * linux-xtensa-low.c (xtensa_fill_gregset)
3780 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3781 XCHAL_HAVE_LOOP.
3782
deb44829
MF
37832015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3784
3785 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3786 (regs_info): Replace usrregs pointer with NULL.
3787
e57f1de3
GB
37882015-04-17 Gary Benson <gbenson@redhat.com>
3789
3790 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3791 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3792 * server.c (handle_qxfer_exec_file): New function.
3793 (qxfer_packets): Add exec-file entry.
3794 (handle_query): Report qXfer:exec-file:read as supported packet.
3795
62828379
RN
37962015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3797
3798 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3799
b88bb450
GB
38002015-04-09 Gary Benson <gbenson@redhat.com>
3801
3802 * hostio-errno.c (errno_to_fileio_error): Remove function.
3803 Update caller to use remote_fileio_to_fio_error.
3804
c8f4bfdd
YQ
38052015-04-09 Yao Qi <yao.qi@linaro.org>
3806
3807 * linux-low.c (linux_insert_point): Call
3808 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3809 (linux_remove_point): Call remove_memory_breakpoint if type is
3810 raw_bkpt_type_sw.
3811 * linux-x86-low.c (x86_insert_point): Don't call
3812 insert_memory_breakpoint.
3813 (x86_remove_point): Don't call remove_memory_breakpoint.
3814
41f98f02
PA
38152015-04-01 Pedro Alves <palves@redhat.com>
3816 Cleber Rosa <crosa@redhat.com>
3817
3818 * server.c (gdbserver_usage): Reorganize and extend the usage
3819 message.
3820
2bf6fb9d
PA
38212015-03-24 Pedro Alves <palves@redhat.com>
3822
3823 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3824 output. Also dump TRAP_TRACE.
3825 (linux_low_filter_event): In debug output, distinguish a
3826 resume_stop SIGSTOP from a delayed SIGSTOP.
3827
369f6daa
GB
38282015-03-24 Gary Benson <gbenson@redhat.com>
3829
3830 * linux-x86-low.c (x86_linux_new_thread): Moved to
3831 nat/x86-linux.c.
3832 (x86_linux_prepare_to_resume): Likewise.
3833
8e5d4070
GB
38342015-03-24 Gary Benson <gbenson@redhat.com>
3835
3836 * Makefile.in (x86-linux-dregs.o): New rule.
3837 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3838 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3839 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3840 (x86_linux_dr_get): Likewise.
3841 (x86_linux_dr_set): Likewise.
3842 (update_debug_registers_callback): Likewise.
3843 (x86_linux_dr_set_addr): Likewise.
3844 (x86_linux_dr_get_addr): Likewise.
3845 (x86_linux_dr_set_control): Likewise.
3846 (x86_linux_dr_get_control): Likewise.
3847 (x86_linux_dr_get_status): Likewise.
3848 (x86_linux_update_debug_registers): Likewise.
3849
2b95d440
GB
38502015-03-24 Gary Benson <gbenson@redhat.com>
3851
3852 * linux-x86-low.c (x86_linux_update_debug_registers):
3853 New function, factored out from...
3854 (x86_linux_prepare_to_resume): ...this.
3855
14b0bc68
GB
38562015-03-24 Gary Benson <gbenson@redhat.com>
3857
3858 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3859 (x86_linux_dr_set): Likewise.
3860 (update_debug_registers_callback): Likewise.
3861 (x86_linux_dr_set_addr): Likewise.
3862 (x86_linux_dr_get_addr): Likewise.
3863 (x86_linux_dr_set_control): Likewise.
3864 (x86_linux_dr_get_control): Likewise.
3865 (x86_linux_dr_get_status): Likewise.
3866 (x86_linux_prepare_to_resume): Likewise.
3867
5dfe6ca8
GB
38682015-03-24 Gary Benson <gbenson@redhat.com>
3869
3870 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3871 Use perror_with_name. Pass string through gettext.
3872 (x86_linux_dr_set): Likewise.
3873
d33472ad
GB
38742015-03-24 Gary Benson <gbenson@redhat.com>
3875
3876 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3877 (x86_linux_dr_set_addr): ...this.
3878 (x86_dr_low_get_addr): Rename to...
3879 (x86_linux_dr_get_addr): ...this.
3880 (x86_dr_low_set_control): Rename to...
3881 (x86_linux_dr_set_control): ...this.
3882 (x86_dr_low_get_control): Rename to...
3883 (x86_linux_dr_get_control): ...this.
3884 (x86_dr_low_get_status): Rename to...
3885 (x86_linux_dr_get_status): ...this.
3886 (x86_dr_low): Update with new function names.
3887
4b134ca1
GB
38882015-03-24 Gary Benson <gbenson@redhat.com>
3889
3890 * Makefile.in (x86-linux.o): New rule.
3891 * configure.srv: Add x86-linux.o to relevant targets.
3892 * linux-low.c (lwp_set_arch_private_info): New function.
3893 (lwp_arch_private_info): Likewise.
3894 * linux-x86-low.c: Include nat/x86-linux.h.
3895 (arch_lwp_info): Removed structure.
3896 (update_debug_registers_callback):
3897 Use lwp_set_debug_registers_changed.
3898 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3899 and lwp_set_debug_registers_changed.
3900 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3901
34c703da
GB
39022015-03-24 Gary Benson <gbenson@redhat.com>
3903
3904 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3905 * linux-arm-low.c (arm_new_thread): Likewise.
3906 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3907 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3908 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3909 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3910
cff068da
GB
39112015-03-24 Gary Benson <gbenson@redhat.com>
3912
3913 * linux-low.c (ptid_of_lwp): New function.
3914 (lwp_is_stopped): Likewise.
3915 (lwp_stop_reason): Likewise.
3916 * linux-x86-low.c (update_debug_registers_callback):
3917 Use lwp_is_stopped.
3918 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3919 lwp_stop_reason.
3920
b2f7c7e8
GB
39212015-03-24 Gary Benson <gbenson@redhat.com>
3922
3923 * linux-low.h (linux_stop_lwp): Remove declaration.
3924
6d4ee8c6
GB
39252015-03-24 Gary Benson <gbenson@redhat.com>
3926
3927 * linux-low.h: Include nat/linux-nat.h.
3928 * linux-low.c (iterate_over_lwps_args): New structure.
3929 (iterate_over_lwps_filter): New function.
3930 (iterate_over_lwps): Likewise.
3931 * linux-x86-low.c (update_debug_registers_callback):
3932 Update signature to what iterate_over_lwps expects.
3933 Remove PID check that iterate_over_lwps now performs.
3934 (x86_dr_low_set_addr): Use iterate_over_lwps.
3935 (x86_dr_low_set_control): Likewise.
3936
70a0bb6b
GB
39372015-03-24 Gary Benson <gbenson@redhat.com>
3938
3939 * linux-x86-low.c (x86_debug_reg_state): New function.
3940 (x86_linux_prepare_to_resume): Use the above.
3941
7b669087
GB
39422015-03-24 Gary Benson <gbenson@redhat.com>
3943
3944 * linux-low.c (current_lwp_ptid): New function.
3945 * linux-x86-low.c: Include nat/linux-nat.h.
3946 (x86_dr_low_get_addr): Use current_lwp_ptid.
3947 (x86_dr_low_get_control): Likewise.
3948 (x86_dr_low_get_status): Likewise.
3949
eef49a3d
PA
39502015-03-20 Pedro Alves <palves@redhat.com>
3951
3952 * tracepoint.c (cmd_qtstatus): Make "str" const.
3953
b2333d22
PA
39542015-03-20 Pedro Alves <palves@redhat.com>
3955
3956 * server.c (handle_general_set): Make "req_str" const.
3957
23f238d3
PA
39582015-03-19 Pedro Alves <palves@redhat.com>
3959
3960 * linux-low.c (linux_resume_one_lwp): Rename to ...
3961 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3962 instead call perror_with_name.
3963 (check_ptrace_stopped_lwp_gone): New function.
3964 (linux_resume_one_lwp): Reimplement as wrapper around
3965 linux_resume_one_lwp_throw that swallows errors if the LWP is
3966 gone.
3967
91baf43f
PA
39682015-03-19 Pedro Alves <palves@redhat.com>
3969
3970 * linux-low.c (count_events_callback, select_event_lwp_callback):
3971 No longer check whether the thread has resume_stop as last resume
3972 kind.
3973
8bf3b159
PA
39742015-03-19 Pedro Alves <palves@redhat.com>
3975
3976 * linux-low.c (count_events_callback, select_event_lwp_callback):
3977 Use the lwp's status_pending_p field, not the thread's.
3978
b90fc188
PA
39792015-03-19 Pedro Alves <palves@redhat.com>
3980
3981 * linux-low.c (select_event_lwp_callback): Update comments to
3982 no longer mention SIGTRAP.
3983
464b0089
GB
39842015-03-18 Gary Benson <gbenson@redhat.com>
3985
3986 * server.c (handle_query): Do not report vFile:fstat as supported.
3987
aa9e327f
GB
39882015-03-11 Gary Benson <gbenson@redhat.com>
3989
3990 * hostio.c (sys/types.h): New include.
3991 (sys/stat.h): Likewise.
3992 (common-remote-fileio.h): Likewise.
3993 (handle_fstat): New function.
3994 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3995
791c0056
GB
39962015-03-11 Gary Benson <gbenson@redhat.com>
3997
3998 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3999 struct stat.st_blocks and struct stat.st_blksize.
4000 * configure: Regenerate.
4001 * config.in: Likewise.
4002 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4003 (OBS): Add common-remote-fileio.o.
4004 (common-remote-fileio.o): New rule.
4005
9a9df970
PA
40062015-03-09 Pedro Alves <palves@redhat.com>
4007
4008 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4009 'struct sockaddr' pointer in 'accept' call.
4010
9eb1356e
PA
40112015-03-09 Pedro Alves <palves@redhat.com>
4012
4013 Revert:
4014 2015-03-07 Pedro Alves <palves@redhat.com>
4015 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4016 or <winsock2.h> here. Instead include "gdb_socket.h".
4017 (remote_open): Use union gdb_sockaddr_u.
4018 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4019 or <winsock2.h> here. Instead include "gdb_socket.h".
4020 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4021 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4022 or <sys/un.h>.
4023 (init_named_socket, gdb_agent_helper_thread): Use union
4024 gdb_sockaddr_u.
4025
aac331e4
PA
40262015-03-07 Pedro Alves <palves@redhat.com>
4027
4028 * configure.ac (build_warnings): Move
4029 -Wdeclaration-after-statement to the C-specific set.
4030 * configure: Regenerate.
4031
366c75fc
PA
40322015-03-07 Pedro Alves <palves@redhat.com>
4033
4034 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4035 or <winsock2.h> here. Instead include "gdb_socket.h".
4036 (remote_open): Use union gdb_sockaddr_u.
4037 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4038 or <winsock2.h> here. Instead include "gdb_socket.h".
4039 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4040 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4041 or <sys/un.h>.
4042 (init_named_socket, gdb_agent_helper_thread): Use union
4043 gdb_sockaddr_u.
4044
492d29ea
PA
40452015-03-07 Pedro Alves <palves@redhat.com>
4046
4047 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4048 instead.
4049
60a191ed
YQ
40502015-03-06 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-aarch64-low.c (aarch64_insert_point): Use
4053 show_debug_regs as a boolean.
4054 (aarch64_remove_point): Likewise.
4055
f5771b1d
PA
40562015-03-05 Pedro Alves <palves@redhat.com>
4057
4058 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4059 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4060 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4061 * nto-low.c (nto_target_ops): Likewise.
4062 * spu-low.c (spu_target_ops): Likewise.
4063 * win32-low.c (win32_target_ops): Likewise.
4064
3e572f71
PA
40652015-03-04 Pedro Alves <palves@redhat.com>
4066
72f4393d 4067 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4068 Decide whether a breakpoint triggered based on the SIGTRAP's
4069 siginfo.si_code.
72f4393d
L
4070 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4071 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4072 (linux_low_filter_event): Check for breakpoints before checking
4073 watchpoints.
4074 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4075 siginfo.si_code.
72f4393d
L
4076 (linux_stopped_by_sw_breakpoint)
4077 (linux_supports_stopped_by_sw_breakpoint)
4078 (linux_stopped_by_hw_breakpoint)
4079 (linux_supports_stopped_by_hw_breakpoint): New functions.
4080 (linux_target_ops): Install new target methods.
3e572f71 4081
1ec68e26
PA
40822015-03-04 Pedro Alves <palves@redhat.com>
4083
4084 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4085 * server.c (swbreak_feature, hwbreak_feature): New globals.
4086 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4087 (captured_main): Clear swbreak_feature and hwbreak_feature.
4088 * server.h (swbreak_feature, hwbreak_feature): Declare.
4089 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4090 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4091 supports_stopped_by_hw_breakpoint>: New fields.
4092 (target_supports_stopped_by_sw_breakpoint)
4093 (target_stopped_by_sw_breakpoint)
4094 (target_supports_stopped_by_hw_breakpoint)
4095 (target_stopped_by_hw_breakpoint): Declare.
4096
15c66dd6
PA
40972015-03-04 Pedro Alves <palves@redhat.com>
4098
4099 enum lwp_stop_reason -> enum target_stop_reason
4100 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4101 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4102 (linux_wait_1, stuck_in_jump_pad_callback)
4103 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4104 (linux_stopped_by_watchpoint):
4105 * linux-low.h (enum lwp_stop_reason): Delete.
4106 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4107 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4108
98fc70d6
YQ
41092015-03-04 Yao Qi <yao.qi@linaro.org>
4110
4111 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4112
dd2ac174
GB
41132015-03-03 Gary Benson <gbenson@redhat.com>
4114
4115 * hostio.c (handle_vFile): Fix prefix lengths.
4116
d68e53f4
MM
41172015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4118
4119 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4120 ptr_bits.
4121
bf2d68ab
AA
41222015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4123
4124 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4125 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4126 (clean): Add "rm -f" for above C files.
4127 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4128 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4129 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4130 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4131 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4132 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4133 (init_registers_s390x_vx_linux64)
4134 (init_registers_s390x_tevx_linux64)
4135 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4136 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4137 declarations.
4138 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4139 (s390_store_vxrs_high): New functions.
4140 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4141 NT_S390_VXRS_HIGH.
4142 (s390_arch_setup): Add logic for selecting one of the new target
4143 descriptions. Activate the new vector regsets if applicable.
4144 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4145 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4146 and init_registers_s390x_tevx_linux64.
4147
c966a859
PA
41482015-03-01 Pedro Alves <palves@redhat.com>
4149
4150 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4151 parameter.
4152
4180215b
PA
41532015-02-27 Pedro Alves <palves@redhat.com>
4154
4155 * linux-x86-low.c (u_debugreg_offset): New function.
4156 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4157
749bab01
PA
41582015-02-27 Pedro Alves <palves@redhat.com>
4159
4160 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4161 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4162 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4163 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4164 (ps_lsetfpregs, ps_getpid)
4165 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4166 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4167 (ps_lsetxregs, ps_plog): Declare.
4168
3c14e5a3
PA
41692015-02-27 Pedro Alves <palves@redhat.com>
4170
4171 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4172 IP_AGENT_EXPORT_FUNC.
4173 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4174 IP_AGENT_EXPORT_FUNC.
4175 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4176 (IP_AGENT_EXPORT): Delete.
4177 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4178 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4179 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4180 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4181 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4182 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4183 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4184 (traceframe_read_count, traceframe_write_count)
4185 (traceframes_created, trace_state_variables, get_raw_reg)
4186 (get_trace_state_variable_value, set_trace_state_variable_value)
4187 (ust_loaded, helper_thread_id, cmd_buf): Use
4188 IPA_SYM_EXPORTED_NAME.
4189 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4190 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4191 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4192 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4193 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4194 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4195 EXTERN_C_PUSH/EXTERN_C_POP.
4196 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4197 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4198 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4199 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4200 (traceframe_write_count, traceframe_read_count)
4201 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4202 (about_to_request_buffer_space, get_trace_state_variable_value)
4203 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4204 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4205 EXTERN_C_PUSH/EXTERN_C_POP.
4206 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4207 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4208 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4209 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4210 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4211 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4212 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4213 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4214 Define.
4215 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4216 (IP_AGENT_EXPORT_VAR_DECL): Define.
4217 (tracing): Declare.
4218 (gdb_agent_get_raw_reg): Declare.
4219
fe978cb0
PA
42202015-02-27 Tom Tromey <tromey@redhat.com>
4221 Pedro Alves <palves@redhat.com>
4222
4223 Rename symbols whose names are reserved C++ keywords throughout.
4224
3bc3d82a
PA
42252015-02-27 Pedro Alves <palves@redhat.com>
4226
4227 * Makefile.in (COMPILER): New, get it from autoconf.
4228 (CXX): Get from autoconf instead.
4229 (COMPILE.pre): Use COMPILER.
4230 (CC-LD): Rename to ...
4231 (CC_LD): ... this. Use COMPILER.
4232 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4233 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4234 * acinclude.m4: Include build-with-cxx.m4.
4235 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4236 Disable -Werror by default if building in C++ mode.
4237 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4238 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4239 the C++ compiler. Save/restore CXXFLAGS too.
4240 * configure: Regenerate.
4241
07697489
PA
42422015-02-27 Pedro Alves <palves@redhat.com>
4243
4244 * acinclude.m4: Include libiberty.m4.
4245 * configure.ac: Call libiberty_INIT.
4246 * config.in, configure: Regenerate.
4247
9beb7c4e
PA
42482015-02-26 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (linux_wait_1): When incrementing the PC past a
4251 program breakpoint always use the_low_target.breakpoint_len as
4252 increment, rather than the maximum between that and
4253 the_low_target.decr_pc_after_break.
4254
8090aef2
PA
42552015-02-23 Pedro Alves <palves@redhat.com>
4256
4257 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4258 thread was doing a step-over; always adjust the PC if
4259 we stepped over a permanent breakpoint.
4260 (linux_wait_1): If we stepped over breakpoint that was on top of a
4261 permanent breakpoint, manually advance the PC past it.
4262
bc9540e8
PA
42632015-02-23 Pedro Alves <palves@redhat.com>
4264
4265 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4266 modes.
4267 (x86_fill_gregset, x86_store_gregset): Use it when handling
4268 $orig_eax.
4269
2db9a427
PA
42702015-02-20 Pedro Alves <palves@redhat.com>
4271
4272 * thread-db.c: Include "nat/linux-procfs.h".
4273 (thread_db_init): Skip listing new threads if the kernel supports
4274 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4275
afa8d396
PA
42762015-02-20 Pedro Alves <palves@redhat.com>
4277
4278 * linux-low.c (status_pending_p_callback): Use ptid_match.
4279
c9587f88
AT
42802015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4281
4282 PR breakpoints/16812
4283 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4284 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4285 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4286
b05ec7a5
AT
42872015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4288
4289 PR breakpoints/15956
4290 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4291
d33501a5
MM
42922015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4293
4294 * linux-low.c (linux_low_btrace_conf): Print size.
4295 * server.c (handle_btrace_conf_general_set): New.
4296 (hanle_general_set): Call handle_btrace_conf_general_set.
4297 (handle_query): Report Qbtrace-conf:bts:size as supported.
4298
f4abbc16
MM
42992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4300
4301 * linux-low.c (linux_low_enable_btrace): Update parameters.
4302 (linux_low_btrace_conf): New.
4303 (linux_target_ops)<to_btrace_conf>: Initialize.
4304 * server.c (current_btrace_conf): New.
4305 (handle_btrace_enable): Rename to ...
4306 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4307 to target_enable_btrace. Update comment. Update users.
4308 (handle_qxfer_btrace_conf): New.
4309 (qxfer_packets): Add btrace-conf entry.
4310 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4311 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4312 (target_ops)<read_btrace_conf>: New.
4313 (target_enable_btrace): Update parameters.
4314 (target_read_btrace_conf): New.
4315
043c3577
MM
43162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4317
4318 * server.c (handle_btrace_general_set): Remove call to
4319 target_supports_btrace.
4320 (supported_btrace_packets): New.
4321 (handle_query): Call supported_btrace_packets.
4322 * target.h: include btrace-common.h.
4323 (btrace_target_info): Removed.
4324 (supports_btrace, target_supports_btrace): Update parameters.
4325
734b0e4b
MM
43262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4327
4328 * Makefile.in (SFILES): Add common/btrace-common.c.
4329 (OBS): Add common/btrace-common.o.
4330 (btrace-common.o): Add build rules.
4331 * linux-low: Include btrace-common.h.
4332 (linux_low_read_btrace): Use struct btrace_data. Call
4333 btrace_data_init and btrace_data_fini.
4334
d6c146e9
PA
43352015-02-06 Pedro Alves <palves@redhat.com>
4336
4337 * thread-db.c (find_new_threads_callback): Add debug output.
4338
20ba1ce6
PA
43392015-02-04 Pedro Alves <palves@redhat.com>
4340
4341 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4342 (resume_stopped_resumed_lwps): New function.
4343 (linux_wait_for_event_filtered): Use it.
4344
8cc73a39
SDJ
43452015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4346
4347 * Makefile.in (SFILES): Add linux-personality.c.
4348 (linux-personality.o): New rule.
4349 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4350 list of objects to be built.
4351 * linux-low.c: Include nat/linux-personality.h.
4352 (linux_create_inferior): Remove code to disable address space
4353 randomization (moved to ../nat/linux-personality.c). Create
4354 cleanup to disable address space randomization.
4355
fb23d554
SDJ
43562015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4357
4358 * Makefile.in (posix-strerror.o): New rule.
4359 (mingw-strerror.o): Likewise.
4360 * configure: Regenerated.
4361 * configure.ac: Source file ../common/common.host. Initialize new
4362 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4363
cdf43629
YQ
43642015-01-14 Yao Qi <yao@codesourcery.com>
4365
4366 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4367 (ppc-linux.o): New rule.
4368 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4369 * configure.ac: AC_CHECK_FUNCS(getauxval).
4370 * config.in: Re-generated.
4371 * configure: Re-generated.
4372 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4373 ppc64_64bit_inferior_p
4374
514c5338
YQ
43752015-01-14 Yao Qi <yao@codesourcery.com>
4376
4377 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4378 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4379 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4380 (PT_ORIG_R3, PT_TRAP): Likewise.
4381 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4382 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4383 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4384
3368c1e5
JB
43852015-01-10 Joel Brobecker <brobecker@adacore.com>
4386
4387 * i387-fp.c (i387_cache_to_xsave): In look over
4388 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4389 zmmh_low_space field by use of zmmh_high_space.
4390
582511be
PA
43912015-01-09 Pedro Alves <palves@redhat.com>
4392
4393 * linux-low.c (step_over_bkpt): Move higher up in the file.
4394 (handle_extended_wait): Don't store the stop_pc here.
4395 (get_stop_pc): Adjust comments and rename to ...
4396 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4397 stopped for a software breakpoint or hardware breakpoint.
4398 (thread_still_has_status_pending_p): New function.
4399 (status_pending_p_callback): Use
4400 thread_still_has_status_pending_p. If the event is no longer
4401 interesting, resume the LWP.
4402 (handle_tracepoints): Add assert.
4403 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4404 (wstatus_maybe_breakpoint): New function.
4405 (cancel_breakpoint): Delete function.
4406 (check_stopped_by_watchpoint): New function, factored out from
4407 linux_low_filter_event.
4408 (lp_status_maybe_breakpoint): Delete function.
4409 (linux_low_filter_event): Remove filter_ptid argument.
4410 Leave thread group exits pending here. Store the LWP's stop PC.
4411 Always leave events pending.
4412 (linux_wait_for_event_filtered): Pull all events out of the
4413 kernel, and leave them all pending.
4414 (count_events_callback, select_event_lwp_callback): Consider all
4415 events.
4416 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4417 (select_event_lwp): Only give preference to the stepping LWP in
4418 all-stop mode. Adjust comments.
4419 (ignore_event): New function.
4420 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4421 references to cancel_breakpoints. Adjust to renames. Also give
4422 equal priority to all LWPs that have had events in non-stop mode.
4423 If reporting a software breakpoint event, unadjust the LWP's PC.
4424 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4425 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4426 Adjust.
4427 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4428 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4429 (linux_stopped_by_watchpoint): Adjust.
4430 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4431 * linux-low.h (enum lwp_stop_reason): New.
4432 (struct lwp_info) <stop_pc>: Adjust comment.
4433 <stopped_by_watchpoint>: Delete field.
4434 <stop_reason>: New field.
4435 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4436 * mem-break.c (software_breakpoint_inserted_here)
4437 (hardware_breakpoint_inserted_here): New function.
4438 * mem-break.h (software_breakpoint_inserted_here)
4439 (hardware_breakpoint_inserted_here): Declare.
4440 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4441 (cancel_breakpoints): Delete.
4442 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4443 (upload_fast_traceframes): Remove references to
4444 cancel_breakpoints.
4445
a33e3959
PA
44462015-01-09 Pedro Alves <palves@redhat.com>
4447
4448 * thread-db.c (find_new_threads_callback): Ignore thread if the
4449 kernel thread ID is -1.
4450
8784d563
PA
44512015-01-09 Pedro Alves <palves@redhat.com>
4452
4453 * linux-low.c (linux_attach_fail_reason_string): Move to
4454 nat/linux-ptrace.c, and rename.
4455 (linux_attach_lwp): Update comment.
4456 (attach_proc_task_lwp_callback): New function.
4457 (linux_attach): Adjust to rename and use
4458 linux_proc_attach_tgid_threads.
4459 (linux_attach_fail_reason_string): Delete declaration.
4460
76f2b779
JB
44612015-01-01 Joel Brobecker <brobecker@adacore.com>
4462
4463 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4464 * server.c (gdbserver_version): Likewise.
4465
fafcc06a
SDJ
44662014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4467
4468 * remote-utils.c: Include ctype.h.
4469 (input_interrupt): Explicitly handle the case when the char
4470 received is the NUL byte. Improve the printing of non-ASCII
4471 characters.
4472
beed38b8
JB
44732014-12-16 Joel Brobecker <brobecker@adacore.com>
4474
4475 * linux-low.c (linux_low_filter_event): Update call to
4476 linux_enable_event_reporting following the addition of
4477 a new parameter to that function.
4478
bf330350
CU
44792014-12-16 Catalin Udma <catalin.udma@freescale.com>
4480
4481 PR server/17457
4482 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4483 (AARCH64_FPCR_REGNO): Likewise.
4484 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4485 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4486 (aarch64_store_fpregset): Likewise.
4487
5227d625
JB
44882014-12-15 Joel Brobecker <brobecker@adacore.com>
4489
4490 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4491 Remove FIXME comment about assumption about N.
4492
f93b65a0
JB
44932014-12-13 Joel Brobecker <brobecker@adacore.com>
4494
4495 * configure.ac: If large-file support is disabled in GDBserver,
4496 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4497 * configure: Regenerate.
4498
e5a9158d
AA
44992014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4500
4501 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4502 warning upon ENODATA from ptrace.
4503 * linux-s390-low.c (s390_store_tdb): New.
4504 (s390_regsets): Add regset for NT_S390_TDB.
4505
feea5f36
AA
45062014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4507
4508 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4509 without a fill_function.
4510 * linux-s390-low.c (s390_fill_last_break): Remove.
4511 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4512 (s390_arch_setup): Use regset's size instead of fill_function for
4513 loop end condition.
4514
098dbe61
AA
45152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4516
4517 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4518 the regset's store function when ptrace returned an error.
4519 * regcache.c (get_thread_regcache): Invalidate register cache
4520 before fetching inferior's registers.
4521
28eef672
AA
45222014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4523
4524 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4525 while-loop as for-loop.
4526 (regsets_store_inferior_registers): Likewise.
4527
bdca27a2
YQ
45282014-11-28 Yao Qi <yao@codesourcery.com>
4529
4530 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4531 * config.in, configure: Re-generate.
4532 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4533 is defined.
4534
9c232dda
YQ
45352014-11-21 Yao Qi <yao@codesourcery.com>
4536
4537 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4538 (AC_CHECK_HEADERS): Remove malloc.h.
4539 * configure: Re-generated.
4540 * config.in: Re-generated.
4541 * server.h: Don't include alloca.h and malloc.h.
4542 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4543 Don't include malloc.h.
4544
43968415
JB
45452014-11-17 Joel Brobecker <brobecker@adacore.com>
4546
4547 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4548 corresponding ERRNO check in same block.
4549
40e91bc7
PA
45502014-11-12 Pedro Alves <palves@redhat.com>
4551
4552 * server.c (cont_thread): Update comment.
4553 (start_inferior, attach_inferior): No longer clear cont_thread.
4554 (handle_v_cont): No longer set cont_thread.
4555 (captured_main): Clear cont_thread each time a GDB connects.
4556
c2c118cf
PA
45572014-11-12 Pedro Alves <palves@redhat.com>
4558
4559 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4560 thread, and don't resume all threads if the Hc thread has exited.
4561
78708b7c
PA
45622014-11-12 Pedro Alves <palves@redhat.com>
4563
4564 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4565 the process group instead of to a specific LWP.
4566
a2abc7de
PA
45672014-10-15 Pedro Alves <palves@redhat.com>
4568
4569 PR server/17487
4570 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4571 parameter.
4572 (arm_set_thread_context): Delete.
4573 (the_low_target): Adjust.
4574 * win32-i386-low.c (debug_registers_changed)
4575 (debug_registers_used): Delete.
4576 (update_debug_registers_callback): New function.
4577 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4578 needing to update their debug registers.
4579 (win32_get_current_dr): New function.
4580 (x86_dr_low_get_addr, x86_dr_low_get_control)
4581 (x86_dr_low_get_status): Fetch the debug register from the thread
4582 record's context.
4583 (i386_initial_stuff): Adjust.
4584 (i386_get_thread_context): Remove current_event parameter. Don't
4585 clear debug_registers_changed nor copy DR values to
4586 debug_reg_state.
4587 (i386_set_thread_context): Delete.
4588 (i386_prepare_to_resume): New function.
4589 (i386_thread_added): Mark the thread as needing to update irs
4590 debug registers.
4591 (the_low_target): Remove i386_set_thread_context and install
4592 i386_prepare_to_resume.
4593 * win32-low.c (win32_get_thread_context): Adjust.
4594 (win32_set_thread_context): Use SetThreadContext
4595 directly.
4596 (win32_prepare_to_resume): New function.
4597 (win32_require_context): New function, factored out from ...
4598 (thread_rec): ... this.
4599 (continue_one_thread): Call win32_prepare_to_resume on each thread
4600 we're about to continue.
4601 (win32_resume): Call win32_prepare_to_resume on the event thread.
4602 * win32-low.h (struct win32_thread_info)
4603 <debug_registers_changed>: New field.
4604 (struct win32_target_ops): Change prototype of set_thread_context,
4605 delete set_thread_context and add prepare_to_resume.
4606 (win32_require_context): New declaration.
4607
a442d071
GB
46082014-10-08 Gary Benson <gbenson@redhat.com>
4609
4610 * server.h: Do not include common-exceptions.h.
4611
6f1947e8
GB
46122014-10-08 Gary Benson <gbenson@redhat.com>
4613
4614 * server.h: Do not include cleanups.h.
4615
63b434a4
JH
46162014-09-30 James Hogan <james.hogan@imgtec.com>
4617
4618 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4619 mips64-dsp-linux.c.
4620
c4d9ceb6
YQ
46212014-09-23 Yao Qi <yao@codesourcery.com>
4622
4623 * linux-low.c (lp_status_maybe_breakpoint): New function.
4624 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4625 (count_events_callback): Likewise.
4626 (select_event_lwp_callback): Likewise.
4627 (cancel_breakpoints_callback): Likewise.
4628
89a5711c
DB
46292014-09-19 Don Breazeal <donb@codesourcery.com>
4630
4631 * linux-low.c (handle_extended_wait): Call
4632 linux_ptrace_get_extended_event.
4633 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4634 linux_is_extended_waitstatus.
4635
bffc0964
JB
46362014-09-16 Joel Brobecker <brobecker@adacore.com>
4637
4638 * Makefile.in (CPPFLAGS): Define.
4639 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4640 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4641
0bfdf32f
GB
46422014-09-16 Gary Benson <gbenson@redhat.com>
4643
4644 * inferiors.h (current_inferior): Renamed as...
4645 (current_thread): New variable. All uses updated.
4646 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4647 (maybe_move_out_of_jump_pad): Likewise.
4648 (cancel_breakpoint): Likewise.
4649 (linux_low_filter_event): Likewise.
4650 (wait_for_sigstop): Likewise.
4651 (linux_resume_one_lwp): Likewise.
4652 (need_step_over_p): Likewise.
4653 (start_step_over): Likewise.
4654 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4655 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4656 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4657 and save_inferior as saved_thread.
4658 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4659 saved_thread.
4660 (regcache_invalidate_thread): Likewise.
4661 * remote-utils.c (prepare_resume_reply): Likewise.
4662 * thread-db.c (thread_db_get_tls_address): Likewise.
4663 (disable_thread_event_reporting): Likewise.
4664 (remove_thread_event_breakpoints): Likewise.
4665 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4666 as saved_thread.
4667 * target.h (set_desired_inferior): Renamed as...
4668 (set_desired_thread): New declaration. All uses updated.
4669 * server.c (myresume): Updated comment to reference thread instead
4670 of inferior.
4671 (handle_serial_event): Likewise.
4672 (handle_target_event): Likewise.
4673
361c8ade
GB
46742014-09-12 Tom Tromey <tromey@redhat.com>
4675 Gary Benson <gbenson@redhat.com>
4676
4677 * regcache.h: Include common-regcache.h.
4678 (regcache_read_pc): Don't declare.
4679 * regcache.c (get_thread_regcache_for_ptid): New function.
4680
bd9269f7
GB
46812014-09-11 Tom Tromey <tromey@redhat.com>
4682 Gary Benson <gbenson@redhat.com>
4683
4684 * symbol.c: New file.
4685 * Makefile.in (SFILES): Add symbol.c.
4686 (OBS): Add symbol.o.
4687
f8c1d06b
GB
46882014-09-11 Gary Benson <gbenson@redhat.com>
4689
4690 * target.c (target_stop_ptid, target_continue_ptid): New
4691 functions.
4692
721ec300
GB
46932014-09-11 Tom Tromey <tromey@redhat.com>
4694 Gary Benson <gbenson@redhat.com>
4695
4696 * target.h: Include target/target.h.
4697 * target.c (target_read_memory, target_read_uint32)
4698 (target_write_memory): New functions.
4699
c5e92cca
GB
47002014-09-11 Gary Benson <gbenson@redhat.com>
4701
4702 * server.h (debug_hw_points): Don't declare.
4703 * server.c (debug_hw_points): Don't define. Replace all uses
4704 with show_debug_regs.
4705 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4706 all uses with show_debug_regs.
4707
2e4bb98a
EBM
47082014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4709
4710 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4711 endianness into account.
4712 (ppc_supply_ptrace_register): Likewise.
4713
ac740bc7
JH
47142014-09-03 James Hogan <james.hogan@imgtec.com>
4715
4716 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4717 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4718
97ea6506
GB
47192014-09-03 Gary Benson <gbenson@redhat.com>
4720
4721 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4722 ALL_DEBUG_ADDRESS_REGISTERS.
4723
df7e5265
GB
47242014-09-02 Gary Benson <gbenson@redhat.com>
4725
4726 * i386-low.h: Renamed as...
4727 * x86-low.h: New file. All type, function and variable name
4728 prefixes changed from "i386_" to "x86_". All references updated.
4729 * i386-low.c: Renamed as...
4730 * x86-low.c: New file. All type, function and variable name
4731 prefixes changed from "i386_" to "x86_". All references updated.
4732
ed859da7
GB
47332014-09-02 Gary Benson <gbenson@redhat.com>
4734
4735 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4736 (x86_linux_new_thread): Likewise.
4737
860789c7
GB
47382014-08-29 Gary Benson <gbenson@redhat.com>
4739
4740 * server.h (setjmp.h): Do not include.
4741 (toplevel): Do not declare.
4742 (common-exceptions.h): Include.
4743 (cleanups.h): Likewise.
4744 * server.c (toplevel): Do not define.
4745 (exit_code): New static global.
4746 (detach_or_kill_for_exit_cleanup): New function.
4747 (main): New function. Original main renamed to...
4748 (captured_main): New function.
4749 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4750
ff55e1b5
GB
47512014-08-29 Gary Benson <gbenson@redhat.com>
4752
4753 * Makefile.in (SFILES): Add common/common-exceptions.c.
4754 (OBS): Add common-exceptions.o.
4755 (common-exceptions.o): New rule.
4756 * utils.c (prepare_to_throw_exception): New function.
4757
e9bcb658
GB
47582014-08-29 Gary Benson <gbenson@redhat.com>
4759
4760 * config.in: Regenerate.
4761 * configure: Likewise.
4762
e3180625
GB
47632014-08-29 Gary Benson <gbenson@redhat.com>
4764
4765 * Makefile.in (SFILES): Add common/cleanups.c.
4766 (OBS): cleanups.o.
4767 (cleanups.o): New rule.
4768
e3d6ba5d
GB
47692014-08-29 Gary Benson <gbenson@redhat.com>
4770
4771 * utils.c (internal_vwarning): New function.
4772
7096e886
GB
47732014-08-28 Gary Benson <gbenson@redhat.com>
4774
4775 * utils.h (fatal): Remove declaration.
4776 * utils.c (fatal): Remove function.
4777
14ce3192
GB
47782014-08-28 Gary Benson <gbenson@redhat.com>
4779
4780 * tracepoint.c (gdb_agent_init): Replace fatal with
4781 perror_with_name.
4782 (initialize_tracepoint): Likewise.
4783
50278d59
GB
47842014-08-28 Gary Benson <gbenson@redhat.com>
4785
4786 * remote-utils.c (remote_prepare): Replace fatal with error.
4787
aa96c426
GB
47882014-08-28 Gary Benson <gbenson@redhat.com>
4789
4790 * linux-low.c (linux_async): Replace fatal with warning.
4791 Tidy up and return.
4792 (linux_start_non_stop): Return -1 if linux_async failed.
4793
f7160e97
GB
47942014-08-28 Gary Benson <gbenson@redhat.com>
4795
4796 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4797 gdb_assert.
4798 (i386_dr_low_get_addr): Remove vague comment.
4799 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4800 gdb_assert.
4801
38e08fca
GB
48022014-08-28 Gary Benson <gbenson@redhat.com>
4803
4804 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4805 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4806 internal_error.
4807 (linux_resume_one_lwp): Likewise.
4808 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4809 gdb_assert.
4810 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4811 with internal_error.
4812 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4813 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4814 (find_register_by_name): Replace fatal with internal_error.
4815 (find_regno): Likewise.
4816 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4817 * thread-db.c (thread_db_create_event): Likewise.
4818 (thread_db_load_search): Likewise.
4819 (try_thread_db_load_1): Likewise.
4820 * tracepoint.c (get_jump_space_head): Replace fatal with
4821 internal_error.
4822 (claim_trampoline_space): Likewise.
4823 (have_fast_tracepoint_trampoline_buffer): Likewise.
4824 (cmd_qtstart): Likewise.
4825 (stop_tracing): Likewise.
4826 (fast_tracepoint_collecting): Likewise.
4827 (target_malloc): Likewise.
4828 (download_tracepoint): Likewise.
4829 (download_trace_state_variables): Replace check with gdb_assert.
4830 (upload_fast_traceframes): Replace fatal with internal_error.
4831
34abf635
GB
48322014-08-19 Tom Tromey <tromey@redhat.com>
4833 Gary Benson <gbenson@redhat.com>
4834
4835 * Makefile.in (SFILES): Add common/common-debug.c.
4836 (OBS): Add common-debug.o.
4837 (common-debug.o): New rule.
4838 * debug.h (debug_printf): Don't declare.
4839 * debug.c (debug_printf): Renamed and rewritten as...
4840 (debug_vprintf): New function.
4841
f6e94d78
GB
48422014-08-19 Gary Benson <gbenson@redhat.com>
4843
4844 * utils.h: Do not include print-utils.h.
4845
9239eeab
GB
48462014-08-19 Tom Tromey <tromey@redhat.com>
4847 Gary Benson <gbenson@redhat.com>
4848
4849 * server.h: Add static assertion.
4850 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4851
ef87c8bb
GB
48522014-08-19 Tom Tromey <tromey@redhat.com>
4853 Gary Benson <gbenson@redhat.com>
4854
4855 * Makefile.in (SFILES): Add common/errors.c.
4856 (OBS): Add errors.o.
4857 (IPA_OBS): Add errors-ipa.o.
4858 (errors.o): New rule.
4859 (errors-ipa.o): Likewise.
4860 * utils.h (perror_with_name, error, warning): Don't declare.
4861 * utils.c (warning): Renamed and rewritten as...
4862 (vwarning): New function.
4863 (error): Renamed and rewritten as...
4864 (verror): New function.
4865 (internal_error): Renamed and rewritten as...
4866 (internal_verror): New function.
4867
bb974a24
GB
48682014-08-07 Gary Benson <gbenson@redhat.com>
4869
4870 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4871 * configure: Regenerate.
4872 * config.in: Likewise.
4873 * server.h: Do not include errno.h.
4874 * event-loop.c: Likewise.
4875 * hostio-errno.c: Likewise.
4876 * linux-low.c: Likewise.
4877 * remote-utils.c: Likewise.
4878 * spu-low.c: Likewise.
4879 * utils.c: Likewise.
4880 * gdbreplay.c: Unconditionally include errno.h.
4881
6d3d12eb
GB
48822014-08-07 Gary Benson <gbenson@redhat.com>
4883
4884 * server.h: Do not include string.h.
4885 * event-loop.c: Likewise.
4886 * linux-low.c: Likewise.
4887 * regcache.c: Likewise.
4888 * remote-utils.c: Likewise.
4889 * spu-low.c: Likewise.
4890 * utils.c: Likewise.
4891
dccbb609
GB
48922014-08-07 Gary Benson <gbenson@redhat.com>
4893
4894 * server.h: Do not include gdb_assert.h.
4895
e76df0d0
GB
48962014-08-07 Gary Benson <gbenson@redhat.com>
4897
4898 * server.h: Do not include common-utils.h.
4899
4cb9c816
GB
49002014-08-07 Gary Benson <gbenson@redhat.com>
4901
4902 * server.h: Do not include ptid.h.
4903 * notif.h: Likewise.
4904
3995eeee
GB
49052014-08-07 Gary Benson <gbenson@redhat.com>
4906
4907 * server.h: Do not include gdb_locale.h.
4908
cb9f1a9b
GB
49092014-08-07 Gary Benson <gbenson@redhat.com>
4910
4911 * server.h: Do not include gdb/signals.h.
4912 * win32-low.c: Likewise.
4913
a5fceff8
GB
49142014-08-07 Gary Benson <gbenson@redhat.com>
4915
4916 * server.h: Do not include pathmax.h.
4917
b9391142
GB
49182014-08-07 Gary Benson <gbenson@redhat.com>
4919
4920 * server.h: Do not include libiberty.h.
4921 * linux-bfin-low.c: Likewise.
4922
0e443c87
GB
49232014-08-07 Gary Benson <gbenson@redhat.com>
4924
4925 * server.h: Do not include ansidecl.h.
4926
8ebb3f56
GB
49272014-08-07 Gary Benson <gbenson@redhat.com>
4928
4929 * linux-x86-low.c: Do not include stddef.h.
4930 * lynx-ppc-low.c: Likewise.
4931 * tracepoint.c: Likewise.
4932
8980bdf6
GB
49332014-08-07 Gary Benson <gbenson@redhat.com>
4934
4935 * server.h: Do not include stdarg.h.
4936 * nto-low.c: Likewise.
4937
d7096f71
GB
49382014-08-07 Gary Benson <gbenson@redhat.com>
4939
4940 * server.h: Do not include stdlib.h.
4941 * inferiors.c: Likewise.
4942 * linux-low.c: Likewise.
4943 * regcache.c: Likewise.
4944 * spu-low.c: Likewise.
4945 * tracepoint.c: Likewise.
4946 * utils.c: Likewise.
4947
d02f550d
GB
49482014-08-07 Gary Benson <gbenson@redhat.com>
4949
4950 * server.h: Do not include stdio.h.
4951 * linux-low.c: Likewise.
4952 * remote-utils.c: Likewise.
4953 * spu-low.c: Likewise.
4954 * utils.c: Likewise.
4955 * wincecompat.c: Likewise.
4956
87f6c4e3
GB
49572014-08-06 Gary Benson <gbenson@redhat.com>
4958
4959 * regcache.c (init_register_cache): Move conditionals inside if.
4960
7089dca4
GB
49612014-08-06 Gary Benson <gbenson@redhat.com>
4962
4963 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4964
462f517e
GB
49652014-07-31 Gary Benson <gbenson@redhat.com>
4966
4967 * ax.h: Do not include server.h.
4968 * gdbthread.h: Likewise.
4969 * lynx-low.h: Likewise.
4970 * notif.h: Likewise.
4971
976411d6
GB
49722014-07-30 Gary Benson <gbenson@redhat.com>
4973
4974 * server.h: Include common-defs.h.
4975 Do not include config.h or build-gnulib-gdbserver/config.h.
4976
d41f6d8e
GB
49772014-07-30 Gary Benson <gbenson@redhat.com>
4978
4979 * hostio-errno.c: Move server.h to top of includes list.
4980 * inferiors.c: Likewise.
4981 * linux-x86-low.c: Likewise.
4982 * notif.c: Include server.h.
4983
314c6a35
TT
49842014-07-24 Tom Tromey <tromey@redhat.com>
4985 Gary Benson <gbenson@redhat.com>
4986
4987 * server.h (CORE_ADDR): Now unsigned.
4988
69ff6be5
PA
49892014-07-16 Pedro Alves <palves@redhat.com>
4990
4991 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4992
ce9e3fe7
PA
49932014-07-15 Pedro Alves <palves@redhat.com>
4994
4995 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4996 copy.
4997
e76126e8
PA
49982014-07-11 Pedro Alves <palves@redhat.com>
4999
5000 * linux-low.c (kill_wait_lwp): New function, based on
5001 kill_one_lwp_callback, but use my_waitpid directly.
5002 (kill_one_lwp_callback, linux_kill): Use it.
5003
8e9db26e
PA
50042014-06-23 Pedro Alves <palves@redhat.com>
5005
5006 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5007 before setting DR0..DR3.
5008
698b3e08
GB
50092014-06-20 Gary Benson <gbenson@redhat.com>
5010
5011 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5012 * configure: Regenerated.
5013 * config.in: Likewise.
5014
125f8a3d
GB
50152014-06-20 Gary Benson <gbenson@redhat.com>
5016
5017 * Makefile.in (SFILES): Update locations for files moved
5018 from common to nat.
5019 (object file files): Reordered.
5020
42995dbd
GB
50212014-06-20 Gary Benson <gbenson@redhat.com>
5022
5023 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5024 (i386_dr_low_set_addr): Likewise.
5025 (i386_dr_low_get_addr): Likewise.
5026 (i386_dr_low_can_set_control): Likewise.
5027 (i386_dr_low_set_control): Likewise.
5028 (i386_dr_low_get_control): Likewise.
5029 (i386_dr_low_get_status): Likewise.
5030 (i386_get_debug_register_length): Likewise.
5031 * linux-x86-low.c (i386_dr_low_set_addr):
5032 Changed signature. Made static.
5033 (i386_dr_low_get_addr): Likewise.
5034 (i386_dr_low_set_control): Likewise.
5035 (i386_dr_low_get_control): Likewise.
5036 (i386_dr_low_get_status): Likewise.
5037 (i386_dr_low): New global variable.
5038 * win32-i386-low.c (i386_dr_low_set_addr):
5039 Changed signature. Made static.
5040 (i386_dr_low_get_addr): Likewise.
5041 (i386_dr_low_set_control): Likewise.
5042 (i386_dr_low_get_control): Likewise.
5043 (i386_dr_low_get_status): Likewise.
5044 (i386_dr_low): New global variable.
5045
e1d2394b
MS
50462014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5047
5048 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5049 * Makefile.in (AR, AR_FLAGS): Define.
5050 * configure: Regenerate.
5051
3a8ee006
GB
50522014-06-19 Gary Benson <gbenson@redhat.com>
5053
5054 * Makefile.in (i386-dregs.o): New rule.
5055 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5056 * i386-low.c (target.h): Remove include.
5057 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5058 (DR_CONTROL_SHIFT): Likewise.
5059 (DR_CONTROL_SIZE): Likewise.
5060 (DR_RW_EXECUTE): Likewise.
5061 (DR_RW_WRITE): Likewise.
5062 (DR_RW_READ): Likewise.
5063 (DR_RW_IORW): Likewise.
5064 (DR_LEN_1): Likewise.
5065 (DR_LEN_2): Likewise.
5066 (DR_LEN_4): Likewise.
5067 (DR_LEN_8): Likewise.
5068 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5069 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5070 (DR_ENABLE_SIZE): Likewise.
5071 (DR_LOCAL_SLOWDOWN): Likewise.
5072 (DR_GLOBAL_SLOWDOWN): Likewise.
5073 (DR_CONTROL_RESERVED): Likewise.
5074 (I386_DR_CONTROL_MASK): Likewise.
5075 (I386_DR_VACANT): Likewise.
5076 (I386_DR_LOCAL_ENABLE): Likewise.
5077 (I386_DR_GLOBAL_ENABLE): Likewise.
5078 (I386_DR_DISABLE): Likewise.
5079 (I386_DR_SET_RW_LEN): Likewise.
5080 (I386_DR_GET_RW_LEN): Likewise.
5081 (I386_DR_WATCH_HIT): Likewise.
5082 (i386_wp_op_t): Likewise.
5083 (i386_show_dr): Likewise.
5084 (i386_length_and_rw_bits): Likewise.
5085 (i386_insert_aligned_watchpoint): Likewise.
5086 (i386_remove_aligned_watchpoint): Likewise.
5087 (i386_handle_nonaligned_watchpoint): Likewise.
5088 i386_update_inferior_debug_regs(): Likewise.
5089 (i386_dr_insert_watchpoint): Likewise.
5090 (i386_dr_remove_watchpoint): Likewise.
5091 (i386_dr_region_ok_for_watchpoint): Likewise.
5092 (i386_dr_stopped_data_address): Likewise.
5093 (i386_dr_stopped_by_watchpoint): Likewise.
5094
8f26655c
GB
50952014-06-19 Gary Benson <gbenson@redhat.com>
5096
5097 * i386-low.c (i386_dr_show): Renamed to
5098 i386_show_dr and made static. All uses updated.
5099 (i386_dr_length_and_rw_bits): Renamed to
5100 i386_length_and_rw_bits and made static.
5101 All uses updated.
5102 (i386_dr_insert_aligned_watchpoint): Renamed to
5103 i386_insert_aligned_watchpoint and made static.
5104 All uses updated.
5105 (i386_dr_remove_aligned_watchpoint): Renamed to
5106 i386_remove_aligned_watchpoint and made static.
5107 All uses updated.
5108 (i386_dr_update_inferior_debug_regs): Renamed to
5109 i386_update_inferior_debug_regs and made static.
5110 All uses updated.
5111
b9228891
GB
51122014-06-18 Gary Benson <gbenson@redhat.com>
5113
5171def3
GB
5114 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5115 (i386_dr_low_can_set_control): Likewise.
5116 (i386_get_debug_register_length): Likewise.
5117 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5118 (i386_dr_low_can_set_control): Likewise.
5119 (i386_get_debug_register_length): Likewise.
5120
51212014-06-17 Gary Benson <gbenson@redhat.com>
5122
b9228891
GB
5123 * i386-low.h (i386-dregs.h): New include.
5124 (DR_FIRSTADDR): Now in i386-dregs.h.
5125 (DR_LASTADDR): Likewise.
5126 (DR_NADDR): Likewise.
5127 (DR_STATUS): Likewise.
5128 (DR_CONTROL): Likewise.
5129 (i386_debug_reg_state): Likewise.
5130 (i386_dr_insert_watchpoint): Likewise.
5131 (i386_dr_remove_watchpoint): Likewise.
5132 (i386_dr_region_ok_for_watchpoint): Likewise.
5133 (i386_dr_stopped_data_address): Likewise.
5134 (i386_dr_stopped_by_watchpoint): Likewise.
5135 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5136
4be83cc2
GB
51372014-06-18 Gary Benson <gbenson@redhat.com>
5138
5139 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5140 i386_dr_insert_watchpoint.
5141 (i386_low_remove_watchpoint): Renamed to
5142 i386_dr_remove_watchpoint.
5143 (i386_low_region_ok_for_watchpoint): Renamed to
5144 i386_dr_region_ok_for_watchpoint.
5145 (i386_low_stopped_data_address): Renamed to
5146 i386_dr_stopped_data_address.
5147 (i386_low_stopped_by_watchpoint): Renamed to
5148 i386_dr_stopped_by_watchpoint.
5149 * i386-low.c (i386_show_dr): Renamed to
5150 i386_dr_show and made nonstatic. All uses updated.
5151 (i386_length_and_rw_bits): Renamed to
5152 i386_dr_length_and_rw_bits and made nonstatic.
5153 All uses updated.
5154 (i386_insert_aligned_watchpoint): Renamed to
5155 i386_dr_insert_aligned_watchpoint and made nonstatic.
5156 All uses updated.
5157 (i386_remove_aligned_watchpoint): Renamed to
5158 i386_dr_remove_aligned_watchpoint and made nonstatic.
5159 All uses updated.
5160 (i386_update_inferior_debug_regs): Renamed to
5161 i386_dr_update_inferior_debug_regs and made nonstatic.
5162 All uses updated.
5163 (i386_low_insert_watchpoint): Renamed to
5164 i386_dr_insert_watchpoint. All uses updated.
5165 (i386_low_remove_watchpoint): Renamed to
5166 i386_dr_remove_watchpoint. All uses updated.
5167 (i386_low_region_ok_for_watchpoint): Renamed to
5168 i386_dr_region_ok_for_watchpoint. All uses updated.
5169 (i386_low_stopped_data_address): Renamed to
5170 i386_dr_stopped_data_address. All uses updated.
5171 (i386_low_stopped_by_watchpoint): Renamed to
5172 i386_dr_stopped_by_watchpoint. All uses updated.
5173
131aa0d4
GB
51742014-06-18 Gary Benson <gbenson@redhat.com>
5175
5176 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5177 (i386_dr_low_can_set_control): Likewise.
5178 (i386_insert_aligned_watchpoint): New check.
5179
d9305f7f
GB
51802014-06-18 Gary Benson <gbenson@redhat.com>
5181
5182 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5183 Renamed to state.
5184
e927c9fc
GB
51852014-06-18 Gary Benson <gbenson@redhat.com>
5186
5187 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5188 instead of fatal and error.
5189 (i386_handle_nonaligned_watchpoint): Likewise.
5190
1b6d4134
GB
51912014-06-18 Gary Benson <gbenson@redhat.com>
5192
5193 * i386-low.c (i386_get_debug_register_length): New macro.
5194 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5195 (i386_show_dr): Use debug_printf instead of fprintf. Use
5196 phex to format values.
5197
6e62758f
GB
51982014-06-18 Gary Benson <gbenson@redhat.com>
5199
5200 * i386-low.h: Comment changes.
5201 * i386-low.c: Likewise.
5202
fc6e2f03
GB
52032014-06-18 Gary Benson <gbenson@redhat.com>
5204
5205 * i386-low.c: Whitespace changes.
5206
f9d1eeed
TT
52072014-06-12 Tom Tromey <tromey@redhat.com>
5208
5209 * utils.c (freeargv): Remove.
5210
0b04e523
TT
52112014-06-12 Tom Tromey <tromey@redhat.com>
5212
5213 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5214 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5215 (parse_debug_format_options): Likewise.
5216 (gdbserver_usage): Likewise.
5217 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5218 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5219 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5220 against libiberty.
5221 ($(LIBGNU)): Depend on libiberty.
5222 (all-lib): Recurse into all subdirs.
5223 (install-only): Invoke "install" target in subdirs.
5224 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5225 targets.
5226 * configure: Rebuild.
5227 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5228 for vasprintf, vsnprintf, or gettimeofday.
5229 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5230 srv_tgtobj.
5231
270c9937
JB
52322014-06-05 Joel Brobecker <brobecker@adacore.com>
5233
5234 * development.sh: Delete.
5235 * Makefile.in (config.status): Adjust dependency on development.sh.
5236 * configure.ac: Adjust development.sh source call.
5237 * configure: Regenerate.
5238
0a261ed8
PA
52392014-06-02 Pedro Alves <palves@redhat.com>
5240
5241 * ax.c (gdb_free_agent_expr): New function.
5242 * ax.h (gdb_free_agent_expr): New declaration.
5243 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5244 list.
5245 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5246 static.
5247 (clear_breakpoint_conditions_and_commands): New function.
5248 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5249 (clear_breakpoint_conditions_and_commands): New declaration.
5250
e9dae05e
RR
52512014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5252
5253 * linux-aarch64-low.c (asm/ptrace.h): Include.
5254
5876f503
JK
52552014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5256
5257 Fix TLS access for -static -pthread.
5258 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5259 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5260 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5261
802e8e6d
PA
52622014-05-20 Pedro Alves <palves@redhat.com>
5263
5264 * linux-aarch64-low.c (aarch64_insert_point)
5265 (aarch64_remove_point): No longer check whether the type is
5266 supported here. Adjust to new interface.
5267 (the_low_target): Install aarch64_supports_z_point_type as
5268 supports_z_point_type method.
5269 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5270 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5271 instead of a Z packet char. Adjust.
5272 (arm_supports_z_point_type): New function.
5273 (arm_insert_point, arm_remove_point): Adjust to new interface.
5274 (the_low_target): Install arm_supports_z_point_type.
5275 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5276 (cris_insert_point, cris_remove_point): Adjust to new interface.
5277 Don't check whether the type is supported here.
5278 (the_low_target): Install cris_supports_z_point_type.
5279 * linux-low.c (linux_supports_z_point_type): New function.
5280 (linux_insert_point, linux_remove_point): Adjust to new interface.
5281 * linux-low.h (struct linux_target_ops) <insert_point,
5282 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5283 raw_breakpoint pointer parameter.
5284 <supports_z_point_type>: New method.
5285 * linux-mips-low.c (mips_supports_z_point_type): New function.
5286 (mips_insert_point, mips_remove_point): Adjust to new interface.
5287 Use mips_supports_z_point_type.
5288 (the_low_target): Install mips_supports_z_point_type.
5289 * linux-ppc-low.c (the_low_target): Install NULL as
5290 supports_z_point_type method.
5291 * linux-s390-low.c (the_low_target): Install NULL as
5292 supports_z_point_type method.
5293 * linux-sparc-low.c (the_low_target): Install NULL as
5294 supports_z_point_type method.
5295 * linux-x86-low.c (x86_supports_z_point_type): New function.
5296 (x86_insert_point): Adjust to new insert_point interface. Use
5297 insert_memory_breakpoint. Adjust to new
5298 i386_low_insert_watchpoint interface.
5299 (x86_remove_point): Adjust to remove_point interface. Use
5300 remove_memory_breakpoint. Adjust to new
5301 i386_low_remove_watchpoint interface.
5302 (the_low_target): Install x86_supports_z_point_type.
5303 * lynx-low.c (lynx_target_ops): Install NULL as
5304 supports_z_point_type callback.
5305 * nto-low.c (nto_supports_z_point_type): New.
5306 (nto_insert_point, nto_remove_point): Adjust to new interface.
5307 (nto_target_ops): Install nto_supports_z_point_type.
5308 * mem-break.c: Adjust intro comment.
5309 (struct raw_breakpoint) <raw_type, size>: New fields.
5310 <inserted>: Update comment.
5311 <shlib_disabled>: Delete field.
5312 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5313 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5314 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5315 (raw_bkpt_type_to_target_hw_bp_type): New function.
5316 (find_enabled_raw_code_breakpoint_at): New function.
5317 (find_raw_breakpoint_at): New type and size parameters. Use them.
5318 (insert_memory_breakpoint): New function, based off
5319 set_raw_breakpoint_at.
5320 (remove_memory_breakpoint): New function.
5321 (set_raw_breakpoint_at): Reimplement.
5322 (set_breakpoint): New, based on set_breakpoint_at.
5323 (set_breakpoint_at): Reimplement.
5324 (delete_raw_breakpoint): Go through the_target->remove_point
5325 instead of assuming memory breakpoints.
5326 (find_gdb_breakpoint_at): Delete.
5327 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5328 (find_gdb_breakpoint): New function.
5329 (set_gdb_breakpoint_at): Delete.
5330 (z_type_supported): New function.
5331 (set_gdb_breakpoint_1): New function, loosely based off
5332 set_gdb_breakpoint_at.
5333 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5334 (delete_gdb_breakpoint_at): Delete.
5335 (delete_gdb_breakpoint_1): New function, loosely based off
5336 delete_gdb_breakpoint_at.
5337 (delete_gdb_breakpoint): New function.
5338 (clear_gdb_breakpoint_conditions): Rename to ...
5339 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5340 breakpoint.
5341 (add_condition_to_breakpoint): Make static.
5342 (add_breakpoint_condition): Take a struct breakpoint pointer
5343 instead of an address. Adjust.
5344 (gdb_condition_true_at_breakpoint): Rename to ...
5345 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5346 z_type parameter.
5347 (gdb_condition_true_at_breakpoint): Reimplement.
5348 (add_breakpoint_commands): Take a struct breakpoint pointer
5349 instead of an address. Adjust.
5350 (gdb_no_commands_at_breakpoint): Rename to ...
5351 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5352 parameter. Return true if no breakpoint was found. Change debug
5353 output.
5354 (gdb_no_commands_at_breakpoint): Reimplement.
5355 (run_breakpoint_commands): Rename to ...
5356 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5357 and change return type to boolean.
5358 (run_breakpoint_commands): New function.
5359 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5360 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5361 breakpoint. Go through the_target->remove_point instead of
5362 assuming memory breakpoint.
5363 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5364 software and hardware breakpoints.
5365 (reinsert_raw_breakpoint): Go through the_target->insert_point
5366 instead of assuming memory breakpoint.
5367 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5368 software and hardware breakpoints.
5369 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5370 Check both software and hardware breakpoints.
5371 (validate_inserted_breakpoint): Assert the breakpoint is a
5372 software breakpoint. Set the inserted flag to -1 instead of
5373 setting shlib_disabled.
5374 (delete_disabled_breakpoints): Adjust.
5375 (validate_breakpoints): Only validate software breakpoints.
5376 Adjust to inserted flag change.
5377 (check_mem_read, check_mem_write): Skip breakpoint types other
5378 than software breakpoints. Adjust to inserted flag change.
5379 * mem-break.h (enum raw_bkpt_type): New enum.
5380 (raw_breakpoint, struct process_info): Forward declare.
5381 (Z_packet_to_target_hw_bp_type): Delete declaration.
5382 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5383 (set_gdb_breakpoint, delete_gdb_breakpoint)
5384 (clear_breakpoint_conditions): New declarations.
5385 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5386 (breakpoint_inserted_here): Update comment.
5387 (add_breakpoint_condition, add_breakpoint_commands): Replace
5388 address parameter with a breakpoint pointer parameter.
5389 (gdb_breakpoint_here): Update comment.
5390 (delete_gdb_breakpoint_at): Delete.
5391 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5392 * server.c (process_point_options): Take a struct breakpoint
5393 pointer instead of an address. Adjust.
5394 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5395 delete_gdb_breakpoint.
5396 * spu-low.c (spu_target_ops): Install NULL as
5397 supports_z_point_type method.
5398 * target.h: Include mem-break.h.
5399 (struct target_ops) <prepare_to_access_memory>: Update comment.
5400 <supports_z_point_type>: New field.
5401 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5402 instead of a char. Also take a raw breakpoint pointer.
5403 * win32-arm-low.c (the_low_target): Install NULL as
5404 supports_z_point_type.
5405 * win32-i386-low.c (i386_supports_z_point_type): New function.
5406 (i386_insert_point, i386_remove_point): Adjust to new interface.
5407 (the_low_target): Install i386_supports_z_point_type.
5408 * win32-low.c (win32_supports_z_point_type): New function.
5409 (win32_insert_point, win32_remove_point): Adjust to new interface.
5410 (win32_target_ops): Install win32_supports_z_point_type.
5411 * win32-low.h (struct win32_target_ops):
5412 <supports_z_point_type>: New method.
5413 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5414 instead of a char. Also take a raw breakpoint pointer.
5415
932539e3
PA
54162014-05-20 Pedro Alves <palves@redhat.com>
5417
5418 * mem-break.h: Include break-common.h.
5419 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5420 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5421 (Z_packet_to_target_hw_bp_type): New declaration.
5422 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5423 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5424 (Z_PACKET_ACCESS_WP): Delete macros.
5425 (Z_packet_to_hw_type): Delete function.
5426 * i386-low.h: Don't include break-common.h here.
5427 (Z_packet_to_hw_type): Delete declaration.
5428 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5429 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5430 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5431 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5432 * linux-aarch64-low.c: Don't include break-common.h here.
5433 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5434 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5435 (Z_packet_to_target_hw_bp_type): Delete function.
5436 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5437 function.
5438 (mips_insert_point, mips_remove_point): Use
5439 Z_packet_to_target_hw_bp_type.
5440
4ff0d3d8
PA
54412014-05-20 Pedro Alves <palves@redhat.com>
5442
5443 * linux-aarch64-low.c: Include break-common.h.
5444 (enum target_point_type): Delete.
5445 (Z_packet_to_point_type): Rename to ...
5446 (Z_packet_to_target_hw_bp_type): ... this, and return a
5447 target_hw_bp_type instead.
5448 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5449 instead of an enum target_point_type.
5450 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5451 breakpoint type.
5452 (aarch64_dr_state_insert_one_point)
5453 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5454 (aarch64_handle_aligned_watchpoint)
5455 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5456 Take an enum target_hw_bp_type instead of an enum
5457 target_point_type.
5458 (aarch64_supports_z_point_type): New function.
5459 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5460 use Z_packet_to_target_hw_bp_type.
5461
786dc519
JB
54622014-05-20 Joel Brobecker <brobecker@adacore.com>
5463
5464 * configure.ac: Only use -Werror by default when DEVELOPMENT
5465 is true.
5466 * configure: Regenerate.
5467
9e0aa64f
JK
54682014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5469
5470 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5471 * linux-x86-low.c (X86_64_USER_REGS): New.
5472 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5473
2b577b92
YQ
54742014-04-28 Yao Qi <yao@codesourcery.com>
5475
5476 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5477 name.
5478
94611da2
PA
54792014-04-25 Pedro Alves <palves@redhat.com>
5480
5481 PR server/16255
5482 * linux-low.c (linux_attach_fail_reason_string): New function.
5483 (linux_attach_lwp): Delete.
5484 (linux_attach_lwp_1): Rename to ...
5485 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5486 argument. Remove "initial" parameter. Return int instead of
5487 void. Don't error or warn here.
5488 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5489 failure to attach to the tgid. Call warning when failing to
5490 attach to an lwp.
5491 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5492 argument. Remove "initial" parameter. Return int instead of
5493 void. Don't error or warn here.
5494 (linux_attach_fail_reason_string): New declaration.
5495 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5496 interface change. Use linux_attach_fail_reason_string.
5497
01f9f808
MS
54982014-04-24 Michael Sturm <michael.sturm@mintel.com>
5499 Walfred Tedeschi <walfred.tedeschi@intel.com>
5500
5501 * Makefile.in: Added rules to handle new files
5502 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5503 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5504 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5505 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5506 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5507 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5508 x32-avx512-linux.o.
5509 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5510 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5511 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5512 i386/x32-avx512.xml.
5513 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5514 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5515 i386/x32-avx512-linux.xml.
5516 * i387-fp.c (num_avx512_k_registers): New constant for number
5517 of K registers.
5518 (num_avx512_zmmh_low_registers): New constant for number of
5519 lower ZMM registers (0-15).
5520 (num_avx512_zmmh_high_registers): New constant for number of
5521 higher ZMM registers (16-31).
5522 (num_avx512_ymmh_registers): New contant for number of higher
5523 YMM registers (ymm16-31 added by avx521 on x86_64).
5524 (num_avx512_xmm_registers): New constant for number of higher
5525 XMM registers (xmm16-31 added by AVX512 on x86_64).
5526 (struct i387_xsave): Add space for AVX512 registers.
5527 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5528 Add code to handle AVX512 registers.
5529 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5530 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5531 prototypei from generated file.
5532 (tdesc_amd64_avx512_linux): Likewise.
5533 (init_registers_x32_avx512_linux): Likewise.
5534 (tdesc_x32_avx512_linux): Likewise.
5535 (init_registers_i386_avx512_linux): Likewise.
5536 (tdesc_i386_avx512_linux): Likewise.
5537 (x86_64_regmap): Add AVX512 registers.
5538 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5539 mask.
5540 (initialize_low_arch): Add code to initialize AVX512 registers.
5541
51aa91f9
PA
55422014-04-23 Pedro Alves <palves@redhat.com>
5543
5544 * mem-break.c (find_gdb_breakpoint_at): Make static.
5545 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5546
a4165e94
PA
55472014-04-23 Pedro Alves <palves@redhat.com>
5548
5549 * i386-low.c: Don't include break-common.h here.
5550 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5551 prototype to take target_hw_bp_type as argument instead of a Z
5552 packet char.
5553 * i386-low.h: Include break-common.h here.
5554 (Z_packet_to_hw_type): Declare.
5555 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5556 prototypes.
5557 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5558 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5559 (x86_remove_point): Convert the packet number to a
5560 target_hw_bp_type before calling i386_low_remove_watchpoint.
5561 * win32-i386-low.c (i386_insert_point): Convert the packet number
5562 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5563 (i386_remove_point): Convert the packet number to a
5564 target_hw_bp_type before calling i386_low_remove_watchpoint.
5565
b8acf843
PA
55662014-04-23 Pedro Alves <palves@redhat.com>
5567
5568 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5569
d708bcd1
PA
55702014-04-10 Pedro Alves <palves@redhat.com>
5571
5572 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5573 Check if the condition or command is NULL before checking if the
5574 breakpoint is known. On success, return true.
5575 * mem-break.h (add_breakpoint_condition): Document return.
5576 (add_breakpoint_commands): Add describing comment.
5577 * server.c (skip_to_semicolon): New function.
5578 (process_point_options): Use it.
5579
2eec7d5b
PA
55802014-04-09 Pedro Alves <palves@redhat.com>
5581
5582 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5583 to lwpid_of.
5584
fa96cb38
PA
55852014-02-27 Pedro Alves <palves@redhat.com>
5586
5587 PR 12702
5588 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5589 macros.
5590 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5591 output.
5592 (last_thread_of_process_p): Take a PID argument instead of a
5593 thread pointer.
5594 (linux_wait_for_lwp): Delete.
5595 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5596 functions.
5597 (linux_low_filter_event): New function, party factored out from
5598 linux_wait_for_event.
5599 (linux_wait_for_event): Rename to ...
5600 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5601 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5602 sigsuspend. Check for zombie leaders.
5603 (linux_wait_for_event): Reimplement as wrapper around
5604 linux_wait_for_event_filtered.
5605 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5606 a normal or signal exit is seen, it's the whole process exiting.
5607 (wait_for_sigstop): No longer a for_each_inferior callback.
5608 Rewrite on top of linux_wait_for_event_filtered.
5609 (stop_all_lwps): Call wait_for_sigstop directly.
5610 * server.c (resume, handle_target_event): Handle
5611 TARGET_WAITKIND_NO_RESUMED.
5612
d763de10
JB
56132014-02-26 Joel Brobecker <brobecker@adacore.com>
5614
5615 * win32-low.c (psapi_get_dll_name,
5616 * win32_CreateToolhelp32Snapshot): Delete.
5617 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5618 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5619 Delete.
5620 (handle_load_dll): Add function description.
5621 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5622
850a0f76
JB
56232014-02-26 Joel Brobecker <brobecker@adacore.com>
5624
5625 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5626 Add comment.
5627 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5628 base address when calling win32_add_one_solib.
5629 (handle_load_dll): Delete local variable load_addr.
5630 Remove 0x1000 offset applied to DLL base address when calling
5631 win32_add_one_solib.
5632 (handle_unload_dll): Add comment.
5633
f25b3fc3
JB
56342014-02-26 Joel Brobecker <brobecker@adacore.com>
5635
5636 * win32-low.c (win32_add_all_dlls): Renames
5637 win32_ensure_ntdll_loaded. Rewrite function documentation.
5638 Adjust implementation to always load all DLLs.
5639 Add 0x1000 offset to DLL base address when calling
5640 win32_add_one_solib.
5641 (child_initialization_done): New static global.
5642 (do_initial_child_stuff): Set child_initialization_done to
5643 zero during child initialization, and 1 after. Replace call
5644 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5645 Add comment.
5646 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5647 (handle_unload_dll): Add function documentation.
5648 (get_child_debug_event): Ignore load and unload DLL events
5649 during child initialization.
5650
d86d4aaf
DE
56512014-02-20 Doug Evans <dje@google.com>
5652
3bc32da3 5653 Remove global all_lwps.
d86d4aaf
DE
5654 * inferiors.h (ptid_of): Move here from linux-low.h.
5655 (pid_of, lwpid_of): Ditto.
5656 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5657 parameter is a struct thread_info * now.
5658 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5659 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5660 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5661 directly.
5662 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5663 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5664 * linux-arm-low.c (update_registers_callback): Update, "entry"
5665 parameter is a struct thread_info * now.
5666 Fetch lwpid from current_inferior directly.
5667 (arm_insert_point): Pass &all_threads to find_inferior instead of
5668 &all_lwps.
5669 (arm_remove_point): Ditto.
5670 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5671 (arm_prepare_to_resume): Fetch pid from thread.
5672 (arm_read_description): Fetch lwpid from current_inferior directly.
5673 * linux-low.c (all_lwps): Delete.
5674 (delete_lwp): Delete call to remove_inferior.
5675 (handle_extended_wait): Fetch lwpid from thread.
5676 (add_lwp): Don't set lwp->entry.id. Remove call to
5677 add_inferior_to_list.
5678 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5679 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5680 (kill_one_lwp_callback): Ditto.
5681 (linux_kill): Don't dereference NULL pointer.
5682 Fetch ptid,lwpid from thread.
5683 (get_detach_signal): Fetch ptid from thread.
5684 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5685 Simplify call to regcache_invalidate_thread.
5686 (delete_lwp_callback): Update, "entry" parameter is a
5687 struct thread_info * now. Fetch pid from thread.
5688 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5689 (status_pending_p_callback): Update, "entry" parameter is a
5690 struct thread_info * now. Fetch ptid from thread.
5691 (find_lwp_pid): Update, "entry" parameter is a
5692 struct thread_info * now.
5693 (linux_wait_for_lwp): Fetch pid from thread.
5694 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5695 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5696 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5697 (dequeue_one_deferred_signal): Ditto.
5698 (cancel_breakpoint): Fetch ptid from current_inferior.
5699 (linux_wait_for_event): Pass &all_threads to find_inferior,
5700 not &all_lwps. Fetch ptid, lwpid from thread.
5701 (count_events_callback): Update, "entry" parameter is a
5702 struct thread_info * now.
5703 (select_singlestep_lwp_callback): Ditto.
5704 (select_event_lwp_callback): Ditto.
5705 (cancel_breakpoints_callback): Ditto.
5706 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5707 not &all_lwps.
5708 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5709 (unsuspend_one_lwp): Update, "entry" parameter is a
5710 struct thread_info * now.
5711 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5712 not &all_lwps.
5713 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5714 Fetch lwpid from thread, not lwp.
5715 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5716 Pass &all_threads to find_inferior, not &all_lwps.
5717 (send_sigstop): Fetch lwpid from thread, not lwp.
5718 (send_sigstop_callback): Update, "entry" parameter is a
5719 struct thread_info * now.
5720 (suspend_and_send_sigstop_callback): Ditto.
5721 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5722 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5723 struct thread_info * now.
5724 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5725 from thread, lwp.
5726 (lwp_running): Update, "entry" parameter is a
5727 struct thread_info * now.
5728 (stop_all_lwps): Fetch ptid from thread.
5729 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5730 (linux_resume_one_lwp): Fetch lwpid from thread.
5731 (linux_set_resume_request): Update, "entry" parameter is a
5732 struct thread_info * now. Fetch pid, lwpid from thread.
5733 (resume_status_pending_p): Update, "entry" parameter is a
5734 struct thread_info * now.
5735 (need_step_over_p): Ditto. Fetch lwpid from thread.
5736 (start_step_over): Fetch lwpid from thread.
5737 (linux_resume_one_thread): Update, "entry" parameter is a
5738 struct thread_info * now. Fetch lwpid from thread.
5739 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5740 (proceed_one_lwp): Update, "entry" parameter is a
5741 struct thread_info * now. Fetch lwpid from thread.
5742 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5743 struct thread_info * now.
5744 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5745 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5746 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5747 directly.
5748 (regsets_store_inferior_registers): Ditto.
5749 (fetch_register, store_register): Ditto.
5750 (linux_read_memory, linux_write_memory): Ditto.
5751 (linux_request_interrupt): Ditto.
5752 (linux_read_auxv): Ditto.
5753 (linux_xfer_siginfo): Ditto.
5754 (linux_qxfer_spu): Ditto.
5755 (linux_qxfer_libraries_svr4): Ditto.
5756 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5757 moved to inferiors.h.
5758 (get_lwp): Delete.
5759 (get_thread_lwp): Update.
5760 (struct lwp_info): Delete member "entry". Simplify comment for
5761 member "thread".
5762 (all_lwps): Delete.
5763 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5764 current_inferior directly.
5765 (update_watch_registers_callback): Update, "entry" parameter is a
5766 struct thread_info * now. Fetch pid from thread.
5767 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5768 (mips_insert_point): Fetch lwpid from current_inferior.
5769 Pass &all_threads to find_inferior, not &all_lwps.
5770 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5771 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5772 directly.
5773 (mips_stopped_data_address): Ditto.
5774 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5775 directly.
5776 * linux-tile-low.c (tile_arch_setup): Ditto.
5777 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5778 (update_debug_registers_callback): Update, "entry" parameter is a
5779 struct thread_info * now. Fetch pid from thread.
5780 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5781 Pass &all_threads to find_inferior, not &all_lwps.
5782 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5783 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5784 Pass &all_threads to find_inferior, not &all_lwps.
5785 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5786 (i386_dr_low_get_status): Ditto.
5787 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5788 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5789 (x86_linux_read_description): Ditto.
5790 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5791
3b8361aa
DE
57922014-02-20 Doug Evans <dje@google.com>
5793
5794 * inferiors.c (get_first_inferior): Fix buglet.
5795
f7667f0d
DE
57962014-02-19 Doug Evans <dje@google.com>
5797
5798 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5799 * inferiors.c (add_thread): Change result type to struct thread_info *.
5800 All callers updated.
5801 (add_lwp): Call add_thread here instead of in callers.
5802 All callers updated.
5803 * linux-low.h (get_lwp_thread): Rewrite.
5804 (struct lwp_info): New member "thread".
5805
b3312d80
DE
58062014-02-19 Doug Evans <dje@google.com>
5807
5808 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5809 All callers updated.
5810
ecc6f45c
DE
58112014-02-19 Doug Evans <dje@google.com>
5812
5813 * inferiors.c (add_thread): Fix whitespace.
5814
649ebbca
DE
58152014-02-19 Doug Evans <dje@google.com>
5816
5817 * dll.c (clear_dlls): Replace accessing list implemention details
5818 with API function.
5819 * gdbthread.h (get_first_thread): Declare.
5820 * inferiors.c (for_each_inferior_with_data): New function.
5821 (get_first_thread): New function.
5822 (find_thread_ptid): Simplify.
5823 (get_first_inferior): New function.
5824 (clear_list): Delete.
5825 (one_inferior_p): New function.
5826 (clear_inferior_list): New function.
5827 (clear_inferiors): Update.
5828 * inferiors.h (for_each_inferior_with_data): Declare.
5829 (clear_inferior_list): Declare.
5830 (one_inferior_p): Declare.
5831 (get_first_inferior): Declare.
5832 * linux-low.c (linux_wait_for_event): Replace accessing list
5833 implemention details with API function.
5834 * server.c (target_running): Ditto.
5835 (accumulate_file_name_length): New function.
5836 (emit_dll_description): New function.
5837 (handle_qxfer_libraries): Replace accessing list implemention
5838 details with API function.
5839 (handle_qxfer_threads_worker): New function.
5840 (handle_qxfer_threads_proper): Replace accessing list implemention
5841 details with API function.
5842 (handle_query): Ditto.
5843 (visit_actioned_threads_callback_ftype): New typedef.
5844 (visit_actioned_threads_data): New struct.
5845 (visit_actioned_threads): Rewrite to be find_inferior callback.
5846 (resume): Call find_inferior.
5847 (handle_status): Replace accessing list implemention
5848 details with API function.
5849 (process_serial_event): Replace accessing list implemention details
5850 with API function.
5851 * target.c (set_desired_inferior): Replace accessing list implemention
5852 details with API function.
5853 * tracepoint.c (same_process_p): New function.
5854 (gdb_agent_about_to_close): Replace accessing list implemention
5855 details with API function.
5856 * win32-low.c (child_delete_thread): Replace accessing list
5857 implemention details with API function.
5858 (match_dll_by_basename): New function.
5859 (dll_is_loaded_by_basename): New function.
5860 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5861 details call to dll_is_loaded_by_basename.
5862
80894984
DE
58632014-02-19 Doug Evans <dje@google.com>
5864
5865 * dll.h (struct dll_info): Add comment.
5866 * gdbthread.h (struct thread_info): Add comment.
5867 (current_ptid): Simplify.
5868 * inferiors.c (add_process): Update.
5869 (remove_process): Update.
5870 * inferiors.h (struct process_info): Rename member "head" to "entry".
5871 * linux-low.c (delete_lwp): Update.
5872 (add_lwp): Update.
5873 (last_thread_of_process_p): Update.
5874 (kill_one_lwp_callback, linux_kill): Update.
5875 (status_pending_p_callback): Update.
5876 (wait_for_sigstop): Update. Simplify read of ptid.
5877 (start_step_over): Update.
5878 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5879 (get_lwp_thread): Update.
5880 (struct lwp_info): Rename member "head" to "entry".
5881 * regcache.h (inferior_list_entry): Delete.
5882 * server.c (kill_inferior_callback): Update.
5883 (detach_or_kill_inferior_callback): Update.
5884 (print_started_pid): Update.
5885 (print_attached_pid): Update.
5886 (process_serial_event): Simplify read of ptid.
5887 * thread-db.c (thread_db_create_event): Update.
5888 (thread_db_get_tls_address): Update.
5889 * win32-low.c (current_inferior_ptid): Simplify.
5890
46917d26
TT
58912014-02-19 Tom Tromey <tromey@redhat.com>
5892
5893 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5894 argument.
5895 (target_supports_btrace): Update.
5896
0759a81e
YQ
58972014-02-14 Yao Qi <yao@codesourcery.com>
5898
5899 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5900 (rsp-low-ipa.o): New target.
5901
a7191e8b
TT
59022014-02-12 Tom Tromey <tromey@redhat.com>
5903
5904 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5905 convert_ascii_to_int.
5906 * regcache.c (registers_to_string): Likewise.
5907 * remote-utils.c (decode_M_packet): Likewise.
5908 * server.c (process_serial_event): Likewise.
5909
ff0e980e
TT
59102014-02-12 Tom Tromey <tromey@redhat.com>
5911
5912 * server.c (handle_query, handle_v_run): Use hex2bin, not
5913 unhexify.
5914 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5915
e9371aff
TT
59162014-02-12 Tom Tromey <tromey@redhat.com>
5917
5918 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5919 convert_int_to_ascii.
5920 * regcache.c (registers_to_string, collect_register_as_string):
5921 Likewise.
5922 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5923 Likewise.
5924 * server.c (process_serial_event): Likewise.
5925 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5926 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5927
971dc0b8
TT
59282014-02-12 Tom Tromey <tromey@redhat.com>
5929
5930 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5931 bin2hex, not hexify.
5932 * tracepoint.c (cmd_qtstatus): Likewise.
5933
0a822afb
TT
59342014-02-12 Tom Tromey <tromey@redhat.com>
5935
5936 * remote-utils.c (monitor_output): Pass explicit length to
5937 hexify.
5938
9c3d6531
TT
59392014-02-12 Tom Tromey <tromey@redhat.com>
5940
5941 * tracepoint.c: Include rsp-low.h.
5942 * server.c: Include rsp-low.h.
5943 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5944 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5945 declare.
5946 * remote-utils.c: Include rsp-low.h.
5947 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5948 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5949 (convert_int_to_ascii, convert_ascii_to_int): Move to
5950 common/rsp-low.c.
5951 * regcache.c: Include rsp-low.h.
5952 * ax.c: Include rsp-low.h.
5953 * Makefile.in (SFILES): Add common/rsp-low.c.
5954 (OBS): Add rsp-low.o.
5955 (rsp-low.o): New target.
5956
01fd3ea5
TT
59572014-02-12 Tom Tromey <tromey@redhat.com>
5958
5959 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5960 Include print-utils.h.
5961 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5962 (plongest, thirty_two, phex_nz): Remove.
5963 * Makefile.in (SFILES): Add common/print-utils.c.
5964 (OBS): Add print-utils.o.
5965 (print-utils-ipa.o): New target.
5966 (print-utils.o): New target.
5967 (IPA_OBJS): Add print-utils-ipa.o.
5968
e99dc820
TT
59692014-02-06 Tom Tromey <tromey@redhat.com>
5970
5971 * Makefile.in (SFILES): Fix indentation.
5972
ee1e2d4f
DE
59732014-02-05 Doug Evans <dje@google.com>
5974
5975 * linux-low.c (linux_wait_for_event): Improve comment.
5976 (linux_wait_1): Keep current_inferior in sync with event_child.
5977
f5a02773
DE
59782014-01-22 Doug Evans <dje@google.com>
5979
5980 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5981
87ce2a04
DE
59822014-01-22 Doug Evans <dje@google.com>
5983
5984 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5985 * configure: Regenerate.
5986 * config.in: Regenerate.
5987 * Makefile.in (SFILES): Add debug.c.
5988 (OBS): Add debug.o.
5989 * debug.c: New file.
5990 * debug.h: New file.
5991 * linux-aarch64-low.c (*): Update all debugging printfs to use
5992 debug_printf instead of fprintf.
5993 * linux-arm-low.c (*): Ditto.
5994 * linux-cris-low.c (*): Ditto.
5995 * linux-crisv32-low.c (*): Ditto.
5996 * linux-m32r-low.c (*): Ditto.
5997 * linux-sparc-low.c (*): Ditto.
5998 * linux-x86.c (*): Ditto.
5999 * linux-low.c (*): Ditto.
6000 (linux_wait_1): Add calls to debug_enter, debug_exit.
6001 (linux_wait): Remove redundant debugging printf.
6002 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6003 (linux_resume, unstop_all_lwps): Ditto.
6004 * mem-break.c (*): Update all debugging printfs to use
6005 debug_printf instead of fprintf.
6006 * remote-utils.c (*): Ditto.
6007 * thread-db.c (*): Ditto.
6008 * server.c #include <ctype.h>, "gdb_vecs.h".
6009 (debug_threads): Moved to debug.c.
6010 (*): Update all debugging printfs to use debug_printf instead of
6011 fprintf.
6012 (start_inferior): Replace call to fflush with call to debug_flush.
6013 (monitor_show_help): Mention set debug-format.
6014 (parse_debug_format_options): New function.
6015 (handle_monitor_command): Handle "monitor set debug-format".
6016 (gdbserver_usage): Mention --debug-format.
6017 (main): Parse --debug-format.
6018 * server.h (debug_threads): Declaration moved to debug.h.
6019 #include "debug.h".
6020 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6021 trace_debug_1 that uses debug_printf.
6022 (tracepoint_look_up_symbols): Update all debugging printfs to use
6023 debug_printf instead of fprintf.
6024
e671835b
BS
60252014-01-20 Baruch Siach <baruch@tkos.co.il>
6026
6027 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6028 sys/ptrace.h.
6029
b5737fa9
PA
60302014-01-17 Pedro Alves <palves@redhat.com>
6031
ea38d2a9 6032 PR build/16445
c7faa97a
PA
6033 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6034 defined after including gdb_proc_service.h.
b5737fa9 6035
40ed484e
DE
60362014-01-16 Doug Evans <dje@google.com>
6037
6038 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6039 (match_dll): Use it.
6040
969c39fb
MM
60412014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6042
6043 * target.h (target_ops) <read_btrace>: Change parameters and
6044 return type to allow error reporting.
6045 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6046 trace reading errors on.
6047 * linux-low.c (linux_low_read_btrace): Pass trace reading
6048 errors on.
6049 (linux_low_disable_btrace): New.
6050
ab7f45ba
DE
60512014-01-15 Doug Evans <dje@google.com>
6052
6053 * inferiors.c (thread_id_to_gdb_id): Delete.
6054 * inferiors.h (thread_id_to_gdb_id): Delete.
6055
66af0f44
EZ
60562014-01-13 Eli Zaretskii <eliz@gnu.org>
6057
6058 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6059 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6060 versions.
6061
9939e131
PA
60622014-01-08 Pedro Alves <palves@redhat.com>
6063
6064 * server.c (handle_status): Don't discard previous queued stop
6065 replies or thread's pending status here.
6066 (main) <disconnection>: Do it here instead.
6067
b7ea362b
PA
60682014-01-08 Pedro Alves <palves@redhat.com>
6069
6070 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6071 * server.c (visit_actioned_threads, handle_pending_status): New
6072 function.
6073 (handle_v_cont): Factor out parts to ...
6074 (resume): ... this new function. If in all-stop, and a thread
6075 being resumed has a pending status, report it without actually
6076 resuming.
6077 (myresume): Adjust to use the new 'resume' function.
6078 (clear_pending_status_callback, set_pending_status_callback)
6079 (find_status_pending_thread_callback): New functions.
6080 (handle_status): Handle the case of multiple threads having
6081 interesting statuses to report. Report threads' real last signal
6082 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6083 with an interesting thread to report the status for, instead of
6084 always reporting the status of the first thread.
6085
28498c42
JB
60862014-01-01 Joel Brobecker <brobecker@adacore.com>
6087
6088 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6089 * gdbreplay.c (gdbreplay_version): Likewise.
6090
f45c82da
YZ
60912013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6092
6093 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6094 iov.iov_len with the real length in use.
6095
379a5e2d
JB
60962013-12-13 Joel Brobecker <brobecker@adacore.com>
6097
6098 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6099 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6100 for all targets that use win32-low.c.
6101 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6102 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6103
4210d83e
PA
61042013-12-13 Pedro Alves <palves@redhat.com>
6105
6106 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6107 if equal to TARGET_WAITKIND_LOADED.
6108 * win32-low.c (cached_status): New static global.
6109 (win32_wait): Add declaration.
6110 (do_initial_child_stuff): Flush all initial pending debug events
6111 up to the initial breakpoint.
6112 (win32_wait): If CACHED_STATUS was set, return that instead
6113 of doing a real wait. Remove the code resuming the execution
6114 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6115 during the initial phase. Also remove the code changing
6116 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6117 TARGET_WAITKIND_STOPPED.
6118
e7f0d979
YQ
61192013-12-11 Yao Qi <yao@codesourcery.com>
6120
6121 * notif.c (handle_notif_ack): Return 0 if no notification
6122 matches.
6123
ebcf782c
DE
61242013-11-20 Doug Evans <dje@google.com>
6125
6126 * linux-low.c (linux_set_resume_request): Fix comment.
6127
20ad9378
DE
61282013-11-20 Doug Evans <dje@google.com>
6129
6130 * linux-low.c (resume_status_pending_p): Tweak comment.
6131
a196ebeb
WT
61322013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6133
6134 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6135 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6136 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6137 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6138 (srv_amd64_regobj): Add amd64-mpx.o.
6139 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6140 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6141 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6142 * i387-fp.c (num_pl_bnd_register) Added constant.
6143 (num_pl_bnd_cfg_registers) Added constant.
6144 (struct i387_xsave) Added reserved area and MPX fields.
6145 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6146 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6147 function.
6148 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6149 (init_registers_amd64_mpx_linux): Declare new function.
6150 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6151 (x86_64_regmap): Add MPX registers.
6152 (x86_linux_read_description): Add MPX case.
6153 (initialize_low_arch): Initialize MPX targets.
6154
0080a2f6
TT
61552013-11-18 Tom Tromey <tromey@redhat.com>
6156
6157 * configure: Rebuild.
6158 * configure.ac: Don't check for stdlib.h.
6159 * gdbreplay.c: Unconditionally include stdlib.h.
6160
2978b111
TT
61612013-11-18 Tom Tromey <tromey@redhat.com>
6162
6163 * config.in: Rebuild.
6164 * configure: Rebuild.
6165 * configure.ac: Don't use AC_HEADER_DIRENT.
6166
a3d08894
TT
61672013-11-18 Tom Tromey <tromey@redhat.com>
6168
6169 * server.h: Don't check HAVE_STRING_H.
6170 * gdbreplay.c: Don't check HAVE_STRING_H.
6171 * configure: Rebuild.
6172
0a5dd17d
TT
61732013-11-18 Tom Tromey <tromey@redhat.com>
6174
6175 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6176 LIBGNU.
6177
1bd2f0ba
TT
61782013-11-08 Tom Tromey <tromey@redhat.com>
6179
6180 * configure, config.in: Rebuild.
6181 * configure.ac: Remove unused configury.
6182
3266f10b
TT
61832013-11-08 Tom Tromey <tromey@redhat.com>
6184
6185 * acinclude.m4: Include common.m4, codeset.m4.
6186 * configure, config.in: Rebuild.
6187 * configure.ac: Use GDB_AC_COMMON.
6188
6682d959
AA
61892013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6190
6191 * linux-s390-low.c (HWCAP_S390_TE): New define.
6192 (s390_arch_setup): Consider the TE field in the HWCAP for
6193 determining 'have_regset_tdb'.
6194
fd0a4d76
SDJ
61952013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6196
6197 PR gdb/16014
6198 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6199 call to sizeof.
6200
1a3d890b
PA
62012013-10-02 Pedro Alves <palves@redhat.com>
6202
6203 * server.c (process_serial_event): Don't output "GDBserver
6204 exiting" if GDB is connected through stdio.
6205 * target.c (mywait): Likewise, be silent if GDB is connected
6206 through stdio.
6207
97ad4581
JB
62082013-10-01 Joel Brobecker <brobecker@adacore.com>
6209
6210 * lynx-low.c (lynx_add_threads_after_attach): New function.
6211 (lynx_attach): Remove call to add_thread. Add call to
6212 lynx_add_threads_after_attach instead.
6213
5b4e221c
MF
62142013-09-28 Mike Frysinger <vapier@gentoo.org>
6215
6216 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6217 * config.in, configure: Regenerated.
6218
ee47b2f8
YQ
62192013-09-18 Yao Qi <yao@codesourcery.com>
6220
6221 PR server/15959
6222 * server.c (start_inferior): Clear 'resume_info'.
6223
d6707650 62242013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6225
d6707650
JW
6226 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6227 for each register.
6228
9243dd0e 62292013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6230
9243dd0e
JW
6231 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6232 linux-tile-low.o to srv_tgtobj.
6233
c623a6ef
WN
62342013-09-16 Will Newton <will.newton@linaro.org>
6235
6236 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6237 out regs.
6238
fb71d39e
PA
62392013-09-06 Pedro Alves <palves@redhat.com>
6240
6241 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6242 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6243 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6244 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6245 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6246 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6247
8e7e9910
PA
62482013-09-06 Pedro Alves <palves@redhat.com>
6249
6250 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6251 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6252
7c3a12ca
PA
62532013-09-06 Pedro Alves <palves@redhat.com>
6254
6255 * linux-amd64-ipa.c: Include tracepoint.h.
6256 * linux-i386-ipa.c: Include tracepoint.h.
6257
8eb3d7b6
RW
62582013-09-06 Ricard Wanderlof <ricardw@axis.com>
6259
6260 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6261 (ps_get_thread_area): New function.
6262
eddddb9d
RW
62632013-09-06 Ricard Wanderlof <ricardw@axis.com>
6264
6265 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6266 (initialize_low_arch): Call init_registers_crisv32 rather than
6267 init_register_crisv32.
6268
533b0600
PA
62692013-09-05 Pedro Alves <palves@redhat.com>
6270
6271 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6272 to ...
6273 * hostio.h: ... this new file.
6274 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6275 win32-low.c: Include hostio.h.
6276
0ce3d3b5
PA
62772013-09-05 Pedro Alves <palves@redhat.com>
6278
6279 * server.h (gdb_client_data, handler_func, callback_handler_func)
6280 (delete_file_handler, add_file_handler, append_callback_event)
6281 (delete_callback_event, start_event_loop, initialize_event_loop):
6282 Move to event-loop.h and include it.
6283 * event-loop.h: New file.
6284
799cdc37
PA
62852013-09-05 Pedro Alves <palves@redhat.com>
6286
6287 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6288 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6289 (loaded_dll, unloaded_dll): Move to ...
6290 * dll.h: ... this new file.
6291 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6292
6a6bbd9d
PA
62932013-09-05 Pedro Alves <palves@redhat.com>
6294
6295 * server.h (current_process, get_thread_process, all_processes)
6296 (add_inferior_to_list, for_each_inferior, current_inferior)
6297 (remove_inferior, add_process, remove_process, find_process_pid)
6298 (have_started_inferiors_p, have_attached_inferiors_p)
6299 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6300 (clear_inferiors, find_inferior, find_inferior_id)
6301 (inferior_target_data, set_inferior_target_data)
6302 (inferior_regcache_data, set_inferior_regcache_data): Move to
6303 inferiors.h, and include it.
6304 * inferiors.h: New file.
6305
f699aaba
PA
63062013-09-05 Pedro Alves <palves@redhat.com>
6307
6308 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6309 Move ...
72f4393d 6310 * ax.h: ... here.
f699aaba 6311
c144c7a0
PA
63122013-09-05 Pedro Alves <palves@redhat.com>
6313
6314 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6315 tracepoint.h.
6316 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6317 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6318 (handle_tracepoint_general_set, handle_tracepoint_query)
6319 (tracepoint_finished_step, tracepoint_was_hit)
6320 (release_while_stepping_state_list, current_traceframe)
6321 (in_readonly_region, traceframe_read_mem)
6322 (fetch_traceframe_registers, traceframe_read_sdata)
6323 (traceframe_read_info, struct fast_tpoint_collect_status)
6324 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6325 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6326 (supply_fast_tracepoint_registers)
6327 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6328 (ipa_tdesc, claim_trampoline_space)
6329 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6330 (agent_mem_read, agent_get_trace_state_variable_value)
6331 (agent_set_trace_state_variable_value, agent_tsv_read)
6332 (agent_mem_read_string, get_raw_reg_func_addr)
6333 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6334 * tracepoint.h: ... this new file.
6335
ff42e6ab
PA
63362013-09-05 Pedro Alves <palves@redhat.com>
6337
6338 * server.h (perror_with_name, error, fatal, warning, paddress)
6339 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6340 include it.
6341 * utils.h: New file.
6342
541af0f4
PA
63432013-09-05 Pedro Alves <palves@redhat.com>
6344
6345 * server.h (remote_debug, noack_mode, transport_is_reliable)
6346 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6347 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6348 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6349 (write_enn, initialize_async_io, enable_async_io)
6350 (disable_async_io, check_remote_input_interrupt_request)
6351 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6352 (dead_thread_notify, prepare_resume_reply)
6353 (decode_address_to_semicolon, decode_address, decode_m_packet)
6354 (decode_M_packet, decode_X_packet, decode_xfer_write)
6355 (decode_search_memory_packet, unhexify, hexify)
6356 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6357 (look_up_one_symbol, relocate_instruction)
6358 (monitor_output): Move to remote-utils.h, and include it.
6359 * remote-utils.h: New file.
6360
eebdf26b
PA
63612013-09-05 Pedro Alves <palves@redhat.com>
6362
6363 * server.h (_): Delete.
6364
3aafd2ff
PA
63652013-09-02 Pedro Alves <palves@redhat.com>
6366
6367 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6368 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6369 allocated.
6370 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6371
cee83bcb
PM
63722013-09-02 Pierre Muller <muller@sourceware.org>
6373
6374 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6375 or WriteProcessMemory complete successfully and handle
6376 ERROR_PARTIAL_COPY error.
6377
9a13b2fa
PA
63782013-09-02 Pedro Alves <palves@redhat.com>
6379
6380 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6381 error instead of EIO.
6382
602e3198
JK
63832013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6384
6385 PR server/15604
6386 * linux-low.c: Include filestuff.h.
6387 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6388 * lynx-low.c: Include filestuff.h.
6389 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6390 * server.c: Include filestuff.h.
6391 (main): Call notice_open_fds.
6392 * spu-low.c: Include filestuff.h.
6393 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6394
96d7229d
LM
63952013-08-22 Luis Machado <lgustavo@codesourcery.com>
6396
6397 * Makefile.in: Explain why ../target and ../nat are not
6398 listed as include file search paths.
6399 (linux-waitpid.o): New object file rule.
6400 * configure.srv (srv_native_linux_obj): New variable.
6401 Replace all occurrences of linux native object files with
6402 $srv_native_linux_obj.
6403 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6404 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6405 (linux_enable_event_reporting): Remove declaration.
6406 (my_waitpid): Moved to common/linux-waitpid.c.
6407 (linux_wait_for_event): Pass ptid when calling
6408 linux_enable_event_reporting.
6409 (linux_supports_tracefork_flag): Remove.
6410 (linux_enable_event_reporting): Likewise.
6411 (linux_tracefork_grandchild): Remove.
6412 (STACK_SIZE): Moved to common/linux-ptrace.c.
6413 (linux_tracefork_child): Remove.
6414 (linux_test_for_tracefork): Remove.
6415 (linux_look_up_symbols): Call linux_supports_traceclone.
6416 (initialize_low): Remove call to linux_test_for_tracefork.
6417 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6418 common/linux-ptrace.h.
6419 (PTRACE_TYPE_ARG4): Likewise.
6420 Include linux-ptrace.h.
6421
32940073
PA
64222013-08-21 Pedro Alves <palves@redhat.com>
6423
6424 * config.in: Renegerate.
6425
33b60d58 64262013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6427
33b60d58
LM
6428 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6429 (SFILES): Remove $(srcdir)/common/target-common.c and
6430 add $(srcdir)/target/waitstatus.c.
6431 (OBS): Remove target-common.o and add waitstatus.o.
6432 (server_h): Remove $(srcdir)/../common/target-common.h and
6433 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6434 and $(srcdir)/../target/waitstatus.h.
6435 (target-common.o): Remove.
6436 (waitstatus.o): New target object file.
6437 * target.h: Do not include target-common.h and
6438 include target/resume.h, target/wait.h and
6439 target/waitstatus.h.
6440
b8e1b30e
LM
64412013-08-13 Luis Machado <lgustavo@codesourcery.com>
6442
6443 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6444 to PTRACE_TYPE_ARG3.
6445 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6446 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6447 PTRACE_TYPE_ARG4.
6448 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6449 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6450
7a60ad40
YQ
64512013-07-27 Jie Zhang <jie@codesourcery.com>
6452 Daniel Jacobowitz <dan@codesourcery.com>
6453 Yao Qi <yao@codesourcery.com>
6454
6455 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6456 (mips-linux-watch.o): New rule.
6457 (mips_linux_watch_h): New variable.
6458 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6459 srv_tgtobj.
6460 * linux-mips-low.c: Include mips-linux-watch.h.
6461 (struct arch_process_info, struct arch_lwp_info): New.
6462 (update_watch_registers_callback): New function.
6463 (mips_linux_new_process, mips_linux_new_thread) New functions.
6464 (mips_linux_prepare_to_resume, mips_insert_point): New
6465 functions.
6466 (mips_remove_point, mips_stopped_by_watchpoint): New
6467 functions.
6468 (rsp_bp_type_to_target_hw_bp_type): New function.
6469 (mips_stopped_data_address): New function.
6470 (the_low_target): Add watchpoint support functions.
6471
de6f69ad
YQ
64722013-07-27 Yao Qi <yao@codesourcery.com>
6473
6474 * i386-low.c: Include break-common.h.
6475 (enum target_hw_bp_type): Remove.
6476
3360c0bf
LM
64772013-07-24 Luis Machado <lgustavo@codesourcery.com>
6478
6479 * Makefile.in (SFILES): /common/target-common.c.
6480 (OBS): Add target-common.o.
6481 (server_h): Add $(srcdir)/../common/target-common.h.
6482 (target-common.o): New target.
6483 * server.c (queue_stop_reply_callback): Free
6484 status string after use.
6485 * target.c (target_waitstatus_to_string): Remove.
6486 * target.h: Include target-common.h.
6487 (resume_kind): Likewise.
6488 (target_waitkind): Likewise.
6489 (target_waitstatus): Likewise.
6490 (TARGET_WNOHANG): Likewise.
6491
bd885420
YQ
64922013-07-04 Yao Qi <yao@codesourcery.com>
6493
6494 * Makefile.in (host_alias): Use @host_noncanonical@.
6495 (target_alias): Use @target_noncanonical@.
6496 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6497 ACX_NONCANONICAL_HOST.
6498 * configure: Regenerated.
6499
6500 Revert:
6501 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6502
6503 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6504 * configure: Rebuild.
6505 * Makefile.in (version_host, version_target): Get from configure.
6506 (version.c): Use $(version_host) and $(version_target).
6507
17ef446e
PA
65082013-07-03 Pedro Alves <palves@redhat.com>
6509
6510 * Makefile.in (config.status): Depend on development.sh.
6511 * acinclude.m4: Include libmcheck.m4.
6512 * configure: Regenerate.
6513
7a9a7487
MG
65142013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6515
6516 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6517 attribute inside the parentheses.
6518 (winapi_DebugSetProcessKillOnExit): Ditto.
6519 (winapi_DebugBreakProcess): Ditto.
6520 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6521
49b64de6
MG
65222013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6523
6524 * notif.h (notif_event): Add a dummy member to avoid compiler
6525 errors.
6526
d5749ee7
PA
65272013-07-01 Pedro Alves <palves@redhat.com>
6528
6529 * hostio.c (HOSTIO_PATH_MAX): Define.
6530 (require_filename, handle_open, handle_unlink, handle_readlink):
6531 Use it.
6532
d8d2a3ee
PA
65332013-07-01 Pedro Alves <palves@redhat.com>
6534
6535 * server.h: Include "pathmax.h".
6536 * linux-low.c: Don't include sys/param.h.
6537 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6538 MAXPATHLEN.
6539 * win32-low.c: Don't include sys/param.h.
6540 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6541
bc7dea8d
PA
65422013-07-01 Pedro Alves <palves@redhat.com>
6543
6544 * event-loop.c: Don't check HAVE_UNISTD_H before including
6545 <unistd.h>.
6546 * gdbreplay.c: Likewise.
6547 * remote-utils.c: Likewise.
6548 * server.c: Likewise.
6549 * configure.ac: Don't check for unistd.h.
6550 * configure: Regenerate.
6551
d6c2da54
TT
65522013-06-28 Tom Tromey <tromey@redhat.com>
6553
6554 * Makefile.in (version.c): Use version.in, not
6555 common/version.in.
6556
257b6bec
MG
65572013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6558
6559 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6560 * configure: Rebuild.
6561 * Makefile.in (version_host, version_target): Get from configure.
6562 (version.c): Use $(version_host) and $(version_target).
6563
86ebe149
DK
65642013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6565
6566 Fix trace-status to output user name without trailing colon.
6567 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6568
f30aa5af
DK
65692013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6570
6571 Fix trace-status to output proper start-time and stop-time.
6572 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6573 output start time and stop time in hex as gdb expects.
6574
28a93511
YQ
65752013-06-26 Pedro Alves <pedro@codesourcery.com>
6576
6577 * tracepoint.c (build_traceframe_info_xml): Output trace state
6578 variables present in the trace buffer.
6579
01208463
TT
65802013-06-24 Tom Tromey <tromey@redhat.com>
6581
6582 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6583 create-version.sh.
6584 (version.o): Remove.
6585 * gdbreplay.c: Include version.h.
6586 (version, host_name): Don't declare.
6587 * server.h: Include version.h.
6588 (version, host_name): Don't declare.
6589
760256f9
PA
65902013-06-12 Pedro Alves <palves@redhat.com>
6591
6592 * linux-x86-low.c (linux_is_elf64): Delete global.
6593 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6594 with local linux_pid_exe_is_elf_64_file use.
6595
030031ee
PA
65962013-06-11 Pedro Alves <palves@redhat.com>
6597
6598 * linux-low.c (regset_disabled, disable_regset): New functions.
6599 (regsets_fetch_inferior_registers)
6600 (regsets_store_inferior_registers): Use them.
6601 (initialize_regsets_info); Don't allocate the disabled_regsets
6602 array here.
6603 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6604 comment.
6605
5da6eb0a
PA
66062013-06-11 Pedro Alves <palves@redhat.com>
6607
6608 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6609 xmalloc.
6610
7e5aaa09
PA
66112013-06-11 Pedro Alves <palves@redhat.com>
6612
6613 * linux-x86-low.c (initialize_low_arch): Call
6614 init_registers_x32_avx_linux.
6615
d878444c
JK
66162013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6617
6618 Fix compatibility with Android Bionic.
6619 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6620 it is not empty.
6621
3aee8918
PA
66222013-06-07 Pedro Alves <palves@redhat.com>
6623
5f2b57b5 6624 PR server/14823
3aee8918
PA
6625 * Makefile.in (OBS): Add tdesc.o.
6626 (IPA_OBJS): Add tdesc-ipa.o.
6627 (tdesc-ipa.o): New rule.
6628 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6629 interface.
6630 * linux-low.c (new_inferior): Delete.
6631 (disabled_regsets, num_regsets): Delete.
6632 (linux_add_process): Adjust to set the new per-process
6633 new_inferior flag.
6634 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6635 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6636 was a stop. When calling arch_setup, switch the current inferior
6637 to the thread that got an event.
6638 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6639 (regsets_fetch_inferior_registers)
6640 (regsets_store_inferior_registers): New regsets_info parameter.
6641 Adjust to use it.
6642 (linux_register_in_regsets): New regs_info parameter. Adjust to
6643 use it.
6644 (register_addr, fetch_register, store_register): New usrregs_info
6645 parameter. Adjust to use it.
6646 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6647 parameter regs_info. Adjust to use it.
6648 (linux_fetch_registers): Get the current inferior's regs_info, and
6649 adjust to use it.
6650 (linux_store_registers): Ditto.
6651 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6652 (initialize_low): Don't initialize the target_regsets here. Call
6653 initialize_low_arch.
6654 * linux-low.h (target_regsets): Delete declaration.
6655 (struct regsets_info): New.
6656 (struct usrregs_info): New.
6657 (struct regs_info): New.
6658 (struct process_info_private) <new_inferior>: New field.
6659 (struct linux_target_ops): Delete the num_regs, regmap, and
6660 regset_bitmap fields. New field regs_info.
6661 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6662 * i387-fp.c (num_xmm_registers): Delete.
6663 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6664 calls to new interface.
6665 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6666 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6667 Infer the number of xmm registers from the regcache's target
6668 description.
6669 * i387-fp.h (num_xmm_registers): Delete.
6670 * inferiors.c (add_thread): Don't install the thread's regcache
6671 here.
6672 * proc-service.c (gregset_info): Fetch the current inferior's
6673 regs_info. Adjust to use it.
6674 * regcache.c: Include tdesc.h.
6675 (register_bytes, reg_defs, num_registers)
6676 (gdbserver_expedite_regs): Delete.
6677 (get_thread_regcache): If the thread doesn't have a regcache yet,
6678 create one, instead of aborting gdbserver.
6679 (regcache_invalidate_one): Rename to ...
6680 (regcache_invalidate_thread): ... this.
6681 (regcache_invalidate_one): New.
6682 (regcache_invalidate): Only invalidate registers of the current
6683 process.
6684 (init_register_cache): Add target_desc parameter, and use it.
6685 (new_register_cache): Ditto. Assert the target description has a
6686 non zero registers_size.
6687 (regcache_cpy): Add assertions. Adjust.
6688 (realloc_register_cache, set_register_cache): Delete.
6689 (registers_to_string, registers_from_string): Adjust.
6690 (find_register_by_name, find_regno, find_register_by_number)
6691 (register_cache_size): Add target_desc parameter, and use it.
6692 (free_register_cache_thread, free_register_cache_thread_one)
6693 (regcache_release, register_cache_size): New.
6694 (register_size): Add target_desc parameter, and use it.
6695 (register_data, supply_register, supply_register_zeroed)
6696 (supply_regblock, supply_register_by_name, collect_register)
6697 (collect_register_as_string, collect_register_by_name): Adjust.
6698 * regcache.h (struct target_desc): Forward declare.
6699 (struct regcache) <tdesc>: New field.
6700 (init_register_cache, new_register_cache): Add target_desc
6701 parameter.
6702 (regcache_invalidate_thread): Declare.
6703 (regcache_invalidate_one): Delete declaration.
6704 (regcache_release): Declare.
6705 (find_register_by_number, register_cache_size, register_size)
6706 (find_regno): Add target_desc parameter.
6707 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6708 declarations.
6709 * remote-utils.c: Include tdesc.h.
6710 (outreg, prepare_resume_reply): Adjust.
6711 * server.c: Include tdesc.h.
6712 (gdbserver_xmltarget): Delete declaration.
6713 (get_features_xml, process_serial_event): Adjust.
6714 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6715 declare.
6716 (struct process_info) <tdesc>: New field.
6717 (ipa_tdesc): Declare.
6718 * tdesc.c: New file.
6719 * tdesc.h: New file.
6720 * tracepoint.c: Include tdesc.h.
6721 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6722 (get_context_regcache): Adjust to pass ipa_tdesc down.
6723 (do_action_at_tracepoint): Adjust to get the register cache size
6724 from the context regcache's description.
6725 (traceframe_walk_blocks): Adjust to get the register cache size
6726 from the current trace frame's description.
6727 (traceframe_get_pc): Adjust to get current trace frame's
6728 description and pass it down.
6729 (gdb_collect): Adjust to get the register cache size from the
6730 IPA's description.
6731 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6732 (gdbserver_xmltarget): Delete.
6733 (initialize_low_tracepoint): Set the ipa's target description.
6734 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6735 (initialize_low_tracepoint): Set the ipa's target description.
6736 * linux-x86-low.c: Include tdesc.h.
6737 [__x86_64__] (is_64bit_tdesc): New.
6738 (ps_get_thread_area, x86_get_thread_area): Use it.
6739 (i386_cannot_store_register): Rename to ...
6740 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6741 (i386_cannot_fetch_register): Rename to ...
6742 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6743 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6744 to new interface.
6745 (target_regsets): Rename to ...
6746 (x86_regsets): ... this.
6747 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6748 interface.
6749 (x86_siginfo_fixup): Use is_64bit_tdesc.
6750 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6751 (tdesc_x32_avx_linux, tdesc_x32_linux)
6752 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6753 Declare.
6754 (x86_linux_update_xmltarget): Delete.
6755 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6756 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6757 (AMD64_LINUX_USER64_CS): New.
6758 (x86_linux_read_description): New, based on
6759 x86_linux_update_xmltarget.
6760 (same_process_callback): New.
6761 (x86_arch_setup_process_callback): New.
6762 (x86_linux_update_xmltarget): New.
6763 (x86_regsets_info): New.
6764 (amd64_linux_regs_info): New.
6765 (i386_linux_usrregs_info): New.
6766 (i386_linux_regs_info): New.
6767 (x86_linux_regs_info): New.
6768 (x86_arch_setup): Reimplement.
6769 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6770 (x86_emit_ops): Ditto.
6771 (the_low_target): Adjust. Install x86_linux_regs_info,
6772 x86_cannot_fetch_register, and x86_cannot_store_register.
6773 (initialize_low_arch): New.
6774 * linux-ia64-low.c (tdesc_ia64): Declare.
6775 (ia64_fetch_register): Adjust.
6776 (ia64_usrregs_info, regs_info): New globals.
6777 (ia64_regs_info): New function.
6778 (the_low_target): Adjust.
6779 (initialize_low_arch): New function.
6780 * linux-sparc-low.c (tdesc_sparc64): Declare.
6781 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6782 Adjust.
6783 (sparc_arch_setup): New function.
6784 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6785 (the_low_target): Adjust.
6786 (initialize_low_arch): New function.
6787 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6788 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6789 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6790 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6791 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6792 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6793 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6794 (tdesc_powerpc_isa205_vsx64l): Declare.
6795 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6796 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6797 (ppc_set_pc, ppc_get_hwcap): Adjust.
6798 (ppc_usrregs_info): Forward declare.
6799 (!__powerpc64__) ppc_regmap_adjusted: New global.
6800 (ppc_arch_setup): Adjust to the current process'es target
6801 description.
6802 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6803 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6804 (ppc_store_evrregset): Adjust.
6805 (target_regsets): Rename to ...
6806 (ppc_regsets): ... this, and make static.
6807 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6808 (ppc_regs_info): New function.
6809 (the_low_target): Adjust.
6810 (initialize_low_arch): New function.
6811 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6812 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6813 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6814 (tdesc_s390x_linux64v2): Declare.
6815 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6816 (s390_fill_gregset, s390_store_last_break): Adjust.
6817 (target_regsets): Rename to ...
6818 (s390_regsets): ... this, and make static.
6819 (s390_get_pc, s390_set_pc): Adjust.
6820 (s390_get_hwcap): New target_desc parameter, and use it.
6821 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6822 (s390_arch_setup): Adjust to set the current process'es target
6823 description. Don't adjust the regmap.
6824 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6825 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6826 (regs_info_3264): New globals.
6827 (s390_regs_info): New function.
6828 (the_low_target): Adjust.
6829 (initialize_low_arch): New function.
6830 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6831 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6832 [__mips64] (init_registers_mips_linux)
6833 (init_registers_mips_dsp_linux): Delete defines.
6834 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6835 (have_dsp): New global.
6836 (mips_read_description): New, based on mips_arch_setup.
6837 (mips_arch_setup): Reimplement.
6838 (get_usrregs_info): New function.
6839 (mips_cannot_fetch_register, mips_cannot_store_register)
6840 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6841 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6842 (target_regsets): Rename to ...
6843 (mips_regsets): ... this, and make static.
6844 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6845 (dsp_regs_info, regs_info): New globals.
6846 (mips_regs_info): New function.
6847 (the_low_target): Adjust.
6848 (initialize_low_arch): New function.
6849 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6850 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6851 Declare.
6852 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6853 (arm_read_description): New, with bits factored from
6854 arm_arch_setup.
6855 (arm_arch_setup): Reimplement.
6856 (target_regsets): Rename to ...
6857 (arm_regsets): ... this, and make static.
6858 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6859 (arm_regs_info): New function.
6860 (the_low_target): Adjust.
6861 (initialize_low_arch): New function.
6862 * linux-m68k-low.c (tdesc_m68k): Declare.
6863 (target_regsets): Rename to ...
6864 (m68k_regsets): ... this, and make static.
6865 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6866 (m68k_regs_info): New function.
6867 (m68k_arch_setup): New function.
6868 (the_low_target): Adjust.
6869 (initialize_low_arch): New function.
6870 * linux-sh-low.c (tdesc_sharch): Declare.
6871 (target_regsets): Rename to ...
6872 (sh_regsets): ... this, and make static.
6873 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6874 (sh_regs_info, sh_arch_setup): New functions.
6875 (the_low_target): Adjust.
6876 (initialize_low_arch): New function.
6877 * linux-bfin-low.c (tdesc_bfin): Declare.
6878 (bfin_arch_setup): New function.
6879 (bfin_usrregs_info, regs_info): New globals.
6880 (bfin_regs_info): New function.
6881 (the_low_target): Adjust.
6882 (initialize_low_arch): New function.
6883 * linux-cris-low.c (tdesc_cris): Declare.
6884 (cris_arch_setup): New function.
6885 (cris_usrregs_info, regs_info): New globals.
6886 (cris_regs_info): New function.
6887 (the_low_target): Adjust.
6888 (initialize_low_arch): New function.
6889 * linux-cris-low.c (tdesc_crisv32): Declare.
6890 (cris_arch_setup): New function.
6891 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6892 (cris_regs_info): New function.
6893 (the_low_target): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-m32r-low.c (tdesc_m32r): Declare.
6896 (m32r_arch_setup): New function.
6897 (m32r_usrregs_info, regs_info): New globals.
6898 (m32r_regs_info): Adjust.
6899 (initialize_low_arch): New function.
6900 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6901 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6902 (tic6x_usrregs_info): Forward declare.
6903 (tic6x_read_description): New function, based on ...
6904 (tic6x_arch_setup): ... this. Reimplement.
6905 (target_regsets): Rename to ...
6906 (tic6x_regsets): ... this, and make static.
6907 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6908 (tic6x_regs_info): New function.
6909 (the_low_target): Adjust.
6910 (initialize_low_arch): New function.
6911 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6912 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6913 (target_regsets): Rename to ...
6914 (xtensa_regsets): ... this, and make static.
6915 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6916 globals.
6917 (xtensa_arch_setup, xtensa_regs_info): New functions.
6918 (the_low_target): Adjust.
6919 (initialize_low_arch): New function.
6920 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6921 (nios2_arch_setup): Set the current process'es tdesc.
6922 (target_regsets): Rename to ...
6923 (nios2_regsets): ... this.
6924 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6925 (nios2_regs_info): New function.
6926 (the_low_target): Adjust.
6927 (initialize_low_arch): New function.
a261b8f5
PA
6928 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6929 (aarch64_arch_setup): Set the current process'es tdesc.
6930 (target_regsets): Rename to ...
6931 (aarch64_regsets): ... this.
6932 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6933 (aarch64_regs_info): New function.
6934 (the_low_target): Adjust.
6935 (initialize_low_arch): New function.
3aee8918
PA
6936 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6937 globals.
6938 (target_regsets): Rename to ...
6939 (tile_regsets): ... this.
6940 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6941 (tile_regs_info): New function.
6942 (tile_arch_setup): Set the current process'es tdesc.
6943 (the_low_target): Adjust.
6944 (initialize_low_arch): New function.
6945 * spu-low.c (tdesc_spu): Declare.
6946 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6947 * win32-arm-low.c (tdesc_arm): Declare.
6948 (arm_arch_setup): New function.
6949 (the_low_target): Install arm_arch_setup instead of
6950 init_registers_arm.
6951 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6952 (init_windows_x86): Rename to ...
6953 (i386_arch_setup): ... this. Set `win32_tdesc'.
6954 (the_low_target): Adjust.
6955 * win32-low.c (win32_tdesc): New global.
6956 (child_add_thread): Don't create the thread cache here.
6957 (do_initial_child_stuff): Set the new process'es tdesc.
6958 * win32-low.h (struct target_desc): Forward declare.
6959 (win32_tdesc): Declare.
6960 * lynx-i386-low.c (tdesc_i386): Declare global.
6961 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6962 * lynx-low.c (lynx_tdesc): New global.
6963 (lynx_add_process): Set the new process'es tdesc.
6964 * lynx-low.h (struct target_desc): Forward declare.
6965 (lynx_tdesc): Declare global.
6966 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6967 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6968 * nto-low.c (nto_tdesc): New global.
6969 (do_attach): Set the new process'es tdesc.
6970 * nto-low.h (struct target_desc): Forward declare.
6971 (nto_tdesc): Declare.
6972 * nto-x86-low.c (tdesc_i386): Declare.
6973 (nto_x86_arch_setup): Set `nto_tdesc'.
6974
b1fbec62
GB
69752013-06-04 Gary Benson <gbenson@redhat.com>
6976
6977 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6978 to qSupported response when appropriate.
6979 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6980 with nonzero-length annex.
6981 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6982 arguments supplied in annex.
6983
d1ec4ce7
DE
69842013-05-31 Doug Evans <dje@google.com>
6985
ac44adcb 6986 PR server/15594
d1ec4ce7
DE
6987 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6988 64 bits in 64-cross-32 environment.
6989
9b25f2d3
PA
69902013-05-28 Pedro Alves <palves@redhat.com>
6991
6992 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6993 (aarch64-without-fpu.c): Delete rule.
6994 * configure.srv (aarch64*-*-linux*): Remove references to
6995 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6996 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6997 declaration.
6998
6740dc9c
PA
69992013-05-24 Pedro Alves <palves@redhat.com>
7000
7001 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7002 instead of strchr/decode_address. Error if the range isn't split
7003 with a ','. Don't assume there's be a ':' in the action.
7004
c2d6af84
PA
70052013-05-23 Yao Qi <yao@codesourcery.com>
7006 Pedro Alves <palves@redhat.com>
7007
7008 * linux-low.c (lwp_in_step_range): New function.
7009 (linux_wait_1): If the thread was range stepping and stopped
7010 outside the stepping range, report the stop to GDB. Otherwise,
7011 continue stepping. Add range stepping debug output.
7012 (linux_set_resume_request): Copy the step range from the resume
7013 request to the lwp.
7014 (linux_supports_range_stepping): New.
7015 (linux_target_ops) <supports_range_stepping>: Set to
7016 linux_supports_range_stepping.
7017 * linux-low.h (struct linux_target_ops)
7018 <supports_range_stepping>: New field.
7019 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7020 * linux-x86-low.c (x86_supports_range_stepping): New.
7021 (the_low_target) <supports_range_stepping>: Set to
7022 x86_supports_range_stepping.
7023 * server.c (handle_v_cont): Handle 'r' action.
7024 (handle_v_requests): Append ";r" if the target supports range
7025 stepping.
7026 * target.h (struct thread_resume) <step_range_start,
7027 step_range_end>: New fields.
7028 (struct target_ops) <supports_range_stepping>:
7029 New field.
7030 (target_supports_range_stepping): New macro.
7031
58794e1a
JB
70322013-05-17 Joel Brobecker <brobecker@adacore.com>
7033
7034 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7035 confusion in comment.
7036
d631c5a7
JB
70372013-05-17 Joel Brobecker <brobecker@adacore.com>
7038
7039 * lynx-low.c (struct process_info_private): New type.
7040 (lynx_add_process): New function.
7041 (lynx_create_inferior, lynx_attach): Replace calls to
7042 add_process by calls to lynx_add_process.
7043 (lynx_resume): If PTID is null, then try using
7044 current_process()->private->last_wait_event_ptid.
7045 Add comments.
7046 (lynx_clear_inferiors): Delete. The contents of that function
7047 has been inlined in lynx_mourn;
7048 (lynx_wait_1): Save the ptid in the process's private data.
7049 (lynx_mourn): Free the process' private data. Replace call
7050 to lynx_clear_inferiors by call to clear_inferiors.
7051
96f7a20f
YQ
70522013-05-17 Yao Qi <yao@codesourcery.com>
7053
7054 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7055 the right place.
7056
db0dfaa0
LM
70572013-05-16 Luis Machado <lgustavo@codesourcery.com>
7058
7059 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7060 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7061 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7062 PT_TEXT_END_ADDR guards. Update comments.
7063 (linux_target_op) <read_offsets>: Conditionally define to
7064 linux_read_offsets if the target is UCLIBC and if it defines
7065 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7066
68f5f838
SL
70672013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7068 Andrew Jenner <andrew@codesourcery.com>
7069
7070 * Makefile.in (SFILES): Add linux-nios2-low.c.
7071 (clean): Add action to delete nios2-linux.c.
7072 (nios2-linux.c): New rule.
7073 * configure.srv: Add nios2*-*-linux*.
7074 * linux-nios2-low.c: New.
7075
1ebff1fd
HAQ
70762013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7077
7078 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7079
f6150862
HZ
70802013-04-25 Hui Zhu <hui@codesourcery.com>
7081
7082 PR gdb/15186
f6150862
HZ
7083 * ax.c (ax_printf): Add fflush.
7084
614c279d
TT
70852013-04-22 Tom Tromey <tromey@redhat.com>
7086
7087 * Makefile.in (SFILES): Add filestuff.c.
7088 (OBS): Add filestuff.o.
7089 (filestuff.o): New target.
7090 * config.in, configure: Rebuild.
7091 * configure.ac: Check for fdwalk, pipe2.
7092
7d4e5717
PA
70932013-04-17 Pedro Alves <palves@redhat.com>
7094
7095 * configure.ac (USE_THREAD_DB): Delete variable.
7096 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7097 Don't AC_SUBST USE_THREAD_DB.
7098 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7099 * config.in, configure: Regenerate.
7100
d5c93e41
PA
71012013-04-16 Pedro Alves <palves@redhat.com>
7102
7103 * linux-low.h (struct lwp_info) <thread_known>: Move under
7104 the USE_THREAD_DB #ifdef.
7105
04f5fe89
PA
71062013-04-16 Pedro Alves <palves@redhat.com>
7107
7108 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7109 (linux-low.o): Delete rule.
7110 * linux-low.h: Always include "gdb_thread_db.h" instead of
7111 conditionally including thread_db.h.
7112 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7113 HAVE_THREAD_DB_H.
7114
480b27bf
JK
71152013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7116
7117 * Makefile.in (install-only): Fix make install regression.
7118
43662968
JK
71192013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7120
7121 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7122 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7123 installation.
7124 * gdbserver.1: Remove.
7125
3e74e146
PA
71262013-03-22 Pedro Alves <palves@redhat.com>
7127
7128 * linux-low.c (handle_extended_wait): Don't call
7129 linux_enable_event_reporting.
7130
a8347a2a
TT
71312013-03-15 Tony Theodore <tonyt@logyst.com>
7132
7133 PR build/9098:
7134 * Makefile.in (SHELL): Use @SHELL@.
7135
eeb56fa7
SDJ
71362013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7137
7138 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7139 compiler warning.
7140
4fa7e2ff
JB
71412013-03-13 Joel Brobecker <brobecker@adacore.com>
7142
7143 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7144 Remove extraneous NULL element.
7145
8ddb1965
YQ
71462013-03-13 Yao Qi <yao@codesourcery.com>
7147
7148 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7149 'V' block in trace frame.
7150
9accd112
MM
71512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7152
7153 * target.h (struct target_ops): Add btrace ops.
7154 (target_supports_btrace): New macro.
7155 (target_enable_btrace): New macro.
7156 (target_disable_btrace): New macro.
7157 (target_read_btrace): New macro.
7158 * gdbthread.h (struct thread_info): Add btrace field.
7159 * server.c: Include btrace-common.h.
7160 (handle_btrace_general_set): New function.
7161 (handle_btrace_enable): New function.
7162 (handle_btrace_disable): New function.
7163 (handle_general_set): Call handle_btrace_general_set.
7164 (handle_qxfer_btrace): New function.
7165 (struct qxfer qxfer_packets[]): Add btrace entry.
7166 * inferiors.c (remove_thread): Disable btrace.
7167 * linux-low: Include linux-btrace.h.
7168 (linux_low_enable_btrace): New function.
7169 (linux_low_read_btrace): New function.
7170 (linux_target_ops): Add btrace ops.
7171 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7172 Add srv_linux_btrace=yes.
7173 (x86_64-*-linux*): Add linux-btrace.o.
7174 Add srv_linux_btrace=yes.
7175 * configure.ac: Define HAVE_LINUX_BTRACE.
7176 * config.in: Regenerated.
7177 * configure: Regenerated.
7178
5cc22e4c
MM
71792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7180
7181 * server.c (handle_qxfer): Preserve error message if -3 is
7182 returned.
7183 (qxfer): Document the -3 return value.
7184
7c97f91e
MM
71852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7186
7187 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7188 (linux_btrace_h): New variable.
7189 (linux-btrace.o): New rule.
7190
be9a119c 71912013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7192 Hafiz Abid Qadeer <abidh@codesourcery.com>
7193
7194 * tracepoint.c (trace_buffer_size): New global.
7195 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7196 (init_trace_buffer): Change to one-argument function. Allocate
7197 trace buffer memory.
7198 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7199 handle QTBuffer:size packet.
7200 (cmd_bigqtbuffer_size): New function.
7201 (initialize_tracepoint): Call init_trace_buffer with
7202 DEFAULT_TRACE_BUFFER_SIZE.
7203 * server.c (handle_query): Add QTBuffer:size in the
7204 supported packets.
7205
e64f7499
YQ
72062013-03-07 Yao Qi <yao@codesourcery.com>
7207
7208 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7209 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7210 of -1.
7211 (cmd_qtsp): Adjust condition. Do post increment.
7212 Set cur_action and cur_step_action back to 0.
7213
f0ae6fc3
PA
72142013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7215
7216 PR server/15236
7217 * linux-low.c (linux_write_memory): Return early success if LEN is
7218 zero.
7219
b5b0b0af
CV
72202013-03-05 Corinna Vinschen <vinschen@redhat.de>
7221
334ad4a8 7222 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7223
589bc927
TT
72242013-02-28 Tom Tromey <tromey@redhat.com>
7225
7226 * configure.ac: Invoke AC_SYS_LARGEFILE.
7227 * configure, config.in: Rebuild.
7228
dfe07582
CV
72292013-02-28 Corinna Vinschen <vinschen@redhat.com>
7230
7231 * win32-low.c: Throughout, fix format strings and casts of
7232 printf-like functions to avoid type related warnings on all
7233 platforms.
7234 (get_child_debug_event): Print dwDebugEventCode as hex since
7235 that's how it's usually documented.
7236
736cd585
YQ
72372013-02-28 Yao Qi <yao@codesourcery.com>
7238
7239 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7240 pulongest.
7241
e1f58301
JW
72422013-02-27 Jiong Wang <jiwang@tilera.com>
7243
7244 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7245 (reg-tilegx32.c): New rule.
7246 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7247 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7248 different register info initializer according to elf class.
7249 (init_registers_tilgx32): New function. The tilegx32 register info
7250 initializer.
7251 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7252 (tile_store_gregset): Likewise.
7253
d171ca78
YQ
72542013-02-27 Yao Qi <yao@codesourcery.com>
7255
7256 * server.c (process_point_options): Print debug message when
7257 debug_threads is true.
7258
282bbdf3
YQ
72592013-02-26 Yao Qi <yao@codesourcery.com>
7260
7261 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7262
aca22551
PA
72632013-02-19 Pedro Alves <palves@redhat.com>
7264 Kai Tietz <ktietz@redhat.com>
7265
7266 PR gdb/15161
7267
7268 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7269 instead of strtoul to extract address from packet.
7270 (process_serial_event) <'z'>: Likewise.
7271
4f3cee1c
YQ
72722013-02-18 Yao Qi <yao@codesourcery.com>
7273
7274 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7275
8e1d55a3
PA
72762013-02-14 Pedro Alves <palves@redhat.com>
7277
7278 Plug memory leak.
7279
7280 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7281 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7282
458820da
PA
72832013-02-14 Pedro Alves <palves@redhat.com>
7284
7285 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7286
baea0dae
PA
72872013-02-14 Pedro Alves <palves@redhat.com>
7288
7289 * tracepoint.c (save_string): Delete.
7290 (add_tracepoint_action): Use savestring instead of save_string.
7291
0b1afbb3
PA
72922013-02-12 Pedro Alves <palves@redhat.com>
7293
7294 * linux-xtensa-low.c: Ditto.
7295 * xtensa-xtregs.c: Ditto.
7296
8a4ac37e
PA
72972013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7298
7299 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7300 thread_db.
7301
148de6bb
MS
73022013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7303
7304 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7305 aarch64_num_wp_regs and aarch64_num_bp_regs to
7306 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7307
55fac6e0
MS
73082013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7309
7310 * linux-aarch64-low.c (ps_get_thread_area): Replace
7311 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7312
176eb98c
MS
73132013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7314 Marcus Shawcroft <marcus.shawcroft@arm.com>
7315 Nigel Stephens <nigel.stephens@arm.com>
7316 Yufeng Zhang <yufeng.zhang@arm.com>
7317
7318 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7319 (aarch64.c, aarch64-without-fpu.c): New targets.
7320 * configure.srv (aarch64*-*-linux*): New.
7321 * linux-aarch64-low.c: New file.
7322
56f7af9c
MS
73232013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7324
43aaf8b6 7325 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7326 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7327 (dequeue_one_deferred_signal, linux_resume_one_thread)
7328 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7329 (linux_tracefork_grandchild, linux_test_for_tracefork)
7330 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7331 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7332 where the argument is 0.
7333
60f662b0
YQ
73342013-01-25 Yao Qi <yao@codesourcery.com>
7335
7336 * event-loop.c: Include "queue.h".
7337 (gdb_event_p): New typedef.
7338 (struct gdb_event) <next_event>: Remove.
7339 (event_queue): Change to QUEUE(gdb_event_p).
7340 (async_queue_event): Remove.
7341 (gdb_event_xfree): New.
7342 (initialize_event_loop): New.
7343 (process_event): Use API from QUEUE.
7344 (wait_for_event): Likewise.
7345 * server.c (main): Call initialize_event_loop.
7346 * server.h (initialize_event_loop): Declare.
7347
5ae4861a
YQ
73482013-01-18 Yao Qi <yao@codesourcery.com>
7349
7350 * ax.h (struct eval_agent_expr_context): New.
7351 (gdb_eval_agent_expr): Update declaration.
7352 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7353 TFRAME. Add new argument CTX.
7354 * server.h (struct eval_agent_expr_context): Declare.
7355 (agent_mem_read, agent_tsv_read): Update declaration.
7356 (agent_mem_read_string): Likewise.
7357 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7358 (add_traceframe_block): Add new argument TPOINT.
7359 Increase TPOINT->traceframe_usage.
7360 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7361 eval_tracepoint_agent_expr.
7362 (condition_true_at_tracepoint): Likewise.
7363 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7364 (agent_mem_read_string, agent_tsv_read): Likewise.
7365
85e00e85
YQ
73662013-01-16 Yao Qi <yao@codesourcery.com>
7367
7368 * linux-low.c (linux_resume_one_lwp): Don't check
7369 'lwp->bp_reinsert != 0'.
7370
4039cf45
JB
73712013-01-07 Joel Brobecker <brobecker@adacore.com>
7372 Pedro Alves <palves@redhat.com>
7373
7374 * lynx-low.c (ptrace_request_to_str): Define a temporary
7375 macro and use it to simplify this function's implementation.
7376
9044dee2
JB
73772013-01-07 Joel Brobecker <brobecker@adacore.com>
7378
7379 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7380 sets errno.
7381
e6352c8f
JB
73822013-01-07 Joel Brobecker <brobecker@adacore.com>
7383
7384 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7385
50681a27
JB
73862013-01-07 Joel Brobecker <brobecker@adacore.com>
7387
7388 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7389
3f6e77ef
JB
73902013-01-07 Joel Brobecker <brobecker@adacore.com>
7391
7392 * lynx-low.c (lynx_resume): Use the resume_info parameter
7393 to determine the ptid for the lynx_ptrace call, unless
7394 it is equal to minus_one_ptid, in which case we use the
7395 ptid of the current_inferior.
7396 (lynx_wait_1): After having received a thread create/exit
7397 event, resume the inferior's execution using the signaling
7398 thread's ptid, rather than the old ptid.
7399
7fda33ae
JB
74002013-01-07 Joel Brobecker <brobecker@adacore.com>
7401
7402 * lynx-low.c (lynx_resume): Delete variable ret.
7403
b9786c74
JB
74042013-01-01 Joel Brobecker <brobecker@adacore.com>
7405
7406 * gdbreplay.c (gdbreplay_version): Update copyright year.
7407 * server.c (gdbserver_version): Likewise.
7408
8b93d60f
JB
74092012-12-17 Joel Brobecker <brobecker@adacore.com>
7410
7411 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7412 new thread.
7413
037335a7
JB
74142012-12-17 Joel Brobecker <brobecker@adacore.com>
7415
7416 * lynx-low.c (ptrace_request_to_str): Add handling for
7417 PTRACE_GETTRACESIG.
7418
52d4cbd8
JB
74192012-12-17 Joel Brobecker <brobecker@adacore.com>
7420
7421 * lynx-low.c (lynx_attach): Delete variable new_process.
7422
ab8f6ca9
JB
74232012-12-17 Joel Brobecker <brobecker@adacore.com>
7424
7425 * lynx-low.c (lynx_create_inferior): Delete variable
7426 new_process.
7427
78cbc024
JB
74282012-12-17 Joel Brobecker <brobecker@adacore.com>
7429
7430 * lynx-low.c (ptrace_request_to_str): Do not handle
7431 PTRACE_GETTHREADLIST if this macro does not exist.
7432
14a00470
YQ
74332012-12-15 Yao Qi <yao@codesourcery.com>
7434
7435 * Makefile.in (OBS): Add notif.o.
7436 * notif.c, notif.h: New.
7437 * server.c: Include "notif.h".
7438 (struct vstop_notif) <next>: Remove.
7439 <base>: New field.
7440 (queue_stop_reply): Update.
7441 (push_event, send_next_stop_reply): Remove.
7442 (discard_queued_stop_replies): Update.
7443 (notif_stop): New variable.
7444 (handle_v_stopped): Remove.
7445 (handle_v_requests): Don't call handle_v_stopped. Call
7446 handle_ack_notif instead.
7447 (queue_stop_reply_callback): Call notif_event_enque instead
7448 of queue_stop_reply.
7449 (handle_status): Don't call send_next_stop_reply, call
7450 notif_write_event instead.
7451 (kill_inferior_callback): Likewise.
7452 (detach_or_kill_inferior_callback): Likewise.
7453 (main): Call initialize_notif.
7454 (process_serial_event): Call QUEUE_is_empty.
7455 (handle_target_event): Call notif_push instead of push event.
7456 * server.h (push_event): Remove declaration.
7457
61c125b9
TT
74582012-12-10 Tom Tromey <tromey@redhat.com>
7459
7460 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7461 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7462 macros.
7463 (.c.o): Rewrite.
7464 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7465 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7466 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7467 (amd64-linux-ipa.o, ax.o): Rewrite.
7468 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7469 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7470 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7471 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7472 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7473 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7474 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7475 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7476 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7477 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7478 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7479 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7480 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7481 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7482 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7483 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7484 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7485 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7486 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7487 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7488 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7489 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7490 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7491 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7492 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7493 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7494 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7495 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7496 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7497 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7498 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7499 (reg-tilegx.o): Remove.
7500 (all_object_files): New macro.
7501 Include .deps files.
7502 * aclocal.m4, configure: Rebuild.
7503 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7504 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7505 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7506
e90e9ad9
TT
75072012-12-05 Tom Tromey <tromey@redhat.com>
7508
7509 PR gdb/14917:
7510 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7511
02d403bf 75122012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7513
7514 * configure.ac: Check for linux/perf_event.h.
7515 * config.in: Regenerated.
7516 * configure: Regenerated.
7517
0270a750
PA
75182012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7519
7520 * hostio.c (handle_readlink): Decrease buffer size
7521 parameter passed to readlink by one byte.
7522
8c29b58e
YQ
75232012-11-26 Yao Qi <yao@codesourcery.com>
7524
7525 * configure.ac (build_warnings): Append '-Wempty-body'.
7526 * configure: Regenerated.
7527 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7528 body.
7529
8bdce1ff
PM
75302012-11-15 Pierre Muller <muller@sourceware.org>
7531
7532 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7533 * config.in: Regenerate.
7534 * configure: Regenerate.
7535 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7536 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7537 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7538 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7539 header.
7540 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7541 instead of <sys/wait.h> header.
7542 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7543
02d403bf 75442012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7545
7546 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7547 (various make rules): Remove -DGDBSERVER
7548
fbd5db48
YQ
75492012-11-09 Yao Qi <yao@codesourcery.com>
7550
7551 * spu-low.c (current_ptid): Move it to ..
7552 * gdbthread.h: ... here. New.
7553 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7554 * server.c (myresume, process_serial_event): Likewise.
7555 * thread-db.c (thread_db_find_new_threads): Likewise.
7556 * tracepoint.c (run_inferior_command): Likewise.
7557
b3dc46ff
AB
75582012-10-01 Andrew Burgess <aburgess@broadcom.com>
7559
7560 * server.c (handle_search_memory_1): Include access length in
7561 warning message.
7562
07c04788
HPN
75632012-09-05 Michael Brandt <michael.brandt@axis.com>
7564
7565 * linux-crisv32-low.c: Fix compile errors.
7566
918d227b
YQ
75672012-09-04 Yao Qi <yao@codesourcery.com>
7568
7569 * tracepoint.c (cmd_qtsv): Adjust debug message.
7570 Don't check CUR_TPOINT.
7571
18c1b81a
YQ
75722012-08-28 Yao Qi <yao@codesourcery.com>
7573
7574 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7575 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7576 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7577 Remove declarations of xmalloc, xreallloc, xstrdup and
7578 freeargv.
7579 * Makefile.in (libiberty_h): New.
7580 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7581 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7582
dc82f37b
YQ
75832012-08-23 Yao Qi <yao@codesourcery.com>
7584
7585 * server.h: Remove declaration of 'xsnprintf'.
7586
406b1477
KS
75872012-08-22 Keith Seitz <keiths@redhat.com>
7588
7589 * server.h: Include build-gnulib-gbserver/config.h.
7590 * gdbreplay.c: Likewise.
7591
e6712ff1
DE
75922012-08-08 Doug Evans <dje@google.com>
7593
7594 * Makefile.in (SFILES): Add gdb_vecs.c.
7595 (OBS): Add gdb_vecs.o.
7596 (gdb_vecs_h, host_defs_h): New variables.
7597 (thread-db.o): Add $(gdb_vecs_h) dependency.
7598 (gdb_vecs.o): New rule.
7599 * thread-db.c: #include "gdb_vecs.h".
7600 (thread_db_load_search): Use a vector to iterate over path elements.
7601 Handle text appearing after "$pdir".
7602
7603 * configure.ac: Add check for strstr.
7604 * config.in: Regenerate.
7605 * configure: Regenerate.
7606
7c3270ae
UW
76072012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7608
7609 * hostio.c (handle_pread): If pread fails, fall back to attempting
7610 lseek/read.
7611 (handle_pwrite): Likewise for pwrite.
7612
b62e2b27
UW
76132012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7614
7615 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7616 between unsupported TYPE and unimplementable ADDR/LEN combination.
7617 (arm_insert_point): Act on new return value.
7618
78a99e91
PA
76192012-07-31 Pedro Alves <palves@redhat.com>
7620
7621 * server.c (process_point_options): Only skip tokens if we find
7622 one that is unrecognized. Don't treat 'X' specially while
7623 skipping unrecognized tokens.
7624
fcf303ab
UW
76252012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7626
7627 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7628 to 4-byte-align HW breakpoint addresses for Thumb.
7629
7255706c
YQ
76302012-07-27 Yao Qi <yao@codesourcery.com>
7631
7632 PR remote/14161.
7633
7634 * server.h: Declare gdb_agent_about_to_close.
7635 * target.c (kill_inferior): Include "agent.h".
7636 New. Send command 'kill'.
7637 * target.h (kill_inferior): Removed macro.
7638 * tracepoint.c (gdb_agent_about_to_close): New.
7639 (gdb_agent_helper_thread): Handle command 'close'.
7640 Wait endlessly until the inferior stops.
7641 Install gdb_agent_remove_socket to atexit hook.
7642 (agent_socket_name): New static variable.
7643 (gdb_agent_socket_init): Replace local variable 'name' with
7644 'agent_socket_name'.
7645 (gdb_agent_remove_socket): New.
7646
5a3f286f
YQ
76472012-07-27 Yao Qi <yao@codesourcery.com>
7648
7649 * server.c (process_point_options): Stop at 'X' when parsing.
7650
961bd387
ME
76512012-07-19 Michael Eager <eager@eagercon.com>
7652
a261b8f5 7653 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7654 to hw_execute.
7655 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7656 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7657 hardware breakpoint.
7658
aa7c7447
JK
76592012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7660
7661 * gdbserver/linux-low.c (initialize_low): Call
7662 linux_ptrace_init_warnings.
7663
7f216e7c
DE
76642012-07-02 Doug Evans <dje@google.com>
7665
7666 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7667 pointer to int.
7668
d3ce09f5
SS
76692012-07-02 Stan Shebs <stan@codesourcery.com>
7670
7671 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7672 (ax.o): Add it to build rule.
7673 (ax-ipa.o): Ditto.
7674 (OBS): Add format.o.
7675 (IPA_OBS): Add format.o.
7676 * server.c (handle_query): Claim support for breakpoint commands.
7677 (process_point_options): Add command case.
7678 (process_serial_event): Leave running if there are printfs in
7679 effect.
7680 * mem-break.h (any_persistent_commands): Declare.
7681 (add_breakpoint_commands): Declare.
7682 (gdb_no_commands_at_breakpoint): Declare.
7683 (run_breakpoint_commands): Declare.
7684 * mem-break.c (struct point_command_list): New struct.
7685 (struct breakpoint): New field command_list.
7686 (any_persistent_commands): New function.
7687 (add_commands_to_breakpoint): New function.
7688 (add_breakpoint_commands): New function.
7689 (gdb_no_commands_at_breakpoint): New function.
7690 (run_breakpoint_commands): New function.
7691 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7692 locally.
7693 * ax.c: Include format.h.
7694 (ax_printf): New function.
7695 (gdb_eval_agent_expr): Add printf opcode.
7696
2f8f6aed
YQ
76972012-06-13 Yao Qi <yao@codesourcery.com>
7698
7699 * server.c (start_inferior): Remove duplicated writes to fields
7700 'last_resume_kind' and 'last_status' of 'current_inferior'.
7701
0c9070b3
YQ
77022012-06-12 Yao Qi <yao@codesourcery.com>
7703 Pedro Alves <palves@redhat.com>
7704
7705 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7706 comment.
7707 * server.c (handle_v_cont): Extend comment.
7708
c52daf70
YQ
77092012-06-11 Yao Qi <yao@codesourcery.com>
7710
7711 * linux-low.c (linux_attach): Add 'static'.
7712
d38bbb0a
YQ
77132012-06-06 Yao Qi <yao@codesourcery.com>
7714
7715 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7716
89dc0afd
JK
77172012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7718
7719 Fix gcc -flto compilation warning.
7720 * server.c (main): Make variable multi_mode and attach volatile.
7721
75f62ce7
TJB
77222012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7723
7724 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7725 if the platform doesn't know about it.
7726
65f479b6
PA
77272012-05-30 Jeff Kenton <jkenton@tilera.com>
7728
7729 * Makefile.in (SFILES): Add linux-tile-low.c.
7730 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7731 * configure.srv: Handle tilegx-*-linux*.
7732 * linux-tile-low.c: New file.
7733
0c5bf5a9
JK
77342012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7735
7736 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7737
a493e3e2
PA
77382012-05-24 Pedro Alves <palves@redhat.com>
7739
7740 PR gdb/7205
7741
43aaf8b6 7742 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7743
2ea28649
PA
77442012-05-24 Pedro Alves <palves@redhat.com>
7745
7746 PR gdb/7205
7747
7748 Replace target_signal with gdb_signal throughout.
7749
8d409d16
MR
77502012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7751
7752 * linux-low.c (linux_store_registers): Avoid the copying sequence
7753 when no data has been retrieved by ptrace.
7754
23512c01
MGD
77552012-05-22 Will Deacon <will.deacon@arm.com>
7756
7757 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7758 Include asm/ptrace.h.
7759 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7760 already defined.
7761
4934b29e
MR
77622012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7763
7764 * linux-low.c (linux_store_registers): Don't re-retrieve data
7765 with ptrace that has already been obtained from /proc. Always
7766 copy any data retrieved with ptrace to the buffer supplied.
7767
bde24c0a
PA
77682012-05-11 Yao Qi <yao@codesourcery.com>
7769 Pedro Alves <palves@redhat.com>
7770
7771 * linux-low.c (enum stopping_threads_kind): New.
7772 (stopping_threads): Change type to `enum stopping_threads_kind'.
7773 (handle_extended_wait): If stopping and suspending threads, leave
7774 the new_lwp suspended too.
7775 (linux_wait_for_event): Adjust.
7776 (stop_all_lwps): Set `stopping_threads' to
7777 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7778 whether we're suspending threads or just stopping them. Assert no
7779 recursion happens.
7780
623b6bdf
YQ
77812012-04-29 Yao Qi <yao@codesourcery.com>
7782
7783 * server.h: Move some code to ...
7784 * gdbthread.h: ... here. New.
7785 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7786 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7787 (nto-low.o, win32-low.o): Likewise.
7788 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7789 * regcache.c, remote-utils.c, server.c: Likewise.
7790 * target.c, tracepoint.c, win32-low.c: Likewise.
7791
f15f9948
TJB
77922012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7793
7794 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7795 (PTRACE_ARG4_TYPE): Likewise.
7796 (PTRACE_XFER_TYPE): Likewise.
7797 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7798 ptrace to PTRACE_ARG3_TYPE.
7799 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7800 (PTRACE_ARG4_TYPE): Likewise.
7801 (PTRACE_XFER_TYPE): Likewise.
7802 (linux_detach_one_lwp): Cast fourth argument of
7803 ptrace to long then PTRACE_ARG4_TYPE.
7804 (regsets_fetch_inferior_registers): Cast third argument of
7805 ptrace to long then PTRACE_ARG3_TYPE.
7806 (regsets_store_inferior_registers): Likewise.
7807
38ea300a
PA
78082012-04-20 Pedro Alves <palves@redhat.com>
7809
7810 * configure: Regenerate.
7811
c971b7fa
PA
78122012-04-19 Pedro Alves <palves@redhat.com>
7813
43aaf8b6 7814 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7815 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7816 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7817 (all, install-only, uninstall, clean-info, all-lib, clean): No
7818 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7819 (maintainer-clean realclean distclean): Use subdir_do.
7820 (subdir_do): New.
7821 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7822 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7823 * acinclude.m4: Include acx_configure_dir.m4.
7824 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7825 calls. Call AC_PROG_RANLIB. Configure gnulib using
7826 ACX_CONFIGURE_DIR.
7827 (GNULIB): New.
7828 (GNULIB_STDINT_H): Adjust.
7829 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7830 * gdbreplay.c: Include build-gnulib/config.h.
7831 * server.h: Likewise.
7832 * aclocal.m4: Regenerate.
7833 * config.in: Regenerate.
7834 * configure: Regenerate.
c971b7fa 7835
809277f8
PA
78362012-04-19 Pedro Alves <palves@redhat.com>
7837
7838 * Makefile.in (LIBGNU, INCGNU): Adjust.
7839 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7840 (all, install-only, uninstall, clean-info, all-lib, clean)
7841 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7842 * configure.ac: Adjust AC_OUTPUT output.
7843 * aclocal.m4: Regenerate.
7844 * configure: Regenerate.
7845
fd9bb8b8
PA
78462012-04-19 Pedro Alves <palves@redhat.com>
7847
7848 * Makefile.in (generated_files): New.
7849 (server_h): Remove the explicit dependency on config.h, and depend
7850 on $generated_files.
7851
1c298c66
PA
78522012-04-19 Pedro Alves <palves@redhat.com>
7853
7854 * Makefile.in (INCGNU): Add -Ignulib.
7855
57c4b50b
PA
78562012-04-19 Pedro Alves <palves@redhat.com>
7857
7858 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7859 (INCGNU): ... this, and spell out -I here.
7860 (GNULIB_LIB): Rename to ...
7861 (LIBGNU): ... this.
7862 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7863
1030e047
PA
78642012-04-19 Pedro Alves <palves@redhat.com>
7865
7866 * config.in: Regenerate.
7867
447d4319
PA
78682012-04-19 Pedro Alves <palves@redhat.com>
7869
7870 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7871 * server.h (memmem): Remove declaration.
7872 * config.in: Regenerate.
7873 * configure: Regenerate.
7874
aad9eab9
YQ
78752012-04-19 Yao Qi <yao@codesourcery.com>
7876
7877 * Makefile.in (SFILES): Add common/vec.c.
7878 (OBS): Add vec.o.
7879 (vec.o): New rule.
7880
3e10640f
YQ
78812012-04-19 Yao Qi <yao@codesourcery.com>
7882
7883 * remote-utils.c (prepare_resume_reply): Replace with macro
7884 target_core_of_thread.
7885 * server.c (handle_qxfer_threads_proper): Likewise.
7886 * target.h (traget_core_of_thread): New macro.
7887
71622373
PA
78882012-04-18 Pedro Alves <palves@redhat.com>
7889
7890 * aclocal.m4: Regenerate.
7891 * configure: Regenerate.
7892
80d26939
YQ
78932012-04-16 Yao Qi <yao@codesourcery.com>
7894
7895 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7896 duplicated on address.
7897
42476b70
YQ
78982012-04-16 Yao Qi <yao@codesourcery.com>
7899
7900 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7901 (struct tracepoint_action_ops) <send>: New field.
7902 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7903 (agent_expr_send, x_tracepoint_action_send): New.
7904 (l_tracepoint_action_send): New.
7905 (cmd_qtdp): Download and install tracepoint
7906 according to `use_agent'.
7907 (run_inferior_command): Add one more parameter `len'.
7908 Update callers.
7909 (tracepoint_send_agent): New.
7910 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7911
7bc83639
YQ
79122012-04-16 Yao Qi <yao@codesourcery.com>
7913
7914 * tracepoint.c (download_tracepoints): Moved to ...
7915 (cmd_qtstart): ... here.
7916
5f18041e
YQ
79172012-04-14 Yao Qi <yao@codesourcery.com>
7918
7919 * tracepoint.c: Include inttypes.h.
7920 (struct collect_memory_action): Use sized types.
7921 (struct tracepoint): Likewise.
7922 (cmd_qtdp, stop_tracing): Update print specifiers.
7923 (cmd_qtp, response_tracepoint): Likewise.
7924 (collect_data_at_tracepoint): Likewise.
7925 (collect_data_at_step): Likewise.
7926
55a8c076
YQ
79272012-04-14 Yao Qi <yao@codesourcery.com>
7928
7929 Import gnulib module inttypes.
7930 * aclocal.m4, config.in, configure: Regenerated.
7931
dc750257
YQ
79322012-04-14 Yao Qi <yao@codesourcery.com>
7933
7934 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7935 Makefile and config.status at last.
7936
0ab5faf9
YQ
79372012-04-13 Yao Qi <yao@codesourcery.com>
7938
7939 * tracepoint.c: Include stdint.h unconditionally.
7940
18f5fd81
TJB
79412012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7942
7943 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7944 on BFD_HAVE_SYS_PROCFS_TYPE.
7945 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7946 * configure: Regenerate.
7947 * config.in: Likewise.
7948
4d47af5c
L
79492012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7950
7951 * Makefile.in (clean): Also remove x32.c x32-linux.c
7952 x32-avx.c x32-avx-linux.c.
7953 (x32.o): New target.
7954 (x32.c): Likewise.
7955 (x32-linux.o): Likewise.
7956 (x32-linux.c): Likewise.
7957 (x32-avx.o): Likewise.
7958 (x32-avx.c): Likewise.
7959 (x32-avx-linux.o): Likewise.
7960 (x32-avx-linux.c): Likewise.
7961
7962 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7963 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7964 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7965 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7966 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7967 i386/x32-avx-linux.xml.
7968
7969 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7970 (init_registers_x32_avx_linux): Likwise.
7971 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7972 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7973
ecedbe58
PA
79742012-04-13 Pedro Alves <palves@redhat.com>
7975
7976 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7977 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7978 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7979 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7980 the sub-make.
7981
c92b5177
L
79822012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7983
7984 * linux-x86-low.c (compat_x32_clock_t): New.
7985 (compat_x32_siginfo_t): Likewise.
7986 (compat_x32_siginfo_from_siginfo): Likewise.
7987 (siginfo_from_compat_x32_siginfo): Likewise.
7988 (linux_is_elf64): Likewise.
7989 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7990 and siginfo_from_compat_x32_siginfo for x32.
7991 (x86_arch_setup): Set linux_is_elf64.
7992
214d508e
L
79932012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7994
7995 PR gdb/13969
7996 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7997 e_machine field.
7998 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7999 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8000 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8001 compatible with process.
8002
c9a1864a
YQ
80032012-04-12 Yao Qi <yao@codesourcery.com>
8004
8005 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8006 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8007 (install-only, install-info, clean): Handle sub dir gnulib.
8008 (all-lib, am--refresh): New targets.
8009 (memmem.o): Remove target.
8010 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8011 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8012 (AC_REPLACE_FUNCS): Remove memmem.
8013 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8014 (AC_OUTPUT): Generate Makefile in gnulib/.
8015 * aclocal.m4, config.in, configure: Regenerated.
8016
367ba2c2
MR
80172012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8018
8019 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8020
9d236627
PA
80212012-04-05 Pedro Alves <palves@redhat.com>
8022
8023 -Werror=strict-aliasing
8024
8025 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8026 pointer.
8027
111217b3
PA
80282012-04-04 Pedro Alves <palves@redhat.com>
8029
8030 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8031 (sparc_store_gregset_from_stack, sparc_store_gregset)
8032 (sparc_breakpoint_at): Fix formatting.
8033
8365dcf5
TJB
80342012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8035
8036 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8037 are available.
8038 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8039 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8040 * config.in: Regenerate.
8041 * configure: Likewise.
8042
689cc2ae
PA
80432012-03-29 Pedro Alves <palves@redhat.com>
8044
8045 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8046 Correct ptrace arguments.
8047
c14dfd32
PA
80482012-03-28 Pedro Alves <palves@redhat.com>
8049
8050 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8051 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8052 (IA64_FR1_REGNUM): New defines.
8053 (ia64_fetch_register): New.
8054 (the_low_target): Install it.
8055 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8056 field.
8057 * linux-low.c (linux_fetch_registers): Try the
8058 the_low_target.fetch_register hook first.
8059
8060 * linux-arm-low.c (the_low_target): Adjust.
8061 * linux-bfin-low.c (the_low_target): Adjust.
8062 * linux-cris-low.c (the_low_target): Adjust.
8063 * linux-crisv32-low.c (the_low_target): Adjust.
8064 * linux-m32r-low.c (the_low_target): Adjust.
8065 * linux-m68k-low.c (the_low_target): Adjust.
8066 * linux-mips-low.c (the_low_target): Adjust.
8067 * linux-ppc-low.c (the_low_target): Adjust.
8068 * linux-s390-low.c (the_low_target): Adjust.
8069 * linux-sh-low.c (the_low_target): Adjust.
8070 * linux-sparc-low.c (the_low_target): Adjust.
8071 * linux-tic6x-low.c (the_low_target): Adjust.
8072 * linux-x86-low.c (the_low_target): Adjust.
8073 * linux-xtensa-low.c (the_low_target): Adjust.
8074
63c88e13
PA
80752012-03-26 Pedro Alves <palves@redhat.com>
8076
8077 * server.c (handle_qxfer_libraries): Don't bail early if
8078 the_target->qxfer_libraries_svr4 is not NULL.
8079
fb723180
PA
80802012-03-26 Pedro Alves <palves@redhat.com>
8081
8082 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8083
0afae3cf
PA
80842012-03-23 Pedro Alves <palves@redhat.com>
8085
8086 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8087 "library-list-svr4" element's start tag when the the DSO list is
8088 empty.
8089
485f1ee4
PA
80902012-03-23 Pedro Alves <palves@redhat.com>
8091
8092 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8093 a variable whose type size is the same as the inferior's pointer
8094 size.
8095
a5362b9a
TS
80962012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8097
8098 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8099 struct siginfo.
8100 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8101 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8102 * linux-low.h: Include <signal.h>.
8103 (struct siginfo): Remove forward declaration.
8104 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8105 struct siginfo.
8106
d226c142
MF
81072012-03-21 Mike Frysinger <vapier@gentoo.org>
8108
8109 * .gitignore: Ignore more files.
8110
122f36ef
PA
81112012-03-19 Pedro Alves <palves@redhat.com>
8112 Jan Kratochvil <jan.kratochvil@redhat.com>
8113
8114 * server.c (cont_thread, general_thread): Add describing comments.
8115 (start_inferior): Clear `cont_thread'.
8116 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8117 of a process.
8118
fc3e5175
YQ
81192012-03-15 Yao Qi <yao@codesourcery.com>
8120
8121 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8122 handling to ...
8123 (cmd_qtdp): ... here.
8124
8d0d92cd
YQ
81252012-03-15 Yao Qi <yao@codesourcery.com>
8126
8127 * tracepoint.c (struct tracepoint_action_ops): New.
8128 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8129 (m_tracepoint_action_download): New.
8130 (r_tracepoint_action_download): New.
8131 (x_tracepoint_action_download): New.
8132 (l_tracepoint_action_download): New.
8133 (add_tracepoint_action): Install `action->ops' according type.
8134 (download_tracepoint_1): Move code `download' function pointer
8135 of various tracepoint_action_ops.
8136
87b0bb13
JK
81372012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8138
8139 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8140 linux_ptrace_attach_warnings.
8141
5f572dec
JK
81422012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8143
8144 * Makefile.in (linux-ptrace.o): New.
8145 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8146 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8147 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8148 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8149 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8150 of these targets.
8151 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8152
f4647387
YQ
81532012-03-08 Yao Qi <yao@codesourcery.com>
8154 Pedro Alves <palves@redhat.com>
8155
8156 Fix PR server/13392.
8157 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8158 offset of JMP insn.
8159 * tracepoint.c (remove_tracepoint): New.
8160 (cmd_qtdp): Call remove_tracepoint when failed to install.
8161
9b224c5e
PA
81622012-03-07 Pedro Alves <palves@redhat.com>
8163
8164 * linux-low.c (get_detach_signal): New.
8165 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8166 Pass on pending signals to PTRACE_DETACH. Check the result of the
8167 ptrace call.
8168 * server.c (program_signals, program_signals_p): New.
8169 (handle_general_set): Handle QProgramSignals.
8170 * server.h (program_signals, program_signals_p): Declare.
8171
e237a7e2
JK
81722012-03-05 Pedro Alves <palves@redhat.com>
8173 Jan Kratochvil <jan.kratochvil@redhat.com>
8174
8175 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8176 New comment why.
8177
5808517f
YQ
81782012-03-03 Yao Qi <yao@codesourcery.com>
8179
8180 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8181 agent_look_up_symbols.
8182
58b4daa5
YQ
81832012-03-03 Yao Qi <yao@codesourcery.com>
8184
8185 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8186 (linux-x86-low.o): Likewise.
8187 * server.h: Remove in_process_agent_loaded.
8188 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8189 common/agent.c.
8190 Update callers.
8191
8ffcbaaf
YQ
81922012-03-03 Yao Qi <yao@codesourcery.com>
8193
8194 * tracepoint.c (gdb_agent_capability): New global.
8195 (in_process_agent_loaded_ust): Renamed to
8196 `in_process_agent_supports_ust'.
8197 Update callers.
8198 (in_process_agent_supports_ust): Call agent_capability_check.
8199 (clear_installed_tracepoints): Assert that agent supports
8200 agent.
8201
d1feda86
YQ
82022012-03-03 Yao Qi <yao@codesourcery.com>
8203
8204 * linux-low.c (linux_supports_agent): New.
8205 (linux_target_ops): Initialize field `supports_agent' with
8206 linux_supports_agent.
8207 * target.h (struct target_ops) <supports_agent>: New.
8208 (target_supports_agent): New macro.
8209 * server.c (handle_general_set): Handle packet 'QAgent'.
8210 (handle_query): Send `QAgent+'.
8211 * Makefile.in (server.o): Depends on agent.h.
8212
2fa291ac
YQ
82132012-03-03 Yao Qi <yao@codesourcery.com>
8214
8215 * Makefile.in (OBS): Add agent.o.
8216 Add new rule for agent.o.
8217 Track dependence of tracepoint.c on agent.h.
8218 * tracepoint.c (run_inferior_command_1):
8219 (run_inferior_command): Call agent_run_command.
8220 (gdb_ust_connect_sync_socket): Deleted. Move it to
8221 common/agent.c.
8222 (resume_thread, stop_thread): Likewise.
8223 (gdb_ust_socket_init): Renamed to ...
8224 (gdb_agent_socket_init): ... New.
8225 (gdb_ust_thread): Renamed to ...
8226 (gdb_agent_helper_thread): ... New.
8227 (gdb_ust_init): Move some code to ...
8228 (gdb_agent_init): ... here. New.
8229 [HAVE_UST]: Call gdb_ust_init.
8230 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8231 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8232 * config.in, configure: Regenerated.
8233
05044653
PA
82342012-03-02 Pedro Alves <palves@redhat.com>
8235
8236 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8237 * linux-low.c (struct simple_pid_list): New.
8238 (stopped_pids): New a struct simple_pid_list pointer.
8239 (add_to_pid_list, pull_pid_from_list): New.
8240 (handle_extended_wait): Don't assume the first signal new children
8241 report is SIGSTOP. Adjust call to pull_pid_from_list.
8242 (linux_wait_for_lwp): Adjust.
8243
8d00225b
YQ
82442012-03-02 Yao Qi <yao@codesourcery.com>
8245
8246 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8247 debug log.
8248
19560ba5
YQ
82492012-03-02 Yao Qi <yao@codesourcery.com>
8250
8251 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8252 `stop_pc' and `tpoint'. Update caller.
8253
1faeff08
MR
82542012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8255
8256 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8257 * linux-low.c (use_linux_regsets): New macro.
8258 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8259 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8260 (linux_register_in_regsets): New function.
8261 (usr_fetch_inferior_registers): Skip registers covered by
8262 regsets.
8263 (usr_store_inferior_registers): Likewise.
8264 (usr_fetch_inferior_registers): New macro.
8265 (usr_store_inferior_registers): Likewise.
8266 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8267 (linux_store_registers): Likewise.
8268 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8269 prototype.
8270 (init_registers_mips64_dsp_linux): Likewise.
8271 (init_registers_mips_linux): New macro.
8272 (init_registers_mips_dsp_linux): Likewise.
8273 (mips_dsp_num_regs): Likewise.
8274 (DSP_BASE, DSP_CONTROL): New fallback macros.
8275 (mips_base_regs): New macro.
8276 (mips_regmap): Use it. Fix the size.
8277 (mips_dsp_regmap): New variable.
8278 (mips_dsp_regset_bitmap): Likewise.
8279 (mips_arch_setup): New function.
8280 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8281 than mips_regmap.
8282 (mips_cannot_store_register): Likewise.
8283 (the_low_target): Update .arch_setup, .num_regs and .regmap
8284 initializers. Add .regset_bitmap initializer.
8285 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8286 initializer.
8287 * linux-bfin-low.c (the_low_target): Likewise.
8288 * linux-cris-low.c (the_low_target): Likewise.
8289 * linux-crisv32-low.c (the_low_target): Likewise.
8290 * linux-ia64-low.c (the_low_target): Likewise.
8291 * linux-m32r-low.c (the_low_target): Likewise.
8292 * linux-m68k-low.c (the_low_target): Likewise.
8293 * linux-ppc-low.c (the_low_target): Likewise.
8294 * linux-s390-low.c (the_low_target): Likewise.
8295 * linux-sh-low.c (the_low_target): Likewise.
8296 * linux-sparc-low.c (the_low_target): Likewise.
8297 * linux-tic6x-low.c (the_low_target): Likewise.
8298 * linux-x86-low.c (the_low_target): Likewise.
8299 * linux-xtensa-low.c (the_low_target): Likewise.
8300 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8301 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8302 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8303 srv_xmlfiles.
8304 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8305 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8306
c03e6ccc
YQ
83072012-02-29 Yao Qi <yao@codesourcery.com>
8308 Pedro Alves <palves@redhat.com>
8309
8310 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8311 `step_over_finished' is true.
8312
644cebc9
PA
83132012-02-27 Pedro Alves <palves@redhat.com>
8314
8315 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8316 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8317
c14d7ab2
PA
83182012-02-27 Pedro Alves <palves@redhat.com>
8319
8320 PR server/9684
8321 * linux-low.c (pid_is_stopped): New.
8322 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8323
412c89dd
LM
83242012-02-25 Luis Machado <lgustavo@codesourcery.com>
8325
8326 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8327 of conditions.
8328
b745defe
MR
83292012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8330
8331 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8332
9f3a5c85
LM
83332012-02-24 Luis Machado <lgustavo@codesourcery>
8334
8335 * server.c (handle_query): Advertise support for target-side
8336 breakpoint condition evaluation.
8337 (process_point_options): New function.
8338 (process_serial_event): When inserting a breakpoint, check for
8339 a target-side condition that should be evaluated.
8340
8341 * mem-break.c: Include regcache.h and ax.h.
8342 (point_cond_list_t): New data structure.
8343 (breakpoint) <cond_list>: New field.
8344 (find_gdb_breakpoint_at): Make non-static.
8345 (delete_gdb_breakpoint_at): Clear any target-side
8346 conditions.
8347 (clear_gdb_breakpoint_conditions): New function.
8348 (add_condition_to_breakpoint): Likewise.
8349 (add_breakpoint_condition): Likewise.
8350 (gdb_condition_true_at_breakpoint): Likewise.
8351 (gdb_breakpoint_here): Return result directly instead
8352 of going through a local variable.
8353
8354 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8355 (clear_gdb_breakpoint_conditions): Likewise.
8356 (add_breakpoint_condition): Likewise.
8357 (gdb_condition_true_at_breakpoint): Likewise.
8358
8359 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8360 (need_step_over_p): Take target-side breakpoint condition into
8361 consideration.
8362
5e1dc496
LM
83632012-02-24 Luis Machado <lgustavo@codesourcery>
8364
8365 * server.h: Include tracepoint.h.
8366 (agent_mem_read, agent_get_trace_state_variable_value,
8367 agent_set_trace_state_variable_value,
8368 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8369 get_set_tsv_func_addr): New prototypes.
8370
8371 * ax.h: New include file.
8372 * ax.c: New source file.
8373
8374 * tracepoint.c: Include ax.h.
8375 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8376 agent_expr, eval_result_type): Move to ax.h.
8377 (parse_agent_expr): Rename to ...
8378 (gdb_parse_agent_expr): ... this, make it non-static and move
8379 to ax.h.
8380 (unparse_agent_expr) Rename to ...
8381 (gdb_unparse_agent_expr): ... this, make it non-static and move
8382 to ax.h.
8383 (eval_agent_expr): Rename to ...
8384 (eval_tracepoint_agent_expr): ... this.
8385 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8386 forward declarations.
8387 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8388 (agent_get_trace_state_variable_value): New function.
8389 (agent_set_trace_state_variable_value): New function.
8390 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8391 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8392 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8393 (condition_true_at_tracepoint): Likewise.
8394 (parse_agent_expr): Rename to ...
8395 (gdb_parse_agent_expr): ... this and move to ax.c.
8396 (unparse_agent_expr): Rename to ...
8397 (gdb_unparse_agent_expr): ... this and move to ax.c.
8398 (gdb_agent_op_name): Move to ax.c.
8399 (eval_agent_expr): Rename to ...
8400 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8401 and move to ax.c.
8402 (eval_tracepoint_agent_expr): New function.
8403 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8404 non-static.
5e1dc496
LM
8405 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8406 ax.c.
8407 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8408 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8409 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8410 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8411 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8412 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8413 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8414 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8415 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8416 (compile_bytecodes): Remove forward declaration.
8417 (is_goto_target): Move to ax.c.
8418 (compile_bytecodes): Move to ax.c and call
8419 agent_get_trace_state_variable_value (...) and
8420 agent_set_trace_state_variable_value (...).
8421
8422 * Makefile.in: Update ax.c and IPA dependencies.
8423
277e4e52
PA
84242012-02-24 Pedro Alves <palves@redhat.com>
8425
8426 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8427 (cmd_bigqtbuffer_circular): ... this. Only handle
8428 'QTBuffer:circular:'.
8429 (handle_tracepoint_general_set): Adjust.
8430
bf4c19f7
YQ
84312012-02-16 Yao Qi <yao@codesourcery.com>
8432
8433 * inferiors.c: Move code to ...
8434 * dll.c: .... here. New.
8435 * server.h: Declare clear_dlls.
8436 * Makefile.in (SFILES): Add dll.c.
8437 (OBS): Add dll.o
8438 (dll.o): New rule.
8439
d73f2619
YQ
84402012-02-11 Yao Qi <yao@codesourcery.com>
8441
8442 * server.c: (handle_monitor_command): Add a new parameter
8443 `own_buf'.
8444 (handle_query): Update caller.
8445
f8255c2a
JB
84462012-02-09 Joel Brobecker <brobecker@adacore.com>
8447
8448 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8449 * configure, config.in: Regenerate.
8450 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8451 is not defined.
8452
da84f473
PA
84532012-02-02 Pedro Alves <palves@redhat.com>
8454
8455 Try SIGKILL first, then PTRACE_KILL.
8456 * linux-low.c (linux_kill_one_lwp): New.
8457 (linux_kill_one_lwp): Rename to ...
8458 (kill_one_lwp_callback): ... this. Use the new
8459 linux_kill_one_lwp.
8460
e886a173
PA
84612012-02-02 Pedro Alves <palves@redhat.com>
8462
8463 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8464 inferior.
8465
be07f1a2
PA
84662012-01-27 Pedro Alves <palves@redhat.com>
8467
8468 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8469 (elf_64_file_p): Make static.
8470 (linux_pid_exe_is_elf_64_file): New.
8471 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8472 Delete declarations.
8473 (linux_pid_exe_is_elf_64_file): Declare.
8474 * linux-x86-low.c (x86_arch_setup): Use
8475 linux_pid_exe_is_elf_64_file.
8476
d8301ad1
JK
84772012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8478
8479 * linux-low.c (linux_wait_for_event_1): Rename to ...
8480 (linux_wait_for_event): ... here and merge it with former
8481 linux_wait_for_event - new variable wait_ptid, use it.
8482 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8483
01b17894
PA
84842012-01-23 Pedro Alves <palves@redhat.com>
8485
8486 * server.c (main): Avoid yet another case of infinite loop while
8487 detaching/killing after a longjmp.
8488
e825046f
JK
84892012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8490
8491 Code cleanup.
8492 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8493
b9e7b9c3
UW
84942012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8495
8496 * hostio.c (handle_readlink): New function.
8497 (handle_vFile): Call it to handle "vFile:readlink" packets.
8498
901f9912
UW
84992012-01-20 Pedro Alves <palves@redhat.com>
8500 Ulrich Weigand <ulrich.weigand@linaro.org>
8501
8502 * server.c (handle_v_requests): Only support vAttach and vRun to
8503 start multiple processes when in extended protocol mode.
8504
fc1ab1a0
PA
85052012-01-17 Pedro Alves <palves@redhat.com>
8506
8507 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8508 memalign plus mprotect to allocate the scratch buffer.
8509
7d5d4e98
PA
85102012-01-13 Pedro Alves <palves@redhat.com>
8511
8512 * server.c (attach_inferior): Clear `cont_thread'.
8513
f128d5e9
PA
85142012-01-13 Pedro Alves <palves@redhat.com>
8515
8516 * server.c (main): Avoid infinite loop while detaching/killing
8517 after a longjmp.
8518
06db92f0
DE
85192012-01-09 Doug Evans <dje@google.com>
8520
8521 * server.c (start_inferior): Set last_ptid in --wrapper case.
8522
32d92999
YQ
85232012-01-06 Yao Qi <yao@codesourcery.com>
8524
8525 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8526 defined.
8527 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8528
5e0a92a9
YQ
85292012-01-04 Yao Qi <yao@codesourcery.com>
8530
8531 * tracepoint.c (cmd_qtdp): Print debug message
8532 for static tracepoint.
8533
ae639e8c
YQ
85342012-01-04 Yao Qi <yao@codesourcery.com>
8535
8536 * tracepoint.c (trace_vdebug): Differentiate debug message
8537 between gdbserver and IPA.
8538
f72429c5
YQ
85392012-01-03 Yao Qi <yao@codesourcery.com>
8540
8541 * tracepoint.c (tracepoint_was_hit): Don't collect for
8542 static tracepoint.
8543
12c3e59c
JB
85442012-01-02 Joel Brobecker <brobecker@adacore.com>
8545
8546 * terminal.h: Reformat copyright header.
8547
67827812
JB
85482012-01-02 Joel Brobecker <brobecker@adacore.com>
8549
8550 * server.c (gdbserver_version): Update copyright year.
8551 * gdbreplay.c (gdbreplay_version): Likewise.
8552
3e52c33d
JK
85532011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8554
8555 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8556
8557 Revert:
8558 2011-12-18 Hui Zhu <teawater@gmail.com>
8559 * linux-low.c (linux_create_inferior): Save return value to ret.
8560
66f1260e
HZ
85612011-12-18 Hui Zhu <teawater@gmail.com>
8562
8563 * linux-low.c (linux_create_inferior): Save return value to ret.
8564
e77616d7
DE
85652011-12-16 Doug Evans <dje@google.com>
8566
e7b06c57
DE
8567 * linux-low.c (linux_create_inferior): If stdio connection,
8568 redirect stdin from /dev/null, stdout to stderr.
8569 * remote-utils.c (remote_is_stdio): New static global.
8570 (remote_connection_is_stdio): New function.
8571 (remote_prepare): Handle stdio connection.
8572 (remote_open): Ditto.
8573 (remote_close): Don't close stdin for stdio connections.
8574 (read_prim,write_prim): New functions. Replace all calls to
8575 read/write to these.
8576 * server.c (main): Watch for "-" argument. Move call to
8577 remote_prepare before start_inferior.
8578 * server.h (STDIO_CONNECTION_NAME): New macro.
8579 (remote_connection_is_stdio): Declare.
8580
e77616d7
DE
8581 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8582 in debugging output.
8583
82067193
YQ
85842011-12-15 Yao Qi <yao@codesourcery.com>
8585
8586 * tracepoint.c: Include sys/syscall.h.
8587 (gdb_ust_thread): Remove preprocessor conditional.
8588
82bfbe7e
PA
85892011-12-14 Pedro Alves <pedro@codesourcery.com>
8590
8591 * linux-low.c (linux_detach_one_lwp): Call
8592 the_low_target.prepare_to_resume before detaching.
8593
712c6575
YQ
85942011-12-14 Yao Qi <yao@codesourcery.com>
8595
8596 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8597 of write.
8598
d54d1edf
YQ
85992011-12-14 Yao Qi <yao@codesourcery.com>
8600
8601 * i386-low.c (i386_low_stopped_data_address): Initialize local
8602 variable `control'.
8603
6210a125
PA
86042011-12-13 Pedro Alves <pedro@codesourcery.com>
8605
8606 PR remote/13492
8607
8608 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8609 DR_CONTROL unless necessary. Extend comments.
8610 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8611 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8612
2ece8244
YQ
86132011-12-13 Yao Qi <yao@codesourcery.com>
8614
8615 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8616 macros.
8617 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8618
784867a5
JK
86192011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8620
8621 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8622 Print new debug message for such case.
8623
6bf36717
JK
86242011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8625
8626 Fix overlapping memcpy.
8627 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8628 the read_inferior_memory transfer.
8629 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8630 write_inferior_memory transfer.
8631 (set_fast_tracepoint_jump): New variable buf. Use it for the
8632 read_inferior_memory and write_inferior_memory transfers.
8633 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8634 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8635 Use it for the write_inferior_memory transfer.
8636 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8637 buffers.
8638
50275556
MR
86392011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8640
8641 * linux-low.c (fetch_register, store_register): Make code
8642 consistent, fix formatting.
8643
7325beb4
MR
86442011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8645
8646 * linux-low.c (usr_store_inferior_registers): Factor out code
8647 to handle individual registers into...
8648 (store_register): ... this new function.
8649
c642a434
UW
86502011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8651
8652 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8653 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8654 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8655 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8656 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8657 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8658 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8659 (srv_xmlfiles): Add new XML files.
8660
8661 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8662 and <sys/uio.h>.
8663 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8664 (init_registers_s390_linux32v1): Add prototype.
8665 (init_registers_s390_linux32v2): Likewise.
8666 (init_registers_s390_linux64v1): Likewise.
8667 (init_registers_s390_linux64v2): Likewise.
8668 (init_registers_s390x_linux64v1): Likewise.
8669 (init_registers_s390x_linux64v2): Likewise.
8670 (s390_num_regs): Increment to 52.
8671 (s390_regmap): Add orig_r2 register.
8672 (s390_num_regs_3264): Increment to 68.
8673 (s390_regmap_3264): Add orig_r2 register.
8674 (s390_collect_ptrace_register): Handle orig_r2 register.
8675 (s390_supply_ptrace_register): Likewise.
8676 (s390_fill_last_break): New function.
8677 (s390_store_last_break): Likewise.
8678 (s390_fill_system_call): New function.
8679 (s390_store_system_call): Likewise.
8680 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8681 register sets.
8682 (s390_check_regset): New function.
8683 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8684 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8685 Update target_regsets for available register sets.
8686
2268b414
JK
86872011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8688 Jan Kratochvil <jan.kratochvil@redhat.com>
8689
8690 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8691 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8692 New.
8693 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8694 * linux-low.h (struct process_info_private): New member r_debug.
8695 * server.c (handle_qxfer_libraries): Call
8696 the_target->qxfer_libraries_svr4.
8697 (handle_qxfer_libraries_svr4): New function.
8698 (qxfer_packets): New entry "libraries-svr4".
8699 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8700 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8701 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8702 PACKET_qXfer_libraries_svr4.
8703
d6db1fab
UW
87042011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8705
8706 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8707 PSW address/mask between 8-byte and 16-byte formats.
8708 (s390_supply_ptrace_register): Likewise.
8709 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8710 basic addressing mode bit.
8711
242f5f1c
SS
87122011-11-24 Stan Shebs <stan@codesourcery.com>
8713
8714 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8715
f196051f
SS
87162011-11-17 Stan Shebs <stan@codesourcery.com>
8717
8718 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8719 (tracing_start_time): New global.
8720 (tracing_stop_time): New global.
8721 (tracing_user_name): New global.
8722 (tracing_notes): New global.
8723 (tracing_stop_note): New global.
8724 (cmd_qtstart): Set traceframe_usage, start_time.
8725 (stop_tracing): Set stop_time.
8726 (cmd_qtstatus): Report additional status.
8727 (cmd_qtp): New function.
8728 (handle_tracepoint_query): Call it.
8729 (cmd_qtnotes): New function.
8730 (handle_tracepoint_general_set): Call it.
8731 (get_timestamp): Rename from tsv_get_timestamp.
8732
405f8e94
SS
87332011-11-14 Stan Shebs <stan@codesourcery.com>
8734 Kwok Cheung Yeung <kcy@codesourcery.com>
8735
8736 * linux-x86-low.c (small_jump_insn): New.
8737 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8738 trampoline and error message, build a trampoline and issue a small
8739 jump instruction to it.
8740 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8741 trampoline and error message.
8742 (x86_get_min_fast_tracepoint_insn_len): New.
8743 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8744 * linux-low.h (struct linux_target_ops): Add arguments to
8745 install_fast_tracepoint_jump_pad operation, add new operation.
8746 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8747 arguments.
8748 (linux_get_min_fast_tracepoint_insn_len): New function.
8749 (linux_target_op): Add new operation.
8750 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8751 (gdb_trampoline_buffer_end): Ditto.
8752 (gdb_trampoline_buffer_error): Ditto.
8753 (struct ipa_sym_addresses): Add fields for new IPA variables.
8754 (symbol_list): Add entries for new IPA variables.
8755 (struct tracepoint): Add fields to hold the address range of the
8756 trampoline used by the tracepoint.
8757 (trampoline_buffer_head): New static variable.
8758 (trampoline_buffer_tail): Ditto.
8759 (claim_trampoline_space): New function.
8760 (have_fast_tracepoint_trampoline_buffer): New function.
8761 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8762 structure.
8763 (install_fast_tracepoint): Ditto, also add error buffer argument.
8764 (cmd_qtminftpilen): New function.
8765 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8766 (fast_tracepoint_from_trampoline_address): New function.
8767 (fast_tracepoint_collecting): Handle trampoline as part of jump
8768 pad space.
8769 (set_trampoline_buffer_space): New function.
8770 (initialize_tracepoint): Initialize new IPA variables.
8771 * target.h (struct target_ops): Add arguments to
8772 install_fast_tracepoint_jump_pad operation, add new
8773 get_min_fast_tracepoint_insn_len operation.
8774 (target_get_min_fast_tracepoint_insn_len): New.
8775 (install_fast_tracepoint_jump_pad): Add arguments.
8776 * server.h (IPA_BUFSIZ): Define.
8777 * linux-i386-ipa.c: Include extra header files.
8778 (initialize_fast_tracepoint_trampoline_buffer): New function.
8779 (initialize_low_tracepoint): Call it.
8780 * server.h (set_trampoline_buffer_space): Declare.
8781 (claim_trampoline_space): Ditto.
8782 (have_fast_tracepoint_trampoline_buffer): Ditto.
8783
1e4d1764
YQ
87842011-11-14 Yao Qi <yao@codesourcery.com>
8785
8786 * server.c (handle_query): Handle InstallInTrace for qSupported.
8787 * tracepoint.c (add_tracepoint): Sort list.
8788 (install_tracepoint, download_tracepoint): New.
8789 (cmd_qtdp): Call them to install and download tracepoints.
8790 (sort_tracepoints): Removed.
8791 (cmd_qtstart): Update.
8792
5c73ff4e
YQ
87932011-11-14 Yao Qi <yao@codesourcery.com>
8794
8795 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8796 * mem-break.h: Declare.
8797 * tracepoint.c (cmd_qtstart): Move some code to ...
8798 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8799 New.
8800 (download_tracepoints): Move some code to ...
8801 (download_tracepoint_1): ... here. New.
8802
86a30030
YQ
88032011-11-08 Yao Qi <yao@codesourcery.com>
8804
8805 * remote-utils.c (relocate_instruction): A comment fix.
8806
8d26e50c
JB
88072011-11-07 Joel Brobecker <brobecker@adacore.com>
8808
8809 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8810 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8811 dr_status_mirror and dr_control_mirror from debug_reg_state.
8812 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8813 (i386_initial_stuff): Remove use of deleted globals.
8814 (i386_get_thread_context, i386_set_thread_context,
8815 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8816 from debug_reg_state.
8817
a59306a3
YQ
88182011-11-05 Yao Qi <yao@codesourcery.com>
8819
8820 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8821 address as TPOINT's.
8822
3065dfb6
SS
88232011-11-02 Stan Shebs <stan@codesourcery.com>
8824
8825 * tracepoint.c (agent_mem_read_string): New function.
8826 (eval_agent_expr): Call it for tracenz.
8827 * server.c (handle_query): Report support for tracenz.
8828
fd0d8c7c
YQ
88292011-11-02 Yao Qi <yao@codesourcery.com>
8830
8831 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8832
609086b1
YQ
88332011-11-02 Yao Qi <yao@codesourcery.com>
8834
8835 * target.h: Fix a typo in comment.
8836
b9fd1791
PA
88372011-10-31 Pedro Alves <pedro@codesourcery.com>
8838
8839 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8840 clobber the breakpoints' shadows with fast tracepoint jumps.
8841 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8842 * target.c (write_inferior_memory): Also pass MYADDR down to
8843 check_mem_write.
8844
03583c20
UW
88452011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8846
8847 * configure.ac: Check support for personality routine.
8848 * configure: Regenerate.
8849 * config.in: Likewise.
8850 * linux-low.c: Include <sys/personality.h>.
8851 Define ADDR_NO_RANDOMIZE if necessary.
8852 (linux_create_inferior): Disable address space randomization when
8853 forking inferior, if requested.
8854 (linux_supports_disable_randomization): New function.
8855 (linux_target_ops): Install it.
8856 * server.h (disable_randomization): Declare.
8857 * server.c (disable_randomization): New global variable.
8858 (handle_general_set): Handle QDisableRandomization.
8859 (handle_query): Likewise for qSupported.
8860 (main): Support --disable-randomization and --no-disable-randomization
8861 command line arguments.
8862 * target.h (struct target_ops): Add supports_disable_randomization.
8863 (target_supports_disable_randomization): New macro.
8864
723b724b
MF
88652011-09-29 Mike Frysinger <vapier@gentoo.org>
8866
8867 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8868 ifdef check.
8869 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8870 [!PT_GETDSBT] (target_loadmap): New definition.
8871 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8872 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8873 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8874 and PT_GETDSBT to LINUX_LOADMAP.
8875 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8876 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8877
55329a5c 88782011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8879
8880 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8881 (arm_linux_hwbp_cap): New static variable.
8882 (arm_linux_get_hwbp_cap): Replace by ...
8883 (arm_linux_init_hwbp_cap): ... this new function.
8884 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8885 (arm_linux_get_hw_watchpoint_count): Likewise.
8886 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8887 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8888 (arm_prepare_to_resume): Use perror_with_name instead of error.
8889
55329a5c 88902011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8891
8892 * linux-arm-low.c: Include <signal.h>.
8893 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8894 (struct arm_linux_hwbp_cap): New data type.
8895 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8896 (struct arm_linux_hw_breakpoint): New data type.
8897 (MAX_BPTS, MAX_WPTS): Define.
8898 (struct arch_process_info, struct arch_lwp_info): New data types.
8899 (arm_linux_get_hwbp_cap): New function.
8900 (arm_linux_get_hw_breakpoint_count): Likewise.
8901 (arm_linux_get_hw_watchpoint_count): Likewise.
8902 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8903 (arm_hwbp_control_initialize): Likewise.
8904 (arm_hwbp_control_is_enabled): Likewise.
8905 (arm_hwbp_control_is_initialized): Likewise.
8906 (arm_hwbp_control_disable): Likewise.
8907 (arm_linux_hw_breakpoint_equal): Likewise.
8908 (arm_linux_hw_point_initialize): Likewise.
8909 (struct update_registers_data): New data structure.
8910 (update_registers_callback: New function.
8911 (arm_insert_point): Likewise.
8912 (arm_remove_point): Likewise.
8913 (arm_stopped_by_watchpoint): Likewise.
8914 (arm_stopped_data_address): Likewise.
8915 (arm_new_process): Likewise.
8916 (arm_new_thread): Likewise.
8917 (arm_prepare_to_resume): Likewise.
8918 (the_low_target): Register arm_insert_point, arm_remove_point,
8919 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8920 arm_new_thread, and arm_prepare_to_resume.
8921
6b9801d4
SS
89222011-09-15 Stan Shebs <stan@codesourcery.com>
8923
8924 * server.h (struct emit_ops): Add compare-goto fields.
8925 * tracepoint.c (gdb_agent_op_sizes): New table.
8926 (emit_eq_goto): New function.
8927 (emit_ne_goto): New function.
8928 (emit_lt_goto): New function.
8929 (emit_le_goto): New function.
8930 (emit_gt_goto): New function.
8931 (emit_ge_goto): New function.
8932 (is_goto_target): New function.
8933 (compile_bytecodes): Recognize special cases of compare-goto
8934 combinations and call specialized emitters for them.
8935 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8936 (amd64_emit_ne_goto): New function.
8937 (amd64_emit_lt_goto): New function.
8938 (amd64_emit_le_goto): New function.
8939 (amd64_emit_gt_goto): New function.
8940 (amd64_emit_ge_goto): New function.
8941 (amd64_emit_ops): Add the new functions.
8942 (i386_emit_eq_goto): New function.
8943 (i386_emit_ne_goto): New function.
8944 (i386_emit_lt_goto): New function.
8945 (i386_emit_le_goto): New function.
8946 (i386_emit_gt_goto): New function.
8947 (i386_emit_ge_goto): New function.
8948 (i386_emit_ops): Add the new functions.
8949
bf15cbda
SS
89502011-09-08 Stan Shebs <stan@codesourcery.com>
8951
8952 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8953 (i386_emit_epilogue): Restore %ebx.
8954
943ca1dd
JZ
89552011-08-31 Jie Zhang <jzhang918@gmail.com>
8956
8957 * server.c (step_thread): Remove definition.
8958 (process_serial_event): Don't handle Hs.
8959 * server.h (step_thread): Remove declaration.
8960 * target.c (set_desired_inferior): Remove use of step_thread.
8961
e3deef73
LM
89622011-08-24 Luis Machado <lgustavo@codesourcery.com>
8963
8964 * linux-low.c: Include linux-procfs.h.
8965 (linux_attach_lwp_1): Update comments.
8966 (linux_attach): Scan for existing threads when attaching to a
8967 process that is the tgid.
8968 * Makefile.in: Update dependencies.
8969
13da1c97
LM
89702011-08-24 Luis Machado <lgustavo@codesourcery.com>
8971
8972 * configure.srv: Add linux-procfs.o dependencies.
8973
881127c9
YQ
89742011-08-14 Yao Qi <yao@codesourcery.com>
8975
8976 * target.h (struct target_ops): Fix indent.
8977 * win32-low.c (win32_target_ops): Fix comment.
8978
58dbd541
YQ
89792011-08-14 Andrew Jenner <andrew@codesourcery.com>
8980 Yao Qi <yao@codesourcery.com>
8981
8982 * Makefile.in (clean): Remove tic6x-*.c files.
8983 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8984 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8985 (tic6x-c64xp-linux.c): Likewise.
8986 * configure.srv: Add support for tic6x-*-uclinux.
8987 * linux-tic6x-low.c: New.
8988 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8989
78d85199
YQ
89902011-08-14 Andrew Stubbs <ams@codesourcery.com>
8991 Yao Qi <yao@codesourcery.com>
8992
8993 * target.h (struct target_ops): Add read_loadmap.
8994 * linux-low.c (struct target_loadseg): New type.
8995 (struct target_loadmap): New type.
8996 (linux_read_loadmap): New function.
8997 (linux_target_ops): Add linux_read_loadmap.
8998 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8999 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9000 to NULL.
78d85199 9001
a959a88d
EZ
90022011-08-05 Eli Zaretskii <eliz@gnu.org>
9003
9004 * win32-low.c: Include <stdint.h>.
9005
1ced966e
PA
90062011-07-22 Pedro Alves <pedro@codesourcery.com>
9007
9008 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9009 to the inferior here.
9010 (i386_remove_aligned_watchpoint): Ditto.
9011 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9012 fit part of the watchpoint in the debug registers.
9013 (i386_update_inferior_debug_regs): New.
9014 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9015 registers, and only update the inferior on success.
9016 (i386_low_remove_watchpoint): Ditto.
9017
d26e3629
KY
90182011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9019
9020 * linux-low.c (compare_ints, unique, list_threads, show_process,
9021 linux_core_of_thread): Delete.
9022 (linux_target_ops): Change linux_core_of_thread to
9023 linux_common_core_of_thread.
9024 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9025 * utils.c (malloc_failure): Change type of argument.
9026 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9027 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9028 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9029 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9030 (IPA_OBJS): Add common-utils-ipa.o.
9031 (ptid_h, linux_osdata_h): New macros.
9032 (server_h): Add common/common-utils.h, common/xml-utils.h,
9033 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9034 common/ptid.h.
9035 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9036 ptid.o, buffer.o): New rules.
9037 (linux-low.o): Add common/linux-osdata.h as a dependency.
9038 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9039 * configure.ac: Add AC_HEADER_DIRENT check.
9040 * config.in: Regenerate.
9041 * configure: Regenerate.
9042 * remote-utils.c (xml_escape_text): Delete.
9043 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9044 buffer_xml_printf): Move to common/buffer.c.
9045 * server.c (main): Remove call to initialize_inferiors.
9046 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9047 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9048 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9049 internal_error, gdb_assert, gdb_assert_fail): Delete.
9050 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9051 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9052 common/buffer.h.
9053 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9054 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9055 initialize_inferiors): Delete.
9056
2275a1a7
PA
90572011-07-20 Pedro Alves <pedro@codesourcery.com>
9058
9059 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9060 symbol error.
9061
0a5b1e09
PA
90622011-05-31 Pedro Alves <pedro@codesourcery.com>
9063
9064 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9065 assertion.
9066 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9067
6938fd34
YQ
90682011-05-26 Yao Qi <yao@codesourcery.com>
9069
9070 * Makefile.in (thread-db.o): Track dependence to
9071 common/gdb_thread_db.h.
9072 * thread-db.c: include gdb_thread_db.h from right place.
9073
b481f9e0
TT
90742011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9075
9076 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9077 __FILE__ and __LINE__ to internal_error.
9078
98a5dd13
DE
90792011-05-13 Doug Evans <dje@google.com>
9080
9081 * thread-db.c (try_thread_db_load_from_sdir): New function.
9082 (try_thread_db_load_from_dir): New function.
9083 (thread_db_load_search): Handle $sdir, ignore $pdir.
9084 Remove trying of system directories if search of
9085 libthread-db-search-path fails, that is now done via $sdir.
9086
d248b706
KY
90872011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9088
9089 * server.c (handle_query): Add EnableDisableTracepoints to the list
9090 of supported features.
43aaf8b6 9091 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9092 tracepoints.
43aaf8b6
PA
9093 (cmd_qtenable_disable): New.
9094 (cmd_qtstart): Install tracepoints even if disabled.
9095 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9096 receiving a QTEnable or QTDisable packet.
9097 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9098 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9099 tracepoints.
9100 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9101
84e578fb
DE
91022011-05-10 Doug Evans <dje@google.com>
9103
9104 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9105
71f55dd8
DE
91062011-05-04 Doug Evans <dje@google.com>
9107
9108 * linux-low.c (linux_join): Skip process lookup.
9109 * spu-low.c (spu_join): Ditto.
9110 * server.c (join_inferiors_callback): Delete.
9111 (process_serial_event): For 'D' packet (detach) call join_inferior
9112 directly.
9113
4d393d60
JM
91142011-05-04 Joseph Myers <joseph@codesourcery.com>
9115
9116 * README: Don't mention xscale*-*-linux*.
9117 * configure.srv (xscale*-*-linux*): Don't handle target.
9118
b00ad6ff
NF
91192011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9120
9121 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9122 casting pointers.
9123 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9124 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9125 (i386_emit_void_call_2): Likewise.
9126
af96c192
YQ
91272011-04-26 Yao Qi <yao@codesourcery.com>
9128
43aaf8b6
PA
9129 * linux-low.c: Move common macros to linux-ptrace.h.
9130 Include linux-ptrace.h.
af96c192
YQ
9131 * Makefile.in (linux_ptrace_h): New.
9132 (linux-low.o): Depends on linux-ptrace.h.
9133
03f2bd59
JK
91342011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9135
9136 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9137 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9138 (remote_prepare): New function with most of the TCP code from ...
9139 (remote_open): ... here. Detect PORT here unconditionally. Move also
9140 setting transport_is_reliable.
9141 * server.c (run_once): New variable.
9142 (gdbserver_usage): Document it.
9143 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9144 the first run if RUN_ONCE.
9145 * server.h (run_once, remote_prepare): New declarations.
9146
7a9dd1b2
TT
91472011-04-19 Tom Tromey <tromey@redhat.com>
9148
9149 * win32-low.c (handle_load_dll): Remove duplicate "the".
9150
81239425
PM
91512011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9152
9153 Remove support for old Cygwin 1.5 versions.
9154 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9155 function to avoid warning.
9156 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9157 warning.
9158
9e0627f1
PM
91592011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9160
9161 * gdbserver/server.h (Macro _): Define it if not available.
9162
588eebee
MS
91632011-03-14 Michael Snyder <msnyder@vmware.com>
9164
348af9f7 9165 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9166
43f70d4c
JB
91672011-03-10 Joel Brobecker <brobecker@adacore.com>
9168
9169 * Makefile.in (maintainer-clean realclean distclean): Remove
9170 "make ... subdir_do" command.
9171
348af9f7
MS
91722011-03-10 Michael Snyder <msnyder@vmware.com>
9173
9174 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9175
9176 * server.c (handle_v_run): Free alloced buffer on early return.
9177
e637a4f5
YQ
91782011-03-09 Yao Qi <yao@codesourcery.com>
9179
9180 Revert:
9181 2011-03-04 Yao Qi <yao@codesourcery.com>
9182
9183 * Makefile.in: Remove GNU make feature --directory.
9184
9185 2011-03-05 Yao Qi <yao@codesourcery.com>
9186
9187 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9188 (subdir_do): New make target. Copied from gdb/Makefile.
9189 (maintainer-clean, realclean, distclean, clean): Call corresponding
9190 make targets in common/Makefile.
9191
9192 2011-02-11 Yao Qi <yao@codesourcery.com>
9193
9194 * configure.ac: Call AC_PROG_RANLIB.
9195 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9196 * configure: Regenerate.
9197
e6edda56
JK
91982011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9199
9200 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9201
e5141119
JB
92022011-03-06 Yao Qi <yao@codesourcery.com>
9203
9204 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9205
64794aa4
JB
92062011-03-05 Yao Qi <yao@codesourcery.com>
9207
9208 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9209 (subdir_do): New make target. Copied from gdb/Makefile.
9210 (maintainer-clean, realclean, distclean, clean): Call corresponding
9211 make targets in common/Makefile.
9212
7a762829
YQ
92132011-03-04 Yao Qi <yao@codesourcery.com>
9214
9215 * Makefile.in: Remove GNU make feature --directory.
9216
348af9f7
MS
92172011-03-04 Michael Snyder <msnyder@vmware.com>
9218
9219 * server.c (queue_stop_reply): Call xmalloc not malloc.
9220
92212011-03-02 Michael Snyder <msnyder@vmware.com>
9222
9223 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9224
9f72fee2
MS
92252011-02-28 Michael Snyder <msnyder@vmware.com>
9226
588eebee
MS
9227 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9228 (cmd_qtframe): Ditto.
9229 (cmd_qtbuffer): Ditto.
9230 (cmd_bigqtbuffer): Ditto.
9231
9f72fee2
MS
9232 * utils.c (decimal2str): Initialize 'width' to nine, then
9233 don't mess with it.
9234
8040bd49
UW
92352011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9236
9237 * hostio.c (require_data): Free *data, not data.
9238
7e52cbd0
JK
92392011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9240
9241 * hostio.c (require_data): Use free, not xfree.
9242
9130f83e
MS
92432011-02-27 Michael Snyder <msnyder@vmware.com>
9244
4b812f4e
MS
9245 * server.c (handle_query): Discard unused value.
9246
9130f83e
MS
9247 * hostio.c (require_data): Free malloc memory before returning
9248 error.
9249
69d37113
MS
92502011-02-26 Michael Snyder <msnyder@vmware.com>
9251
9252 * linux-low.c (list_threads): Call closedir for dirent.
9253
35f5825a
MS
92542011-02-27 Michael Snyder <msnyder@vmware.com>
9255
2a589cef
MS
9256 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9257 a case statement falls through.
9258
0adea5f7
MS
9259 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9260
35f5825a
MS
9261 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9262 in comparison.
9263
238f1c74
MS
92642011-02-26 Michael Snyder <msnyder@vmware.com>
9265
9266 * utils.c (decimal2str): Eliminate dead code and dead param.
9267 (pulongest): Drop dead param from call to decimal2str.
9268 (plongest): Ditto.
9269
633ff500
JB
92702011-02-24 Joel Brobecker <brobecker@adacore.com>
9271
9272 Revert the following patch (not approved yet):
9273 2011-02-21 Hui Zhu <teawater@gmail.com>
9274 * tracepoint.c (tp_printf): New function.
9275 (eval_agent_expr): Handle gdb_agent_op_printf.
9276
f9c6ff72
HZ
92772011-02-21 Hui Zhu <teawater@gmail.com>
9278
9279 * tracepoint.c (tp_printf): New function.
9280 (eval_agent_expr): Handle gdb_agent_op_printf.
9281
94d5e490
TT
92822011-02-18 Tom Tromey <tromey@redhat.com>
9283
9284 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9285 (tracepoint.o): Likewise.
9286 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9287 (gdb_agent_op_names): Likewise.
9288
c7f96d2b
TT
92892011-02-18 Tom Tromey <tromey@redhat.com>
9290
9291 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9292 gdb_agent_op_rot>: New constants.
9293 (gdb_agent_op_names): Add pick and roll.
9294 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9295 cases.
9296
0feedb2c
JK
92972011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9298
9299 * aclocal.m4: Regenerated with aclocal-1.11.1.
9300
b3b9301e
PA
93012011-02-14 Pedro Alves <pedro@codesourcery.com>
9302
9303 * server.c (handle_qxfer_traceframe_info): New.
9304 (qxfer_packets): Register "traceframe-info".
9305 (handle_query): Report support for qXfer:traceframe-info:read+.
9306 * tracepoint.c (match_blocktype): New.
9307 (traceframe_find_block_type): Rename to ...
9308 (traceframe_walk_blocks): ... this. Add callback filter argument,
9309 and use it.
9310 (traceframe_find_block_type): New, reimplemented on top of
9311 traceframe_walk_blocks.
9312 (build_traceframe_info_xml): New.
9313 (traceframe_read_info): New.
9314 * server.h (traceframe_read_info): Declare.
9315
4f3e6fb7
YQ
93162011-02-11 Yao Qi <yao@codesourcery.com>
9317
9318 * configure.ac: Call AC_PROG_RANLIB.
9319 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9320 * configure: Regenerate.
9321
764880b7
PA
93222011-02-07 Pedro Alves <pedro@codesourcery.com>
9323
9324 * server.c (gdb_read_memory): Change return semantics to allow
9325 partial transfers.
9326 (handle_search_memory_1): Adjust.
9327 (process_serial_event) <'m' packet>: Handle partial transfers.
9328 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9329
1c79eb8a
PA
93302011-01-28 Pedro Alves <pedro@codesourcery.com>
9331
9332 * regcache.c (init_register_cache): Initialize
9333 regcache->register_status.
9334 (free_register_cache): Release regcache->register_status.
9335 (regcache_cpy): Copy register_status.
9336 (registers_to_string): Print 'x's for unavailable registers.
9337 (supply_register): Mark the register's status valid or
9338 unavailable, depending on whether a buffer was passed in or not.
9339 (supply_register_zeroed): New.
9340 (supply_regblock): Mark the registers' status valid or
9341 unavailable, depending on whether a buffer was passed in or not.
9342 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9343 (struct regcache): New `register_status' field.
9344 (supply_register_zeroed): Declare.
9345 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9346 supply_register_zeroed, rather than passing a NULL buffer to
9347 supply_register.
9348 * tracepoint.c (fetch_traceframe_registers): Update comment.
9349
85724a0e
PA
93502011-01-28 Pedro Alves <pedro@codesourcery.com>
9351
9352 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9353 buffer explicit.
9354
d08aafef
PA
93552011-01-25 Pedro Alves <pedro@codesourcery.com>
9356
9357 * server.h (decode_xfer_write): Change prototype.
9358 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9359 and don't extract the annex here.
9360 * server.c (decode_xfer_read): Remove `annex' parameter,
9361 and don't extract the annex here.
9362 (decode_xfer): New.
9363 (struct qxfer): New.
9364 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9365 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9366 (handle_qxfer_statictrace): New functions, abstracted out from
9367 handle_query, and made to use the struct qxfer interface.
9368 (handle_threads_qxfer_proper): Rename to ...
9369 (handle_qxfer_threads_proper): ... this.
9370 (handle_threads_qxfer): Rename to ...
9371 (handle_qxfer_threads): ... this. Adjust.
9372 (qxfer_packets): New array.
9373 (handle_qxfer): New function.
9374 (handle_query): Use handle_qxfer.
9375
493e2a69
MS
93762011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9377
9378 * gdbreplay.c: Shorten lines of >= 80 columns.
9379 * linux-low.c: Ditto.
9380 * linux-ppc-low.c: Ditto.
9381 * linux-s390-low.c: Ditto.
9382 * linux-sparc-low.c: Ditto.
9383 * linux-x86-low.c: Ditto.
9384 * linux-xtensa-low.c: Ditto.
9385 * mem-break.c: Ditto.
9386 * nto-low.c: Ditto.
9387 * regcache.h: Ditto.
9388 * remote-utils.c: Ditto.
9389 * server.c: Ditto.
9390 * server.h: Ditto.
9391 * thread-db.c: Ditto.
9392 * tracepoint.c: Ditto.
9393 * utils.c: Ditto.
9394 * win32-low.h: Ditto.
9395
44944448
JB
93962011-01-05 Joel Brobecker <brobecker@adacore.com>
9397
9398 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9399 update.
9400
71ce852c
JB
94012011-01-01 Joel Brobecker <brobecker@adacore.com>
9402
9403 * server.c (gdbserver_version): Update copyright year in version
9404 output.
9405 * gdbreplay.c (gdbreplay_version): Ditto.
9406
eb826dc6
MF
94072010-12-29 Jie Zhang <jie.zhang@analog.com>
9408
9409 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9410 * linux-bfin-low.c: New file.
9411 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9412 PT_DATA_ADDR for BFIN targets.
9413 * Makefile.in (SFILES): Add linux-bfin-low.c.
9414 (clean): Remove reg-bfin.c.
9415 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9416 * README: Mention supported Blackfin targets.
9417
39ab222a
MF
94182010-12-23 Mike Frysinger <vapier@gentoo.org>
9419
9420 * .gitignore: New file.
9421
a1f2ce7d
MF
94222010-11-16 Mike Frysinger <vapier@gentoo.org>
9423
9424 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9425
f474844c
JZ
94262010-10-22 Jie Zhang <jie@codesourcery.com>
9427
9428 * Makefile.in: Add FLAGS_TO_PASS variable.
9429 (install): Remove dependency of install-only and recursively
9430 invoke make for install-only.
9431
f1048712
DE
94322010-10-04 Doug Evans <dje@google.com>
9433
9434 * Makefile.in (uninstall): Use $(DESTDIR).
9435
b53a1623
PA
94362010-09-24 Pedro Alves <pedro@codesourcery.com>
9437
e6ee044d
PA
9438 PR gdb/11842
9439
b53a1623
PA
9440 * linux-x86-low.c (compat_siginfo_from_siginfo)
9441 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9442 si_code is < 0. Check for si_code == SI_TIMER before checking for
9443 si_code < 0.
9444
fa1bd1e4
JB
94452010-09-13 Joel Brobecker <brobecker@adacore.com>
9446
9447 * lynx-i386-low.c: New file.
9448 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9449
47fac8f8
JB
94502010-09-13 Joel Brobecker <brobecker@adacore.com>
9451
9452 * lynx-low.c (ptrace_request_to_str): Remove handling for
9453 request values that have been removed in LynxOS 5.x.
9454
1adfc54d
JB
94552010-09-13 Joel Brobecker <brobecker@adacore.com>
9456
9457 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9458 <ptrace.h>
9459
c2a66c29
NS
94602010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9461
9462 * configure.ac: Add --enable-inprocess-agent option.
9463 * configure: Rebuilt.
9464
32fcada3
YQ
94652010-09-06 Yao Qi <yao@codesourcery.com>
9466
9467 * linux-low.c (linux_kill): Remove unused variable.
9468 (linux_stabilize_threads): Likewise.
9469 * server.c (start_inferior): Likewise.
9470 (queue_stop_reply_callback): Likewise.
9471 * tracepoint.c (do_action_at_tracepoint): Likewise.
9472
0cccb683
YQ
94732010-09-06 Yao Qi <yao@codesourcery.com>
9474
9475 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9476 on return.
9477
423ec54c
JK
94782010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9479
9480 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9481
12ac6819
PA
94822010-09-06 Pedro Alves <pedro@codesourcery.com>
9483
9484 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9485 "$(IPA_DEPFILES)".
9486
8ed54b31
JB
94872010-09-01 Joel Brobecker <brobecker@adacore.com>
9488
9489 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9490 gdbserver/lynx-ppc-low.c: New files.
9491 * Makefile.in (lynx_low_h): New variable.
9492 (lynx-low.o, lynx-ppc-low.o): New rules.
9493 * configure.ac: On LynxOS, link with -lnetinet.
9494 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9495 * configure: regenerate.
9496
bb0116a4
JB
94972010-09-01 Joel Brobecker <brobecker@adacore.com>
9498
9499 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9500 * configure.ac: Add check for vasprintf and vsnprintf.
9501 * configure, config.in: Regenerate.
9502 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9503
a778ab81 95042010-09-01 Joel Brobecker <brobecker@adacore.com>
9505
9506 * gdbreplay.c: Move include of alloca.h up, next to include of
9507 malloc.h.
9508 * server.h: Add include of malloc.h.
9509 * mem-break.c: Remove include of malloc.h.
9510 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9511
8b034a19 95122010-09-01 Joel Brobecker <brobecker@adacore.com>
9513
9514 * Makefile.in (memmem.o): Build with -Wno-error.
9515
95162010-09-01 Joel Brobecker <brobecker@adacore.com>
9517
9518 * utils.c (xsnprintf): Make non-static.
9519 * server.h: Add xsnprintf declaration.
9520 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9521 replace calls to snprintf by calls to xsnprintf throughout.
9522
95232010-09-01 Joel Brobecker <brobecker@adacore.com>
9524
9525 * configure.ac: Add configure check for alloca.
9526 * configure, config.in: Regenerate.
9527 * server.h: Include alloca.h if it exists.
9528 * gdbreplay.c: Include alloca.h if it exists.
9529
1a981360
PA
95302010-08-28 Pedro Alves <pedro@codesourcery.com>
9531
9532 * linux-low.c (__SIGRTMIN): Define if not already defined.
9533 (linux_create_inferior): Check for __ANDROID__ rather than
9534 __SIGRTMIN.
9535 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9536 are already deferred.
9537 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9538 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9539 stopped and already has a pending signal to report.
9540 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9541 a pending signal to report or is moving out of a jump pad.
9542 (linux_init_signals): Check for __ANDROID__ rather than
9543 __SIGRTMIN.
9544
b4d51a55
PA
95452010-08-28 Pedro Alves <pedro@codesourcery.com>
9546
9547 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9548 debug_threads check. Avoid a linear search when not doing debug
9549 output.
9550
ec48365d
PA
95512010-08-27 Pedro Alves <pedro@codesourcery.com>
9552
9553 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9554 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9555 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9556 (process_event): Change local fd's type to gdb_fildes_t.
9557 (create_file_handler): Adjust prototype.
9558 (delete_file_handler): Adjust prototype.
9559 (handle_file_event): Adjust prototype. Use pfildes.
9560 (create_file_event): Adjsut prototype.
9561 * remote-utils.c (remote_desc, listen_desc): Change type to
9562 gdb_fildes_t.
9563 * server.h: New gdb_fildes_t typedef.
9564 [USE_WIN32API]: Include winsock2.h.
9565 (delete_file_handler, add_file_handler): Adjust prototypes.
9566 (pfildes): Declare.
9567 * utils.c (pfildes): New.
9568
854d88f0
PA
95692010-08-27 Pedro Alves <pedro@codesourcery.com>
9570
9571 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9572 * configure: Regenerate.
9573
0146f85b
PA
95742010-08-27 Pedro Alves <pedro@codesourcery.com>
9575
9576 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9577 (linux_done_accessing_memory): ... this.
9578 (linux_target_ops): Adjust.
9579 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9580 * nto-low.c (nto_target_ops): Adjust comment.
9581 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9582 * spu-low.c (spu_target_ops): Adjust comment.
9583 * target.h (target_ops): Rename unprepare_to_access_memory field
9584 to done_accessing_memory.
9585 (unprepare_to_access_memory): Rename to ...
9586 (done_accessing_memory): ... this.
9587
90d74c30
PA
95882010-08-26 Pedro Alves <pedro@codesourcery.com>
9589
9590 * linux-low.c (linux_prepare_to_access_memory): New.
9591 (linux_unprepare_to_access_memory): New.
9592 (linux_target_ops): Install them.
9593 * server.c (read_memory): Rename to ...
9594 (gdb_read_memory): ... this. Use
9595 prepare_to_access_memory/prepare_to_access_memory.
9596 (write_memory): Rename to ...
9597 (gdb_write_memory): ... this. Use
9598 prepare_to_access_memory/prepare_to_access_memory.
9599 (handle_search_memory_1): Adjust.
9600 (process_serial_event): Adjust.
9601 * target.h (struct target_ops): New fields
9602 prepare_to_access_memory and unprepare_to_access_memory.
9603 (prepare_to_access_memory, unprepare_to_access_memory): New.
9604 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9605 prepare_to_access_memory/prepare_to_access_memory.
9606 * nto-low.c (nto_target_ops): Adjust.
9607 * spu-low.c (spu_target_ops): Adjust.
9608 * win32-low.c (win32_target_ops): Adjust.
9609
fd467969
PA
96102010-08-26 Pedro Alves <pedro@codesourcery.com>
9611
9612 * Makefile.in (WARN_CFLAGS): Get it from configure.
9613 (WERROR_CFLAGS): New.
9614 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9615 * configure.ac: Introduce --enable-werror, which adds -Werror to
9616 the compiler command line. Enabled by default. Disable with
9617 --disable-werror. Add -Wdeclaration-after-statement
9618 Wpointer-arith and -Wformat-nonliteral to warning flags.
9619 * configure: Regenerate.
9620
331e2f5f
PA
96212010-08-26 Pedro Alves <pedro@codesourcery.com>
9622
9623 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9624
e581f2b4
PA
96252010-08-26 Pedro Alves <pedro@codesourcery.com>
9626
9627 * gdbreplay.c (remote_error): New.
9628 (gdbchar): New.
9629 (expect): Use gdbchar. Check for error reading from GDB.
9630 Clarify sync error output.
9631 (play): Check for errors writing to GDB.
9632 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9633 * remote-utils.c (getpkt): Check for errors writing to the remote
9634 descriptor.
9635
3c11dd79
PA
96362010-08-25 Pedro Alves <pedro@codesourcery.com>
9637
9638 * linux-low.c (linux_wait_1): Move non-debugging code out of
9639 `debug_threads' control.
9640
d20a8ad9
PA
96412010-08-25 Pedro Alves <pedro@codesourcery.com>
9642
9643 * linux-low.c (linux_wait_1): Don't set last_status here.
9644 * server.c (push_event, queue_stop_reply_callback): Assert we're
9645 not pushing a TARGET_WAITKIND_IGNORE event.
9646 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9647 (myresume, handle_target_event): Set the thread's last_resume_kind
9648 and last_status from the target returned status.
9649
964e4306
PA
96502010-08-25 Pedro Alves <pedro@codesourcery.com>
9651
9652 PR threads/10729
9653
9654 * linux-x86-low.c (update_debug_registers_callback): New.
9655 (i386_dr_low_set_addr): Use it.
9656 (i386_dr_low_get_addr): New.
9657 (i386_dr_low_set_control): Use update_debug_registers_callback.
9658 (i386_dr_low_get_control): New.
9659 (i386_dr_low_get_status): Adjust.
9660 * linux-low.c (linux_stop_lwp): New.
9661 * linux-low.h (linux_stop_lwp): Declare.
9662
9663 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9664 argument instead of a i386_debug_reg_state.
9665 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9666 a i386_debug_reg_state.
9667 (i386_insert_aligned_watchpoint): Adjust.
9668 (i386_remove_aligned_watchpoint): Adjust.
9669 (i386_low_stopped_data_address): Read the debug registers from the
9670 inferior instead of from the mirrors.
9671 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9672 (i386_dr_low_get_addr): Declare.
9673 (i386_dr_low_get_control): Declare.
9674 (i386_dr_low_get_status): Change prototype.
9675
9676 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9677 (i386_dr_low_get_addr): New.
9678 (i386_dr_low_get_control): New.
9679 (i386_dr_low_get_status): Adjust prototype. Return
9680 dr_status_mirror.
9681 (i386_initial_stuff): Clear dr_status_mirror and
9682 dr_control_mirror.
9683 (i386_get_thread_context): Adjust.
9684 (i386_set_thread_context): Adjust.
9685 (i386_thread_added): Adjust.
9686
5f21a75b
PA
96872010-08-24 Pedro Alves <pedro@codesourcery.com>
9688
9689 * linux-low.h (linux_thread_area): Delete declaration.
9690
3e4c1235
TS
96912010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9692
9693 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9694 after its termination.
9695
1971b033
PA
96962010-08-09 Pedro Alves <pedro@codesourcery.com>
9697
9698 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9699 (gdb_wants_all_stopped): Delete.
9700 (linux_wait_1): Don't call them.
9701 * server.c (handle_v_cont): Tag all threads as want-stopped.
9702 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9703 stopped as "client-wants-stopped".
9704
310444ac
PA
97052010-07-31 Pedro Alves <pedro@codesourcery.com>
9706
9707 * Makefile.in (signals_h): New.
9708 (server_h): Depend on it.
9709 (server.o): Don't depend on $(signals_def).
9710 (signals.o): Depend on $(signals_def).
9711
a19cae16
JK
97122010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9713
9714 * Makefile.in (signals_def): New.
9715 (server_h): Append include/gdb/signals.h and signals_def.
9716 (server.o): Append signals_def.
9717
30d50328
JK
97182010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9719
9720 * server.c (handle_target_event): Use target_signal_to_host for
9721 resume_info.sig initialization.
9722 * target.h (struct thread_resume) <sig>: New comment.
9723
5c3216e2
OS
97242010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9725
c6f46ca0
OS
9726 * server.c (handle_query): strcpy() the returned string from paddress()
9727 instead of sprintf().
5c3216e2
OS
9728 * utils.c (paddress): Return phex_nz().
9729
6bd31874
JB
97302010-07-07 Joel Brobecker <brobecker@adacore.com>
9731
9732 * server.c (handle_v_cont): Call mourn_inferior if process
9733 just exited.
9734 (myresume): Likewise.
9735
0fb4aa4b
PA
97362010-07-01 Pedro Alves <pedro@codesourcery.com>
9737
9738 Static tracepoints, and integration with UST.
9739
9740 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9741 * mem-break.c (uninsert_all_breakpoints)
9742 (reinsert_all_breakpoints): New.
9743 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9744 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9745 (gdb_agent_ust_loaded, helper_thread_id)
9746 (gdb_agent_helper_thread_id): New macros.
9747 (struct ipa_sym_addresses): Add addr_ust_loaded,
9748 addr_helper_thread_id, addr_cmd_buf.
9749 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9750 (in_process_agent_loaded_ust): New.
9751 (write_e_ust_not_loaded): New.
9752 (maybe_write_ipa_ust_not_loaded): New.
9753 (struct collect_static_trace_data_action): New.
9754 (enum tracepoint_type) <static_tracepoint>: New.
9755 (struct tracepoint) <handle>: Mention static tracepoints.
9756 (struct static_tracepoint_ctx): New.
9757 (CMD_BUF_SIZE): New.
9758 (add_tracepoint_action): Handle static tracepoint actions.
9759 (unprobe_marker_at): New.
9760 (clear_installed_tracepoints): Handle static tracepoints.
9761 (cmd_qtdp): Handle static tracepoints.
9762 (probe_marker_at): New.
9763 (cmd_qtstart): Handle static tracepoints.
9764 (response_tracepoint): Handle static tracepoints.
9765 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9766 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9767 (get_context_regcache): Handle static tracepoints.
9768 (do_action_at_tracepoint): Handle static tracepoint actions.
9769 (traceframe_find_block_type): Handle static trace data blocks.
9770 (traceframe_read_sdata): New.
9771 (download_tracepoints): Download static tracepoint actions.
9772 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9773 (GDB_PROBE_NAME): New.
9774 (ust_ops): New.
9775 (GET_UST_SYM): New.
9776 (USTF): New.
9777 (dlsym_ust): New.
9778 (ust_marker_to_static_tracepoint): New.
9779 (gdb_probe): New.
9780 (collect_ust_data_at_tracepoint): New.
9781 (gdb_ust_probe): New.
9782 (UNIX_PATH_MAX, SOCK_DIR): New.
9783 (gdb_ust_connect_sync_socket): New.
9784 (resume_thread, stop_thread): New.
9785 (run_inferior_command): New.
9786 (init_named_socket): New.
9787 (gdb_ust_socket_init): New.
9788 (cstr_to_hexstr): New.
9789 (next_st): New.
9790 (first_marker, next_marker): New.
9791 (response_ust_marker): New.
9792 (cmd_qtfstm, cmd_qtsstm): New.
9793 (unprobe_marker_at, probe_marker_at): New.
9794 (cmd_qtstmat, gdb_ust_thread): New.
9795 (gdb_ust_init): New.
9796 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9797 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9798 (ST_REGENTRY): New.
9799 (x86_64_st_collect_regmap): New.
9800 (X86_64_NUM_ST_COLLECT_GREGS): New.
9801 (AMD64_RIP_REGNUM): New.
9802 (supply_static_tracepoint_registers): New.
9803 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9804 (ST_REGENTRY): New.
9805 (i386_st_collect_regmap): New.
9806 (i386_NUM_ST_COLLECT_GREGS): New.
9807 (supply_static_tracepoint_registers): New.
9808 * server.c (handle_query): Handle qXfer:statictrace:read.
9809 <qSupported>: Report support for StaticTracepoints, and
9810 qXfer:statictrace:read features.
9811 * server.h (traceframe_read_sdata)
9812 (supply_static_tracepoint_registers): Declare.
9813 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9814 (unpack_varlen_hex): Include in IPA build.
9815 * Makefile.in (ustlibs, ustinc): New.
9816 (IPA_OBJS): Add remote-utils-ipa.o.
9817 ($(IPA_LIB)): Link -ldl and -lpthread.
9818 (UST_CFLAGS): New.
9819 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9820 * config.in, configure: Regenerate.
9821
9e4344e5
PA
98222010-06-20 Ian Lance Taylor <iant@google.com>
9823 Pedro Alves <pedro@codesourcery.com>
9824
9825 * linux-x86-low.c (always_true): Delete.
9826 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9827 trying to fool the compiler with always_true.
9828
c6beb2cb
PA
98292010-06-20 Pedro Alves <pedro@codesourcery.com>
9830
9831 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9832 conditions in gdbserver.
9833
d2ed6730
UW
98342010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9835
9836 * spu-low.c (spu_read_memory): Wrap around local store limit.
9837 (spu_write_memory): Likewise.
9838
4e29fb54
PA
98392010-06-15 Pedro Alves <pedro@codesourcery.com>
9840
9841 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9842 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9843 LONGEST uses.
9844 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9845 uses.
9846 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9847 uses with LONGEST uses.
9848
6a271cae
PA
98492010-06-14 Stan Shebs <stan@codesourcery.com>
9850 Pedro Alves <pedro@codesourcery.com>
9851
9852 Bytecode compiler.
9853
9854 * linux-x86-low.c: Include limits.h.
9855 (add_insns): New.
9856 (always_true): New.
9857 (EMIT_ASM): New.
9858 (EMIT_ASM32): New.
9859 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9860 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9861 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9862 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9863 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9864 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9865 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9866 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9867 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9868 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9869 (amd64_emit_void_call_2): New.
9870 (amd64_emit_ops): New.
9871 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9872 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9873 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9874 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9875 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9876 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9877 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9878 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9879 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9880 (i386_emit_stack_adjust, i386_emit_int_call_1)
9881 (i386_emit_void_call_2): New.
9882 (i386_emit_ops): New.
9883 (x86_emit_ops): New.
9884 (the_low_target): Install x86_emit_ops.
9885 * server.h (struct emit_ops): New.
9886 (get_raw_reg_func_addr): Declare.
9887 (current_insn_ptr, emit_error): Declare.
9888 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9889 (set_trace_state_variable_value): New defines.
9890 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9891 addr_get_trace_state_variable_value and
9892 addr_set_trace_state_variable_value.
9893 (symbol_list): New fields for get_raw_reg,
9894 get_trace_state_variable_value and set_trace_state_variable_value.
9895 (condfn): New typedef.
9896 (struct tracepoint): New field `compiled_cond'.
9897 (do_action_at_tracepoint): Clear compiled_cond.
9898 (get_trace_state_variable_value, set_trace_state_variable_value):
9899 Export in the IPA.
9900 (condition_true_at_tracepoint): If there's a compiled condition,
9901 run that.
9902 (current_insn_ptr, emit_error): New globals.
9903 (struct bytecode_address): New.
9904 (get_raw_reg_func_addr): New.
9905 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9906 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9907 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9908 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9909 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9910 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9911 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9912 (compile_tracepoint_condition, compile_bytecodes): New.
9913 * target.h (emit_ops): Forward declare.
9914 (struct target_ops): New field emit_ops.
9915 (target_emit_ops): New.
9916 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9917 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9918 * linux-low.c (linux_emit_ops): New.
9919 (linux_target_ops): Install it.
9920 * linux-low.h (struct linux_target_ops): New field emit_ops.
9921
92b72907
UW
99222010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9923
9924 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9925 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9926
fa593d66
PA
99272010-06-01 Pedro Alves <pedro@codesourcery.com>
9928 Stan Shebs <stan@codesourcery.com>
9929
9930 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9931 (all): Depend on $(extra_libraries).
9932 (install-only): Install the IPA.
9933 (IPA_OBJS, IPA_LIB): New.
9934 (clean): Remove the IPA lib.
9935 (IPAGENT_CFLAGS): New.
9936 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9937 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9938 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9939 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9940 * configure.ac: Check for atomic builtins support in the compiler.
9941 (IPA_DEPFILES, extra_libraries): Define.
9942 * configure.srv (ipa_obj): Add description.
9943 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9944 (i[34567]86-*-linux*): Set ipa_obj.
9945 (x86_64-*-linux*): Set ipa_obj.
9946 * linux-low.c (stabilizing_threads): New.
9947 (supports_fast_tracepoints): New.
9948 (linux_detach): Stabilize threads before detaching.
9949 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9950 the lwp is either not stabilizing, or is moving out of a jump pad.
9951 (linux_fast_tracepoint_collecting): New.
9952 (maybe_move_out_of_jump_pad): New.
9953 (enqueue_one_deferred_signal): New.
9954 (dequeue_one_deferred_signal): New.
9955 (linux_wait_for_event_1): If moving out of a jump pad, defer
9956 pending signals to later.
9957 (linux_stabilize_threads): New.
9958 (linux_wait_1): Check if threads need moving out of jump pads, and
9959 do it if so.
9960 (stuck_in_jump_pad_callback): New.
9961 (move_out_of_jump_pad_callback): New.
9962 (lwp_running): New.
9963 (linux_resume_one_lwp): Handle moving out of jump pads.
9964 (linux_set_resume_request): Dequeue deferred signals.
9965 (need_step_over_p): Also step over fast tracepoint jumps.
9966 (start_step_over): Also uninsert fast tracepoint jumps.
9967 (finish_step_over): Also reinsert fast tracepoint jumps.
9968 (linux_install_fast_tracepoint_jump): New.
9969 (linux_target_ops): Install linux_stabilize_threads and
9970 linux_install_fast_tracepoint_jump_pad.
9971 * linux-low.h (linux_target_ops) <get_thread_area,
9972 install_fast_tracepoint_jump_pad>: New fields.
9973 (struct lwp_info) <collecting_fast_tracepoint,
9974 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9975 (linux_get_thread_area): Declare.
9976 * linux-x86-low.c (jump_insn): New.
9977 (x86_get_thread_area): New.
9978 (append_insns): New.
9979 (push_opcode): New.
9980 (amd64_install_fast_tracepoint_jump_pad): New.
9981 (i386_install_fast_tracepoint_jump_pad): New.
9982 (x86_install_fast_tracepoint_jump_pad): New.
9983 (the_low_target): Install x86_get_thread_area and
9984 x86_install_fast_tracepoint_jump_pad.
9985 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9986 (struct fast_tracepoint_jump): New.
9987 (fast_tracepoint_jump_insn): New.
9988 (fast_tracepoint_jump_shadow): New.
9989 (find_fast_tracepoint_jump_at): New.
9990 (fast_tracepoint_jump_here): New.
9991 (delete_fast_tracepoint_jump): New.
9992 (set_fast_tracepoint_jump): New.
9993 (uninsert_fast_tracepoint_jumps_at): New.
9994 (reinsert_fast_tracepoint_jumps_at): New.
9995 (set_breakpoint_at): Use write_inferior_memory.
9996 (uninsert_raw_breakpoint): Use write_inferior_memory.
9997 (check_mem_read): Mask out fast tracepoint jumps.
9998 (check_mem_write): Mask out fast tracepoint jumps.
9999 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10000 (set_fast_tracepoint_jump): Declare.
10001 (delete_fast_tracepoint_jump)
10002 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10003 (reinsert_fast_tracepoint_jumps_at): Declare.
10004 * regcache.c: Don't compile many functions when building the
10005 in-process agent library.
10006 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10007 the register buffer in the heap.
10008 (free_register_cache): If the register buffer isn't owned by the
10009 regcache, don't free it.
10010 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10011 pre-existing register caches.
10012 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10013 type.
10014 (convert_ascii_to_int): : Constify `from' parameter type.
10015 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10016 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10017 the needed buffer in-place.
10018 (relocate_instruction): New.
10019 * server.c (handle_query) <qSymbols>: If the target supports
10020 tracepoints, give it a chance of looking up symbols. Report
10021 support for fast tracepoints.
10022 (handle_status): Stabilize threads.
10023 (process_serial_event): Adjust.
10024 * server.h (struct fast_tracepoint_jump): Forward declare.
10025 (struct process_info) <fast_tracepoint_jumps>: New field.
10026 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10027 (decode_X_packet, decode_M_packet): Adjust.
10028 (relocate_instruction): Declare.
10029 (in_process_agent_loaded): Declare.
10030 (tracepoint_look_up_symbols): Declare.
10031 (struct fast_tpoint_collect_status): Declare.
10032 (fast_tracepoint_collecting): Declare.
10033 (force_unlock_trace_buffer): Declare.
10034 (handle_tracepoint_bkpts): Declare.
10035 (initialize_low_tracepoint)
10036 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10037 * target.h (struct target_ops) <stabilize_threads,
10038 install_fast_tracepoint_jump_pad>: New fields.
10039 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10040 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10041 [HAVE_STDINT_H]: Include stdint.h.
10042 (trace_debug_1): Rename to ...
10043 (trace_vdebug): ... this.
10044 (trace_debug): Rename to ...
10045 (trace_debug_1): ... this. Add `level' parameter.
10046 (trace_debug): New.
10047 (ATTR_USED, ATTR_NOINLINE): New.
10048 (IP_AGENT_EXPORT): New.
10049 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10050 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10051 (about_to_request_buffer_space, trace_buffer_is_full)
10052 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10053 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10054 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10055 (traceframe_write_count, traceframes_created)
10056 (trace_state_variables)
10057 New renaming defines.
10058 (struct ipa_sym_addresses): New.
10059 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10060 (symbol_list): New.
10061 (ipa_sym_addrs): New.
10062 (all_tracepoint_symbols_looked_up): New.
10063 (in_process_agent_loaded): New.
10064 (write_e_ipa_not_loaded): New.
10065 (maybe_write_ipa_not_loaded): New.
10066 (tracepoint_look_up_symbols): New.
10067 (debug_threads) [IN_PROCESS_AGENT]: New.
10068 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10069 (UNKNOWN_SIDE_EFFECTS): New.
10070 (stop_tracing): New.
10071 (flush_trace_buffer): New.
10072 (stop_tracing_bkpt): New.
10073 (flush_trace_buffer_bkpt): New.
10074 (read_inferior_integer): New.
10075 (read_inferior_uinteger): New.
10076 (read_inferior_data_pointer): New.
10077 (write_inferior_data_pointer): New.
10078 (write_inferior_integer): New.
10079 (write_inferior_uinteger): New.
10080 (struct collect_static_trace_data_action): Delete.
10081 (enum tracepoint_type): New.
10082 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10083 <actions_str, step_actions, step_actions_str>: Only include in
10084 GDBserver.
fa593d66
PA
10085 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10086 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10087 (tracepoints): Use IP_AGENT_EXPORT.
10088 (last_tracepoint): Don't include in the IPA.
10089 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10090 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10091 (alloced_trace_state_variables): New.
10092 (trace_state_variables): Use IP_AGENT_EXPORT.
10093 (traceframe_t): Delete unused variable.
10094 (circular_trace_buffer): Don't include in the IPA.
10095 (trace_buffer_start): Delete.
10096 (struct trace_buffer_control): New.
10097 (trace_buffer_free): Delete.
10098 (struct ipa_trace_buffer_control): New.
10099 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10100 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10101 New.
10102 (trace_buffer_ctrl): New.
10103 (TRACE_BUFFER_CTRL_CURR): New.
10104 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10105 Reimplement as macros.
10106 (trace_buffer_wrap): Delete.
10107 (traceframe_write_count, traceframe_read_count)
10108 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10109 (struct tracepoint_hit_ctx) <type>: New field.
10110 (struct fast_tracepoint_ctx): New.
10111 (memory_barrier): New.
10112 (cmpxchg): New.
10113 (record_tracepoint_error): Update atomically in the IPA.
10114 (clear_inferior_trace_buffer): New.
10115 (about_to_request_buffer_space): New.
10116 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10117 updating the same buffer.
10118 (add_tracepoint): Default the tracepoint's type to trap
10119 tracepoint, and orig_size to -1.
10120 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10121 internal variables.
10122 (create_trace_state_variable): New parameter `gdb'. Handle it.
10123 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10124 (cmd_qtdp): Handle fast tracepoints.
10125 (cmd_qtdv): Adjust.
10126 (max_jump_pad_size): New.
10127 (gdb_jump_pad_head): New.
10128 (get_jump_space_head): New.
10129 (claim_jump_space): New.
10130 (sort_tracepoints): New.
10131 (MAX_JUMP_SIZE): New.
10132 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10133 IPA.
10134 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10135 support. Upload fast traceframes, and delete internal IPA
10136 breakpoints.
10137 (stop_tracing_handler): New.
10138 (flush_trace_buffer_handler): New.
10139 (cmd_qtstop): Upload fast tracepoints.
10140 (response_tracepoint): Handle fast tracepoints.
10141 (tracepoint_finished_step): Upload fast traceframes. Set the
10142 tracepoint hit context's tracepoint type.
10143 (handle_tracepoint_bkpts): New.
10144 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10145 type. Add comment about fast tracepoints.
10146 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10147 non-existing action_str field.
10148 (get_context_regcache): Handle fast tracepoints.
10149 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10150 to the regcache.
10151 (fast_tracepoint_from_jump_pad_address): New.
10152 (fast_tracepoint_from_ipa_tpoint_address): New.
10153 (collecting_t): New.
10154 (force_unlock_trace_buffer): New.
10155 (fast_tracepoint_collecting): New.
10156 (collecting): New.
10157 (gdb_collect): New.
10158 (write_inferior_data_ptr): New.
10159 (target_tp_heap): New.
10160 (target_malloc): New.
10161 (download_agent_expr): New.
10162 (UALIGN): New.
10163 (download_tracepoints): New.
10164 (download_trace_state_variables): New.
10165 (upload_fast_traceframes): New.
10166 (IPA_FIRST_TRACEFRAME): New.
10167 (IPA_NEXT_TRACEFRAME_1): New.
10168 (IPA_NEXT_TRACEFRAME): New.
10169 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10170 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10171 (gdb_jump_pad_buffer_end): New.
10172 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10173 (initialize_tracepoint): Adjust.
10174 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10175 buffer. Initialize the low module.
10176 * utils.c (PREFIX, TOOLNAME): New.
10177 (malloc_failure): Use PREFIX.
10178 (error): In the IPA, an error causes an exit.
10179 (fatal, warning): Use PREFIX.
10180 (internal_error): Use TOOLNAME.
10181 (NUMCELLS): Increase to 10.
10182 * configure, config.in: Regenerate.
10183
d149dd1d
PA
101842010-06-01 Pedro Alves <pedro@codesourcery.com>
10185
10186 * server.c (handle_query) <qSupported>: Do two passes over the
10187 qSupported string to avoid nesting strtok.
10188
f6528abd
JK
101892010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10190
10191 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10192 (CDEPS): New.
10193 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10194 -Wl,--dynamic-list.
10195 * configure: Regenerate.
10196 * proc-service.list: New.
10197
ca2a87a0
JK
101982010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10199
10200 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10201 New comment.
10202
363a6e9f
OS
102032010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10204
10205 * gdbreplay.c (remote_open): Check error return from socket() call by
10206 its equality to -1 not by it being negative.
10207 * remote-utils.c (remote_open): Likewise.
10208
d23b6cb1
PA
102092010-05-23 Pedro Alves <pedro@codesourcery.com>
10210
10211 * config.h: Regenerate.
10212
28d3cf85
MK
102132010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10214
10215 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10216 doesn't provide PTRACE_GET_THREAD_AREA.
10217
fea36a59
MK
102182010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10219
10220 * linux-m68k-low.c: Include <asm/ptrace.h>
10221 (ps_get_thread_area): Implement.
10222
24b066ba
DE
102232010-05-03 Doug Evans <dje@google.com>
10224
10225 * event-loop.c (struct callback_event): New struct.
10226 (callback_list): New global.
10227 (append_callback_event, delete_callback_event): New functions.
10228 (process_callback): New function.
10229 (start_event_loop): Call it.
10230 * remote-utils.c (NOT_SCHEDULED): Define.
10231 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10232 moved out of readchar.
10233 (readchar): Rewrite. Call reschedule before returning.
10234 (reset_readchar): New function.
10235 (remote_close): Call it.
10236 (process_remaining, reschedule): New functions.
10237 * server.h (callback_handler_func): New typedef.
10238 (append_callback_event, delete_callback_event): Declare.
10239
9836d6ea
PA
102402010-05-03 Pedro Alves <pedro@codesourcery.com>
10241
10242 * proc-service.c (ps_pglobal_lookup): Use
10243 thread_db_look_up_one_symbol.
10244 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10245 parameter. Use it instead of all_symbols_looked_up.
10246 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10247 field.
10248 (all_symbols_looked_up): Don't declare.
10249 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10250 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10251 field.
10252 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10253 Set all_symbols_looked_up here.
10254 (thread_db_look_up_one_symbol): New.
10255 (thread_db_get_tls_address): Adjust.
10256 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10257 thread_db object on the heap, and tentatively set it in the
10258 process structure.
10259 (thread_db_init): Don't set all_symbols_looked_up here.
10260 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10261
7984d532
PA
102622010-05-03 Pedro Alves <pedro@codesourcery.com>
10263
10264 * linux-low.c (linux_kill, linux_detach): Adjust.
10265 (status_pending_p_callback): Remove redundant statement. Check
10266 for !TARGET_WAITIKIND_IGNORE, instead of
10267 TARGET_WAITKIND_STOPPED.
10268 (handle_tracepoints): Make sure LWP is locked. Adjust.
10269 (linux_wait_for_event_1): Adjust.
10270 (linux_cancel_breakpoints): New.
10271 (unsuspend_one_lwp): New.
10272 (unsuspend_all_lwps): New.
10273 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10274 (send_sigstop_callback): Change return type to int, add new
10275 `except' parameter and handle it.
10276 (suspend_and_send_sigstop_callback): New.
10277 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10278 pass them down. If SUSPEND, also increment the lwp's suspend
10279 count.
10280 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10281 (need_step_over_p): Don't consider suspended LWPs.
10282 (start_step_over): Adjust.
10283 (proceed_one_lwp): Change return type to int, add new `except'
10284 parameter and handle it.
10285 (unsuspend_and_proceed_one_lwp): New.
10286 (proceed_all_lwps): Use find_inferior instead of
10287 for_each_inferior.
10288 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10289 also decrement the suspend count of LWPs. Pass `except' down,
10290 instead of hacking its suspend count.
10291 (linux_pause_all): Add `freeze' parameter. Adjust.
10292 (linux_unpause_all): New.
10293 (linux_target_ops): Install linux_unpause_all.
10294 * server.c (handle_status): Adjust.
10295 * target.h (struct target_ops): New fields `unpause_all' and
10296 `cancel_breakpoints'. Add new parameter to `pause_all'.
10297 (pause_all): Add new `freeze' parameter.
10298 (unpause_all): New.
10299 (cancel_breakpoints): New.
10300 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10301 cancel breakpoints.
10302 (cmd_qtstart): Pause threads.
10303 (stop_tracing): Pause threads, and cancel breakpoints.
10304 * win32-low.c (win32_target_ops): Adjust.
10305
e471f25b
PA
103062010-05-03 Pedro Alves <pedro@codesourcery.com>
10307
10308 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10309 the inferior right away from here...
10310 (linux_wait_1): ... to here, and adjust to check the thread's
10311 last_resume_kind instead of the lwp's step or stop_expected flags.
10312
1915ef4f
PA
103132010-05-02 Pedro Alves <pedro@codesourcery.com>
10314
10315 * README: Use consistent `GDB' and `GDBserver' spellings.
10316
f9e39928
PA
103172010-05-02 Pedro Alves <pedro@codesourcery.com>
10318
10319 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10320 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10321 (linux_detach_one_lwp): Assume the lwp is stopped.
10322 (any_thread_of): Delete.
10323 (linux_detach): Stop all lwps here. Don't blindly delete all
10324 breakpoints.
10325 (delete_lwp_callback): New.
10326 (linux_mourn): Delete all lwps of the process that is gone.
10327 (linux_wait_1): Don't delete the last lwp of the process here.
10328 * mem-break.h (mark_breakpoints_out): Declare.
10329 * mem-break.c (mark_breakpoints_out): New.
10330 (free_all_breakpoints): Use it.
10331 * server.c (handle_target_event): If the process is gone, mark
10332 breakpoints out.
10333 * thread-db.c (struct thread_db) <create_bp>: New field.
10334 (thread_db_enable_reporting): Fix prototype. Store a thread event
10335 breakpoint reference in the thread_db struct.
10336 (thread_db_load_search): Clear the thread_db object.
10337 (try_thread_db_load_1): Ditto.
10338 (switch_to_process): New.
10339 (disable_thread_event_reporting): Use it.
10340 (remove_thread_event_breakpoints): New.
10341 (thread_db_detach, thread_db_mourn): Use it.
10342
1e7fc18c
PA
103432010-05-01 Pedro Alves <pedro@codesourcery.com>
10344
10345 * linux-low.c (linux_enable_event_reporting): New.
10346 (linux_wait_for_event_1, handle_extended_wait): Use it.
10347
02fc4de7
PA
103482010-04-30 Pedro Alves <pedro@codesourcery.com>
10349
10350 * linux-low.c (linux_kill_one_lwp, linux_kill)
10351 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10352 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10353 SIGSTOP even if the LWP is stopped.
10354 (send_sigstop_callback): New.
10355 (stop_all_lwps): Use send_sigstop_callback instead.
10356 (linux_resume_one_thread): Adjust.
10357 (proceed_one_lwp): Still proceed an LWP that the client has
10358 requested to stop, if we haven't reported it as stopped yet. Make
10359 sure that LWPs the client want stopped, have a pending SIGSTOP.
10360
bc3b5632
DE
103612010-04-26 Doug Evans <dje@google.com>
10362
ae1ada35
DE
10363 * server.c (handle_general_set): Make static.
10364
bc3b5632
DE
10365 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10366 Print received char after testing for error/eof instead of before.
10367 (input_interrupt): Tweak comment.
10368
65730243
DE
103692010-04-23 Doug Evans <dje@google.com>
10370
10371 * server.c (start_inferior): Print inferior argv if --debug.
10372
a8ae7dc0
AR
103732010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10374
10375 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10376 * nto-x86-low.c: Include server.h
10377
1c07cc19
PM
103782010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10379
10380 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10381 be consistent with other sources of this directory.
10382 (init_registers_amd64): Correct name of source file of this function
10383 in the comment.
10384
e0a61e09
PM
103852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10386
10387 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10388 64-bit executables.
10389
54709339
PM
103902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10391
10392 * win32-i386-low.c: Add 64-bit support.
10393 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10394 (init_registers_amd64): Declare.
10395 (mappings): Add 64-bit version of array.
10396 (init_windows_x86): New function.
10397 (the_low_target): Change init_arch field to init_windows_x86.
10398
e8f0053d
PM
103992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10400
10401 * win32-low.c: Adapt to support also 64-bit architecture.
10402 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10403 (get_image_name): Use SIZE_T type for local variable `done'.
10404 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10405 (toolhelp_get_dll_name): Idem.
10406 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10407 Use uintptr_t typecast to avoid warning.
10408 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10409 (handle_exception): Use phex_nz to avoid warning.
10410 (win32_wait): Remove unused local variable `process'.
10411
c481e77e
PM
104122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10413
10414 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10415 `amd64-avx.o'.
10416
12ea4b69
PM
104172010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10418
10419 * configure.ac: Use `ws2_32' library for srv_mingw.
10420 * configure: Regenerate.
10421 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10422 * remote-utils.c: Likewise.
10423
f6d1620c
L
104242010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10425
10426 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10427 if __x86_64__ is defined.
10428
8e642873
PM
104292010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10430
10431 * configure: Regenerate.
10432
711e434b
PM
104332010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10434
10435 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10436 * target.h (target_ops): New get_tib_address field.
10437 * win32-low.h (win32_thread_info): Add thread_local_base field.
10438 * win32-low.c (child_add_thread): Add tlb argument.
10439 Set thread_local_base field to TLB.
10440 (get_child_debug_event): Adapt to child_add_thread change.
10441 (win32_get_tib_address): New function.
10442 (win32_target_ops): Set get_tib_address field to
10443 win32_get_tib_address.
10444 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10445
505106cd
PA
104462010-04-12 Pedro Alves <pedro@codesourcery.com>
10447
505106cd
PA
10448 * linux-low.c (linux_mourn): Also remove the process.
10449 * server.c (handle_target_event): Don't remove the process here.
10450 * nto-low.c (nto_mourn): New.
10451 (nto_target_ops): Install it.
10452 * spu-low.c (spu_mourn): New.
10453 (spu_target_ops): Install it.
10454 * win32-low.c (win32_mourn): New.
10455 (win32_target_ops): Install it.
10456
e8470a06
PA
104572010-04-12 Pedro Alves <pedro@codesourcery.com>
10458
10459 * server.h (buffer_xml_printf): Remove redundant `;'.
10460
45ba0d02
PA
104612010-04-12 Pedro Alves <pedro@codesourcery.com>
10462
10463 * regcache.c (set_register_cache): Invalidate regcaches before
10464 changing the register cache layout.
10465 (regcache_invalidate_one): Allow a NULL regcache.
10466 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10467 regcaches before changing the register cache layout or the target
10468 regsets.
10469
59e04013
L
104702010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10471
10472 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10473 variable warning on Linux/x86-64.
10474
8336d594
PA
104752010-04-11 Pedro Alves <pedro@codesourcery.com>
10476
10477 GDBserver disconnected tracing support.
10478
10479 * linux-low.c (linux_remove_process): Delete.
10480 (add_lwp): Don't set last_resume_kind here.
10481 (linux_kill): Use `mourn'.
10482 (linux_detach): Use `thread_db_detach', and `mourn'.
10483 (linux_mourn): New.
10484 (linux_attach_lwp_1): Adjust comment.
10485 (linux_attach): last_resume_kind moved the thread_info; adjust.
10486 (status_pending_p_callback): Adjust.
10487 (linux_wait_for_event_1): Adjust.
10488 (count_events_callback, select_singlestep_lwp_callback)
10489 (select_event_lwp_callback, cancel_breakpoints_callback)
10490 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10491 (proceed_one_lwp): Adjust.
10492 (linux_async): Add debug output.
10493 (linux_thread_stopped): New.
10494 (linux_pause_all): New.
10495 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10496 linux_pause_all.
10497 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10498 (thread_db_free): Delete declaration.
10499 (thread_db_detach, thread_db_mourn): Declare.
10500 * thread-db.c (thread_db_init): Use thread_db_mourn.
10501 (thread_db_free): Delete, split in two.
10502 (disable_thread_event_reporting): New.
10503 (thread_db_detach): New.
10504 (thread_db_mourn): New.
10505
10506 * server.h (struct thread_info) <last_resume_kind>: New field.
10507 <attached>: Add comment.
10508 <gdb_detached>: New field.
10509 (handler_func): Change return type to int.
10510 (handle_serial_event, handle_target_event): Ditto.
10511 (gdb_connected): Declare.
10512 (tracing): Delete.
10513 (disconnected_tracing): Declare.
10514 (stop_tracing): Declare.
10515
10516 * server.c (handle_query) <qSupported>: Report support for
10517 disconnected tracing.
10518 (queue_stop_reply_callback): Account for running threads.
10519 (gdb_wants_thread_stopped): New.
10520 (gdb_wants_all_threads_stopped): New.
10521 (gdb_reattached_process): New.
10522 (handle_status): Clear the `gdb_detached' flag of all processes.
10523 In all-stop, stop all threads.
10524 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10525 (process_serial_event): If the remote connection breaks, or if an
10526 exit was forced with "monitor exit", force an event loop exit.
10527 Handle disconnected tracing on detach.
10528 (handle_serial_event): Adjust.
10529 (handle_target_event): If GDB isn't connected, forward events back
10530 to the inferior, unless the last process exited, in which case,
10531 exit gdbserver. Adjust interface.
10532
10533 * remote-utils.c (remote_open): Don't block in accept. Instead
10534 register an event loop source on the listen socket file
10535 descriptor. Refactor bits into ...
10536 (listen_desc): ... this new global.
10537 (gdb_connected): ... this new function.
10538 (enable_async_notification): ... this new function.
10539 (handle_accept_event): ... this new function.
10540 (remote_close): Clear remote_desc.
10541
10542 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10543
10544 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10545 New fields.
10546 (mourn_inferior): Define.
10547 (target_process_qsupported): Avoid the dangling else problem.
10548 (thread_stopped): Define.
10549 (pause_all): Define.
10550 (target_waitstatus_to_string): Declare.
10551 * target.c (target_waitstatus_to_string): New.
10552
10553 * tracepoint.c (tracing): Make extern.
10554 (disconnected_tracing): New.
10555 (stop_tracing): Make extern. Handle tracing stops due to GDB
10556 disconnecting.
10557 (cmd_qtdisconnected): New.
10558 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10559 (handle_tracepoint_general_set): Handle QTDisconnected.
10560
10561 * event-loop.c (event_handler_func): Change return type to int.
10562 (process_event): Bail out if the event handler wants the event
10563 loop to stop.
10564 (handle_file_event): Ditto.
10565 (start_event_loop): Bail out if the event handler wants the event
10566 loop to stop.
10567
10568 * nto-low.c (nto_target_ops): Adjust.
10569 * spu-low.c (spu_wait): Don't remove the process here.
10570 (spu_target_ops): Adjust.
10571 * win32-low.c (win32_wait): Don't remove the process here.
10572 (win32_target_ops): Adjust.
10573
5d267c4c
PA
105742010-04-11 Pedro Alves <pedro@codesourcery.com>
10575
10576 * regcache.c (realloc_register_cache): Invalidate inferior's
10577 regcache before recreating it.
10578
623ccd72
PA
105792010-04-09 Pedro Alves <pedro@codesourcery.com>
10580
10581 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10582
219f2f23
PA
105832010-04-09 Stan Shebs <stan@codesourcery.com>
10584 Pedro Alves <pedro@codesourcery.com>
10585
10586 * server.h (LONGEST): New.
10587 (struct thread_info) <while_stepping>: New field.
10588 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10589 Declare.
10590 (initialize_tracepoint, handle_tracepoint_general_set)
10591 (handle_tracepoint_query, tracepoint_finished_step)
10592 (tracepoint_was_hit, release_while_stepping_state_list):
10593 (current_traceframe): Declare.
10594 * server.c (handle_general_set): Handle tracepoint packets.
10595 (read_memory): New.
10596 (write_memory): New.
10597 (handle_search_memory_1): Use read_memory.
10598 (handle_query): Report support for conditional tracepoints, trace
10599 state variables, and tracepoint sources. Handle tracepoint
10600 queries.
10601 (main): Initialize the tracepoints module.
10602 (process_serial_event): Handle traceframe reads/writes.
10603
10604 * linux-low.c (handle_tracepoints): New.
10605 (linux_wait_1): Call it.
10606 (linux_resume_one_lwp): Handle while-stepping.
10607 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10608 (linux_target_ops): Install them.
10609 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10610 New field.
10611 * linux-x86-low.c (x86_supports_tracepoints): New.
10612 (the_low_target). Install it.
10613
10614 * mem-break.h (delete_breakpoint): Declare.
10615 * mem-break.c (delete_breakpoint): Make external.
10616
10617 * target.h (struct target_ops): Add `supports_tracepoints',
10618 `read_pc', and `write_pc' fields.
10619 (target_supports_tracepoints): Define.
10620 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10621 (phex_nz): New.
10622
10623 * regcache.h (struct regcache) <registers_owned>: New field.
10624 (init_register_cache, regcache_cpy): Declare.
10625 (regcache_read_pc, regcache_write_pc): Declare.
10626 (register_cache_size): Declare.
10627 (supply_regblock): Declare.
10628 * regcache.c (init_register_cache): New.
10629 (new_register_cache): Use it.
10630 (regcache_cpy): New.
10631 (register_cache_size): New.
10632 (supply_regblock): New.
10633 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10634
219f2f23
PA
10635 * tracepoint.c: New.
10636
10637 * Makefile.in (OBS): Add tracepoint.o.
10638 (tracepoint.o): New rule.
10639
3a13a53b
L
106402010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10641
10642 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10643 (i386-mmx.o): New.
10644 (i386-mmx.c): Likewise.
10645 (i386-mmx-linux.o): Likewise.
10646 (i386-mmx-linux.c): Likewise.
10647
10648 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10649 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10650 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10651 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10652
10653 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10654 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10655 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10656
1570b33e
L
106572010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10658
10659 * Makefile.in (clean): Updated.
10660 (i386-avx.o): New.
10661 (i386-avx.c): Likewise.
10662 (i386-avx-linux.o): Likewise.
10663 (i386-avx-linux.c): Likewise.
10664 (amd64-avx.o): Likewise.
10665 (amd64-avx.c): Likewise.
10666 (amd64-avx-linux.o): Likewise.
10667 (amd64-avx-linux.c): Likewise.
10668
10669 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10670 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10671 (srv_amd64_regobj): Add amd64-avx.o.
10672 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10673 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10674 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10675 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10676 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10677 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10678 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10679
10680 * i387-fp.c: Include "i386-xstate.h".
10681 (i387_xsave): New.
10682 (i387_cache_to_xsave): Likewise.
10683 (i387_xsave_to_cache): Likewise.
10684 (x86_xcr0): Likewise.
10685
10686 * i387-fp.h (i387_cache_to_xsave): Likewise.
10687 (i387_xsave_to_cache): Likewise.
10688 (x86_xcr0): Likewise.
10689
10690 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10691 * linux-crisv32-low.c (target_regsets): Likewise.
10692 * linux-m68k-low.c (target_regsets): Likewise.
10693 * linux-mips-low.c (target_regsets): Likewise.
10694 * linux-ppc-low.c (target_regsets): Likewise.
10695 * linux-s390-low.c (target_regsets): Likewise.
10696 * linux-sh-low.c (target_regsets): Likewise.
10697 * linux-sparc-low.c (target_regsets): Likewise.
10698 * linux-xtensa-low.c (target_regsets): Likewise.
10699
10700 * linux-low.c: Include <sys/uio.h>.
10701 (regsets_fetch_inferior_registers): Support nt_type.
10702 (regsets_store_inferior_registers): Likewise.
10703 (linux_process_qsupported): New.
10704 (linux_target_ops): Add linux_process_qsupported.
10705
10706 * linux-low.h (regset_info): Add nt_type.
10707 (linux_target_ops): Add process_qsupported.
10708
10709 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10710 and <sys/uio.h>.
10711 (init_registers_i386_avx_linux): New.
10712 (init_registers_amd64_avx_linux): Likewise.
10713 (xmltarget_i386_linux_no_xml): Likewise.
10714 (xmltarget_amd64_linux_no_xml): Likewise.
10715 (PTRACE_GETREGSET): Likewise.
10716 (PTRACE_SETREGSET): Likewise.
10717 (x86_fill_xstateregset): Likewise.
10718 (x86_store_xstateregset): Likewise.
10719 (use_xml): Likewise.
10720 (x86_linux_update_xmltarget): Likewise.
10721 (x86_linux_process_qsupported): Likewise.
10722 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10723 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10724 init_registers_i386_linux here. Call
10725 x86_linux_update_xmltarget.
10726 (the_low_target): Add x86_linux_process_qsupported.
10727
10728 * server.c (handle_query): Call target_process_qsupported.
10729
10730 * target.h (target_ops): Add process_qsupported.
10731 (target_process_qsupported): New.
10732
fc7238bb
PA
107332010-04-03 Pedro Alves <pedro@codesourcery.com>
10734
10735 * inferiors.c (add_thread): Set last_status kind to
10736 TARGET_WAITKIND_IGNORE.
10737 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10738 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10739 (linux_wait_1): Move `thread' local definition to block that uses
10740 it. Don't NULL initialize `event_child'.
10741 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10742 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10743 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10744
bdabb078
PA
107452010-04-01 Pedro Alves <pedro@codesourcery.com>
10746
10747 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10748 an extended waitstatus, or by a watchpoint.
10749 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10750 thread was stepping or has been stopped by a watchpoint.
10751
d3bbe7a0
PA
107522010-04-01 Pedro Alves <pedro@codesourcery.com>
10753
10754 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10755 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10756 of another, then delete the previous, and validate all
10757 breakpoints.
10758 (validate_inserted_breakpoint): New.
10759 (delete_disabled_breakpoints): New.
10760 (validate_breakpoints): New.
10761 (check_mem_read): Validate breakpoints before trusting their
10762 shadow. Delete disabled breakpoints.
10763 (check_mem_write): Validate breakpoints before trusting they
10764 should be inserted. Delete disabled breakpoints.
10765 * mem-break.h (validate_breakpoints):
10766 * server.c (handle_query): Validate breakpoints when we see a
10767 qSymbol query.
10768
8b07ae33
PA
107692010-04-01 Pedro Alves <pedro@codesourcery.com>
10770
10771 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10772 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10773 if we could tell there's a GDB breakpoint at stop_pc.
10774 (need_step_over_p): Don't do a step over if we find a GDB
10775 breakpoint at the resume PC.
10776
10777 * mem-break.c (struct raw_breakpoint): New.
10778 (enum bkpt_type): New type `gdb_breakpoint'.
10779 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10780 fields. New field `raw'.
10781 (find_raw_breakpoint_at): New.
10782 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10783 breakpoint instead.
10784 (set_breakpoint_at): Adjust.
10785 (delete_raw_breakpoint): New.
10786 (release_breakpoint): New.
10787 (delete_breakpoint): Rename to...
10788 (delete_breakpoint_1): ... this. Add proc parameter. Use
10789 release_breakpoint. Return ENOENT.
10790 (delete_breakpoint): Reimplement.
10791 (find_breakpoint_at): Delete.
10792 (find_gdb_breakpoint_at): New.
10793 (delete_breakpoint_at): Delete.
10794 (set_gdb_breakpoint_at): New.
10795 (delete_gdb_breakpoint_at): New.
10796 (gdb_breakpoint_here): New.
10797 (set_reinsert_breakpoint): Use release_breakpoint.
10798 (uninsert_breakpoint): Rename to ...
10799 (uninsert_raw_breakpoint): ... this.
10800 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10801 (reinsert_raw_breakpoint): Change parameter type to
10802 raw_breakpoint.
10803 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10804 instead.
10805 (check_breakpoints): Adjust. Use release_breakpoint.
10806 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10807 (breakpoint_inserted_here): Ditto.
10808 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10809 Don't trust the breakpoint's shadow if it is not inserted.
10810 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10811 (delete_all_breakpoints): Adjust.
10812 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10813 use delete_breakpoint_1.
10814
10815 * mem-break.h (breakpoints_supported): Delete declaration.
10816 (set_gdb_breakpoint_at): Declare.
10817 (gdb_breakpoint_here): Declare.
10818 (delete_breakpoint_at): Delete.
10819 (delete_gdb_breakpoint_at): Declare.
10820
10821 * server.h (struct raw_breakpoint): Forward declare.
10822 (struct process_info): New field `raw_breakpoints'.
10823
10824 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10825 breakpoints.
10826
6bf5e0ba
PA
108272010-03-24 Pedro Alves <pedro@codesourcery.com>
10828
10829 * linux-low.c (status_pending_p_callback): Fix comment.
10830 (linux_wait_for_event_1): Move most of the internal breakpoint
10831 handling from here...
10832 (linux_wait_1): ... to here.
10833 (count_events_callback): New.
10834 (select_singlestep_lwp_callback): New.
10835 (select_event_lwp_callback): New.
10836 (cancel_breakpoints_callback): New.
10837 (select_event_lwp): New.
10838 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10839 priority to all LWPs that have had events that should be reported
10840 to the client. Cancel breakpoints when about to reporting the
10841 event to the client, not while stopping lwps. No longer cancel
10842 finished single-steps here.
10843 (cancel_finished_single_step): Delete.
10844 (cancel_finished_single_steps): Delete.
10845
414a389f
PA
108462010-03-24 Pedro Alves <pedro@codesourcery.com>
10847
10848 * mem-break.c (enum bkpt_type): New.
10849 (struct breakpoint): New field `type'.
10850 (set_breakpoint_at): Change return type to struct breakpoint
10851 pointer. Set type to `other_breakpoint' by default.
10852 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10853 in the breakpoint list.
10854 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10855 (reinsert_breakpoint): Rename to ...
10856 (reinsert_raw_breakpoint): ... this.
10857 (reinsert_breakpoints_at): Adjust.
10858 * mem-break.h (struct breakpoint): Declare.
10859 (set_breakpoint_at): Change return type to struct breakpoint
10860 pointer.
10861
2280c721
PA
108622010-03-24 Pedro Alves <pedro@codesourcery.com>
10863
10864 * server.c (handle_query): Assign, not compare.
10865
d50171e4
PA
108662010-03-24 Pedro Alves <pedro@codesourcery.com>
10867
10868 Teach linux gdbserver to step-over-breakpoints.
10869
10870 * linux-low.c (can_hardware_single_step): New.
10871 (supports_breakpoints): New.
10872 (handle_extended_wait): If stopping threads, read the stop pc of
10873 the new cloned LWP.
10874 (get_pc): New.
10875 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10876 low target doesn't support retrieving the PC.
10877 (add_lwp): Set last_resume_kind to resume_continue.
10878 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10879 (linux_attach): Don't clear stop_expected. Set the lwp's
10880 last_resume_kind to resume_stop.
10881 (linux_detach_one_lwp): Don't check for removed breakpoints.
10882 (check_removed_breakpoint): Delete.
10883 (status_pending_p): Rename to ...
10884 (status_pending_p_callback): ... this. Don't check for removed
10885 breakpoints. Don't consider threads that are stopped from GDB's
10886 perspective.
10887 (linux_wait_for_lwp): Always read the stop_pc here.
10888 (cancel_breakpoint): New.
10889 (step_over_bkpt): New global.
10890 (linux_wait_for_event_1): Implement stepping over breakpoints.
10891 (gdb_wants_lwp_stopped): New.
10892 (gdb_wants_all_stopped): New.
10893 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10894 single-step traps here. Store the thread's last reported target
10895 wait status.
10896 (send_sigstop): Don't clear stop_expected. Always set it,
10897 instead.
10898 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10899 (cancel_finished_single_step): New.
10900 (cancel_finished_single_steps): New.
10901 (wait_for_sigstop): Don't cancel finished single-step traps here.
10902 (linux_resume_one_lwp): Don't check for removed breakpoints.
10903 Don't set `step' on non-hardware step archs.
10904 (linux_set_resume_request): Ignore resume_stop requests if already
10905 stopping or stopped. Set the lwp's last_resume_kind.
10906 (resume_status_pending_p): Don't check for removed breakpoints.
10907 (need_step_over_p): New.
10908 (start_step_over): New.
10909 (finish_step_over): New.
10910 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10911 requests. Clear the thread's last reported target waitstatus.
10912 Don't use the `suspended' flag. Don't consider pending breakpoints.
10913 (linux_resume): Start a step-over if necessary.
10914 (proceed_one_lwp): New.
10915 (proceed_all_lwps): New.
10916 (unstop_all_lwps): New.
10917 * linux-low.h (struct lwp_info): Rewrite comment for the
10918 `suspended' flag. Add the `stop_pc' field. Delete the
10919 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10920 Add `'last_resume_kind' and `need_step_over' fields.
10921 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10922 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10923 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10924 (set_raw_breakpoint_at): New.
10925 (set_breakpoint_at): Rewrite to use it.
10926 (reinsert_breakpoint_handler): Delete.
10927 (set_reinsert_breakpoint): New.
10928 (reinsert_breakpoint_by_bp): Delete.
10929 (delete_reinsert_breakpoints): New.
10930 (uninsert_breakpoint): Rewrite.
10931 (uninsert_breakpoints_at): New.
10932 (reinsert_breakpoint): Rewrite.
10933 (reinsert_breakpoints_at): New.
10934 (check_breakpoints): Rewrite.
10935 (breakpoint_here): New.
10936 (breakpoint_inserted_here): New.
10937 (check_mem_read): Adjust.
10938 * mem-break.h (breakpoints_supported, breakpoint_here)
10939 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10940 (reinsert_breakpoint_by_bp): Delete declaration.
10941 (delete_reinsert_breakpoints): Declare.
10942 (reinsert_breakpoint): Delete declaration.
10943 (reinsert_breakpoints_at): Declare.
10944 (uninsert_breakpoint): Delete declaration.
10945 (uninsert_breakpoints_at): Declare.
10946 (check_breakpoints): Adjust prototype.
10947 * server.h: Adjust include order.
10948 (struct thread_info): Declare here. Add a `last_status' field.
10949
30ba68cb
MS
109502010-03-23 Michael Snyder <msnyder@vmware.com>
10951
10952 * server.c (crc32): New function.
10953 (handle_query): Add handling for 'qCRC:' request.
10954
b9a881c2
PA
109552010-03-23 Pedro Alves <pedro@codesourcery.com>
10956
10957 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10958 lwp had been stopped by a watchpoint.
10959
e92d13d5
PA
109602010-03-16 Pedro Alves <pedro@codesourcery.com>
10961
10962 * server.h (internal_error): Declare.
10963 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10964 * utils.c (internal_error): New function.
10965
64daa791
AS
109662010-03-15 Andreas Schwab <schwab@redhat.com>
10967
10968 * configure.srv: Fix typo setting srv_regobj.
10969
f52cd8cd
PA
109702010-03-15 Pedro Alves <pedro@codesourcery.com>
10971
10972 * linux-low.c (fetch_register): Avoid passing a non string literal
10973 format to `error'.
10974 (usr_store_inferior_registers): Ditto.
10975
93ae6fdc
PA
109762010-03-14 Pedro Alves <pedro@codesourcery.com>
10977
10978 * linux-low.c (linux_write_memory): Bail out early if peeking
10979 memory failed.
10980
c3adc08c
PA
109812010-03-14 Pedro Alves <pedro@codesourcery.com>
10982
10983 * linux-low.h (struct lwp_info): New fields
10984 `stopped_by_watchpoint' and `stopped_data_address'.
10985 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10986 here, and cache them in the lwp object.
10987 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10988 directly.
10989 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10990 field.
10991 (linux_stopped_by_watchpoint): Rewrite.
10992 (linux_stopped_data_address): Rewrite.
10993
bce522a2
PA
109942010-03-06 Simo Melenius <simo.melenius@iki.fi>
10995
10996 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10997 switching the current inferior, not before.
10998
90884b2b
L
109992010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11000
11001 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11002 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11003 i386-linux.c and amd64-linux.c.
11004 (reg-i386.o): Removed.
11005 (reg-i386.c): Likewise.
11006 (reg-i386-linux.o): Likewise.
11007 (reg-i386-linux.c): Likewise.
11008 (reg-x86-64.o): Likewise.
11009 (reg-x86-64.c): Likewise.
11010 (reg-x86-64-linux.o): Likewise.
11011 (reg-x86-64-linux.c): Likewise.
11012 (i386.o): New.
11013 (i386.c): Likewise.
11014 (i386-linux.o): Likewise.
11015 (i386-linux.c): Likewise.
11016 (amd64.o): Likewise.
11017 (amd64.c): Likewise.
11018 (amd64-linux.o): Likewise.
11019 (amd64-linux.c): Likewise.
11020
11021 * configure.srv (srv_i386_regobj): New.
11022 (srv_i386_linux_regobj): Likewise.
11023 (srv_amd64_regobj): Likewise.
11024 (srv_amd64_linux_regobj): Likewise.
11025 (srv_i386_32bit_xmlfiles): Likewise.
11026 (srv_i386_64bit_xmlfiles): Likewise.
11027 (srv_i386_xmlfiles): Likewise.
11028 (srv_amd64_xmlfiles): Likewise.
11029 (srv_i386_linux_xmlfiles): Likewise.
11030 (srv_amd64_linux_xmlfiles): Likewise.
11031 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11032 srv_xmlfiles to $srv_i386_xmlfiles.
11033 (i[34567]86-*-mingw32ce*): Likewise.
11034 (i[34567]86-*-mingw*): Likewise.
11035 (i[34567]86-*-nto*): Likewise.
11036 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11037 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11038 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11039 (x86_64-*-linux*): Likewise.
11040
11041 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11042 (init_registers_amd64_linux): New.
11043 (x86_arch_setup): Replace init_registers_x86_64_linux with
11044 init_registers_amd64_linux.
11045
193f13e6
MK
110462010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11047
11048 * configure.ac: Check for libdl. If it is not available link against
11049 static libthread_db.
11050 * configure: Regenerate.
11051
85d721b8
PA
110522010-02-22 Pedro Alves <pedro@codesourcery.com>
11053
11054 PR9605
11055
11056 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11057 handing a read watchpoint.
11058 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11059
6076632b
DE
110602010-02-12 Doug Evans <dje@google.com>
11061
11062 * linux-low.c (linux_supports_tracefork_flag): Document.
11063 (linux_look_up_symbols): Add comment.
11064
3327ccf7
L
110652010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11066
11067 * regcache.c (supply_register): Clear regcache if buf is NULL.
11068
0718675c 110692010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11070 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11071
11072 * inferiors.c (find_inferior): Add function documentation.
11073 (unloaded_dll): Handle the case where the unloaded dll has not
11074 been previously registered in the dll list.
11075
177321bd
DJ
110762010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11077
11078 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11079 (thumb2_breakpoint): New.
11080 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11081
2b009048
DJ
110822010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11083
11084 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11085 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11086 breakpoints.
11087
3be029c7
PA
110882010-01-21 Pedro Alves <pedro@codesourcery.com>
11089
11090 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11091
18f5de3b
JK
110922010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11093
11094 * linux-s390-low.c (s390_collect_ptrace_register)
11095 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11096
3743bb4f
DE
110972010-01-21 Doug Evans <dje@google.com>
11098
14ce3065
DE
11099 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11100 (PTRACE_ARG4_TYPE): New macro.
11101 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11102 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11103 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11104 (usr_store_inferior_registers): Ditto.
11105 (linux_read_memory, linux_write_memory): Ditto.
11106 (linux_test_for_tracefork): Ditto.
11107
3743bb4f
DE
11108 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11109 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11110
8b315be5
PA
111112010-01-21 Pedro Alves <pedro@codesourcery.com>
11112
11113 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11114 target.
11115
85492558
PA
111162010-01-21 Pedro Alves <pedro@codesourcery.com>
11117
11118 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11119 prototype to take a regcache. Adjust.
11120
442ea881
PA
111212010-01-20 Pedro Alves <pedro@codesourcery.com>
11122
11123 * regcache.h (struct thread_info): Forward declare.
11124 (struct regcache): New.
11125 (new_register_cache): Adjust prototype.
11126 (get_thread_regcache): Declare.
11127 (free_register_cache): Adjust prototype.
11128 (registers_to_string, registers_from_string): Ditto.
11129 (supply_register, supply_register_by_name, collect_register)
11130 (collect_register_as_string, collect_register_by_name): Ditto.
11131 * regcache.c (struct inferior_regcache_data): Delete.
11132 (get_regcache): Rename to ...
11133 (get_thread_regcache): ... this. Adjust. Switch inferior before
11134 fetching registers.
11135 (regcache_invalidate_one): Adjust.
11136 (regcache_invalidate): Fix prototype.
11137 (new_register_cache): Return the new register cache.
11138 (free_register_cache): Change prototype.
11139 (realloc_register_cache): Adjust.
11140 (registers_to_string): Change prototype to take a regcache. Adjust.
11141 (registers_from_string): Ditto.
11142 (register_data): Ditto.
11143 (supply_register): Ditto.
11144 (supply_register_by_name): Ditto.
11145 (collect_register): Ditto.
11146 (collect_register_as_string): Ditto.
11147 (collect_register_by_name): Ditto.
11148 * server.c (process_serial_event): Adjust.
11149 * linux-low.h (regset_fill_func, regset_store_func): Change
11150 prototype.
11151 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11152 Change prototype.
11153 * linux-low.c (get_stop_pc): Adjust.
11154 (check_removed_breakpoint): Adjust.
11155 (linux_wait_for_event): Adjust.
11156 (linux_resume_one_lwp): Adjust.
11157 (fetch_register): Add regcache parameter. Adjust.
11158 (usr_store_inferior_registers): Ditto.
11159 (regsets_fetch_inferior_registers): Ditto.
11160 (regsets_store_inferior_registers): Ditto.
11161 (linux_fetch_registers, linux_store_registers): Ditto.
11162 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11163 regcache. Adjust.
43aaf8b6
PA
11164 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11165 Ditto.
442ea881
PA
11166 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11167 prototype to take a regcache.
11168 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11169 * remote-utils.c (convert_ascii_to_int, outreg)
11170 (prepare_resume_reply): Change prototype to take a regcache.
11171 Adjust.
11172 * target.h (struct target_ops) <fetch_registers, store_registers>:
11173 Change prototype to take a regcache.
11174 (fetch_inferior_registers, store_inferior_registers): Change
11175 prototype to take a regcache. Adjust.
11176 * proc-service.c (ps_lgetregs): Adjust.
11177 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11178 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11179 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11180 take a regcache. Adjust.
11181 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11182 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11183 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11184 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11185 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11186 (cris_cannot_fetch_register):
11187 (cris_breakpoint_at): Change prototype to take a regcache.
11188 Adjust.
11189 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11190 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11191 to take a regcache. Adjust.
11192 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11193 Adjust.
11194 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11195 take a regcache. Adjust.
11196 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11197 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11198 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11199 * linux-mips-low.c (mips_get_pc):
11200 (mips_set_pc): Change prototype to take a regcache. Adjust.
11201 (mips_reinsert_addr): Adjust.
11202 (mips_collect_register): Change prototype to take a regcache.
11203 Adjust.
11204 (mips_supply_register):
11205 (mips_collect_register_32bit, mips_supply_register_32bit)
11206 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11207 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11208 * linux-ppc-low.c (ppc_supply_ptrace_register)
11209 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11210 (parse_spufs_run): Adjust.
11211 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11212 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11213 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11214 take a regcache. Adjust.
11215 * linux-s390-low.c (s390_collect_ptrace_register)
11216 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11217 (s390_set_pc): Change prototype to take a regcache. Adjust.
11218 (s390_arch_setup): Adjust.
11219 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11220 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11221 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11222 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11223 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11224 regcache. Adjust.
11225 (sparc_breakpoint_at): Adjust.
11226 * linux-xtensa-low.c (xtensa_fill_gregset):
11227 (xtensa_store_gregset):
11228 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11229 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11230 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11231 prototype to take a regcache. Adjust.
11232 * win32-arm-low.c (arm_fetch_inferior_register)
11233 (arm_store_inferior_register): Change prototype to take a
11234 regcache. Adjust.
11235 * win32-i386-low.c (i386_fetch_inferior_register)
11236 (i386_store_inferior_register): Change prototype to take a
11237 regcache. Adjust.
11238 * win32-low.c (child_fetch_inferior_registers)
11239 (child_store_inferior_registers): Change prototype to take a
11240 regcache. Adjust.
11241 (win32_wait): Adjust.
11242 (win32_fetch_inferior_registers): Change prototype to take a
11243 regcache. Adjust.
11244 (win32_store_inferior_registers): Adjust.
11245 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11246 store_inferior_register>: Change prototype to take a regcache.
11247
60c3d7b0
DE
112482010-01-20 Doug Evans <dje@google.com>
11249
11250 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11251 #ifdef.
11252 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11253 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11254
dc146f7c
VP
112552010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11256
11257 * linux-low.c (linux_core_of_thread): New.
11258 (compare_ints, show_process, list_threads): New.
11259 (linux_qxfer_osdata): Report threads and cores.
11260 (linux_target_op): Register linux_core_of_thread.
11261 * remote-utils.c (prepare_resume_reply): Report the core.
11262 (buffer_xml_printf): Support %d specifier.
11263 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11264 New.
11265 (handle_query): Handle qXfer:threads. Announce availability
11266 thereof.
11267 * target.h (struct target_ops): New field core_of_thread.
11268
7803799a
UW
112692010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11270
11271 * Makefile.in (clean): Remove new generated files.
11272 (reg-s390.o, reg-s390.c): Remove rules.
11273 (reg-s390x.o, reg-s390x.c): Likewise.
11274 (s390-linux32.o, s390-linux32.c): Add rules.
11275 (s390-linux64.o, s390-linux64.c): Likewise.
11276 (s390x-linux64.o, s390x-linux64.c): Likewise.
11277 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11278 * linux-s390-low.c: Include <elf.h>.
11279 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11280 (init_registers_s390): Remove prototype.
11281 (init_registers_s390x): Likewise.
11282 (init_registers_s390_linux32): Add prototype.
11283 (init_registers_s390_linux64): Likewise.
11284 (init_registers_s390x_linux64): Likewise.
11285 (s390_num_regs_3264): New define.
11286 (s390_regmap_3264): New global variable.
11287 (s390_cannot_fetch_register): Remove obsolete check.
11288 (s390_cannot_store_register): Likewise.
11289 (s390_collect_ptrace_register): Handle upper/lower register halves.
11290 (s390_supply_ptrace_register): Likewise.
11291 (s390_fill_gregset): Update to register number changes.
11292 (s390_get_hwcap): New routine.
11293 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11294 Install appropriate regmap and register set.
11295
6e7ffa39
JB
112962010-01-01 Joel Brobecker <brobecker@adacore.com>
11297
11298 * server.c (gdbserver_version): Update copyright year to 2010.
11299 * gdbreplay.c (gdbreplay_version): Likewise.
11300
957f3f49
DE
113012009-12-28 Doug Evans <dje@google.com>
11302
11303 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11304 elf/external.h. Include <elf.h> instead but only if necessary.
11305
ca5c370d
PA
113062009-12-28 Pedro Alves <pedro@codesourcery.com>
11307
11308 * linux-low.c (linux_remove_process): Remove `detaching'
11309 parameter. Don't release/detach from thread_db here.
11310 (linux_kill): Release/detach from thread_db here, ...
11311 (linux_detach): ... and here, before actually detaching.
11312 (linux_wait_1): ... and here, when a process exits.
11313 * thread-db.c (any_thread_of): New.
11314 (thread_db_free): Switch the current inferior to a thread of the
11315 passed in process.
11316
4ee62156
DE
113172009-12-21 Doug Evans <dje@google.com>
11318
d90e6a88
DE
11319 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11320
c5f62d5f
DE
11321 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11322 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11323 warning ifndef __NR_tkill. Move setting of errno there too.
11324 Delete unnecessary resetting of errno after syscall.
11325 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11326
10e86dd7
DE
11327 * configure.ac: Check for dladdr.
11328 * config.in: Regenerate.
11329 * configure: Regenerate.
11330 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11331 (try_thread_db_load): Update.
11332
4ee62156
DE
11333 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11334
00f515da
DE
113352009-12-18 Doug Evans <dje@google.com>
11336
e9464885
DE
11337 * event-loop.c: Include unistd.h if it exists.
11338
07d4f67e
DE
11339 * linux-low.c (my_waitpid): Move definition away from being in
11340 between linux_tracefork_child/linux_test_for_tracefork.
11341
00f515da
DE
11342 * gdb_proc_service.h (psaddr_t): Fix type.
11343 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11344 signature to match glibc.
11345
1de1badb
DE
113462009-12-16 Doug Evans <dje@google.com>
11347
11348 * linux-low.c (linux_read_memory): Fix argument to read.
11349
aeeb81d1
PA
113502009-11-26 Pedro Alves <pedro@codesourcery.com>
11351
11352 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11353 events, don't leave current_inferior pointing at null.
11354
10357975
PA
113552009-11-26 Pedro Alves <pedro@codesourcery.com>
11356
11357 * win32-low.c (LOG): Delete.
11358 (OUTMSG): Output to stderr.
11359 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11360 on compile time LOG macro.
11361 (win32_wait): Fix debug output.
11362
cf6e3471
PA
113632009-11-26 Pedro Alves <pedro@codesourcery.com>
11364
11365 * win32-low.c (win32_add_one_solib): If the dll name is
11366 "ntdll.dll", prepend the system directory to the dll path.
11367
0c85e18e
MK
113682009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11369
11370 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11371
9ac544ce 113722009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11373 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11374
11375 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11376 * configure.ac: Check for __mcoldfire__ and set
11377 gdb_cv_m68k_is_coldfire.
11378 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11379 reg-cf.o and reg-m68k.o.
11380 * configure: Regenerated.
11381
fd7dd3e6
PA
113822009-11-16 Pedro Alves <pedro@codesourcery.com>
11383
11384 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11385 Pass it to thread_db_free.
11386 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11387 proper `detaching' argument to linux_remove_process.
11388 * linux-low.h (thread_db_free): Add `detaching' parameter.
11389 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11390 to thread_db_free.
11391 (thread_db_free): Add `detaching' parameter. Only
11392 call td_ta_clear_event if detaching from process.
11393
75aa492e
MK
113942009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11395
11396 * thread-db.c (thread_db_free): Fix typo.
11397
21e1bee4
PP
113982009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11399
11400 PR gdb/10838
11401 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11402
8838b45e
NS
114032009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11404
11405 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11406 with an i686 compiler.
11407 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11408 needed.
11409 * configure: Rebuilt.
11410
8a35fb51
SL
114112009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11412
11413 PR gdb/10783
11414
11415 * server.c (handle_search_memory_1): Correct read_addr initialization
11416 in loop for searching subsequent chunks.
11417
96f15937
PP
114182009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11419
11420 * configure.ac: New --with-libthread-db option.
11421 * thread-db.c: Allow direct dependence on libthread_db.
11422 (thread_db_free): Adjust.
11423 * config.in: Regenerate.
11424 * configure: Likewise.
889bf7c5 11425
5f7d1694
PP
114262009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11427
11428 PR gdb/10757
11429 * thread-db.c (attach_thread): New function.
11430 (maybe_attach_thread): Return success/failure.
11431 (find_new_threads_callback): Adjust.
889bf7c5
PA
11432 (thread_db_find_new_threads): Loop until no new threads.
11433
88e3b899
PA
114342009-10-13 Pedro Alves <pedro@codesourcery.com>
11435
11436 * proc-service.c (ps_lgetregs): Formatting.
11437
cdbfd419
PP
114382009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11439
11440 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11441 * configure.ac: Adjust.
11442 * linux-low.h (struct process_info_private): Move members to struct
11443 thread_db.
11444 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11445 * linux-low.c (linux_remove_process): Adjust.
11446 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11447 * server.c (handle_query): Move code ...
11448 (handle_monitor_command): ... here. New function.
11449 * target.h (struct target_ops): New member.
11450 * thread-db.c (struct thread_db): New.
11451 (libthread_db_search_path): New variable.
11452 (thread_db_create_event, thread_db_enable_reporting)
11453 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11454 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11455 (try_thread_db_load_1, dladdr_to_soname): New functions.
11456 (try_thread_db_load, thread_db_load_search): New functions.
11457 (thread_db_init): Search for libthread_db.
11458 (thread_db_free): New function.
11459 (thread_db_handle_monitor_command): Likewise.
11460 * config.in: Regenerate.
11461 * configure: Regenerate.
889bf7c5 11462
4168d2d6
UW
114632009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11464
11465 * spu-low.c (spu_kill): Wait for inferior to terminate.
11466 Call clear_inferiors.
11467 (spu_detach): Call clear_inferiors.
11468
81ecdfbb
RW
114692009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11470
11471 * aclocal.m4: Regenerate.
11472 * config.in: Likewise.
11473 * configure: Likewise.
11474
0b9ff2c0
UW
114752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11476
11477 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11478 (parse_spufs_run): New function.
11479 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11480 (ppc_breakpoint_at): Handle SPU breakpoints.
11481
efcbbd14
UW
114822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11483
11484 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11485 (SPUFS_MAGIC): Define.
11486 (spu_enumerate_spu_ids): New function.
11487 (linux_qxfer_spu): New function.
11488 (linux_target_ops): Install linux_qxfer_spu.
11489
f4d9bade
UW
114902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11491
11492 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11493 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11494 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11495 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11496 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11497 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11498 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11499 (init_registers_powerpc_cell32l): Add prototype.
11500 (init_registers_powerpc_cell64l): Likewise.
11501 (ppc_arch_setup): Detect Cell/B.E. architecture.
11502
96e946ca
RW
115032009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11504
11505 * Makefile.in (datarootdir): New variable.
11506
58d6951d
DJ
115072009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11508
11509 * linux-low.c (linux_write_memory): Update debugging output.
11510 * Makefile.in (clean): Add new descriptions.
11511 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11512 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11513 * configure.srv: Add new files for arm*-*-linux*.
11514 * linux-arm-low.c: Add new declarations.
11515 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11516 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11517 (HWCAP_VFPv3D16): New.
11518 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11519 instead of __IWMMXT__.
11520 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11521 (arm_arch_setup): New.
11522 (target_regsets): Remove #ifdef. Add VFP regset.
11523 (the_low_target): Use arm_arch_setup.
11524
12b42a12
DJ
115252009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11526
11527 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11528 the main thread again.
11529
ac8c974e
AR
115302009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11531
11532 Adding Neutrino gdbserver.
11533 * configure: Regenerated.
11534 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11535 * configure.srv (i[34567]86-*-nto*): New target.
11536 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11537 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11538 (nto_comctrl) [__QNX__]: New function.
11539 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11540
4424e0c3 115412009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11542
11543 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11544 srv_tgtobj.
11545
912cf4ba
PA
115462009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11547 Pedro Alves <pedro@codesourcery.com>
11548
11549 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11550 don't support CONTEXT_EXTENDED_REGISTERS.
11551 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11552 (the_low_target): Install them.
11553 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11554 failing with ERROR_PIPE_NOT_CONNECTED.
11555
aa5ca48f
DE
115562009-06-30 Doug Evans <dje@google.com>
11557 Pierre Muller <muller@ics.u-strasbg.fr>
11558
11559 Add h/w watchpoint support to x86-linux, win32-i386.
11560 * Makefile.in (SFILES): Add i386-low.c
11561 (i386_low_h): Define.
11562 (i386-low.o): Add dependencies.
11563 (linux-x86-low.o): Add i386-low.h dependency.
11564 (win32-i386-low.o): Ditto.
11565 * i386-low.c: New file.
11566 * i386-low.h: New file.
11567 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11568 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11569 * linux-low.c (linux_add_process): Initialize arch_private.
11570 (linux_remove_process): Free arch_private.
11571 (add_lwp): Initialize arch_private.
11572 (delete_lwp): Free arch_private.
11573 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11574 provided.
11575 * linux-low.h (process_info_private): New member arch_private.
11576 (lwp_info): New member arch_private.
11577 (linux_target_ops): New members new_process, new_thread,
11578 prepare_to_resume.
11579 (ptid_of): New macro.
11580 * linux-x86-low.c: Include stddef.h, i386-low.h.
11581 (arch_process_info): New struct.
11582 (arch_lwp_info): New struct.
11583 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11584 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11585 (i386_dr_low_get_status): New function.
11586 (x86_insert_point, x86_remove_point): New functions.
11587 (x86_stopped_by_watchpoint): New function.
11588 (x86_stopped_data_address): New function.
11589 (x86_linux_new_process, x86_linux_new_thread): New functions.
11590 (x86_linux_prepare_to_resume): New function.
11591 (the_low_target): Add entries for insert_point, remove_point,
11592 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11593 prepare_to_resume.
11594 * server.c (debug_hw_points): New global.
11595 (monitor_show_help): Document set debug-hw-points.
11596 (handle_query): Process "set debug-hw-points".
11597 * server.h (debug_hw_points): Declare.
11598 (paddress): Declare.
11599 * utils.c (NUMCELLS, CELLSIZE): New macros.
11600 (get_sell, xsnprintf, paddress): New functions.
11601 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11602 remove_point, stopped_by_watchpoint, stopped_data_address.
11603 * win32-i386-low.c: Include i386-low.h.
11604 (debug_reg_state): Replaces dr.
11605 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11606 (i386_dr_low_get_status): New function.
11607 (i386_insert_point, i386_remove_point): New functions.
11608 (i386_stopped_by_watchpoint): New function.
11609 (i386_stopped_data_address): New function.
11610 (i386_initial_stuff): Update.
11611 (get_thread_context,set_thread_context,i386_thread_added): Update.
11612 (the_low_target): Add entries for insert_point,
11613 remove_point, stopped_by_watchpoint, stopped_data_address.
11614 * win32-low.c (win32_insert_watchpoint): New function.
11615 (win32_remove_watchpoint): New function.
11616 (win32_stopped_by_watchpoint): New function.
11617 (win32_stopped_data_address): New function.
11618 (win32_target_ops): Add entries for insert_watchpoint,
11619 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11620 * win32-low.h (win32_target_ops): New members insert_point,
11621 remove_point, stopped_by_watchpoint, stopped_data_address.
11622
d993e290
PA
116232009-06-25 Pedro Alves <pedro@codesourcery.com>
11624
11625 * server.c (process_serial_event): Re-return unsupported, not
11626 error, if the type isn't recognized. Re-allow supporting only
11627 insert or remove packets. Also call require_running for
11628 breakpoints. Add missing break statement to default case. Tidy.
11629 * target.h (struct target_ops): Rename insert_watchpoint to
11630 insert_point, and remove_watchpoint to remove_point.
11631
11632 * linux-low.h (struct linux_target_ops): Likewise.
11633 * linux-low.c (linux_insert_watchpoint): Rename to ...
11634 (linux_insert_point): ... this. Adjust.
11635 (linux_remove_watchpoint): Rename to ...
11636 (linux_remove_point): ... this. Adjust.
11637 (linux_target_ops): Adjust.
11638 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11639 (cris_insert_point): ... this.
11640 (cris_remove_watchpoint): Rename to ...
11641 (cris_remove_point): ... this.
11642 (the_low_target): Adjust.
11643
0f54c268
PM
116442009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11645
11646 * server.c (handle_v_kill): Pass signal_pid to
11647 kill_inferior if multi_process is zero.
11648
c6314022
AR
116492009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11650
11651 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11652 * target.h (target_ops): Comment for *_watchpoint to make it clear
11653 the functions can get types '0' and '1'.
11654
4463ce24
AR
116552009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11656
11657 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11658 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11659 * regcache.c (get_regcache): Likewise.
11660 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11661 * win32-low.c (child_fetch_inferior_registers): Remove check for
11662 regno 0.
11663
cf8fd78b
PA
116642009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11665 Pedro Alves <pedro@codesourcery.com>
11666
11667 * target.h (struct target_ops) <supports_multi_process>: New
11668 callback.
11669 (target_supports_multi_process): New.
11670 * server.c (handle_query): Even if GDB reports support, only
11671 enable multi-process if the target also supports it. Report
11672 multi-process support only if the target backend supports it.
11673 * linux-low.c (linux_supports_multi_process): New function.
11674 (linux_target_ops): Install it as target_supports_multi_process
11675 callback.
11676
47c0c975
DE
116772009-05-24 Doug Evans <dje@google.com>
11678
e09875d4
DE
11679 Global renaming of find_thread_pid to find_thread_ptid.
11680 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11681 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11682 All callers updated.
11683
e27d73f6
DE
11684 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11685 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11686 directly.
11687
47c0c975
DE
11688 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11689 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11690 (linux_resume_one_lwp): Ditto.
11691
2acc282a
DE
116922009-05-23 Doug Evans <dje@google.com>
11693
11694 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11695 from struct inferior_list_entry * to struct lwp_info *.
11696 All callers updated.
11697
9f1036c1
DE
116982009-05-13 Doug Evans <dje@google.com>
11699
11700 * linux-x86-low.c: Don't include assert.h.
11701 (x86_siginfo_fixup): Use fatal, not assert.
11702 (x86_arch_setup): Fix comment.
11703
d0722149
DE
117042009-05-12 Doug Evans <dje@google.com>
11705
11706 Biarch support for i386/amd64 gdbserver.
11707 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11708 Add linux-x86-low.c.
11709 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11710 (linux-x86-low.o): Add.
11711 * linux-x86-64-low.c: Delete.
11712 * linux-i386-low.c: Delete.
11713 * linux-x86-low.c: New file.
11714 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11715 linux-x86-low.o.
11716 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11717 linux-x86-low.o.
11718 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11719 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11720 (linux_child_pid_to_exec_file): New function.
11721 (elf_64_header_p, elf_64_file_p): New functions.
11722 (siginfo_fixup): New function.
11723 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11724 give target a chance to convert layout.
11725 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11726 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11727
fdeb2a12
DE
117282009-05-07 Doug Evans <dje@google.com>
11729
11730 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11731 (regsets_store_inferior_registers): Ditto.
11732
a6dbe5df
PA
117332009-05-06 Pedro Alves <pedro@codesourcery.com>
11734
11735 PR server/10048
11736
11737 * linux-low.c (must_set_ptrace_flags): Delete.
11738 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11739 of the global.
11740 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11741 `lwp->must_set_ptrace_flags' instead.
ba42693b 11742 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11743 (linux_wait_1): ... not here.
11744
5091eb23
DE
117452009-04-30 Doug Evans <dje@google.com>
11746
9f767825
DE
11747 * inferiors.c (started_inferior_callback): New function.
11748 (attached_inferior_callback): New function.
11749 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11750 * server.c (print_started_pid, print_attached_pid): New functions.
11751 (detach_or_kill_for_exit): New function.
11752 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11753 * server.h (have_started_inferiors_p): Declare.
11754 (have_attached_inferiors_p): Declare.
11755
5091eb23
DE
11756 * inferiors.c (remove_process): Fix memory leak, free process.
11757 * linux-low.c (linux_remove_process): New function.
11758 (linux_kill): Call it instead of remove_process.
11759 (linux_detach, linux_wait_1): Ditto.
11760
155c8968
PA
117612009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11762
11763 * configure.srv: Add x86 Windows CE target.
11764
7fe519cb
UW
117652009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11766
11767 * inferiors.c (get_thread_process): Make global.
11768 * server.h (get_thread_process): Add prototype.
11769 * thread-db.c (find_one_thread): Use get_thread_process
11770 instead of current_process.
11771 (thread_db_get_tls_address): Do not crash if called when
11772 thread layer is not yet initialized.
11773
5472f405
UW
117742009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11775
11776 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11777 * spu-low.c (current_tid): Rename to ...
11778 (current_ptid): ... this.
11779 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11780 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11781 ptid_get_lwp (current_ptid) instead of current_tid.
11782 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11783 instead of current_tid. Use find_process_pid to verify pid
11784 argument is valid. Pass proper argument to remove_process.
11785 (spu_thread_alive): Compare current_ptid instead of current_tid.
11786 (spu_resume): Likewise.
11787
55ac2b99
PA
117882009-04-02 Pedro Alves <pedro@codesourcery.com>
11789
11790 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11791 variable.
11792
95954743
PA
117932009-04-01 Pedro Alves <pedro@codesourcery.com>
11794
11795 Implement the multiprocess extensions, and add linux multiprocess
11796 support.
11797
11798 * server.h (ULONGEST): Declare.
11799 (struct ptid, ptid_t): New.
11800 (minus_one_ptid, null_ptid): Declare.
11801 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11802 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11803 (struct inferior_list_entry): Change `id' type from unsigned from
11804 to ptid_t.
11805 (struct sym_cache, struct breakpoint, struct
11806 process_info_private): Forward declare.
11807 (struct process_info): Declare.
11808 (current_process): Declare.
11809 (all_processes): Declare.
11810 (initialize_inferiors): Declare.
11811 (add_thread): Adjust to use ptid_t.
11812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11813 (add_process, remove_process, find_thread_pid): Declare.
11814 (find_inferior_id): Adjust to use ptid_t.
11815 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11816 (multi_process): Declare.
11817 (push_event): Adjust to use ptid_t.
11818 (read_ptid, write_ptid): Declare.
11819 (prepare_resume_reply): Adjust to use ptid_t.
11820 (clear_symbol_cache): Declare.
11821 * inferiors.c (all_processes): New.
11822 (null_ptid, minus_one_ptid): New.
11823 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11824 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11825 (add_thread): Change unsigned long to ptid. Remove gdb_id
11826 parameter. Adjust.
11827 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11828 (gdb_id_to_thread): Rename to ...
11829 (find_thread_pid): ... this. Change unsigned long to ptid.
11830 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11831 (loaded_dll, pull_pid_from_list): Adjust.
11832 (add_process, remove_process, find_process_pid)
11833 (get_thread_process, current_process, initialize_inferiors): New.
11834 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11835 (struct target_waitstatus) <related_pid>: Ditto.
11836 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11837 return type to int.
11838 (struct target_ops) <join>: Add `pid' argument.
11839 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11840 (struct target_ops) <wait>: Add `ptid' field. Change return type
11841 to ptid.
11842 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11843 (mywait): Add `ptid' argument. Change return type to ptid_t.
11844 (target_pid_to_str): Declare.
11845 * target.c (set_desired_inferior): Adjust to use ptids.
11846 (mywait): Add new `ptid' argument. Adjust.
11847 (target_pid_to_str): New.
11848 * mem-break.h (free_all_breakpoints): Declare.
11849 * mem-break.c (breakpoints): Delelete.
11850 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11851 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11852 to use per-process breakpoint list.
11853 (free_all_breakpoints): New.
11854 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11855 (symbol_cache, all_symbols_looked_up): Delete.
11856 (hexchars): New.
11857 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11858 read_ptid): New.
11859 (prepare_resume_reply): Change ptid argument's type from unsigned
11860 long to ptid_t. Adjust. Implement W;process and X;process.
11861 (free_sym_cache, clear_symbol_cache): New.
11862 (look_up_one_symbol): Adjust to per-process symbol cache. *
11863 * server.c (cont_thread, general_thread, step_thread): Change type
11864 to ptid_t.
11865 (attached): Delete.
11866 (multi_process): New.
11867 (last_ptid): Change type to ptid_t.
11868 (struct vstop_notif) <ptid>: Change type to ptid_t.
11869 (queue_stop_reply, push_event): Change `ptid' argument's type to
11870 ptid_t.
11871 (discard_queued_stop_replies): Add `pid' argument.
11872 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11873 changes. Don't reference the `attached' global.
11874 (attach_inferior): Adjust to mywait interface changes.
11875 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11876 features. Handle and report "multiprocess+". Handle
11877 "qAttached:PID".
11878 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11879 changes.
11880 (handle_v_kill): New.
11881 (handle_v_stopped): Adjust to use target_pid_to_str.
11882 (handle_v_requests): Allow multiple attaches and runs when
11883 multiprocess extensions are in effect. Handle "vKill".
11884 (myresume): Adjust to use ptids.
11885 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11886 (handle_status): Adjust to discard_queued_stop_replies interface
11887 change.
11888 (first_thread_of, kill_inferior_callback)
11889 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11890 (main): Call initialize_inferiors. Adjust to use ptids, killing
11891 and detaching from all inferiors. Handle multiprocess packet
11892 variants.
11893 * linux-low.h: Include gdb_proc_service.h.
11894 (struct process_info_private): New.
11895 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11896 <lwpid_of>: Use ptid_get_lwp.
11897 (get_lwp_thread): Adjust.
11898 (struct lwp_info): Add `dead' member.
11899 (find_lwp_pid): Declare.
11900 * linux-low.c (thread_db_active): Delete.
11901 (new_inferior): Adjust comment.
11902 (inferior_pid): Delete.
11903 (linux_add_process): New.
11904 (handle_extended_wait): Adjust.
11905 (add_lwp): Change unsigned long to ptid.
11906 (linux_create_inferior): Add process to processes table. Adjust
11907 to use ptids. Don't set new_inferior here.
11908 (linux_attach_lwp): Rename to ...
11909 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11910 it. Adjust to use ptids.
11911 (linux_attach_lwp): New.
11912 (linux_attach): Add process to processes table. Don't set
11913 new_inferior here.
11914 (struct counter): New.
11915 (second_thread_of_pid_p, last_thread_of_process_p): New.
11916 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11917 multiple processes.
11918 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11919 processes. Remove process from process table.
11920 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11921 to multiple processes.
11922 (any_thread_of): New.
11923 (linux_detach): Add `pid' argument, and handle it. Remove process
11924 from processes table.
11925 (linux_join): Add `pid' argument. Handle it.
11926 (linux_thread_alive): Change unsighed long argument to ptid_t.
11927 Consider dead lwps as not being alive.
11928 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11929 threads we're not interested in.
11930 (same_lwp, find_lwp_pid): New.
11931 (linux_wait_for_lwp): Change `pid' argument's type from int to
11932 ptid_t. Adjust.
11933 (linux_wait_for_event): Rename to ...
11934 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11935 from int to ptid_t. Adjust.
11936 (linux_wait_for_event): New.
11937 (linux_wait_1): Add `ptid' argument. Change return type to
11938 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11939 that exit from the process table.
11940 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11941 Adjust.
11942 (mark_lwp_dead): New.
11943 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11944 stopping all threads, mark its main lwp as dead.
11945 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11946 ptids.
11947 (fetch_register, usr_store_inferior_registers)
11948 (regsets_fetch_inferior_registers)
11949 (regsets_store_inferior_registers, linux_read_memory)
11950 (linux_write_memory): Inline `inferior_pid'.
11951 (linux_look_up_symbols): Adjust to use per-process
11952 `thread_db_active'.
11953 (linux_request_interrupt): Adjust to use ptids.
11954 (linux_read_auxv): Inline `inferior_pid'.
11955 (initialize_low): Don't reference thread_db_active.
11956 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11957 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11958 (ps_getpid): Return the pid of the current inferior.
11959 * thread-db.c (proc_handle, thread_agent): Delete.
11960 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11961 per-process data.
11962 (find_one_thread): Change argument type to ptid_t. Adjust to
11963 per-process data.
11964 (maybe_attach_thread): Adjust to per-process data and ptids.
11965 (thread_db_find_new_threads): Ditto.
11966 (thread_db_init): Ditto.
11967 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11968 processes table. Adjust to use ptids.
11969 (spu_kill, spu_detach): Adjust interface. Remove process from
11970 processes table.
11971 (spu_join, spu_thread_alive): Adjust interface.
11972 (spu_wait): Adjust interface. Remove process from processes
11973 table. Adjust to use ptids.
11974 * win32-low.c (current_inferior_tid): Delete.
11975 (current_inferior_ptid): New.
11976 (debug_event_ptid): New.
11977 (thread_rec): Take a ptid. Adjust.
11978 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11979 (child_delete_thread): Ditto.
11980 (do_initial_child_stuff): Add `attached' argument. Add process to
11981 processes table.
11982 (child_fetch_inferior_registers, child_store_inferior_registers):
11983 Adjust.
11984 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11985 (win32_attach): Pass 1 to do_initial_child_stuff.
11986 (win32_kill): Adjust interface. Remove process from processes
11987 table.
11988 (win32_detach): Ditto.
11989 (win32_join): Adjust interface.
11990 (win32_thread_alive): Take a ptid.
11991 (win32_resume): Adjust to use ptids.
11992 (get_child_debug_event): Ditto.
11993 (win32_wait): Adjust interface. Remove exiting process from
11994 processes table.
11995
bd99dc85
PA
119962009-04-01 Pedro Alves <pedro@codesourcery.com>
11997
11998 Non-stop mode support.
11999
12000 * server.h (non_stop): Declare.
12001 (gdb_client_data, handler_func): Declare.
12002 (delete_file_handler, add_file_handler, start_event_loop):
12003 Declare.
12004 (handle_serial_event, handle_target_event, push_event)
12005 (putpkt_notif): Declare.
12006 * target.h (enum resume_kind): New.
12007 (struct thread_resume): Replace `step' field by `kind' field.
12008 (TARGET_WNOHANG): Define.
12009 (struct target_ops) <wait>: Add `options' argument.
12010 <supports_non_stop, async, start_non_stop>: New fields.
12011 (target_supports_non_stop, target_async): New.
12012 (start_non_stop): Declare.
12013 (mywait): Add `options' argument.
12014 * target.c (mywait): Add `options' argument. Print child exit
12015 notifications here.
12016 (start_non_stop): New.
12017 * server.c (non_stop, own_buf, mem_buf): New globals.
12018 (struct vstop_notif): New.
12019 (notif_queue): New global.
12020 (queue_stop_reply, push_event, discard_queued_stop_replies)
12021 (send_next_stop_reply): New.
12022 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12023 interface changes.
12024 (attach_inferior): In non-stop mode, don't wait for the target
12025 here.
12026 (handle_general_set): Handle QNonStop.
12027 (handle_query): When handling qC, return the current general
12028 thread, instead of the first thread of the list.
12029 (handle_query): If the backend supports non-stop mode, include
12030 QNonStop+ in the qSupported query response.
12031 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12032 and non-stop mode.
12033 (handle_v_attach, handle_v_run): Handle non-stop mode.
12034 (handle_v_stopped): New.
12035 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12036 (myresume): Adjust to use resume_kind. Handle non-stop.
12037 (queue_stop_reply_callback): New.
12038 (handle_status): Handle non-stop mode.
12039 (main): Clear non_stop flag on reconnection. Use the event-loop.
12040 Refactor serial protocol handling from here ...
12041 (process_serial_event): ... to this new function. When GDB
12042 selects any thread, select one here. In non-stop mode, wait until
12043 GDB acks all pending events before exiting.
12044 (handle_serial_event, handle_target_event): New.
12045 * remote-utils.c (remote_open): Install remote_desc in the event
12046 loop.
12047 (remote_close): Remove remote_desc from the event loop.
12048 (putpkt_binary): Rename to...
12049 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12050 (putpkt_binary): New as wrapper around putpkt_binary_1.
12051 (putpkt_notif): New.
12052 (prepare_resume_reply): In non-stop mode, don't change the
12053 general_thread.
12054 * event-loop.c: New.
12055 * Makefile.in (OBJ): Add event-loop.o.
12056 (event-loop.o): New rule.
12057
12058 * linux-low.h (pid_of): Moved here.
12059 (lwpid_of): New.
12060 (get_lwp_thread): Use lwpid_of.
12061 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12062 * linux-low.c (pid_of): Delete.
12063 (inferior_pid): Use lwpid_of.
12064 (linux_event_pipe): New.
12065 (target_is_async_p): New.
12066 (delete_lwp): New.
12067 (handle_extended_wait): Use lwpid_of.
12068 (add_lwp): Don't set lwpid field.
12069 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12070 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12071 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12072 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12073 first. Adjust to linux_wait_for_event interface changes. Use
12074 lwpid_of.
12075 (linux_detach): Don't delete the main lwp here.
12076 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12077 (status_pending_p): Don't consider explicitly suspended lwps.
12078 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12079 pointer. Add OPTIONS argument. Change return type to int. Use
12080 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12081 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12082 pointer. Add status pointer argument. Return a pid instead of a
12083 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12084 changes. In non-stop mode, don't switch to a random thread.
12085 (linux_wait): Rename to...
12086 (linux_wait_1): ... this. Add target_options argument, and handle
12087 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12088 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12089 clean exit and signal exit code. Don't stop all threads in
12090 non-stop mode. In all-stop mode, only stop all threads when
12091 reporting a stop to GDB. Handle explicit thread stop requests.
12092 (async_file_flush, async_file_mark): New.
12093 (linux_wait): New.
12094 (send_sigstop): Use lwpid_of.
12095 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12096 interface changes. In non-stop mode, don't switch to a random
12097 thread.
12098 (linux_resume_one_lwp): Use lwpid_of.
12099 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12100 (linux_resume_one_thread): ... this. Handle resume_stop. In
12101 non-stop mode, don't look for pending flag in all threads.
12102 (resume_status_pending_p): Don't consider explicitly suspended
12103 threads.
12104 (my_waitpid): Reimplement. Emulate __WALL.
12105 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12106 Use lwpid_of.
12107 (sigchld_handler, linux_supports_non_stop, linux_async)
12108 (linux_start_non_stop): New.
12109 (linux_target_ops): Register linux_supports_non_stop, linux_async
12110 and linux_start_non_stop.
12111 (initialize_low): Install SIGCHLD handler.
12112 * thread-db.c (thread_db_create_event, find_one_thread)
12113 (thread_db_get_tls_address): Use lwpid_of.
12114 * win32-low.c (win32_detach): Adjust to use resume_kind.
12115 (win32_wait): Add `options' argument.
12116 * spu-low.c (spu_resume): Adjust to use resume_kind.
12117 (spu_wait): Add `options' argument.
12118
5b1c542e
PA
121192009-04-01 Pedro Alves <pedro@codesourcery.com>
12120
12121 Decouple target code from remote protocol.
12122
12123 * target.h (enum target_waitkind): New.
12124 (struct target_waitstatus): New.
12125 (struct target_ops) <wait>: Return an unsigned long. Take a
12126 target_waitstatus pointer instead of a char pointer.
12127 (mywait): Likewise.
12128 * target.c (mywait): Change prototype to return an unsigned long.
12129 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12130 * server.h (thread_from_wait, old_thread_from_wait): Delete
12131 declarations.
12132 (prepare_resume_reply): Change prototype to take a
12133 target_waitstatus.
12134 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12135 (last_status, last_ptid): New.
12136 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12137 pid instead of a signal.
12138 (attach_inferior): Remove "status" and "signal" parameters.
12139 Adjust.
12140 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12141 not as an address.
12142 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12143 (handle_v_requests, myresume): Remove "status" and "signal"
12144 parameters. Adjust.
12145 (handle_status): New.
12146 (main): Delete local `status'. Adjust.
12147 * remote-utils.c: Include target.h.
12148 (prepare_resume_reply): Change prototype to take a
12149 target_waitstatus. Adjust.
12150
12151 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12152 interface.
12153 * spu-low.c (spu_wait): Adjust.
12154 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12155 Delete.
12156 (win32_wait): Adjust.
12157
2bd7c093
PA
121582009-04-01 Pedro Alves <pedro@codesourcery.com>
12159
12160 * target.h (struct thread_resume): Delete leave_stopped member.
12161 (struct target_ops): Add a `n' argument to the `resume' callback.
12162 * server.c (start_inferior): Adjust.
12163 (handle_v_cont, myresume): Adjust.
12164 * linux-low.c (check_removed_breakpoint): Adjust to resume
12165 interface change, and to removed leave_stopped field.
12166 (resume_ptr): Delete.
12167 (struct thread_resume_array): New.
12168 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12169 resume interface change.
12170 (linux_continue_one_thread, linux_queue_one_thread)
12171 (resume_status_pending_p): Check if the resume field is NULL
12172 instead of checking the leave_stopped member.
12173 (linux_resume): Adjust to the target resume interface change.
12174 * spu-low.c (spu_resume): Adjust to the target resume interface
12175 change.
12176 * win32-low.c (win32_detach, win32_resume): Ditto.
12177
c35fafde
PA
121782009-04-01 Pedro Alves <pedro@codesourcery.com>
12179
12180 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12181 flag.
12182 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12183 pending.
12184 (linux_continue_one_thread): Only preserve the stepping flag if
12185 there's a pending breakpoint.
12186
0a59d50b
PA
121872009-03-31 Pedro Alves <pedro@codesourcery.com>
12188
12189 * server.c (main): After the inferior having exited, call
12190 remote_close before exiting gdbserver.
12191
f04c6d38
TJB
121922009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12193
12194 Fix size of FPSCR in Power 7 processors.
12195 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12196 (PPC_FEATURE_HAS_DFP): New #define.
12197 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12198 size of the FPSCR.
12199
78e5cee6
PA
122002009-03-23 Pedro Alves <pedro@codesourcery.com>
12201
12202 * server.c (handle_query) Whitespace and formatting.
12203
1b3f6016
PA
122042009-03-22 Pedro Alves <pedro@codesourcery.com>
12205
12206 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12207 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12208 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12209 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12210 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12211 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12212 Makefile.in, configure.ac: Fix whitespace throughout.
12213 * configure: Regenerate.
12214
a07b2135
PA
122152009-03-22 Pedro Alves <pedro@codesourcery.com>
12216
12217 * inferiors.c (find_inferior): Make it safe for the callback
12218 function to delete the currently iterated inferior.
12219
67cc2626
PA
122202009-03-22 Pedro Alves <pedro@codesourcery.com>
12221
12222 * Makefile.in (linuw_low_h): Move higher.
12223 (thread-db.o): Depend on $(linux_low_h).
12224
54a0b537
PA
122252009-03-17 Pedro Alves <pedro@codesourcery.com>
12226
12227 Rename "process" to "lwp" throughout.
12228
12229 * linux-low.c (all_processes): Rename to...
12230 (all_lwps): ... this.
12231 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12232 (add_process): Rename to ...
12233 (add_lwp): ... this. Adjust.
12234 (linux_create_inferior): Adjust.
12235 (linux_attach_lwp): Adjust.
12236 (linux_attach): Adjust.
12237 (linux_kill_one_process): Rename to ...
12238 (linux_kill_one_lwp): ... this. Adjust.
12239 (linux_kill): Adjust.
12240 (linux_detach_one_process): Rename to ...
12241 (linux_detach_one_lwp): ... this. Adjust.
12242 (linux_detach): Adjust.
12243 (check_removed_breakpoint): Adjust.
12244 (status_pending_p): Adjust.
12245 (linux_wait_for_process): Rename to ...
12246 (linux_wait_for_lwp): ... this. Adjust.
12247 (linux_wait_for_event): Adjust.
12248 (send_sigstop): Adjust.
12249 (wait_for_sigstop): Adjust.
12250 (stop_all_processes): Rename to ...
12251 (stop_all_lwps): ... this.
12252 (linux_resume_one_process): Rename to ...
12253 (linux_resume_one_lwp): ... this. Adjust.
12254 (linux_set_resume_request, linux_continue_one_thread)
12255 (linux_queue_one_thread, resume_status_pending_p)
12256 (usr_store_inferior_registers, regsets_store_inferior_registers)
12257 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12258 Adjust.
12259 * linux-low.h (get_process): Rename to ...
12260 (get_lwp): ... this. Adjust.
12261 (get_thread_process): Rename to ...
12262 (get_thread_lwp): ... this. Adjust.
12263 (get_process_thread): Rename to ...
12264 (get_lwp_thread): ... this. Adjust.
12265 (struct process_info): Rename to ...
12266 (struct lwp_info): ... this.
12267 (all_processes): Rename to ...
12268 (all_lwps): ... this.
12269 * proc-service.c (ps_lgetregs): Adjust.
12270 * thread-db.c (thread_db_create_event, find_one_thread)
12271 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12272
0b16c5cf
PA
122732009-03-14 Pedro Alves <pedro@codesourcery.com>
12274
12275 * server.c (handle_query): Handle "qAttached".
12276
32de4b9d
NS
122772009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12278
12279 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12280 GPLv3, update license URL.
12281
2aecd87f
DE
122822009-03-01 Doug Evans <dje@google.com>
12283
93efd302 12284 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12285 (server_h): Add gdb_signals.h.
12286 (signals.o): Update.
12287 * server.h (target_signal_from_host,target_signal_to_host_p)
12288 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12289
86b1f9c5
PM
122902009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12291
12292 * remote-utils.c (getpkt): Also generate remote-debug
12293 information if noack_mode is set.
12294
4aa995e1
PA
122952009-02-06 Pedro Alves <pedro@codesourcery.com>
12296
12297 * server.c (handle_query): Report qXfer:siginfo:read and
12298 qXfer:siginfo:write as supported and handle them.
12299 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12300 * linux-low.c (linux_xfer_siginfo): New.
12301 (linux_target_ops): Set it.
12302
62709adf
PA
123032009-01-26 Pedro Alves <pedro@codesourcery.com>
12304
12305 * server.c (gdbserver_usage): Mention --remote-debug.
12306 (main): Accept '--remote-debug' switch.
12307
aef93bd7
DE
123082009-01-18 Doug Evans <dje@google.com>
12309
12310 * regcache.c (new_register_cache): No need to check result of xcalloc.
12311 * server.c (handle_search_memory): Back out calls to xmalloc,
12312 result is checked and error is returned to user upon failure.
12313 (handle_query): Ditto. Add more checks for result of malloc.
12314 (handle_v_cont): Check result of malloc, report error back to
12315 user upon failure.
12316 (handle_v_run): Ditto. Call freeargv.
12317 * server.h (freeargv): Declare.
12318 * utils.c (freeargv): New fn.
12319
54363045
DE
123202009-01-15 Doug Evans <dje@google.com>
12321
f626972c
DE
12322 * gdbreplay.c (perror_with_name): Make arg const char *.
12323 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12324 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12325 * utils.c (perror_with_name): Make arg const char *.
54363045 12326
18aae699
PA
123272009-01-14 Pedro Alves <pedro@codesourcery.com>
12328
12329 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12330 when handling a EXIT_PROCESS_DEBUG_EVENT.
12331
ff703abe
JB
123322009-01-06 Joel Brobecker <brobecker@adacore.com>
12333
12334 * gdbreplay.c (gdbreplay_version): Update copyright year.
12335 * server.c (gdbserver_version): Likewise.
12336
f21cc1a2 123372009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12338
12339 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12340 (handle_extended_wait): Improve comment.
0e21c1ec 12341
bca929d3
DE
123422008-12-13 Doug Evans <dje@google.com>
12343
12344 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12345 * server.h (ATTR_MALLOC): New macro.
12346 (xmalloc,xcalloc,xstrdup): Declare.
12347 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12348 * inferiors.c: Ditto.
12349 * linux-low.c: Ditto.
12350 * mem-break.c: Ditto.
12351 * regcache.c: Ditto.
12352 * remote-utils.c: Ditto.
12353 * server.c: Ditto.
12354 * target.c: Ditto.
12355 * win32-low.c: Ditto.
12356
97438e3f
DE
123572008-12-12 Doug Evans <dje@google.com>
12358
896c7fbb
DE
12359 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12360 in debugging printf.
12361
97438e3f
DE
12362 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12363
e3b886f8
DE
123642008-12-09 Doug Evans <dje@google.com>
12365
12366 * linux-low.h (struct process_info): Delete member tid, unused.
12367 * thread-db.c (find_one_thread): Update.
12368 (maybe_attach_thread): Update.
12369
07e059b5
VP
123702008-12-02 Pedro Alves <pedro@codesourcery.com>
12371
889bf7c5
PA
12372 * target.h (struct target_ops): Add qxfer_osdata member.
12373 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12374 and dirent.h.
12375 (linux_qxfer_osdata): New functions.
12376 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12377 callback.
12378 * server.c (handle_query): Handle "qXfer:osdata:read:".
12379 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12380 (buffer_xml_printf): New functions.
12381 * server.h (struct buffer): New.
12382 (buffer_grow_str, buffer_grow_str0): New macros.
12383 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12384 (buffer_xml_printf): Declare.
07e059b5 12385
4cab47ab
DE
123862008-11-24 Doug Evans <dje@google.com>
12387
12388 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12389
f142445f
DJ
123902008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12391
12392 * server.c (handle_v_run): Always use the supplied argument list.
12393
d0107bb6 123942008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12395
d0107bb6
BW
12396 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12397 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12398
2c4ad781
TJB
123992008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12400
12401 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12402 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12403 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12404 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12405 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12406 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12407 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12408 XML target descriptions.
12409 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12410 when inferior is running on an ISA 2.05 or later processor. Add
12411 special case to return offset for full 64-bit slot of FPSCR when
12412 in 32-bits.
12413
dfb64f85
DJ
124142008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12415
12416 * Makefile.in (SFILES, clean): Added sparc64 files.
12417 (reg-sparc64.o, reg-sparc64.c): New.
12418 * configure.srv (sparc*-*-linux*): New configuration.
12419 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12420 syscall arguments for SPARC.
12421 (regsets_store_inferior_registers): Likewise.
12422 * linux-sparc-low.c: New file.
12423
66b6e1dd
DE
124242008-10-21 Doug Evans <dje@google.com>
12425
12426 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12427 (READLINE_DIR,READLINE_DEP): Delete.
12428 (INTERNAL_CFLAGS): Update.
12429 (LINTFLAGS): Update.
12430
9b710a42
PA
124312008-10-10 Pedro Alves <pedro@codesourcery.com>
12432
12433 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12434 whole argv from the last run, not just argv[0].
12435
5822d809
PA
124362008-09-08 Pedro Alves <pedro@codesourcery.com>
12437
12438 * regcache.c (new_register_cache): Return NULL if the register
12439 cache size isn't known yet.
12440 (free_register_cache): Avoid dereferencing a NULL regcache.
12441
74aac56f
DJ
124422008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12443
12444 * configure.srv: Merge MIPS and MIPS64.
12445
400b20f5
MR
124462008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12447
12448 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12449
677c5bb1
LM
124502008-08-18 Luis Machado <luisgpm@br.ibm.com>
12451
12452 * Makefile.in: Add required vsx dependencies.
12453
12454 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12455 Declare init_registers_powerpc_vsx32l.
12456 Declare init_registers_powerpc_vsx64l.
12457 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12458 (ppc_arch_setup): Check for VSX in hwcap.
12459 (ppc_fill_vsxregset): New function.
12460 (ppc_store_vsxregset): New function.
12461 Add new VSX entry in regset_info target_regsets.
12462
12463 * configure.srv: Add new VSX dependencies.
12464
a6f3e723
SL
124652008-08-12 Pedro Alves <pedro@codesourcery.com>
12466
12467 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12468 (remote_open): Set or clear transport_is_reliable.
12469 (putpkt_binary): Don't expect acks in noack mode.
12470 (getpkt): Don't send ack/nac in noack mode.
12471 * server.c (handle_general_set): Handle QStartNoAckMode.
12472 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12473 qSupported.
12474 (main): Reset noack_mode on every connection.
12475 * server.h (noack_mode): Declare.
12476
a417dc56
RW
124772008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12478
12479 * Makefile.in (GDBREPLAY_OBS): New variable.
12480 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12481
3221518c
UW
124822008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12483 Daniel Jacobowitz <dan@codesourcery.com>
12484
12485 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12486 (usr_store_inferior_registers): Likewise.
12487 (regsets_store_inferior_registers): Likewise.
12488
ec56be1b
PA
124892008-07-31 Rolf Jansen <rj@surtec.com>
12490 Pedro Alves <pedro@codesourcery.com>
12491
12492 * configure.ac: Check for memmem declaration.
12493 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12494 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12495 (disable_packet_qfThreadInfo): Unconditionally compile.
12496 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12497 * configure, config.in: Regenerate.
12498
2fe5e3ff
DE
124992008-07-28 Doug Kwan <dougkwan@google.com>
12500
12501 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12502 (linux_write_memory): Remove declaration of errno.
12503
836acd6d
UW
125042008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12505
12506 * linux-low.c (handle_extended_wait): Do not use "status"
12507 variable uninitialized.
12508
aeba519e
PA
125092008-07-07 Pedro Alves <pedro@codesourcery.com>
12510
12511 * server.c (handle_v_attach): Inhibit reporting dll changes.
12512
db42f210
PA
125132008-06-27 Pedro Alves <pedro@codesourcery.com>
12514
12515 * remote-utils.c (prepare_resume_reply): If requested, don't
12516 output "thread:TID" in the T stop reply.
12517
12518 * server.c (disable_packet_vCont, disable_packet_Tthread)
12519 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12520 (handle_query): If requested, disable support for qC, qfThreadInfo
12521 and qsThreadInfo.
12522 (handle_v_requests): If requested, disable support for vCont.
12523 (gdbserver_show_disableable): New.
12524 (main): Handle --disable-packet and --disable-packet=LIST.
12525
12526 * server.h (disable_packet_vCont, disable_packet_Tthread)
12527 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12528
8e4c5421
CD
125292008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12530
12531 * server.c (gdbserver_usage): Mention --version.
12532
6e23a804
DJ
125332008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12534
12535 * Makefile.in (gdbreplay.o): New rule.
12536
90aa6a40
JM
125372008-06-06 Joseph Myers <joseph@codesourcery.com>
12538
12539 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12540 message, not gdbserver.
12541
c16158bc 125422008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12543 Nathan Sidwell <nathan@codesourcery.com>
12544 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12545
12546 * acinclude.m4: Include ../../config/acx.m4.
12547 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12548 * configure, config.in: Regenerate.
12549 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12550 * server.c (gdbserver_version): Print PKGVERSION.
12551 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12552 (main): Adjust gdbserver_usage calls.
12553 * gdbreplay.c (version, host_name): Add declarations.
12554 (gdbreplay_version, gdbreplay_usage): New.
12555 (main): Accept --version and --help options.
12556
aeb75bf5
DJ
125572008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12558
12559 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12560 (arm_breakpoint_at): Handle Thumb.
12561 (the_low_target): Add comment.
12562
76b233dd
UW
125632008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12564
12565 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12566
08388c79
DE
125672008-05-09 Doug Evans <dje@google.com>
12568
a3c83fae
DE
12569 * server.h (decode_search_memory_packet): Declare.
12570 * remote-utils.c (decode_search_memory_packet): New fn.
12571 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12572 (handle_search_memory): New fn.
12573 (handle_query): Process qSearch:memory packets.
12574
bb9c3d36
UW
125752008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12576
12577 * regcache.c (registers_length): Remove.
12578 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12579 full register packet.
12580 * regcache.h (registers_length): Remove prototype.
12581 * server.h (PBUFSIZ): Define to 16384.
12582
7284e1be
UW
125832008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12584
12585 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12586 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12587 powerpc-64l.o, and powerpc-altivec64l.o.
12588 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12589 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12590 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12591 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12592 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12593 to srv_xmlfiles.
12594
12595 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12596 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12597 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12598 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12599 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12600 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12601 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12602 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12603 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12604 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12605 (clean): Update.
12606
12607 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12608 (init_registers_powerpc_32l): ... this new prototype.
12609 (init_registers_powerpc_32): Remove, replace by ...
12610 (init_registers_powerpc_altivec32l): ... this new prototype.
12611 (init_registers_powerpc_e500): Remove, replace by ...
12612 (init_registers_powerpc_e500l): ... this new prototype.
12613 (init_registers_ppc64): Remove, replace by ...
12614 (init_registers_powerpc_64l): ... this new prototype.
12615 (init_registers_powerpc_64): Remove, replace by ...
12616 (init_registers_powerpc_altivec64l): ... this new prototype.
12617 (ppc_num_regs): Set to 73.
12618 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12619 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12620 (ppc_cannot_store_register): Handle orig_r3 and trap.
12621 (ppc_arch_setup): Update init_registers_... calls.
12622 (ppc_fill_gregset): Handle orig_r3 and trap.
12623
12624 * inferiors.c (clear_inferiors): Reset current_inferior.
12625
fdc59709
PB
126262008-04-23 Paolo Bonzini <bonzini@gnu.org>
12627
889bf7c5
PA
12628 * acinclude.m4: Add override.m4.
12629 * configure: Regenerate.
fdc59709 12630
c9b2f845
UW
126312008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12632
12633 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12634 initial call to init_register_ppc64.
12635
550512b8
UW
126362008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12637
43aaf8b6
PA
12638 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12639 single powerpc*-*-linux* case.
550512b8
UW
12640 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12641
b6430ec3
UW
126422008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12643
12644 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12645 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12646 from reg_xmlfiles.
12647 * linux-ppc-low.c: Include <elf.h>.
12648 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12649 (ppc_hwcap): New global variable.
12650 (ppc_regmap): Remove __SPE__ #ifdef sections.
12651 (ppc_regmap_e500): New global variable.
12652 (ppc_cannot_store_register): Update __SPE__ special case.
12653 (ppc_get_hwcap): New function.
12654 (ppc_arch_setup): Use it to determine whether inferior supports
12655 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12656 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12657 Do not access registers if target does not support AltiVec.
12658 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12659 Do not access registers if target does not support SPE.
12660 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12661
52fa2412
UW
126622008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12663
12664 * linux-low.c (disabled_regsets, num_regsets): New.
12665 (use_regsets_p): Delete.
12666 (linux_wait_for_process): Clear disabled_regsets.
12667 (regsets_fetch_inferior_registers): Check and set it.
12668 (regsets_store_inferior_registers): Likewise.
12669 (linux_fetch_registers, linux_store_registers): Do not use
12670 use_regsets_p.
12671 (initialize_low): Allocate disabled_regsets.
12672
e28b3332
DJ
126732008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12674
12675 * Makefile.in (LIBOBJS): New.
12676 (OBS): Use LIBOBJS.
12677 (memmem.o): New rule.
12678 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12679 * configure: Regenerated.
12680
4536995d
UW
126812008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12682
12683 * server.c (handle_query): Never return "unsupported" for
12684 qXfer:features:read queries.
12685
221c031f
UW
126862008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12687
12688 * server.c (get_features_xml): Fix inverted condition.
12689 (handle_query): Always support qXfer:feature:read.
12690
ccd213ac
DJ
126912008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12692
12693 * server.c (wrapper_argv): New.
12694 (start_inferior): Handle wrapper_argv. If set, expect an extra
12695 trap.
12696 (gdbserver_usage): Document --wrapper.
12697 (main): Parse --wrapper.
12698
6fe305f7
UW
126992008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12700
12701 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12702 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12703 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12704 (ppc_set_pc): Likewise.
12705 (ppc_arch_setup): New function.
12706 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12707 of collect_register.
889bf7c5 12708 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12709
5b0a002e
UW
127102008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12711
12712 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12713 instead of linux-ppc64-low.o.
12714 * linux-ppc64-low.c: Remove file.
12715 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12716 (linux-ppc64-low.o): Remove rule.
12717
12718 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12719 (init_registers_powerpc_64): Likewise.
12720 (ppc_regmap): Conditionally define depending on __powerpc64__.
12721 (ppc_cannot_store_register): Do not special-case "fpscr" when
12722 compiled on __powerpc64__.
12723 (ppc_collect_ptrace_register): New function.
12724 (ppc_supply_ptrace_register): New function.
12725 (ppc_breakpoint): Change type to "unsigned int".
12726 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12727 (the_low_target): Conditionally provide initializers for the
889bf7c5 12728 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12729 collect_ptrace_register and supply_ptrace_register members.
12730
9b4b61c8
UW
127312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12732
12733 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12734 * server.c (gdbserver_xmltarget): Define.
12735 (get_features_xml): Use it to replace "target.xml" and arch_string.
12736
12737 * configure.srv: Remove srv_xmltarget. Add XML files that were
12738 mentioned there to srv_xmlfiles instead. Remove conditional tests
12739 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12740 srv_xmlfiles and srv_regobj to include all possible choices.
12741 * configure.ac (srv_xmltarget): Remove.
12742 (srv_xmlfiles): Do not add "target.xml".
12743 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12744 checks for supplementary target information.
12745 * configure: Regenerate.
12746 * Makefile.in (XML_TARGET): Remove.
12747 (target.xml): Remove rule.
12748 (clean): Do not clean up target.xml.
12749 (.PRECIOUS): Do not mention target.xml.
12750
12751 * target.h (struct target_ops): Remove arch_string member.
12752 * linux-low.c (linux_arch_string): Remove.
12753 (linux_target_ops): Remove arch_string initializer.
12754 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12755 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12756 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12757 * spu-low.c (spu_arch_string): Remove.
12758 (spu_target_ops): Remove arch_string initializer.
12759 * win32-low.c (win32_arch_string): Remove.
12760 (win32_target_ops): Remove arch_string initializer.
12761 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12762 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12763 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12764
ee1a7ae4
UW
127652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12766
12767 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12768 by collect_ptrace_register and supply_ptrace_register hooks.
12769 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12770 instead of checking for the_low_target.left_pad_xfer.
12771 (usr_store_inferior_registers): Use collect_ptrace_register callback
12772 instead of checking for the_low_target.left_pad_xfer.
12773
12774 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12775 (s390_supply_ptrace_register): Likewise.
12776 (s390_fill_gregset): Call s390_collect_ptrace_register.
12777 (the_low_target): Update.
12778
12779 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12780 (ppc_supply_ptrace_register): Likewise.
12781 (the_low_target): Update.
12782
12783 * linux-i386-low.c (the_low_target): Update.
12784 * linux-x86-64-low.c (the_low_target): Update.
12785
d61ddec4
UW
127862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12787
12788 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12789 reg-s390.o and reg-s390x.o.
12790
12791 * linux-low.c (new_inferior): New global variable.
12792 (linux_create_inferior, linux_attach): Set it.
12793 (linux_wait_for_process): Call the_low_target.arch_setup after the
12794 target has stopped for the first time.
12795 (initialize_low): Do not call the_low_target.arch_setup.
12796
12797 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12798 (s390_set_pc): Likewise.
12799 (s390_arch_setup): New function.
12800 (the_low_target): Use s390_arch_setup as arch_setup routine.
12801
12802 * regcache.c (realloc_register_cache): New function.
12803 (set_register_cache): Call it for each existing regcache.
12804
d05b4ac3
UW
128052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12806
12807 * server.h (init_registers): Remove prototype.
12808
12809 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12810 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12811 instead of init_registers ().
12812 * linux-arm-low.c (init_registers_arm): Add prototype.
12813 (init_registers_arm_with_iwmmxt): Likewise.
12814 (the_low_target): Add initializer for arch_setup field.
12815 * linux-cris-low.c (init_registers_cris): Add prototype.
12816 (the_low_target): Add initializer for arch_setup field.
12817 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12818 (the_low_target): Add initializer for arch_setup field.
12819 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12820 (the_low_target): Add initializer for arch_setup field.
12821 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12822 (the_low_target): Add initializer for arch_setup field.
12823 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12824 (the_low_target): Add initializer for arch_setup field.
12825 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12826 (the_low_target): Add initializer for arch_setup field.
12827 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12828 (init_registers_mips64_linux): Likewise.
12829 (the_low_target): Add initializer for arch_setup field.
12830 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12831 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12832 (the_low_target): Add initializer for arch_setup field.
12833 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12834 (init_registers_powerpc_64): Likewise.
12835 (the_low_target): Add initializer for arch_setup field.
12836 * linux-s390-low.c (init_registers_s390): Add prototype.
12837 (init_registers_s390x): Likewise.
12838 (the_low_target): Add initializer for arch_setup field.
12839 * linux-sh-low.c (init_registers_sh): Add prototype.
12840 (the_low_target): Add initializer for arch_setup field.
12841 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12842 (the_low_target): Add initializer for arch_setup field.
12843 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12844 (the_low_target): Add initializer for arch_setup field.
12845
12846 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12847 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12848 instead of init_registers ().
12849 * win32-arm-low.c (init_registers_arm): Add prototype.
12850 (the_low_target): Add initializer for arch_setup field.
12851 * win32-i386-low.c (init_registers_i386): Add prototype.
12852 (the_low_target): Add initializer for arch_setup field.
12853
12854 * spu-low.c (init_registers_spu): Add prototype.
12855 (initialize_low): Call initialie_registers_spu () instead of
12856 initialize_registers ().
12857
fd96d250
PA
128582008-02-19 Pedro Alves <pedro@codesourcery.com>
12859
12860 * server.c (handle_v_requests): When handling the vRun and vAttach
12861 packets, if already debugging a process, don't kill it. Return an
12862 error instead.
12863
d41b6bb4
DJ
128642008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12865
12866 * server.c (handle_query): Correct length check.
12867
5ac588cf
PA
128682008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12869
12870 * win32-low.c (do_initial_child_stuff): Add process handle
12871 parameter. Set current_process_handle and current_process_id from the
12872 parameters. Clear globals.
12873 (win32_create_inferior): Don't set current_process_handle and
12874 current_process_id here. Instead pass them on the call to
12875 do_initial_child_stuff.
12876 (win32_attach): Likewise.
12877 (win32_clear_inferiors): New.
12878 (win32_kill): Don't close the current process handle or the
12879 current thread handle here. Instead call win32_clear_inferiors.
12880 (win32_detach): Don't open a new handle to the process. Call
12881 win32_clear_inferiors.
12882 (win32_join): Don't rely on current_process_handle; open a new
12883 handle using the process id.
12884 (win32_wait): Call win32_clear_inferiors when the inferior process
12885 has exited.
12886
ecd7ecbc
DJ
128872008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12888
12889 * server.c (monitor_show_help): Add "exit".
12890
1525d545
MG
128912008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12892
ecd7ecbc 12893 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12894 (clean): Add reg-xtensa.c.
12895 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12896 * configure.srv (xtensa*-*-linux*) New target.
12897 * linux-xtensa-low.c: New.
12898 * xtensa-xtregs.c: New.
1525d545 12899
59a016f0
PA
129002008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12901
12902 * hostio.c: Don't include errno.h.
12903 (errno_to_fileio_errno): Move to hostio-errno.
12904 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12905 error number outputting to the target->hostio_last_error callback.
12906 (hostio_packet_error): Use FILEIO_EINVAL directly.
12907 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12908 calls to hostio_error.
12909 * hostio-errno.c: New.
12910 * server.h (hostio_last_error_from_errno): Declare.
12911 * target.h (target_ops): Add hostio_last_error member.
12912 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12913 as hostio_last_error handler.
889bf7c5 12914 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12915 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12916 (wince_hostio_last_error): New functions.
12917 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12918 as hostio_last_error handler.
12919 (win32_target_ops) [!_WIN32_WCE]: Register
12920 hostio_last_error_from_errno as hostio_last_error handler.
12921 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12922 (hostio-errno.o): New rule.
12923 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12924 * configure.srv (srv_hostio_err_objs): New variable. Default to
12925 hostio-errno.o.
12926 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12927 * configure: Regenerate.
12928
2d717e4f
DJ
129292008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12930
12931 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12932 (linux_kill, linux_detach): Clean up the process list.
12933 * remote-utils.c (remote_open): Improve port number parsing.
12934 (putpkt_binary, input_interrupt): Only send interrupts if the target
12935 is running.
12936 * server.c (extended_protocol): Make static.
12937 (attached): Define earlier.
12938 (exit_requested, response_needed, program_argv): New variables.
12939 (target_running): New.
12940 (start_inferior): Clear attached here.
12941 (attach_inferior): Set attached here.
12942 (require_running): Define.
12943 (handle_query): Use require_running and target_running. Implement
12944 "monitor exit".
12945 (handle_v_attach, handle_v_run): New.
12946 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12947 (gdbserver_usage): Update.
12948 (main): Redo argument parsing. Handle --debug and --multi. Handle
12949 --attach along with other options or after the port. Save
12950 program_argv. Support no initial program. Resynchronize
12951 communication with GDB after an error. Handle "monitor exit".
12952 Use require_running and target_running. Always allow the extended
12953 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12954 restart in extended mode.
12955 * README: Refer to the GDB manual. Update --attach usage.
12956
7407e2de
AS
129572007-12-20 Andreas Schwab <schwab@suse.de>
12958
12959 * linux-low.c (STACK_SIZE): Define.
12960 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12961 (linux_test_for_tracefork): Likewise.
12962
b65d95c5
DJ
129632007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12964
12965 * linux-low.c (linux_wait_for_event): Update messages. Do not
12966 reinsert auto-delete breakpoints.
12967 * mem-break.c (struct breakpoint): Change return type of handler to
12968 int.
12969 (set_breakpoint_at): Update handler type.
12970 (reinsert_breakpoint_handler): Return 1 instead of calling
12971 delete_breakpoint.
12972 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12973 setting a new one.
12974 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12975 * mem-break.h (set_breakpoint_at): Update handler type.
12976 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12977 * win32-low.c (auto_delete_breakpoint): New.
12978 (get_child_debug_event): Use it.
12979
4e799345
DJ
129802007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12981
12982 * configure.ac: Check for pread and pwrite.
12983 * hostio.c (handle_pread): Fall back to lseek and read.
12984 (handle_pwrite): Fall back to lseek and write.
12985 * config.in, configure: Regenerated.
12986
27524b67
DJ
129872007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12988
12989 * server.c (myresume): Add own_buf argument.
12990 (main): Update calls.
12991
a20d5e98
DJ
129922007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12993
12994 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12995 * remote-utils.c (remote_open): Do not call disable_async_io.
12996 (block_async_io): Delete.
12997 (unblock_async_io): Make static.
12998 (initialize_async_io): New.
12999 * server.c (handle_v_cont): Handle async I/O here.
13000 (myresume): Likewise. Move other common resume tasks here...
13001 (main): ... from here. Call initialize_async_io. Disable async
13002 I/O before the main loop.
13003 * server.h (initialize_async_io): Declare.
13004 (block_async_io, unblock_async_io): Delete prototypes.
13005 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13006
b79d787e
DJ
130072007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13008
13009 * remote-utils.c (readchar): Allow binary data in received messages.
13010
d97903b2
PA
130112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13012
13013 * win32-low.c (attaching): New global.
13014 (win32_create_inferior): Clear the `attaching' global.
13015 (win32_attach): Set the `attaching' global.
13016 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13017 attaching. Only set a breakpoint at the entry point if not
13018 attaching.
13019
311de423
PA
130202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13021
13022 * server.c (main): Don't report dll events on the initial
13023 connection on attaches.
13024
6c2d16d2
PA
130252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13026
13027 * server.c (main): Relax numerical bases supported for the pid of
13028 the --attach command line argument.
13029
5ca906e6
PA
130302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13031
13032 * win32-low.c (win32_attach): Call OpenProcess before
13033 DebugActiveProcess, not after. Add last error output to error
13034 call.
13035
9c6c8194
PA
130362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13037
13038 * win32-low.c (win32_get_thread_context)
13039 (win32_set_thread_context): New functions.
13040 (thread_rec): Use win32_get_thread_context.
13041 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13042 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13043 field.
13044
4d5d1aaa
PA
130452007-12-03 Leo Zayas
13046 Pedro Alves <pedro_alves@portugalmail.pt>
13047
13048 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13049 global variables.
13050 (child_add_thread): Minor cleanup.
13051 (child_continue): Resume artificially suspended threads before
13052 calling ContinueDebugEvent.
13053 (suspend_one_thread): New.
13054 (fake_breakpoint_event): New.
13055 (get_child_debug_event): Change return type to int. Check here if
13056 gdb sent an interrupt request. If a soft interrupt was requested,
13057 fake a breakpoint event. Return 0 if there is no event to handle,
13058 and 1 otherwise.
13059 (win32_wait): Don't check here if gdb sent an interrupt request.
13060 Ensure there is a valid event to handle.
13061 (win32_request_interrupt): Add soft interruption method as last
13062 resort.
13063
c436e841
PA
130642007-12-03 Leo Zayas
13065 Pedro Alves <pedro_alves@portugalmail.pt>
13066
13067 * win32-low.h (win32_thread_info): Add descriptions to the
13068 structure members. Replace `suspend_count' counter by a
13069 `suspended' flag.
13070 * win32-low.c (thread_rec): Update condition of when to get the
13071 context from the inferior. Rely on ContextFlags being set if it
13072 has already been retrieved. Only suspend the inferior thread if
13073 we haven't already. Warn if that fails.
13074 (continue_one_thread): s/suspend_count/suspended/. Only call
13075 ResumeThread once. Warn if that fails.
13076
e7b5fa67
PA
130772007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13078
13079 * win32-low.c (win32_wait): Don't read from the inferior when it
13080 has already exited.
13081
a385171d
PA
130822007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13083
13084 * Makefile.in (win32_low_h): New variable.
13085 (win32-low.o): Add dependency on $(win32_low_h).
13086 (win32-arm-low.o, win32-i386-low.o): New rules.
13087
f80c84b3
DJ
130882007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13089
13090 * hostio.c: Correct copyright year.
13091
a6b151f1
DJ
130922007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13093
13094 * Makefile.in (OBS): Add hostio.o.
13095 (hostio.o): New rule.
13096 * server.h (handle_vFile): Declare.
13097 * hostio.c: New file.
13098 * server.c (handle_v_requests): Take packet_len and new_packet_len
13099 for binary packets. Call handle_vFile.
13100 (main): Update call to handle_v_requests.
13101
f9387fc3
DJ
131022007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13103
13104 * linux-low.c: Include <sched.h>.
13105
51c2684e
DJ
131062007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13107
13108 * linux-low.c (linux_tracefork_grandchild): New.
13109 (linux_tracefork_child): Use clone.
13110 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13111
75f83163
JB
131122007-10-31 Joel Brobecker <brobecker@adacore.com>
13113
13114 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13115
da5898ce
DJ
131162007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13117
13118 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13119
24a09b5f
DJ
131202007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13121
13122 * inferiors.c (change_inferior_id): Delete.
13123 (add_pid_to_list, pull_pid_from_list): New.
13124 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13125 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13126 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13127 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13128 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13129 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13130 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13131 (using_threads): Always set to 1.
13132 (handle_extended_wait): New.
13133 (add_process): Do not set TID.
13134 (linux_create_inferior): Set must_set_ptrace_flags.
13135 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13136 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13137 (linux_thread_alive): Rename TID argument to LWPID.
13138 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13139 (linux_wait_for_event): Do not use TID or check using_threads. Update
13140 call to dead_thread_notify. Call handle_extended_wait.
13141 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13142 (send_sigstop): Delete sigstop_sent.
13143 (wait_for_sigstop): Avoid TID.
13144 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13145 (linux_test_for_tracefork): New.
13146 (linux_lookup_signals): Use thread_db_active and
13147 linux_supports_tracefork_flag.
13148 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13149 * linux-low.h (get_process_thread): Avoid TID.
13150 (struct process_ifo): Move thread_known and tid to the end. Remove
13151 sigstop_sent.
13152 (linux_attach_lwp, thread_db_init): Update prototypes.
13153 * server.h (change_inferior_id): Delete prototype.
13154 (add_pid_to_list, pull_pid_from_list): New prototypes.
13155 * thread-db.c (thread_db_use_events): New.
13156 (find_first_thread): Rename to...
13157 (find_one_thread): ...this. Update callers and messages. Do not
13158 call fatal. Check thread_db_use_events. Do not call
13159 change_inferior_id or new_thread_notify.
13160 (maybe_attach_thread): Update. Do not call new_thread_notify.
13161 (thread_db_init): Set thread_db_use_events. Check use_events.
13162 * utils.c (fatal, warning): Correct message prefix.
13163
30ed0a8f
DJ
131642007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * Makefile.in (clean): Remove new files.
13167 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13168 (powerpc-64.o, powerpc-64.c): New rules.
13169 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13170 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13171 with SPE.
13172 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13173 SPE targets.
13174 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13175 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13176 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13177 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13178 (target_regsets): Add AltiVec and SPE register sets.
13179 * configure.ac: Check for AltiVec and SPE.
13180 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13181 (ppc_fill_vrregset, ppc_store_vrregset): New.
13182 (target_regsets): Add AltiVec register set.
13183 * configure: Regenerated.
13184
fd462a61
DJ
131852007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13186
13187 * linux-low.c (O_LARGEFILE): Define.
13188 (linux_read_memory): Use /proc/PID/mem.
13189 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13190 * configure, config.in: Regenerated.
13191
69f223ed
DJ
131922007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13193
13194 * linux-low.c (linux_wait_for_event): Do not pass signals while
13195 single-stepping.
13196
aec18585
PA
131972007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13198
13199 * win32-low.c (create_process): New.
13200 (win32_create_inferior): Use create_process instead of
13201 CreateProcess. If create_process failed retry appending an ".exe"
13202 suffix. Store the GetLastError result immediatelly after
13203 create_process calls and use it on the call to error.
13204
34d86ddd
PA
132052007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13206
13207 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13208
5a0e3bd0
JB
132092007-08-23 Joel Brobecker <brobecker@adacore.com>
13210
13211 * configure.ac: Switch license to GPLv3.
13212
f88c79e6
MS
132132007-08-01 Michael Snyder <msnyder@access-company.com>
13214
13215 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13216
6b3d9b83
PA
132172007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13218
13219 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13220 typedef.
13221 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13222 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13223 CloseToolhelp32Snapshot.
13224 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13225 CloseToolhelp32Snapshot.
13226
c588c53c
MS
132272007-07-27 Michael Snyder <michael.snyder@access-company.com>
13228
13229 * server.c (main): Check for inferior exit before main loop.
13230
aa0403d9
PA
132312007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13232
13233 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13234 instead of on tmp_desc.
13235
255e7678
DJ
132362007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13237 Daniel Jacobowitz <dan@codesourcery.com>
13238
13239 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13240 (add_thread): Minor cleanups.
13241 (clear_inferiors): Move lower in the file. Clear the DLL
13242 list.
13243 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13244 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13245 (xml_escape_text): New.
13246 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13247 for qSupported.
13248 (handle_v_cont): Report errors.
13249 (gdbserver_version): Update.
13250 (main): Correct size of own_buf. Do not report initial DLL events.
13251 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13252 (unloaded_dll, xml_escape_text): New.
13253 * win32-low.c (enum target_waitkind): Update comments.
13254 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13255 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13256 (win32_EnumProcessModules, win32_GetModuleInformation)
13257 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13258 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13259 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13260 (win32_Module32First, win32_Module32Next, load_toolhelp)
13261 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13262 (get_child_debug_event): Handle DLL events.
13263 (win32_wait): Likewise.
13264
0d37add9
DJ
132652007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13266
13267 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13268 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13269
45e2715e
PA
132702007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13271
13272 * win32-low.c (handle_output_debug_string): Ignore event if not
13273 waiting.
13274
c5674cf1
PA
132752007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13276
13277 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13278
2bbe3cc1
DJ
132792007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13280
13281 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13282
ae13219e
DJ
132832007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * inferiors.c (change_inferior_id): Add comment.
13286 * linux-low.c (check_removed_breakpoint): Add an early
13287 prototype. Improve debug output.
13288 (linux_attach): Doc update.
13289 (linux_detach_one_process, linux_detach): Clean up before releasing
13290 each process.
13291 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13292 * linux-low.h (struct process_info): Doc improvement.
13293 * mem-break.c (delete_all_breakpoints): New.
13294 * mem-break.h (delete_all_breakpoints): New prototype.
13295 * thread-db.c (find_first_thread): New.
13296 (thread_db_create_event): Call it instead of
13297 thread_db_find_new_threads. Clean up unused variables.
13298 (maybe_attach_thread): Remove first thread handling.
13299 (thread_db_find_new_threads): Use find_first_thread.
13300 (thread_db_get_tls_address): Likewise.
13301
4105de34
DJ
133022007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * thread-db.c (thread_db_find_new_threads): Add prototype.
13305 (thread_db_create_event): Check for the main thread before adding
13306 a new thread.
13307 (maybe_attach_thread): Only enable event reporting if TID == 0.
13308 (thread_db_get_tls_address): Check for new threads.
13309
2b876972
DJ
133102007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13311
13312 * linux-low.c (linux_create_inferior): Try execv before execvp.
13313 * spu-low.c (spu_create_inferior): Likewise.
13314
7a245884
DJ
133152007-06-13 Mike Frysinger <vapier@gentoo.org>
13316
13317 * linux-low.c (linux_create_inferior): Change execv to execvp.
13318 * spu-low.c (spu_create_inferior): Likewies.
13319
117ce543
DJ
133202007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13321
13322 * Makefile.in (clean): Clean new files instead of deleted ones.
13323 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13324 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13325 rules.
13326 * configure.srv: Specify XML files and new regformats for MIPS and
13327 MIPS64 GNU/Linux.
13328 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13329 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13330 an entry for the restart register.
13331 (mips_cannot_fetch_register, mips_cannot_store_register)
13332 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13333 register names to match the XML descriptions.
13334 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13335 restart register instead of $0.
13336
0e7f50da
UW
133372007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13338 Markus Deuling <deuling@de.ibm.com>
13339
13340 * remote-utils.c (decode_xfer_write): New function.
13341 * server.h (decode_xfer_write): Add prototype.
13342 * server.c (handle_query): Add PACKET_LEN argument. Support
13343 qXfer:spu:read and qXfer:spu:write packets.
13344 (main): Pass packet_len to handle_query.
13345 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13346 * target.h (target_ops): Add qxfer_spu.
13347
374c1d38
UW
133482007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13349
13350 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13351 accessing non-seekable spufs files.
13352
bb63802a
UW
133532007-05-16 Markus Deuling <deuling@de.ibm.com>
13354
889bf7c5 13355 * server.c (handle_query): Add reply for qC packet.
bb63802a 13356
7390519e
PA
133572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13358 Leo Zayas <lerele@champenstudios@com>
13359
13360 * server.h (check_remote_input_interrupt_request): New function.
13361 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13362 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13363 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13364 (check_remote_input_interrupt_request): New function.
13365 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13366 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13367 winapi_GenerateConsoleCtrlEvent): New typedefs.
13368 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13369 to 250 ms.
13370 (win32_wait): Check for remote interrupt request
13371 with check_remote_input_interrupt_request.
13372 (win32_request_interrupt): New function.
13373 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13374
34b34921
PA
133752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13376
13377 * win32-low.c (debug_registers_changed,
13378 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13379 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13380 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13381 (thread_rec): Get context using the low target.
13382 (child_add_thread): Call thread_added on the low target,
13383 which does the same thing.
13384 (regptr): Delete.
13385 (do_initial_child_stuff): Remove debug registers references.
13386 Set context using the low target. Resume threads after
13387 setting the contexts.
13388 (child_continue): Remove dead variable. Remove debug
13389 registers references.
13390 (child_fetch_inferior_registers): Go through the low target.
13391 (do_child_store_inferior_registers): Remove.
13392 (child_store_inferior_registers): Go through the low target.
13393 (win32_resume): Remove debug registers references.
13394 Set context using the low target.
13395 (handle_exception): Change return type to void. Don't record
13396 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13397 first chance exception.
889bf7c5 13398 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13399 goto loop. Always return after waiting for debug event.
13400 (win32_wait): Convert to switch statement. Handle spurious
13401 events.
13402
13403 * win32-i386-low.c (debug_registers_changed,
13404 debug_registers_used): New.
13405 (initial_stuff): Rename to ...
13406 (i386_initial_stuff): ... this. Clear debug registers
13407 state variables.
13408 (store_debug_registers): Delete.
13409 (i386_get_thread_context): New.
13410 (load_debug_registers): Delete.
13411 (i386_set_thread_context): New.
13412 (i386_thread_added): New.
13413 (single_step): Rename to ...
13414 (i386_single_step): ... this.
13415 (do_fetch_inferior_registers): Rename to ...
13416 (i386_fetch_inferior_register): ... this.
13417 (i386_store_inferior_register): New.
13418 (the_low_target): Adapt to new interface.
13419
13420 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13421 (arm_get_thread_context): New.
13422 (arm_set_thread_context): New.
13423 (regptr): New.
13424 (do_fetch_inferior_registers): Rename to ...
13425 (arm_fetch_inferior_register): ... this.
13426 (arm_store_inferior_register): New.
13427 (arm_wince_breakpoint): Reimplement as unsigned long.
13428 (arm_wince_breakpoint_len): Define.
13429 (the_low_target): Adapt to new interface.
13430
13431 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13432 load_debug_registers. Add get_thread_context, set_thread_context,
13433 thread_added and store_inferior_register. Rename
13434 fetch_inferior_registers to fetch_inferior_register.
13435 (regptr): Remove declaration.
13436
dd6953e1
PA
134372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13438
13439 * linux-low.c (linux_detach): Change return type to int. Return 0.
13440 * spu-low.c (spu_detach): Likewise.
13441
444d6139
PA
134422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13443
13444 * target.h (target_ops): Change return type of detach to int.
13445 Add join.
13446 (join_inferior): New.
13447 * server.c (main): Don't skip detach support on mingw32.
13448 If the inferior doesn't support detaching return error.
13449 Call join_inferior instead of using waitpid.
13450 * linux-low.c (linux_join): New.
13451 (linux_target_op): Add linux_join.
13452 * spu-low.c (spu_join): New.
13453 (spu_target_ops): Add spu_join.
13454 * win32-low.c (win32_detach): Adapt to new interface.
13455 Reopen current_process_handle before detaching. Issue a child
13456 resume before detaching.
13457 (win32_join): New.
13458 (win32_target_op): Add win32_join.
13459
1d5315fe
PA
134602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13461
13462 * win32-low.c (win32-attach): Fix return value.
13463 * target.h (target_ops): Describe ATTACH return values.
13464
bf914831
PA
134652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13466
13467 * win32-low.c (GETPROCADDRESS): Define.
13468 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13469 (winapi_DebugSetProcessKillOnExit): Likewise.
13470 (win32_create_inferior): Force usage of ansi CreateProcessA.
13471 (win32_attach): Use GETPROCADDRESS.
13472 (win32_detach): Likewise.
13473
f72f3e60
PA
134742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13475
13476 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13477
ed50f18f
PA
134782007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13479
13480 * win32-low.c: Commit leftover changes from 2007-03-29.
13481
0c2ead7e
DJ
134822007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13483
13484 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13485 fields short instead of int. Add explicit padding.
13486 (i387_cache_to_fsave): Remove unnecessary casts.
13487 (i387_fsave_to_cache): Doc fix.
13488 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13489
73725ff3
DJ
134902007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13491
13492 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13493 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13494
d99f33d8
PA
134952007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13496
13497 * configure.srv (arm*-*-mingw32ce*): Move near the other
13498 arm targets.
13499
68070c10
PA
135002007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13501
2482afc6 13502 * configure.ac: Add errno checking.
68070c10
PA
13503 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13504 sys/file.h and malloc.h.
13505 (AC_CHECK_DECLS): Add perror.
13506 (srv_mingwce): Handle.
2482afc6 13507 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13508 win32-i386-low.o to srv_tgtobj.
13509 (i[34567]86-*-mingw*): Likewise.
13510 (arm*-*-mingw32ce*): Add case.
13511 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13512 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13513 [__MINGW32CE__] (strerror): New function.
13514 [__MINGW32CE__] (errno): Define to GetLastError.
13515 [__MINGW32CE__] (COUNTOF): New macro.
13516 (remote_open): Remove extra close call.
13517 * mem-break.c (delete_breakpoint_at): New function.
13518 * mem-break.h (delete_breakpoint_at): Declare.
13519 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13520 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13521 [USE_WIN32API] (read, write): Add char* casts.
13522 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13523 * server.h: Include wincecompat.h on Windows CE.
13524 [HAVE_ERRNO_H]: Check.
13525 (perror): Declare if not declared.
13526 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13527 (perror_with_name): Remove errno declaration.
13528 * wincecompat.h: New.
13529 * wincecompat.c: New.
13530 * win32-low.h: New.
13531 * win32-arm-low.c: New.
13532 * win32-i386-low.c: New.
13533 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13534 (OUTMSG2): Make it safe.
13535 (_T): New macro.
13536 (COUNTOF): New macro.
13537 (NUM_REGS): Get it from the low target.
13538 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13539 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13540 (thread_rec): Let low target handle debug registers.
13541 (child_add_thread): Likewise.
13542 (child_init_thread_list): Likewise.
13543 (continue_one_thread): Likewise.
13544 (regptr): New.
13545 (do_child_fetch_inferior_registers): Move to ...
13546 * win32-i386-low.c: ... here, and rename to ...
13547 (do_fetch_inferior_registers): ... this.
889bf7c5 13548 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13549 Go through the low target.
13550 (do_child_store_inferior_registers): Use regptr.
13551 (strwinerror): New function.
13552 (win32_create_inferior): Handle Windows CE.
13553 Use strwinerror instead of strerror on Windows error
13554 codes. Add program to the error output.
13555 Don't close the main thread handle on Windows CE.
13556 (win32_attach): Use coredll.dll on Windows CE.
13557 (win32_kill): Close current process and current
13558 thread handles.
13559 (win32_detach): Use coredll.dll on Windows CE.
13560 (win32_resume): Let low target handle debug registers, and
13561 step request.
13562 (handle_exception): Add/Remove initial breakpoint. Avoid
13563 non-existant WSTOPSIG on Windows CE.
13564 (win32_read_inferior_memory): Cast to remove warning.
13565 (win32_arch_string): Go through the low target.
13566 (initialize_low): Call set_breakpoint_data with the low
13567 target's breakpoint.
13568 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13569 FOP_REGNUM, mappings): Move to ...
13570 * win32-i386-low.c: ... here.
13571 * win32-low.c (win32_thread_info): Move to ...
13572 * win32-low.h: ... here.
13573 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13574 win32-arm-low.c and wincecompat.c.
13575 (all:): Add $EXEEXT.
13576 (install-only:): Likewise.
13577 (gdbserver:): Likewise.
13578 (gdbreplay:): Likewise.
13579 * config.in: Regenerate.
13580 * configure: Regenerate.
13581
41093d81
PA
135822007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13583
13584 * win32-low.c: Rename typedef thread_info to
13585 win32_thread_info throughout.
13586
544afa54
PA
135872007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13588
13589 * win32-i386-low.c: Rename to ...
13590 * win32-low.c: ... this.
13591 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13592 * Makefile.in: Likewise.
13593
bce7165d
PA
135942007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13595
13596 * remote-utils.c (monitor_output): Constify msg parameter.
13597 * server.h (monitor_output): Likewise.
13598 * win32-i386-low.c (handle_output_debug_string): New.
13599 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13600 handle_output_debug_string.
13601 (get_child_debug_event): Likewise.
13602
506c7aa0
DJ
136032007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13604
13605 * server.c (main): Correct strtoul check.
13606
42c81e2a
DJ
136072007-03-27 Jon Ringle <jon@ringle.org>
13608
13609 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13610
9453113a
DJ
136112007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13612
13613 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13614
64a69107
DJ
136152007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13616
13617 * terminal.h: Check HAVE_SGTTY_H.
13618
136192007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13620
13621 * remote-utils.c (remote_open): Print out the assigned port number.
13622
c74d0ad8
DJ
136232007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13624
13625 * remote-utils.c (monitor_output): New function.
13626 * server.c (debug_threads): Define here.
13627 (monitor_show_help): New function.
13628 (handle_query): Handle qRcmd.
13629 (main): Do not handle 'd' packet.
13630 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13631 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13632 of debug_threads.
13633
de7c3b4a
PA
136342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13635
13636 * Makefile.in (EXEEXT): New.
13637 (clean): Use $(EXEEXT).
13638
ef57601b
PA
136392007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13640
13641 * target.h (target_ops): Rename send_signal to request_interrupt,
13642 and remove enum target_signal parameter.
13643 * linux-low.c (linux_request_interrupt): Rename from
13644 linux_send_signal, and always send SIGINT.
13645 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13646 and always send SIGINT.
13647 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13648 of send_signal.
13649 (input_interrupt): Likewise.
13650
820f2bda
PA
136512007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13652
13653 * server.c (get_features_xml): Check if target implemented
13654 arch_string.
13655 * win32-i386-low.c (win32_arch_string): New.
13656 (win32_target_ops): Add win32_arch_string as arch_string member.
13657
ab39bf24
UW
136582007-02-22 Markus Deuling <deuling@de.ibm.com>
13659
13660 * spu-low.c (spu_arch_string): New.
13661 (spu_target_ops): Add spu_arch_string.
13662
61ff6e04
DJ
136632007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13664
13665 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13666 * configure.ac: Do not check for terminal.h.
13667 * configure, config.in: Regenerated.
13668
fb1e4ffc
DJ
136692007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13670
13671 * Makefile.in (OBS): Add $(XML_BUILTIN).
13672 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13673 (clean): Update.
13674 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13675 (arm-with-iwmmxt.c): New.
13676 * config.in, configure: Regenerate.
13677 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13678 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13679 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13680 (arm*-*-linux*): Add iWMMXt and regset support.
13681 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13682 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13683 (arm_store_wmmxregset, target_regsets): New.
13684 * server.c (get_features_xml): Take annex argument. Check builtin
13685 XML documents.
13686 (handle_query): Handle multiple annexes.
13687
0f48aa01
DJ
136882007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13689
13690 * remote-utils.c [USE_WIN32API] (read, write): Define.
13691 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13692 write.
13693
23181151
DJ
136942007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * linux-i386-low.c (the_low_target): Set arch_string.
13697 * linux-x86-64-low.c (the_low_target): Likewise.
13698 * linux-low.c (linux_arch_string): New.
13699 (linux_target_ops): Add it.
13700 * linux-low.h (struct linux_target_ops): Add arch_string.
13701 * server.c (write_qxfer_response): Use const void * for DATA.
13702 (get_features_xml): New.
13703 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13704 * target.h (struct target_ops): Add arch_string method.
13705
9d606399
DJ
137062007-01-03 Denis Pilat <denis.pilat@st.com>
13707 Daniel Jacobowitz <dan@codesourcery.com>
13708
13709 * linux-low.c (linux_kill): Handle being called with no threads.
13710 * win32-i386-low.c (win32_kill): Likewise.
13711 (get_child_debug_event): Clear current_process_handle.
13712
137132006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13714 Daniel Jacobowitz <dan@codesourcery.com>
13715
13716 * remote-utils.c (remote_open): Check the type of specified
13717 serial port devices before opening them.
13718 * server.c (main): Kill the inferior if an error occurs during
13719 the first remote_open.
13720
a5e13d24
DJ
137212006-12-05 Markus Deuling <deuling@de.ibm.com>
13722
13723 * README: Update supported targets.
13724
186947f7
DJ
137252006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * Makefile.in (clean): Remove reg-mips64.c.
13728 (reg-mips64.c, reg-mips64.o): New rules.
13729 * configure.srv: Handle mips64. Include regset support for mips.
13730 * linux-mips-low.c (union mips_register): New.
13731 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13732 (mips_breakpoint, mips_breakpoint_at): Use int.
13733 (mips_collect_register, mips_supply_register)
13734 (mips_collect_register_32bit, mips_supply_register_32bit)
13735 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13736 (mips_store_fpregset, target_regsets): New.
13737 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13738
a13e2c95
UW
137392006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13740
13741 * configure.srv: Add target "spu*-*-*".
13742 * Makefile.in (clean): Remove reg-spu.c.
13743 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13744 * spu-low.c: New file.
13745
cb7283db
DJ
137462006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13747
13748 * configure.ac: Correct td_thr_tls_get_addr test.
13749 * configure: Regenerated.
13750
89be2091
DJ
137512006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * linux-low.c (linux_wait_for_event): Reformat. Use the
13754 pass_signals array.
13755 * remote-utils.c (decode_address_to_semicolon): New.
13756 * server.c (pass_signals, handle_general_set): New.
13757 (handle_query): Mention QPassSignals for qSupported.
13758 (main): Call handle_general_set.
13759 * server.h (pass_signals, decode_address_to_semicolon): New.
13760
000ef4f0
DJ
137612006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * server.c (handle_query): Correct error handling for read_auxv.
13764
b7149293
UW
137652005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13766
13767 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13768 and srv_linux_thread_db to yes.
13769 * linux-s390-low.c (s390_fill_gregset): New function.
13770 (target_regsets): Define data structure.
13771
dae5f5cf
DJ
137722006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13773
13774 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13775 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13776 * config.in, configure: Regenerated.
13777 * inferiors.c (gdb_id_to_thread): New function.
13778 (gdb_id_to_thread_id): Use it.
13779 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13780 * linux-low.h (struct process_info): Add th member.
13781 (thread_db_get_tls_address): New prototype.
13782 * remote-utils.c (decode_address): Make non-static.
13783 * server.c (handle_query): Handle qGetTLSAddr.
13784 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13785 * target.h (struct target_ops): Add get_tls_address.
13786 * thread-db.c (maybe_attach_thread): Save the thread handle.
13787 (thread_db_get_tls_address): New.
13788
32ca6d61
DJ
137892006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13790
13791 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13792 (linux_resume_one_process): Take a siginfo_t *. Update all
13793 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13794 (struct pending_signals): Add a siginfo_t.
13795 (linux_wait_for_process): Always set last_status.
13796 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13797 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13798 * linux-low.h (struct process_info): Add last_status.
13799
5ffff7c1
DJ
138002006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13801
13802 * remote-utils.c (try_rle): New function.
13803 (putpkt_binary): Use it.
13804
8695c747
DJ
138052006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13806
13807 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13808 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13809 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13810 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13811 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13812 point registers.
13813
290fadea
RS
138142006-08-08 Richard Sandiford <richard@codesourcery.com>
13815
13816 * server.c (terminal_fd): New variable.
13817 (old_foreground_pgrp): Likewise.
13818 (restore_old_foreground_pgrp): New function.
13819 (start_inferior): Record the terminal file descriptor in terminal_fd
13820 and its original foreground group in old_foreground_pgrp. Register
13821 restore_old_foreground_pgrp with atexit().
13822
9f2e1e63
DJ
138232006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * server.c (handle_query): Correct qPart to qXfer.
13826
b80864fb
DJ
138272006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13828
13829 * configure.ac: Check for more headers which are missing on
13830 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13831 * configure.srv: Add Cygwin and mingw32.
13832 * remote-utils.c: Don't include headers unconditionally which
13833 are missing on mingw32. Include <winsock.h> for mingw32.
13834 (remote_open): Adjust for mingw32 support. Flush
13835 standard error after writing to it.
13836 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13837 (unblock_async_io, enable_async_io, disable_async_io)
13838 (readchar, getpkt): Update for Winsock support.
13839 (prepare_resume_reply): Expect a protocol signal number.
13840 * server.c: Disable <sys/wait.h> on mingw32.
13841 (start_inferior): Adjust for mingw32 support. Flush
13842 standard error after writing to it.
13843 (attach_inferior): Likewise. Use protocol signal
13844 numbers.
13845 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13846 and names.
13847 * win32-i386-low.c: New file.
13848 * Makefile.in (XM_CLIBS): Set.
13849 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13850 (win32-i386-low.o): New dependency rule.
13851 * linux-low.c (linux_wait): Use target signal numbers.
13852 * target.h (struct target_ops): Doc fix.
13853 * server.h (target_signal_to_name): New prototype.
13854 * gdbreplay.c: Don't include headers unconditionally which
13855 are missing on mingw32. Include <winsock.h> for mingw32.
13856 (remote_close, remote_open): Adjust for Winsock support.
13857 * configure, config.in: Regenerated.
13858
0876f84a
DJ
138592006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13860
13861 * server.c (decode_xfer_read, write_qxfer_response): New.
13862 (handle_query): Take a packet length argument. Handle
13863 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13864 the qSupported response.
13865 (main): Update call to handle_query.
13866
01f9e8fa
DJ
138672006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13868
13869 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13870 (putpkt_binary): Renamed from putpkt and adjusted for binary
13871 data.
13872 (putpkt): New wrapper for putpkt_binary.
13873 (readchar): Don't mask off the high bit.
13874 (decode_X_packet): New function.
13875 * server.c (main): Call putpkt_binary if a handler sets the packet
13876 length. Save the length of the incoming packet. Handle 'X'.
13877 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13878
be2a5f71
DJ
138792006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13880
13881 * server.c (handle_query): Handle qSupported.
13882
ea025f5f
DJ
138832006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13884
13885 * remote-utils.c (all_symbols_looked_up): New variable.
13886 (look_up_one_symbol): Check it.
13887 * server.h (look_up_one_symbol): New declaration.
13888 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13889
9308fc88
DJ
138902006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13891
13892 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13893 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13894 (PTRACE_GET_THREAD_AREA): Define.
13895 (ps_get_thread_area): New function.
13896
52fb6437
NS
138972006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13898
13899 * configure.srv (m68k*-*-uclinux*): New target.
13900 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13901 (linux_resume_one_process): Remove extraneous cast.
13902 (linux_read_offsets): New.
13903 (linux_target_op): Add linux_read_offsets on mmuless systems.
13904 * server.c (handle_query): Add qOffsets logic.
13905 * target.h (struct target_ops): Add read_offsets.
13906
21b0f40c
DJ
139072006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13910 (PTRACE_GET_THREAD_AREA): Define.
13911 (ps_get_thread_area): New function.
13912 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13913 (linux-x86-64-low.o): Update.
13914
0050a760
DJ
139152006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * configure.ac: Remove checks for prfpregset_t.
13918 * gdb_proc_service.h: New file.
13919 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13920 new "gdb_proc_service.h".
13921 * proc-service.c: Likewise.
13922 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13923 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13924 * Makefile.in (gdb_proc_service_h): Updated.
13925 * configure, config.in: Regenerated.
13926
b92a518e
DJ
139272006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * remote-utils.c (prepare_resume_reply): Move declaration
13930 of gdb_id_from_wait to the top of the block.
13931
545587ee
DJ
139322006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * linux-low.c (regsets_store_inferior_registers): Read the regset
13935 from the target before filling it.
13936
9db87ebd
DJ
139372006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * server.c (attach_inferior): Return SIGTRAP for a successful
13940 attach.
13941
dd24457d
DJ
139422006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13943
13944 * Makefile.in (OBS): Add version.o.
13945 (STAGESTUFF): Delete.
13946 (version.o): Add dependencies.
13947 (version.c): Replace rule.
13948 (clean): Remove version.c.
13949 * server.c (gdbserver_version): New.
13950 (gdbserver_usage): Use printf.
13951 (main): Handle --version and --help.
13952 * server.h (version, host_name): Add declarations.
13953
6f0f660e
EZ
139542005-12-23 Eli Zaretskii <eliz@gnu.org>
13955
889bf7c5
PA
13956 * linux-arm-low.c:
13957 * linux-arm-low.c:
13958 * inferiors.c:
13959 * i387-fp.h:
13960 * i387-fp.c:
13961 * gdbreplay.c:
13962 * regcache.c:
13963 * proc-service.c:
13964 * mem-break.h:
13965 * mem-break.c:
13966 * linux-x86-64-low.c:
13967 * linux-sh-low.c:
13968 * linux-s390-low.c:
13969 * linux-ppc64-low.c:
13970 * linux-ppc-low.c:
13971 * linux-mips-low.c:
13972 * linux-m68k-low.c:
13973 * linux-m32r-low.c:
13974 * linux-low.h:
13975 * linux-low.c:
13976 * linux-ia64-low.c:
13977 * linux-i386-low.c:
13978 * linux-crisv32-low.c:
13979 * thread-db.c:
13980 * terminal.h:
13981 * target.h:
13982 * target.c:
13983 * server.h:
13984 * server.c:
13985 * remote-utils.c:
13986 * regcache.h:
13987 * utils.c:
13988 * Makefile.in:
13989 * configure.ac:
6f0f660e
EZ
13990 * gdbserver.1: Add (C) after Copyright. Update the FSF
13991 address.
13992
9d1fb177
DJ
139932005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13994
13995 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13996 (arm_breakpoint_at): Recognize both breakpoints.
13997 (the_low_target): Use the correct breakpoint instruction.
13998
011a70c2
DJ
139992005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14000
14001 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14002 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14003 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14004 (the_low_target): Update.
14005
7fb85e41
AS
140062005-10-25 Andreas Schwab <schwab@suse.de>
14007
14008 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14009
14010 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14011 (ia64_num_regs): Reduce to 462.
14012
3db0444b
DJ
140132005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * acinclude.m4: Correct quoting.
14016 * aclocal.m4: Regenerated.
14017
14018 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14019 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14020 (thread_db_init): Call thread_db_err_str.
14021 * configure.ac: Check for TD_VERSION.
14022 * config.in, configure: Regenerated.
14023
bee0189a
DJ
140242005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14025
14026 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14027
e9d25b98
DJ
140282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14031 is not available. Define HAVE_PTRACE_GETREGS if it is.
14032 * config.in, configure: Regenerated.
14033 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14034 * linux-i386-low.c, linux-m68k-low.c: Update to use
14035 HAVE_PTRACE_GETREGS.
14036 * linux-low.c (regsets_fetch_inferior_registers)
14037 (regsets_store_inferior_registers): Only return 0 if we processed
14038 GENERAL_REGS.
14039 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14040 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14041
a06660f7
DJ
140422005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * inferiors.c (struct thread_info): Add gdb_id.
14045 (add_thread): Add gdb_id argument.
14046 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14047 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14048 calls to add_thread.
14049 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14050 * server.c (handle_query): Use thread_to_gdb_id.
14051 (handle_v_cont, main): Use gdb_id_to_thread_id.
14052 * server.h (add_thread): Update prototype.
14053 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14054 prototypes.
14055
5a1f5858
DJ
140562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14057
14058 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14059 left-padded registers.
14060 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14061 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14062
e122f1f5
SE
140632005-07-01 Steve Ellcey <sje@cup.hp.com>
14064
14065 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14066 * configure: Regenerate.
14067 * config.in: Regenerate.
14068 * server.h (NEED_DECLARATION_STRERROR):
14069 Replace with !HAVE_DECL_STRERROR.
14070
d592fa2f
DJ
140712005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * linux-low.c (linux_wait, linux_send_signal): Don't test
14074 an unsigned long variable for > 0 if it could be MAX_ULONG.
14075 * server.c (myresume): Likewise.
14076 * target.c (set_desired_inferior): Likewise.
14077
ccbd4912
MK
140782005-06-13 Mark Kettenis <kettenis@gnu.org>
14079
14080 * configure.ac: Simplify and improve check for socklen_t.
14081 * configure, config.in: Regenerate.
14082
f450004a
DJ
140832005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14084
14085 * acconfig.h: Remove.
14086 * configure.ac: Add a test for socklen_t. Use three-argument
14087 AC_DEFINE throughout.
14088 * config.in: Regenerated using autoheader 2.59.
14089 * configure: Regenerated.
14090
14091 * gdbreplay.c (socklen_t): Provide a default.
14092 (remote_open): Use socklen_t.
14093 * remote-utils.c (socklen_t): Provide a default.
14094 (remote_open): Use socklen_t.
14095 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14096 unsigned char.
14097
14098 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14099 char for buffers.
14100 * linux-low.c (linux_read_memory, linux_write_memory)
14101 (linux_read_auxv): Likewise.
14102 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14103 (check_mem_write): Likewise.
14104 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14105 Likewise.
14106 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14107 (registers_from_string, register_data): Likewise.
14108 * server.c (handle_query, main): Likewise.
14109 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14110 (decode_M_packet): Likewise.
14111 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14112 * target.h (struct target_ops): Update read_memory, write_memory,
14113 and read_auxv.
14114 (read_inferior_memory, write_inferior_memory): Update.
14115 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14116 to unsigned char *.
14117 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14118 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14119 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14120 linux-s390-low.c, linux-sh-low.c: Update for changes in
14121 read_inferior_memory and the_low_target->breakpoint.
14122
eee84df1
DJ
141232005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14126 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14127 * configure.srv: Add powerpc64-*-linux*.
14128 * linux-ppc64-low.c: New file.
14129
45b134e5
OF
141302005-05-23 Orjan Friberg <orjanf@axis.com>
14131
14132 * linux-cris-low.c: New file with support for CRIS.
14133 * linux-crisv32-low.c: Ditto for CRISv32.
14134 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14135 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14136 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14137 reg-crisv32.o, and reg-crisv32.c to make rules.
14138 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14139 recognized targets.
14140
48d93c75
UW
141412005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14142
14143 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14144 of sizeof (PTRACE_XFER_TYPE).
14145 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14146
e013ee27
OF
141472005-05-12 Orjan Friberg <orjanf@axis.com>
14148
889bf7c5 14149 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14150 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14151 pointers for hardware watchpoint support.
14152 * linux-low.h (struct linux_target_ops): Ditto.
14153 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14154 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14155 to linux_target_ops.
14156 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14157 reply packet.
14158 * server.c (main): Recognize 'Z' and 'z' packets.
14159
b0ded00b
UW
141602005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14161
14162 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14163 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14164 (the_low_target): Add new members.
14165
8643e2ad
DJ
141662005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14167
14168 * proc-service.c (ps_lgetregs): Search all_processes instead of
14169 all_threads.
14170
fc620387
DJ
141712005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * server.c (start_inferior): Change return type to int.
14174 (attach_inferior): Change sigptr to int *.
14175 (handle_v_cont, handle_v_requests): Change signal to int *.
14176 (main): Change signal to int.
14177
141782005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14179
14180 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14181 * configure.srv: Add m32r*-*-linux*.
14182 * linux-m32r-low.c: New file.
14183
e0e76420
DJ
141842005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14185
14186 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14187
a1928bad
DJ
141882005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14189
14190 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14191 Take unsigned long arguments for PIDs.
14192 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14193 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14194 (wait_for_sigstop, linux_resume_one_process)
14195 (regsets_fetch_inferior_registers, linux_send_signal)
14196 (linux_read_auxv): Likewise. Update the types of variables holding
14197 PIDs. Update format string specifiers.
14198 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14199 * remote-utils.c (prepare_resume_reply): Likewise.
14200 * server.c (cont_thread, general_thread, step_thread)
14201 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14202 unsigned long.
14203 (handle_query): Update format specifiers.
14204 (handle_v_cont, main): Use strtoul for thread IDs.
14205 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14206 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14207 (general_thread, step_thread, thread_from_wait)
14208 (old_thread_from_wait): Update.
14209 * target.h (struct thread_resume): Use unsigned long for THREAD.
14210 (struct target_ops): Use unsigned long for arguments to attach and
14211 thread_alive.
14212
dcdb98d2
DJ
142132005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * acinclude.m4: Include bfd/bfd.m4 directly.
14216 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14217 <agriffis@toolchain.org>.
14218 * aclocal.m4, configure: Regenerated.
14219
bec39cab
AC
142202005-01-07 Andrew Cagney <cagney@gnu.org>
14221
14222 * configure.ac: Rename configure.in, require autoconf 2.59.
14223 * configure: Re-generate.
14224
434c4c77
DJ
142252004-12-08 Daniel Jacobowitz <dan@debian.org>
14226
14227 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14228 LIBS when finished.
14229 * aclocal.m4: Regenerated.
14230 * configure: Regenerated.
14231
db1d3e1b
AS
142322004-11-21 Andreas Schwab <schwab@suse.de>
14233
14234 * linux-m68k-low.c (m68k_num_gregs): Define.
14235 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14236 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14237 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14238 (m68k_breakpoint_at): New. Add to the_low_target.
14239
14240 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14241 srv_linux_thread_db to yes.
14242
43360365
JB
142432004-10-20 Joel Brobecker <brobecker@gnat.com>
14244
14245 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14246 (ARCH_SET_FS): Likewise.
14247 (ARCH_GET_FS): Likewise.
14248 (ARCH_GET_GS): Likewise.
14249
fd500816
DJ
142502004-10-16 Daniel Jacobowitz <dan@debian.org>
14251
14252 * linux-i386-low.c (ps_get_thread_area): New.
14253 * linux-x86-64-low.c (ps_get_thread_area): New.
14254 * linux-low.c: Include <sys/syscall.h>.
14255 (linux_kill_one_process): Don't kill the first thread here.
14256 (linux_kill): Kill the first thread here.
14257 (kill_lwp): New function.
14258 (send_sigstop, linux_send_signal): Use it.
14259 * proc-service.c: Clean up #ifdefs.
14260 (fpregset_info): Delete.
14261 (ps_lgetregs): Update and enable implementation.
14262 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14263 implementations.
14264 * remote-utils.c (struct sym_cache, symbol_cache): New.
14265 (input_interrupt): Print a clearer message.
14266 (async_io_enabled): New variable.
14267 (enable_async_io, disable_async_io): Use it. Update comments.
14268 (look_up_one_symbol): Use the symbol cache.
14269 * thread-db.c (thread_db_look_up_symbols): New function.
14270 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14271
f6de3c42
DJ
142722004-10-16 Daniel Jacobowitz <dan@debian.org>
14273
14274 * configure.in: Test for -rdynamic.
14275 * configure: Regenerated.
14276 * Makefile (INTERNAL_LDFLAGS): New.
14277 (gdbserver, gdbreplay): Use it.
14278
2c0fc042
AC
142792004-09-02 Andrew Cagney <cagney@gnu.org>
14280
14281 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14282
075b3282
DJ
142832004-03-23 Daniel Jacobowitz <drow@mvista.com>
14284
14285 * linux-low.c (linux_wait): Clear all_processes list also.
14286
fa6a77dc
DJ
142872004-03-12 Daniel Jacobowitz <drow@mvista.com>
14288
14289 * linux-low.c: Include <errno.h>. Remove extern declaration of
14290 errno.
14291
6d782a97
DJ
142922004-03-12 Daniel Jacobowitz <drow@mvista.com>
14293
14294 * gdbreplay.c, server.h, utils.c: Update copyright years.
14295
3a7fb99b
DJ
142962004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14297
14298 * server.c (main): Print child status or termination signal from
14299 variable 'signal', not 'sig'.
14300
c3e735a6
DJ
143012004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14302
14303 * linux-low.c (linux_read_memory): Change return type to
14304 int. Check for and return error from ptrace().
14305 * target.c (read_inferior_memory): Change return type to int. Pass
14306 back return status from the_target->read_memory().
14307 * target.h (struct target_ops): Adapt *read_memory() prototype.
14308 Update comment.
14309 (read_inferior_memory): Adapt prototype.
14310 * server.c (main): Return an error packet if
14311 read_inferior_memory() returns an error.
14312
a59d1c82
DJ
143132004-03-04 Daniel Jacobowitz <drow@mvista.com>
14314
14315 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14316 Unify with other clean targets.
14317
dc3f8883
DJ
143182004-02-29 Daniel Jacobowitz <drow@mvista.com>
14319
14320 * server.c (handle_v_cont): Call set_desired_inferior.
14321
89a208da
DJ
143222004-02-29 Daniel Jacobowitz <drow@mvista.com>
14323
14324 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14325
62ea82f5
DJ
143262004-02-29 Daniel Jacobowitz <drow@mvista.com>
14327
14328 * linux-low.c (linux_wait): Unblock async I/O.
14329 (linux_resume): Block and enable async I/O.
14330 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14331 * server.h (block_async_io, unblock_async_io): Add prototypes.
14332
6910d122
DJ
143332004-02-29 Daniel Jacobowitz <drow@mvista.com>
14334
14335 * remote-utils.c (remote_open): Print a status notice after
14336 opening a TCP port.
14337 * server.c (attach_inferior): Print a status notice after
14338 attaching.
14339
143402004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14341
14342 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14343
c89dc5d4
DJ
143442004-02-26 Daniel Jacobowitz <drow@mvista.com>
14345
14346 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14347 error packet.
14348 * server.c, target.h: Update copyright years.
14349
4b8dad4a
RM
143502004-02-25 Roland McGrath <roland@redhat.com>
14351
14352 * target.h (struct target_ops): New member `read_auxv'.
14353 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14354 * linux-low.c (linux_read_auxv): New function.
14355 (linux_target_ops): Initialize `read_auxv' member to that.
14356
d7446758
JB
143572004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14358
14359 Committed by Jim Blandy <jimb@redhat.com>.
14360
14361 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14362 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14363 instead of GPR_SIZE to distiguish s390 and s390x targets.
14364
5544ad89
DJ
143652004-01-31 Daniel Jacobowitz <drow@mvista.com>
14366
14367 * linux-low.c: Update copyright year.
14368 (check_removed_breakpoint): Clear pending_is_breakpoint.
14369 (linux_set_resume_request, linux_queue_one_thread)
14370 (resume_status_pending_p): New functions.
14371 (linux_continue_one_thread): Use process->resume.
14372 (linux_resume): Only resume threads if there are no pending events.
14373 * linux-low.h (struct process_info): Add resume request
14374 pointer.
14375
2a68b70e
DJ
143762004-01-30 Daniel Jacobowitz <drow@mvista.com>
14377
14378 * regcache.c (new_register_cache): Clear the allocated register
14379 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14380
64386c31
DJ
143812003-10-13 Daniel Jacobowitz <drow@mvista.com>
14382
14383 * linux-low.c (linux_resume): Take a struct thread_resume *
14384 argument.
14385 (linux_wait): Update call.
14386 (resume_ptr): New static variable.
14387 (linux_continue_one_thread): Renamed from
14388 linux_continue_one_process. Use resume_ptr.
14389 (linux_resume): Use linux_continue_one_thread.
14390 * server.c (handle_v_cont, handle_v_requests): New functions.
14391 (myresume): New function.
14392 (main): Handle 'v' case.
14393 * target.h (struct thread_resume): New type.
14394 (struct target_ops): Change argument of "resume" to struct
14395 thread_resume *.
14396 (myresume): Delete macro.
14397
c938e9b0
L
143982003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14399
14400 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14401 (uninstall): Support DESTDIR.
14402
7f313d07
BC
14403Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14404
14405 * configure.srv: Add xscale*linux copy of arm*linux entry.
14406
3b2fc2ea
DJ
144072003-07-24 Daniel Jacobowitz <drow@mvista.com>
14408
14409 * linux-arm-low.c (arm_reinsert_addr): New function.
14410 (the_low_target): Add arm_reinsert_addr.
14411
1c0a559e
MK
144122003-07-08 Mark Kettenis <kettenis@gnu.org>
14413
14414 * mem-break.c: Remove whitespace at end of file.
14415
43d5792c
DJ
144162003-06-28 Daniel Jacobowitz <drow@mvista.com>
14417
14418 * configure.in: Check whether we need to prototype strerror.
14419 * server.h: Optionally prototype strerror.
14420 * gdbreplay.c (perror_with_name): Use strerror.
14421 * linux-low.c (linux_attach_lwp): Use strerror.
14422 * utils.c (perror_with_name): Use strerror.
14423 * config.in, configure: Regenerated.
14424
c8a86edf
DJ
144252003-06-28 Daniel Jacobowitz <drow@mvista.com>
14426
14427 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14428 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14429
73d37363
DJ
144302003-06-20 Daniel Jacobowitz <drow@mvista.com>
14431
14432 * Makefile.in (SFILES): Update.
14433 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14434 low-sun3.c: Remove files.
14435
6ad8ae5c
DJ
144362003-06-17 Daniel Jacobowitz <drow@mvista.com>
14437
14438 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14439 (linux_detach_one_process, linux_detach): New functions.
14440 (linux_target_ops): Add linux_detach.
14441 * server.c (main): Handle 'D' packet.
14442 * target.h (struct target_ops): Add "detach" member.
14443 (detach_inferior): Define.
14444
1581182a
MK
144452003-06-13 Mark Kettenis <kettenis@gnu.org>
14446
14447 From Kelley Cook <kelleycook@wideopenwest.com>:
14448 * configure.srv: Accept i[34567]86 variants.
14449
e5379b03
DJ
144502003-06-05 Daniel Jacobowitz <drow@mvista.com>
14451
14452 * linux-low.c (linux_wait_for_event): Correct comment typos.
14453 (linux_resume_one_process): Call check_removed_breakpoint.
14454 (linux_send_signal): New function.
14455 (linux_target_ops): Add linux_send_signal.
14456 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14457 of kill.
14458 * target.h (struct target_ops): Add send_signal.
14459
2ff29de4
JB
144602003-05-29 Jim Blandy <jimb@redhat.com>
14461
14462 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14463 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14464 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14465 away part of the register's value.
14466
254787d4
DJ
144672003-03-26 Daniel Jacobowitz <drow@mvista.com>
14468
14469 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14470 (linux_wait_for_event, linux_init_signals): Likewise.
14471
94e10508
DJ
144722003-03-17 Daniel Jacobowitz <drow@mvista.com>
14473
14474 * configure.in: Check for stdlib.h.
14475 * configure: Regenerated.
14476 * config.in: Regenerated.
14477
4c0711e0
DJ
144782003-01-04 Andreas Schwab <schwab@suse.de>
14479
14480 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14481
ef66e766
AC
144822003-01-02 Andrew Cagney <ac131313@redhat.com>
14483
14484 * Makefile.in: Remove obsolete code.
14485
a1358604
DJ
144862002-11-20 Daniel Jacobowitz <drow@mvista.com>
14487
14488 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14489 defined(PT_FPR0_HI).
14490
23ce3b1c
DJ
144912002-11-17 Stuart Hughes <seh@zee2.com>
14492
14493 * linux-arm-low.c (arm_num_regs): Increase.
14494 (arm_regmap): Include status register.
14495
144962002-11-17 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * linux-low.c (register_addr): Remove incorrect -1 check.
14499
a9fa9f7d
DJ
145002002-08-29 Daniel Jacobowitz <drow@mvista.com>
14501
14502 * linux-low.c (linux_create_inferior): Call setpgid. Return
14503 the new PID.
14504 (unstopped_p, linux_signal_pid): Remove.
14505 (linux_target_ops): Remove linux_signal_pid.
14506 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14507 global instead of target method.
14508 * target.h (struct target_ops): Remove signal_pid. Update comment
14509 for create_inferior.
14510 * server.c (signal_pid): New variable.
14511 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14512 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14513 (attach_inferior): Set signal_pid.
14514
17574093
DJ
145152002-08-23 Daniel Jacobowitz <drow@mvista.com>
14516
14517 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14518
145192002-08-20 Jim Blandy <jimb@redhat.com>
14520
14521 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14522 default for this.
14523
145242002-08-01 Andrew Cagney <cagney@redhat.com>
14525
14526 * Makefile.in: Make chill references obsolete.
14527
145282002-07-24 Kevin Buettner <kevinb@redhat.com>
14529
14530 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14531 * configure: Regenerate.
14532 * config.in: Regenerate.
14533
145342002-07-09 David O'Brien <obrien@FreeBSD.org>
14535
14536 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14537 (perror_with_name, remote_close, remote_open, expect, play): Static.
14538
145392002-07-04 Michal Ludvig <mludvig@suse.cz>
14540
4b8dad4a 14541 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14542 byte offsets instead of an array of indexes.
14543 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14544
145452002-06-13 Daniel Jacobowitz <drow@mvista.com>
14546
14547 * regcache.c: Add comment.
14548
145492002-06-11 Daniel Jacobowitz <drow@mvista.com>
14550
14551 * thread-db.c: New file.
14552 * proc-service.c: New file.
14553 * acinclude.m4: New file.
14554 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14555 proc-service.o, and thread-db.o.
14556 (linux-low.o): Add USE_THREAD_DB.
14557 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14558 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14559 * aclocal.m4: Regenerated.
14560 * config.in: Regenerated.
14561 * configure: Regenerated.
14562 * configure.in: Check for proc_service.h, sys/procfs.h,
14563 thread_db.h, and linux/elf.h headrs.
14564 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14565 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14566 Check for -lthread_db and thread support.
14567 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14568 PowerPC, and SuperH.
14569 * i387-fp.c: Constify arguments.
14570 * i387-fp.h: Likewise.
14571 * inferiors.c: (struct thread_info): Renamed from
14572 `struct inferior_info'. Remove PID member. Use generic inferior
14573 list header. All uses updated.
14574 (inferiors, signal_pid): Removed.
14575 (all_threads): New variable.
14576 (get_thread): Define.
14577 (add_inferior_to_list): New function.
14578 (for_each_inferior): New function.
14579 (change_inferior_id): New function.
14580 (add_inferior): Removed.
14581 (remove_inferior): New function.
14582 (add_thread): New function.
14583 (free_one_thread): New function.
14584 (remove_thread): New function.
14585 (clear_inferiors): Use for_each_inferior and free_one_thread.
14586 (find_inferior): New function.
14587 (find_inferior_id): New function.
14588 (inferior_target_data): Update argument type.
14589 (set_inferior_target_data): Likewise.
14590 (inferior_regcache_data): Likewise.
14591 (set_inferior_regcache_data): Likewise.
14592 * linux-low.c (linux_bp_reinsert): Remove.
14593 (all_processes, stopping_threads, using_thrads)
14594 (struct pending_signals, debug_threads, pid_of): New.
14595 (inferior_pid): Replace with macro.
14596 (struct inferior_linux_data): Remove.
14597 (get_stop_pc, add_process): New functions.
14598 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14599 Use add_process and add_thread.
14600 (linux_attach_lwp): New function, based on old linux_attach. Use
14601 add_process and add_thread. Set stop_expected for new threads.
14602 (linux_attach): New function.
14603 (linux_kill_one_process): New function.
14604 (linux_kill): Kill all LWPs.
14605 (linux_thread_alive): Use find_inferior_id.
14606 (check_removed_breakpoints, status_pending_p): New functions.
14607 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14608 Update. Use WNOHANG. Wait for cloned processes also. Update process
14609 struct for the found process.
14610 (linux_wait_for_event): New function.
14611 (linux_wait): Use it. Support LWPs.
14612 (send_sigstop, wait_for_sigstop, stop_all_processes)
14613 (linux_resume_one_process, linux_continue_one_process): New functions.
14614 (linux_resume): Support LWPs.
14615 (REGISTER_RAW_SIZE): Remove.
14616 (fetch_register): Use register_size instead. Call supply_register.
14617 (usr_store_inferior_registers): Likewise. Call collect_register.
14618 Fix recursive case.
14619 (regsets_fetch_inferior_registers): Improve error message.
14620 (regsets_store_inferior_registers): Add debugging.
14621 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14622 (unstopped_p, linux_signal_pid): New functions.
14623 (linux_target_ops): Add linux_signal_pid.
14624 (linux_init_signals): New function.
14625 (initialize_low): Call it. Initialize using_threads.
14626 * regcache.c (inferior_regcache_data): Add valid
14627 flag.
14628 (get_regcache): Fetch registers lazily. Add fetch argument
14629 and update all callers.
14630 (regcache_invalidate_one, regcache_invalidate): New
14631 functions.
14632 (new_register_cache): Renamed from create_register_cache.
14633 Return the new regcache.
14634 (free_register_cache): Change argument to a void *.
14635 (registers_to_string, registers_from_string): Call get_regcache
14636 with fetch flag set.
14637 (register_data): Make static. Pass fetch flag to get_regcache.
14638 (supply_register): Call get_regcache with fetch flag clear.
14639 (collect_register): Call get_regcache with fetch flag set.
14640 (collect_register_as_string): New function.
14641 * regcache.h: Update.
14642 * remote-utils.c (putpkt): Flush after debug output and use
14643 stderr.
14644 Handle input interrupts while waiting for an ACK.
14645 (input_interrupt): Use signal_pid method.
14646 (getpkt): Flush after debug output and use stderr.
14647 (outreg): Use collect_register_as_string.
14648 (new_thread_notify, dead_thread_notify): New functions.
14649 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14650 and general_thread.
14651 (look_up_one_symbol): Flush after debug output.
14652 * server.c (step_thread, server_waiting): New variables.
14653 (start_inferior): Don't use signal_pid. Update call to mywait.
14654 (attach_inferior): Update call to mywait.
14655 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14656 (main): Don't fetch/store registers explicitly. Use
14657 set_desired_inferior. Support proposed ``Hs'' packet. Update
14658 calls to mywait.
14659 * server.h: Update.
14660 (struct inferior_list, struct_inferior_list_entry): New.
14661 * target.c (set_desired_inferior): New.
14662 (write_inferior_memory): Constify.
14663 (mywait): New function.
14664 * target.h: Update.
14665 (struct target_ops): New signal_pid method.
14666 (mywait): Removed macro, added prototype.
14667
14668 * linux-low.h (regset_func): Removed.
14669 (regset_fill_func, regset_store_func): New.
14670 (enum regset_type): New.
14671 (struct regset_info): Add type field. Use new operation types.
14672 (struct linux_target_ops): stop_pc renamed to get_pc.
14673 Add decr_pc_after_break and breakpoint_at.
14674 (get_process, get_thread_proess, get_process_thread)
14675 (strut process_info, all_processes, linux_attach_lwp)
14676 (thread_db_init): New.
14677
14678 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14679 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14680 (the_low_target): Add new members.
14681 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14682 (i386_store_fpxregset): Constify.
14683 (target_regsets): Add new kind identifier.
14684 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14685 (i386_set_pc): Add debugging.
14686 (i386_breakpoint_at): New function.
14687 (the_low_target): Add new members.
14688 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14689 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14690 (mips_breakpoint_at): New.
14691 (the_low_target): Add new members.
14692 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14693 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14694 (the_low_target): Add new members.
14695 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14696 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14697 (the_low_target): Add new members.
14698 * linux-x86-64-low.c (target_regsets): Add new kind
14699 identifier.
14700
147012002-05-15 Daniel Jacobowitz <drow@mvista.com>
14702
14703 From Martin Pool <mbp@samba.org>:
14704 * server.c (gdbserver_usage): New function.
14705 (main): Call it.
14706
147072002-05-14 Daniel Jacobowitz <drow@mvista.com>
14708
14709 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14710 stop_at -> stop_pc.
14711
147122002-05-04 Andrew Cagney <ac131313@redhat.com>
14713
14714 * Makefile.in: Remove obsolete code.
14715
147162002-04-24 Michal Ludvig <mludvig@suse.cz>
14717
14718 * linux-low.c (regsets_fetch_inferior_registers),
14719 (regsets_store_inferior_registers): Removed cast to int from
14720 ptrace() calls.
14721 * regcache.h: Added declaration of struct inferior_info.
14722
147232002-04-20 Daniel Jacobowitz <drow@mvista.com>
14724
14725 * inferiors.c (struct inferior_info): Add regcache_data.
14726 (add_inferior): Call create_register_cache.
14727 (clear_inferiors): Call free_register_cache.
14728 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14729 * regcache.c (struct inferior_regcache_data): New.
14730 (registers): Remove.
14731 (get_regcache): New function.
14732 (create_register_cache, free_register_cache): New functions.
14733 (set_register_cache): Don't initialize the register cache here.
14734 (registers_to_string, registers_from_string, register_data): Call
14735 get_regcache.
14736 * regcache.h: Add prototypes.
14737 * server.h: Likewise.
14738
147392002-04-20 Daniel Jacobowitz <drow@mvista.com>
14740
14741 * mem-break.c: New file.
14742 * mem-break.h: New file.
14743 * Makefile.in: Add mem-break.o rule; update server.h
14744 dependencies.
14745 * inferiors.c (struct inferior_info): Add target_data
14746 member.
14747 (clear_inferiors): Free target_data member if set.
14748 (inferior_target_data, set_inferior_target_data): New functions.
14749 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14750 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14751 * linux-low.c (linux_bp_reinsert): New variable.
14752 (struct inferior_linux_data): New.
14753 (linux_create_inferior): Use set_inferior_target_data.
14754 (linux_attach): Likewise. Call add_inferior.
14755 (linux_wait_for_one_inferior): New function.
14756 (linux_wait): Call it.
14757 (linux_write_memory): Add const.
14758 (initialize_low): Call set_breakpoint_data.
14759 * linux-low.h (struct linux_target_ops): Add breakpoint
14760 handling members.
14761 * server.c (attach_inferior): Remove extra add_inferior
14762 call.
14763 * server.h: Include mem-break.h. Update inferior.c
14764 prototypes.
14765 * target.c (read_inferior_memory)
14766 (write_inferior_memory): New functions.
14767 * target.h (read_inferior_memory)
14768 (write_inferior_memory): Change macros to prototypes.
14769 (struct target_ops): Update comments. Add const to write_memory
14770 definition.
14771
147722002-04-11 Daniel Jacobowitz <drow@mvista.com>
14773
14774 * linux-low.c (usr_store_inferior_registers): Support
14775 registers which are allowed to fail to store.
14776 * linux-low.h (linux_target_ops): Likewise.
14777 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14778 (ppc_cannot_store_register): FPSCR may not be storable.
14779
147802002-04-09 Daniel Jacobowitz <drow@mvista.com>
14781
14782 * server.h: Include <string.h> if HAVE_STRING_H.
14783 * ChangeLog: Correct paths in last ChangeLog entry.
14784
147852002-04-09 Daniel Jacobowitz <drow@mvista.com>
14786
14787 * linux-low.h: Remove obsolete prototypes.
14788 (struct linux_target_ops): New.
14789 (extern the_low_target): New.
14790 * linux-low.c (num_regs, regmap): Remove declarations.
14791 (register_addr): Use the_low_target explicitly.
14792 (fetch_register): Likewise.
14793 (usr_fetch_inferior_registers): Likewise.
14794 (usr_store_inferior_registers): Likewise.
14795 * linux-arm-low.c (num_regs): Remove.
14796 (arm_num_regs): Define.
14797 (arm_regmap): Renamed from regmap, made static.
14798 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14799 made static.
14800 (arm_cannot_store_register): Renamed from cannot_store_register,
14801 made static.
14802 (the_low_target): New.
14803 * linux-i386-low.c (num_regs): Remove.
14804 (i386_num_regs): Define.
14805 (i386_regmap): Renamed from regmap, made static.
14806 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14807 made static.
14808 (i386_cannot_store_register): Renamed from cannot_store_register,
14809 made static.
14810 (the_low_target): New.
14811 * linux-ia64-low.c (num_regs): Remove.
14812 (ia64_num_regs): Define.
14813 (ia64_regmap): Renamed from regmap, made static.
14814 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14815 made static.
14816 (ia64_cannot_store_register): Renamed from cannot_store_register,
14817 made static.
14818 (the_low_target): New.
14819 * linux-m68k-low.c (num_regs): Remove.
14820 (m68k_num_regs): Define.
14821 (m68k_regmap): Renamed from regmap, made static.
14822 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14823 made static.
14824 (m68k_cannot_store_register): Renamed from cannot_store_register,
14825 made static.
14826 (the_low_target): New.
14827 * linux-mips-low.c (num_regs): Remove.
14828 (mips_num_regs): Define.
14829 (mips_regmap): Renamed from regmap, made static.
14830 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14831 made static.
14832 (mips_cannot_store_register): Renamed from cannot_store_register,
14833 made static.
14834 (the_low_target): New.
14835 * linux-ppc-low.c (num_regs): Remove.
14836 (ppc_num_regs): Define.
14837 (ppc_regmap): Renamed from regmap, made static.
14838 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14839 made static.
14840 (ppc_cannot_store_register): Renamed from cannot_store_register,
14841 made static.
14842 (the_low_target): New.
14843 * linux-s390-low.c (num_regs): Remove.
14844 (s390_num_regs): Define.
14845 (s390_regmap): Renamed from regmap, made static.
14846 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14847 made static.
14848 (s390_cannot_store_register): Renamed from cannot_store_register,
14849 made static.
14850 (the_low_target): New.
14851 * linux-sh-low.c (num_regs): Remove.
14852 (sh_num_regs): Define.
14853 (sh_regmap): Renamed from regmap, made static.
14854 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14855 made static.
14856 (sh_cannot_store_register): Renamed from cannot_store_register,
14857 made static.
14858 (the_low_target): New.
14859 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14860 (the_low_target): New.
14861
148622002-04-09 Daniel Jacobowitz <drow@mvista.com>
14863
14864 * Makefile.in: Add stamp-h target.
14865 * configure.in: Create stamp-h.
14866 * configure: Regenerated.
14867
148682002-04-09 Daniel Jacobowitz <drow@mvista.com>
14869
14870 * inferiors.c: New file.
14871 * target.c: New file.
14872 * target.h: New file.
14873 * Makefile.in: Add target.o and inferiors.o. Update
14874 dependencies.
14875 * linux-low.c (inferior_pid): New static variable,
14876 moved from server.c.
14877 (linux_create_inferior): Renamed from create_inferior.
14878 Call add_inferior. Return 0 on success instead of a PID.
14879 (linux_attach): Renamed from myattach.
14880 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14881 (linux_thread_alive): Renamed from mythread_alive.
14882 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14883 child dies.
14884 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14885 (regsets_store_inferior_registers): Correct error message.
14886 Add missing ``return 0''.
14887 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14888 (linux_store_registers): Renamed from store_inferior_registers.
14889 (linux_read_memory): Renamed from read_inferior_memory.
14890 (linux_write_memory): Renamed from write_inferior_memory.
14891 (linux_target_ops): New structure.
14892 (initialize_low): Call set_target_ops ().
14893 * remote-utils.c (unhexify): New function.
14894 (hexify): New function.
14895 (input_interrupt): Send signals to ``signal_pid''.
14896 * server.c (inferior_pid): Remove.
14897 (start_inferior): Update create_inferior call.
14898 (attach_inferior): Call add_inferior.
14899 (handle_query): New function.
14900 (main): Call handle_query for `q' packets.
14901 * server.h: Include "target.h". Remove obsolete prototypes.
14902 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14903
149042002-04-09 Daniel Jacobowitz <drow@mvista.com>
14905
14906 * Makefile.in: Add WARN_CFLAGS. Update configury
14907 dependencies.
14908 * configure.in: Check for <string.h>
14909 * configure: Regenerate.
14910 * config.in: Regenerate.
14911 * gdbreplay.c: Include needed system headers.
14912 (remote_open): Remove strchr prototype.
14913 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14914 * regcache.c (supply_register): Change buf argument to const void *.
14915 (supply_register_by_name): Likewise.
14916 (collect_register): Change buf argument to void *.
14917 (collect_register_by_name): Likewise.
14918 * regcache.h: Add missing prototypes.
14919 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14920 * server.c (handle_query): New function.
14921 (attached): New static variable, moved out of main.
14922 (main): Quiet longjmp clobber warnings.
14923 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14924 * utils.c (error): Remove NORETURN.
14925 (fatal): Likewise.