-Wwrite-strings: The Rest
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a121b7c1
PA
12017-04-05 Pedro Alves <palves@redhat.com>
2
3 * gdbreplay.c (sync_error): Constify.
4 * linux-x86-low.c (push_opcode): Constify.
5
21c8a587
PA
62017-04-05 Pedro Alves <palves@redhat.com>
7
8 * win32-low.c (get_child_debug_event)
9 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
10 Report TARGET_WAITKIND_SPURIOUS instead.
11
fb32b4f7
PA
122017-04-05 Pedro Alves <palves@redhat.com>
13
14 * remote-utils.c (remote_prepare, remote_open): Constify.
15 * remote-utils.h (remote_prepare, remote_open): Constify.
16 * server.c (captured_main): Constify 'port' handling.
17
65dd1e59
SM
182017-04-04 Simon Marchi <simon.marchi@ericsson.com>
19
20 * Makefile.in (clean): Clear .deps.
21
8fa5b777
SM
222017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * .gitignore: Remove generated files, replace with wildcard.
25 * (clean): Replace removal of generated files with wildcard.
26 (version.c): Replace with...
27 (version-generated.c): ...this.
28 (xml-builtin.c): Replace with...
29 (xml-builtin-generated.c): ...this.
30 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
31 (%.c: *regformats*): Replace with...
32 (%-generated.c: *regformats*): ...this.
33
a12e714b
MF
342017-03-27 Max Filippov <jcmvbkbc@gmail.com>
35
36 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
37 (xtensa_fill_gregset): Call collect_register_by_name for
38 threadptr register.
39 (xtensa_store_gregset): Call supply_register_by_name for
40 threadptr register.
41
1a09b50a
MF
422017-03-27 Max Filippov <jcmvbkbc@gmail.com>
43
44 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
45 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
46 (xtensa_store_gregset): Call supply_register for all registers in
47 a0_regnum..a0_regnum + C0_NREGS range.
48
1a01e7c6
SM
492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
50
51 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
52 (ax-ipa.o: ax.c): Remove.
53 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
54 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
55 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
56 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
57 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
58
36bc18a8
SM
592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
60
61 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
62 (print-utils-ipa.o: ../common/print-utils.c): Remove.
63 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
64 (errors-ipa.o: ../common/errors.c): Remove.
65 (format-ipa.o: ../common/format.c): Remove.
66 (common-utils-ipa.o: ../common/common-utils.c): Remove.
67
a8ebe3d5
SM
682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * Makefile.in (%-ipa.o: %.c): New rule.
71 (tracepoint-ipa.o: tracepoint.c): Remove.
72 (utils-ipa.o: utils.c): Remove.
73 (remote-utils-ipa.o: remote-utils.c): Remove.
74 (regcache-ipa.o: regcache.c): Remove.
75 (i386-linux-ipa.o: i386-linux.c): Remove.
76 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
77 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
78 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
79 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
80 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
81 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
82 (amd64-linux-ipa.o: amd64-linux.c): Remove.
83 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
84 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
85 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
86 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
87 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
88 (aarch64-ipa.o: aarch64.c): Remove.
89 (s390-linux32-ipa.o: s390-linux32.c): Remove.
90 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
91 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
92 (s390-linux64-ipa.o: s390-linux64.c): Remove.
93 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
94 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
95 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
96 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
97 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
98 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
99 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
100 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
101 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
102 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
103 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
104 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
105 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
106 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
107 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
108 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
109 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
110 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
111 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
112 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
113 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
114 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
115 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
116 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
117 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
118 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
119 (tdesc-ipa.o: tdesc.c): Remove.
120 (x32-linux-ipa.o: x32-linux.c): Remove.
121 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
122 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
123
50cfacb7
SM
1242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
125
126 * Makefile.in (%.o: ../arch/%.c): New rule.
127 (arm.o: ../arch/arm.c): Remove.
128 (arm-linux.o: ../arch/arm-linux.c): Remove.
129 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
130 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
131
c5a22423
SM
1322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
133
134 * Makefile.in (%.o: ../nat/%.c): New rule.
135 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
136 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
137 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
138 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
139 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
140 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
141 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
142 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
143 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
144 (linux-personality.o: ../nat/linux-personality.c): Remove.
145 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
146 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
147 (x86-linux.o: ../nat/x86-linux.c): Remove.
148 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
149 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
150
6bda016b
SM
1512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
152
153 * Makefile.in (%.o: ../common/%.c): New rule.
154 (signals.o: ../common/signals.c): Remove.
155 (print-utils.o: ../common/print-utils.c): Remove.
156 (rsp-low.o: ../common/rsp-low.c): Remove.
157 (common-utils.o: ../common/common-utils.c): Remove.
158 (posix-strerror.o: ../common/posix-strerror.c): Remove.
159 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
160 (vec.o: ../common/vec.c): Remove.
161 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
162 (xml-utils.o: ../common/xml-utils.c): Remove.
163 (ptid.o: ../common/ptid.c): Remove.
164 (buffer.o: ../common/buffer.c): Remove.
165 (format.o: ../common/format.c): Remove.
166 (filestuff.o: ../common/filestuff.c): Remove.
167 (agent.o: ../common/agent.c): Remove.
168 (errors.o: ../common/errors.c): Remove.
169 (environ.o: ../common/environ.c): Remove.
170 (common-debug.o: ../common/common-debug.c): Remove.
171 (cleanups.o: ../common/cleanups.c): Remove.
172 (common-exceptions.o: ../common/common-exceptions.c): Remove.
173 (fileio.o: ../common/fileio.c): Remove.
174 (common-regcache.o: ../common/common-regcache.c): Remove.
175 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
176 (new-op.o: ../common/new-op.c): Remove.
177 (btrace-common.o: ../common/btrace-common.c): Remove.
178
21122961
SM
1792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
180
181 * Makefile.in (%.o: ../target/%.c): New rule.
182 (waitstatus.o: ../target/waitstatus.c): Remove.
183
c362e621
SM
1842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
185
186 * Makefile.in
187 (%.c: ../regformats/%.dat,
188 (%.c: ../regformats/arm/%.dat,
189 (%.c: ../regformats/i386/%.dat,
190 (%.c: ../regformats/rs6000/%.dat): New rules.
191 (aarch64.c): Remove.
192 (reg-arm.c): Remove.
193 (arm-with-iwmmxt.c): Remove.
194 (arm-with-vfpv2.c): Remove.
195 (arm-with-vfpv3.c): Remove.
196 (arm-with-neon.c): Remove.
197 (reg-bfin.c): Remove.
198 (reg-cris.c): Remove.
199 (reg-crisv32.c): Remove.
200 (i386.c): Remove.
201 (i386-linux.c): Remove.
202 (i386-avx.c): Remove.
203 (i386-avx-linux.c): Remove.
204 (i386-avx-avx512.c): Remove.
205 (i386-avx-avx512-linux.c): Remove.
206 (i386-mpx.c): Remove.
207 (i386-mpx-linux.c): Remove.
208 (i386-avx-mpx-avx512-pku.c): Remove.
209 (i386-avx-mpx-avx512-pku-linux.c): Remove.
210 (i386-avx-mpx.c): Remove.
211 (i386-avx-mpx-linux.c): Remove.
212 (i386-mmx.c): Remove.
213 (i386-mmx-linux.c): Remove.
214 (reg-ia64.c): Remove.
215 (reg-m32r.c): Remove.
216 (reg-m68k.c): Remove.
217 (reg-cf.c): Remove.
218 (mips-linux.c): Remove.
219 (mips-dsp-linux.c): Remove.
220 (mips64-linux.c): Remove.
221 (mips64-dsp-linux.c): Remove.
222 (nios2-linux.c): Remove.
223 (powerpc-32.c): Remove.
224 (powerpc-32l.c): Remove.
225 (powerpc-altivec32l.c): Remove.
226 (powerpc-cell32l.c): Remove.
227 (powerpc-vsx32l.c): Remove.
228 (powerpc-isa205-32l.c): Remove.
229 (powerpc-isa205-altivec32l.c): Remove.
230 (powerpc-isa205-vsx32l.c): Remove.
231 (powerpc-e500l.c): Remove.
232 (powerpc-64l.c): Remove.
233 (powerpc-altivec64l.c): Remove.
234 (powerpc-cell64l.c): Remove.
235 (powerpc-vsx64l.c): Remove.
236 (powerpc-isa205-64l.c): Remove.
237 (powerpc-isa205-altivec64l.c): Remove.
238 (powerpc-isa205-vsx64l.c): Remove.
239 (s390-linux32.c): Remove.
240 (s390-linux32v1.c): Remove.
241 (s390-linux32v2.c): Remove.
242 (s390-linux64.c): Remove.
243 (s390-linux64v1.c): Remove.
244 (s390-linux64v2.c): Remove.
245 (s390-te-linux64.c): Remove.
246 (s390-vx-linux64.c): Remove.
247 (s390-tevx-linux64.c): Remove.
248 (s390x-linux64.c): Remove.
249 (s390x-linux64v1.c): Remove.
250 (s390x-linux64v2.c): Remove.
251 (s390x-te-linux64.c): Remove.
252 (s390x-vx-linux64.c): Remove.
253 (s390x-tevx-linux64.c): Remove.
254 (tic6x-c64xp-linux.c): Remove.
255 (tic6x-c64x-linux.c): Remove.
256 (tic6x-c62x-linux.c): Remove.
257 (reg-sh.c): Remove.
258 (reg-sparc64.c): Remove.
259 (reg-spu.c): Remove.
260 (amd64.c): Remove.
261 (amd64-linux.c): Remove.
262 (amd64-avx.c): Remove.
263 (amd64-avx-linux.c): Remove.
264 (amd64-avx-avx512.c): Remove.
265 (amd64-avx-avx512-linux.c): Remove.
266 (amd64-mpx.c): Remove.
267 (amd64-mpx-linux.c): Remove.
268 (amd64-avx-mpx-avx512-pku.c): Remove.
269 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
270 (amd64-avx-mpx.c): Remove.
271 (amd64-avx-mpx-linux.c): Remove.
272 (x32.c): Remove.
273 (x32-linux.c): Remove.
274 (x32-avx.c): Remove.
275 (x32-avx-linux.c): Remove.
276 (x32-avx-avx512.c): Remove.
277 (x32-avx-avx512-linux.c): Remove.
278 (reg-xtensa.c): Remove.
279 (reg-tilegx.c): Remove.
280 (reg-tilegx32.c): Remove.
281
1672e0d9
SDJ
2822017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
283
284 * Makefile.in (SFILES): Add "common/environ.c".
285 (OBJS): Add "common/environ.h".
286
239b6d10
WT
2872017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
288
289 * configure.ac: Check if the fs_base and gs_base members of
290 `struct user_regs_struct' exist.
291 * config.in: Regenerated.
292 * configure: Likewise.
293
694b382c
AT
2942017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
295
296 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
297 target_read_memory.
298 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
299 (get_next_pcs_syscall_next_pc): Likewise.
300
7dc53023
LM
3012016-12-23 Luis Machado <lgustavo@codesourcery.com>
302
303 * win32-i386-low.c: Fix incorrect reference to a couple source files.
304 * nto-x86-low.c: Likewise.
305
ad02e4fe
SM
3062016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * Makefile.in: Include disable-implicit-rules.mk.
309
dcb07cfa
PA
3102016-11-23 Pedro Alves <palves@redhat.com>
311
312 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
313 (debug_vprintf): Use std::chrono::steady_clock instead of
314 gettimeofday. Use '.' instead of ':'.
315 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
316 (get_timestamp): Use std::chrono::steady_clock instead of
317 gettimeofday.
318
8629c02c
SM
3192016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
320
321 * Makefile.in: Fix whitespace formatting.
322
b593ecca
SM
3232016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * Makefile.in (SFILES, OBS): Flatten list and order
326 alphabetically.
327
9986ba08
PA
3282016-11-23 Pedro Alves <palves@redhat.com>
329
330 * event-loop.c (handle_file_event): Use warning.
331 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
332 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
333 Use warning.
334
4eefa7bc
PA
3352016-11-23 Pedro Alves <palves@redhat.com>
336
337 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
338 output.
339 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
340 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
341 debug_printf and debug_flush for debug output.
342 * server.c (handle_general_set): Likewise.
343 * thread-db.c (try_thread_db_load): Use debug_printf for debug
344 output.
345
5443506e
SM
3462016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * Makefile.in (.c.o): Replace rule with ...
349 (%.o: %.c): ... this one.
350
3b165252
SM
3512016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
352
353 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
354 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
355 make.
356 * configure.ac: Remove checks for the make program.
357 * configure: Re-generate.
358
0bcda685
PA
3592016-10-28 Pedro Alves <palves@redhat.com>
360
361 * Makefile.in (CXX_DIALECT): Get from configure.
362 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
363 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
364 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
365 * config.in: Regenerate.
366 * configure: Regenerate.
367
c3805894
YQ
3682016-10-27 Yao Qi <yao.qi@linaro.org>
369
370 * linux-low.c (linux_supports_range_stepping): Return true if
371 can_software_single_step return true.
372
89342618
YQ
3732016-10-27 Yao Qi <yao.qi@linaro.org>
374
375 * inferiors.c (find_inferior_in_random): New function.
376 * inferiors.h (find_inferior_in_random): Declare.
377 * linux-low.c (linux_wait_for_event_filtered): Call
378 find_inferior_in_random instead of find_inferior.
379
e3652c84
YQ
3802016-10-27 Yao Qi <yao.qi@linaro.org>
381
382 * linux-low.c (linux_wait_1): If single-step breakpoints are
383 inserted, remove them.
384
5a04c4cf
PA
3852016-10-26 Pedro Alves <palves@redhat.com>
386
387 * linux-low.c (handle_extended_wait): Link parent/child fork
388 threads.
389 (linux_wait_1): Unlink them.
390 (linux_set_resume_request): Ignore resume requests for
391 already-resumed and unhandled fork child threads.
392 * linux-low.h (struct lwp_info) <fork_relative>: New field.
393 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
394 New functions.
395 (handle_v_requests) <vCont>: Don't call require_running.
396 * server.h (in_queued_stop_replies): New declaration.
397
cb93dc7f
YQ
3982016-10-24 Yao Qi <yao.qi@linaro.org>
399
400 PR server/20733
401 * linux-aarch64-low.c (append_insns): Cast the return value to
402 'uint32_t *'.
403
a1078bea
YQ
4042016-10-10 Yao Qi <yao.qi@linaro.org>
405
406 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
407
1fb77080
SDJ
4082016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
409
410 * target.c (target_supports_multi_process): New function, moved
411 from...
412 * target.h (target_supports_multi_process): ... here. Remove
413 macro.
414
39b5a3b9
TT
4152016-10-05 Tom Tromey <tom@tromey.com>
416
417 PR remote/20655:
418 * tracepoint.c (handle_tracepoint_bkpts): Check
419 ipa_error_tracepoint, not ipa_stopping_tracepoint.
420
c1d0b70a
YQ
4212016-10-05 Yao Qi <yao.qi@linaro.org>
422
423 * configure.srv: Update the path of arm-*.xml files.
424
0a69eedb
YQ
4252016-10-05 Terry Guo <terry.guo@arm.com>
426 Yao Qi <yao.qi@linaro.org>
427
428 * Makefile.in: Adjust the path of rules.
429 * configure.srv: Update the path of xml files.
430 * regformats/arm-with-iwmmxt.dat: Regenerated.
431 * regformats/arm-with-neon.dat: Likewise.
432 * regformats/arm-with-vfpv2.dat: Likewise.
433 * regformats/arm-with-vfpv3.dat Likewise.
434
17e16485
YQ
4352016-09-30 Yao Qi <yao.qi@linaro.org>
436
437 PR gdbserver/20627
438 * target.c (target_stop_and_wait): Don't call
439 target_continue_no_signal, use resume_stop instead.
440
edeeb602
YQ
4412016-09-26 Yao Qi <yao.qi@linaro.org>
442
443 * linux-low.c (linux_wait_1): Call debug_exit.
444
503b1c39
PA
4452016-09-23 Pedro Alves <palves@redhat.com>
446
447 * Makefile.in (SFILES): Add common/new-op.c.
448 (OBS): Add common/new-op.o.
449 (new-op.o): New rule.
450
74172ecf
SM
4512016-09-21 Simon Marchi <simon.marchi@ericsson.com>
452
453 * .gitinore: Ignore more files.
454
fc6cda2e
YQ
4552016-09-21 Yao Qi <yao.qi@linaro.org>
456
457 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
458 23.
459
bc1e6c81
SDJ
4602016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
461
462 * server.c (start_inferior): Call target_mourn_inferior instead of
463 mourn_inferior; pass ptid_t argument to it.
464 (resume): Likewise.
465 (handle_target_event): Likewise.
466 * target.c (target_mourn_inferior): New function.
467 * target.h (mourn_inferior): Delete macro.
468
0e00e962
AA
4692016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
470
471 * linux-low.c (lwp_is_stepping): New function.
472
1d8cb77d
CL
4732016-09-06 Carl Love <cel@us.ibm.com>
474
475 * server.c (start_inferior): Fixed comment, requested comment change
476 didn't get updated correctly. Removed reference to ptrace () call as
477 it is only true on Linux systems.
478
7313bced
CL
4792016-09-06 Carl Love <cel@us.ibm.com>
480
481 * server.c (start_inferior): Do not call
482 function target_post_create_inferior () if the
483 inferior process has already exited.
484
cf6de44d
PA
4852016-09-05 Pedro Alves <palves@redhat.com>
486
487 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
488 (COMPILE.pre, CC_LD): Use CXX directly.
489 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
490 * acinclude.m4: Don't include build-with-cxx.m4.
491 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
492 * configure: Regenerate.
493
c1da6748
AT
4942016-09-02 Akash Trehan <akash.trehan123@gmail.com>
495
496 PR gdb/19495
497 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
498 call writing data to own_buf.
499
f2b9e3df
SDJ
5002016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
501
502 * target.c (mywait): Call target_wait instead of
503 the_target->wait.
504 (target_wait): New function.
505
049a8570
SDJ
5062016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
507
508 * server.c (start_inferior): New variable 'ptid'. Replace calls
509 to the_target->resume by target_continue{,_no_signal}, depending
510 on the case.
511 * target.c (target_stop_and_wait): Call target_continue_no_signal
512 instead of the_target->resume.
513 (target_continue): New function.
514
3aa5cfa0
AT
5152016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
516
517 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
518
754653a7
AZ
5192016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
520
521 PR server/20491
522 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
523 ps_prochandle.
524 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
525 * linux-arm-low.c (ps_get_thread_area): Likewise.
526 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
527 * linux-m68k-low.c (ps_get_thread_area): Likewise.
528 * linux-mips-low.c (ps_get_thread_area): Likewise.
529 * linux-nios2-low.c (ps_get_thread_area): Likewise.
530 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
531 * linux-x86-low.c (ps_get_thread_area): Likewise.
532 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
533
ed036b40
PA
5342016-08-19 Pedro Alves <palves@redhat.com>
535
536 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
537
c8ef42ee
PA
5382016-08-19 Pedro Alves <palves@redhat.com>
539
540 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
541 comment. Use memcpy instead of casting through unsigned long.
542
9c235a72
PA
5432016-08-19 Pedro Alves <palves@redhat.com>
544
545 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
546 allocating around 0x80000000.
547
201506da
PA
5482016-08-19 Pedro Alves <palves@redhat.com>
549
550 PR gdb/20415
551 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
552 (x32-avx512-linux-ipa.o): New rules.
553 * configure.ac (x86_64-*-linux*): New x32 check.
554 * configure.srv (ipa_x32_linux_regobj): New.
555 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
556 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
557 descriptions.
558 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
559 descriptions.
560 * configure: Regenerate.
561
f348d89a
PA
5622016-08-09 Pedro Alves <palves@redhat.com>
563
564 PR gdb/18653
565 * Makefile.in (OBS): Add signals-state-save-restore.o.
566 (signals-state-save-restore.o): New rule.
567 * config.in: Regenerate.
568 * configure: Regenerate.
569 * linux-low.c: Include "signals-state-save-restore.h".
570 (linux_create_inferior): Call
571 restore_original_signals_state.
572 * server.c: Include "dispositions-save-restore.h".
573 (captured_main): Call save_original_signals_state.
574
1baf5149
PA
5752016-08-05 Pedro Alves <palves@redhat.com>
576
577 * configure: Regenerate.
578
fcd4a73d
YQ
5792016-08-04 Yao Qi <yao.qi@linaro.org>
580
581 * linux-low.c (regsets_fetch_inferior_registers): Check
582 errno is ESRCH or not.
583
979659d0
YQ
5842016-08-02 Yao Qi <yao.qi@linaro.org>
585
586 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
587 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
588 (thread_db_load_search): Update.
589 (try_thread_db_load_1): Don't look for td_ta_event_addr,
590 td_ta_set_event and td_ta_event_getmsg.
591
6598661d
PA
5922016-07-26 Pedro Alves <palves@redhat.com>
593
594 PR server/20414
595 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
596 of unsigned long for 64-bit registers and use uint32_t instead of
597 unsigned int for 32-bit registers.
598
9cf12d57
PA
5992016-07-26 Pedro Alves <palves@redhat.com>
600
601 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
602 to 'ptrace'.
603
305450ed
TT
6042016-07-21 Tom Tromey <tom@tromey.com>
605
606 * configure: Rebuild.
607
2583da7c
YQ
6082016-07-21 Yao Qi <yao.qi@linaro.org>
609
610 * mem-break.c (find_gdb_breakpoint): Cast bp to
611 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
612
21536b36
YQ
6132016-07-21 Yao Qi <yao.qi@linaro.org>
614
615 * server.c (handle_v_requests): Support s and S actions
616 if target_supports_software_single_step return true.
617
8901d193
YQ
6182016-07-21 Yao Qi <yao.qi@linaro.org>
619
620 * linux-low.c (resume_stopped_resumed_lwps): If resume request
621 is resume_step, call maybe_hw_step.
622 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
623 and unstop them.
624 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
625 breakpoints or not.
626 (proceed_one_lwp): If resume request is resume_step, install
627 reinsert breakpoints and call maybe_hw_step.
628
0e9a339e
YQ
6292016-07-21 Yao Qi <yao.qi@linaro.org>
630
631 * linux-low.c (proceed_one_lwp): Declare.
632 (linux_resume_one_thread): Remove local variable 'step'.
633 Lift code enqueue signal. Call proceed_one_lwp instead of
634 linux_resume_one_lwp.
635
4281b351
YQ
6362016-07-21 Yao Qi <yao.qi@linaro.org>
637
638 * linux-low.c (linux_resume_one_thread): Call
639 enqueue_pending_signal.
640
984a2c04
YQ
6412016-07-21 Yao Qi <yao.qi@linaro.org>
642
643 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
644 * inferiors.c (do_restore_current_thread_cleanup): New function.
645 (make_cleanup_restore_current_thread): Likewise.
646 * linux-low.c (install_software_single_step_breakpoints): Call
647 make_cleanup_restore_current_thread. Switch current_thread to
648 thread.
649
bec903c9
YQ
6502016-07-21 Yao Qi <yao.qi@linaro.org>
651
652 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
653 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
654 (clone_one_breakpoint): Likewise.
655 (delete_reinsert_breakpoints): Change parameter to thread.
656 Callers updated.
657 (has_reinsert_breakpoints): Likewise.
658 (uninsert_reinsert_breakpoints): Likewise.
659 (reinsert_reinsert_breakpoints): Likewise.
660 * mem-break.h (set_reinsert_breakpoint): Update declaration.
661 (delete_reinsert_breakpoints): Likewise.
662 (reinsert_reinsert_breakpoints): Likewise.
663 (uninsert_reinsert_breakpoints): Likewise.
664 (has_reinsert_breakpoints): Likewise.
665
63c40ec7
YQ
6662016-07-21 Yao Qi <yao.qi@linaro.org>
667
668 * inferiors.c (get_thread_process): Make parameter const.
669 * inferiors.h (get_thread_process): Update declaration.
670 * mem-break.c (clone_all_breakpoints): Remove all parameters.
671 Add new parameters child_thread and parent_thread. Callers
672 updated.
673 * mem-break.h (clone_all_breakpoints): Update declaration.
674
9aa76cd0
YQ
6752016-07-21 Yao Qi <yao.qi@linaro.org>
676
677 * mem-break.c (struct breakpoint) <cond_list>: Remove.
678 <command_list, handler>: Remove.
679 (struct gdb_breakpoint): New.
680 (struct other_breakpoint): New.
681 (struct reinsert_breakpoint): New.
682 (is_gdb_breakpoint): New function.
683 (any_persistent_commands): Update command_list if
684 is_gdb_breakpoint returns true.
685 (set_breakpoint): Create breakpoints according to their types.
686 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
687 (set_gdb_breakpoint_1): Likewise.
688 (set_gdb_breakpoint): Likewise.
689 (clear_breakpoint_conditions): Change parameter type to
690 'struct gdb_breakpoint *'.
691 (clear_breakpoint_commands): Likewise.
692 (clear_breakpoint_conditions_and_commands): Likewise.
693 (add_condition_to_breakpoint): Likewise.
694 (add_breakpoint_condition): Likewise.
695 (add_commands_to_breakpoint): Likewise.
696 (check_breakpoints): Check other_breakpoint.
697 (clone_one_breakpoint): Clone breakpopint according to its type.
698 * mem-break.h (struct gdb_breakpoint): Declare.
699 (set_gdb_breakpoint): Update declaration.
700 (clear_breakpoint_conditions_and_commands): Likewise.
701 (add_breakpoint_condition): Likewise.
702 (add_breakpoint_commands): Likewise.
703 * server.c (process_point_options): Change parameter type to
704 'struct gdb_breakpoint *'.
705
811f8301
YQ
7062016-07-21 Yao Qi <yao.qi@linaro.org>
707
708 * mem-break.c (set_breakpoint_at): Rename it to ...
709 (set_breakpoint_type_at): ... it.
710 (set_breakpoint_at): Call set_breakpoint_type_at.
711 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
712 * mem-break.h (set_breakpoint_at): Update comments.
713
b1c51e36
CLT
7142016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
715
716 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
717 to buf parameter.
718 (nios2_store_gregset): Likewise.
719
ced2dffb
PA
7202016-07-01 Pedro Alves <palves@redhat.com>
721 Antoine Tremblay <antoine.tremblay@ericsson.com>
722
723 * linux-low.c: Change interface to take the target lwp_info
724 pointer directly and return void. Handle detaching from a zombie
725 thread.
726 (linux_detach_lwp_callback): New function.
727 (linux_detach): Detach from the leader thread after detaching from
728 the clone threads.
729
2ac09a5b
YQ
7302016-06-28 Yao Qi <yao.qi@linaro.org>
731
732 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
733 for variable new_offset.
734 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
735 (aarch64_ftrace_insn_reloc_cb): Likewise.
736 (aarch64_ftrace_insn_reloc_tb): Likewise.
737 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
738 PRIx64 instead of PRIx32.
739
79e7fd4f
YQ
7402016-06-28 Yao Qi <yao.qi@linaro.org>
741
742 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
743 (the_low_target): Install arm_get_syscall_trapinfo.
744
061fc021
YQ
7452016-06-28 Yao Qi <yao.qi@linaro.org>
746
747 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
748 function.
749 (the_low_target): Install aarch64_get_syscall_trapinfo.
750
4cc32bec
YQ
7512016-06-28 Yao Qi <yao.qi@linaro.org>
752
753 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
754 Callers updated.
755 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
756 Remove parameter sysno.
757 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
758 sysret.
759
782c1122
AA
7602016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
761
762 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
763 (s390_emit_ne_goto): Likewise.
764 (s390_emit_lt_goto): Likewise.
765 (s390_emit_le_goto): Likewise.
766 (s390_emit_gt_goto): Likewise.
767 (s390_emit_ge_goto): Likewise.
768 (s390x_emit_eq_goto): Likewise.
769 (s390x_emit_ne_goto): Likewise.
770 (s390x_emit_lt_goto): Likewise.
771 (s390x_emit_le_goto): Likewise.
772 (s390x_emit_gt_goto): Likewise.
773 (s390x_emit_ge_goto): Likewise.
774 (s390_emit_ops_impl): Mark variable static.
775 (s390x_emit_ops): Likewise.
776
2e7b624b
YQ
7772016-06-17 Yao Qi <yao.qi@linaro.org>
778
779 * linux-low.c (handle_extended_wait): Call
780 uninsert_reinsert_breakpoints for the parent process. Remove
781 reinsert breakpoints from the child process. Reinsert them to
782 the parent process when vfork is done.
783 * mem-break.c (uninsert_reinsert_breakpoints): New function.
784 (reinsert_reinsert_breakpoints): New function.
785 * mem-break.h (uninsert_reinsert_breakpoints): Declare
786 (reinsert_reinsert_breakpoints): Declare.
787
8a81c5d7
YQ
7882016-06-17 Yao Qi <yao.qi@linaro.org>
789
790 * linux-low.c (handle_extended_wait): If the parent is doing
791 step-over, remove the reinsert breakpoints from the forked child.
792
f50bf8e5
YQ
7932016-06-17 Yao Qi <yao.qi@linaro.org>
794
795 * linux-low.c (unsuspend_all_lwps): Declare.
796 (linux_low_filter_event): If thread exited, call finish_step_over.
797 If step-over is finished, unsuspend other threads.
798
8376a3cb
YQ
7992016-06-17 Yao Qi <yao.qi@linaro.org>
800
801 * linux-low.c (linux_resume_one_lwp_throw): Assert
802 has_reinsert_breakpoints returns false.
803 * mem-break.c (delete_disabled_breakpoints): Assert
804 bp type isn't reinsert_breakpoint.
805
f79b145d
YQ
8062016-06-17 Yao Qi <yao.qi@linaro.org>
807
808 * linux-low.c (maybe_hw_step): New function.
809 (linux_resume_one_lwp_throw): Call maybe_hw_step.
810 (finish_step_over): Switch current_thread to lwp temporarily,
811 and assert has_reinsert_breakpoints returns true.
812 (proceed_one_lwp): Call maybe_hw_step.
813 * mem-break.c (has_reinsert_breakpoints): New function.
814 * mem-break.h (has_reinsert_breakpoints): Declare.
815
0ae534d2
JT
8162016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
817
818 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
819
fcdad592
YQ
8202016-05-17 Yao Qi <yao.qi@linaro.org>
821
822 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
823 instead of find_inferior.
824
9e784964
YQ
8252016-05-05 Yao Qi <yao.qi@linaro.org>
826
827 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
828 Initialize res to zero.
829
cf2ebb6e
YQ
8302016-05-05 Yao Qi <yao.qi@linaro.org>
831
832 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
833 to uint32_t.
834
c1aebf87
UW
8352016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
836
837 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
838 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
839 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
840
35fd2deb 8412016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 842 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
843
844 * tracepoint.c (write_inferior_int8): New function.
845 (cmd_qtenable_disable): Write enable flag using
846 write_inferior_int8.
847
484b3c32
YQ
8482016-04-25 Yao Qi <yao.qi@linaro.org>
849
850 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
851 (need_step_over_p): Return zero if the LWP has pending signals
852 can be delivered on software single step target.
853
85ba7d86
YQ
8542016-04-25 Yao Qi <yao.qi@linaro.org>
855
856 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
857 return instead of error.
858
3539aa13
YQ
8592016-04-22 Yao Qi <yao.qi@linaro.org>
860
861 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
862 to 23.
863
5b061e98
YQ
8642016-04-22 Yao Qi <yao.qi@linaro.org>
865
866 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
867 signal when stepping over breakpoint with software single
868 step.
869
3451269c
PA
8702016-04-21 Pedro Alves <palves@redhat.com>
871
872 * linux-s390-low.c (s390_collect_ptrace_register)
873 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
874 add casts.
875 (s390_check_regset): Use void * instead of gdb_byte *.
876
a2358508
PA
8772016-04-20 Pedro Alves <palves@redhat.com>
878
879 * configure: Renegerate.
880
6885166d
YQ
8812016-04-20 Yao Qi <yao.qi@linaro.org>
882
883 * linux-aarch32-low.c: Include "arch/arm-linux.h".
884 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
885 number 16.
886 (arm_store_gregset): Likewise.
887
2b863f51
WT
8882016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
889
890 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
891 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
892 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
893 (amd64-avx-mpx-linux.c): New rules.
894 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
895 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
896 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
897 (srv_amd64_regobj): Add amd64-avx-mpx.o.
898 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
899 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
900 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
901 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
902 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
903 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
904 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
905 * linux-x86-low.c (x86_linux_read_description): Add case for
906 X86_XSTATE_AVX_MPX_MASK.
907 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
908 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
909 init_registers_i386_avx_mpx_linux.
910 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
911 (initialize_low_tracepoint): Call
912 init_registers_i386_avx_mpx_linux.
913 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
914 (initialize_low_tracepoint): Call
915 init_registers_amd64_avx_mpx_linux.
916 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
917 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
918 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
919 declarations.
920
9b30624b
PA
9212016-04-18 Pedro Alves <palves@redhat.com>
922
923 * configure: Regenerate.
924
45e3745e
AT
9252016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
926
927 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
928 (aarch64_emit_sub): Likewise.
929
2afc13ff
PA
9302016-04-12 Pedro Alves <palves@redhat.com>
931
932 * utils.c (prepare_to_throw_exception): Delete.
933
6e774b13
SM
9342016-04-05 Simon Marchi <simon.marchi@ericsson.com>
935
936 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
937
4dca19f8
MK
9382016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
939
940 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
941
d0a9981f
MK
9422016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
943
944 * linux-aarch64-ipa.c: Add <elf.h> include.
945 * linux-ppc-ipa.c: Add <elf.h> include.
946 * linux-s390-ipa.c: Add <elf.h> include.
947
252db07e
MK
9482016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
949
950 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
951 (get_raw_reg_ptr): Likewise.
952 (get_trace_state_variable_value_ptr): Likewise.
953 (set_trace_state_variable_value_ptr): Likewise.
954 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
955 char *.
956
14e2b6d9
MK
9572016-03-31 Wei-cheng Wang <cole945@gmail.com>
958 Marcin Kościelnicki <koriakin@0x04.net>
959
960 PR/17221
961 * linux-ppc-low.c (emit_insns): New function.
962 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
963 (ppc_emit_prologue): New function.
964 (ppc_emit_epilogue): New function.
965 (ppc_emit_add): New function.
966 (ppc_emit_sub): New function.
967 (ppc_emit_mul): New function.
968 (ppc_emit_lsh): New function.
969 (ppc_emit_rsh_signed): New function.
970 (ppc_emit_rsh_unsigned): New function.
971 (ppc_emit_ext): New function.
972 (ppc_emit_zero_ext): New function.
973 (ppc_emit_log_not): New function.
974 (ppc_emit_bit_and): New function.
975 (ppc_emit_bit_or): New function.
976 (ppc_emit_bit_xor): New function.
977 (ppc_emit_bit_not): New function.
978 (ppc_emit_equal): New function.
979 (ppc_emit_less_signed): New function.
980 (ppc_emit_less_unsigned): New function.
981 (ppc_emit_ref): New function.
982 (ppc_emit_const): New function.
983 (ppc_emit_reg): New function.
984 (ppc_emit_pop): New function.
985 (ppc_emit_stack_flush): New function.
986 (ppc_emit_swap): New function.
987 (ppc_emit_stack_adjust): New function.
988 (ppc_emit_call): New function.
989 (ppc_emit_int_call_1): New function.
990 (ppc_emit_void_call_2): New function.
991 (ppc_emit_if_goto): New function.
992 (ppc_emit_goto): New function.
993 (ppc_emit_eq_goto): New function.
994 (ppc_emit_ne_goto): New function.
995 (ppc_emit_lt_goto): New function.
996 (ppc_emit_le_goto): New function.
997 (ppc_emit_gt_goto): New function.
998 (ppc_emit_ge_goto): New function.
999 (ppc_write_goto_address): New function.
1000 (ppc_emit_ops_impl): New static variable.
1001 (ppc64v1_emit_prologue): New function.
1002 (ppc64v2_emit_prologue): New function.
1003 (ppc64_emit_epilogue): New function.
1004 (ppc64_emit_add): New function.
1005 (ppc64_emit_sub): New function.
1006 (ppc64_emit_mul): New function.
1007 (ppc64_emit_lsh): New function.
1008 (ppc64_emit_rsh_signed): New function.
1009 (ppc64_emit_rsh_unsigned): New function.
1010 (ppc64_emit_ext): New function.
1011 (ppc64_emit_zero_ext): New function.
1012 (ppc64_emit_log_not): New function.
1013 (ppc64_emit_bit_and): New function.
1014 (ppc64_emit_bit_or): New function.
1015 (ppc64_emit_bit_xor): New function.
1016 (ppc64_emit_bit_not): New function.
1017 (ppc64_emit_equal): New function.
1018 (ppc64_emit_less_signed): New function.
1019 (ppc64_emit_less_unsigned): New function.
1020 (ppc64_emit_ref): New function.
1021 (ppc64_emit_const): New function.
1022 (ppc64v1_emit_reg): New function.
1023 (ppc64v2_emit_reg): New function.
1024 (ppc64_emit_pop): New function.
1025 (ppc64_emit_stack_flush): New function.
1026 (ppc64_emit_swap): New function.
1027 (ppc64v1_emit_call): New function.
1028 (ppc64v2_emit_call): New function.
1029 (ppc64v1_emit_int_call_1): New function.
1030 (ppc64v2_emit_int_call_1): New function.
1031 (ppc64v1_emit_void_call_2): New function.
1032 (ppc64v2_emit_void_call_2): New function.
1033 (ppc64_emit_if_goto): New function.
1034 (ppc64_emit_eq_goto): New function.
1035 (ppc64_emit_ne_goto): New function.
1036 (ppc64_emit_lt_goto): New function.
1037 (ppc64_emit_le_goto): New function.
1038 (ppc64_emit_gt_goto): New function.
1039 (ppc64_emit_ge_goto): New function.
1040 (ppc64v1_emit_ops_impl): New static variable.
1041 (ppc64v2_emit_ops_impl): New static variable.
1042 (ppc_emit_ops): New function.
1043 (linux_low_target): Wire in ppc_emit_ops.
1044
a2174ba4
MK
10452016-03-31 Wei-cheng Wang <cole945@gmail.com>
1046 Marcin Kościelnicki <koriakin@0x04.net>
1047
1048 PR/17221
1049 * Makefile.in: Add powerpc-*-ipa.o
1050 * configure.srv: Add ipa_obj for powerpc*-linux.
1051 * linux-ppc-ipa.c: New file.
1052 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1053 includes.
1054 (PPC_FIELD): New macro.
1055 (PPC_SEXT): New macro.
1056 (PPC_OP6): New macro.
1057 (PPC_BO): New macro.
1058 (PPC_LI): New macro.
1059 (PPC_BD): New macro.
1060 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1061 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1062 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1063 (ppc_get_thread_area): New function.
1064 (is_elfv2_inferior): New function.
1065 (gen_ds_form): New function.
1066 (GEN_STD): New macro.
1067 (GEN_STDU): New macro.
1068 (GEN_LD): New macro.
1069 (GEN_LDU): New macro.
1070 (gen_d_form): New function.
1071 (GEN_ADDI): New macro.
1072 (GEN_ADDIS): New macro.
1073 (GEN_LI): New macro.
1074 (GEN_LIS): New macro.
1075 (GEN_ORI): New macro.
1076 (GEN_ORIS): New macro.
1077 (GEN_LWZ): New macro.
1078 (GEN_STW): New macro.
1079 (GEN_STWU): New macro.
1080 (gen_xfx_form): New function.
1081 (GEN_MFSPR): New macro.
1082 (GEN_MTSPR): New macro.
1083 (GEN_MFCR): New macro.
1084 (GEN_MTCR): New macro.
1085 (GEN_SYNC): New macro.
1086 (GEN_LWSYNC): New macro.
1087 (gen_x_form): New function.
1088 (GEN_OR): New macro.
1089 (GEN_MR): New macro.
1090 (GEN_LWARX): New macro.
1091 (GEN_STWCX): New macro.
1092 (GEN_CMPW): New macro.
1093 (gen_md_form): New function.
1094 (GEN_RLDICL): New macro.
1095 (GEN_RLDICR): New macro.
1096 (gen_i_form): New function.
1097 (GEN_B): New macro.
1098 (GEN_BL): New macro.
1099 (gen_b_form): New function.
1100 (GEN_BNE): New macro.
1101 (GEN_LOAD): New macro.
1102 (GEN_STORE): New macro.
1103 (gen_limm): New function.
1104 (gen_atomic_xchg): New function.
1105 (gen_call): New function.
1106 (ppc_relocate_instruction): New function.
1107 (ppc_install_fast_tracepoint_jump_pad): New function.
1108 (ppc_get_min_fast_tracepoint_insn_len): New function.
1109 (ppc_get_ipa_tdesc_idx): New function.
1110 (the_low_target): Wire in the new functions.
1111 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1112 tdescs.
1113 * linux-ppc-tdesc.h: New file.
1114
a13c4696
MK
11152016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1116
1117 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1118 (alloc_jump_pad_buffer): New function.
1119 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1120 (alloc_jump_pad_buffer): New function.
1121 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1122 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1123 (alloc_jump_pad_buffer): New function.
1124 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1125 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1126 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1127 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1128
1cda1512
MK
11292016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1130
1131 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1132 * linux-amd64-ipa.c: Likewise.
1133 * linux-i386-ipa.c: Likewise.
1134 * linux-s390-ipa.c: Likewise.
1135 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1136 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1137 set_trace_state_variable_value_ptr.
1138 (struct ipa_sym_addresses): Likewise.
1139 (symbol_list): Likewise.
1140 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1141 accessing gdb_collect directly.
1142 (gdb_collect_ptr_type): New typedef.
1143 (get_raw_reg_ptr_type): New typedef.
1144 (get_trace_state_variable_value_ptr_type): New typedef.
1145 (set_trace_state_variable_value_ptr_type): New typedef.
1146 (gdb_collect_ptr): New global.
1147 (get_raw_reg_ptr): New global.
1148 (get_trace_state_variable_value_ptr): New global.
1149 (set_trace_state_variable_value_ptr): New global.
1150 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1151 accessing get_raw_reg directly.
1152 (get_get_tsv_func_addr): Likewise for
1153 get_trace_state_variable_value_ptr.
1154 (get_set_tsv_func_addr): Likewise for
1155 set_trace_state_variable_value_ptr.
1156 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1157
72fb5488
SM
11582016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1159
1160 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1161
28170b88
MK
11622016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1163
1164 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1165 packets.
1166 (relocate_instruction): Remove own_buf.
1167 * server.c (own_buf): Make global.
1168 (handle_v_requests): Make global.
1169 * server.h (own_buf): New declaration.
1170 (handle_v_requests): New prototype.
1171
f39e8743
MK
11722016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1173
1174 PR 18377
1175 * linux-s390-low.c (add_insns): New function.
1176 (s390_emit_prologue): New function.
1177 (s390_emit_epilogue): New function.
1178 (s390_emit_add): New function.
1179 (s390_emit_sub): New function.
1180 (s390_emit_mul): New function.
1181 (s390_emit_lsh): New function.
1182 (s390_emit_rsh_signed): New function.
1183 (s390_emit_rsh_unsigned): New function.
1184 (s390_emit_ext): New function.
1185 (s390_emit_log_not): New function.
1186 (s390_emit_bit_and): New function.
1187 (s390_emit_bit_or): New function.
1188 (s390_emit_bit_xor): New function.
1189 (s390_emit_bit_not): New function.
1190 (s390_emit_equal): New function.
1191 (s390_emit_less_signed): New function.
1192 (s390_emit_less_unsigned): New function.
1193 (s390_emit_ref): New function.
1194 (s390_emit_if_goto): New function.
1195 (s390_emit_goto): New function.
1196 (s390_write_goto_address): New function.
1197 (s390_emit_litpool): New function.
1198 (s390_emit_const): New function.
1199 (s390_emit_call): New function.
1200 (s390_emit_reg): New function.
1201 (s390_emit_pop): New function.
1202 (s390_emit_stack_flush): New function.
1203 (s390_emit_zero_ext): New function.
1204 (s390_emit_swap): New function.
1205 (s390_emit_stack_adjust): New function.
1206 (s390_emit_set_r2): New function.
1207 (s390_emit_int_call_1): New function.
1208 (s390_emit_void_call_2): New function.
1209 (s390_emit_eq_goto): New function.
1210 (s390_emit_ne_goto): New function.
1211 (s390_emit_lt_goto): New function.
1212 (s390_emit_le_goto): New function.
1213 (s390_emit_gt_goto): New function.
1214 (s390_emit_ge_goto): New function.
1215 (s390x_emit_prologue): New function.
1216 (s390x_emit_epilogue): New function.
1217 (s390x_emit_add): New function.
1218 (s390x_emit_sub): New function.
1219 (s390x_emit_mul): New function.
1220 (s390x_emit_lsh): New function.
1221 (s390x_emit_rsh_signed): New function.
1222 (s390x_emit_rsh_unsigned): New function.
1223 (s390x_emit_ext): New function.
1224 (s390x_emit_log_not): New function.
1225 (s390x_emit_bit_and): New function.
1226 (s390x_emit_bit_or): New function.
1227 (s390x_emit_bit_xor): New function.
1228 (s390x_emit_bit_not): New function.
1229 (s390x_emit_equal): New function.
1230 (s390x_emit_less_signed): New function.
1231 (s390x_emit_less_unsigned): New function.
1232 (s390x_emit_ref): New function.
1233 (s390x_emit_if_goto): New function.
1234 (s390x_emit_const): New function.
1235 (s390x_emit_call): New function.
1236 (s390x_emit_reg): New function.
1237 (s390x_emit_pop): New function.
1238 (s390x_emit_stack_flush): New function.
1239 (s390x_emit_zero_ext): New function.
1240 (s390x_emit_swap): New function.
1241 (s390x_emit_stack_adjust): New function.
1242 (s390x_emit_int_call_1): New function.
1243 (s390x_emit_void_call_2): New function.
1244 (s390x_emit_eq_goto): New function.
1245 (s390x_emit_ne_goto): New function.
1246 (s390x_emit_lt_goto): New function.
1247 (s390x_emit_le_goto): New function.
1248 (s390x_emit_gt_goto): New function.
1249 (s390x_emit_ge_goto): New function.
1250 (s390_emit_ops): New function.
1251 (struct linux_target_ops): Fill in emit_ops hook.
1252
abd9baf9
MK
12532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1254
1255 PR 18377
1256 * Makefile.in: Add s390 IPA files.
1257 * configure.srv: Build IPA for s390.
1258 * linux-s390-ipa.c: New file.
1259 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1260 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1261 (tdesc_s390_linux32): Likewise.
1262 (init_registers_s390_linux32v1): Likewise.
1263 (tdesc_s390_linux32v1): Likewise.
1264 (init_registers_s390_linux32v2): Likewise.
1265 (tdesc_s390_linux32v2): Likewise.
1266 (init_registers_s390_linux64): Likewise.
1267 (tdesc_s390_linux64): Likewise.
1268 (init_registers_s390_linux64v1): Likewise.
1269 (tdesc_s390_linux64v1): Likewise.
1270 (init_registers_s390_linux64v2): Likewise.
1271 (tdesc_s390_linux64v2): Likewise.
1272 (init_registers_s390_te_linux64): Likewise.
1273 (tdesc_s390_te_linux64): Likewise.
1274 (init_registers_s390_vx_linux64): Likewise.
1275 (tdesc_s390_vx_linux64): Likewise.
1276 (init_registers_s390_tevx_linux64): Likewise.
1277 (tdesc_s390_tevx_linux64): Likewise.
1278 (init_registers_s390x_linux64): Likewise.
1279 (tdesc_s390x_linux64): Likewise.
1280 (init_registers_s390x_linux64v1): Likewise.
1281 (tdesc_s390x_linux64v1): Likewise.
1282 (init_registers_s390x_linux64v2): Likewise.
1283 (tdesc_s390x_linux64v2): Likewise.
1284 (init_registers_s390x_te_linux64): Likewise.
1285 (tdesc_s390x_te_linux64): Likewise.
1286 (init_registers_s390x_vx_linux64): Likewise.
1287 (tdesc_s390x_vx_linux64): Likewise.
1288 (init_registers_s390x_tevx_linux64): Likewise.
1289 (tdesc_s390x_tevx_linux64): Likewise.
1290 (have_hwcap_s390_vx): New static variable.
1291 (s390_arch_setup): Fill have_hwcap_s390_vx.
1292 (s390_get_thread_area): New function.
1293 (s390_ft_entry_gpr_esa): New const.
1294 (s390_ft_entry_gpr_zarch): New const.
1295 (s390_ft_entry_misc): New const.
1296 (s390_ft_entry_fr): New const.
1297 (s390_ft_entry_vr): New const.
1298 (s390_ft_main_31): New const.
1299 (s390_ft_main_64): New const.
1300 (s390_ft_exit_fr): New const.
1301 (s390_ft_exit_vr): New const.
1302 (s390_ft_exit_misc): New const.
1303 (s390_ft_exit_gpr_esa): New const.
1304 (s390_ft_exit_gpr_zarch): New const.
1305 (append_insns): New function.
1306 (s390_relocate_instruction): New function.
1307 (s390_install_fast_tracepoint_jump_pad): New function.
1308 (s390_get_min_fast_tracepoint_insn_len): New function.
1309 (s390_get_ipa_tdesc_idx): New function.
1310 (struct linux_target_ops): Wire in the above functions.
1311 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1312 * linux-s390-tdesc.h: New file.
1313
a4105d04
MK
13142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1315
1316 * linux-s390-low.c (s390_supports_tracepoints): New function.
1317 (struct linux_target_ops): Fill supports_tracepoints hook.
1318
35ac8b3e
YQ
13192016-03-18 Yao Qi <yao.qi@linaro.org>
1320
1321 * linux-low.c (lwp_signal_can_be_delivered): New function.
1322 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1323
94610ec4
YQ
13242016-03-18 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1327 0 if signal is enqueued. Remove 'signal' from one debugging
1328 message. Move one debugging message to some lines below.
1329 Remove code setting 'signal' to 0.
1330
80aea927
YQ
13312016-03-18 Yao Qi <yao.qi@linaro.org>
1332
1333 * linux-low.c (linux_low_filter_event): Remove redundant
1334 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1335
b04fd3be
MK
13362016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1337
1338 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1339 (struct linux_target_ops): Wire in the above.
1340
c40c8d4b
YQ
13412016-03-03 Yao Qi <yao.qi@linaro.org>
1342
1343 * linux-low.c: Update comments to start_step_over.
1344
0f8288ae
YQ
13452016-03-03 Yao Qi <yao.qi@linaro.org>
1346
1347 PR server/19736
1348 * linux-low.c (handle_extended_wait): Set child suspended
1349 if event_lwp->bp_reinsert isn't zero.
1350
fdbd04a8
YQ
13512016-03-02 Yao Qi <yao.qi@linaro.org>
1352
1353 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1354 enqueue_pending_signal.
1355
6896a8fa
MK
13562016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1357
1358 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1359 is actually loaded.
1360
ab503087
MK
13612016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1362
1363 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1364 (s390_regmap_3264) [!__s390x__]: New global.
1365 (s390_collect_ptrace_register): Skip map entries containing -1.
1366 (s390_supply_ptrace_register): Ditto.
1367 (s390_fill_gprs_high): New function.
1368 (s390_store_gprs_high): New function.
1369 (s390_regsets): Add NT_S390_HIGH_GPRS.
1370 (s390_get_hwcap): Enable on 31-bit.
1371 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1372 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1373 Detect NT_S390_HIGH_GPRS.
1374 (s390_usrregs_info_3264): Enable on 31-bit.
1375 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1376 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1377
ae91f625
MK
13782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1379
1380 PR gdb/13808
1381 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1382 * configure.srv: Ditto.
1383 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1384 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1385 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1386 (init_registers_amd64_linux): Remove prototype.
1387 (tdesc_amd64_linux): Remove declaration.
1388 (get_ipa_tdesc): New function.
1389 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1390 initialize remaining tdescs.
1391 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1392 (init_registers_i386_linux): Remove prototype.
1393 (tdesc_i386_linux): Remove declaration.
1394 (get_ipa_tdesc): New function.
1395 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1396 initialize remaining tdescs.
1397 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1398 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1399 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1400 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1401 (x86_get_ipa_tdesc_idx): New function.
1402 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1403 * linux-x86-tdesc.h: New file.
1404 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1405 (target_get_ipa_tdesc_idx): New macro.
1406 * tracepoint.c (ipa_tdesc_idx): New macro.
1407 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1408 (symbol_list): Add ipa_tdesc_idx.
1409 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1410 (ipa_tdesc): Remove.
1411 (ipa_tdesc_idx): New variable.
1412 (get_context_regcache): Use get_ipa_tdesc.
1413 (gdb_collect): Ditto.
1414 (gdb_probe): Ditto.
1415 * tracepoint.h (get_ipa_tdesc): New prototype.
1416 (ipa_tdesc): Remove.
1417
e7ad2f14
PA
14182016-02-24 Pedro Alves <palves@redhat.com>
1419
1420 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1421 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1422 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1423 Factor out common code between the USE_SIGTRAP_SIGINFO and
1424 !USE_SIGTRAP_SIGINFO blocks.
1425 (linux_low_filter_event): Call save_stop_reason instead of
1426 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1427 Update comments.
1428 (linux_wait_1): Update comments.
1429
657f9cde
WW
14302016-02-24 Wei-cheng Wang <cole945@gmail.com>
1431
1432 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1433 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1434 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1435 ppc_insert_point, ppc_remove_point.
1436
b00b61e1
MK
14372016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1438
1439 * linux-s390-low.c (s390_supports_z_point_type): New function.
1440 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1441
553cb527
YQ
14422016-02-16 Yao Qi <yao.qi@linaro.org>
1443
1444 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1445 PC. Get pc from regcache_read_pc.
1446
a5652c21
YQ
14472016-02-12 Yao Qi <yao.qi@linaro.org>
1448
1449 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1450 or linux_get_pc_32bit.
1451 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1452
ed443b61
YQ
14532016-02-12 Yao Qi <yao.qi@linaro.org>
1454
1455 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1456 arm_linux_get_next_pcs_fixup.
1457
020ecd38
MK
14582016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1459
1460 * tracepoint.c (x_tracepoint_action_download): Change
1461 write_inferior_data_ptr to write_inferior_data_pointer.
1462 (cmd_qtstart): Likewise.
1463 (write_inferior_data_ptr): Remove.
1464 (download_agent_expr): Change write_inferior_data_ptr to
1465 write_inferior_data_pointer.
1466 (download_tracepoint_1): Likewise.
1467 (download_tracepoint): Likewise.
1468 (download_trace_state_variables): Likewise.
1469
7cae9051
WW
14702016-02-11 Wei-cheng Wang <cole945@gmail.com>
1471 Marcin Kościelnicki <koriakin@0x04.net>
1472
1473 * tracepoint.c (struct tracepoint_action_ops): Remove.
1474 (struct tracepoint_action): Remove ops.
1475 (m_tracepoint_action_download, r_tracepoint_action_download)
1476 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1477 size and offset accordingly.
1478 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1479 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1480 (tracepoint_action_send, tracepoint_action_download): New functions.
1481 Helpers for trace action handlers.
1482 (add_tracepoint_action): Remove setup actions ops.
1483 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1484
9f6a71b4
YQ
14852016-02-10 Yao Qi <yao.qi@linaro.org>
1486
1487 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1488
1e94266c
SM
14892016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1490
1491 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1492 to AC_OUTPUT.
1493 * configure: Regenerate.
1494
8adce034
SM
14952016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1496
1497 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1498 void * to gdb_byte *.
1499 * linux-low.c (siginfo_fixup): Likewise.
1500 (linux_xfer_siginfo): Likewise.
1501 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1502 Likewise.
1503 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1504
93813b37
WT
15052016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1506
1507 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1508 to srv_tgtobj.
1509 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1510 to srv_tgtobj.
1511 * linux-x86-low.c [__x86_64__]: Include
1512 "nat/amd64-linux-siginfo.h".
1513 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1514 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1515 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1516 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1517 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1518 (cpt_si_fd, si_timerid, si_overrun): Move from
1519 nat/amd64-linux-siginfo.c.
1520 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1521
8424cc97
SM
15222016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1523
1524 * server.c (skip_to_semicolon): Remove.
1525 (process_point_options): Use strchrnul instead of
1526 skip_to_semicolon.
1527
4d18591b
YQ
15282016-01-26 Yao Qi <yao.qi@linaro.org>
1529
1530 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1531 * linux-low.c (install_software_single_step_breakpoints): Don't
1532 call regcache_read_pc.
1533 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1534 argument pc.
1535
d8020970
YQ
15362016-01-26 Yao Qi <yao.qi@linaro.org>
1537
1538 * linux-low.c (install_software_single_step_breakpoints): Call
1539 regcache_read_pc instead of get_pc.
1540
8b207339
YQ
15412016-01-26 Yao Qi <yao.qi@linaro.org>
1542
1543 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1544 (unblock_async_io): Rename to ...
1545 (block_unblock_async_io): ... it. New function.
1546 (enable_async_io): Don't install SIGIO handler. Unblock it
1547 instead.
1548 (disable_async_io): Don't ignore SIGIO. Block it instead.
1549 (initialize_async_io): Install SIGIO handler. Don't call
1550 unblock_async_io.
1551
18879fef
YQ
15522016-01-26 Yao Qi <yao.qi@linaro.org>
1553
1554 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1555 first character is '\003', call *the_target->request_interrupt.
1556
a0f8e08a
YQ
15572016-01-25 Yao Qi <yao.qi@linaro.org>
1558
1559 * remote-utils.c (new_thread_notify): Remove.
1560 (dead_thread_notify): Likewise.
1561 * remote-utils.h (new_thread_notify): Remove declaration.
1562 (dead_thread_notify): Likewise.
1563
cc5fd9ab
MK
15642016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1565
1566 * gdb.trace/pending.exp: Fix expected message on continue.
1567
99e8eb11
MK
15682016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1569
1570 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1571 it works properly on big-endian machines where sizeof (CORE_ADDR)
1572 != sizeof (void *).
1573
a994041d
PA
15742016-01-21 Pedro Alves <palves@redhat.com>
1575
1576 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1577 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1578 * configure: Regenerate.
1579
f7a6a40d
YQ
15802016-01-21 Yao Qi <yao.qi@linaro.org>
1581
1582 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1583 is_thumb and set it according to CPSR saved on the stack.
1584 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1585 arm_sigreturn_next_pc.
1586
6f69e520
YQ
15872016-01-18 Yao Qi <yao.qi@linaro.org>
1588
1589 * linux-low.c (linux_set_pc_64bit): New function.
1590 (linux_get_pc_64bit): New function.
1591 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1592 Declare.
1593 * linux-sparc-low.c (debug_threads): Remove declaration.
1594 (sparc_get_pc): Remove.
1595 (the_low_target): Use linux_get_pc_64bit instead of
1596 sparc_get_pc.
1597 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1598 (the_low_target): Use linux_get_pc_64bit and
1599 linux_set_pc_64bit.
1600
276d4552
YQ
16012016-01-18 Yao Qi <yao.qi@linaro.org>
1602
1603 * linux-arm-low.c (debug_threads): Remove declaration.
1604 (arm_get_pc, arm_set_pc): Remove.
1605 (the_low_target): Use linux_get_pc_32bit and
1606 linux_set_pc_32bit.
1607 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1608 (the_low_target): Use linux_get_pc_32bit and
1609 linux_set_pc_32bit.
1610 * linux-cris-low.c (debug_threads): Remove declaration.
1611 (cris_get_pc, cris_set_pc,): Remove.
1612 (the_low_target): Use linux_get_pc_32bit and
1613 linux_set_pc_32bit.
1614 * linux-crisv32-low.c (debug_threads): Remove declaration.
1615 (cris_get_pc, cris_set_pc): Remove.
1616 (the_low_target): Use linux_get_pc_32bit and
1617 linux_set_pc_32bit.
1618 * linux-low.c: Include inttypes.h.
1619 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1620 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1621 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1622 (the_low_target): Use linux_get_pc_32bit and
1623 linux_set_pc_32bit.
1624 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1625 (the_low_target): Use linux_get_pc_32bit and
1626 linux_set_pc_32bit.
1627 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1628 (the_low_target): Use linux_get_pc_32bit and
1629 linux_set_pc_32bit.
1630 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1631 (the_low_target): Use linux_get_pc_32bit and
1632 linux_set_pc_32bit.
1633 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1634 (the_low_target): Use linux_get_pc_32bit and
1635 linux_set_pc_32bit.
1636
eb0edac8
GB
16372016-01-18 Gary Benson <gbenson@redhat.com>
1638
1639 * configure.ac (AC_FUNC_FORK): New check.
1640 * config.in: Regenerate.
1641 * configure: Likewise.
1642
1b451dda
YQ
16432016-01-14 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1646 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1647 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1648 arm_get_next_pcs_ctor.
1649
82075af2
JS
16502016-01-12 Josh Stone <jistone@redhat.com>
1651 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1652
1653 * inferiors.h: Include "gdb_vecs.h".
1654 (struct process_info): Add syscalls_to_catch.
1655 * inferiors.c (remove_process): Free syscalls_to_catch.
1656 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1657 syscall_return stops.
1658 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1659 * server.c (handle_general_set): Handle QCatchSyscalls.
1660 (handle_query): Report support for QCatchSyscalls.
1661 * target.h (struct target_ops): Add supports_catch_syscall.
1662 (target_supports_catch_syscall): New macro.
1663 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1664 (struct lwp_info): Add syscall_state.
1665 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1666 Maintain syscall_state and syscalls_to_catch across exec.
1667 (get_syscall_trapinfo): New function, proxy to the_low_target.
1668 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1669 (linux_low_filter_event): Toggle syscall_state entry/return for
1670 syscall traps, and set it ignored for all others.
1671 (gdb_catching_syscalls_p): New function.
1672 (gdb_catch_this_syscall_p): New function.
1673 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1674 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1675 (linux_supports_catch_syscall): New function.
1676 (linux_target_ops): Install it.
1677 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1678 (the_low_target): Install it.
1679
8f13a3ce
MF
16802016-01-12 Mike Frysinger <vapier@gentoo.org>
1681
1682 * acinclude.m4: Include new ../warning.m4 file.
1683 * configure: Regenerated.
1684 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1685
5b3da067
MF
16862016-01-12 Mike Frysinger <vapier@gentoo.org>
1687
1688 * ax.c (is_goto_target): Mark static.
1689 * linux-low.c (register_addr): Likewise.
1690 (linux_fetch_registers, linux_store_registers): Likewise.
1691 * mem-break.c (any_persistent_commands): Fix old prototype.
1692 (add_commands_to_breakpoint): Mark static.
1693 * regcache.c (find_register_by_name): Delete unused func.
1694 * remote-utils.c (hex_or_minus_one): Mark static.
1695 * server.c (monitor_show_help): Mark static.
1696 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1697 handle_v_requests): Likewise.
1698
bc504a31
PA
16992016-01-12 Pedro Alves <palves@redhat.com>
1700
1701 Remove use of the registered trademark symbol throughout.
1702
5a0dd67a
YQ
17032016-01-08 Yao Qi <yao.qi@linaro.org>
1704
1705 * remote-utils.c (getpkt): If c is '\003', call target hook
1706 request_interrupt.
1707
b2ca446f
YQ
17082016-01-06 Yao Qi <yao.qi@linaro.org>
1709
1710 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1711 linux-aarch32-low.c.
1712 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1713 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1714 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1715 (thumb2_breakpoint): Declare.
1716 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1717 linux-aarch32-low.h.
1718 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1719 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1720 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1721
edd88788
JB
17222016-01-01 Joel Brobecker <brobecker@adacore.com>
1723
1724 * gdbreplay.c (gdbreplay_version): Change copyright year in
1725 version message.
1726 * server.c (gdbserver_version): Likewise.
1727
65da7f14
PP
17282015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1729
1730 * server.c (crc32_table): Delete.
1731 (crc32): Use libiberty's xcrc32 function.
1732
4abd5ed2
JB
17332015-12-22 Joel Brobecker <brobecker@adacore.com>
1734
1735 * lynx-low.c (lynx_delete_thread_callback): New function.
1736 (lynx_mourn): Properly delete our process and all of its
1737 threads. Remove call to clear_inferiors.
1738
0e50fe5c
JB
17392015-12-22 Joel Brobecker <brobecker@adacore.com>
1740
1741 * target.c (thread_search_callback): Add check that
1742 the thread_stopped target callback is not NULL before
1743 calling it.
1744
35adc03f
YQ
17452015-12-21 Yao Qi <yao.qi@linaro.org>
1746
1747 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1748 arm breakpoint.
1749
bd2b2909
AT
17502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1751
1752 * server.c (handle_query): Call target_supports_software_single_step.
1753
7fe5e27e
AT
17542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1755
1756 * linux-low.c (single_step): New function.
1757 (linux_resume_one_lwp_throw): Call single_step.
1758 (start_step_over): Likewise.
1759
d9311bfa
AT
17602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1761
1762 * Makefile.in (SFILES): Append arch/arm-linux.c,
1763 arch/arm-get-next-pcs.c.
1764 (arm-linux.o): New rule.
1765 (arm-get-next-pcs.o): New rule.
1766 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1767 arm-linux.o.
1768 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1769 to linux-aarch32-low.c.
1770 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1771 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1772 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1773 (thumb2_breakpoint_len): Likewise.
1774 (arm_is_thumb_mode): Make non-static.
1775 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1776 from linux-aarch32-low.c.
1777 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1778 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1779 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1780 (thumb2_breakpoint_len): Likewise.
1781 (arm_is_thumb_mode): New declaration.
1782 * linux-arm-low.c: Include arch/arm-linux.h
1783 aarch/arm-get-next-pcs.h, sys/syscall.h.
1784 (get_next_pcs_ops): New struct.
1785 (get_next_pcs_addr_bits_remove): New function.
1786 (get_next_pcs_is_thumb): New function.
1787 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1788 (arm_sigreturn_next_pc): Likewise.
1789 (get_next_pcs_syscall_next_pc): Likewise.
1790 (arm_gdbserver_get_next_pcs): Likewise.
1791 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1792 Initialize.
1793 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1794 * server.h: Include gdb_vecs.h.
1795
68ce2059
AT
17962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1797
1798 * Makefile.in (SFILES): Append common/common-regcache.c.
1799 (OBS): Append common-regcache.o.
1800 (common-regcache.o): New rule.
1801 * regcache.c (init_register_cache): Initialize cache to
1802 REG_UNAVAILABLE.
1803 (regcache_raw_read_unsigned): New function.
1804 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1805 register_status enum.
1806
fa5308bd
AT
18072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1808
1809 * linux-aarch64-low.c (the_low_targets): Rename
1810 breakpoint_reinsert_addr to get_next_pcs.
1811 * linux-arm-low.c (the_low_targets): Likewise.
1812 * linux-bfin-low.c (the_low_targets): Likewise.
1813 * linux-cris-low.c (the_low_targets): Likewise.
1814 * linux-crisv32-low.c (the_low_targets): Likewise.
1815 * linux-low.c (can_software_single_step): Likewise.
1816 (install_software_single_step_breakpoints): New function.
1817 (start_step_over): Use install_software_single_step_breakpoints.
1818 * linux-low.h: New CORE_ADDR vector.
1819 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1820 get_next_pcs.
1821 * linux-mips-low.c (the_low_targets): Likewise.
1822 * linux-nios2-low.c (the_low_targets): Likewise.
1823 * linux-sparc-low.c (the_low_targets): Likewise.
1824
4a6ed09b
PA
18252015-12-17 Pedro Alves <palves@redhat.com>
1826
1827 * linux-low.c (linux_kill_one_lwp): Remove references to
1828 LinuxThreads.
1829 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1830 to 'kill'.
1831 (linux_init_signals): Delete.
1832 (initialize_low): Adjust.
1833 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1834
7544db95
PA
18352015-12-16 Pedro Alves <palves@redhat.com>
1836
1837 * configure.ac (compiler warning flags): When testing a
1838 -Wno-foo option, check whether -Wfoo works instead.
1839 * configure: Regenerate.
1840
8020350c
DB
18412015-12-11 Don Breazeal <donb@codesourcery.com>
1842
1843 * server.c (process_serial_event): Don't exit from gdbserver
1844 in remote mode if there are still active inferiors.
1845
db91f502
YQ
18462015-12-11 Yao Qi <yao.qi@linaro.org>
1847
1848 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1849 arm_breakpoint_at if the process is 32-bit.
1850
b37a6290
YQ
18512015-12-11 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1854 arm breakpoint.
1855
17b1509a
YQ
18562015-12-07 Yao Qi <yao.qi@linaro.org>
1857
1858 * configure.srv: Append arm.o to srv_tgtobj for
1859 aarch64*-*-linux* target.
1860 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1861 from linux-arm-low.c.
1862 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1863 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1864 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1865 (thumb2_breakpoint_len): Likewise.
1866 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1867 (arm_breakpoint_kinds): Likewise.
1868 (arm_breakpoint_kind_from_pc): Likewise.
1869 (arm_sw_breakpoint_from_kind): Likewise.
1870 (arm_breakpoint_kind_from_current_state): Likewise.
1871 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1872 (arm_sw_breakpoint_from_kind): Declare.
1873 (arm_breakpoint_kind_from_current_state): Declare.
1874 (arm_breakpoint_at): Declare.
1875 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1876 arm_sw_breakpoint_from_kind if process is 32-bit.
1877 (aarch64_breakpoint_kind_from_pc): New function.
1878 (aarch64_breakpoint_kind_from_current_state): New function.
1879 (the_low_target): Initialize fields breakpoint_kind_from_pc
1880 and breakpoint_kind_from_current_state.
1881 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1882 linux-aarch32-low.c.
1883 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1884 (arm_breakpoint, arm_breakpoint_len): Likewise.
1885 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1886 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1887 (arm_is_thumb_mode): Likewise.
1888 (arm_breakpoint_at): Likewise.
1889 (arm_breakpoint_kind_from_pc): Likewise.
1890 (arm_sw_breakpoint_from_kind): Likewise.
1891 (arm_breakpoint_kind_from_current_state): Likewise.
1892
1893 Revert:
1894 2015-08-04 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1897 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1898 * server.c (extended_protocol): Remove "static".
1899 * server.h (extended_protocol): Declare it.
1900
ece66d65
JS
19012015-12-04 Josh Stone <jistone@redhat.com>
1902
1903 * target.h (struct target_ops) <arch_setup>: Rename to ...
1904 (struct target_ops) <post_create_inferior>: ... this.
1905 (target_arch_setup): Rename to ...
1906 (target_post_create_inferior): ... this, calling post_create_inferior.
1907 * server.c (start_inferior): Update target_arch_setup calls to
1908 target_post_create_inferior.
1909 * linux-low.c (linux_low_ptrace_options): Forward declare.
1910 (linux_arch_setup): Update its comment for general use.
1911 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1912 (struct linux_target_ops): Use linux_post_create_inferior.
1913 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1914 to post_create_inferior.
1915 * nto-low.c (struct nto_target_ops): Likewise.
1916 * spu-low.c (struct spu_target_ops): Likewise.
1917 * win32-low.c (struct win32_target_ops): Likewise.
1918
e58c48b4
AT
19192015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1920
1921 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1922
fbec8956
AT
19232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1924
1925 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1926 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1927 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1928 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1929 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1930 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1931 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1932 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1933 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1934 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1935 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1936 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1937
9b4c5f87
AT
19382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1939
1940 * linux-low.c (linux_look_up_symbols): Don't call
1941 linux_supports_traceclone.
1942 * linux-low.h (thread_db_init): Remove use_events argument.
1943 * thread-db.c (thread_db_use_event): Remove global variable.
1944 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1945 (struct thread_db) <td_create_bp>: Remove field.
1946 (thread_db_create_event): Remove function.
1947 (thread_db_enable_reporting): Likewise.
1948 (find_one_thread): Don't check for thread_db_use_events.
1949 (attach_thread): Likewise.
1950 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1951 (try_thread_db_load_1): Don't check for thread_db_use_events.
1952 (thread_db_init): Remove use_events argument and thread events
1953 handling.
1954 (remove_thread_event_breakpoints): Remove function.
1955 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1956
7d00775e
AT
19572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1958
1959 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1960 New function.
1961 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1962 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1963 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1964 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1965 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1966 Initialize.
1967 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1968 New function.
1969 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1970 * linux-low.c (can_hardware_single_step): Use
1971 supports_hardware_single_step.
1972 (can_software_single_step): New function.
1973 (start_step_over): Call can_software_single_step.
1974 (linux_supports_hardware_single_step): New function.
1975 (struct target_ops) <supports_software_single_step>: Initialize.
1976 * linux-low.h (struct linux_target_ops)
1977 <supports_hardware_single_step>: Initialize.
1978 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1980 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1981 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1982 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1983 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1984 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1985 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1986 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1987 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1988 Initialize.
1989 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1990 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1991 Initialize.
1992 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1993 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1994 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1995 New function.
1996 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1997 * target.h (struct target_ops): <supports_software_single_step>:
1998 New field.
1999 (target_supports_software_single_step): New macro.
2000
2d97cd35
AT
20012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2002
2003 * linux-low.c (linux_wait_1): Fix pc advance condition.
2004 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2005 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2006
769ef81f
AT
20072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2008
2009 * linux-arm-low.c (arm_is_thumb_mode): New function.
2010 (arm_breakpoint_at): Use arm_is_thumb_mode.
2011 (arm_breakpoint_kind_from_current_state): New function.
2012 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2013 Initialize.
2014 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2015 (linux_breakpoint_kind_from_current_state): New function.
2016 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2017 * linux-low.h (struct linux_target_ops)
2018 <breakpoint_kind_from_current_state>: New field.
2019 * target.h (struct target_ops): Likewise.
2020 (target_breakpoint_kind_from_current_state): New macro.
2021
1bebeeca
PA
20222015-11-30 Pedro Alves <palves@redhat.com>
2023
2024 * linux-low.c (linux_resume): Wake up the event loop before
2025 returning.
2026
a67a9fae
PA
20272015-11-30 Pedro Alves <palves@redhat.com>
2028
2029 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2030 check.
2031 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2032 to -1.
2033 * target.c (struct thread_search): New structure.
2034 (thread_search_callback): New function.
2035 (prev_general_thread): New global.
2036 (prepare_to_access_memory, done_accessing_memory): New functions.
2037 * target.h (prepare_to_access_memory, done_accessing_memory):
2038 Replace macros with function declarations.
2039
f2faf941
PA
20402015-11-30 Pedro Alves <palves@redhat.com>
2041
2042 PR 14618
2043 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2044 report TARGET_WAITKIND_NO_RESUMED.
2045 * remote-utils.c (prepare_resume_reply): Handle
2046 TARGET_WAITKIND_NO_RESUMED.
2047 * server.c (report_no_resumed): New global.
2048 (handle_query) <qSupported>: Handle "no-resumed+". Report
2049 "no-resumed+" support.
2050 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2051 return error if the client doesn't support no-resumed events.
2052 (push_stop_notification): New function.
2053 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2054 events if the client supports them.
2055
a681f9c9
PA
20562015-11-30 Pedro Alves <palves@redhat.com>
2057
2058 * linux-low.c (thread_still_has_status_pending_p): Don't check
2059 vCont;t here.
2060 (lwp_resumed): New function.
2061 (status_pending_p_callback): Return early if the LWP is not
2062 supposed to be resumed.
2063
65706a29
PA
20642015-11-30 Pedro Alves <palves@redhat.com>
2065
2066 * linux-low.c (handle_extended_wait): Assert that the LWP's
2067 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2068 thread create events, leave the new child's status pending.
2069 (linux_low_filter_event): If GDB wants to hear about thread exit
2070 events, leave the LWP marked dead and don't delete it.
2071 (linux_wait_for_event_filtered): Don't check for thread exit.
2072 (filter_exit_event): New function.
2073 (linux_wait_1): Use it, when returning an exit event.
2074 (linux_resume_one_lwp_throw): Assert that the LWP's
2075 waitstatus is TARGET_WAITKIND_IGNORE.
2076 * remote-utils.c (prepare_resume_reply): Handle
2077 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2078 * server.c (report_thread_events): New global.
2079 (handle_general_set): Handle QThreadEvents.
2080 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2081 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2082 TARGET_WAITKIND_THREAD_EXITED.
2083 * server.h (report_thread_events): Declare.
2084
56cf4bed
PA
20852015-11-30 Pedro Alves <palves@redhat.com>
2086
2087 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2088 the thread's last_resume_kind was resume_stop.
2089
500c1d85
PA
20902015-11-30 Pedro Alves <palves@redhat.com>
2091
2092 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2093 before returning.
2094
de979965
PA
20952015-11-30 Pedro Alves <palves@redhat.com>
2096
2097 * server.c (handle_v_requests): Handle vCtrlC.
2098
34c65914
PA
20992015-11-30 Pedro Alves <palves@redhat.com>
2100
2101 * gdbthread.h (find_any_thread_of_pid): Declare.
2102 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2103 functions.
2104 * server.c (handle_query): If current_thread is NULL, look for
2105 another thread of the selected process.
2106
79efa585 21072015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2108 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2109
2110 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2111 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2112 name in reply.
2113 * target.h (struct target_ops) <thread_name>: New field.
2114 (target_thread_name): New macro.
2115
80d82c19
JB
21162015-11-23 Joel Brobecker <brobecker@adacore.com>
2117
2118 * regcache.h (regcache_invalidate_pid): Add declaration.
2119 * regcache.c (regcache_invalidate_pid): New function, extracted
2120 from regcache_invalidate.
2121 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2122 Add trivial documentation comment.
2123 * lynx-low.c: Use regcache_invalidate_pid instead of
2124 regcache_invalidate.
2125
64da5dd5
JB
21262015-11-23 Joel Brobecker <brobecker@adacore.com>
2127
2128 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2129 and Elf64_auxv_t if the target is Android.
2130
37ce4055
DE
21312015-11-22 Doug Evans <xdje42@gmail.com>
2132
2133 * target.h: #include <sys/types.h>.
2134
06e03fff
PA
21352015-11-19 Pedro Alves <palves@redhat.com>
2136
2137 * linux-low.c (linux_process_qsupported): Change prototype.
2138 Adjust.
2139 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2140 Change prototype.
2141 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2142 and adjust to loop over all features.
2143 * server.c (handle_query) <qSupported>: Adjust to call
2144 target_process_qsupported once, passing it a vector of unprocessed
2145 features.
2146 * target.h (struct target_ops) <process_qsupported>: Change
2147 prototype.
2148 (target_process_qsupported): Adjust.
2149
9a084706
PA
21502015-11-19 Pedro Alves <palves@redhat.com>
2151
2152 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2153 mode.
2154 * configure: Regenerate.
2155
dad44a1f
PA
21562015-11-19 Pedro Alves <palves@redhat.com>
2157
2158 * configure: Regenerate.
2159
231c0592
YQ
21602015-11-19 Yao Qi <yao.qi@linaro.org>
2161
2162 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2163 type to uint32_t.
2164
6c1c9a8b
YQ
21652015-11-19 Yao Qi <yao.qi@linaro.org>
2166
2167 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2168 (struct aarch64_operand): Move enum out.
2169
9caa3311
YQ
21702015-11-19 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2173 struct user_fpsimd_state *.
2174 (aarch64_store_fpregset): Likewise.
2175
6a69a054
YQ
21762015-11-19 Yao Qi <yao.qi@linaro.org>
2177
2178 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2179 struct user_pt_regs *.
2180 (aarch64_store_gregset): Likewise.
2181
1798301e
PA
21822015-11-18 Pedro Alves <palves@redhat.com>
2183
2184 * Makefile.in (all_object_files): Add $IPA_OBJS.
2185
ce7715e2
PA
21862015-11-17 Pedro Alves <palves@redhat.com>
2187
2188 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2189 GDB_SIGNAL_0 and gdb_signal_to_string.
2190
c0879059
PA
21912015-11-17 Pedro Alves <palves@redhat.com>
2192
2193 * win32-low.c (handle_output_debug_string): Remove parameter.
2194 (win32_kill): Remove our_status local and adjust call to
2195 handle_output_debug_string.
2196 (get_child_debug_event): Adjust call to
2197 handle_output_debug_string.
2198
1996e237
SM
21992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2200
2201 * linux-mips-low.c (mips_fill_gregset): Add cast.
2202 (mips_store_gregset): Likewise.
2203 (mips_fill_fpregset): Likewise.
2204 (mips_store_fpregset): Likewise.
2205
cbec665b
SM
22062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2207
2208 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2209 priv.
2210
eb3e3c67
SM
22112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2212
2213 * linux-mips-low.c (mips_linux_new_thread): Change type of
2214 watch_type to enum target_hw_bp_type.
2215
171de4b8
SM
22162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2217
2218 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2219 Change return type to arm_hwbp_type.
2220
04248ead
SM
22212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2222
2223 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2224 (arm_store_gregset): Likewise.
2225 * linux-arm-low.c (arm_get_hwcap): Likewise.
2226 (arm_read_description): Likewise.
2227
04b3479c
SM
22282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2229
2230 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2231
2bc84e8a
SM
22322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2233
2234 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2235 (ppc_fill_vsxregset): Likewise.
2236 (ppc_store_vsxregset): Likewise.
2237 (ppc_fill_vrregset): Likewise.
2238 (ppc_store_vrregset): Likewise.
2239 (ppc_fill_evrregset): Likewise.
2240 (ppc_store_evrregset): Likewise.
2241
e6c5bb05
SM
22422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2243
2244 * linux-ppc-low.c (ppc_usrregs_info): Remove
2245 forward-declaration.
2246 (ppc_arch_setup): Move lower in file.
2247
7ea45d72
SM
22482015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2249
2250 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2251 (ps_pdwrite): Likewise.
2252
69291610
HW
22532015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2254
2255 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2256 to after assert checks.
2257
b42945fd
SM
22582015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2259
2260 * proc-service.c (ps_pdread): Add/adjust casts.
2261 (ps_pdwrite): Add/adjust casts.
2262
d6f85c84
SM
22632015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2264
2265 * server.c (handle_search_memory_1): Cast return value of
2266 memmem.
2267
f98cd059
SM
22682015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2269
2270 * server.c (write_qxfer_response): Change type of data to
2271 gdb_byte *.
2272
d2412fa5
PA
22732015-10-29 Pedro Alves <palves@redhat.com>
2274
2275 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2276
c17414a2
PA
22772015-10-29 Pedro Alves <palves@redhat.com>
2278
2279 * tracepoint.c (clear_installed_tracepoints): Add casts.
2280
e053fbc4
PA
22812015-10-29 Pedro Alves <palves@redhat.com>
2282
2283 * server.c (handle_v_cont, process_serial_event): Add enum
2284 gdb_signal casts to signal parsing code.
2285
add67df8
PA
22862015-10-29 Pedro Alves <palves@redhat.com>
2287
2288 * linux-low.h (NULL_REGSET): Define.
2289 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2290 * linux-arm-low.c (arm_regsets): Likewise.
2291 * linux-crisv32-low.c (cris_regsets): Likewise.
2292 * linux-m68k-low.c (m68k_regsets): Likewise.
2293 * linux-mips-low.c (mips_regsets): Likewise.
2294 * linux-nios2-low.c (nios2_regsets): Likewise.
2295 * linux-ppc-low.c (ppc_regsets): Likewise.
2296 * linux-s390-low.c (s390_regsets): Likewise.
2297 * linux-sh-low.c (sh_regsets): Likewise.
2298 * linux-sparc-low.c (sparc_regsets): Likewise.
2299 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2300 * linux-tile-low.c (tile_regsets): Likewise.
2301 * linux-x86-low.c (x86_regsets): Likewise.
2302 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2303
50bc912a
PA
23042015-10-29 Pedro Alves <palves@redhat.com>
2305
2306 * linux-low.h (NULL_REGSET): Define.
2307 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2308 * linux-arm-low.c (arm_regsets): Likewise.
2309 * linux-crisv32-low.c (cris_regsets): Likewise.
2310 * linux-m68k-low.c (m68k_regsets): Likewise.
2311 * linux-mips-low.c (mips_regsets): Likewise.
2312 * linux-nios2-low.c (nios2_regsets): Likewise.
2313 * linux-ppc-low.c (ppc_regsets): Likewise.
2314 * linux-s390-low.c (s390_regsets): Likewise.
2315 * linux-sh-low.c (sh_regsets): Likewise.
2316 * linux-sparc-low.c (sparc_regsets): Likewise.
2317 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2318 * linux-tile-low.c (tile_regsets): Likewise.
2319 * linux-x86-low.c (x86_regsets): Likewise.
2320 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2321
682b2546
DE
23222015-10-26 Doug Evans <dje@google.com>
2323
2324 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2325
963843d4
DE
23262015-10-26 Doug Evans <dje@google.com>
2327
2328 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2329
d41401ac
DE
23302015-10-26 Doug Evans <dje@google.com>
2331
2332 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2333 for debug_printf.
2334 (attach_thread, find_new_threads_callback): Ditto.
2335
3db28855
AT
23362015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2337
2338 * mem-break.h (set_breakpoint_data): Remove.
2339
fb78e89c
AT
23402015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2341
2342 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2343 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2344 (initialize_low): Remove set_breakpoint_data call.
2345 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2346 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2347 (initialize_low): Remove set_breakpoint_data call.
2348 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2349 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2350 (initialize_low): Remove set_breakpoint_data call.
2351
2e6ee069
AT
23522015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2353
2354 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2355 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2356 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2357 * target.h (target_breakpoint_kind_from_pc): New macro.
2358
1652a986
AT
23592015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2360
2361 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2362 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2363 the default breakpoint kind.
2364
abeead09
AT
23652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2366
2367 * linux-arm-low.c (arm_supports_z_point_type): Add software
2368 breakpoint support.
2369
b0b4b501
AT
23702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * linux-arm-low.c: Refactor breakpoint definitions.
2373 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2374 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2375
8689682c
AT
23762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2377
2378 * Makefile.in: Add arm.c/o.
2379 * configure.srv: Likewise.
2380 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2381 (arm_breakpoint_kind_from_pc): New function.
2382 (arm_sw_breakpoint_from_kind): Return proper kind.
2383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2384
27165294
AT
23852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2386
2387 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2388 removal.
2389 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2390 (struct raw_breakpoint) <size>: Remove.
2391 (struct raw_breakpoint) <kind>: Add.
2392 (bp_size): New function.
2393 (bp_opcode): Likewise.
2394 (find_raw_breakpoint_at): Adjust for kind.
2395 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2396 (remove_memory_breakpoint): Adjust for kind call bp_size.
2397 (set_raw_breakpoint_at): Adjust for kind.
2398 (set_breakpoint): Likewise.
2399 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2400 (delete_raw_breakpoint): Adjust for kind.
2401 (delete_breakpoint): Likewise.
2402 (find_gdb_breakpoint): Likewise.
2403 (set_gdb_breakpoint_1): Likewise.
2404 (set_gdb_breakpoint): Likewise.
2405 (delete_gdb_breakpoint_1): Likewise.
2406 (delete_gdb_breakpoint): Likewise.
2407 (uninsert_raw_breakpoint): Likewise.
2408 (reinsert_raw_breakpoint): Likewise.
2409 (set_breakpoint_data): Remove.
2410 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2411 (check_mem_read): Adjust for kind call bp_size.
2412 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2413 (clone_one_breakpoint): Adjust for kind.
2414 * mem-break.h (set_gdb_breakpoint): Likewise.
2415 (delete_gdb_breakpoint): Likewise.
2416 * server.c (process_serial_event): Likewise.
2417
dd373349
AT
24182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2419
2420 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2421 (struct linux_target_ops) <breakpoint>: Remove.
2422 (struct linux_target_ops) <breakpoint_len>: Remove.
2423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2425 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2426 (arm_sw_breakpoint_from_kind): New function.
2427 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2428 (struct linux_target_ops) <breakpoint>: Remove.
2429 (struct linux_target_ops) <breakpoint_len>: Remove.
2430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2432 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2433 (struct linux_target_ops) <breakpoint>: Remove.
2434 (struct linux_target_ops) <breakpoint_len>: Remove.
2435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2437 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2438 (struct linux_target_ops) <breakpoint>: Remove.
2439 (struct linux_target_ops) <breakpoint_len>: Remove.
2440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2442 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2443 and sw_breakpoint_from_kind to increment the pc.
2444 (linux_breakpoint_kind_from_pc): New function.
2445 (linux_sw_breakpoint_from_kind): New function.
2446 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2447 (initialize_low): Call breakpoint_kind_from_pc and
2448 sw_breakpoint_from_kind to replace breakpoint_data/len.
2449 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2450 New field.
2451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2452 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2453 (struct linux_target_ops) <breakpoint>: Remove.
2454 (struct linux_target_ops) <breakpoint_len>: Remove.
2455 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2456 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2457 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2458 (struct linux_target_ops) <breakpoint>: Remove.
2459 (struct linux_target_ops) <breakpoint_len>: Remove.
2460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2462 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2463 (struct linux_target_ops) <breakpoint>: Remove.
2464 (struct linux_target_ops) <breakpoint_len>: Remove.
2465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2467 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2468 (struct linux_target_ops) <breakpoint>: Remove.
2469 (struct linux_target_ops) <breakpoint_len>: Remove.
2470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2471 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2472 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2473 (struct linux_target_ops) <breakpoint>: Remove.
2474 (struct linux_target_ops) <breakpoint_len>: Remove.
2475 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2476 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2477 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2478 (struct linux_target_ops) <breakpoint>: Remove.
2479 (struct linux_target_ops) <breakpoint_len>: Remove.
2480 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2482 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2483 (struct linux_target_ops) <breakpoint>: Remove.
2484 (struct linux_target_ops) <breakpoint_len>: Remove.
2485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2487 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2488 (struct linux_target_ops) <breakpoint>: Remove.
2489 (struct linux_target_ops) <breakpoint_len>: Remove.
2490 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2491 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2492 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2493 (struct linux_target_ops) <breakpoint>: Remove.
2494 (struct linux_target_ops) <breakpoint_len>: Remove.
2495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2497 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2498 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2499 (struct linux_target_ops) <breakpoint>: Remove.
2500 (struct linux_target_ops) <breakpoint_len>: Remove.
2501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2503 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2504 (struct linux_target_ops) <breakpoint>: Remove.
2505 (struct linux_target_ops) <breakpoint_len>: Remove.
2506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2508
4cd98a19
AT
25092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2510
2511 * linux-cris-low.c (cris_get_pc): Remove void arg.
2512
774ee6d2
AR
25132015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2514
2515 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2516 variable name.
2517
833dcd29
AR
25182015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2519
2520 * inferiors.c (thread_pid_matches_callback): New function.
2521 (find_thread_process): New function.
2522 (remove_thread): Reset current_thread.
2523 (remove_process): Assert threads have been removed first.
2524
8d689ee5
YQ
25252015-10-15 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2528 if it is 3.
2529 (aarch64_remove_point): Likewise.
2530 * regcache.c (regcache_register_size): New function.
2531
1c2e1515
YQ
25322015-10-12 Yao Qi <yao.qi@linaro.org>
2533
2534 * linux-aarch64-low.c: Update all callers as emit_load_store
2535 is renamed to aarch64_emit_load_store.
2536
e1c587c3
YQ
25372015-10-12 Yao Qi <yao.qi@linaro.org>
2538
2539 * linux-aarch64-low.c: Update all callers of function renaming
2540 from emit_insn to aarch64_emit_insn.
2541
b6542f81
YQ
25422015-10-12 Yao Qi <yao.qi@linaro.org>
2543
2544 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2545 arch/aarch64-insn.h.
2546 (struct aarch64_memory_operand): Likewise.
2547 (ENCODE): Likewise.
2548 (emit_insn): Move to arch/aarch64-insn.c.
2549 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2550 (emit_load_store): Move to arch/aarch64-insn.c.
2551 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2552 (can_encode_int32): Remove.
2553
246994ce
YQ
25542015-10-12 Yao Qi <yao.qi@linaro.org>
2555
2556 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2557 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2558 (aarch64_relocate_instruction): Likewise.
2559 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2560 (struct aarch64_insn_visitor): Likewise.
2561
0badd99f
YQ
25622015-10-12 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2565 (struct aarch64_insn_visitor): New.
2566 (struct aarch64_insn_relocation_data): New.
2567 (aarch64_ftrace_insn_reloc_b): New function.
2568 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2569 (aarch64_ftrace_insn_reloc_cb): Likewise.
2570 (aarch64_ftrace_insn_reloc_tb): Likewise.
2571 (aarch64_ftrace_insn_reloc_adr): Likewise.
2572 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2573 (aarch64_ftrace_insn_reloc_others): Likewise.
2574 (visitor): New.
2575 (aarch64_relocate_instruction): Use visitor.
2576
dfaffe9d
YQ
25772015-10-12 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2580 int. Add argument buf.
2581 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2582 aarch64_relocate_instruction.
2583
70b439f0
YQ
25842015-10-12 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2587 argument insn. Remove local variable insn. Don't call
2588 target_read_uint32.
2589 (aarch64_install_fast_tracepoint_jump_pad): Call
2590 target_read_uint32.
2591
7781c06f
YQ
25922015-09-30 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2595 (emit_load_store_pair): Likewise.
2596
9a3c8263
SM
25972015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2598
2599 * dll.c (match_dll): Add cast(s).
2600 (unloaded_dll): Likewise.
2601 * linux-low.c (second_thread_of_pid_p): Likewise.
2602 (delete_lwp_callback): Likewise.
2603 (count_events_callback): Likewise.
2604 (select_event_lwp_callback): Likewise.
2605 (linux_set_resume_request): Likewise.
2606 * server.c (accumulate_file_name_length): Likewise.
2607 (emit_dll_description): Likewise.
2608 (handle_qxfer_threads_worker): Likewise.
2609 (visit_actioned_threads): Likewise.
2610 * thread-db.c (any_thread_of): Likewise.
2611 * tracepoint.c (same_process_p): Likewise.
2612 (match_blocktype): Likewise.
2613 (build_traceframe_info_xml): Likewise.
2614
224c3ddb
SM
26152015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2616
2617 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2618 assignment.
2619 (gdb_unparse_agent_expr): Likewise.
2620 * hostio.c (require_data): Likewise.
2621 (handle_pread): Likewise.
2622 * linux-low.c (disable_regset): Likewise.
2623 (fetch_register): Likewise.
2624 (store_register): Likewise.
2625 (get_dynamic): Likewise.
2626 (linux_qxfer_libraries_svr4): Likewise.
2627 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2628 (set_fast_tracepoint_jump): Likewise.
2629 (uninsert_fast_tracepoint_jumps_at): Likewise.
2630 (reinsert_fast_tracepoint_jumps_at): Likewise.
2631 (validate_inserted_breakpoint): Likewise.
2632 (clone_agent_expr): Likewise.
2633 * regcache.c (init_register_cache): Likewise.
2634 * remote-utils.c (putpkt_binary_1): Likewise.
2635 (decode_M_packet): Likewise.
2636 (decode_X_packet): Likewise.
2637 (look_up_one_symbol): Likewise.
2638 (relocate_instruction): Likewise.
2639 (monitor_output): Likewise.
2640 * server.c (handle_search_memory): Likewise.
2641 (handle_qxfer_exec_file): Likewise.
2642 (handle_qxfer_libraries): Likewise.
2643 (handle_qxfer): Likewise.
2644 (handle_query): Likewise.
2645 (handle_v_cont): Likewise.
2646 (handle_v_run): Likewise.
2647 (captured_main): Likewise.
2648 * target.c (write_inferior_memory): Likewise.
2649 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2650 * tracepoint.c (init_trace_buffer): Likewise.
2651 (add_tracepoint_action): Likewise.
2652 (add_traceframe): Likewise.
2653 (add_traceframe_block): Likewise.
2654 (cmd_qtdpsrc): Likewise.
2655 (cmd_qtdv): Likewise.
2656 (cmd_qtstatus): Likewise.
2657 (response_source): Likewise.
2658 (response_tsv): Likewise.
2659 (cmd_qtnotes): Likewise.
2660 (gdb_collect): Likewise.
2661 (initialize_tracepoint): Likewise.
2662
afbe19f8
PL
26632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2664
2665 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2666 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2667 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2668 <NOP>: New.
2669 (enum aarch64_condition_codes): New enum.
2670 (w0): New static global.
2671 (fp): Likewise.
2672 (lr): Likewise.
2673 (struct aarch64_memory_operand) <type>: New
2674 MEMORY_OPERAND_POSTINDEX type.
2675 (postindex_memory_operand): New helper function.
2676 (emit_ret): New function.
2677 (emit_load_store_pair): New function, factored out of emit_stp
2678 with support for MEMORY_OPERAND_POSTINDEX.
2679 (emit_stp): Rewrite using emit_load_store_pair.
2680 (emit_ldp): New function.
2681 (emit_load_store): Likewise.
2682 (emit_ldr): Mention post-index instruction in comment.
2683 (emit_ldrh): New function.
2684 (emit_ldrb): New function.
2685 (emit_ldrsw): Mention post-index instruction in comment.
2686 (emit_str): Likewise.
2687 (emit_subs): New function.
2688 (emit_cmp): Likewise.
2689 (emit_and): Likewise.
2690 (emit_orr): Likewise.
2691 (emit_orn): Likewise.
2692 (emit_eor): Likewise.
2693 (emit_mvn): Likewise.
2694 (emit_lslv): Likewise.
2695 (emit_lsrv): Likewise.
2696 (emit_asrv): Likewise.
2697 (emit_mul): Likewise.
2698 (emit_sbfm): Likewise.
2699 (emit_sbfx): Likewise.
2700 (emit_ubfm): Likewise.
2701 (emit_ubfx): Likewise.
2702 (emit_csinc): Likewise.
2703 (emit_cset): Likewise.
2704 (emit_nop): Likewise.
2705 (emit_ops_insns): New helper function.
2706 (emit_pop): Likewise.
2707 (emit_push): Likewise.
2708 (aarch64_emit_prologue): New function.
2709 (aarch64_emit_epilogue): Likewise.
2710 (aarch64_emit_add): Likewise.
2711 (aarch64_emit_sub): Likewise.
2712 (aarch64_emit_mul): Likewise.
2713 (aarch64_emit_lsh): Likewise.
2714 (aarch64_emit_rsh_signed): Likewise.
2715 (aarch64_emit_rsh_unsigned): Likewise.
2716 (aarch64_emit_ext): Likewise.
2717 (aarch64_emit_log_not): Likewise.
2718 (aarch64_emit_bit_and): Likewise.
2719 (aarch64_emit_bit_or): Likewise.
2720 (aarch64_emit_bit_xor): Likewise.
2721 (aarch64_emit_bit_not): Likewise.
2722 (aarch64_emit_equal): Likewise.
2723 (aarch64_emit_less_signed): Likewise.
2724 (aarch64_emit_less_unsigned): Likewise.
2725 (aarch64_emit_ref): Likewise.
2726 (aarch64_emit_if_goto): Likewise.
2727 (aarch64_emit_goto): Likewise.
2728 (aarch64_write_goto_address): Likewise.
2729 (aarch64_emit_const): Likewise.
2730 (aarch64_emit_call): Likewise.
2731 (aarch64_emit_reg): Likewise.
2732 (aarch64_emit_pop): Likewise.
2733 (aarch64_emit_stack_flush): Likewise.
2734 (aarch64_emit_zero_ext): Likewise.
2735 (aarch64_emit_swap): Likewise.
2736 (aarch64_emit_stack_adjust): Likewise.
2737 (aarch64_emit_int_call_1): Likewise.
2738 (aarch64_emit_void_call_2): Likewise.
2739 (aarch64_emit_eq_goto): Likewise.
2740 (aarch64_emit_ne_goto): Likewise.
2741 (aarch64_emit_lt_goto): Likewise.
2742 (aarch64_emit_le_goto): Likewise.
2743 (aarch64_emit_gt_goto): Likewise.
2744 (aarch64_emit_ge_got): Likewise.
2745 (aarch64_emit_ops_impl): New static global variable.
2746 (aarch64_emit_ops): New target function, return
2747 &aarch64_emit_ops_impl.
2748 (struct linux_target_ops): Install it.
2749
bb903df0
PL
27502015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2751
2752 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2753 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2754 aarch64-ipa.o.
2755 * linux-aarch64-ipa.c: New file.
2756 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2757 and endian.h.
2758 (aarch64_get_thread_area): New target method.
2759 (extract_signed_bitfield): New helper function.
2760 (aarch64_decode_ldr_literal): New function.
2761 (enum aarch64_opcodes): New enum.
2762 (struct aarch64_register): New struct.
2763 (struct aarch64_operand): New struct.
2764 (x0): New static global.
2765 (x1): Likewise.
2766 (x2): Likewise.
2767 (x3): Likewise.
2768 (x4): Likewise.
2769 (w2): Likewise.
2770 (ip0): Likewise.
2771 (sp): Likewise.
2772 (xzr): Likewise.
2773 (aarch64_register): New helper function.
2774 (register_operand): Likewise.
2775 (immediate_operand): Likewise.
2776 (struct aarch64_memory_operand): New struct.
2777 (offset_memory_operand): New helper function.
2778 (preindex_memory_operand): Likewise.
2779 (enum aarch64_system_control_registers): New enum.
2780 (ENCODE): New macro.
2781 (emit_insn): New helper function.
2782 (emit_b): New function.
2783 (emit_bcond): Likewise.
2784 (emit_cb): Likewise.
2785 (emit_tb): Likewise.
2786 (emit_blr): Likewise.
2787 (emit_stp): Likewise.
2788 (emit_ldp_q_offset): Likewise.
2789 (emit_stp_q_offset): Likewise.
2790 (emit_load_store): Likewise.
2791 (emit_ldr): Likewise.
2792 (emit_ldrsw): Likewise.
2793 (emit_str): Likewise.
2794 (emit_ldaxr): Likewise.
2795 (emit_stxr): Likewise.
2796 (emit_stlr): Likewise.
2797 (emit_data_processing_reg): Likewise.
2798 (emit_data_processing): Likewise.
2799 (emit_add): Likewise.
2800 (emit_sub): Likewise.
2801 (emit_mov): Likewise.
2802 (emit_movk): Likewise.
2803 (emit_mov_addr): Likewise.
2804 (emit_mrs): Likewise.
2805 (emit_msr): Likewise.
2806 (emit_sevl): Likewise.
2807 (emit_wfe): Likewise.
2808 (append_insns): Likewise.
2809 (can_encode_int32_in): New helper function.
2810 (aarch64_relocate_instruction): New function.
2811 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2812 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2813 (struct linux_target_ops): Install aarch64_get_thread_area,
2814 aarch64_install_fast_tracepoint_jump_pad and
2815 aarch64_get_min_fast_tracepoint_insn_len.
2816
787749ea
PL
28172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2818
2819 * Makefile.in (aarch64-insn.o): New rule.
2820 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2821
9812b2e6
YQ
28222015-09-21 Yao Qi <yao.qi@linaro.org>
2823
2824 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2825
18fe412b
YQ
28262015-09-21 Yao Qi <yao.qi@linaro.org>
2827
2828 * tracepoint.c (max_jump_pad_size): Remove.
2829
a0cc84cd
YQ
28302015-09-18 Yao Qi <yao.qi@linaro.org>
2831
2832 * linux-aarch64-low.c: Don't include sys/uio.h.
2833 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2834
d78908cf
WW
28352015-09-16 Wei-cheng Wang <cole945@gmail.com>
2836
2837 * tracepoint.c (eval_result_type): Change prototype.
2838 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2839
d57e0d50
PA
28402015-09-15 Pedro Alves <palves@redhat.com>
2841
2842 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2843 Check whether to report exec events instead of checking whether
2844 multiprocess is enabled.
2845
5a676acc
PA
28462015-09-15 Pedro Alves <palves@redhat.com>
2847
2848 PR remote/18965
2849 * remote-utils.c (prepare_resume_reply): Merge
2850 TARGET_WAITKIND_VFORK_DONE switch case with the
2851 TARGET_WAITKIND_FORKED case.
2852
7c5d0fad
YQ
28532015-09-15 Yao Qi <yao.qi@linaro.org>
2854
2855 * server.c (handle_query): Check string comparison using
2856 "else if" instead of "if".
2857
750ce8d1
YQ
28582015-09-15 Yao Qi <yao.qi@linaro.org>
2859
2860 * server.c (vCont_supported): New global variable.
2861 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2862 matches. Append ";vContSupported+" to own_buf.
2863 (handle_v_requests): Append ";s;S" to own_buf if target supports
2864 hardware single step or vCont_supported is false.
2865 (capture_main): Set vCont_supported to zero.
2866
70b90b91
YQ
28672015-09-15 Yao Qi <yao.qi@linaro.org>
2868
2869 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2870 it to ...
2871 (linux_supports_hardware_single_step): ... New function.
2872 (linux_target_ops): Update.
2873 * lynx-low.c (lynx_target_ops): Set field
2874 supports_hardware_single_step to target_can_do_hardware_single_step.
2875 * nto-low.c (nto_target_ops): Likewise.
2876 * spu-low.c (spu_target_ops): Likewise.
2877 * win32-low.c (win32_target_ops): Likewise.
2878 * target.c (target_can_do_hardware_single_step): New function.
2879 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2880 Remove. <supports_hardware_single_step>: New field.
2881 (target_supports_conditional_breakpoints): Remove.
2882 (target_supports_hardware_single_step): New macro.
2883 (target_can_do_hardware_single_step): Declare.
2884 * server.c (handle_query): Use target_supports_hardware_single_step
2885 instead of target_supports_conditional_breakpoints.
2886
ade90bde
YQ
28872015-09-15 Yao Qi <yao.qi@linaro.org>
2888
2889 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2890 function.
2891 (struct linux_target_ops the_low_target): Install
2892 aarch64_linux_siginfo_fixup.
2893
94585166
DB
28942015-09-11 Don Breazeal <donb@codesourcery.com>
2895 Luis Machado <lgustavo@codesourcery.com>
2896
2897 * linux-low.c (linux_mourn): Static declaration.
2898 (linux_arch_setup): Move in front of
2899 handle_extended_wait.
2900 (linux_arch_setup_thread): New function.
2901 (handle_extended_wait): Handle exec events. Call
2902 linux_arch_setup_thread. Make event_lwp argument a
2903 pointer-to-a-pointer.
2904 (check_zombie_leaders): Do not check stopped threads.
2905 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2906 (linux_low_filter_event): Add lwp and thread for exec'ing
2907 non-leader thread if leader thread has been deleted.
2908 Refactor code into linux_arch_setup_thread and call it.
2909 Pass child lwp pointer by reference to handle_extended_wait.
2910 (linux_wait_for_event_filtered): Update comment.
2911 (linux_wait_1): Prevent clobbering exec event status.
2912 (linux_supports_exec_events): New function.
2913 (linux_target_ops) <supports_exec_events>: Initialize new member.
2914 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2915 new member.
2916 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2917 * server.c (report_exec_events): New global variable.
2918 (handle_query): Handle qSupported query for exec-events feature.
2919 (captured_main): Initialize report_exec_events.
2920 * server.h (report_exec_events): Declare new global variable.
2921 * target.h (struct target_ops) <supports_exec_events>: New
2922 member.
2923 (target_supports_exec_events): New macro.
2924 * win32-low.c (win32_target_ops) <supports_exec_events>:
2925 Initialize new member.
2926
0568462b
MM
29272015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2928
2929 * linux-low.c (linux_low_enable_btrace): Remove.
2930 (linux_target_ops): Replace linux_low_enable_btrace with
2931 linux_enable_btrace.
2932
39edd165
YQ
29332015-09-03 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-aarch64-low.c (aarch64_insert_point): Call
2936 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2937 returns true.
2938
1db33b5a
UW
29392015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2940
2941 * linux-low.c (check_stopped_by_breakpoint): Use
2942 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2943
ab290430
PA
29442015-08-27 Pedro Alves <palves@redhat.com>
2945
2946 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2947
8d749320
SM
29482015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2949
6711b7f8
SM
2950 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2951 the XNEW-family equivalent.
8d749320
SM
2952 (compile_bytecodes): Likewise.
2953 * dll.c (loaded_dll): Likewise.
2954 * event-loop.c (append_callback_event): Likewise.
2955 (create_file_handler): Likewise.
2956 (create_file_event): Likewise.
2957 * hostio.c (handle_open): Likewise.
2958 * inferiors.c (add_thread): Likewise.
2959 (add_process): Likewise.
2960 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2961 * linux-arm-low.c (arm_new_process): Likewise.
2962 (arm_new_thread): Likewise.
2963 * linux-low.c (add_to_pid_list): Likewise.
2964 (linux_add_process): Likewise.
2965 (handle_extended_wait): Likewise.
2966 (add_lwp): Likewise.
2967 (enqueue_one_deferred_signal): Likewise.
2968 (enqueue_pending_signal): Likewise.
2969 (linux_resume_one_lwp_throw): Likewise.
2970 (linux_resume_one_thread): Likewise.
2971 (linux_read_memory): Likewise.
2972 (linux_write_memory): Likewise.
2973 * linux-mips-low.c (mips_linux_new_process): Likewise.
2974 (mips_linux_new_thread): Likewise.
2975 (mips_add_watchpoint): Likewise.
2976 * linux-x86-low.c (initialize_low_arch): Likewise.
2977 * lynx-low.c (lynx_add_process): Likewise.
2978 * mem-break.c (set_raw_breakpoint_at): Likewise.
2979 (set_breakpoint): Likewise.
2980 (add_condition_to_breakpoint): Likewise.
2981 (add_commands_to_breakpoint): Likewise.
2982 (clone_agent_expr): Likewise.
2983 (clone_one_breakpoint): Likewise.
2984 * regcache.c (new_register_cache): Likewise.
2985 * remote-utils.c (look_up_one_symbol): Likewise.
2986 * server.c (queue_stop_reply): Likewise.
2987 (start_inferior): Likewise.
2988 (queue_stop_reply_callback): Likewise.
2989 (handle_target_event): Likewise.
2990 * spu-low.c (fetch_ppc_memory): Likewise.
2991 (store_ppc_memory): Likewise.
2992 * target.c (set_target_ops): Likewise.
2993 * thread-db.c (thread_db_load_search): Likewise.
2994 (try_thread_db_load_1): Likewise.
2995 * tracepoint.c (add_tracepoint): Likewise.
2996 (add_tracepoint_action): Likewise.
2997 (create_trace_state_variable): Likewise.
2998 (cmd_qtdpsrc): Likewise.
2999 (cmd_qtro): Likewise.
3000 (add_while_stepping_state): Likewise.
3001 * win32-low.c (child_add_thread): Likewise.
3002 (get_image_name): Likewise.
3003
ed8b7b42
YQ
30042015-08-25 Yao Qi <yao.qi@linaro.org>
3005
3006 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3007
db3cb7cb
YQ
30082015-08-25 Yao Qi <yao.qi@linaro.org>
3009
3010 * Makefile.in (aarch64-linux.o): New rule.
3011 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3012 srv_tgtobj.
3013 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3014 (aarch64_init_debug_reg_state): Make it extern.
3015 (aarch64_linux_prepare_to_resume): Remove.
3016
f6011a1c
YQ
30172015-08-25 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3020 lwp_arch_private_info and ptid_of_lwp.
3021
88e2cf7e
YQ
30222015-08-25 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3025 Find proc_info by find_process_pid. All callers updated.
3026
5e35436e
YQ
30272015-08-25 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3030 Remove.
3031 (debug_reg_change_callback): Remove.
3032 (aarch64_notify_debug_reg_change): Remove.
3033
4a8a7965
YQ
30342015-08-25 Yao Qi <yao.qi@linaro.org>
3035
3036 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3037 Call current_lwp_ptid.
3038
32a271ee
YQ
30392015-08-25 Yao Qi <yao.qi@linaro.org>
3040
3041 * linux-aarch64-low.c (debug_reg_change_callback): Use
3042 debug_printf.
3043
0d51c8d7
YQ
30442015-08-25 Yao Qi <yao.qi@linaro.org>
3045
3046 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3047
31a43dd5
YQ
30482015-08-25 Yao Qi <yao.qi@linaro.org>
3049
3050 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3051
8ee52567
YQ
30522015-08-25 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3055 the code.
3056
ff3f0f45
YQ
30572015-08-25 Yao Qi <yao.qi@linaro.org>
3058
3059 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3060 Remove.
3061 (debug_reg_change_callback): Remove argument entry and add argument
3062 lwp. Remove local variable thread. Don't print thread id in the
3063 debugging output. Don't check whether pid of thread equals to pid.
3064 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3065 iterate_over_lwps instead find_inferior.
3066
3d40fbb5
PA
30672015-08-24 Pedro Alves <palves@redhat.com>
3068
3069 * inferiors.c (get_first_process): New function.
3070 * inferiors.h (get_first_process): New declaration.
3071 * remote-utils.c (read_ptid): Default to the first process in the
3072 list, instead of to the current thread's process.
3073
438e1e42
PA
30742015-08-24 Pedro Alves <palves@redhat.com>
3075
3076 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3077 * event-loop.c: Likewise.
3078 * remote-utils.c: Likewise.
3079 * tracepoint.c: Likewise.
3080
a8c6d4fc
PA
30812015-08-24 Pedro Alves <palves@redhat.com>
3082
3083 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3084 ptid_get_lwp.
3085
99b0bb12
PA
30862015-08-21 Pedro Alves <palves@redhat.com>
3087
3088 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3089 instead of literal 1.
3090
f8904751
PA
30912015-08-21 Pedro Alves <palves@redhat.com>
3092
3093 * tdesc.c (default_description): Explicitly zero-initialize.
3094
465a859e
PA
30952015-08-21 Pedro Alves <palves@redhat.com>
3096
3097 PR gdb/18749
3098 * inferiors.c (remove_thread): Discard any pending stop reply for
3099 this thread.
3100 * server.c (remove_all_on_match_pid): Rename to ...
3101 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3102 instead of a pid.
3103 (discard_queued_stop_replies): Change parameter to a ptid. Now
3104 extern.
3105 (handle_v_kill, kill_inferior_callback, captured_main)
3106 (process_serial_event): Adjust.
3107 * server.h (discard_queued_stop_replies): Declare.
3108
f0db101d
PA
31092015-08-21 Pedro Alves <palves@redhat.com>
3110
3111 * linux-low.c (wait_for_sigstop): Always switch to no thread
3112 selected if the previously current thread dies.
3113 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3114 process instead of the current thread's.
3115 * remote-utils.c (input_interrupt): Don't check if there's no
3116 current thread.
3117 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3118 current thread to the general thread fails, error out.
3119 (handle_qxfer_auxv, handle_qxfer_libraries)
3120 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3121 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3122 (handle_query): Check if there's a thread selected instead of
3123 checking whether there's any thread in the thread list.
3124 (handle_qxfer_threads, handle_qxfer_btrace)
3125 (handle_qxfer_btrace_conf): Don't error out early if there's no
3126 thread in the thread list.
3127 (handle_v_cont, myresume): Don't set the current thread to the
3128 continue thread.
3129 (process_serial_event) <Hg handling>: Also set thread_id if the
3130 previous general thread is still alive.
3131 (process_serial_event) <g/G handling>: If setting the current
3132 thread to the general thread fails, error out.
3133 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3134 thread's lwp instead of the current thread's.
3135 * target.c (set_desired_thread): If the desired thread was not
3136 found, leave the current thread pointing to NULL. Return an int
3137 (boolean) indicating success.
3138 * target.h (set_desired_thread): Change return type to int.
3139
40045d91
MF
31402015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3141
3142 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3143 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3144 #includes.
3145 (ps_get_thread_area): New function.
3146
45face3b
GB
31472015-08-19 Gary Benson <gbenson@redhat.com>
3148
3149 * hostio.c (handle_pread): Do not attempt to read more data
3150 than hostio_reply_with_data can fit in a packet.
3151
16d5f642
JB
31522015-08-18 Joel Brobecker <brobecker@adacore.com>
3153
3154 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3155
a738da3a
MF
31562015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3157
3158 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3159
33ebda9d
PA
31602015-08-06 Pedro Alves <palves@redhat.com>
3161
3162 * tracepoint.c (expr_eval_result): Now an int.
3163
a44892be
PA
31642015-08-06 Pedro Alves <palves@redhat.com>
3165
3166 * gdbthread.h (struct regcache): Forward declare.
3167 (struct thread_info) <regcache_data>: Now a struct regcache
3168 pointer.
3169 * inferiors.c (inferior_regcache_data)
3170 (set_inferior_regcache_data): Now work with struct regcache
3171 pointers.
3172 * inferiors.h (struct regcache): Forward declare.
3173 (inferior_regcache_data, set_inferior_regcache_data): Now work
3174 with struct regcache pointers.
3175 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3176 (free_register_cache_thread): Remove struct regcache pointer
3177 casts.
3178
608a1e46
PA
31792015-08-06 Pedro Alves <palves@redhat.com>
3180
3181 * server.c (captured_main): On error, print the exception message
3182 to stderr, and if run_once is set, throw a quit.
3183
f0ce0d3a
PA
31842015-08-06 Pedro Alves <palves@redhat.com>
3185
3186 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3187 the current thread.
3188
bf47e248
PA
31892015-08-06 Pedro Alves <palves@redhat.com>
3190
3191 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3192 reading beyond the passed in buffer length.
3193
b6b9ffcc
PL
31942015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3195
3196 * tracepoint.c (symbol_list) <required>: Remove.
3197
863d01bd
PA
31982015-08-06 Pedro Alves <palves@redhat.com>
3199
3200 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3201 count if stopping and suspending threads.
3202 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3203 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3204 (linux_detach): Complete an ongoing step-over.
3205 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3206 throughout.
3207 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3208 (linux_wait_1): If passing a signal to the inferior after
3209 finishing a step-over, unsuspend and re-resume all lwps. If we
3210 see a single-step event but the thread should be continuing, don't
3211 pass the trap to gdb.
3212 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3213 internal_error instead of gdb_assert.
3214 (enqueue_pending_signal): New function.
3215 (check_ptrace_stopped_lwp_gone): Add debug output.
3216 (start_step_over): Use internal_error instead of gdb_assert.
3217 (complete_ongoing_step_over): New function.
3218 (linux_resume_one_thread): Don't resume a suspended thread.
3219 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3220 it stepping.
3221
00db26fa
PA
32222015-08-06 Pedro Alves <palves@redhat.com>
3223
3224 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3225 (linux_thread_alive): Use lwp_is_marked_dead.
3226 (extended_event_reported): Delete.
3227 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3228 instead of extended_event_reported.
3229 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3230 as well.
3231 (lwp_is_marked_dead): New function.
3232 (lwp_running): Use lwp_is_marked_dead.
3233 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3234 comment.
3235
ad071a30
PA
32362015-08-06 Pedro Alves <palves@redhat.com>
3237
3238 * linux-low.c (linux_wait_1): Move fork event output out of the
3239 !report_to_gdb check. Pass event_child->waitstatus to
3240 target_waitstatus_to_string instead of ourstatus.
3241
524b57e6
YQ
32422015-08-04 Yao Qi <yao.qi@linaro.org>
3243
3244 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3245 if current_thread is 32 bit.
3246
6085d6f6
YQ
32472015-08-04 Yao Qi <yao.qi@linaro.org>
3248
3249 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3250 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3251 * server.c (extended_protocol): Remove "static".
3252 * server.h (extended_protocol): Declare it.
3253
8a7e4587
YQ
32542015-08-04 Yao Qi <yao.qi@linaro.org>
3255
3256 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3257 both aarch64 and aarch32.
3258 (aarch64_set_pc): Likewise.
3259
3b53ae99
YQ
32602015-08-04 Yao Qi <yao.qi@linaro.org>
3261
3262 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3263 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3264 arm-with-neon.xml to srv_xmlfiles.
3265 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3266 (is_64bit_tdesc): New function.
3267 (aarch64_linux_read_description): New function.
3268 (aarch64_arch_setup): Call aarch64_linux_read_description.
3269 (regs_info): Rename to regs_info_aarch64.
3270 (aarch64_regs_info): Return right regs_info.
3271 (initialize_low_arch): Call initialize_low_arch_aarch32.
3272
bd9e6534
YQ
32732015-08-04 Yao Qi <yao.qi@linaro.org>
3274
3275 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3276 * linux-aarch32-low.c: New file.
3277 * linux-aarch32-low.h: New file.
3278 * linux-arm-low.c (arm_fill_gregset): Move it to
3279 linux-aarch32-low.c.
3280 (arm_store_gregset): Likewise.
3281 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3282 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3283 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3284 (regs_info): Rename to regs_info_arm.
3285 (arm_regs_info): Return regs_info_aarch32 if
3286 have_ptrace_getregset is 1 and target description is
3287 arm_with_neon or arm_with_vfpv3.
3288 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3289 Call initialize_low_arch_aarch32 instead.
3290
ded48a5e
YQ
32912015-08-04 Yao Qi <yao.qi@linaro.org>
3292
3293 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3294 * linux-low.c: ... here.
3295 * linux-low.h (have_ptrace_getregset): Declare it.
3296
96e9210f
PA
32972015-08-04 Pedro Alves <palves@redhat.com>
3298
3299 * thread-db.c (struct thread_db): Use new typedefs.
3300 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3301 CHK calls.
3302 (disable_thread_event_reporting): Cast result of dlsym to
3303 destination function pointer type.
3304 (thread_db_mourn): Use td_ta_delete_ftype.
3305
af60a1ef
SL
33062015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3307
3308 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3309 arch variant.
3310 (CDX_BREAKPOINT): Define for R2.
3311 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3312 (the_low_target): Add comments.
3313
e8b41681
YQ
33142015-07-30 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-arm-low.c (arm_hwcap): Remove it.
3317 (arm_read_description): New local variable arm_hwcap. Don't
3318 set arm_hwcap to zero.
3319
89abb039
YQ
33202015-07-30 Yao Qi <yao.qi@linaro.org>
3321
3322 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3323 Use regcache->tdesc instead.
3324 (arm_store_wmmxregset): Likewise.
3325 (arm_fill_vfpregset): Likewise.
3326 (arm_store_vfpregset): Likewise.
3327
deca266c
YQ
33282015-07-30 Yao Qi <yao.qi@linaro.org>
3329
3330 * linux-arm-low.c: Include arch/arm.h.
3331 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3332 (arm_store_gregset): Likewise.
3333
aa58a496
SM
33342015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3335
3336 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3337 ptrace's 4th parameter.
3338
50904b25
YQ
33392015-07-27 Yao Qi <yao.qi@linaro.org>
3340
3341 * configure.srv (case aarch64*-*-linux*): Don't set
3342 srv_linux_usrregs.
3343
5826e159
PA
33442015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3345
3346 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3347 sys/ptrace.h.
3348 * linux-arm-low.c: Likewise.
3349 * linux-cris-low.c: Likewise.
3350 * linux-crisv32-low.c: Likewise.
3351 * linux-low.c: Likewise.
3352 * linux-m68k-low.c: Likewise.
3353 * linux-mips-low.c: Likewise.
3354 * linux-nios2-low.c: Likewise.
3355 * linux-s390-low.c: Likewise.
3356 * linux-sparc-low.c: Likewise.
3357 * linux-tic6x-low.c: Likewise.
3358 * linux-tile-low.c: Likewise.
3359 * linux-x86-low.c: Likewise.
3360
54019719
PA
33612015-07-24 Pedro Alves <palves@redhat.com>
3362
3363 * config.in: Regenerate.
3364 * configure: Regenerate.
3365
eb7aa561
PA
33662015-07-24 Pedro Alves <palves@redhat.com>
3367
3368 * acinclude.m4: Include ../ptrace.m4.
3369 * configure.ac: Call GDB_AC_PTRACE.
3370 * config.in, configure: Regenerate.
3371
55d7b841
YQ
33722015-07-24 Yao Qi <yao.qi@linaro.org>
3373
3374 * linux-low.c (linux_create_inferior): Remove setting to
3375 proc->priv->new_inferior.
3376 (linux_attach): Likewise.
3377 (linux_low_filter_event): Likewise.
3378 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3379
c06cbd92
YQ
33802015-07-24 Yao Qi <yao.qi@linaro.org>
3381
3382 * linux-low.c (linux_arch_setup): New function.
3383 (linux_low_filter_event): If proc->tdesc is NULL and
3384 proc->attached is true, call the_low_target.arch_setup.
3385 Otherwise, keep status pending, and return.
3386 (linux_resume_one_lwp_throw): Don't call get_pc if
3387 thread->while_stepping isn't NULL. Don't call
3388 get_thread_regcache if proc->tdesc is NULL.
3389 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3390 (linux_target_ops): Install arch_setup.
3391 * server.c (start_inferior): Call the_target->arch_setup.
3392 * target.h (struct target_ops) <arch_setup>: New field.
3393 (target_arch_setup): New marco.
3394 * lynx-low.c (lynx_target_ops): Update.
3395 * nto-low.c (nto_target_ops): Update.
3396 * spu-low.c (spu_target_ops): Update.
3397 * win32-low.c (win32_target_ops): Update.
3398
5ae3ebba
YQ
33992015-07-24 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-low.c (linux_add_process): Don't set
3402 proc->priv->new_inferior.
3403 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3404 (linux_attach): Likewise.
3405
eb97750b
YQ
34062015-07-24 Yao Qi <yao.qi@linaro.org>
3407
3408 * server.c (start_inferior): Code refactor.
3409
51aee833
YQ
34102015-07-24 Yao Qi <yao.qi@linaro.org>
3411
3412 * server.c (process_serial_event): Set general_thread.
3413
af1b22f3
YQ
34142015-07-21 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3417 aarch64_linux_get_debug_reg_capacity.
3418
554717a3
YQ
34192015-07-17 Yao Qi <yao.qi@linaro.org>
3420
3421 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3422 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3423 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3424 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3425 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3426 (AARCH64_HWP_ALIGNMENT): Likewise.
3427 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3428 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3429 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3430 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3431 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3432 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3433 (struct aarch64_debug_reg_state): Likewise.
3434 (struct arch_lwp_info): Likewise.
3435 (aarch64_align_watchpoint): Likewise.
3436 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3437 (aarch64_watchpoint_length): Likewise.
3438 (aarch64_point_encode_ctrl_reg): Likewise
3439 (aarch64_point_is_aligned): Likewise.
3440 (aarch64_align_watchpoint): Likewise.
3441 (aarch64_linux_set_debug_regs):
3442 (aarch64_dr_state_insert_one_point): Likewise.
3443 (aarch64_dr_state_remove_one_point): Likewise.
3444 (aarch64_handle_breakpoint): Likewise.
3445 (aarch64_handle_aligned_watchpoint): Likewise.
3446 (aarch64_handle_unaligned_watchpoint): Likewise.
3447 (aarch64_handle_watchpoint): Likewise.
3448
c67ca4de
YQ
34492015-07-17 Yao Qi <yao.qi@linaro.org>
3450
3451 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3452 and don't aarch64_get_debug_reg_state. All callers update.
3453 (aarch64_handle_aligned_watchpoint): Likewise.
3454 (aarch64_handle_unaligned_watchpoint): Likewise.
3455 (aarch64_handle_watchpoint): Likewise.
3456 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3457 (aarch64_remove_point): Likewise.
3458
25abf979
YQ
34592015-07-17 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3462 debug_printf.
3463 (aarch64_handle_unaligned_watchpoint): Likewise.
3464
db1ff28b
JK
34652015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3466
3467 Revert the previous 3 commits:
3468 Move gdb_regex* to common/
3469 Move linux_find_memory_regions_full & co.
3470 gdbserver build-id attribute generator
3471
700ca40f
JK
34722015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3473 Jan Kratochvil <jan.kratochvil@redhat.com>
3474
3475 gdbserver build-id attribute generator.
3476 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3477 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3478 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3479 (find_phdr): New.
3480 (get_dynamic): Use find_pdhr to traverse program headers.
3481 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3482 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3483 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3484 (get_hex_build_id): New.
3485 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3486 to reply XML document.
3487
9904185c
JK
34882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3489 Jan Kratochvil <jan.kratochvil@redhat.com>
3490
3491 * target.c: Include target/target-utils.h and fcntl.h.
3492 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3493 (target_fileio_read_stralloc): New functions.
3494
6e5b4429
JK
34952015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3496
3497 * Makefile.in (OBS): Add gdb_regex.o.
3498 (gdb_regex.o): New.
3499 * config.in: Rebuilt.
3500 * configure: Rebuilt.
3501
ddc98fbf
JK
35022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3503 Jan Kratochvil <jan.kratochvil@redhat.com>
3504
3505 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3506 * Makefile.in (OBS): Add target-utils.o.
3507 (linux-maps.o, target-utils.o): New.
3508 * configure.srv (srv_linux_obj): Add linux-maps.o.
3509
e57bb7a0
PL
35102015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3511
3512 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3513 function, return 1.
3514 (the_low_target): Install it.
3515
586b02a9
PA
35162015-07-14 Pedro Alves <palves@redhat.com>
3517
3518 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3519 Instead, ignore ECHILD, and throw an error for other errnos.
3520
58c1b36c
PA
35212015-07-10 Pedro Alves <palves@redhat.com>
3522
3523 * event-loop.c (struct callback_event) <data>: Change type to
3524 gdb_client_data instance instead of gdb_client_data pointer.
3525 (append_callback_event): Adjust.
3526
421530db
PL
35272015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3528
3529 * linux-aarch64-low.c: Add comments for each linux_target_ops
3530 method. Remove comments already covered in target_ops and
3531 linux_target_ops definitions.
3532 (the_low_target): Add comments for each unimplemented method.
3533
c2d65f38
YQ
35342015-07-09 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-aarch64-low.c (aarch64_regmap): Remove.
3537 (aarch64_usrregs_info): Remove.
3538 (regs_info): Set field usrregs to NULL.
3539
b20a6524
MM
35402015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3541
3542 * linux-low.c: Include "rsp-low.h"
3543 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3544 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3545 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3546 (handle_btrace_enable_pt): New.
3547 (handle_btrace_general_set): Support "pt".
3548 (handle_btrace_conf_general_set): Support "pt:size".
3549
96c97461
PL
35502015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3551
3552 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3553 Z_PACKET_SW_BP.
3554
37d66942
PL
35552015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3556
3557 * linux-aarch64-low.c: Remove comment about endianness.
3558 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3559 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3560 memcmp.
3561
dc06243f
GB
35622015-06-24 Gary Benson <gbenson@redhat.com>
3563
3564 * linux-i386-ipa.c (stdint.h): Do not include.
3565 * lynx-i386-low.c (stdint.h): Likewise.
3566 * lynx-ppc-low.c (stdint.h): Likewise.
3567 * mem-break.c (stdint.h): Likewise.
3568 * thread-db.c (stdint.h): Likewise.
3569 * tracepoint.c (stdint.h): Likewise.
3570 * win32-low.c (stdint.h): Likewise.
3571
124e13d9
SM
35722015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3573
3574 * server.c (write_qxfer_response): Update call to
3575 remote_escape_output.
3576
909c2cda
JK
35772015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3578 Jan Kratochvil <jan.kratochvil@redhat.com>
3579
3580 Merge multiple hex conversions.
3581 * gdbreplay.c (tohex): Rename to 'fromhex'.
3582 (logchar): Use fromhex.
3583
24c05f46
JK
35842015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3585
3586 * server.c (handle_qxfer_libraries): Set `version' attribute for
3587 <library-list>.
3588
14d2069a
GB
35892015-06-10 Gary Benson <gbenson@redhat.com>
3590
3591 * target.h (struct target_ops) <multifs_open>: New field.
3592 <multifs_unlink>: Likewise.
3593 <multifs_readlink>: Likewise.
3594 * linux-low.c (nat/linux-namespaces.h): New include.
3595 (linux_target_ops): Initialize the_target->multifs_open,
3596 the_target->multifs_unlink and the_target->multifs_readlink.
3597 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3598 * hostio.c (hostio_fs_pid): New static variable.
3599 (hostio_handle_new_gdb_connection): New function.
3600 (handle_setfs): Likewise.
3601 (handle_open): Use the_target->multifs_open as appropriate.
3602 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3603 (handle_readlink): Use the_target->multifs_readlink as
3604 appropriate.
3605 (handle_vFile): Handle vFile:setfs packets.
3606 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3607 after target_handle_new_gdb_connection.
3608
4b8b5e72
GB
36092015-06-10 Gary Benson <gbenson@redhat.com>
3610
3611 * configure.ac (AC_CHECK_FUNCS): Add setns.
3612 * config.in: Regenerate.
3613 * configure: Likewise.
3614 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3615 (linux-namespaces.o): New rule.
3616 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3617
3ac2e371
GB
36182015-06-09 Gary Benson <gbenson@redhat.com>
3619
3620 * hostio.c (handle_open): Process mode argument with
3621 fileio_to_host_mode.
3622
ca9b78ce
YQ
36232015-06-01 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3626 * linux-x86-low.c: Likewise.
3627
bfacd19d
DB
36282015-05-28 Don Breazeal <donb@codesourcery.com>
3629
3630 * linux-low.c (handle_extended_wait): Initialize
3631 thread_info.last_resume_kind for new fork children.
3632
452003ef
PA
36332015-05-15 Pedro Alves <palves@redhat.com>
3634
3635 * target.h (target_handle_new_gdb_connection): Rewrite using if
3636 wrapped in do/while.
3637
1041a03c
JB
36382015-05-14 Joel Brobecker <brobecker@adacore.com>
3639
3640 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3641 * configure, config.in: Regenerate.
3642 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3643 Declare typedef.
3644
c269dbdb
DB
36452015-05-12 Don Breazeal <donb@codesourcery.com>
3646
3647 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3648 PTRACE_EVENT_VFORK_DONE.
3649 (linux_low_ptrace_options, extended_event_reported): Add vfork
3650 events.
3651 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3652 and "vforkdone" for RSP 'T' Stop Reply Packet.
3653 * server.h (report_vfork_events): Declare
3654 global variable.
3655
3a8a0396
DB
36562015-05-12 Don Breazeal <donb@codesourcery.com>
3657
3658 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3659 (the_low_target) <new_fork>: Initialize new member.
3660 * linux-arm-low.c (arm_new_fork): New function.
3661 (the_low_target) <new_fork>: Initialize new member.
3662 * linux-low.c (handle_extended_wait): Call new target function
3663 new_fork.
3664 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3665 * linux-mips-low.c (mips_add_watchpoint): New function
3666 extracted from mips_insert_point.
3667 (the_low_target) <new_fork>: Initialize new member.
3668 (mips_linux_new_fork): New function.
3669 (mips_insert_point): Call mips_add_watchpoint.
3670 * linux-x86-low.c (x86_linux_new_fork): New function.
3671 (the_low_target) <new_fork>: Initialize new member.
3672
de0d863e
DB
36732015-05-12 Don Breazeal <donb@codesourcery.com>
3674
3675 * linux-low.c (handle_extended_wait): Implement return value,
3676 rename argument 'event_child' to 'event_lwp', handle
3677 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3678 (linux_low_ptrace_options): New function.
3679 (linux_low_filter_event): Call linux_low_ptrace_options,
3680 use different argument fo linux_enable_event_reporting,
3681 use return value from handle_extended_wait.
3682 (extended_event_reported): New function.
3683 (linux_wait_1): Call extended_event_reported and set
3684 status to report fork events.
3685 (linux_write_memory): Add pid to debug message.
3686 (reset_lwp_ptrace_options_callback): New function.
3687 (linux_handle_new_gdb_connection): New function.
3688 (linux_target_ops): Initialize new structure member.
3689 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3690 * lynx-low.c: Initialize new structure member.
3691 * remote-utils.c (prepare_resume_reply): Implement stop reason
3692 "fork" for "T" stop message.
3693 * server.c (handle_query): Call handle_new_gdb_connection.
3694 * server.h (report_fork_events): Declare global flag.
3695 * target.h (struct target_ops) <handle_new_gdb_connection>:
3696 New member.
3697 (target_handle_new_gdb_connection): New macro.
3698 * win32-low.c: Initialize new structure member.
3699
ddcbc397
DB
37002015-05-12 Don Breazeal <donb@codesourcery.com>
3701
3702 * mem-break.c (APPEND_TO_LIST): Define macro.
3703 (clone_agent_expr): New function.
3704 (clone_one_breakpoint): New function.
3705 (clone_all_breakpoints): New function.
3706 * mem-break.h: Declare new functions.
3707
89245bc0
DB
37082015-05-12 Don Breazeal <donb@codesourcery.com>
3709
3710 * linux-low.c (linux_supports_fork_events): New function.
3711 (linux_supports_vfork_events): New function.
3712 (linux_target_ops): Initialize new structure members.
3713 (initialize_low): Call linux_check_ptrace_features.
3714 * lynx-low.c (lynx_target_ops): Initialize new structure
3715 members.
3716 * server.c (report_fork_events, report_vfork_events):
3717 New global flags.
3718 (handle_query): Add new features to qSupported packet and
3719 response.
3720 (captured_main): Initialize new global variables.
3721 * target.h (struct target_ops) <supports_fork_events>:
3722 New member.
3723 <supports_vfork_events>: New member.
3724 (target_supports_fork_events): New macro.
3725 (target_supports_vfork_events): New macro.
3726 * win32-low.c (win32_target_ops): Initialize new structure
3727 members.
3728
835205d0
GB
37292015-05-12 Gary Benson <gbenson@redhat.com>
3730
3731 * server.c (handle_qxfer_exec_file): Use current process
3732 if annex is empty.
3733
21e94bd9
SL
37342015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3735
3736 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3737 Remove HAVE_PTRACE_GETREGS conditionals.
3738 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3739 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3740
45614f15
YQ
37412015-05-08 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-low.c (linux_supports_conditional_breakpoints): New
3744 function.
3745 (linux_target_ops): Install new target method.
3746 * lynx-low.c (lynx_target_ops): Install NULL hook for
3747 supports_conditional_breakpoints.
3748 * nto-low.c (nto_target_ops): Likewise.
3749 * spu-low.c (spu_target_ops): Likewise.
3750 * win32-low.c (win32_target_ops): Likewise.
3751 * server.c (handle_query): Check
3752 target_supports_conditional_breakpoints.
3753 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3754 New field.
3755 (target_supports_conditional_breakpoints): New macro.
3756
80ad801e
PA
37572015-05-06 Pedro Alves <palves@redhat.com>
3758
3759 PR server/18081
3760 * server.c (start_inferior): If the process exits, mourn it.
3761
819843c7
GB
37622015-04-21 Gary Benson <gbenson@redhat.com>
3763
3764 * hostio.c (fileio_open_flags_to_host): Factored out to
3765 fileio_to_host_openflags in common/fileio.c. Single use
3766 updated.
3767
a2d5a9d7
MF
37682015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3769
3770 * linux-xtensa-low.c (xtensa_fill_gregset)
3771 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3772 XCHAL_HAVE_LOOP.
3773
deb44829
MF
37742015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3775
3776 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3777 (regs_info): Replace usrregs pointer with NULL.
3778
e57f1de3
GB
37792015-04-17 Gary Benson <gbenson@redhat.com>
3780
3781 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3782 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3783 * server.c (handle_qxfer_exec_file): New function.
3784 (qxfer_packets): Add exec-file entry.
3785 (handle_query): Report qXfer:exec-file:read as supported packet.
3786
62828379
RN
37872015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3788
3789 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3790
b88bb450
GB
37912015-04-09 Gary Benson <gbenson@redhat.com>
3792
3793 * hostio-errno.c (errno_to_fileio_error): Remove function.
3794 Update caller to use remote_fileio_to_fio_error.
3795
c8f4bfdd
YQ
37962015-04-09 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-low.c (linux_insert_point): Call
3799 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3800 (linux_remove_point): Call remove_memory_breakpoint if type is
3801 raw_bkpt_type_sw.
3802 * linux-x86-low.c (x86_insert_point): Don't call
3803 insert_memory_breakpoint.
3804 (x86_remove_point): Don't call remove_memory_breakpoint.
3805
41f98f02
PA
38062015-04-01 Pedro Alves <palves@redhat.com>
3807 Cleber Rosa <crosa@redhat.com>
3808
3809 * server.c (gdbserver_usage): Reorganize and extend the usage
3810 message.
3811
2bf6fb9d
PA
38122015-03-24 Pedro Alves <palves@redhat.com>
3813
3814 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3815 output. Also dump TRAP_TRACE.
3816 (linux_low_filter_event): In debug output, distinguish a
3817 resume_stop SIGSTOP from a delayed SIGSTOP.
3818
369f6daa
GB
38192015-03-24 Gary Benson <gbenson@redhat.com>
3820
3821 * linux-x86-low.c (x86_linux_new_thread): Moved to
3822 nat/x86-linux.c.
3823 (x86_linux_prepare_to_resume): Likewise.
3824
8e5d4070
GB
38252015-03-24 Gary Benson <gbenson@redhat.com>
3826
3827 * Makefile.in (x86-linux-dregs.o): New rule.
3828 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3829 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3830 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3831 (x86_linux_dr_get): Likewise.
3832 (x86_linux_dr_set): Likewise.
3833 (update_debug_registers_callback): Likewise.
3834 (x86_linux_dr_set_addr): Likewise.
3835 (x86_linux_dr_get_addr): Likewise.
3836 (x86_linux_dr_set_control): Likewise.
3837 (x86_linux_dr_get_control): Likewise.
3838 (x86_linux_dr_get_status): Likewise.
3839 (x86_linux_update_debug_registers): Likewise.
3840
2b95d440
GB
38412015-03-24 Gary Benson <gbenson@redhat.com>
3842
3843 * linux-x86-low.c (x86_linux_update_debug_registers):
3844 New function, factored out from...
3845 (x86_linux_prepare_to_resume): ...this.
3846
14b0bc68
GB
38472015-03-24 Gary Benson <gbenson@redhat.com>
3848
3849 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3850 (x86_linux_dr_set): Likewise.
3851 (update_debug_registers_callback): Likewise.
3852 (x86_linux_dr_set_addr): Likewise.
3853 (x86_linux_dr_get_addr): Likewise.
3854 (x86_linux_dr_set_control): Likewise.
3855 (x86_linux_dr_get_control): Likewise.
3856 (x86_linux_dr_get_status): Likewise.
3857 (x86_linux_prepare_to_resume): Likewise.
3858
5dfe6ca8
GB
38592015-03-24 Gary Benson <gbenson@redhat.com>
3860
3861 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3862 Use perror_with_name. Pass string through gettext.
3863 (x86_linux_dr_set): Likewise.
3864
d33472ad
GB
38652015-03-24 Gary Benson <gbenson@redhat.com>
3866
3867 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3868 (x86_linux_dr_set_addr): ...this.
3869 (x86_dr_low_get_addr): Rename to...
3870 (x86_linux_dr_get_addr): ...this.
3871 (x86_dr_low_set_control): Rename to...
3872 (x86_linux_dr_set_control): ...this.
3873 (x86_dr_low_get_control): Rename to...
3874 (x86_linux_dr_get_control): ...this.
3875 (x86_dr_low_get_status): Rename to...
3876 (x86_linux_dr_get_status): ...this.
3877 (x86_dr_low): Update with new function names.
3878
4b134ca1
GB
38792015-03-24 Gary Benson <gbenson@redhat.com>
3880
3881 * Makefile.in (x86-linux.o): New rule.
3882 * configure.srv: Add x86-linux.o to relevant targets.
3883 * linux-low.c (lwp_set_arch_private_info): New function.
3884 (lwp_arch_private_info): Likewise.
3885 * linux-x86-low.c: Include nat/x86-linux.h.
3886 (arch_lwp_info): Removed structure.
3887 (update_debug_registers_callback):
3888 Use lwp_set_debug_registers_changed.
3889 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3890 and lwp_set_debug_registers_changed.
3891 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3892
34c703da
GB
38932015-03-24 Gary Benson <gbenson@redhat.com>
3894
3895 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3896 * linux-arm-low.c (arm_new_thread): Likewise.
3897 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3898 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3899 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3900 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3901
cff068da
GB
39022015-03-24 Gary Benson <gbenson@redhat.com>
3903
3904 * linux-low.c (ptid_of_lwp): New function.
3905 (lwp_is_stopped): Likewise.
3906 (lwp_stop_reason): Likewise.
3907 * linux-x86-low.c (update_debug_registers_callback):
3908 Use lwp_is_stopped.
3909 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3910 lwp_stop_reason.
3911
b2f7c7e8
GB
39122015-03-24 Gary Benson <gbenson@redhat.com>
3913
3914 * linux-low.h (linux_stop_lwp): Remove declaration.
3915
6d4ee8c6
GB
39162015-03-24 Gary Benson <gbenson@redhat.com>
3917
3918 * linux-low.h: Include nat/linux-nat.h.
3919 * linux-low.c (iterate_over_lwps_args): New structure.
3920 (iterate_over_lwps_filter): New function.
3921 (iterate_over_lwps): Likewise.
3922 * linux-x86-low.c (update_debug_registers_callback):
3923 Update signature to what iterate_over_lwps expects.
3924 Remove PID check that iterate_over_lwps now performs.
3925 (x86_dr_low_set_addr): Use iterate_over_lwps.
3926 (x86_dr_low_set_control): Likewise.
3927
70a0bb6b
GB
39282015-03-24 Gary Benson <gbenson@redhat.com>
3929
3930 * linux-x86-low.c (x86_debug_reg_state): New function.
3931 (x86_linux_prepare_to_resume): Use the above.
3932
7b669087
GB
39332015-03-24 Gary Benson <gbenson@redhat.com>
3934
3935 * linux-low.c (current_lwp_ptid): New function.
3936 * linux-x86-low.c: Include nat/linux-nat.h.
3937 (x86_dr_low_get_addr): Use current_lwp_ptid.
3938 (x86_dr_low_get_control): Likewise.
3939 (x86_dr_low_get_status): Likewise.
3940
eef49a3d
PA
39412015-03-20 Pedro Alves <palves@redhat.com>
3942
3943 * tracepoint.c (cmd_qtstatus): Make "str" const.
3944
b2333d22
PA
39452015-03-20 Pedro Alves <palves@redhat.com>
3946
3947 * server.c (handle_general_set): Make "req_str" const.
3948
23f238d3
PA
39492015-03-19 Pedro Alves <palves@redhat.com>
3950
3951 * linux-low.c (linux_resume_one_lwp): Rename to ...
3952 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3953 instead call perror_with_name.
3954 (check_ptrace_stopped_lwp_gone): New function.
3955 (linux_resume_one_lwp): Reimplement as wrapper around
3956 linux_resume_one_lwp_throw that swallows errors if the LWP is
3957 gone.
3958
91baf43f
PA
39592015-03-19 Pedro Alves <palves@redhat.com>
3960
3961 * linux-low.c (count_events_callback, select_event_lwp_callback):
3962 No longer check whether the thread has resume_stop as last resume
3963 kind.
3964
8bf3b159
PA
39652015-03-19 Pedro Alves <palves@redhat.com>
3966
3967 * linux-low.c (count_events_callback, select_event_lwp_callback):
3968 Use the lwp's status_pending_p field, not the thread's.
3969
b90fc188
PA
39702015-03-19 Pedro Alves <palves@redhat.com>
3971
3972 * linux-low.c (select_event_lwp_callback): Update comments to
3973 no longer mention SIGTRAP.
3974
464b0089
GB
39752015-03-18 Gary Benson <gbenson@redhat.com>
3976
3977 * server.c (handle_query): Do not report vFile:fstat as supported.
3978
aa9e327f
GB
39792015-03-11 Gary Benson <gbenson@redhat.com>
3980
3981 * hostio.c (sys/types.h): New include.
3982 (sys/stat.h): Likewise.
3983 (common-remote-fileio.h): Likewise.
3984 (handle_fstat): New function.
3985 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3986
791c0056
GB
39872015-03-11 Gary Benson <gbenson@redhat.com>
3988
3989 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3990 struct stat.st_blocks and struct stat.st_blksize.
3991 * configure: Regenerate.
3992 * config.in: Likewise.
3993 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3994 (OBS): Add common-remote-fileio.o.
3995 (common-remote-fileio.o): New rule.
3996
9a9df970
PA
39972015-03-09 Pedro Alves <palves@redhat.com>
3998
3999 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4000 'struct sockaddr' pointer in 'accept' call.
4001
9eb1356e
PA
40022015-03-09 Pedro Alves <palves@redhat.com>
4003
4004 Revert:
4005 2015-03-07 Pedro Alves <palves@redhat.com>
4006 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4007 or <winsock2.h> here. Instead include "gdb_socket.h".
4008 (remote_open): Use union gdb_sockaddr_u.
4009 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4010 or <winsock2.h> here. Instead include "gdb_socket.h".
4011 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4012 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4013 or <sys/un.h>.
4014 (init_named_socket, gdb_agent_helper_thread): Use union
4015 gdb_sockaddr_u.
4016
aac331e4
PA
40172015-03-07 Pedro Alves <palves@redhat.com>
4018
4019 * configure.ac (build_warnings): Move
4020 -Wdeclaration-after-statement to the C-specific set.
4021 * configure: Regenerate.
4022
366c75fc
PA
40232015-03-07 Pedro Alves <palves@redhat.com>
4024
4025 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4026 or <winsock2.h> here. Instead include "gdb_socket.h".
4027 (remote_open): Use union gdb_sockaddr_u.
4028 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4029 or <winsock2.h> here. Instead include "gdb_socket.h".
4030 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4031 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4032 or <sys/un.h>.
4033 (init_named_socket, gdb_agent_helper_thread): Use union
4034 gdb_sockaddr_u.
4035
492d29ea
PA
40362015-03-07 Pedro Alves <palves@redhat.com>
4037
4038 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4039 instead.
4040
60a191ed
YQ
40412015-03-06 Yao Qi <yao.qi@linaro.org>
4042
4043 * linux-aarch64-low.c (aarch64_insert_point): Use
4044 show_debug_regs as a boolean.
4045 (aarch64_remove_point): Likewise.
4046
f5771b1d
PA
40472015-03-05 Pedro Alves <palves@redhat.com>
4048
4049 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4050 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4051 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4052 * nto-low.c (nto_target_ops): Likewise.
4053 * spu-low.c (spu_target_ops): Likewise.
4054 * win32-low.c (win32_target_ops): Likewise.
4055
3e572f71
PA
40562015-03-04 Pedro Alves <palves@redhat.com>
4057
72f4393d 4058 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4059 Decide whether a breakpoint triggered based on the SIGTRAP's
4060 siginfo.si_code.
72f4393d
L
4061 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4062 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4063 (linux_low_filter_event): Check for breakpoints before checking
4064 watchpoints.
4065 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4066 siginfo.si_code.
72f4393d
L
4067 (linux_stopped_by_sw_breakpoint)
4068 (linux_supports_stopped_by_sw_breakpoint)
4069 (linux_stopped_by_hw_breakpoint)
4070 (linux_supports_stopped_by_hw_breakpoint): New functions.
4071 (linux_target_ops): Install new target methods.
3e572f71 4072
1ec68e26
PA
40732015-03-04 Pedro Alves <palves@redhat.com>
4074
4075 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4076 * server.c (swbreak_feature, hwbreak_feature): New globals.
4077 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4078 (captured_main): Clear swbreak_feature and hwbreak_feature.
4079 * server.h (swbreak_feature, hwbreak_feature): Declare.
4080 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4081 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4082 supports_stopped_by_hw_breakpoint>: New fields.
4083 (target_supports_stopped_by_sw_breakpoint)
4084 (target_stopped_by_sw_breakpoint)
4085 (target_supports_stopped_by_hw_breakpoint)
4086 (target_stopped_by_hw_breakpoint): Declare.
4087
15c66dd6
PA
40882015-03-04 Pedro Alves <palves@redhat.com>
4089
4090 enum lwp_stop_reason -> enum target_stop_reason
4091 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4092 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4093 (linux_wait_1, stuck_in_jump_pad_callback)
4094 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4095 (linux_stopped_by_watchpoint):
4096 * linux-low.h (enum lwp_stop_reason): Delete.
4097 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4098 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4099
98fc70d6
YQ
41002015-03-04 Yao Qi <yao.qi@linaro.org>
4101
4102 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4103
dd2ac174
GB
41042015-03-03 Gary Benson <gbenson@redhat.com>
4105
4106 * hostio.c (handle_vFile): Fix prefix lengths.
4107
d68e53f4
MM
41082015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4109
4110 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4111 ptr_bits.
4112
bf2d68ab
AA
41132015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4114
4115 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4116 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4117 (clean): Add "rm -f" for above C files.
4118 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4119 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4120 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4121 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4122 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4123 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4124 (init_registers_s390x_vx_linux64)
4125 (init_registers_s390x_tevx_linux64)
4126 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4127 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4128 declarations.
4129 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4130 (s390_store_vxrs_high): New functions.
4131 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4132 NT_S390_VXRS_HIGH.
4133 (s390_arch_setup): Add logic for selecting one of the new target
4134 descriptions. Activate the new vector regsets if applicable.
4135 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4136 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4137 and init_registers_s390x_tevx_linux64.
4138
c966a859
PA
41392015-03-01 Pedro Alves <palves@redhat.com>
4140
4141 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4142 parameter.
4143
4180215b
PA
41442015-02-27 Pedro Alves <palves@redhat.com>
4145
4146 * linux-x86-low.c (u_debugreg_offset): New function.
4147 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4148
749bab01
PA
41492015-02-27 Pedro Alves <palves@redhat.com>
4150
4151 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4152 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4153 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4154 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4155 (ps_lsetfpregs, ps_getpid)
4156 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4157 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4158 (ps_lsetxregs, ps_plog): Declare.
4159
3c14e5a3
PA
41602015-02-27 Pedro Alves <palves@redhat.com>
4161
4162 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4163 IP_AGENT_EXPORT_FUNC.
4164 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4165 IP_AGENT_EXPORT_FUNC.
4166 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4167 (IP_AGENT_EXPORT): Delete.
4168 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4169 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4170 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4171 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4172 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4173 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4174 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4175 (traceframe_read_count, traceframe_write_count)
4176 (traceframes_created, trace_state_variables, get_raw_reg)
4177 (get_trace_state_variable_value, set_trace_state_variable_value)
4178 (ust_loaded, helper_thread_id, cmd_buf): Use
4179 IPA_SYM_EXPORTED_NAME.
4180 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4181 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4182 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4183 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4184 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4185 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4186 EXTERN_C_PUSH/EXTERN_C_POP.
4187 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4188 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4189 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4190 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4191 (traceframe_write_count, traceframe_read_count)
4192 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4193 (about_to_request_buffer_space, get_trace_state_variable_value)
4194 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4195 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4196 EXTERN_C_PUSH/EXTERN_C_POP.
4197 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4198 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4199 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4200 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4201 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4202 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4203 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4204 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4205 Define.
4206 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4207 (IP_AGENT_EXPORT_VAR_DECL): Define.
4208 (tracing): Declare.
4209 (gdb_agent_get_raw_reg): Declare.
4210
fe978cb0
PA
42112015-02-27 Tom Tromey <tromey@redhat.com>
4212 Pedro Alves <palves@redhat.com>
4213
4214 Rename symbols whose names are reserved C++ keywords throughout.
4215
3bc3d82a
PA
42162015-02-27 Pedro Alves <palves@redhat.com>
4217
4218 * Makefile.in (COMPILER): New, get it from autoconf.
4219 (CXX): Get from autoconf instead.
4220 (COMPILE.pre): Use COMPILER.
4221 (CC-LD): Rename to ...
4222 (CC_LD): ... this. Use COMPILER.
4223 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4224 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4225 * acinclude.m4: Include build-with-cxx.m4.
4226 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4227 Disable -Werror by default if building in C++ mode.
4228 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4229 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4230 the C++ compiler. Save/restore CXXFLAGS too.
4231 * configure: Regenerate.
4232
07697489
PA
42332015-02-27 Pedro Alves <palves@redhat.com>
4234
4235 * acinclude.m4: Include libiberty.m4.
4236 * configure.ac: Call libiberty_INIT.
4237 * config.in, configure: Regenerate.
4238
9beb7c4e
PA
42392015-02-26 Pedro Alves <palves@redhat.com>
4240
4241 * linux-low.c (linux_wait_1): When incrementing the PC past a
4242 program breakpoint always use the_low_target.breakpoint_len as
4243 increment, rather than the maximum between that and
4244 the_low_target.decr_pc_after_break.
4245
8090aef2
PA
42462015-02-23 Pedro Alves <palves@redhat.com>
4247
4248 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4249 thread was doing a step-over; always adjust the PC if
4250 we stepped over a permanent breakpoint.
4251 (linux_wait_1): If we stepped over breakpoint that was on top of a
4252 permanent breakpoint, manually advance the PC past it.
4253
bc9540e8
PA
42542015-02-23 Pedro Alves <palves@redhat.com>
4255
4256 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4257 modes.
4258 (x86_fill_gregset, x86_store_gregset): Use it when handling
4259 $orig_eax.
4260
2db9a427
PA
42612015-02-20 Pedro Alves <palves@redhat.com>
4262
4263 * thread-db.c: Include "nat/linux-procfs.h".
4264 (thread_db_init): Skip listing new threads if the kernel supports
4265 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4266
afa8d396
PA
42672015-02-20 Pedro Alves <palves@redhat.com>
4268
4269 * linux-low.c (status_pending_p_callback): Use ptid_match.
4270
c9587f88
AT
42712015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4272
4273 PR breakpoints/16812
4274 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4275 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4276 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4277
b05ec7a5
AT
42782015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4279
4280 PR breakpoints/15956
4281 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4282
d33501a5
MM
42832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4284
4285 * linux-low.c (linux_low_btrace_conf): Print size.
4286 * server.c (handle_btrace_conf_general_set): New.
4287 (hanle_general_set): Call handle_btrace_conf_general_set.
4288 (handle_query): Report Qbtrace-conf:bts:size as supported.
4289
f4abbc16
MM
42902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4291
4292 * linux-low.c (linux_low_enable_btrace): Update parameters.
4293 (linux_low_btrace_conf): New.
4294 (linux_target_ops)<to_btrace_conf>: Initialize.
4295 * server.c (current_btrace_conf): New.
4296 (handle_btrace_enable): Rename to ...
4297 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4298 to target_enable_btrace. Update comment. Update users.
4299 (handle_qxfer_btrace_conf): New.
4300 (qxfer_packets): Add btrace-conf entry.
4301 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4302 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4303 (target_ops)<read_btrace_conf>: New.
4304 (target_enable_btrace): Update parameters.
4305 (target_read_btrace_conf): New.
4306
043c3577
MM
43072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4308
4309 * server.c (handle_btrace_general_set): Remove call to
4310 target_supports_btrace.
4311 (supported_btrace_packets): New.
4312 (handle_query): Call supported_btrace_packets.
4313 * target.h: include btrace-common.h.
4314 (btrace_target_info): Removed.
4315 (supports_btrace, target_supports_btrace): Update parameters.
4316
734b0e4b
MM
43172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4318
4319 * Makefile.in (SFILES): Add common/btrace-common.c.
4320 (OBS): Add common/btrace-common.o.
4321 (btrace-common.o): Add build rules.
4322 * linux-low: Include btrace-common.h.
4323 (linux_low_read_btrace): Use struct btrace_data. Call
4324 btrace_data_init and btrace_data_fini.
4325
d6c146e9
PA
43262015-02-06 Pedro Alves <palves@redhat.com>
4327
4328 * thread-db.c (find_new_threads_callback): Add debug output.
4329
20ba1ce6
PA
43302015-02-04 Pedro Alves <palves@redhat.com>
4331
4332 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4333 (resume_stopped_resumed_lwps): New function.
4334 (linux_wait_for_event_filtered): Use it.
4335
8cc73a39
SDJ
43362015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4337
4338 * Makefile.in (SFILES): Add linux-personality.c.
4339 (linux-personality.o): New rule.
4340 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4341 list of objects to be built.
4342 * linux-low.c: Include nat/linux-personality.h.
4343 (linux_create_inferior): Remove code to disable address space
4344 randomization (moved to ../nat/linux-personality.c). Create
4345 cleanup to disable address space randomization.
4346
fb23d554
SDJ
43472015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4348
4349 * Makefile.in (posix-strerror.o): New rule.
4350 (mingw-strerror.o): Likewise.
4351 * configure: Regenerated.
4352 * configure.ac: Source file ../common/common.host. Initialize new
4353 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4354
cdf43629
YQ
43552015-01-14 Yao Qi <yao@codesourcery.com>
4356
4357 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4358 (ppc-linux.o): New rule.
4359 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4360 * configure.ac: AC_CHECK_FUNCS(getauxval).
4361 * config.in: Re-generated.
4362 * configure: Re-generated.
4363 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4364 ppc64_64bit_inferior_p
4365
514c5338
YQ
43662015-01-14 Yao Qi <yao@codesourcery.com>
4367
4368 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4369 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4370 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4371 (PT_ORIG_R3, PT_TRAP): Likewise.
4372 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4373 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4374 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4375
3368c1e5
JB
43762015-01-10 Joel Brobecker <brobecker@adacore.com>
4377
4378 * i387-fp.c (i387_cache_to_xsave): In look over
4379 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4380 zmmh_low_space field by use of zmmh_high_space.
4381
582511be
PA
43822015-01-09 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (step_over_bkpt): Move higher up in the file.
4385 (handle_extended_wait): Don't store the stop_pc here.
4386 (get_stop_pc): Adjust comments and rename to ...
4387 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4388 stopped for a software breakpoint or hardware breakpoint.
4389 (thread_still_has_status_pending_p): New function.
4390 (status_pending_p_callback): Use
4391 thread_still_has_status_pending_p. If the event is no longer
4392 interesting, resume the LWP.
4393 (handle_tracepoints): Add assert.
4394 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4395 (wstatus_maybe_breakpoint): New function.
4396 (cancel_breakpoint): Delete function.
4397 (check_stopped_by_watchpoint): New function, factored out from
4398 linux_low_filter_event.
4399 (lp_status_maybe_breakpoint): Delete function.
4400 (linux_low_filter_event): Remove filter_ptid argument.
4401 Leave thread group exits pending here. Store the LWP's stop PC.
4402 Always leave events pending.
4403 (linux_wait_for_event_filtered): Pull all events out of the
4404 kernel, and leave them all pending.
4405 (count_events_callback, select_event_lwp_callback): Consider all
4406 events.
4407 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4408 (select_event_lwp): Only give preference to the stepping LWP in
4409 all-stop mode. Adjust comments.
4410 (ignore_event): New function.
4411 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4412 references to cancel_breakpoints. Adjust to renames. Also give
4413 equal priority to all LWPs that have had events in non-stop mode.
4414 If reporting a software breakpoint event, unadjust the LWP's PC.
4415 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4416 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4417 Adjust.
4418 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4419 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4420 (linux_stopped_by_watchpoint): Adjust.
4421 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4422 * linux-low.h (enum lwp_stop_reason): New.
4423 (struct lwp_info) <stop_pc>: Adjust comment.
4424 <stopped_by_watchpoint>: Delete field.
4425 <stop_reason>: New field.
4426 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4427 * mem-break.c (software_breakpoint_inserted_here)
4428 (hardware_breakpoint_inserted_here): New function.
4429 * mem-break.h (software_breakpoint_inserted_here)
4430 (hardware_breakpoint_inserted_here): Declare.
4431 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4432 (cancel_breakpoints): Delete.
4433 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4434 (upload_fast_traceframes): Remove references to
4435 cancel_breakpoints.
4436
a33e3959
PA
44372015-01-09 Pedro Alves <palves@redhat.com>
4438
4439 * thread-db.c (find_new_threads_callback): Ignore thread if the
4440 kernel thread ID is -1.
4441
8784d563
PA
44422015-01-09 Pedro Alves <palves@redhat.com>
4443
4444 * linux-low.c (linux_attach_fail_reason_string): Move to
4445 nat/linux-ptrace.c, and rename.
4446 (linux_attach_lwp): Update comment.
4447 (attach_proc_task_lwp_callback): New function.
4448 (linux_attach): Adjust to rename and use
4449 linux_proc_attach_tgid_threads.
4450 (linux_attach_fail_reason_string): Delete declaration.
4451
76f2b779
JB
44522015-01-01 Joel Brobecker <brobecker@adacore.com>
4453
4454 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4455 * server.c (gdbserver_version): Likewise.
4456
fafcc06a
SDJ
44572014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4458
4459 * remote-utils.c: Include ctype.h.
4460 (input_interrupt): Explicitly handle the case when the char
4461 received is the NUL byte. Improve the printing of non-ASCII
4462 characters.
4463
beed38b8
JB
44642014-12-16 Joel Brobecker <brobecker@adacore.com>
4465
4466 * linux-low.c (linux_low_filter_event): Update call to
4467 linux_enable_event_reporting following the addition of
4468 a new parameter to that function.
4469
bf330350
CU
44702014-12-16 Catalin Udma <catalin.udma@freescale.com>
4471
4472 PR server/17457
4473 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4474 (AARCH64_FPCR_REGNO): Likewise.
4475 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4476 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4477 (aarch64_store_fpregset): Likewise.
4478
5227d625
JB
44792014-12-15 Joel Brobecker <brobecker@adacore.com>
4480
4481 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4482 Remove FIXME comment about assumption about N.
4483
f93b65a0
JB
44842014-12-13 Joel Brobecker <brobecker@adacore.com>
4485
4486 * configure.ac: If large-file support is disabled in GDBserver,
4487 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4488 * configure: Regenerate.
4489
e5a9158d
AA
44902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4491
4492 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4493 warning upon ENODATA from ptrace.
4494 * linux-s390-low.c (s390_store_tdb): New.
4495 (s390_regsets): Add regset for NT_S390_TDB.
4496
feea5f36
AA
44972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4498
4499 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4500 without a fill_function.
4501 * linux-s390-low.c (s390_fill_last_break): Remove.
4502 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4503 (s390_arch_setup): Use regset's size instead of fill_function for
4504 loop end condition.
4505
098dbe61
AA
45062014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4507
4508 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4509 the regset's store function when ptrace returned an error.
4510 * regcache.c (get_thread_regcache): Invalidate register cache
4511 before fetching inferior's registers.
4512
28eef672
AA
45132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4514
4515 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4516 while-loop as for-loop.
4517 (regsets_store_inferior_registers): Likewise.
4518
bdca27a2
YQ
45192014-11-28 Yao Qi <yao@codesourcery.com>
4520
4521 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4522 * config.in, configure: Re-generate.
4523 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4524 is defined.
4525
9c232dda
YQ
45262014-11-21 Yao Qi <yao@codesourcery.com>
4527
4528 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4529 (AC_CHECK_HEADERS): Remove malloc.h.
4530 * configure: Re-generated.
4531 * config.in: Re-generated.
4532 * server.h: Don't include alloca.h and malloc.h.
4533 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4534 Don't include malloc.h.
4535
43968415
JB
45362014-11-17 Joel Brobecker <brobecker@adacore.com>
4537
4538 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4539 corresponding ERRNO check in same block.
4540
40e91bc7
PA
45412014-11-12 Pedro Alves <palves@redhat.com>
4542
4543 * server.c (cont_thread): Update comment.
4544 (start_inferior, attach_inferior): No longer clear cont_thread.
4545 (handle_v_cont): No longer set cont_thread.
4546 (captured_main): Clear cont_thread each time a GDB connects.
4547
c2c118cf
PA
45482014-11-12 Pedro Alves <palves@redhat.com>
4549
4550 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4551 thread, and don't resume all threads if the Hc thread has exited.
4552
78708b7c
PA
45532014-11-12 Pedro Alves <palves@redhat.com>
4554
4555 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4556 the process group instead of to a specific LWP.
4557
a2abc7de
PA
45582014-10-15 Pedro Alves <palves@redhat.com>
4559
4560 PR server/17487
4561 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4562 parameter.
4563 (arm_set_thread_context): Delete.
4564 (the_low_target): Adjust.
4565 * win32-i386-low.c (debug_registers_changed)
4566 (debug_registers_used): Delete.
4567 (update_debug_registers_callback): New function.
4568 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4569 needing to update their debug registers.
4570 (win32_get_current_dr): New function.
4571 (x86_dr_low_get_addr, x86_dr_low_get_control)
4572 (x86_dr_low_get_status): Fetch the debug register from the thread
4573 record's context.
4574 (i386_initial_stuff): Adjust.
4575 (i386_get_thread_context): Remove current_event parameter. Don't
4576 clear debug_registers_changed nor copy DR values to
4577 debug_reg_state.
4578 (i386_set_thread_context): Delete.
4579 (i386_prepare_to_resume): New function.
4580 (i386_thread_added): Mark the thread as needing to update irs
4581 debug registers.
4582 (the_low_target): Remove i386_set_thread_context and install
4583 i386_prepare_to_resume.
4584 * win32-low.c (win32_get_thread_context): Adjust.
4585 (win32_set_thread_context): Use SetThreadContext
4586 directly.
4587 (win32_prepare_to_resume): New function.
4588 (win32_require_context): New function, factored out from ...
4589 (thread_rec): ... this.
4590 (continue_one_thread): Call win32_prepare_to_resume on each thread
4591 we're about to continue.
4592 (win32_resume): Call win32_prepare_to_resume on the event thread.
4593 * win32-low.h (struct win32_thread_info)
4594 <debug_registers_changed>: New field.
4595 (struct win32_target_ops): Change prototype of set_thread_context,
4596 delete set_thread_context and add prepare_to_resume.
4597 (win32_require_context): New declaration.
4598
a442d071
GB
45992014-10-08 Gary Benson <gbenson@redhat.com>
4600
4601 * server.h: Do not include common-exceptions.h.
4602
6f1947e8
GB
46032014-10-08 Gary Benson <gbenson@redhat.com>
4604
4605 * server.h: Do not include cleanups.h.
4606
63b434a4
JH
46072014-09-30 James Hogan <james.hogan@imgtec.com>
4608
4609 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4610 mips64-dsp-linux.c.
4611
c4d9ceb6
YQ
46122014-09-23 Yao Qi <yao@codesourcery.com>
4613
4614 * linux-low.c (lp_status_maybe_breakpoint): New function.
4615 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4616 (count_events_callback): Likewise.
4617 (select_event_lwp_callback): Likewise.
4618 (cancel_breakpoints_callback): Likewise.
4619
89a5711c
DB
46202014-09-19 Don Breazeal <donb@codesourcery.com>
4621
4622 * linux-low.c (handle_extended_wait): Call
4623 linux_ptrace_get_extended_event.
4624 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4625 linux_is_extended_waitstatus.
4626
bffc0964
JB
46272014-09-16 Joel Brobecker <brobecker@adacore.com>
4628
4629 * Makefile.in (CPPFLAGS): Define.
4630 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4631 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4632
0bfdf32f
GB
46332014-09-16 Gary Benson <gbenson@redhat.com>
4634
4635 * inferiors.h (current_inferior): Renamed as...
4636 (current_thread): New variable. All uses updated.
4637 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4638 (maybe_move_out_of_jump_pad): Likewise.
4639 (cancel_breakpoint): Likewise.
4640 (linux_low_filter_event): Likewise.
4641 (wait_for_sigstop): Likewise.
4642 (linux_resume_one_lwp): Likewise.
4643 (need_step_over_p): Likewise.
4644 (start_step_over): Likewise.
4645 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4646 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4647 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4648 and save_inferior as saved_thread.
4649 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4650 saved_thread.
4651 (regcache_invalidate_thread): Likewise.
4652 * remote-utils.c (prepare_resume_reply): Likewise.
4653 * thread-db.c (thread_db_get_tls_address): Likewise.
4654 (disable_thread_event_reporting): Likewise.
4655 (remove_thread_event_breakpoints): Likewise.
4656 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4657 as saved_thread.
4658 * target.h (set_desired_inferior): Renamed as...
4659 (set_desired_thread): New declaration. All uses updated.
4660 * server.c (myresume): Updated comment to reference thread instead
4661 of inferior.
4662 (handle_serial_event): Likewise.
4663 (handle_target_event): Likewise.
4664
361c8ade
GB
46652014-09-12 Tom Tromey <tromey@redhat.com>
4666 Gary Benson <gbenson@redhat.com>
4667
4668 * regcache.h: Include common-regcache.h.
4669 (regcache_read_pc): Don't declare.
4670 * regcache.c (get_thread_regcache_for_ptid): New function.
4671
bd9269f7
GB
46722014-09-11 Tom Tromey <tromey@redhat.com>
4673 Gary Benson <gbenson@redhat.com>
4674
4675 * symbol.c: New file.
4676 * Makefile.in (SFILES): Add symbol.c.
4677 (OBS): Add symbol.o.
4678
f8c1d06b
GB
46792014-09-11 Gary Benson <gbenson@redhat.com>
4680
4681 * target.c (target_stop_ptid, target_continue_ptid): New
4682 functions.
4683
721ec300
GB
46842014-09-11 Tom Tromey <tromey@redhat.com>
4685 Gary Benson <gbenson@redhat.com>
4686
4687 * target.h: Include target/target.h.
4688 * target.c (target_read_memory, target_read_uint32)
4689 (target_write_memory): New functions.
4690
c5e92cca
GB
46912014-09-11 Gary Benson <gbenson@redhat.com>
4692
4693 * server.h (debug_hw_points): Don't declare.
4694 * server.c (debug_hw_points): Don't define. Replace all uses
4695 with show_debug_regs.
4696 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4697 all uses with show_debug_regs.
4698
2e4bb98a
EBM
46992014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4700
4701 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4702 endianness into account.
4703 (ppc_supply_ptrace_register): Likewise.
4704
ac740bc7
JH
47052014-09-03 James Hogan <james.hogan@imgtec.com>
4706
4707 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4708 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4709
97ea6506
GB
47102014-09-03 Gary Benson <gbenson@redhat.com>
4711
4712 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4713 ALL_DEBUG_ADDRESS_REGISTERS.
4714
df7e5265
GB
47152014-09-02 Gary Benson <gbenson@redhat.com>
4716
4717 * i386-low.h: Renamed as...
4718 * x86-low.h: New file. All type, function and variable name
4719 prefixes changed from "i386_" to "x86_". All references updated.
4720 * i386-low.c: Renamed as...
4721 * x86-low.c: New file. All type, function and variable name
4722 prefixes changed from "i386_" to "x86_". All references updated.
4723
ed859da7
GB
47242014-09-02 Gary Benson <gbenson@redhat.com>
4725
4726 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4727 (x86_linux_new_thread): Likewise.
4728
860789c7
GB
47292014-08-29 Gary Benson <gbenson@redhat.com>
4730
4731 * server.h (setjmp.h): Do not include.
4732 (toplevel): Do not declare.
4733 (common-exceptions.h): Include.
4734 (cleanups.h): Likewise.
4735 * server.c (toplevel): Do not define.
4736 (exit_code): New static global.
4737 (detach_or_kill_for_exit_cleanup): New function.
4738 (main): New function. Original main renamed to...
4739 (captured_main): New function.
4740 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4741
ff55e1b5
GB
47422014-08-29 Gary Benson <gbenson@redhat.com>
4743
4744 * Makefile.in (SFILES): Add common/common-exceptions.c.
4745 (OBS): Add common-exceptions.o.
4746 (common-exceptions.o): New rule.
4747 * utils.c (prepare_to_throw_exception): New function.
4748
e9bcb658
GB
47492014-08-29 Gary Benson <gbenson@redhat.com>
4750
4751 * config.in: Regenerate.
4752 * configure: Likewise.
4753
e3180625
GB
47542014-08-29 Gary Benson <gbenson@redhat.com>
4755
4756 * Makefile.in (SFILES): Add common/cleanups.c.
4757 (OBS): cleanups.o.
4758 (cleanups.o): New rule.
4759
e3d6ba5d
GB
47602014-08-29 Gary Benson <gbenson@redhat.com>
4761
4762 * utils.c (internal_vwarning): New function.
4763
7096e886
GB
47642014-08-28 Gary Benson <gbenson@redhat.com>
4765
4766 * utils.h (fatal): Remove declaration.
4767 * utils.c (fatal): Remove function.
4768
14ce3192
GB
47692014-08-28 Gary Benson <gbenson@redhat.com>
4770
4771 * tracepoint.c (gdb_agent_init): Replace fatal with
4772 perror_with_name.
4773 (initialize_tracepoint): Likewise.
4774
50278d59
GB
47752014-08-28 Gary Benson <gbenson@redhat.com>
4776
4777 * remote-utils.c (remote_prepare): Replace fatal with error.
4778
aa96c426
GB
47792014-08-28 Gary Benson <gbenson@redhat.com>
4780
4781 * linux-low.c (linux_async): Replace fatal with warning.
4782 Tidy up and return.
4783 (linux_start_non_stop): Return -1 if linux_async failed.
4784
f7160e97
GB
47852014-08-28 Gary Benson <gbenson@redhat.com>
4786
4787 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4788 gdb_assert.
4789 (i386_dr_low_get_addr): Remove vague comment.
4790 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4791 gdb_assert.
4792
38e08fca
GB
47932014-08-28 Gary Benson <gbenson@redhat.com>
4794
4795 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4796 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4797 internal_error.
4798 (linux_resume_one_lwp): Likewise.
4799 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4800 gdb_assert.
4801 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4802 with internal_error.
4803 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4804 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4805 (find_register_by_name): Replace fatal with internal_error.
4806 (find_regno): Likewise.
4807 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4808 * thread-db.c (thread_db_create_event): Likewise.
4809 (thread_db_load_search): Likewise.
4810 (try_thread_db_load_1): Likewise.
4811 * tracepoint.c (get_jump_space_head): Replace fatal with
4812 internal_error.
4813 (claim_trampoline_space): Likewise.
4814 (have_fast_tracepoint_trampoline_buffer): Likewise.
4815 (cmd_qtstart): Likewise.
4816 (stop_tracing): Likewise.
4817 (fast_tracepoint_collecting): Likewise.
4818 (target_malloc): Likewise.
4819 (download_tracepoint): Likewise.
4820 (download_trace_state_variables): Replace check with gdb_assert.
4821 (upload_fast_traceframes): Replace fatal with internal_error.
4822
34abf635
GB
48232014-08-19 Tom Tromey <tromey@redhat.com>
4824 Gary Benson <gbenson@redhat.com>
4825
4826 * Makefile.in (SFILES): Add common/common-debug.c.
4827 (OBS): Add common-debug.o.
4828 (common-debug.o): New rule.
4829 * debug.h (debug_printf): Don't declare.
4830 * debug.c (debug_printf): Renamed and rewritten as...
4831 (debug_vprintf): New function.
4832
f6e94d78
GB
48332014-08-19 Gary Benson <gbenson@redhat.com>
4834
4835 * utils.h: Do not include print-utils.h.
4836
9239eeab
GB
48372014-08-19 Tom Tromey <tromey@redhat.com>
4838 Gary Benson <gbenson@redhat.com>
4839
4840 * server.h: Add static assertion.
4841 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4842
ef87c8bb
GB
48432014-08-19 Tom Tromey <tromey@redhat.com>
4844 Gary Benson <gbenson@redhat.com>
4845
4846 * Makefile.in (SFILES): Add common/errors.c.
4847 (OBS): Add errors.o.
4848 (IPA_OBS): Add errors-ipa.o.
4849 (errors.o): New rule.
4850 (errors-ipa.o): Likewise.
4851 * utils.h (perror_with_name, error, warning): Don't declare.
4852 * utils.c (warning): Renamed and rewritten as...
4853 (vwarning): New function.
4854 (error): Renamed and rewritten as...
4855 (verror): New function.
4856 (internal_error): Renamed and rewritten as...
4857 (internal_verror): New function.
4858
bb974a24
GB
48592014-08-07 Gary Benson <gbenson@redhat.com>
4860
4861 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4862 * configure: Regenerate.
4863 * config.in: Likewise.
4864 * server.h: Do not include errno.h.
4865 * event-loop.c: Likewise.
4866 * hostio-errno.c: Likewise.
4867 * linux-low.c: Likewise.
4868 * remote-utils.c: Likewise.
4869 * spu-low.c: Likewise.
4870 * utils.c: Likewise.
4871 * gdbreplay.c: Unconditionally include errno.h.
4872
6d3d12eb
GB
48732014-08-07 Gary Benson <gbenson@redhat.com>
4874
4875 * server.h: Do not include string.h.
4876 * event-loop.c: Likewise.
4877 * linux-low.c: Likewise.
4878 * regcache.c: Likewise.
4879 * remote-utils.c: Likewise.
4880 * spu-low.c: Likewise.
4881 * utils.c: Likewise.
4882
dccbb609
GB
48832014-08-07 Gary Benson <gbenson@redhat.com>
4884
4885 * server.h: Do not include gdb_assert.h.
4886
e76df0d0
GB
48872014-08-07 Gary Benson <gbenson@redhat.com>
4888
4889 * server.h: Do not include common-utils.h.
4890
4cb9c816
GB
48912014-08-07 Gary Benson <gbenson@redhat.com>
4892
4893 * server.h: Do not include ptid.h.
4894 * notif.h: Likewise.
4895
3995eeee
GB
48962014-08-07 Gary Benson <gbenson@redhat.com>
4897
4898 * server.h: Do not include gdb_locale.h.
4899
cb9f1a9b
GB
49002014-08-07 Gary Benson <gbenson@redhat.com>
4901
4902 * server.h: Do not include gdb/signals.h.
4903 * win32-low.c: Likewise.
4904
a5fceff8
GB
49052014-08-07 Gary Benson <gbenson@redhat.com>
4906
4907 * server.h: Do not include pathmax.h.
4908
b9391142
GB
49092014-08-07 Gary Benson <gbenson@redhat.com>
4910
4911 * server.h: Do not include libiberty.h.
4912 * linux-bfin-low.c: Likewise.
4913
0e443c87
GB
49142014-08-07 Gary Benson <gbenson@redhat.com>
4915
4916 * server.h: Do not include ansidecl.h.
4917
8ebb3f56
GB
49182014-08-07 Gary Benson <gbenson@redhat.com>
4919
4920 * linux-x86-low.c: Do not include stddef.h.
4921 * lynx-ppc-low.c: Likewise.
4922 * tracepoint.c: Likewise.
4923
8980bdf6
GB
49242014-08-07 Gary Benson <gbenson@redhat.com>
4925
4926 * server.h: Do not include stdarg.h.
4927 * nto-low.c: Likewise.
4928
d7096f71
GB
49292014-08-07 Gary Benson <gbenson@redhat.com>
4930
4931 * server.h: Do not include stdlib.h.
4932 * inferiors.c: Likewise.
4933 * linux-low.c: Likewise.
4934 * regcache.c: Likewise.
4935 * spu-low.c: Likewise.
4936 * tracepoint.c: Likewise.
4937 * utils.c: Likewise.
4938
d02f550d
GB
49392014-08-07 Gary Benson <gbenson@redhat.com>
4940
4941 * server.h: Do not include stdio.h.
4942 * linux-low.c: Likewise.
4943 * remote-utils.c: Likewise.
4944 * spu-low.c: Likewise.
4945 * utils.c: Likewise.
4946 * wincecompat.c: Likewise.
4947
87f6c4e3
GB
49482014-08-06 Gary Benson <gbenson@redhat.com>
4949
4950 * regcache.c (init_register_cache): Move conditionals inside if.
4951
7089dca4
GB
49522014-08-06 Gary Benson <gbenson@redhat.com>
4953
4954 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4955
462f517e
GB
49562014-07-31 Gary Benson <gbenson@redhat.com>
4957
4958 * ax.h: Do not include server.h.
4959 * gdbthread.h: Likewise.
4960 * lynx-low.h: Likewise.
4961 * notif.h: Likewise.
4962
976411d6
GB
49632014-07-30 Gary Benson <gbenson@redhat.com>
4964
4965 * server.h: Include common-defs.h.
4966 Do not include config.h or build-gnulib-gdbserver/config.h.
4967
d41f6d8e
GB
49682014-07-30 Gary Benson <gbenson@redhat.com>
4969
4970 * hostio-errno.c: Move server.h to top of includes list.
4971 * inferiors.c: Likewise.
4972 * linux-x86-low.c: Likewise.
4973 * notif.c: Include server.h.
4974
314c6a35
TT
49752014-07-24 Tom Tromey <tromey@redhat.com>
4976 Gary Benson <gbenson@redhat.com>
4977
4978 * server.h (CORE_ADDR): Now unsigned.
4979
69ff6be5
PA
49802014-07-16 Pedro Alves <palves@redhat.com>
4981
4982 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4983
ce9e3fe7
PA
49842014-07-15 Pedro Alves <palves@redhat.com>
4985
4986 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4987 copy.
4988
e76126e8
PA
49892014-07-11 Pedro Alves <palves@redhat.com>
4990
4991 * linux-low.c (kill_wait_lwp): New function, based on
4992 kill_one_lwp_callback, but use my_waitpid directly.
4993 (kill_one_lwp_callback, linux_kill): Use it.
4994
8e9db26e
PA
49952014-06-23 Pedro Alves <palves@redhat.com>
4996
4997 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4998 before setting DR0..DR3.
4999
698b3e08
GB
50002014-06-20 Gary Benson <gbenson@redhat.com>
5001
5002 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5003 * configure: Regenerated.
5004 * config.in: Likewise.
5005
125f8a3d
GB
50062014-06-20 Gary Benson <gbenson@redhat.com>
5007
5008 * Makefile.in (SFILES): Update locations for files moved
5009 from common to nat.
5010 (object file files): Reordered.
5011
42995dbd
GB
50122014-06-20 Gary Benson <gbenson@redhat.com>
5013
5014 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5015 (i386_dr_low_set_addr): Likewise.
5016 (i386_dr_low_get_addr): Likewise.
5017 (i386_dr_low_can_set_control): Likewise.
5018 (i386_dr_low_set_control): Likewise.
5019 (i386_dr_low_get_control): Likewise.
5020 (i386_dr_low_get_status): Likewise.
5021 (i386_get_debug_register_length): Likewise.
5022 * linux-x86-low.c (i386_dr_low_set_addr):
5023 Changed signature. Made static.
5024 (i386_dr_low_get_addr): Likewise.
5025 (i386_dr_low_set_control): Likewise.
5026 (i386_dr_low_get_control): Likewise.
5027 (i386_dr_low_get_status): Likewise.
5028 (i386_dr_low): New global variable.
5029 * win32-i386-low.c (i386_dr_low_set_addr):
5030 Changed signature. Made static.
5031 (i386_dr_low_get_addr): Likewise.
5032 (i386_dr_low_set_control): Likewise.
5033 (i386_dr_low_get_control): Likewise.
5034 (i386_dr_low_get_status): Likewise.
5035 (i386_dr_low): New global variable.
5036
e1d2394b
MS
50372014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5038
5039 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5040 * Makefile.in (AR, AR_FLAGS): Define.
5041 * configure: Regenerate.
5042
3a8ee006
GB
50432014-06-19 Gary Benson <gbenson@redhat.com>
5044
5045 * Makefile.in (i386-dregs.o): New rule.
5046 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5047 * i386-low.c (target.h): Remove include.
5048 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5049 (DR_CONTROL_SHIFT): Likewise.
5050 (DR_CONTROL_SIZE): Likewise.
5051 (DR_RW_EXECUTE): Likewise.
5052 (DR_RW_WRITE): Likewise.
5053 (DR_RW_READ): Likewise.
5054 (DR_RW_IORW): Likewise.
5055 (DR_LEN_1): Likewise.
5056 (DR_LEN_2): Likewise.
5057 (DR_LEN_4): Likewise.
5058 (DR_LEN_8): Likewise.
5059 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5060 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5061 (DR_ENABLE_SIZE): Likewise.
5062 (DR_LOCAL_SLOWDOWN): Likewise.
5063 (DR_GLOBAL_SLOWDOWN): Likewise.
5064 (DR_CONTROL_RESERVED): Likewise.
5065 (I386_DR_CONTROL_MASK): Likewise.
5066 (I386_DR_VACANT): Likewise.
5067 (I386_DR_LOCAL_ENABLE): Likewise.
5068 (I386_DR_GLOBAL_ENABLE): Likewise.
5069 (I386_DR_DISABLE): Likewise.
5070 (I386_DR_SET_RW_LEN): Likewise.
5071 (I386_DR_GET_RW_LEN): Likewise.
5072 (I386_DR_WATCH_HIT): Likewise.
5073 (i386_wp_op_t): Likewise.
5074 (i386_show_dr): Likewise.
5075 (i386_length_and_rw_bits): Likewise.
5076 (i386_insert_aligned_watchpoint): Likewise.
5077 (i386_remove_aligned_watchpoint): Likewise.
5078 (i386_handle_nonaligned_watchpoint): Likewise.
5079 i386_update_inferior_debug_regs(): Likewise.
5080 (i386_dr_insert_watchpoint): Likewise.
5081 (i386_dr_remove_watchpoint): Likewise.
5082 (i386_dr_region_ok_for_watchpoint): Likewise.
5083 (i386_dr_stopped_data_address): Likewise.
5084 (i386_dr_stopped_by_watchpoint): Likewise.
5085
8f26655c
GB
50862014-06-19 Gary Benson <gbenson@redhat.com>
5087
5088 * i386-low.c (i386_dr_show): Renamed to
5089 i386_show_dr and made static. All uses updated.
5090 (i386_dr_length_and_rw_bits): Renamed to
5091 i386_length_and_rw_bits and made static.
5092 All uses updated.
5093 (i386_dr_insert_aligned_watchpoint): Renamed to
5094 i386_insert_aligned_watchpoint and made static.
5095 All uses updated.
5096 (i386_dr_remove_aligned_watchpoint): Renamed to
5097 i386_remove_aligned_watchpoint and made static.
5098 All uses updated.
5099 (i386_dr_update_inferior_debug_regs): Renamed to
5100 i386_update_inferior_debug_regs and made static.
5101 All uses updated.
5102
b9228891
GB
51032014-06-18 Gary Benson <gbenson@redhat.com>
5104
5171def3
GB
5105 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5106 (i386_dr_low_can_set_control): Likewise.
5107 (i386_get_debug_register_length): Likewise.
5108 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5109 (i386_dr_low_can_set_control): Likewise.
5110 (i386_get_debug_register_length): Likewise.
5111
51122014-06-17 Gary Benson <gbenson@redhat.com>
5113
b9228891
GB
5114 * i386-low.h (i386-dregs.h): New include.
5115 (DR_FIRSTADDR): Now in i386-dregs.h.
5116 (DR_LASTADDR): Likewise.
5117 (DR_NADDR): Likewise.
5118 (DR_STATUS): Likewise.
5119 (DR_CONTROL): Likewise.
5120 (i386_debug_reg_state): Likewise.
5121 (i386_dr_insert_watchpoint): Likewise.
5122 (i386_dr_remove_watchpoint): Likewise.
5123 (i386_dr_region_ok_for_watchpoint): Likewise.
5124 (i386_dr_stopped_data_address): Likewise.
5125 (i386_dr_stopped_by_watchpoint): Likewise.
5126 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5127
4be83cc2
GB
51282014-06-18 Gary Benson <gbenson@redhat.com>
5129
5130 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5131 i386_dr_insert_watchpoint.
5132 (i386_low_remove_watchpoint): Renamed to
5133 i386_dr_remove_watchpoint.
5134 (i386_low_region_ok_for_watchpoint): Renamed to
5135 i386_dr_region_ok_for_watchpoint.
5136 (i386_low_stopped_data_address): Renamed to
5137 i386_dr_stopped_data_address.
5138 (i386_low_stopped_by_watchpoint): Renamed to
5139 i386_dr_stopped_by_watchpoint.
5140 * i386-low.c (i386_show_dr): Renamed to
5141 i386_dr_show and made nonstatic. All uses updated.
5142 (i386_length_and_rw_bits): Renamed to
5143 i386_dr_length_and_rw_bits and made nonstatic.
5144 All uses updated.
5145 (i386_insert_aligned_watchpoint): Renamed to
5146 i386_dr_insert_aligned_watchpoint and made nonstatic.
5147 All uses updated.
5148 (i386_remove_aligned_watchpoint): Renamed to
5149 i386_dr_remove_aligned_watchpoint and made nonstatic.
5150 All uses updated.
5151 (i386_update_inferior_debug_regs): Renamed to
5152 i386_dr_update_inferior_debug_regs and made nonstatic.
5153 All uses updated.
5154 (i386_low_insert_watchpoint): Renamed to
5155 i386_dr_insert_watchpoint. All uses updated.
5156 (i386_low_remove_watchpoint): Renamed to
5157 i386_dr_remove_watchpoint. All uses updated.
5158 (i386_low_region_ok_for_watchpoint): Renamed to
5159 i386_dr_region_ok_for_watchpoint. All uses updated.
5160 (i386_low_stopped_data_address): Renamed to
5161 i386_dr_stopped_data_address. All uses updated.
5162 (i386_low_stopped_by_watchpoint): Renamed to
5163 i386_dr_stopped_by_watchpoint. All uses updated.
5164
131aa0d4
GB
51652014-06-18 Gary Benson <gbenson@redhat.com>
5166
5167 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5168 (i386_dr_low_can_set_control): Likewise.
5169 (i386_insert_aligned_watchpoint): New check.
5170
d9305f7f
GB
51712014-06-18 Gary Benson <gbenson@redhat.com>
5172
5173 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5174 Renamed to state.
5175
e927c9fc
GB
51762014-06-18 Gary Benson <gbenson@redhat.com>
5177
5178 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5179 instead of fatal and error.
5180 (i386_handle_nonaligned_watchpoint): Likewise.
5181
1b6d4134
GB
51822014-06-18 Gary Benson <gbenson@redhat.com>
5183
5184 * i386-low.c (i386_get_debug_register_length): New macro.
5185 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5186 (i386_show_dr): Use debug_printf instead of fprintf. Use
5187 phex to format values.
5188
6e62758f
GB
51892014-06-18 Gary Benson <gbenson@redhat.com>
5190
5191 * i386-low.h: Comment changes.
5192 * i386-low.c: Likewise.
5193
fc6e2f03
GB
51942014-06-18 Gary Benson <gbenson@redhat.com>
5195
5196 * i386-low.c: Whitespace changes.
5197
f9d1eeed
TT
51982014-06-12 Tom Tromey <tromey@redhat.com>
5199
5200 * utils.c (freeargv): Remove.
5201
0b04e523
TT
52022014-06-12 Tom Tromey <tromey@redhat.com>
5203
5204 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5205 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5206 (parse_debug_format_options): Likewise.
5207 (gdbserver_usage): Likewise.
5208 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5209 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5210 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5211 against libiberty.
5212 ($(LIBGNU)): Depend on libiberty.
5213 (all-lib): Recurse into all subdirs.
5214 (install-only): Invoke "install" target in subdirs.
5215 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5216 targets.
5217 * configure: Rebuild.
5218 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5219 for vasprintf, vsnprintf, or gettimeofday.
5220 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5221 srv_tgtobj.
5222
270c9937
JB
52232014-06-05 Joel Brobecker <brobecker@adacore.com>
5224
5225 * development.sh: Delete.
5226 * Makefile.in (config.status): Adjust dependency on development.sh.
5227 * configure.ac: Adjust development.sh source call.
5228 * configure: Regenerate.
5229
0a261ed8
PA
52302014-06-02 Pedro Alves <palves@redhat.com>
5231
5232 * ax.c (gdb_free_agent_expr): New function.
5233 * ax.h (gdb_free_agent_expr): New declaration.
5234 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5235 list.
5236 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5237 static.
5238 (clear_breakpoint_conditions_and_commands): New function.
5239 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5240 (clear_breakpoint_conditions_and_commands): New declaration.
5241
e9dae05e
RR
52422014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5243
5244 * linux-aarch64-low.c (asm/ptrace.h): Include.
5245
5876f503
JK
52462014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5247
5248 Fix TLS access for -static -pthread.
5249 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5250 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5251 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5252
802e8e6d
PA
52532014-05-20 Pedro Alves <palves@redhat.com>
5254
5255 * linux-aarch64-low.c (aarch64_insert_point)
5256 (aarch64_remove_point): No longer check whether the type is
5257 supported here. Adjust to new interface.
5258 (the_low_target): Install aarch64_supports_z_point_type as
5259 supports_z_point_type method.
5260 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5261 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5262 instead of a Z packet char. Adjust.
5263 (arm_supports_z_point_type): New function.
5264 (arm_insert_point, arm_remove_point): Adjust to new interface.
5265 (the_low_target): Install arm_supports_z_point_type.
5266 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5267 (cris_insert_point, cris_remove_point): Adjust to new interface.
5268 Don't check whether the type is supported here.
5269 (the_low_target): Install cris_supports_z_point_type.
5270 * linux-low.c (linux_supports_z_point_type): New function.
5271 (linux_insert_point, linux_remove_point): Adjust to new interface.
5272 * linux-low.h (struct linux_target_ops) <insert_point,
5273 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5274 raw_breakpoint pointer parameter.
5275 <supports_z_point_type>: New method.
5276 * linux-mips-low.c (mips_supports_z_point_type): New function.
5277 (mips_insert_point, mips_remove_point): Adjust to new interface.
5278 Use mips_supports_z_point_type.
5279 (the_low_target): Install mips_supports_z_point_type.
5280 * linux-ppc-low.c (the_low_target): Install NULL as
5281 supports_z_point_type method.
5282 * linux-s390-low.c (the_low_target): Install NULL as
5283 supports_z_point_type method.
5284 * linux-sparc-low.c (the_low_target): Install NULL as
5285 supports_z_point_type method.
5286 * linux-x86-low.c (x86_supports_z_point_type): New function.
5287 (x86_insert_point): Adjust to new insert_point interface. Use
5288 insert_memory_breakpoint. Adjust to new
5289 i386_low_insert_watchpoint interface.
5290 (x86_remove_point): Adjust to remove_point interface. Use
5291 remove_memory_breakpoint. Adjust to new
5292 i386_low_remove_watchpoint interface.
5293 (the_low_target): Install x86_supports_z_point_type.
5294 * lynx-low.c (lynx_target_ops): Install NULL as
5295 supports_z_point_type callback.
5296 * nto-low.c (nto_supports_z_point_type): New.
5297 (nto_insert_point, nto_remove_point): Adjust to new interface.
5298 (nto_target_ops): Install nto_supports_z_point_type.
5299 * mem-break.c: Adjust intro comment.
5300 (struct raw_breakpoint) <raw_type, size>: New fields.
5301 <inserted>: Update comment.
5302 <shlib_disabled>: Delete field.
5303 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5304 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5305 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5306 (raw_bkpt_type_to_target_hw_bp_type): New function.
5307 (find_enabled_raw_code_breakpoint_at): New function.
5308 (find_raw_breakpoint_at): New type and size parameters. Use them.
5309 (insert_memory_breakpoint): New function, based off
5310 set_raw_breakpoint_at.
5311 (remove_memory_breakpoint): New function.
5312 (set_raw_breakpoint_at): Reimplement.
5313 (set_breakpoint): New, based on set_breakpoint_at.
5314 (set_breakpoint_at): Reimplement.
5315 (delete_raw_breakpoint): Go through the_target->remove_point
5316 instead of assuming memory breakpoints.
5317 (find_gdb_breakpoint_at): Delete.
5318 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5319 (find_gdb_breakpoint): New function.
5320 (set_gdb_breakpoint_at): Delete.
5321 (z_type_supported): New function.
5322 (set_gdb_breakpoint_1): New function, loosely based off
5323 set_gdb_breakpoint_at.
5324 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5325 (delete_gdb_breakpoint_at): Delete.
5326 (delete_gdb_breakpoint_1): New function, loosely based off
5327 delete_gdb_breakpoint_at.
5328 (delete_gdb_breakpoint): New function.
5329 (clear_gdb_breakpoint_conditions): Rename to ...
5330 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5331 breakpoint.
5332 (add_condition_to_breakpoint): Make static.
5333 (add_breakpoint_condition): Take a struct breakpoint pointer
5334 instead of an address. Adjust.
5335 (gdb_condition_true_at_breakpoint): Rename to ...
5336 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5337 z_type parameter.
5338 (gdb_condition_true_at_breakpoint): Reimplement.
5339 (add_breakpoint_commands): Take a struct breakpoint pointer
5340 instead of an address. Adjust.
5341 (gdb_no_commands_at_breakpoint): Rename to ...
5342 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5343 parameter. Return true if no breakpoint was found. Change debug
5344 output.
5345 (gdb_no_commands_at_breakpoint): Reimplement.
5346 (run_breakpoint_commands): Rename to ...
5347 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5348 and change return type to boolean.
5349 (run_breakpoint_commands): New function.
5350 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5351 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5352 breakpoint. Go through the_target->remove_point instead of
5353 assuming memory breakpoint.
5354 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5355 software and hardware breakpoints.
5356 (reinsert_raw_breakpoint): Go through the_target->insert_point
5357 instead of assuming memory breakpoint.
5358 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5359 software and hardware breakpoints.
5360 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5361 Check both software and hardware breakpoints.
5362 (validate_inserted_breakpoint): Assert the breakpoint is a
5363 software breakpoint. Set the inserted flag to -1 instead of
5364 setting shlib_disabled.
5365 (delete_disabled_breakpoints): Adjust.
5366 (validate_breakpoints): Only validate software breakpoints.
5367 Adjust to inserted flag change.
5368 (check_mem_read, check_mem_write): Skip breakpoint types other
5369 than software breakpoints. Adjust to inserted flag change.
5370 * mem-break.h (enum raw_bkpt_type): New enum.
5371 (raw_breakpoint, struct process_info): Forward declare.
5372 (Z_packet_to_target_hw_bp_type): Delete declaration.
5373 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5374 (set_gdb_breakpoint, delete_gdb_breakpoint)
5375 (clear_breakpoint_conditions): New declarations.
5376 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5377 (breakpoint_inserted_here): Update comment.
5378 (add_breakpoint_condition, add_breakpoint_commands): Replace
5379 address parameter with a breakpoint pointer parameter.
5380 (gdb_breakpoint_here): Update comment.
5381 (delete_gdb_breakpoint_at): Delete.
5382 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5383 * server.c (process_point_options): Take a struct breakpoint
5384 pointer instead of an address. Adjust.
5385 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5386 delete_gdb_breakpoint.
5387 * spu-low.c (spu_target_ops): Install NULL as
5388 supports_z_point_type method.
5389 * target.h: Include mem-break.h.
5390 (struct target_ops) <prepare_to_access_memory>: Update comment.
5391 <supports_z_point_type>: New field.
5392 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5393 instead of a char. Also take a raw breakpoint pointer.
5394 * win32-arm-low.c (the_low_target): Install NULL as
5395 supports_z_point_type.
5396 * win32-i386-low.c (i386_supports_z_point_type): New function.
5397 (i386_insert_point, i386_remove_point): Adjust to new interface.
5398 (the_low_target): Install i386_supports_z_point_type.
5399 * win32-low.c (win32_supports_z_point_type): New function.
5400 (win32_insert_point, win32_remove_point): Adjust to new interface.
5401 (win32_target_ops): Install win32_supports_z_point_type.
5402 * win32-low.h (struct win32_target_ops):
5403 <supports_z_point_type>: New method.
5404 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5405 instead of a char. Also take a raw breakpoint pointer.
5406
932539e3
PA
54072014-05-20 Pedro Alves <palves@redhat.com>
5408
5409 * mem-break.h: Include break-common.h.
5410 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5411 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5412 (Z_packet_to_target_hw_bp_type): New declaration.
5413 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5414 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5415 (Z_PACKET_ACCESS_WP): Delete macros.
5416 (Z_packet_to_hw_type): Delete function.
5417 * i386-low.h: Don't include break-common.h here.
5418 (Z_packet_to_hw_type): Delete declaration.
5419 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5420 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5421 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5422 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5423 * linux-aarch64-low.c: Don't include break-common.h here.
5424 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5425 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5426 (Z_packet_to_target_hw_bp_type): Delete function.
5427 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5428 function.
5429 (mips_insert_point, mips_remove_point): Use
5430 Z_packet_to_target_hw_bp_type.
5431
4ff0d3d8
PA
54322014-05-20 Pedro Alves <palves@redhat.com>
5433
5434 * linux-aarch64-low.c: Include break-common.h.
5435 (enum target_point_type): Delete.
5436 (Z_packet_to_point_type): Rename to ...
5437 (Z_packet_to_target_hw_bp_type): ... this, and return a
5438 target_hw_bp_type instead.
5439 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5440 instead of an enum target_point_type.
5441 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5442 breakpoint type.
5443 (aarch64_dr_state_insert_one_point)
5444 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5445 (aarch64_handle_aligned_watchpoint)
5446 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5447 Take an enum target_hw_bp_type instead of an enum
5448 target_point_type.
5449 (aarch64_supports_z_point_type): New function.
5450 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5451 use Z_packet_to_target_hw_bp_type.
5452
786dc519
JB
54532014-05-20 Joel Brobecker <brobecker@adacore.com>
5454
5455 * configure.ac: Only use -Werror by default when DEVELOPMENT
5456 is true.
5457 * configure: Regenerate.
5458
9e0aa64f
JK
54592014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5460
5461 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5462 * linux-x86-low.c (X86_64_USER_REGS): New.
5463 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5464
2b577b92
YQ
54652014-04-28 Yao Qi <yao@codesourcery.com>
5466
5467 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5468 name.
5469
94611da2
PA
54702014-04-25 Pedro Alves <palves@redhat.com>
5471
5472 PR server/16255
5473 * linux-low.c (linux_attach_fail_reason_string): New function.
5474 (linux_attach_lwp): Delete.
5475 (linux_attach_lwp_1): Rename to ...
5476 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5477 argument. Remove "initial" parameter. Return int instead of
5478 void. Don't error or warn here.
5479 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5480 failure to attach to the tgid. Call warning when failing to
5481 attach to an lwp.
5482 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5483 argument. Remove "initial" parameter. Return int instead of
5484 void. Don't error or warn here.
5485 (linux_attach_fail_reason_string): New declaration.
5486 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5487 interface change. Use linux_attach_fail_reason_string.
5488
01f9f808
MS
54892014-04-24 Michael Sturm <michael.sturm@mintel.com>
5490 Walfred Tedeschi <walfred.tedeschi@intel.com>
5491
5492 * Makefile.in: Added rules to handle new files
5493 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5494 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5495 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5496 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5497 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5498 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5499 x32-avx512-linux.o.
5500 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5501 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5502 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5503 i386/x32-avx512.xml.
5504 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5505 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5506 i386/x32-avx512-linux.xml.
5507 * i387-fp.c (num_avx512_k_registers): New constant for number
5508 of K registers.
5509 (num_avx512_zmmh_low_registers): New constant for number of
5510 lower ZMM registers (0-15).
5511 (num_avx512_zmmh_high_registers): New constant for number of
5512 higher ZMM registers (16-31).
5513 (num_avx512_ymmh_registers): New contant for number of higher
5514 YMM registers (ymm16-31 added by avx521 on x86_64).
5515 (num_avx512_xmm_registers): New constant for number of higher
5516 XMM registers (xmm16-31 added by AVX512 on x86_64).
5517 (struct i387_xsave): Add space for AVX512 registers.
5518 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5519 Add code to handle AVX512 registers.
5520 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5521 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5522 prototypei from generated file.
5523 (tdesc_amd64_avx512_linux): Likewise.
5524 (init_registers_x32_avx512_linux): Likewise.
5525 (tdesc_x32_avx512_linux): Likewise.
5526 (init_registers_i386_avx512_linux): Likewise.
5527 (tdesc_i386_avx512_linux): Likewise.
5528 (x86_64_regmap): Add AVX512 registers.
5529 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5530 mask.
5531 (initialize_low_arch): Add code to initialize AVX512 registers.
5532
51aa91f9
PA
55332014-04-23 Pedro Alves <palves@redhat.com>
5534
5535 * mem-break.c (find_gdb_breakpoint_at): Make static.
5536 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5537
a4165e94
PA
55382014-04-23 Pedro Alves <palves@redhat.com>
5539
5540 * i386-low.c: Don't include break-common.h here.
5541 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5542 prototype to take target_hw_bp_type as argument instead of a Z
5543 packet char.
5544 * i386-low.h: Include break-common.h here.
5545 (Z_packet_to_hw_type): Declare.
5546 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5547 prototypes.
5548 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5549 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5550 (x86_remove_point): Convert the packet number to a
5551 target_hw_bp_type before calling i386_low_remove_watchpoint.
5552 * win32-i386-low.c (i386_insert_point): Convert the packet number
5553 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5554 (i386_remove_point): Convert the packet number to a
5555 target_hw_bp_type before calling i386_low_remove_watchpoint.
5556
b8acf843
PA
55572014-04-23 Pedro Alves <palves@redhat.com>
5558
5559 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5560
d708bcd1
PA
55612014-04-10 Pedro Alves <palves@redhat.com>
5562
5563 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5564 Check if the condition or command is NULL before checking if the
5565 breakpoint is known. On success, return true.
5566 * mem-break.h (add_breakpoint_condition): Document return.
5567 (add_breakpoint_commands): Add describing comment.
5568 * server.c (skip_to_semicolon): New function.
5569 (process_point_options): Use it.
5570
2eec7d5b
PA
55712014-04-09 Pedro Alves <palves@redhat.com>
5572
5573 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5574 to lwpid_of.
5575
fa96cb38
PA
55762014-02-27 Pedro Alves <palves@redhat.com>
5577
5578 PR 12702
5579 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5580 macros.
5581 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5582 output.
5583 (last_thread_of_process_p): Take a PID argument instead of a
5584 thread pointer.
5585 (linux_wait_for_lwp): Delete.
5586 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5587 functions.
5588 (linux_low_filter_event): New function, party factored out from
5589 linux_wait_for_event.
5590 (linux_wait_for_event): Rename to ...
5591 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5592 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5593 sigsuspend. Check for zombie leaders.
5594 (linux_wait_for_event): Reimplement as wrapper around
5595 linux_wait_for_event_filtered.
5596 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5597 a normal or signal exit is seen, it's the whole process exiting.
5598 (wait_for_sigstop): No longer a for_each_inferior callback.
5599 Rewrite on top of linux_wait_for_event_filtered.
5600 (stop_all_lwps): Call wait_for_sigstop directly.
5601 * server.c (resume, handle_target_event): Handle
5602 TARGET_WAITKIND_NO_RESUMED.
5603
d763de10
JB
56042014-02-26 Joel Brobecker <brobecker@adacore.com>
5605
5606 * win32-low.c (psapi_get_dll_name,
5607 * win32_CreateToolhelp32Snapshot): Delete.
5608 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5609 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5610 Delete.
5611 (handle_load_dll): Add function description.
5612 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5613
850a0f76
JB
56142014-02-26 Joel Brobecker <brobecker@adacore.com>
5615
5616 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5617 Add comment.
5618 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5619 base address when calling win32_add_one_solib.
5620 (handle_load_dll): Delete local variable load_addr.
5621 Remove 0x1000 offset applied to DLL base address when calling
5622 win32_add_one_solib.
5623 (handle_unload_dll): Add comment.
5624
f25b3fc3
JB
56252014-02-26 Joel Brobecker <brobecker@adacore.com>
5626
5627 * win32-low.c (win32_add_all_dlls): Renames
5628 win32_ensure_ntdll_loaded. Rewrite function documentation.
5629 Adjust implementation to always load all DLLs.
5630 Add 0x1000 offset to DLL base address when calling
5631 win32_add_one_solib.
5632 (child_initialization_done): New static global.
5633 (do_initial_child_stuff): Set child_initialization_done to
5634 zero during child initialization, and 1 after. Replace call
5635 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5636 Add comment.
5637 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5638 (handle_unload_dll): Add function documentation.
5639 (get_child_debug_event): Ignore load and unload DLL events
5640 during child initialization.
5641
d86d4aaf
DE
56422014-02-20 Doug Evans <dje@google.com>
5643
3bc32da3 5644 Remove global all_lwps.
d86d4aaf
DE
5645 * inferiors.h (ptid_of): Move here from linux-low.h.
5646 (pid_of, lwpid_of): Ditto.
5647 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5648 parameter is a struct thread_info * now.
5649 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5650 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5651 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5652 directly.
5653 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5654 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5655 * linux-arm-low.c (update_registers_callback): Update, "entry"
5656 parameter is a struct thread_info * now.
5657 Fetch lwpid from current_inferior directly.
5658 (arm_insert_point): Pass &all_threads to find_inferior instead of
5659 &all_lwps.
5660 (arm_remove_point): Ditto.
5661 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5662 (arm_prepare_to_resume): Fetch pid from thread.
5663 (arm_read_description): Fetch lwpid from current_inferior directly.
5664 * linux-low.c (all_lwps): Delete.
5665 (delete_lwp): Delete call to remove_inferior.
5666 (handle_extended_wait): Fetch lwpid from thread.
5667 (add_lwp): Don't set lwp->entry.id. Remove call to
5668 add_inferior_to_list.
5669 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5670 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5671 (kill_one_lwp_callback): Ditto.
5672 (linux_kill): Don't dereference NULL pointer.
5673 Fetch ptid,lwpid from thread.
5674 (get_detach_signal): Fetch ptid from thread.
5675 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5676 Simplify call to regcache_invalidate_thread.
5677 (delete_lwp_callback): Update, "entry" parameter is a
5678 struct thread_info * now. Fetch pid from thread.
5679 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5680 (status_pending_p_callback): Update, "entry" parameter is a
5681 struct thread_info * now. Fetch ptid from thread.
5682 (find_lwp_pid): Update, "entry" parameter is a
5683 struct thread_info * now.
5684 (linux_wait_for_lwp): Fetch pid from thread.
5685 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5686 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5687 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5688 (dequeue_one_deferred_signal): Ditto.
5689 (cancel_breakpoint): Fetch ptid from current_inferior.
5690 (linux_wait_for_event): Pass &all_threads to find_inferior,
5691 not &all_lwps. Fetch ptid, lwpid from thread.
5692 (count_events_callback): Update, "entry" parameter is a
5693 struct thread_info * now.
5694 (select_singlestep_lwp_callback): Ditto.
5695 (select_event_lwp_callback): Ditto.
5696 (cancel_breakpoints_callback): Ditto.
5697 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5698 not &all_lwps.
5699 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5700 (unsuspend_one_lwp): Update, "entry" parameter is a
5701 struct thread_info * now.
5702 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5703 not &all_lwps.
5704 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5705 Fetch lwpid from thread, not lwp.
5706 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5707 Pass &all_threads to find_inferior, not &all_lwps.
5708 (send_sigstop): Fetch lwpid from thread, not lwp.
5709 (send_sigstop_callback): Update, "entry" parameter is a
5710 struct thread_info * now.
5711 (suspend_and_send_sigstop_callback): Ditto.
5712 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5713 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5714 struct thread_info * now.
5715 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5716 from thread, lwp.
5717 (lwp_running): Update, "entry" parameter is a
5718 struct thread_info * now.
5719 (stop_all_lwps): Fetch ptid from thread.
5720 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5721 (linux_resume_one_lwp): Fetch lwpid from thread.
5722 (linux_set_resume_request): Update, "entry" parameter is a
5723 struct thread_info * now. Fetch pid, lwpid from thread.
5724 (resume_status_pending_p): Update, "entry" parameter is a
5725 struct thread_info * now.
5726 (need_step_over_p): Ditto. Fetch lwpid from thread.
5727 (start_step_over): Fetch lwpid from thread.
5728 (linux_resume_one_thread): Update, "entry" parameter is a
5729 struct thread_info * now. Fetch lwpid from thread.
5730 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5731 (proceed_one_lwp): Update, "entry" parameter is a
5732 struct thread_info * now. Fetch lwpid from thread.
5733 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5734 struct thread_info * now.
5735 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5736 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5737 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5738 directly.
5739 (regsets_store_inferior_registers): Ditto.
5740 (fetch_register, store_register): Ditto.
5741 (linux_read_memory, linux_write_memory): Ditto.
5742 (linux_request_interrupt): Ditto.
5743 (linux_read_auxv): Ditto.
5744 (linux_xfer_siginfo): Ditto.
5745 (linux_qxfer_spu): Ditto.
5746 (linux_qxfer_libraries_svr4): Ditto.
5747 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5748 moved to inferiors.h.
5749 (get_lwp): Delete.
5750 (get_thread_lwp): Update.
5751 (struct lwp_info): Delete member "entry". Simplify comment for
5752 member "thread".
5753 (all_lwps): Delete.
5754 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5755 current_inferior directly.
5756 (update_watch_registers_callback): Update, "entry" parameter is a
5757 struct thread_info * now. Fetch pid from thread.
5758 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5759 (mips_insert_point): Fetch lwpid from current_inferior.
5760 Pass &all_threads to find_inferior, not &all_lwps.
5761 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5762 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5763 directly.
5764 (mips_stopped_data_address): Ditto.
5765 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5766 directly.
5767 * linux-tile-low.c (tile_arch_setup): Ditto.
5768 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5769 (update_debug_registers_callback): Update, "entry" parameter is a
5770 struct thread_info * now. Fetch pid from thread.
5771 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5772 Pass &all_threads to find_inferior, not &all_lwps.
5773 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5774 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5775 Pass &all_threads to find_inferior, not &all_lwps.
5776 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5777 (i386_dr_low_get_status): Ditto.
5778 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5779 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5780 (x86_linux_read_description): Ditto.
5781 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5782
3b8361aa
DE
57832014-02-20 Doug Evans <dje@google.com>
5784
5785 * inferiors.c (get_first_inferior): Fix buglet.
5786
f7667f0d
DE
57872014-02-19 Doug Evans <dje@google.com>
5788
5789 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5790 * inferiors.c (add_thread): Change result type to struct thread_info *.
5791 All callers updated.
5792 (add_lwp): Call add_thread here instead of in callers.
5793 All callers updated.
5794 * linux-low.h (get_lwp_thread): Rewrite.
5795 (struct lwp_info): New member "thread".
5796
b3312d80
DE
57972014-02-19 Doug Evans <dje@google.com>
5798
5799 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5800 All callers updated.
5801
ecc6f45c
DE
58022014-02-19 Doug Evans <dje@google.com>
5803
5804 * inferiors.c (add_thread): Fix whitespace.
5805
649ebbca
DE
58062014-02-19 Doug Evans <dje@google.com>
5807
5808 * dll.c (clear_dlls): Replace accessing list implemention details
5809 with API function.
5810 * gdbthread.h (get_first_thread): Declare.
5811 * inferiors.c (for_each_inferior_with_data): New function.
5812 (get_first_thread): New function.
5813 (find_thread_ptid): Simplify.
5814 (get_first_inferior): New function.
5815 (clear_list): Delete.
5816 (one_inferior_p): New function.
5817 (clear_inferior_list): New function.
5818 (clear_inferiors): Update.
5819 * inferiors.h (for_each_inferior_with_data): Declare.
5820 (clear_inferior_list): Declare.
5821 (one_inferior_p): Declare.
5822 (get_first_inferior): Declare.
5823 * linux-low.c (linux_wait_for_event): Replace accessing list
5824 implemention details with API function.
5825 * server.c (target_running): Ditto.
5826 (accumulate_file_name_length): New function.
5827 (emit_dll_description): New function.
5828 (handle_qxfer_libraries): Replace accessing list implemention
5829 details with API function.
5830 (handle_qxfer_threads_worker): New function.
5831 (handle_qxfer_threads_proper): Replace accessing list implemention
5832 details with API function.
5833 (handle_query): Ditto.
5834 (visit_actioned_threads_callback_ftype): New typedef.
5835 (visit_actioned_threads_data): New struct.
5836 (visit_actioned_threads): Rewrite to be find_inferior callback.
5837 (resume): Call find_inferior.
5838 (handle_status): Replace accessing list implemention
5839 details with API function.
5840 (process_serial_event): Replace accessing list implemention details
5841 with API function.
5842 * target.c (set_desired_inferior): Replace accessing list implemention
5843 details with API function.
5844 * tracepoint.c (same_process_p): New function.
5845 (gdb_agent_about_to_close): Replace accessing list implemention
5846 details with API function.
5847 * win32-low.c (child_delete_thread): Replace accessing list
5848 implemention details with API function.
5849 (match_dll_by_basename): New function.
5850 (dll_is_loaded_by_basename): New function.
5851 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5852 details call to dll_is_loaded_by_basename.
5853
80894984
DE
58542014-02-19 Doug Evans <dje@google.com>
5855
5856 * dll.h (struct dll_info): Add comment.
5857 * gdbthread.h (struct thread_info): Add comment.
5858 (current_ptid): Simplify.
5859 * inferiors.c (add_process): Update.
5860 (remove_process): Update.
5861 * inferiors.h (struct process_info): Rename member "head" to "entry".
5862 * linux-low.c (delete_lwp): Update.
5863 (add_lwp): Update.
5864 (last_thread_of_process_p): Update.
5865 (kill_one_lwp_callback, linux_kill): Update.
5866 (status_pending_p_callback): Update.
5867 (wait_for_sigstop): Update. Simplify read of ptid.
5868 (start_step_over): Update.
5869 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5870 (get_lwp_thread): Update.
5871 (struct lwp_info): Rename member "head" to "entry".
5872 * regcache.h (inferior_list_entry): Delete.
5873 * server.c (kill_inferior_callback): Update.
5874 (detach_or_kill_inferior_callback): Update.
5875 (print_started_pid): Update.
5876 (print_attached_pid): Update.
5877 (process_serial_event): Simplify read of ptid.
5878 * thread-db.c (thread_db_create_event): Update.
5879 (thread_db_get_tls_address): Update.
5880 * win32-low.c (current_inferior_ptid): Simplify.
5881
46917d26
TT
58822014-02-19 Tom Tromey <tromey@redhat.com>
5883
5884 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5885 argument.
5886 (target_supports_btrace): Update.
5887
0759a81e
YQ
58882014-02-14 Yao Qi <yao@codesourcery.com>
5889
5890 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5891 (rsp-low-ipa.o): New target.
5892
a7191e8b
TT
58932014-02-12 Tom Tromey <tromey@redhat.com>
5894
5895 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5896 convert_ascii_to_int.
5897 * regcache.c (registers_to_string): Likewise.
5898 * remote-utils.c (decode_M_packet): Likewise.
5899 * server.c (process_serial_event): Likewise.
5900
ff0e980e
TT
59012014-02-12 Tom Tromey <tromey@redhat.com>
5902
5903 * server.c (handle_query, handle_v_run): Use hex2bin, not
5904 unhexify.
5905 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5906
e9371aff
TT
59072014-02-12 Tom Tromey <tromey@redhat.com>
5908
5909 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5910 convert_int_to_ascii.
5911 * regcache.c (registers_to_string, collect_register_as_string):
5912 Likewise.
5913 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5914 Likewise.
5915 * server.c (process_serial_event): Likewise.
5916 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5917 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5918
971dc0b8
TT
59192014-02-12 Tom Tromey <tromey@redhat.com>
5920
5921 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5922 bin2hex, not hexify.
5923 * tracepoint.c (cmd_qtstatus): Likewise.
5924
0a822afb
TT
59252014-02-12 Tom Tromey <tromey@redhat.com>
5926
5927 * remote-utils.c (monitor_output): Pass explicit length to
5928 hexify.
5929
9c3d6531
TT
59302014-02-12 Tom Tromey <tromey@redhat.com>
5931
5932 * tracepoint.c: Include rsp-low.h.
5933 * server.c: Include rsp-low.h.
5934 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5935 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5936 declare.
5937 * remote-utils.c: Include rsp-low.h.
5938 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5939 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5940 (convert_int_to_ascii, convert_ascii_to_int): Move to
5941 common/rsp-low.c.
5942 * regcache.c: Include rsp-low.h.
5943 * ax.c: Include rsp-low.h.
5944 * Makefile.in (SFILES): Add common/rsp-low.c.
5945 (OBS): Add rsp-low.o.
5946 (rsp-low.o): New target.
5947
01fd3ea5
TT
59482014-02-12 Tom Tromey <tromey@redhat.com>
5949
5950 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5951 Include print-utils.h.
5952 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5953 (plongest, thirty_two, phex_nz): Remove.
5954 * Makefile.in (SFILES): Add common/print-utils.c.
5955 (OBS): Add print-utils.o.
5956 (print-utils-ipa.o): New target.
5957 (print-utils.o): New target.
5958 (IPA_OBJS): Add print-utils-ipa.o.
5959
e99dc820
TT
59602014-02-06 Tom Tromey <tromey@redhat.com>
5961
5962 * Makefile.in (SFILES): Fix indentation.
5963
ee1e2d4f
DE
59642014-02-05 Doug Evans <dje@google.com>
5965
5966 * linux-low.c (linux_wait_for_event): Improve comment.
5967 (linux_wait_1): Keep current_inferior in sync with event_child.
5968
f5a02773
DE
59692014-01-22 Doug Evans <dje@google.com>
5970
5971 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5972
87ce2a04
DE
59732014-01-22 Doug Evans <dje@google.com>
5974
5975 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5976 * configure: Regenerate.
5977 * config.in: Regenerate.
5978 * Makefile.in (SFILES): Add debug.c.
5979 (OBS): Add debug.o.
5980 * debug.c: New file.
5981 * debug.h: New file.
5982 * linux-aarch64-low.c (*): Update all debugging printfs to use
5983 debug_printf instead of fprintf.
5984 * linux-arm-low.c (*): Ditto.
5985 * linux-cris-low.c (*): Ditto.
5986 * linux-crisv32-low.c (*): Ditto.
5987 * linux-m32r-low.c (*): Ditto.
5988 * linux-sparc-low.c (*): Ditto.
5989 * linux-x86.c (*): Ditto.
5990 * linux-low.c (*): Ditto.
5991 (linux_wait_1): Add calls to debug_enter, debug_exit.
5992 (linux_wait): Remove redundant debugging printf.
5993 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5994 (linux_resume, unstop_all_lwps): Ditto.
5995 * mem-break.c (*): Update all debugging printfs to use
5996 debug_printf instead of fprintf.
5997 * remote-utils.c (*): Ditto.
5998 * thread-db.c (*): Ditto.
5999 * server.c #include <ctype.h>, "gdb_vecs.h".
6000 (debug_threads): Moved to debug.c.
6001 (*): Update all debugging printfs to use debug_printf instead of
6002 fprintf.
6003 (start_inferior): Replace call to fflush with call to debug_flush.
6004 (monitor_show_help): Mention set debug-format.
6005 (parse_debug_format_options): New function.
6006 (handle_monitor_command): Handle "monitor set debug-format".
6007 (gdbserver_usage): Mention --debug-format.
6008 (main): Parse --debug-format.
6009 * server.h (debug_threads): Declaration moved to debug.h.
6010 #include "debug.h".
6011 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6012 trace_debug_1 that uses debug_printf.
6013 (tracepoint_look_up_symbols): Update all debugging printfs to use
6014 debug_printf instead of fprintf.
6015
e671835b
BS
60162014-01-20 Baruch Siach <baruch@tkos.co.il>
6017
6018 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6019 sys/ptrace.h.
6020
b5737fa9
PA
60212014-01-17 Pedro Alves <palves@redhat.com>
6022
ea38d2a9 6023 PR build/16445
c7faa97a
PA
6024 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6025 defined after including gdb_proc_service.h.
b5737fa9 6026
40ed484e
DE
60272014-01-16 Doug Evans <dje@google.com>
6028
6029 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6030 (match_dll): Use it.
6031
969c39fb
MM
60322014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6033
6034 * target.h (target_ops) <read_btrace>: Change parameters and
6035 return type to allow error reporting.
6036 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6037 trace reading errors on.
6038 * linux-low.c (linux_low_read_btrace): Pass trace reading
6039 errors on.
6040 (linux_low_disable_btrace): New.
6041
ab7f45ba
DE
60422014-01-15 Doug Evans <dje@google.com>
6043
6044 * inferiors.c (thread_id_to_gdb_id): Delete.
6045 * inferiors.h (thread_id_to_gdb_id): Delete.
6046
66af0f44
EZ
60472014-01-13 Eli Zaretskii <eliz@gnu.org>
6048
6049 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6050 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6051 versions.
6052
9939e131
PA
60532014-01-08 Pedro Alves <palves@redhat.com>
6054
6055 * server.c (handle_status): Don't discard previous queued stop
6056 replies or thread's pending status here.
6057 (main) <disconnection>: Do it here instead.
6058
b7ea362b
PA
60592014-01-08 Pedro Alves <palves@redhat.com>
6060
6061 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6062 * server.c (visit_actioned_threads, handle_pending_status): New
6063 function.
6064 (handle_v_cont): Factor out parts to ...
6065 (resume): ... this new function. If in all-stop, and a thread
6066 being resumed has a pending status, report it without actually
6067 resuming.
6068 (myresume): Adjust to use the new 'resume' function.
6069 (clear_pending_status_callback, set_pending_status_callback)
6070 (find_status_pending_thread_callback): New functions.
6071 (handle_status): Handle the case of multiple threads having
6072 interesting statuses to report. Report threads' real last signal
6073 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6074 with an interesting thread to report the status for, instead of
6075 always reporting the status of the first thread.
6076
28498c42
JB
60772014-01-01 Joel Brobecker <brobecker@adacore.com>
6078
6079 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6080 * gdbreplay.c (gdbreplay_version): Likewise.
6081
f45c82da
YZ
60822013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6083
6084 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6085 iov.iov_len with the real length in use.
6086
379a5e2d
JB
60872013-12-13 Joel Brobecker <brobecker@adacore.com>
6088
6089 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6090 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6091 for all targets that use win32-low.c.
6092 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6093 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6094
4210d83e
PA
60952013-12-13 Pedro Alves <palves@redhat.com>
6096
6097 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6098 if equal to TARGET_WAITKIND_LOADED.
6099 * win32-low.c (cached_status): New static global.
6100 (win32_wait): Add declaration.
6101 (do_initial_child_stuff): Flush all initial pending debug events
6102 up to the initial breakpoint.
6103 (win32_wait): If CACHED_STATUS was set, return that instead
6104 of doing a real wait. Remove the code resuming the execution
6105 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6106 during the initial phase. Also remove the code changing
6107 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6108 TARGET_WAITKIND_STOPPED.
6109
e7f0d979
YQ
61102013-12-11 Yao Qi <yao@codesourcery.com>
6111
6112 * notif.c (handle_notif_ack): Return 0 if no notification
6113 matches.
6114
ebcf782c
DE
61152013-11-20 Doug Evans <dje@google.com>
6116
6117 * linux-low.c (linux_set_resume_request): Fix comment.
6118
20ad9378
DE
61192013-11-20 Doug Evans <dje@google.com>
6120
6121 * linux-low.c (resume_status_pending_p): Tweak comment.
6122
a196ebeb
WT
61232013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6124
6125 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6126 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6127 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6128 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6129 (srv_amd64_regobj): Add amd64-mpx.o.
6130 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6131 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6132 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6133 * i387-fp.c (num_pl_bnd_register) Added constant.
6134 (num_pl_bnd_cfg_registers) Added constant.
6135 (struct i387_xsave) Added reserved area and MPX fields.
6136 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6137 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6138 function.
6139 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6140 (init_registers_amd64_mpx_linux): Declare new function.
6141 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6142 (x86_64_regmap): Add MPX registers.
6143 (x86_linux_read_description): Add MPX case.
6144 (initialize_low_arch): Initialize MPX targets.
6145
0080a2f6
TT
61462013-11-18 Tom Tromey <tromey@redhat.com>
6147
6148 * configure: Rebuild.
6149 * configure.ac: Don't check for stdlib.h.
6150 * gdbreplay.c: Unconditionally include stdlib.h.
6151
2978b111
TT
61522013-11-18 Tom Tromey <tromey@redhat.com>
6153
6154 * config.in: Rebuild.
6155 * configure: Rebuild.
6156 * configure.ac: Don't use AC_HEADER_DIRENT.
6157
a3d08894
TT
61582013-11-18 Tom Tromey <tromey@redhat.com>
6159
6160 * server.h: Don't check HAVE_STRING_H.
6161 * gdbreplay.c: Don't check HAVE_STRING_H.
6162 * configure: Rebuild.
6163
0a5dd17d
TT
61642013-11-18 Tom Tromey <tromey@redhat.com>
6165
6166 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6167 LIBGNU.
6168
1bd2f0ba
TT
61692013-11-08 Tom Tromey <tromey@redhat.com>
6170
6171 * configure, config.in: Rebuild.
6172 * configure.ac: Remove unused configury.
6173
3266f10b
TT
61742013-11-08 Tom Tromey <tromey@redhat.com>
6175
6176 * acinclude.m4: Include common.m4, codeset.m4.
6177 * configure, config.in: Rebuild.
6178 * configure.ac: Use GDB_AC_COMMON.
6179
6682d959
AA
61802013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6181
6182 * linux-s390-low.c (HWCAP_S390_TE): New define.
6183 (s390_arch_setup): Consider the TE field in the HWCAP for
6184 determining 'have_regset_tdb'.
6185
fd0a4d76
SDJ
61862013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6187
6188 PR gdb/16014
6189 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6190 call to sizeof.
6191
1a3d890b
PA
61922013-10-02 Pedro Alves <palves@redhat.com>
6193
6194 * server.c (process_serial_event): Don't output "GDBserver
6195 exiting" if GDB is connected through stdio.
6196 * target.c (mywait): Likewise, be silent if GDB is connected
6197 through stdio.
6198
97ad4581
JB
61992013-10-01 Joel Brobecker <brobecker@adacore.com>
6200
6201 * lynx-low.c (lynx_add_threads_after_attach): New function.
6202 (lynx_attach): Remove call to add_thread. Add call to
6203 lynx_add_threads_after_attach instead.
6204
5b4e221c
MF
62052013-09-28 Mike Frysinger <vapier@gentoo.org>
6206
6207 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6208 * config.in, configure: Regenerated.
6209
ee47b2f8
YQ
62102013-09-18 Yao Qi <yao@codesourcery.com>
6211
6212 PR server/15959
6213 * server.c (start_inferior): Clear 'resume_info'.
6214
d6707650 62152013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6216
d6707650
JW
6217 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6218 for each register.
6219
9243dd0e 62202013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6221
9243dd0e
JW
6222 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6223 linux-tile-low.o to srv_tgtobj.
6224
c623a6ef
WN
62252013-09-16 Will Newton <will.newton@linaro.org>
6226
6227 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6228 out regs.
6229
fb71d39e
PA
62302013-09-06 Pedro Alves <palves@redhat.com>
6231
6232 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6233 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6234 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6235 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6236 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6237 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6238
8e7e9910
PA
62392013-09-06 Pedro Alves <palves@redhat.com>
6240
6241 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6242 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6243
7c3a12ca
PA
62442013-09-06 Pedro Alves <palves@redhat.com>
6245
6246 * linux-amd64-ipa.c: Include tracepoint.h.
6247 * linux-i386-ipa.c: Include tracepoint.h.
6248
8eb3d7b6
RW
62492013-09-06 Ricard Wanderlof <ricardw@axis.com>
6250
6251 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6252 (ps_get_thread_area): New function.
6253
eddddb9d
RW
62542013-09-06 Ricard Wanderlof <ricardw@axis.com>
6255
6256 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6257 (initialize_low_arch): Call init_registers_crisv32 rather than
6258 init_register_crisv32.
6259
533b0600
PA
62602013-09-05 Pedro Alves <palves@redhat.com>
6261
6262 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6263 to ...
6264 * hostio.h: ... this new file.
6265 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6266 win32-low.c: Include hostio.h.
6267
0ce3d3b5
PA
62682013-09-05 Pedro Alves <palves@redhat.com>
6269
6270 * server.h (gdb_client_data, handler_func, callback_handler_func)
6271 (delete_file_handler, add_file_handler, append_callback_event)
6272 (delete_callback_event, start_event_loop, initialize_event_loop):
6273 Move to event-loop.h and include it.
6274 * event-loop.h: New file.
6275
799cdc37
PA
62762013-09-05 Pedro Alves <palves@redhat.com>
6277
6278 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6279 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6280 (loaded_dll, unloaded_dll): Move to ...
6281 * dll.h: ... this new file.
6282 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6283
6a6bbd9d
PA
62842013-09-05 Pedro Alves <palves@redhat.com>
6285
6286 * server.h (current_process, get_thread_process, all_processes)
6287 (add_inferior_to_list, for_each_inferior, current_inferior)
6288 (remove_inferior, add_process, remove_process, find_process_pid)
6289 (have_started_inferiors_p, have_attached_inferiors_p)
6290 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6291 (clear_inferiors, find_inferior, find_inferior_id)
6292 (inferior_target_data, set_inferior_target_data)
6293 (inferior_regcache_data, set_inferior_regcache_data): Move to
6294 inferiors.h, and include it.
6295 * inferiors.h: New file.
6296
f699aaba
PA
62972013-09-05 Pedro Alves <palves@redhat.com>
6298
6299 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6300 Move ...
72f4393d 6301 * ax.h: ... here.
f699aaba 6302
c144c7a0
PA
63032013-09-05 Pedro Alves <palves@redhat.com>
6304
6305 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6306 tracepoint.h.
6307 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6308 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6309 (handle_tracepoint_general_set, handle_tracepoint_query)
6310 (tracepoint_finished_step, tracepoint_was_hit)
6311 (release_while_stepping_state_list, current_traceframe)
6312 (in_readonly_region, traceframe_read_mem)
6313 (fetch_traceframe_registers, traceframe_read_sdata)
6314 (traceframe_read_info, struct fast_tpoint_collect_status)
6315 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6316 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6317 (supply_fast_tracepoint_registers)
6318 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6319 (ipa_tdesc, claim_trampoline_space)
6320 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6321 (agent_mem_read, agent_get_trace_state_variable_value)
6322 (agent_set_trace_state_variable_value, agent_tsv_read)
6323 (agent_mem_read_string, get_raw_reg_func_addr)
6324 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6325 * tracepoint.h: ... this new file.
6326
ff42e6ab
PA
63272013-09-05 Pedro Alves <palves@redhat.com>
6328
6329 * server.h (perror_with_name, error, fatal, warning, paddress)
6330 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6331 include it.
6332 * utils.h: New file.
6333
541af0f4
PA
63342013-09-05 Pedro Alves <palves@redhat.com>
6335
6336 * server.h (remote_debug, noack_mode, transport_is_reliable)
6337 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6338 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6339 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6340 (write_enn, initialize_async_io, enable_async_io)
6341 (disable_async_io, check_remote_input_interrupt_request)
6342 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6343 (dead_thread_notify, prepare_resume_reply)
6344 (decode_address_to_semicolon, decode_address, decode_m_packet)
6345 (decode_M_packet, decode_X_packet, decode_xfer_write)
6346 (decode_search_memory_packet, unhexify, hexify)
6347 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6348 (look_up_one_symbol, relocate_instruction)
6349 (monitor_output): Move to remote-utils.h, and include it.
6350 * remote-utils.h: New file.
6351
eebdf26b
PA
63522013-09-05 Pedro Alves <palves@redhat.com>
6353
6354 * server.h (_): Delete.
6355
3aafd2ff
PA
63562013-09-02 Pedro Alves <palves@redhat.com>
6357
6358 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6359 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6360 allocated.
6361 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6362
cee83bcb
PM
63632013-09-02 Pierre Muller <muller@sourceware.org>
6364
6365 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6366 or WriteProcessMemory complete successfully and handle
6367 ERROR_PARTIAL_COPY error.
6368
9a13b2fa
PA
63692013-09-02 Pedro Alves <palves@redhat.com>
6370
6371 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6372 error instead of EIO.
6373
602e3198
JK
63742013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6375
6376 PR server/15604
6377 * linux-low.c: Include filestuff.h.
6378 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6379 * lynx-low.c: Include filestuff.h.
6380 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6381 * server.c: Include filestuff.h.
6382 (main): Call notice_open_fds.
6383 * spu-low.c: Include filestuff.h.
6384 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6385
96d7229d
LM
63862013-08-22 Luis Machado <lgustavo@codesourcery.com>
6387
6388 * Makefile.in: Explain why ../target and ../nat are not
6389 listed as include file search paths.
6390 (linux-waitpid.o): New object file rule.
6391 * configure.srv (srv_native_linux_obj): New variable.
6392 Replace all occurrences of linux native object files with
6393 $srv_native_linux_obj.
6394 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6395 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6396 (linux_enable_event_reporting): Remove declaration.
6397 (my_waitpid): Moved to common/linux-waitpid.c.
6398 (linux_wait_for_event): Pass ptid when calling
6399 linux_enable_event_reporting.
6400 (linux_supports_tracefork_flag): Remove.
6401 (linux_enable_event_reporting): Likewise.
6402 (linux_tracefork_grandchild): Remove.
6403 (STACK_SIZE): Moved to common/linux-ptrace.c.
6404 (linux_tracefork_child): Remove.
6405 (linux_test_for_tracefork): Remove.
6406 (linux_look_up_symbols): Call linux_supports_traceclone.
6407 (initialize_low): Remove call to linux_test_for_tracefork.
6408 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6409 common/linux-ptrace.h.
6410 (PTRACE_TYPE_ARG4): Likewise.
6411 Include linux-ptrace.h.
6412
32940073
PA
64132013-08-21 Pedro Alves <palves@redhat.com>
6414
6415 * config.in: Renegerate.
6416
33b60d58 64172013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6418
33b60d58
LM
6419 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6420 (SFILES): Remove $(srcdir)/common/target-common.c and
6421 add $(srcdir)/target/waitstatus.c.
6422 (OBS): Remove target-common.o and add waitstatus.o.
6423 (server_h): Remove $(srcdir)/../common/target-common.h and
6424 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6425 and $(srcdir)/../target/waitstatus.h.
6426 (target-common.o): Remove.
6427 (waitstatus.o): New target object file.
6428 * target.h: Do not include target-common.h and
6429 include target/resume.h, target/wait.h and
6430 target/waitstatus.h.
6431
b8e1b30e
LM
64322013-08-13 Luis Machado <lgustavo@codesourcery.com>
6433
6434 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6435 to PTRACE_TYPE_ARG3.
6436 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6437 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6438 PTRACE_TYPE_ARG4.
6439 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6440 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6441
7a60ad40
YQ
64422013-07-27 Jie Zhang <jie@codesourcery.com>
6443 Daniel Jacobowitz <dan@codesourcery.com>
6444 Yao Qi <yao@codesourcery.com>
6445
6446 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6447 (mips-linux-watch.o): New rule.
6448 (mips_linux_watch_h): New variable.
6449 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6450 srv_tgtobj.
6451 * linux-mips-low.c: Include mips-linux-watch.h.
6452 (struct arch_process_info, struct arch_lwp_info): New.
6453 (update_watch_registers_callback): New function.
6454 (mips_linux_new_process, mips_linux_new_thread) New functions.
6455 (mips_linux_prepare_to_resume, mips_insert_point): New
6456 functions.
6457 (mips_remove_point, mips_stopped_by_watchpoint): New
6458 functions.
6459 (rsp_bp_type_to_target_hw_bp_type): New function.
6460 (mips_stopped_data_address): New function.
6461 (the_low_target): Add watchpoint support functions.
6462
de6f69ad
YQ
64632013-07-27 Yao Qi <yao@codesourcery.com>
6464
6465 * i386-low.c: Include break-common.h.
6466 (enum target_hw_bp_type): Remove.
6467
3360c0bf
LM
64682013-07-24 Luis Machado <lgustavo@codesourcery.com>
6469
6470 * Makefile.in (SFILES): /common/target-common.c.
6471 (OBS): Add target-common.o.
6472 (server_h): Add $(srcdir)/../common/target-common.h.
6473 (target-common.o): New target.
6474 * server.c (queue_stop_reply_callback): Free
6475 status string after use.
6476 * target.c (target_waitstatus_to_string): Remove.
6477 * target.h: Include target-common.h.
6478 (resume_kind): Likewise.
6479 (target_waitkind): Likewise.
6480 (target_waitstatus): Likewise.
6481 (TARGET_WNOHANG): Likewise.
6482
bd885420
YQ
64832013-07-04 Yao Qi <yao@codesourcery.com>
6484
6485 * Makefile.in (host_alias): Use @host_noncanonical@.
6486 (target_alias): Use @target_noncanonical@.
6487 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6488 ACX_NONCANONICAL_HOST.
6489 * configure: Regenerated.
6490
6491 Revert:
6492 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6493
6494 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6495 * configure: Rebuild.
6496 * Makefile.in (version_host, version_target): Get from configure.
6497 (version.c): Use $(version_host) and $(version_target).
6498
17ef446e
PA
64992013-07-03 Pedro Alves <palves@redhat.com>
6500
6501 * Makefile.in (config.status): Depend on development.sh.
6502 * acinclude.m4: Include libmcheck.m4.
6503 * configure: Regenerate.
6504
7a9a7487
MG
65052013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6506
6507 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6508 attribute inside the parentheses.
6509 (winapi_DebugSetProcessKillOnExit): Ditto.
6510 (winapi_DebugBreakProcess): Ditto.
6511 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6512
49b64de6
MG
65132013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6514
6515 * notif.h (notif_event): Add a dummy member to avoid compiler
6516 errors.
6517
d5749ee7
PA
65182013-07-01 Pedro Alves <palves@redhat.com>
6519
6520 * hostio.c (HOSTIO_PATH_MAX): Define.
6521 (require_filename, handle_open, handle_unlink, handle_readlink):
6522 Use it.
6523
d8d2a3ee
PA
65242013-07-01 Pedro Alves <palves@redhat.com>
6525
6526 * server.h: Include "pathmax.h".
6527 * linux-low.c: Don't include sys/param.h.
6528 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6529 MAXPATHLEN.
6530 * win32-low.c: Don't include sys/param.h.
6531 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6532
bc7dea8d
PA
65332013-07-01 Pedro Alves <palves@redhat.com>
6534
6535 * event-loop.c: Don't check HAVE_UNISTD_H before including
6536 <unistd.h>.
6537 * gdbreplay.c: Likewise.
6538 * remote-utils.c: Likewise.
6539 * server.c: Likewise.
6540 * configure.ac: Don't check for unistd.h.
6541 * configure: Regenerate.
6542
d6c2da54
TT
65432013-06-28 Tom Tromey <tromey@redhat.com>
6544
6545 * Makefile.in (version.c): Use version.in, not
6546 common/version.in.
6547
257b6bec
MG
65482013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6549
6550 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6551 * configure: Rebuild.
6552 * Makefile.in (version_host, version_target): Get from configure.
6553 (version.c): Use $(version_host) and $(version_target).
6554
86ebe149
DK
65552013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6556
6557 Fix trace-status to output user name without trailing colon.
6558 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6559
f30aa5af
DK
65602013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6561
6562 Fix trace-status to output proper start-time and stop-time.
6563 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6564 output start time and stop time in hex as gdb expects.
6565
28a93511
YQ
65662013-06-26 Pedro Alves <pedro@codesourcery.com>
6567
6568 * tracepoint.c (build_traceframe_info_xml): Output trace state
6569 variables present in the trace buffer.
6570
01208463
TT
65712013-06-24 Tom Tromey <tromey@redhat.com>
6572
6573 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6574 create-version.sh.
6575 (version.o): Remove.
6576 * gdbreplay.c: Include version.h.
6577 (version, host_name): Don't declare.
6578 * server.h: Include version.h.
6579 (version, host_name): Don't declare.
6580
760256f9
PA
65812013-06-12 Pedro Alves <palves@redhat.com>
6582
6583 * linux-x86-low.c (linux_is_elf64): Delete global.
6584 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6585 with local linux_pid_exe_is_elf_64_file use.
6586
030031ee
PA
65872013-06-11 Pedro Alves <palves@redhat.com>
6588
6589 * linux-low.c (regset_disabled, disable_regset): New functions.
6590 (regsets_fetch_inferior_registers)
6591 (regsets_store_inferior_registers): Use them.
6592 (initialize_regsets_info); Don't allocate the disabled_regsets
6593 array here.
6594 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6595 comment.
6596
5da6eb0a
PA
65972013-06-11 Pedro Alves <palves@redhat.com>
6598
6599 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6600 xmalloc.
6601
7e5aaa09
PA
66022013-06-11 Pedro Alves <palves@redhat.com>
6603
6604 * linux-x86-low.c (initialize_low_arch): Call
6605 init_registers_x32_avx_linux.
6606
d878444c
JK
66072013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6608
6609 Fix compatibility with Android Bionic.
6610 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6611 it is not empty.
6612
3aee8918
PA
66132013-06-07 Pedro Alves <palves@redhat.com>
6614
5f2b57b5 6615 PR server/14823
3aee8918
PA
6616 * Makefile.in (OBS): Add tdesc.o.
6617 (IPA_OBJS): Add tdesc-ipa.o.
6618 (tdesc-ipa.o): New rule.
6619 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6620 interface.
6621 * linux-low.c (new_inferior): Delete.
6622 (disabled_regsets, num_regsets): Delete.
6623 (linux_add_process): Adjust to set the new per-process
6624 new_inferior flag.
6625 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6626 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6627 was a stop. When calling arch_setup, switch the current inferior
6628 to the thread that got an event.
6629 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6630 (regsets_fetch_inferior_registers)
6631 (regsets_store_inferior_registers): New regsets_info parameter.
6632 Adjust to use it.
6633 (linux_register_in_regsets): New regs_info parameter. Adjust to
6634 use it.
6635 (register_addr, fetch_register, store_register): New usrregs_info
6636 parameter. Adjust to use it.
6637 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6638 parameter regs_info. Adjust to use it.
6639 (linux_fetch_registers): Get the current inferior's regs_info, and
6640 adjust to use it.
6641 (linux_store_registers): Ditto.
6642 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6643 (initialize_low): Don't initialize the target_regsets here. Call
6644 initialize_low_arch.
6645 * linux-low.h (target_regsets): Delete declaration.
6646 (struct regsets_info): New.
6647 (struct usrregs_info): New.
6648 (struct regs_info): New.
6649 (struct process_info_private) <new_inferior>: New field.
6650 (struct linux_target_ops): Delete the num_regs, regmap, and
6651 regset_bitmap fields. New field regs_info.
6652 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6653 * i387-fp.c (num_xmm_registers): Delete.
6654 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6655 calls to new interface.
6656 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6657 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6658 Infer the number of xmm registers from the regcache's target
6659 description.
6660 * i387-fp.h (num_xmm_registers): Delete.
6661 * inferiors.c (add_thread): Don't install the thread's regcache
6662 here.
6663 * proc-service.c (gregset_info): Fetch the current inferior's
6664 regs_info. Adjust to use it.
6665 * regcache.c: Include tdesc.h.
6666 (register_bytes, reg_defs, num_registers)
6667 (gdbserver_expedite_regs): Delete.
6668 (get_thread_regcache): If the thread doesn't have a regcache yet,
6669 create one, instead of aborting gdbserver.
6670 (regcache_invalidate_one): Rename to ...
6671 (regcache_invalidate_thread): ... this.
6672 (regcache_invalidate_one): New.
6673 (regcache_invalidate): Only invalidate registers of the current
6674 process.
6675 (init_register_cache): Add target_desc parameter, and use it.
6676 (new_register_cache): Ditto. Assert the target description has a
6677 non zero registers_size.
6678 (regcache_cpy): Add assertions. Adjust.
6679 (realloc_register_cache, set_register_cache): Delete.
6680 (registers_to_string, registers_from_string): Adjust.
6681 (find_register_by_name, find_regno, find_register_by_number)
6682 (register_cache_size): Add target_desc parameter, and use it.
6683 (free_register_cache_thread, free_register_cache_thread_one)
6684 (regcache_release, register_cache_size): New.
6685 (register_size): Add target_desc parameter, and use it.
6686 (register_data, supply_register, supply_register_zeroed)
6687 (supply_regblock, supply_register_by_name, collect_register)
6688 (collect_register_as_string, collect_register_by_name): Adjust.
6689 * regcache.h (struct target_desc): Forward declare.
6690 (struct regcache) <tdesc>: New field.
6691 (init_register_cache, new_register_cache): Add target_desc
6692 parameter.
6693 (regcache_invalidate_thread): Declare.
6694 (regcache_invalidate_one): Delete declaration.
6695 (regcache_release): Declare.
6696 (find_register_by_number, register_cache_size, register_size)
6697 (find_regno): Add target_desc parameter.
6698 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6699 declarations.
6700 * remote-utils.c: Include tdesc.h.
6701 (outreg, prepare_resume_reply): Adjust.
6702 * server.c: Include tdesc.h.
6703 (gdbserver_xmltarget): Delete declaration.
6704 (get_features_xml, process_serial_event): Adjust.
6705 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6706 declare.
6707 (struct process_info) <tdesc>: New field.
6708 (ipa_tdesc): Declare.
6709 * tdesc.c: New file.
6710 * tdesc.h: New file.
6711 * tracepoint.c: Include tdesc.h.
6712 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6713 (get_context_regcache): Adjust to pass ipa_tdesc down.
6714 (do_action_at_tracepoint): Adjust to get the register cache size
6715 from the context regcache's description.
6716 (traceframe_walk_blocks): Adjust to get the register cache size
6717 from the current trace frame's description.
6718 (traceframe_get_pc): Adjust to get current trace frame's
6719 description and pass it down.
6720 (gdb_collect): Adjust to get the register cache size from the
6721 IPA's description.
6722 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6723 (gdbserver_xmltarget): Delete.
6724 (initialize_low_tracepoint): Set the ipa's target description.
6725 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6726 (initialize_low_tracepoint): Set the ipa's target description.
6727 * linux-x86-low.c: Include tdesc.h.
6728 [__x86_64__] (is_64bit_tdesc): New.
6729 (ps_get_thread_area, x86_get_thread_area): Use it.
6730 (i386_cannot_store_register): Rename to ...
6731 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6732 (i386_cannot_fetch_register): Rename to ...
6733 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6734 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6735 to new interface.
6736 (target_regsets): Rename to ...
6737 (x86_regsets): ... this.
6738 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6739 interface.
6740 (x86_siginfo_fixup): Use is_64bit_tdesc.
6741 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6742 (tdesc_x32_avx_linux, tdesc_x32_linux)
6743 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6744 Declare.
6745 (x86_linux_update_xmltarget): Delete.
6746 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6747 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6748 (AMD64_LINUX_USER64_CS): New.
6749 (x86_linux_read_description): New, based on
6750 x86_linux_update_xmltarget.
6751 (same_process_callback): New.
6752 (x86_arch_setup_process_callback): New.
6753 (x86_linux_update_xmltarget): New.
6754 (x86_regsets_info): New.
6755 (amd64_linux_regs_info): New.
6756 (i386_linux_usrregs_info): New.
6757 (i386_linux_regs_info): New.
6758 (x86_linux_regs_info): New.
6759 (x86_arch_setup): Reimplement.
6760 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6761 (x86_emit_ops): Ditto.
6762 (the_low_target): Adjust. Install x86_linux_regs_info,
6763 x86_cannot_fetch_register, and x86_cannot_store_register.
6764 (initialize_low_arch): New.
6765 * linux-ia64-low.c (tdesc_ia64): Declare.
6766 (ia64_fetch_register): Adjust.
6767 (ia64_usrregs_info, regs_info): New globals.
6768 (ia64_regs_info): New function.
6769 (the_low_target): Adjust.
6770 (initialize_low_arch): New function.
6771 * linux-sparc-low.c (tdesc_sparc64): Declare.
6772 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6773 Adjust.
6774 (sparc_arch_setup): New function.
6775 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6776 (the_low_target): Adjust.
6777 (initialize_low_arch): New function.
6778 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6779 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6780 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6781 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6782 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6783 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6784 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6785 (tdesc_powerpc_isa205_vsx64l): Declare.
6786 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6787 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6788 (ppc_set_pc, ppc_get_hwcap): Adjust.
6789 (ppc_usrregs_info): Forward declare.
6790 (!__powerpc64__) ppc_regmap_adjusted: New global.
6791 (ppc_arch_setup): Adjust to the current process'es target
6792 description.
6793 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6794 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6795 (ppc_store_evrregset): Adjust.
6796 (target_regsets): Rename to ...
6797 (ppc_regsets): ... this, and make static.
6798 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6799 (ppc_regs_info): New function.
6800 (the_low_target): Adjust.
6801 (initialize_low_arch): New function.
6802 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6803 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6804 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6805 (tdesc_s390x_linux64v2): Declare.
6806 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6807 (s390_fill_gregset, s390_store_last_break): Adjust.
6808 (target_regsets): Rename to ...
6809 (s390_regsets): ... this, and make static.
6810 (s390_get_pc, s390_set_pc): Adjust.
6811 (s390_get_hwcap): New target_desc parameter, and use it.
6812 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6813 (s390_arch_setup): Adjust to set the current process'es target
6814 description. Don't adjust the regmap.
6815 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6816 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6817 (regs_info_3264): New globals.
6818 (s390_regs_info): New function.
6819 (the_low_target): Adjust.
6820 (initialize_low_arch): New function.
6821 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6822 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6823 [__mips64] (init_registers_mips_linux)
6824 (init_registers_mips_dsp_linux): Delete defines.
6825 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6826 (have_dsp): New global.
6827 (mips_read_description): New, based on mips_arch_setup.
6828 (mips_arch_setup): Reimplement.
6829 (get_usrregs_info): New function.
6830 (mips_cannot_fetch_register, mips_cannot_store_register)
6831 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6832 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6833 (target_regsets): Rename to ...
6834 (mips_regsets): ... this, and make static.
6835 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6836 (dsp_regs_info, regs_info): New globals.
6837 (mips_regs_info): New function.
6838 (the_low_target): Adjust.
6839 (initialize_low_arch): New function.
6840 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6841 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6842 Declare.
6843 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6844 (arm_read_description): New, with bits factored from
6845 arm_arch_setup.
6846 (arm_arch_setup): Reimplement.
6847 (target_regsets): Rename to ...
6848 (arm_regsets): ... this, and make static.
6849 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6850 (arm_regs_info): New function.
6851 (the_low_target): Adjust.
6852 (initialize_low_arch): New function.
6853 * linux-m68k-low.c (tdesc_m68k): Declare.
6854 (target_regsets): Rename to ...
6855 (m68k_regsets): ... this, and make static.
6856 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6857 (m68k_regs_info): New function.
6858 (m68k_arch_setup): New function.
6859 (the_low_target): Adjust.
6860 (initialize_low_arch): New function.
6861 * linux-sh-low.c (tdesc_sharch): Declare.
6862 (target_regsets): Rename to ...
6863 (sh_regsets): ... this, and make static.
6864 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6865 (sh_regs_info, sh_arch_setup): New functions.
6866 (the_low_target): Adjust.
6867 (initialize_low_arch): New function.
6868 * linux-bfin-low.c (tdesc_bfin): Declare.
6869 (bfin_arch_setup): New function.
6870 (bfin_usrregs_info, regs_info): New globals.
6871 (bfin_regs_info): New function.
6872 (the_low_target): Adjust.
6873 (initialize_low_arch): New function.
6874 * linux-cris-low.c (tdesc_cris): Declare.
6875 (cris_arch_setup): New function.
6876 (cris_usrregs_info, regs_info): New globals.
6877 (cris_regs_info): New function.
6878 (the_low_target): Adjust.
6879 (initialize_low_arch): New function.
6880 * linux-cris-low.c (tdesc_crisv32): Declare.
6881 (cris_arch_setup): New function.
6882 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6883 (cris_regs_info): New function.
6884 (the_low_target): Adjust.
6885 (initialize_low_arch): New function.
6886 * linux-m32r-low.c (tdesc_m32r): Declare.
6887 (m32r_arch_setup): New function.
6888 (m32r_usrregs_info, regs_info): New globals.
6889 (m32r_regs_info): Adjust.
6890 (initialize_low_arch): New function.
6891 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6892 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6893 (tic6x_usrregs_info): Forward declare.
6894 (tic6x_read_description): New function, based on ...
6895 (tic6x_arch_setup): ... this. Reimplement.
6896 (target_regsets): Rename to ...
6897 (tic6x_regsets): ... this, and make static.
6898 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6899 (tic6x_regs_info): New function.
6900 (the_low_target): Adjust.
6901 (initialize_low_arch): New function.
6902 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6903 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6904 (target_regsets): Rename to ...
6905 (xtensa_regsets): ... this, and make static.
6906 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6907 globals.
6908 (xtensa_arch_setup, xtensa_regs_info): New functions.
6909 (the_low_target): Adjust.
6910 (initialize_low_arch): New function.
6911 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6912 (nios2_arch_setup): Set the current process'es tdesc.
6913 (target_regsets): Rename to ...
6914 (nios2_regsets): ... this.
6915 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6916 (nios2_regs_info): New function.
6917 (the_low_target): Adjust.
6918 (initialize_low_arch): New function.
a261b8f5
PA
6919 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6920 (aarch64_arch_setup): Set the current process'es tdesc.
6921 (target_regsets): Rename to ...
6922 (aarch64_regsets): ... this.
6923 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6924 (aarch64_regs_info): New function.
6925 (the_low_target): Adjust.
6926 (initialize_low_arch): New function.
3aee8918
PA
6927 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6928 globals.
6929 (target_regsets): Rename to ...
6930 (tile_regsets): ... this.
6931 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6932 (tile_regs_info): New function.
6933 (tile_arch_setup): Set the current process'es tdesc.
6934 (the_low_target): Adjust.
6935 (initialize_low_arch): New function.
6936 * spu-low.c (tdesc_spu): Declare.
6937 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6938 * win32-arm-low.c (tdesc_arm): Declare.
6939 (arm_arch_setup): New function.
6940 (the_low_target): Install arm_arch_setup instead of
6941 init_registers_arm.
6942 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6943 (init_windows_x86): Rename to ...
6944 (i386_arch_setup): ... this. Set `win32_tdesc'.
6945 (the_low_target): Adjust.
6946 * win32-low.c (win32_tdesc): New global.
6947 (child_add_thread): Don't create the thread cache here.
6948 (do_initial_child_stuff): Set the new process'es tdesc.
6949 * win32-low.h (struct target_desc): Forward declare.
6950 (win32_tdesc): Declare.
6951 * lynx-i386-low.c (tdesc_i386): Declare global.
6952 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6953 * lynx-low.c (lynx_tdesc): New global.
6954 (lynx_add_process): Set the new process'es tdesc.
6955 * lynx-low.h (struct target_desc): Forward declare.
6956 (lynx_tdesc): Declare global.
6957 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6958 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6959 * nto-low.c (nto_tdesc): New global.
6960 (do_attach): Set the new process'es tdesc.
6961 * nto-low.h (struct target_desc): Forward declare.
6962 (nto_tdesc): Declare.
6963 * nto-x86-low.c (tdesc_i386): Declare.
6964 (nto_x86_arch_setup): Set `nto_tdesc'.
6965
b1fbec62
GB
69662013-06-04 Gary Benson <gbenson@redhat.com>
6967
6968 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6969 to qSupported response when appropriate.
6970 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6971 with nonzero-length annex.
6972 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6973 arguments supplied in annex.
6974
d1ec4ce7
DE
69752013-05-31 Doug Evans <dje@google.com>
6976
ac44adcb 6977 PR server/15594
d1ec4ce7
DE
6978 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6979 64 bits in 64-cross-32 environment.
6980
9b25f2d3
PA
69812013-05-28 Pedro Alves <palves@redhat.com>
6982
6983 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6984 (aarch64-without-fpu.c): Delete rule.
6985 * configure.srv (aarch64*-*-linux*): Remove references to
6986 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6987 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6988 declaration.
6989
6740dc9c
PA
69902013-05-24 Pedro Alves <palves@redhat.com>
6991
6992 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6993 instead of strchr/decode_address. Error if the range isn't split
6994 with a ','. Don't assume there's be a ':' in the action.
6995
c2d6af84
PA
69962013-05-23 Yao Qi <yao@codesourcery.com>
6997 Pedro Alves <palves@redhat.com>
6998
6999 * linux-low.c (lwp_in_step_range): New function.
7000 (linux_wait_1): If the thread was range stepping and stopped
7001 outside the stepping range, report the stop to GDB. Otherwise,
7002 continue stepping. Add range stepping debug output.
7003 (linux_set_resume_request): Copy the step range from the resume
7004 request to the lwp.
7005 (linux_supports_range_stepping): New.
7006 (linux_target_ops) <supports_range_stepping>: Set to
7007 linux_supports_range_stepping.
7008 * linux-low.h (struct linux_target_ops)
7009 <supports_range_stepping>: New field.
7010 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7011 * linux-x86-low.c (x86_supports_range_stepping): New.
7012 (the_low_target) <supports_range_stepping>: Set to
7013 x86_supports_range_stepping.
7014 * server.c (handle_v_cont): Handle 'r' action.
7015 (handle_v_requests): Append ";r" if the target supports range
7016 stepping.
7017 * target.h (struct thread_resume) <step_range_start,
7018 step_range_end>: New fields.
7019 (struct target_ops) <supports_range_stepping>:
7020 New field.
7021 (target_supports_range_stepping): New macro.
7022
58794e1a
JB
70232013-05-17 Joel Brobecker <brobecker@adacore.com>
7024
7025 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7026 confusion in comment.
7027
d631c5a7
JB
70282013-05-17 Joel Brobecker <brobecker@adacore.com>
7029
7030 * lynx-low.c (struct process_info_private): New type.
7031 (lynx_add_process): New function.
7032 (lynx_create_inferior, lynx_attach): Replace calls to
7033 add_process by calls to lynx_add_process.
7034 (lynx_resume): If PTID is null, then try using
7035 current_process()->private->last_wait_event_ptid.
7036 Add comments.
7037 (lynx_clear_inferiors): Delete. The contents of that function
7038 has been inlined in lynx_mourn;
7039 (lynx_wait_1): Save the ptid in the process's private data.
7040 (lynx_mourn): Free the process' private data. Replace call
7041 to lynx_clear_inferiors by call to clear_inferiors.
7042
96f7a20f
YQ
70432013-05-17 Yao Qi <yao@codesourcery.com>
7044
7045 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7046 the right place.
7047
db0dfaa0
LM
70482013-05-16 Luis Machado <lgustavo@codesourcery.com>
7049
7050 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7051 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7052 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7053 PT_TEXT_END_ADDR guards. Update comments.
7054 (linux_target_op) <read_offsets>: Conditionally define to
7055 linux_read_offsets if the target is UCLIBC and if it defines
7056 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7057
68f5f838
SL
70582013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7059 Andrew Jenner <andrew@codesourcery.com>
7060
7061 * Makefile.in (SFILES): Add linux-nios2-low.c.
7062 (clean): Add action to delete nios2-linux.c.
7063 (nios2-linux.c): New rule.
7064 * configure.srv: Add nios2*-*-linux*.
7065 * linux-nios2-low.c: New.
7066
1ebff1fd
HAQ
70672013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7068
7069 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7070
f6150862
HZ
70712013-04-25 Hui Zhu <hui@codesourcery.com>
7072
7073 PR gdb/15186
f6150862
HZ
7074 * ax.c (ax_printf): Add fflush.
7075
614c279d
TT
70762013-04-22 Tom Tromey <tromey@redhat.com>
7077
7078 * Makefile.in (SFILES): Add filestuff.c.
7079 (OBS): Add filestuff.o.
7080 (filestuff.o): New target.
7081 * config.in, configure: Rebuild.
7082 * configure.ac: Check for fdwalk, pipe2.
7083
7d4e5717
PA
70842013-04-17 Pedro Alves <palves@redhat.com>
7085
7086 * configure.ac (USE_THREAD_DB): Delete variable.
7087 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7088 Don't AC_SUBST USE_THREAD_DB.
7089 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7090 * config.in, configure: Regenerate.
7091
d5c93e41
PA
70922013-04-16 Pedro Alves <palves@redhat.com>
7093
7094 * linux-low.h (struct lwp_info) <thread_known>: Move under
7095 the USE_THREAD_DB #ifdef.
7096
04f5fe89
PA
70972013-04-16 Pedro Alves <palves@redhat.com>
7098
7099 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7100 (linux-low.o): Delete rule.
7101 * linux-low.h: Always include "gdb_thread_db.h" instead of
7102 conditionally including thread_db.h.
7103 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7104 HAVE_THREAD_DB_H.
7105
480b27bf
JK
71062013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7107
7108 * Makefile.in (install-only): Fix make install regression.
7109
43662968
JK
71102013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7111
7112 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7113 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7114 installation.
7115 * gdbserver.1: Remove.
7116
3e74e146
PA
71172013-03-22 Pedro Alves <palves@redhat.com>
7118
7119 * linux-low.c (handle_extended_wait): Don't call
7120 linux_enable_event_reporting.
7121
a8347a2a
TT
71222013-03-15 Tony Theodore <tonyt@logyst.com>
7123
7124 PR build/9098:
7125 * Makefile.in (SHELL): Use @SHELL@.
7126
eeb56fa7
SDJ
71272013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7128
7129 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7130 compiler warning.
7131
4fa7e2ff
JB
71322013-03-13 Joel Brobecker <brobecker@adacore.com>
7133
7134 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7135 Remove extraneous NULL element.
7136
8ddb1965
YQ
71372013-03-13 Yao Qi <yao@codesourcery.com>
7138
7139 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7140 'V' block in trace frame.
7141
9accd112
MM
71422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7143
7144 * target.h (struct target_ops): Add btrace ops.
7145 (target_supports_btrace): New macro.
7146 (target_enable_btrace): New macro.
7147 (target_disable_btrace): New macro.
7148 (target_read_btrace): New macro.
7149 * gdbthread.h (struct thread_info): Add btrace field.
7150 * server.c: Include btrace-common.h.
7151 (handle_btrace_general_set): New function.
7152 (handle_btrace_enable): New function.
7153 (handle_btrace_disable): New function.
7154 (handle_general_set): Call handle_btrace_general_set.
7155 (handle_qxfer_btrace): New function.
7156 (struct qxfer qxfer_packets[]): Add btrace entry.
7157 * inferiors.c (remove_thread): Disable btrace.
7158 * linux-low: Include linux-btrace.h.
7159 (linux_low_enable_btrace): New function.
7160 (linux_low_read_btrace): New function.
7161 (linux_target_ops): Add btrace ops.
7162 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7163 Add srv_linux_btrace=yes.
7164 (x86_64-*-linux*): Add linux-btrace.o.
7165 Add srv_linux_btrace=yes.
7166 * configure.ac: Define HAVE_LINUX_BTRACE.
7167 * config.in: Regenerated.
7168 * configure: Regenerated.
7169
5cc22e4c
MM
71702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7171
7172 * server.c (handle_qxfer): Preserve error message if -3 is
7173 returned.
7174 (qxfer): Document the -3 return value.
7175
7c97f91e
MM
71762013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7177
7178 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7179 (linux_btrace_h): New variable.
7180 (linux-btrace.o): New rule.
7181
be9a119c 71822013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7183 Hafiz Abid Qadeer <abidh@codesourcery.com>
7184
7185 * tracepoint.c (trace_buffer_size): New global.
7186 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7187 (init_trace_buffer): Change to one-argument function. Allocate
7188 trace buffer memory.
7189 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7190 handle QTBuffer:size packet.
7191 (cmd_bigqtbuffer_size): New function.
7192 (initialize_tracepoint): Call init_trace_buffer with
7193 DEFAULT_TRACE_BUFFER_SIZE.
7194 * server.c (handle_query): Add QTBuffer:size in the
7195 supported packets.
7196
e64f7499
YQ
71972013-03-07 Yao Qi <yao@codesourcery.com>
7198
7199 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7200 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7201 of -1.
7202 (cmd_qtsp): Adjust condition. Do post increment.
7203 Set cur_action and cur_step_action back to 0.
7204
f0ae6fc3
PA
72052013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7206
7207 PR server/15236
7208 * linux-low.c (linux_write_memory): Return early success if LEN is
7209 zero.
7210
b5b0b0af
CV
72112013-03-05 Corinna Vinschen <vinschen@redhat.de>
7212
334ad4a8 7213 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7214
589bc927
TT
72152013-02-28 Tom Tromey <tromey@redhat.com>
7216
7217 * configure.ac: Invoke AC_SYS_LARGEFILE.
7218 * configure, config.in: Rebuild.
7219
dfe07582
CV
72202013-02-28 Corinna Vinschen <vinschen@redhat.com>
7221
7222 * win32-low.c: Throughout, fix format strings and casts of
7223 printf-like functions to avoid type related warnings on all
7224 platforms.
7225 (get_child_debug_event): Print dwDebugEventCode as hex since
7226 that's how it's usually documented.
7227
736cd585
YQ
72282013-02-28 Yao Qi <yao@codesourcery.com>
7229
7230 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7231 pulongest.
7232
e1f58301
JW
72332013-02-27 Jiong Wang <jiwang@tilera.com>
7234
7235 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7236 (reg-tilegx32.c): New rule.
7237 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7238 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7239 different register info initializer according to elf class.
7240 (init_registers_tilgx32): New function. The tilegx32 register info
7241 initializer.
7242 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7243 (tile_store_gregset): Likewise.
7244
d171ca78
YQ
72452013-02-27 Yao Qi <yao@codesourcery.com>
7246
7247 * server.c (process_point_options): Print debug message when
7248 debug_threads is true.
7249
282bbdf3
YQ
72502013-02-26 Yao Qi <yao@codesourcery.com>
7251
7252 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7253
aca22551
PA
72542013-02-19 Pedro Alves <palves@redhat.com>
7255 Kai Tietz <ktietz@redhat.com>
7256
7257 PR gdb/15161
7258
7259 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7260 instead of strtoul to extract address from packet.
7261 (process_serial_event) <'z'>: Likewise.
7262
4f3cee1c
YQ
72632013-02-18 Yao Qi <yao@codesourcery.com>
7264
7265 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7266
8e1d55a3
PA
72672013-02-14 Pedro Alves <palves@redhat.com>
7268
7269 Plug memory leak.
7270
7271 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7272 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7273
458820da
PA
72742013-02-14 Pedro Alves <palves@redhat.com>
7275
7276 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7277
baea0dae
PA
72782013-02-14 Pedro Alves <palves@redhat.com>
7279
7280 * tracepoint.c (save_string): Delete.
7281 (add_tracepoint_action): Use savestring instead of save_string.
7282
0b1afbb3
PA
72832013-02-12 Pedro Alves <palves@redhat.com>
7284
7285 * linux-xtensa-low.c: Ditto.
7286 * xtensa-xtregs.c: Ditto.
7287
8a4ac37e
PA
72882013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7289
7290 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7291 thread_db.
7292
148de6bb
MS
72932013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7294
7295 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7296 aarch64_num_wp_regs and aarch64_num_bp_regs to
7297 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7298
55fac6e0
MS
72992013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7300
7301 * linux-aarch64-low.c (ps_get_thread_area): Replace
7302 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7303
176eb98c
MS
73042013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7305 Marcus Shawcroft <marcus.shawcroft@arm.com>
7306 Nigel Stephens <nigel.stephens@arm.com>
7307 Yufeng Zhang <yufeng.zhang@arm.com>
7308
7309 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7310 (aarch64.c, aarch64-without-fpu.c): New targets.
7311 * configure.srv (aarch64*-*-linux*): New.
7312 * linux-aarch64-low.c: New file.
7313
56f7af9c
MS
73142013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7315
43aaf8b6 7316 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7317 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7318 (dequeue_one_deferred_signal, linux_resume_one_thread)
7319 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7320 (linux_tracefork_grandchild, linux_test_for_tracefork)
7321 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7322 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7323 where the argument is 0.
7324
60f662b0
YQ
73252013-01-25 Yao Qi <yao@codesourcery.com>
7326
7327 * event-loop.c: Include "queue.h".
7328 (gdb_event_p): New typedef.
7329 (struct gdb_event) <next_event>: Remove.
7330 (event_queue): Change to QUEUE(gdb_event_p).
7331 (async_queue_event): Remove.
7332 (gdb_event_xfree): New.
7333 (initialize_event_loop): New.
7334 (process_event): Use API from QUEUE.
7335 (wait_for_event): Likewise.
7336 * server.c (main): Call initialize_event_loop.
7337 * server.h (initialize_event_loop): Declare.
7338
5ae4861a
YQ
73392013-01-18 Yao Qi <yao@codesourcery.com>
7340
7341 * ax.h (struct eval_agent_expr_context): New.
7342 (gdb_eval_agent_expr): Update declaration.
7343 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7344 TFRAME. Add new argument CTX.
7345 * server.h (struct eval_agent_expr_context): Declare.
7346 (agent_mem_read, agent_tsv_read): Update declaration.
7347 (agent_mem_read_string): Likewise.
7348 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7349 (add_traceframe_block): Add new argument TPOINT.
7350 Increase TPOINT->traceframe_usage.
7351 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7352 eval_tracepoint_agent_expr.
7353 (condition_true_at_tracepoint): Likewise.
7354 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7355 (agent_mem_read_string, agent_tsv_read): Likewise.
7356
85e00e85
YQ
73572013-01-16 Yao Qi <yao@codesourcery.com>
7358
7359 * linux-low.c (linux_resume_one_lwp): Don't check
7360 'lwp->bp_reinsert != 0'.
7361
4039cf45
JB
73622013-01-07 Joel Brobecker <brobecker@adacore.com>
7363 Pedro Alves <palves@redhat.com>
7364
7365 * lynx-low.c (ptrace_request_to_str): Define a temporary
7366 macro and use it to simplify this function's implementation.
7367
9044dee2
JB
73682013-01-07 Joel Brobecker <brobecker@adacore.com>
7369
7370 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7371 sets errno.
7372
e6352c8f
JB
73732013-01-07 Joel Brobecker <brobecker@adacore.com>
7374
7375 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7376
50681a27
JB
73772013-01-07 Joel Brobecker <brobecker@adacore.com>
7378
7379 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7380
3f6e77ef
JB
73812013-01-07 Joel Brobecker <brobecker@adacore.com>
7382
7383 * lynx-low.c (lynx_resume): Use the resume_info parameter
7384 to determine the ptid for the lynx_ptrace call, unless
7385 it is equal to minus_one_ptid, in which case we use the
7386 ptid of the current_inferior.
7387 (lynx_wait_1): After having received a thread create/exit
7388 event, resume the inferior's execution using the signaling
7389 thread's ptid, rather than the old ptid.
7390
7fda33ae
JB
73912013-01-07 Joel Brobecker <brobecker@adacore.com>
7392
7393 * lynx-low.c (lynx_resume): Delete variable ret.
7394
b9786c74
JB
73952013-01-01 Joel Brobecker <brobecker@adacore.com>
7396
7397 * gdbreplay.c (gdbreplay_version): Update copyright year.
7398 * server.c (gdbserver_version): Likewise.
7399
8b93d60f
JB
74002012-12-17 Joel Brobecker <brobecker@adacore.com>
7401
7402 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7403 new thread.
7404
037335a7
JB
74052012-12-17 Joel Brobecker <brobecker@adacore.com>
7406
7407 * lynx-low.c (ptrace_request_to_str): Add handling for
7408 PTRACE_GETTRACESIG.
7409
52d4cbd8
JB
74102012-12-17 Joel Brobecker <brobecker@adacore.com>
7411
7412 * lynx-low.c (lynx_attach): Delete variable new_process.
7413
ab8f6ca9
JB
74142012-12-17 Joel Brobecker <brobecker@adacore.com>
7415
7416 * lynx-low.c (lynx_create_inferior): Delete variable
7417 new_process.
7418
78cbc024
JB
74192012-12-17 Joel Brobecker <brobecker@adacore.com>
7420
7421 * lynx-low.c (ptrace_request_to_str): Do not handle
7422 PTRACE_GETTHREADLIST if this macro does not exist.
7423
14a00470
YQ
74242012-12-15 Yao Qi <yao@codesourcery.com>
7425
7426 * Makefile.in (OBS): Add notif.o.
7427 * notif.c, notif.h: New.
7428 * server.c: Include "notif.h".
7429 (struct vstop_notif) <next>: Remove.
7430 <base>: New field.
7431 (queue_stop_reply): Update.
7432 (push_event, send_next_stop_reply): Remove.
7433 (discard_queued_stop_replies): Update.
7434 (notif_stop): New variable.
7435 (handle_v_stopped): Remove.
7436 (handle_v_requests): Don't call handle_v_stopped. Call
7437 handle_ack_notif instead.
7438 (queue_stop_reply_callback): Call notif_event_enque instead
7439 of queue_stop_reply.
7440 (handle_status): Don't call send_next_stop_reply, call
7441 notif_write_event instead.
7442 (kill_inferior_callback): Likewise.
7443 (detach_or_kill_inferior_callback): Likewise.
7444 (main): Call initialize_notif.
7445 (process_serial_event): Call QUEUE_is_empty.
7446 (handle_target_event): Call notif_push instead of push event.
7447 * server.h (push_event): Remove declaration.
7448
61c125b9
TT
74492012-12-10 Tom Tromey <tromey@redhat.com>
7450
7451 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7452 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7453 macros.
7454 (.c.o): Rewrite.
7455 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7456 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7457 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7458 (amd64-linux-ipa.o, ax.o): Rewrite.
7459 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7460 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7461 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7462 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7463 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7464 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7465 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7466 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7467 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7468 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7469 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7470 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7471 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7472 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7473 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7474 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7475 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7476 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7477 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7478 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7479 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7480 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7481 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7482 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7483 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7484 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7485 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7486 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7487 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7488 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7489 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7490 (reg-tilegx.o): Remove.
7491 (all_object_files): New macro.
7492 Include .deps files.
7493 * aclocal.m4, configure: Rebuild.
7494 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7495 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7496 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7497
e90e9ad9
TT
74982012-12-05 Tom Tromey <tromey@redhat.com>
7499
7500 PR gdb/14917:
7501 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7502
02d403bf 75032012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7504
7505 * configure.ac: Check for linux/perf_event.h.
7506 * config.in: Regenerated.
7507 * configure: Regenerated.
7508
0270a750
PA
75092012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7510
7511 * hostio.c (handle_readlink): Decrease buffer size
7512 parameter passed to readlink by one byte.
7513
8c29b58e
YQ
75142012-11-26 Yao Qi <yao@codesourcery.com>
7515
7516 * configure.ac (build_warnings): Append '-Wempty-body'.
7517 * configure: Regenerated.
7518 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7519 body.
7520
8bdce1ff
PM
75212012-11-15 Pierre Muller <muller@sourceware.org>
7522
7523 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7524 * config.in: Regenerate.
7525 * configure: Regenerate.
7526 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7527 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7528 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7529 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7530 header.
7531 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7532 instead of <sys/wait.h> header.
7533 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7534
02d403bf 75352012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7536
7537 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7538 (various make rules): Remove -DGDBSERVER
7539
fbd5db48
YQ
75402012-11-09 Yao Qi <yao@codesourcery.com>
7541
7542 * spu-low.c (current_ptid): Move it to ..
7543 * gdbthread.h: ... here. New.
7544 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7545 * server.c (myresume, process_serial_event): Likewise.
7546 * thread-db.c (thread_db_find_new_threads): Likewise.
7547 * tracepoint.c (run_inferior_command): Likewise.
7548
b3dc46ff
AB
75492012-10-01 Andrew Burgess <aburgess@broadcom.com>
7550
7551 * server.c (handle_search_memory_1): Include access length in
7552 warning message.
7553
07c04788
HPN
75542012-09-05 Michael Brandt <michael.brandt@axis.com>
7555
7556 * linux-crisv32-low.c: Fix compile errors.
7557
918d227b
YQ
75582012-09-04 Yao Qi <yao@codesourcery.com>
7559
7560 * tracepoint.c (cmd_qtsv): Adjust debug message.
7561 Don't check CUR_TPOINT.
7562
18c1b81a
YQ
75632012-08-28 Yao Qi <yao@codesourcery.com>
7564
7565 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7566 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7567 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7568 Remove declarations of xmalloc, xreallloc, xstrdup and
7569 freeargv.
7570 * Makefile.in (libiberty_h): New.
7571 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7572 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7573
dc82f37b
YQ
75742012-08-23 Yao Qi <yao@codesourcery.com>
7575
7576 * server.h: Remove declaration of 'xsnprintf'.
7577
406b1477
KS
75782012-08-22 Keith Seitz <keiths@redhat.com>
7579
7580 * server.h: Include build-gnulib-gbserver/config.h.
7581 * gdbreplay.c: Likewise.
7582
e6712ff1
DE
75832012-08-08 Doug Evans <dje@google.com>
7584
7585 * Makefile.in (SFILES): Add gdb_vecs.c.
7586 (OBS): Add gdb_vecs.o.
7587 (gdb_vecs_h, host_defs_h): New variables.
7588 (thread-db.o): Add $(gdb_vecs_h) dependency.
7589 (gdb_vecs.o): New rule.
7590 * thread-db.c: #include "gdb_vecs.h".
7591 (thread_db_load_search): Use a vector to iterate over path elements.
7592 Handle text appearing after "$pdir".
7593
7594 * configure.ac: Add check for strstr.
7595 * config.in: Regenerate.
7596 * configure: Regenerate.
7597
7c3270ae
UW
75982012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7599
7600 * hostio.c (handle_pread): If pread fails, fall back to attempting
7601 lseek/read.
7602 (handle_pwrite): Likewise for pwrite.
7603
b62e2b27
UW
76042012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7605
7606 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7607 between unsupported TYPE and unimplementable ADDR/LEN combination.
7608 (arm_insert_point): Act on new return value.
7609
78a99e91
PA
76102012-07-31 Pedro Alves <palves@redhat.com>
7611
7612 * server.c (process_point_options): Only skip tokens if we find
7613 one that is unrecognized. Don't treat 'X' specially while
7614 skipping unrecognized tokens.
7615
fcf303ab
UW
76162012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7617
7618 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7619 to 4-byte-align HW breakpoint addresses for Thumb.
7620
7255706c
YQ
76212012-07-27 Yao Qi <yao@codesourcery.com>
7622
7623 PR remote/14161.
7624
7625 * server.h: Declare gdb_agent_about_to_close.
7626 * target.c (kill_inferior): Include "agent.h".
7627 New. Send command 'kill'.
7628 * target.h (kill_inferior): Removed macro.
7629 * tracepoint.c (gdb_agent_about_to_close): New.
7630 (gdb_agent_helper_thread): Handle command 'close'.
7631 Wait endlessly until the inferior stops.
7632 Install gdb_agent_remove_socket to atexit hook.
7633 (agent_socket_name): New static variable.
7634 (gdb_agent_socket_init): Replace local variable 'name' with
7635 'agent_socket_name'.
7636 (gdb_agent_remove_socket): New.
7637
5a3f286f
YQ
76382012-07-27 Yao Qi <yao@codesourcery.com>
7639
7640 * server.c (process_point_options): Stop at 'X' when parsing.
7641
961bd387
ME
76422012-07-19 Michael Eager <eager@eagercon.com>
7643
a261b8f5 7644 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7645 to hw_execute.
7646 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7647 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7648 hardware breakpoint.
7649
aa7c7447
JK
76502012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7651
7652 * gdbserver/linux-low.c (initialize_low): Call
7653 linux_ptrace_init_warnings.
7654
7f216e7c
DE
76552012-07-02 Doug Evans <dje@google.com>
7656
7657 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7658 pointer to int.
7659
d3ce09f5
SS
76602012-07-02 Stan Shebs <stan@codesourcery.com>
7661
7662 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7663 (ax.o): Add it to build rule.
7664 (ax-ipa.o): Ditto.
7665 (OBS): Add format.o.
7666 (IPA_OBS): Add format.o.
7667 * server.c (handle_query): Claim support for breakpoint commands.
7668 (process_point_options): Add command case.
7669 (process_serial_event): Leave running if there are printfs in
7670 effect.
7671 * mem-break.h (any_persistent_commands): Declare.
7672 (add_breakpoint_commands): Declare.
7673 (gdb_no_commands_at_breakpoint): Declare.
7674 (run_breakpoint_commands): Declare.
7675 * mem-break.c (struct point_command_list): New struct.
7676 (struct breakpoint): New field command_list.
7677 (any_persistent_commands): New function.
7678 (add_commands_to_breakpoint): New function.
7679 (add_breakpoint_commands): New function.
7680 (gdb_no_commands_at_breakpoint): New function.
7681 (run_breakpoint_commands): New function.
7682 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7683 locally.
7684 * ax.c: Include format.h.
7685 (ax_printf): New function.
7686 (gdb_eval_agent_expr): Add printf opcode.
7687
2f8f6aed
YQ
76882012-06-13 Yao Qi <yao@codesourcery.com>
7689
7690 * server.c (start_inferior): Remove duplicated writes to fields
7691 'last_resume_kind' and 'last_status' of 'current_inferior'.
7692
0c9070b3
YQ
76932012-06-12 Yao Qi <yao@codesourcery.com>
7694 Pedro Alves <palves@redhat.com>
7695
7696 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7697 comment.
7698 * server.c (handle_v_cont): Extend comment.
7699
c52daf70
YQ
77002012-06-11 Yao Qi <yao@codesourcery.com>
7701
7702 * linux-low.c (linux_attach): Add 'static'.
7703
d38bbb0a
YQ
77042012-06-06 Yao Qi <yao@codesourcery.com>
7705
7706 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7707
89dc0afd
JK
77082012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7709
7710 Fix gcc -flto compilation warning.
7711 * server.c (main): Make variable multi_mode and attach volatile.
7712
75f62ce7
TJB
77132012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7714
7715 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7716 if the platform doesn't know about it.
7717
65f479b6
PA
77182012-05-30 Jeff Kenton <jkenton@tilera.com>
7719
7720 * Makefile.in (SFILES): Add linux-tile-low.c.
7721 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7722 * configure.srv: Handle tilegx-*-linux*.
7723 * linux-tile-low.c: New file.
7724
0c5bf5a9
JK
77252012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7726
7727 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7728
a493e3e2
PA
77292012-05-24 Pedro Alves <palves@redhat.com>
7730
7731 PR gdb/7205
7732
43aaf8b6 7733 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7734
2ea28649
PA
77352012-05-24 Pedro Alves <palves@redhat.com>
7736
7737 PR gdb/7205
7738
7739 Replace target_signal with gdb_signal throughout.
7740
8d409d16
MR
77412012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7742
7743 * linux-low.c (linux_store_registers): Avoid the copying sequence
7744 when no data has been retrieved by ptrace.
7745
23512c01
MGD
77462012-05-22 Will Deacon <will.deacon@arm.com>
7747
7748 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7749 Include asm/ptrace.h.
7750 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7751 already defined.
7752
4934b29e
MR
77532012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7754
7755 * linux-low.c (linux_store_registers): Don't re-retrieve data
7756 with ptrace that has already been obtained from /proc. Always
7757 copy any data retrieved with ptrace to the buffer supplied.
7758
bde24c0a
PA
77592012-05-11 Yao Qi <yao@codesourcery.com>
7760 Pedro Alves <palves@redhat.com>
7761
7762 * linux-low.c (enum stopping_threads_kind): New.
7763 (stopping_threads): Change type to `enum stopping_threads_kind'.
7764 (handle_extended_wait): If stopping and suspending threads, leave
7765 the new_lwp suspended too.
7766 (linux_wait_for_event): Adjust.
7767 (stop_all_lwps): Set `stopping_threads' to
7768 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7769 whether we're suspending threads or just stopping them. Assert no
7770 recursion happens.
7771
623b6bdf
YQ
77722012-04-29 Yao Qi <yao@codesourcery.com>
7773
7774 * server.h: Move some code to ...
7775 * gdbthread.h: ... here. New.
7776 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7777 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7778 (nto-low.o, win32-low.o): Likewise.
7779 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7780 * regcache.c, remote-utils.c, server.c: Likewise.
7781 * target.c, tracepoint.c, win32-low.c: Likewise.
7782
f15f9948
TJB
77832012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7784
7785 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7786 (PTRACE_ARG4_TYPE): Likewise.
7787 (PTRACE_XFER_TYPE): Likewise.
7788 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7789 ptrace to PTRACE_ARG3_TYPE.
7790 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7791 (PTRACE_ARG4_TYPE): Likewise.
7792 (PTRACE_XFER_TYPE): Likewise.
7793 (linux_detach_one_lwp): Cast fourth argument of
7794 ptrace to long then PTRACE_ARG4_TYPE.
7795 (regsets_fetch_inferior_registers): Cast third argument of
7796 ptrace to long then PTRACE_ARG3_TYPE.
7797 (regsets_store_inferior_registers): Likewise.
7798
38ea300a
PA
77992012-04-20 Pedro Alves <palves@redhat.com>
7800
7801 * configure: Regenerate.
7802
c971b7fa
PA
78032012-04-19 Pedro Alves <palves@redhat.com>
7804
43aaf8b6 7805 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7806 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7807 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7808 (all, install-only, uninstall, clean-info, all-lib, clean): No
7809 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7810 (maintainer-clean realclean distclean): Use subdir_do.
7811 (subdir_do): New.
7812 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7813 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7814 * acinclude.m4: Include acx_configure_dir.m4.
7815 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7816 calls. Call AC_PROG_RANLIB. Configure gnulib using
7817 ACX_CONFIGURE_DIR.
7818 (GNULIB): New.
7819 (GNULIB_STDINT_H): Adjust.
7820 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7821 * gdbreplay.c: Include build-gnulib/config.h.
7822 * server.h: Likewise.
7823 * aclocal.m4: Regenerate.
7824 * config.in: Regenerate.
7825 * configure: Regenerate.
c971b7fa 7826
809277f8
PA
78272012-04-19 Pedro Alves <palves@redhat.com>
7828
7829 * Makefile.in (LIBGNU, INCGNU): Adjust.
7830 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7831 (all, install-only, uninstall, clean-info, all-lib, clean)
7832 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7833 * configure.ac: Adjust AC_OUTPUT output.
7834 * aclocal.m4: Regenerate.
7835 * configure: Regenerate.
7836
fd9bb8b8
PA
78372012-04-19 Pedro Alves <palves@redhat.com>
7838
7839 * Makefile.in (generated_files): New.
7840 (server_h): Remove the explicit dependency on config.h, and depend
7841 on $generated_files.
7842
1c298c66
PA
78432012-04-19 Pedro Alves <palves@redhat.com>
7844
7845 * Makefile.in (INCGNU): Add -Ignulib.
7846
57c4b50b
PA
78472012-04-19 Pedro Alves <palves@redhat.com>
7848
7849 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7850 (INCGNU): ... this, and spell out -I here.
7851 (GNULIB_LIB): Rename to ...
7852 (LIBGNU): ... this.
7853 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7854
1030e047
PA
78552012-04-19 Pedro Alves <palves@redhat.com>
7856
7857 * config.in: Regenerate.
7858
447d4319
PA
78592012-04-19 Pedro Alves <palves@redhat.com>
7860
7861 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7862 * server.h (memmem): Remove declaration.
7863 * config.in: Regenerate.
7864 * configure: Regenerate.
7865
aad9eab9
YQ
78662012-04-19 Yao Qi <yao@codesourcery.com>
7867
7868 * Makefile.in (SFILES): Add common/vec.c.
7869 (OBS): Add vec.o.
7870 (vec.o): New rule.
7871
3e10640f
YQ
78722012-04-19 Yao Qi <yao@codesourcery.com>
7873
7874 * remote-utils.c (prepare_resume_reply): Replace with macro
7875 target_core_of_thread.
7876 * server.c (handle_qxfer_threads_proper): Likewise.
7877 * target.h (traget_core_of_thread): New macro.
7878
71622373
PA
78792012-04-18 Pedro Alves <palves@redhat.com>
7880
7881 * aclocal.m4: Regenerate.
7882 * configure: Regenerate.
7883
80d26939
YQ
78842012-04-16 Yao Qi <yao@codesourcery.com>
7885
7886 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7887 duplicated on address.
7888
42476b70
YQ
78892012-04-16 Yao Qi <yao@codesourcery.com>
7890
7891 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7892 (struct tracepoint_action_ops) <send>: New field.
7893 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7894 (agent_expr_send, x_tracepoint_action_send): New.
7895 (l_tracepoint_action_send): New.
7896 (cmd_qtdp): Download and install tracepoint
7897 according to `use_agent'.
7898 (run_inferior_command): Add one more parameter `len'.
7899 Update callers.
7900 (tracepoint_send_agent): New.
7901 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7902
7bc83639
YQ
79032012-04-16 Yao Qi <yao@codesourcery.com>
7904
7905 * tracepoint.c (download_tracepoints): Moved to ...
7906 (cmd_qtstart): ... here.
7907
5f18041e
YQ
79082012-04-14 Yao Qi <yao@codesourcery.com>
7909
7910 * tracepoint.c: Include inttypes.h.
7911 (struct collect_memory_action): Use sized types.
7912 (struct tracepoint): Likewise.
7913 (cmd_qtdp, stop_tracing): Update print specifiers.
7914 (cmd_qtp, response_tracepoint): Likewise.
7915 (collect_data_at_tracepoint): Likewise.
7916 (collect_data_at_step): Likewise.
7917
55a8c076
YQ
79182012-04-14 Yao Qi <yao@codesourcery.com>
7919
7920 Import gnulib module inttypes.
7921 * aclocal.m4, config.in, configure: Regenerated.
7922
dc750257
YQ
79232012-04-14 Yao Qi <yao@codesourcery.com>
7924
7925 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7926 Makefile and config.status at last.
7927
0ab5faf9
YQ
79282012-04-13 Yao Qi <yao@codesourcery.com>
7929
7930 * tracepoint.c: Include stdint.h unconditionally.
7931
18f5fd81
TJB
79322012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7933
7934 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7935 on BFD_HAVE_SYS_PROCFS_TYPE.
7936 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7937 * configure: Regenerate.
7938 * config.in: Likewise.
7939
4d47af5c
L
79402012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7941
7942 * Makefile.in (clean): Also remove x32.c x32-linux.c
7943 x32-avx.c x32-avx-linux.c.
7944 (x32.o): New target.
7945 (x32.c): Likewise.
7946 (x32-linux.o): Likewise.
7947 (x32-linux.c): Likewise.
7948 (x32-avx.o): Likewise.
7949 (x32-avx.c): Likewise.
7950 (x32-avx-linux.o): Likewise.
7951 (x32-avx-linux.c): Likewise.
7952
7953 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7954 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7955 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7956 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7957 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7958 i386/x32-avx-linux.xml.
7959
7960 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7961 (init_registers_x32_avx_linux): Likwise.
7962 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7963 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7964
ecedbe58
PA
79652012-04-13 Pedro Alves <palves@redhat.com>
7966
7967 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7968 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7969 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7970 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7971 the sub-make.
7972
c92b5177
L
79732012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7974
7975 * linux-x86-low.c (compat_x32_clock_t): New.
7976 (compat_x32_siginfo_t): Likewise.
7977 (compat_x32_siginfo_from_siginfo): Likewise.
7978 (siginfo_from_compat_x32_siginfo): Likewise.
7979 (linux_is_elf64): Likewise.
7980 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7981 and siginfo_from_compat_x32_siginfo for x32.
7982 (x86_arch_setup): Set linux_is_elf64.
7983
214d508e
L
79842012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7985
7986 PR gdb/13969
7987 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7988 e_machine field.
7989 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7990 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7991 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7992 compatible with process.
7993
c9a1864a
YQ
79942012-04-12 Yao Qi <yao@codesourcery.com>
7995
7996 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7997 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7998 (install-only, install-info, clean): Handle sub dir gnulib.
7999 (all-lib, am--refresh): New targets.
8000 (memmem.o): Remove target.
8001 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8002 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8003 (AC_REPLACE_FUNCS): Remove memmem.
8004 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8005 (AC_OUTPUT): Generate Makefile in gnulib/.
8006 * aclocal.m4, config.in, configure: Regenerated.
8007
367ba2c2
MR
80082012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8009
8010 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8011
9d236627
PA
80122012-04-05 Pedro Alves <palves@redhat.com>
8013
8014 -Werror=strict-aliasing
8015
8016 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8017 pointer.
8018
111217b3
PA
80192012-04-04 Pedro Alves <palves@redhat.com>
8020
8021 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8022 (sparc_store_gregset_from_stack, sparc_store_gregset)
8023 (sparc_breakpoint_at): Fix formatting.
8024
8365dcf5
TJB
80252012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8026
8027 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8028 are available.
8029 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8030 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8031 * config.in: Regenerate.
8032 * configure: Likewise.
8033
689cc2ae
PA
80342012-03-29 Pedro Alves <palves@redhat.com>
8035
8036 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8037 Correct ptrace arguments.
8038
c14dfd32
PA
80392012-03-28 Pedro Alves <palves@redhat.com>
8040
8041 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8042 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8043 (IA64_FR1_REGNUM): New defines.
8044 (ia64_fetch_register): New.
8045 (the_low_target): Install it.
8046 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8047 field.
8048 * linux-low.c (linux_fetch_registers): Try the
8049 the_low_target.fetch_register hook first.
8050
8051 * linux-arm-low.c (the_low_target): Adjust.
8052 * linux-bfin-low.c (the_low_target): Adjust.
8053 * linux-cris-low.c (the_low_target): Adjust.
8054 * linux-crisv32-low.c (the_low_target): Adjust.
8055 * linux-m32r-low.c (the_low_target): Adjust.
8056 * linux-m68k-low.c (the_low_target): Adjust.
8057 * linux-mips-low.c (the_low_target): Adjust.
8058 * linux-ppc-low.c (the_low_target): Adjust.
8059 * linux-s390-low.c (the_low_target): Adjust.
8060 * linux-sh-low.c (the_low_target): Adjust.
8061 * linux-sparc-low.c (the_low_target): Adjust.
8062 * linux-tic6x-low.c (the_low_target): Adjust.
8063 * linux-x86-low.c (the_low_target): Adjust.
8064 * linux-xtensa-low.c (the_low_target): Adjust.
8065
63c88e13
PA
80662012-03-26 Pedro Alves <palves@redhat.com>
8067
8068 * server.c (handle_qxfer_libraries): Don't bail early if
8069 the_target->qxfer_libraries_svr4 is not NULL.
8070
fb723180
PA
80712012-03-26 Pedro Alves <palves@redhat.com>
8072
8073 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8074
0afae3cf
PA
80752012-03-23 Pedro Alves <palves@redhat.com>
8076
8077 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8078 "library-list-svr4" element's start tag when the the DSO list is
8079 empty.
8080
485f1ee4
PA
80812012-03-23 Pedro Alves <palves@redhat.com>
8082
8083 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8084 a variable whose type size is the same as the inferior's pointer
8085 size.
8086
a5362b9a
TS
80872012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8088
8089 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8090 struct siginfo.
8091 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8092 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8093 * linux-low.h: Include <signal.h>.
8094 (struct siginfo): Remove forward declaration.
8095 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8096 struct siginfo.
8097
d226c142
MF
80982012-03-21 Mike Frysinger <vapier@gentoo.org>
8099
8100 * .gitignore: Ignore more files.
8101
122f36ef
PA
81022012-03-19 Pedro Alves <palves@redhat.com>
8103 Jan Kratochvil <jan.kratochvil@redhat.com>
8104
8105 * server.c (cont_thread, general_thread): Add describing comments.
8106 (start_inferior): Clear `cont_thread'.
8107 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8108 of a process.
8109
fc3e5175
YQ
81102012-03-15 Yao Qi <yao@codesourcery.com>
8111
8112 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8113 handling to ...
8114 (cmd_qtdp): ... here.
8115
8d0d92cd
YQ
81162012-03-15 Yao Qi <yao@codesourcery.com>
8117
8118 * tracepoint.c (struct tracepoint_action_ops): New.
8119 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8120 (m_tracepoint_action_download): New.
8121 (r_tracepoint_action_download): New.
8122 (x_tracepoint_action_download): New.
8123 (l_tracepoint_action_download): New.
8124 (add_tracepoint_action): Install `action->ops' according type.
8125 (download_tracepoint_1): Move code `download' function pointer
8126 of various tracepoint_action_ops.
8127
87b0bb13
JK
81282012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8129
8130 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8131 linux_ptrace_attach_warnings.
8132
5f572dec
JK
81332012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8134
8135 * Makefile.in (linux-ptrace.o): New.
8136 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8137 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8138 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8139 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8140 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8141 of these targets.
8142 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8143
f4647387
YQ
81442012-03-08 Yao Qi <yao@codesourcery.com>
8145 Pedro Alves <palves@redhat.com>
8146
8147 Fix PR server/13392.
8148 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8149 offset of JMP insn.
8150 * tracepoint.c (remove_tracepoint): New.
8151 (cmd_qtdp): Call remove_tracepoint when failed to install.
8152
9b224c5e
PA
81532012-03-07 Pedro Alves <palves@redhat.com>
8154
8155 * linux-low.c (get_detach_signal): New.
8156 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8157 Pass on pending signals to PTRACE_DETACH. Check the result of the
8158 ptrace call.
8159 * server.c (program_signals, program_signals_p): New.
8160 (handle_general_set): Handle QProgramSignals.
8161 * server.h (program_signals, program_signals_p): Declare.
8162
e237a7e2
JK
81632012-03-05 Pedro Alves <palves@redhat.com>
8164 Jan Kratochvil <jan.kratochvil@redhat.com>
8165
8166 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8167 New comment why.
8168
5808517f
YQ
81692012-03-03 Yao Qi <yao@codesourcery.com>
8170
8171 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8172 agent_look_up_symbols.
8173
58b4daa5
YQ
81742012-03-03 Yao Qi <yao@codesourcery.com>
8175
8176 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8177 (linux-x86-low.o): Likewise.
8178 * server.h: Remove in_process_agent_loaded.
8179 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8180 common/agent.c.
8181 Update callers.
8182
8ffcbaaf
YQ
81832012-03-03 Yao Qi <yao@codesourcery.com>
8184
8185 * tracepoint.c (gdb_agent_capability): New global.
8186 (in_process_agent_loaded_ust): Renamed to
8187 `in_process_agent_supports_ust'.
8188 Update callers.
8189 (in_process_agent_supports_ust): Call agent_capability_check.
8190 (clear_installed_tracepoints): Assert that agent supports
8191 agent.
8192
d1feda86
YQ
81932012-03-03 Yao Qi <yao@codesourcery.com>
8194
8195 * linux-low.c (linux_supports_agent): New.
8196 (linux_target_ops): Initialize field `supports_agent' with
8197 linux_supports_agent.
8198 * target.h (struct target_ops) <supports_agent>: New.
8199 (target_supports_agent): New macro.
8200 * server.c (handle_general_set): Handle packet 'QAgent'.
8201 (handle_query): Send `QAgent+'.
8202 * Makefile.in (server.o): Depends on agent.h.
8203
2fa291ac
YQ
82042012-03-03 Yao Qi <yao@codesourcery.com>
8205
8206 * Makefile.in (OBS): Add agent.o.
8207 Add new rule for agent.o.
8208 Track dependence of tracepoint.c on agent.h.
8209 * tracepoint.c (run_inferior_command_1):
8210 (run_inferior_command): Call agent_run_command.
8211 (gdb_ust_connect_sync_socket): Deleted. Move it to
8212 common/agent.c.
8213 (resume_thread, stop_thread): Likewise.
8214 (gdb_ust_socket_init): Renamed to ...
8215 (gdb_agent_socket_init): ... New.
8216 (gdb_ust_thread): Renamed to ...
8217 (gdb_agent_helper_thread): ... New.
8218 (gdb_ust_init): Move some code to ...
8219 (gdb_agent_init): ... here. New.
8220 [HAVE_UST]: Call gdb_ust_init.
8221 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8222 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8223 * config.in, configure: Regenerated.
8224
05044653
PA
82252012-03-02 Pedro Alves <palves@redhat.com>
8226
8227 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8228 * linux-low.c (struct simple_pid_list): New.
8229 (stopped_pids): New a struct simple_pid_list pointer.
8230 (add_to_pid_list, pull_pid_from_list): New.
8231 (handle_extended_wait): Don't assume the first signal new children
8232 report is SIGSTOP. Adjust call to pull_pid_from_list.
8233 (linux_wait_for_lwp): Adjust.
8234
8d00225b
YQ
82352012-03-02 Yao Qi <yao@codesourcery.com>
8236
8237 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8238 debug log.
8239
19560ba5
YQ
82402012-03-02 Yao Qi <yao@codesourcery.com>
8241
8242 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8243 `stop_pc' and `tpoint'. Update caller.
8244
1faeff08
MR
82452012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8246
8247 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8248 * linux-low.c (use_linux_regsets): New macro.
8249 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8250 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8251 (linux_register_in_regsets): New function.
8252 (usr_fetch_inferior_registers): Skip registers covered by
8253 regsets.
8254 (usr_store_inferior_registers): Likewise.
8255 (usr_fetch_inferior_registers): New macro.
8256 (usr_store_inferior_registers): Likewise.
8257 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8258 (linux_store_registers): Likewise.
8259 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8260 prototype.
8261 (init_registers_mips64_dsp_linux): Likewise.
8262 (init_registers_mips_linux): New macro.
8263 (init_registers_mips_dsp_linux): Likewise.
8264 (mips_dsp_num_regs): Likewise.
8265 (DSP_BASE, DSP_CONTROL): New fallback macros.
8266 (mips_base_regs): New macro.
8267 (mips_regmap): Use it. Fix the size.
8268 (mips_dsp_regmap): New variable.
8269 (mips_dsp_regset_bitmap): Likewise.
8270 (mips_arch_setup): New function.
8271 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8272 than mips_regmap.
8273 (mips_cannot_store_register): Likewise.
8274 (the_low_target): Update .arch_setup, .num_regs and .regmap
8275 initializers. Add .regset_bitmap initializer.
8276 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8277 initializer.
8278 * linux-bfin-low.c (the_low_target): Likewise.
8279 * linux-cris-low.c (the_low_target): Likewise.
8280 * linux-crisv32-low.c (the_low_target): Likewise.
8281 * linux-ia64-low.c (the_low_target): Likewise.
8282 * linux-m32r-low.c (the_low_target): Likewise.
8283 * linux-m68k-low.c (the_low_target): Likewise.
8284 * linux-ppc-low.c (the_low_target): Likewise.
8285 * linux-s390-low.c (the_low_target): Likewise.
8286 * linux-sh-low.c (the_low_target): Likewise.
8287 * linux-sparc-low.c (the_low_target): Likewise.
8288 * linux-tic6x-low.c (the_low_target): Likewise.
8289 * linux-x86-low.c (the_low_target): Likewise.
8290 * linux-xtensa-low.c (the_low_target): Likewise.
8291 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8292 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8293 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8294 srv_xmlfiles.
8295 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8296 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8297
c03e6ccc
YQ
82982012-02-29 Yao Qi <yao@codesourcery.com>
8299 Pedro Alves <palves@redhat.com>
8300
8301 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8302 `step_over_finished' is true.
8303
644cebc9
PA
83042012-02-27 Pedro Alves <palves@redhat.com>
8305
8306 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8307 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8308
c14d7ab2
PA
83092012-02-27 Pedro Alves <palves@redhat.com>
8310
8311 PR server/9684
8312 * linux-low.c (pid_is_stopped): New.
8313 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8314
412c89dd
LM
83152012-02-25 Luis Machado <lgustavo@codesourcery.com>
8316
8317 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8318 of conditions.
8319
b745defe
MR
83202012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8321
8322 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8323
9f3a5c85
LM
83242012-02-24 Luis Machado <lgustavo@codesourcery>
8325
8326 * server.c (handle_query): Advertise support for target-side
8327 breakpoint condition evaluation.
8328 (process_point_options): New function.
8329 (process_serial_event): When inserting a breakpoint, check for
8330 a target-side condition that should be evaluated.
8331
8332 * mem-break.c: Include regcache.h and ax.h.
8333 (point_cond_list_t): New data structure.
8334 (breakpoint) <cond_list>: New field.
8335 (find_gdb_breakpoint_at): Make non-static.
8336 (delete_gdb_breakpoint_at): Clear any target-side
8337 conditions.
8338 (clear_gdb_breakpoint_conditions): New function.
8339 (add_condition_to_breakpoint): Likewise.
8340 (add_breakpoint_condition): Likewise.
8341 (gdb_condition_true_at_breakpoint): Likewise.
8342 (gdb_breakpoint_here): Return result directly instead
8343 of going through a local variable.
8344
8345 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8346 (clear_gdb_breakpoint_conditions): Likewise.
8347 (add_breakpoint_condition): Likewise.
8348 (gdb_condition_true_at_breakpoint): Likewise.
8349
8350 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8351 (need_step_over_p): Take target-side breakpoint condition into
8352 consideration.
8353
5e1dc496
LM
83542012-02-24 Luis Machado <lgustavo@codesourcery>
8355
8356 * server.h: Include tracepoint.h.
8357 (agent_mem_read, agent_get_trace_state_variable_value,
8358 agent_set_trace_state_variable_value,
8359 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8360 get_set_tsv_func_addr): New prototypes.
8361
8362 * ax.h: New include file.
8363 * ax.c: New source file.
8364
8365 * tracepoint.c: Include ax.h.
8366 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8367 agent_expr, eval_result_type): Move to ax.h.
8368 (parse_agent_expr): Rename to ...
8369 (gdb_parse_agent_expr): ... this, make it non-static and move
8370 to ax.h.
8371 (unparse_agent_expr) Rename to ...
8372 (gdb_unparse_agent_expr): ... this, make it non-static and move
8373 to ax.h.
8374 (eval_agent_expr): Rename to ...
8375 (eval_tracepoint_agent_expr): ... this.
8376 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8377 forward declarations.
8378 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8379 (agent_get_trace_state_variable_value): New function.
8380 (agent_set_trace_state_variable_value): New function.
8381 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8382 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8383 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8384 (condition_true_at_tracepoint): Likewise.
8385 (parse_agent_expr): Rename to ...
8386 (gdb_parse_agent_expr): ... this and move to ax.c.
8387 (unparse_agent_expr): Rename to ...
8388 (gdb_unparse_agent_expr): ... this and move to ax.c.
8389 (gdb_agent_op_name): Move to ax.c.
8390 (eval_agent_expr): Rename to ...
8391 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8392 and move to ax.c.
8393 (eval_tracepoint_agent_expr): New function.
8394 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8395 non-static.
5e1dc496
LM
8396 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8397 ax.c.
8398 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8399 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8400 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8401 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8402 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8403 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8404 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8405 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8406 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8407 (compile_bytecodes): Remove forward declaration.
8408 (is_goto_target): Move to ax.c.
8409 (compile_bytecodes): Move to ax.c and call
8410 agent_get_trace_state_variable_value (...) and
8411 agent_set_trace_state_variable_value (...).
8412
8413 * Makefile.in: Update ax.c and IPA dependencies.
8414
277e4e52
PA
84152012-02-24 Pedro Alves <palves@redhat.com>
8416
8417 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8418 (cmd_bigqtbuffer_circular): ... this. Only handle
8419 'QTBuffer:circular:'.
8420 (handle_tracepoint_general_set): Adjust.
8421
bf4c19f7
YQ
84222012-02-16 Yao Qi <yao@codesourcery.com>
8423
8424 * inferiors.c: Move code to ...
8425 * dll.c: .... here. New.
8426 * server.h: Declare clear_dlls.
8427 * Makefile.in (SFILES): Add dll.c.
8428 (OBS): Add dll.o
8429 (dll.o): New rule.
8430
d73f2619
YQ
84312012-02-11 Yao Qi <yao@codesourcery.com>
8432
8433 * server.c: (handle_monitor_command): Add a new parameter
8434 `own_buf'.
8435 (handle_query): Update caller.
8436
f8255c2a
JB
84372012-02-09 Joel Brobecker <brobecker@adacore.com>
8438
8439 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8440 * configure, config.in: Regenerate.
8441 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8442 is not defined.
8443
da84f473
PA
84442012-02-02 Pedro Alves <palves@redhat.com>
8445
8446 Try SIGKILL first, then PTRACE_KILL.
8447 * linux-low.c (linux_kill_one_lwp): New.
8448 (linux_kill_one_lwp): Rename to ...
8449 (kill_one_lwp_callback): ... this. Use the new
8450 linux_kill_one_lwp.
8451
e886a173
PA
84522012-02-02 Pedro Alves <palves@redhat.com>
8453
8454 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8455 inferior.
8456
be07f1a2
PA
84572012-01-27 Pedro Alves <palves@redhat.com>
8458
8459 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8460 (elf_64_file_p): Make static.
8461 (linux_pid_exe_is_elf_64_file): New.
8462 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8463 Delete declarations.
8464 (linux_pid_exe_is_elf_64_file): Declare.
8465 * linux-x86-low.c (x86_arch_setup): Use
8466 linux_pid_exe_is_elf_64_file.
8467
d8301ad1
JK
84682012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8469
8470 * linux-low.c (linux_wait_for_event_1): Rename to ...
8471 (linux_wait_for_event): ... here and merge it with former
8472 linux_wait_for_event - new variable wait_ptid, use it.
8473 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8474
01b17894
PA
84752012-01-23 Pedro Alves <palves@redhat.com>
8476
8477 * server.c (main): Avoid yet another case of infinite loop while
8478 detaching/killing after a longjmp.
8479
e825046f
JK
84802012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8481
8482 Code cleanup.
8483 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8484
b9e7b9c3
UW
84852012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8486
8487 * hostio.c (handle_readlink): New function.
8488 (handle_vFile): Call it to handle "vFile:readlink" packets.
8489
901f9912
UW
84902012-01-20 Pedro Alves <palves@redhat.com>
8491 Ulrich Weigand <ulrich.weigand@linaro.org>
8492
8493 * server.c (handle_v_requests): Only support vAttach and vRun to
8494 start multiple processes when in extended protocol mode.
8495
fc1ab1a0
PA
84962012-01-17 Pedro Alves <palves@redhat.com>
8497
8498 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8499 memalign plus mprotect to allocate the scratch buffer.
8500
7d5d4e98
PA
85012012-01-13 Pedro Alves <palves@redhat.com>
8502
8503 * server.c (attach_inferior): Clear `cont_thread'.
8504
f128d5e9
PA
85052012-01-13 Pedro Alves <palves@redhat.com>
8506
8507 * server.c (main): Avoid infinite loop while detaching/killing
8508 after a longjmp.
8509
06db92f0
DE
85102012-01-09 Doug Evans <dje@google.com>
8511
8512 * server.c (start_inferior): Set last_ptid in --wrapper case.
8513
32d92999
YQ
85142012-01-06 Yao Qi <yao@codesourcery.com>
8515
8516 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8517 defined.
8518 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8519
5e0a92a9
YQ
85202012-01-04 Yao Qi <yao@codesourcery.com>
8521
8522 * tracepoint.c (cmd_qtdp): Print debug message
8523 for static tracepoint.
8524
ae639e8c
YQ
85252012-01-04 Yao Qi <yao@codesourcery.com>
8526
8527 * tracepoint.c (trace_vdebug): Differentiate debug message
8528 between gdbserver and IPA.
8529
f72429c5
YQ
85302012-01-03 Yao Qi <yao@codesourcery.com>
8531
8532 * tracepoint.c (tracepoint_was_hit): Don't collect for
8533 static tracepoint.
8534
12c3e59c
JB
85352012-01-02 Joel Brobecker <brobecker@adacore.com>
8536
8537 * terminal.h: Reformat copyright header.
8538
67827812
JB
85392012-01-02 Joel Brobecker <brobecker@adacore.com>
8540
8541 * server.c (gdbserver_version): Update copyright year.
8542 * gdbreplay.c (gdbreplay_version): Likewise.
8543
3e52c33d
JK
85442011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8545
8546 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8547
8548 Revert:
8549 2011-12-18 Hui Zhu <teawater@gmail.com>
8550 * linux-low.c (linux_create_inferior): Save return value to ret.
8551
66f1260e
HZ
85522011-12-18 Hui Zhu <teawater@gmail.com>
8553
8554 * linux-low.c (linux_create_inferior): Save return value to ret.
8555
e77616d7
DE
85562011-12-16 Doug Evans <dje@google.com>
8557
e7b06c57
DE
8558 * linux-low.c (linux_create_inferior): If stdio connection,
8559 redirect stdin from /dev/null, stdout to stderr.
8560 * remote-utils.c (remote_is_stdio): New static global.
8561 (remote_connection_is_stdio): New function.
8562 (remote_prepare): Handle stdio connection.
8563 (remote_open): Ditto.
8564 (remote_close): Don't close stdin for stdio connections.
8565 (read_prim,write_prim): New functions. Replace all calls to
8566 read/write to these.
8567 * server.c (main): Watch for "-" argument. Move call to
8568 remote_prepare before start_inferior.
8569 * server.h (STDIO_CONNECTION_NAME): New macro.
8570 (remote_connection_is_stdio): Declare.
8571
e77616d7
DE
8572 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8573 in debugging output.
8574
82067193
YQ
85752011-12-15 Yao Qi <yao@codesourcery.com>
8576
8577 * tracepoint.c: Include sys/syscall.h.
8578 (gdb_ust_thread): Remove preprocessor conditional.
8579
82bfbe7e
PA
85802011-12-14 Pedro Alves <pedro@codesourcery.com>
8581
8582 * linux-low.c (linux_detach_one_lwp): Call
8583 the_low_target.prepare_to_resume before detaching.
8584
712c6575
YQ
85852011-12-14 Yao Qi <yao@codesourcery.com>
8586
8587 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8588 of write.
8589
d54d1edf
YQ
85902011-12-14 Yao Qi <yao@codesourcery.com>
8591
8592 * i386-low.c (i386_low_stopped_data_address): Initialize local
8593 variable `control'.
8594
6210a125
PA
85952011-12-13 Pedro Alves <pedro@codesourcery.com>
8596
8597 PR remote/13492
8598
8599 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8600 DR_CONTROL unless necessary. Extend comments.
8601 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8602 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8603
2ece8244
YQ
86042011-12-13 Yao Qi <yao@codesourcery.com>
8605
8606 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8607 macros.
8608 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8609
784867a5
JK
86102011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8611
8612 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8613 Print new debug message for such case.
8614
6bf36717
JK
86152011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8616
8617 Fix overlapping memcpy.
8618 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8619 the read_inferior_memory transfer.
8620 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8621 write_inferior_memory transfer.
8622 (set_fast_tracepoint_jump): New variable buf. Use it for the
8623 read_inferior_memory and write_inferior_memory transfers.
8624 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8625 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8626 Use it for the write_inferior_memory transfer.
8627 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8628 buffers.
8629
50275556
MR
86302011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8631
8632 * linux-low.c (fetch_register, store_register): Make code
8633 consistent, fix formatting.
8634
7325beb4
MR
86352011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8636
8637 * linux-low.c (usr_store_inferior_registers): Factor out code
8638 to handle individual registers into...
8639 (store_register): ... this new function.
8640
c642a434
UW
86412011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8642
8643 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8644 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8645 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8646 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8647 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8648 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8649 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8650 (srv_xmlfiles): Add new XML files.
8651
8652 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8653 and <sys/uio.h>.
8654 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8655 (init_registers_s390_linux32v1): Add prototype.
8656 (init_registers_s390_linux32v2): Likewise.
8657 (init_registers_s390_linux64v1): Likewise.
8658 (init_registers_s390_linux64v2): Likewise.
8659 (init_registers_s390x_linux64v1): Likewise.
8660 (init_registers_s390x_linux64v2): Likewise.
8661 (s390_num_regs): Increment to 52.
8662 (s390_regmap): Add orig_r2 register.
8663 (s390_num_regs_3264): Increment to 68.
8664 (s390_regmap_3264): Add orig_r2 register.
8665 (s390_collect_ptrace_register): Handle orig_r2 register.
8666 (s390_supply_ptrace_register): Likewise.
8667 (s390_fill_last_break): New function.
8668 (s390_store_last_break): Likewise.
8669 (s390_fill_system_call): New function.
8670 (s390_store_system_call): Likewise.
8671 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8672 register sets.
8673 (s390_check_regset): New function.
8674 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8675 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8676 Update target_regsets for available register sets.
8677
2268b414
JK
86782011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8679 Jan Kratochvil <jan.kratochvil@redhat.com>
8680
8681 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8682 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8683 New.
8684 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8685 * linux-low.h (struct process_info_private): New member r_debug.
8686 * server.c (handle_qxfer_libraries): Call
8687 the_target->qxfer_libraries_svr4.
8688 (handle_qxfer_libraries_svr4): New function.
8689 (qxfer_packets): New entry "libraries-svr4".
8690 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8691 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8692 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8693 PACKET_qXfer_libraries_svr4.
8694
d6db1fab
UW
86952011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8696
8697 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8698 PSW address/mask between 8-byte and 16-byte formats.
8699 (s390_supply_ptrace_register): Likewise.
8700 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8701 basic addressing mode bit.
8702
242f5f1c
SS
87032011-11-24 Stan Shebs <stan@codesourcery.com>
8704
8705 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8706
f196051f
SS
87072011-11-17 Stan Shebs <stan@codesourcery.com>
8708
8709 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8710 (tracing_start_time): New global.
8711 (tracing_stop_time): New global.
8712 (tracing_user_name): New global.
8713 (tracing_notes): New global.
8714 (tracing_stop_note): New global.
8715 (cmd_qtstart): Set traceframe_usage, start_time.
8716 (stop_tracing): Set stop_time.
8717 (cmd_qtstatus): Report additional status.
8718 (cmd_qtp): New function.
8719 (handle_tracepoint_query): Call it.
8720 (cmd_qtnotes): New function.
8721 (handle_tracepoint_general_set): Call it.
8722 (get_timestamp): Rename from tsv_get_timestamp.
8723
405f8e94
SS
87242011-11-14 Stan Shebs <stan@codesourcery.com>
8725 Kwok Cheung Yeung <kcy@codesourcery.com>
8726
8727 * linux-x86-low.c (small_jump_insn): New.
8728 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8729 trampoline and error message, build a trampoline and issue a small
8730 jump instruction to it.
8731 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8732 trampoline and error message.
8733 (x86_get_min_fast_tracepoint_insn_len): New.
8734 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8735 * linux-low.h (struct linux_target_ops): Add arguments to
8736 install_fast_tracepoint_jump_pad operation, add new operation.
8737 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8738 arguments.
8739 (linux_get_min_fast_tracepoint_insn_len): New function.
8740 (linux_target_op): Add new operation.
8741 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8742 (gdb_trampoline_buffer_end): Ditto.
8743 (gdb_trampoline_buffer_error): Ditto.
8744 (struct ipa_sym_addresses): Add fields for new IPA variables.
8745 (symbol_list): Add entries for new IPA variables.
8746 (struct tracepoint): Add fields to hold the address range of the
8747 trampoline used by the tracepoint.
8748 (trampoline_buffer_head): New static variable.
8749 (trampoline_buffer_tail): Ditto.
8750 (claim_trampoline_space): New function.
8751 (have_fast_tracepoint_trampoline_buffer): New function.
8752 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8753 structure.
8754 (install_fast_tracepoint): Ditto, also add error buffer argument.
8755 (cmd_qtminftpilen): New function.
8756 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8757 (fast_tracepoint_from_trampoline_address): New function.
8758 (fast_tracepoint_collecting): Handle trampoline as part of jump
8759 pad space.
8760 (set_trampoline_buffer_space): New function.
8761 (initialize_tracepoint): Initialize new IPA variables.
8762 * target.h (struct target_ops): Add arguments to
8763 install_fast_tracepoint_jump_pad operation, add new
8764 get_min_fast_tracepoint_insn_len operation.
8765 (target_get_min_fast_tracepoint_insn_len): New.
8766 (install_fast_tracepoint_jump_pad): Add arguments.
8767 * server.h (IPA_BUFSIZ): Define.
8768 * linux-i386-ipa.c: Include extra header files.
8769 (initialize_fast_tracepoint_trampoline_buffer): New function.
8770 (initialize_low_tracepoint): Call it.
8771 * server.h (set_trampoline_buffer_space): Declare.
8772 (claim_trampoline_space): Ditto.
8773 (have_fast_tracepoint_trampoline_buffer): Ditto.
8774
1e4d1764
YQ
87752011-11-14 Yao Qi <yao@codesourcery.com>
8776
8777 * server.c (handle_query): Handle InstallInTrace for qSupported.
8778 * tracepoint.c (add_tracepoint): Sort list.
8779 (install_tracepoint, download_tracepoint): New.
8780 (cmd_qtdp): Call them to install and download tracepoints.
8781 (sort_tracepoints): Removed.
8782 (cmd_qtstart): Update.
8783
5c73ff4e
YQ
87842011-11-14 Yao Qi <yao@codesourcery.com>
8785
8786 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8787 * mem-break.h: Declare.
8788 * tracepoint.c (cmd_qtstart): Move some code to ...
8789 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8790 New.
8791 (download_tracepoints): Move some code to ...
8792 (download_tracepoint_1): ... here. New.
8793
86a30030
YQ
87942011-11-08 Yao Qi <yao@codesourcery.com>
8795
8796 * remote-utils.c (relocate_instruction): A comment fix.
8797
8d26e50c
JB
87982011-11-07 Joel Brobecker <brobecker@adacore.com>
8799
8800 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8801 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8802 dr_status_mirror and dr_control_mirror from debug_reg_state.
8803 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8804 (i386_initial_stuff): Remove use of deleted globals.
8805 (i386_get_thread_context, i386_set_thread_context,
8806 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8807 from debug_reg_state.
8808
a59306a3
YQ
88092011-11-05 Yao Qi <yao@codesourcery.com>
8810
8811 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8812 address as TPOINT's.
8813
3065dfb6
SS
88142011-11-02 Stan Shebs <stan@codesourcery.com>
8815
8816 * tracepoint.c (agent_mem_read_string): New function.
8817 (eval_agent_expr): Call it for tracenz.
8818 * server.c (handle_query): Report support for tracenz.
8819
fd0d8c7c
YQ
88202011-11-02 Yao Qi <yao@codesourcery.com>
8821
8822 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8823
609086b1
YQ
88242011-11-02 Yao Qi <yao@codesourcery.com>
8825
8826 * target.h: Fix a typo in comment.
8827
b9fd1791
PA
88282011-10-31 Pedro Alves <pedro@codesourcery.com>
8829
8830 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8831 clobber the breakpoints' shadows with fast tracepoint jumps.
8832 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8833 * target.c (write_inferior_memory): Also pass MYADDR down to
8834 check_mem_write.
8835
03583c20
UW
88362011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8837
8838 * configure.ac: Check support for personality routine.
8839 * configure: Regenerate.
8840 * config.in: Likewise.
8841 * linux-low.c: Include <sys/personality.h>.
8842 Define ADDR_NO_RANDOMIZE if necessary.
8843 (linux_create_inferior): Disable address space randomization when
8844 forking inferior, if requested.
8845 (linux_supports_disable_randomization): New function.
8846 (linux_target_ops): Install it.
8847 * server.h (disable_randomization): Declare.
8848 * server.c (disable_randomization): New global variable.
8849 (handle_general_set): Handle QDisableRandomization.
8850 (handle_query): Likewise for qSupported.
8851 (main): Support --disable-randomization and --no-disable-randomization
8852 command line arguments.
8853 * target.h (struct target_ops): Add supports_disable_randomization.
8854 (target_supports_disable_randomization): New macro.
8855
723b724b
MF
88562011-09-29 Mike Frysinger <vapier@gentoo.org>
8857
8858 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8859 ifdef check.
8860 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8861 [!PT_GETDSBT] (target_loadmap): New definition.
8862 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8863 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8864 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8865 and PT_GETDSBT to LINUX_LOADMAP.
8866 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8867 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8868
55329a5c 88692011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8870
8871 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8872 (arm_linux_hwbp_cap): New static variable.
8873 (arm_linux_get_hwbp_cap): Replace by ...
8874 (arm_linux_init_hwbp_cap): ... this new function.
8875 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8876 (arm_linux_get_hw_watchpoint_count): Likewise.
8877 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8878 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8879 (arm_prepare_to_resume): Use perror_with_name instead of error.
8880
55329a5c 88812011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8882
8883 * linux-arm-low.c: Include <signal.h>.
8884 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8885 (struct arm_linux_hwbp_cap): New data type.
8886 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8887 (struct arm_linux_hw_breakpoint): New data type.
8888 (MAX_BPTS, MAX_WPTS): Define.
8889 (struct arch_process_info, struct arch_lwp_info): New data types.
8890 (arm_linux_get_hwbp_cap): New function.
8891 (arm_linux_get_hw_breakpoint_count): Likewise.
8892 (arm_linux_get_hw_watchpoint_count): Likewise.
8893 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8894 (arm_hwbp_control_initialize): Likewise.
8895 (arm_hwbp_control_is_enabled): Likewise.
8896 (arm_hwbp_control_is_initialized): Likewise.
8897 (arm_hwbp_control_disable): Likewise.
8898 (arm_linux_hw_breakpoint_equal): Likewise.
8899 (arm_linux_hw_point_initialize): Likewise.
8900 (struct update_registers_data): New data structure.
8901 (update_registers_callback: New function.
8902 (arm_insert_point): Likewise.
8903 (arm_remove_point): Likewise.
8904 (arm_stopped_by_watchpoint): Likewise.
8905 (arm_stopped_data_address): Likewise.
8906 (arm_new_process): Likewise.
8907 (arm_new_thread): Likewise.
8908 (arm_prepare_to_resume): Likewise.
8909 (the_low_target): Register arm_insert_point, arm_remove_point,
8910 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8911 arm_new_thread, and arm_prepare_to_resume.
8912
6b9801d4
SS
89132011-09-15 Stan Shebs <stan@codesourcery.com>
8914
8915 * server.h (struct emit_ops): Add compare-goto fields.
8916 * tracepoint.c (gdb_agent_op_sizes): New table.
8917 (emit_eq_goto): New function.
8918 (emit_ne_goto): New function.
8919 (emit_lt_goto): New function.
8920 (emit_le_goto): New function.
8921 (emit_gt_goto): New function.
8922 (emit_ge_goto): New function.
8923 (is_goto_target): New function.
8924 (compile_bytecodes): Recognize special cases of compare-goto
8925 combinations and call specialized emitters for them.
8926 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8927 (amd64_emit_ne_goto): New function.
8928 (amd64_emit_lt_goto): New function.
8929 (amd64_emit_le_goto): New function.
8930 (amd64_emit_gt_goto): New function.
8931 (amd64_emit_ge_goto): New function.
8932 (amd64_emit_ops): Add the new functions.
8933 (i386_emit_eq_goto): New function.
8934 (i386_emit_ne_goto): New function.
8935 (i386_emit_lt_goto): New function.
8936 (i386_emit_le_goto): New function.
8937 (i386_emit_gt_goto): New function.
8938 (i386_emit_ge_goto): New function.
8939 (i386_emit_ops): Add the new functions.
8940
bf15cbda
SS
89412011-09-08 Stan Shebs <stan@codesourcery.com>
8942
8943 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8944 (i386_emit_epilogue): Restore %ebx.
8945
943ca1dd
JZ
89462011-08-31 Jie Zhang <jzhang918@gmail.com>
8947
8948 * server.c (step_thread): Remove definition.
8949 (process_serial_event): Don't handle Hs.
8950 * server.h (step_thread): Remove declaration.
8951 * target.c (set_desired_inferior): Remove use of step_thread.
8952
e3deef73
LM
89532011-08-24 Luis Machado <lgustavo@codesourcery.com>
8954
8955 * linux-low.c: Include linux-procfs.h.
8956 (linux_attach_lwp_1): Update comments.
8957 (linux_attach): Scan for existing threads when attaching to a
8958 process that is the tgid.
8959 * Makefile.in: Update dependencies.
8960
13da1c97
LM
89612011-08-24 Luis Machado <lgustavo@codesourcery.com>
8962
8963 * configure.srv: Add linux-procfs.o dependencies.
8964
881127c9
YQ
89652011-08-14 Yao Qi <yao@codesourcery.com>
8966
8967 * target.h (struct target_ops): Fix indent.
8968 * win32-low.c (win32_target_ops): Fix comment.
8969
58dbd541
YQ
89702011-08-14 Andrew Jenner <andrew@codesourcery.com>
8971 Yao Qi <yao@codesourcery.com>
8972
8973 * Makefile.in (clean): Remove tic6x-*.c files.
8974 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8975 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8976 (tic6x-c64xp-linux.c): Likewise.
8977 * configure.srv: Add support for tic6x-*-uclinux.
8978 * linux-tic6x-low.c: New.
8979 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8980
78d85199
YQ
89812011-08-14 Andrew Stubbs <ams@codesourcery.com>
8982 Yao Qi <yao@codesourcery.com>
8983
8984 * target.h (struct target_ops): Add read_loadmap.
8985 * linux-low.c (struct target_loadseg): New type.
8986 (struct target_loadmap): New type.
8987 (linux_read_loadmap): New function.
8988 (linux_target_ops): Add linux_read_loadmap.
8989 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8990 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8991 to NULL.
78d85199 8992
a959a88d
EZ
89932011-08-05 Eli Zaretskii <eliz@gnu.org>
8994
8995 * win32-low.c: Include <stdint.h>.
8996
1ced966e
PA
89972011-07-22 Pedro Alves <pedro@codesourcery.com>
8998
8999 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9000 to the inferior here.
9001 (i386_remove_aligned_watchpoint): Ditto.
9002 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9003 fit part of the watchpoint in the debug registers.
9004 (i386_update_inferior_debug_regs): New.
9005 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9006 registers, and only update the inferior on success.
9007 (i386_low_remove_watchpoint): Ditto.
9008
d26e3629
KY
90092011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9010
9011 * linux-low.c (compare_ints, unique, list_threads, show_process,
9012 linux_core_of_thread): Delete.
9013 (linux_target_ops): Change linux_core_of_thread to
9014 linux_common_core_of_thread.
9015 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9016 * utils.c (malloc_failure): Change type of argument.
9017 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9018 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9019 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9020 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9021 (IPA_OBJS): Add common-utils-ipa.o.
9022 (ptid_h, linux_osdata_h): New macros.
9023 (server_h): Add common/common-utils.h, common/xml-utils.h,
9024 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9025 common/ptid.h.
9026 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9027 ptid.o, buffer.o): New rules.
9028 (linux-low.o): Add common/linux-osdata.h as a dependency.
9029 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9030 * configure.ac: Add AC_HEADER_DIRENT check.
9031 * config.in: Regenerate.
9032 * configure: Regenerate.
9033 * remote-utils.c (xml_escape_text): Delete.
9034 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9035 buffer_xml_printf): Move to common/buffer.c.
9036 * server.c (main): Remove call to initialize_inferiors.
9037 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9038 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9039 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9040 internal_error, gdb_assert, gdb_assert_fail): Delete.
9041 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9042 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9043 common/buffer.h.
9044 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9045 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9046 initialize_inferiors): Delete.
9047
2275a1a7
PA
90482011-07-20 Pedro Alves <pedro@codesourcery.com>
9049
9050 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9051 symbol error.
9052
0a5b1e09
PA
90532011-05-31 Pedro Alves <pedro@codesourcery.com>
9054
9055 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9056 assertion.
9057 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9058
6938fd34
YQ
90592011-05-26 Yao Qi <yao@codesourcery.com>
9060
9061 * Makefile.in (thread-db.o): Track dependence to
9062 common/gdb_thread_db.h.
9063 * thread-db.c: include gdb_thread_db.h from right place.
9064
b481f9e0
TT
90652011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9066
9067 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9068 __FILE__ and __LINE__ to internal_error.
9069
98a5dd13
DE
90702011-05-13 Doug Evans <dje@google.com>
9071
9072 * thread-db.c (try_thread_db_load_from_sdir): New function.
9073 (try_thread_db_load_from_dir): New function.
9074 (thread_db_load_search): Handle $sdir, ignore $pdir.
9075 Remove trying of system directories if search of
9076 libthread-db-search-path fails, that is now done via $sdir.
9077
d248b706
KY
90782011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9079
9080 * server.c (handle_query): Add EnableDisableTracepoints to the list
9081 of supported features.
43aaf8b6 9082 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9083 tracepoints.
43aaf8b6
PA
9084 (cmd_qtenable_disable): New.
9085 (cmd_qtstart): Install tracepoints even if disabled.
9086 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9087 receiving a QTEnable or QTDisable packet.
9088 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9089 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9090 tracepoints.
9091 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9092
84e578fb
DE
90932011-05-10 Doug Evans <dje@google.com>
9094
9095 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9096
71f55dd8
DE
90972011-05-04 Doug Evans <dje@google.com>
9098
9099 * linux-low.c (linux_join): Skip process lookup.
9100 * spu-low.c (spu_join): Ditto.
9101 * server.c (join_inferiors_callback): Delete.
9102 (process_serial_event): For 'D' packet (detach) call join_inferior
9103 directly.
9104
4d393d60
JM
91052011-05-04 Joseph Myers <joseph@codesourcery.com>
9106
9107 * README: Don't mention xscale*-*-linux*.
9108 * configure.srv (xscale*-*-linux*): Don't handle target.
9109
b00ad6ff
NF
91102011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9111
9112 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9113 casting pointers.
9114 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9115 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9116 (i386_emit_void_call_2): Likewise.
9117
af96c192
YQ
91182011-04-26 Yao Qi <yao@codesourcery.com>
9119
43aaf8b6
PA
9120 * linux-low.c: Move common macros to linux-ptrace.h.
9121 Include linux-ptrace.h.
af96c192
YQ
9122 * Makefile.in (linux_ptrace_h): New.
9123 (linux-low.o): Depends on linux-ptrace.h.
9124
03f2bd59
JK
91252011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9126
9127 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9128 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9129 (remote_prepare): New function with most of the TCP code from ...
9130 (remote_open): ... here. Detect PORT here unconditionally. Move also
9131 setting transport_is_reliable.
9132 * server.c (run_once): New variable.
9133 (gdbserver_usage): Document it.
9134 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9135 the first run if RUN_ONCE.
9136 * server.h (run_once, remote_prepare): New declarations.
9137
7a9dd1b2
TT
91382011-04-19 Tom Tromey <tromey@redhat.com>
9139
9140 * win32-low.c (handle_load_dll): Remove duplicate "the".
9141
81239425
PM
91422011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9143
9144 Remove support for old Cygwin 1.5 versions.
9145 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9146 function to avoid warning.
9147 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9148 warning.
9149
9e0627f1
PM
91502011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9151
9152 * gdbserver/server.h (Macro _): Define it if not available.
9153
588eebee
MS
91542011-03-14 Michael Snyder <msnyder@vmware.com>
9155
348af9f7 9156 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9157
43f70d4c
JB
91582011-03-10 Joel Brobecker <brobecker@adacore.com>
9159
9160 * Makefile.in (maintainer-clean realclean distclean): Remove
9161 "make ... subdir_do" command.
9162
348af9f7
MS
91632011-03-10 Michael Snyder <msnyder@vmware.com>
9164
9165 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9166
9167 * server.c (handle_v_run): Free alloced buffer on early return.
9168
e637a4f5
YQ
91692011-03-09 Yao Qi <yao@codesourcery.com>
9170
9171 Revert:
9172 2011-03-04 Yao Qi <yao@codesourcery.com>
9173
9174 * Makefile.in: Remove GNU make feature --directory.
9175
9176 2011-03-05 Yao Qi <yao@codesourcery.com>
9177
9178 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9179 (subdir_do): New make target. Copied from gdb/Makefile.
9180 (maintainer-clean, realclean, distclean, clean): Call corresponding
9181 make targets in common/Makefile.
9182
9183 2011-02-11 Yao Qi <yao@codesourcery.com>
9184
9185 * configure.ac: Call AC_PROG_RANLIB.
9186 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9187 * configure: Regenerate.
9188
e6edda56
JK
91892011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9190
9191 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9192
e5141119
JB
91932011-03-06 Yao Qi <yao@codesourcery.com>
9194
9195 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9196
64794aa4
JB
91972011-03-05 Yao Qi <yao@codesourcery.com>
9198
9199 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9200 (subdir_do): New make target. Copied from gdb/Makefile.
9201 (maintainer-clean, realclean, distclean, clean): Call corresponding
9202 make targets in common/Makefile.
9203
7a762829
YQ
92042011-03-04 Yao Qi <yao@codesourcery.com>
9205
9206 * Makefile.in: Remove GNU make feature --directory.
9207
348af9f7
MS
92082011-03-04 Michael Snyder <msnyder@vmware.com>
9209
9210 * server.c (queue_stop_reply): Call xmalloc not malloc.
9211
92122011-03-02 Michael Snyder <msnyder@vmware.com>
9213
9214 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9215
9f72fee2
MS
92162011-02-28 Michael Snyder <msnyder@vmware.com>
9217
588eebee
MS
9218 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9219 (cmd_qtframe): Ditto.
9220 (cmd_qtbuffer): Ditto.
9221 (cmd_bigqtbuffer): Ditto.
9222
9f72fee2
MS
9223 * utils.c (decimal2str): Initialize 'width' to nine, then
9224 don't mess with it.
9225
8040bd49
UW
92262011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9227
9228 * hostio.c (require_data): Free *data, not data.
9229
7e52cbd0
JK
92302011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9231
9232 * hostio.c (require_data): Use free, not xfree.
9233
9130f83e
MS
92342011-02-27 Michael Snyder <msnyder@vmware.com>
9235
4b812f4e
MS
9236 * server.c (handle_query): Discard unused value.
9237
9130f83e
MS
9238 * hostio.c (require_data): Free malloc memory before returning
9239 error.
9240
69d37113
MS
92412011-02-26 Michael Snyder <msnyder@vmware.com>
9242
9243 * linux-low.c (list_threads): Call closedir for dirent.
9244
35f5825a
MS
92452011-02-27 Michael Snyder <msnyder@vmware.com>
9246
2a589cef
MS
9247 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9248 a case statement falls through.
9249
0adea5f7
MS
9250 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9251
35f5825a
MS
9252 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9253 in comparison.
9254
238f1c74
MS
92552011-02-26 Michael Snyder <msnyder@vmware.com>
9256
9257 * utils.c (decimal2str): Eliminate dead code and dead param.
9258 (pulongest): Drop dead param from call to decimal2str.
9259 (plongest): Ditto.
9260
633ff500
JB
92612011-02-24 Joel Brobecker <brobecker@adacore.com>
9262
9263 Revert the following patch (not approved yet):
9264 2011-02-21 Hui Zhu <teawater@gmail.com>
9265 * tracepoint.c (tp_printf): New function.
9266 (eval_agent_expr): Handle gdb_agent_op_printf.
9267
f9c6ff72
HZ
92682011-02-21 Hui Zhu <teawater@gmail.com>
9269
9270 * tracepoint.c (tp_printf): New function.
9271 (eval_agent_expr): Handle gdb_agent_op_printf.
9272
94d5e490
TT
92732011-02-18 Tom Tromey <tromey@redhat.com>
9274
9275 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9276 (tracepoint.o): Likewise.
9277 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9278 (gdb_agent_op_names): Likewise.
9279
c7f96d2b
TT
92802011-02-18 Tom Tromey <tromey@redhat.com>
9281
9282 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9283 gdb_agent_op_rot>: New constants.
9284 (gdb_agent_op_names): Add pick and roll.
9285 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9286 cases.
9287
0feedb2c
JK
92882011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9289
9290 * aclocal.m4: Regenerated with aclocal-1.11.1.
9291
b3b9301e
PA
92922011-02-14 Pedro Alves <pedro@codesourcery.com>
9293
9294 * server.c (handle_qxfer_traceframe_info): New.
9295 (qxfer_packets): Register "traceframe-info".
9296 (handle_query): Report support for qXfer:traceframe-info:read+.
9297 * tracepoint.c (match_blocktype): New.
9298 (traceframe_find_block_type): Rename to ...
9299 (traceframe_walk_blocks): ... this. Add callback filter argument,
9300 and use it.
9301 (traceframe_find_block_type): New, reimplemented on top of
9302 traceframe_walk_blocks.
9303 (build_traceframe_info_xml): New.
9304 (traceframe_read_info): New.
9305 * server.h (traceframe_read_info): Declare.
9306
4f3e6fb7
YQ
93072011-02-11 Yao Qi <yao@codesourcery.com>
9308
9309 * configure.ac: Call AC_PROG_RANLIB.
9310 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9311 * configure: Regenerate.
9312
764880b7
PA
93132011-02-07 Pedro Alves <pedro@codesourcery.com>
9314
9315 * server.c (gdb_read_memory): Change return semantics to allow
9316 partial transfers.
9317 (handle_search_memory_1): Adjust.
9318 (process_serial_event) <'m' packet>: Handle partial transfers.
9319 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9320
1c79eb8a
PA
93212011-01-28 Pedro Alves <pedro@codesourcery.com>
9322
9323 * regcache.c (init_register_cache): Initialize
9324 regcache->register_status.
9325 (free_register_cache): Release regcache->register_status.
9326 (regcache_cpy): Copy register_status.
9327 (registers_to_string): Print 'x's for unavailable registers.
9328 (supply_register): Mark the register's status valid or
9329 unavailable, depending on whether a buffer was passed in or not.
9330 (supply_register_zeroed): New.
9331 (supply_regblock): Mark the registers' status valid or
9332 unavailable, depending on whether a buffer was passed in or not.
9333 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9334 (struct regcache): New `register_status' field.
9335 (supply_register_zeroed): Declare.
9336 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9337 supply_register_zeroed, rather than passing a NULL buffer to
9338 supply_register.
9339 * tracepoint.c (fetch_traceframe_registers): Update comment.
9340
85724a0e
PA
93412011-01-28 Pedro Alves <pedro@codesourcery.com>
9342
9343 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9344 buffer explicit.
9345
d08aafef
PA
93462011-01-25 Pedro Alves <pedro@codesourcery.com>
9347
9348 * server.h (decode_xfer_write): Change prototype.
9349 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9350 and don't extract the annex here.
9351 * server.c (decode_xfer_read): Remove `annex' parameter,
9352 and don't extract the annex here.
9353 (decode_xfer): New.
9354 (struct qxfer): New.
9355 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9356 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9357 (handle_qxfer_statictrace): New functions, abstracted out from
9358 handle_query, and made to use the struct qxfer interface.
9359 (handle_threads_qxfer_proper): Rename to ...
9360 (handle_qxfer_threads_proper): ... this.
9361 (handle_threads_qxfer): Rename to ...
9362 (handle_qxfer_threads): ... this. Adjust.
9363 (qxfer_packets): New array.
9364 (handle_qxfer): New function.
9365 (handle_query): Use handle_qxfer.
9366
493e2a69
MS
93672011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9368
9369 * gdbreplay.c: Shorten lines of >= 80 columns.
9370 * linux-low.c: Ditto.
9371 * linux-ppc-low.c: Ditto.
9372 * linux-s390-low.c: Ditto.
9373 * linux-sparc-low.c: Ditto.
9374 * linux-x86-low.c: Ditto.
9375 * linux-xtensa-low.c: Ditto.
9376 * mem-break.c: Ditto.
9377 * nto-low.c: Ditto.
9378 * regcache.h: Ditto.
9379 * remote-utils.c: Ditto.
9380 * server.c: Ditto.
9381 * server.h: Ditto.
9382 * thread-db.c: Ditto.
9383 * tracepoint.c: Ditto.
9384 * utils.c: Ditto.
9385 * win32-low.h: Ditto.
9386
44944448
JB
93872011-01-05 Joel Brobecker <brobecker@adacore.com>
9388
9389 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9390 update.
9391
71ce852c
JB
93922011-01-01 Joel Brobecker <brobecker@adacore.com>
9393
9394 * server.c (gdbserver_version): Update copyright year in version
9395 output.
9396 * gdbreplay.c (gdbreplay_version): Ditto.
9397
eb826dc6
MF
93982010-12-29 Jie Zhang <jie.zhang@analog.com>
9399
9400 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9401 * linux-bfin-low.c: New file.
9402 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9403 PT_DATA_ADDR for BFIN targets.
9404 * Makefile.in (SFILES): Add linux-bfin-low.c.
9405 (clean): Remove reg-bfin.c.
9406 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9407 * README: Mention supported Blackfin targets.
9408
39ab222a
MF
94092010-12-23 Mike Frysinger <vapier@gentoo.org>
9410
9411 * .gitignore: New file.
9412
a1f2ce7d
MF
94132010-11-16 Mike Frysinger <vapier@gentoo.org>
9414
9415 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9416
f474844c
JZ
94172010-10-22 Jie Zhang <jie@codesourcery.com>
9418
9419 * Makefile.in: Add FLAGS_TO_PASS variable.
9420 (install): Remove dependency of install-only and recursively
9421 invoke make for install-only.
9422
f1048712
DE
94232010-10-04 Doug Evans <dje@google.com>
9424
9425 * Makefile.in (uninstall): Use $(DESTDIR).
9426
b53a1623
PA
94272010-09-24 Pedro Alves <pedro@codesourcery.com>
9428
e6ee044d
PA
9429 PR gdb/11842
9430
b53a1623
PA
9431 * linux-x86-low.c (compat_siginfo_from_siginfo)
9432 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9433 si_code is < 0. Check for si_code == SI_TIMER before checking for
9434 si_code < 0.
9435
fa1bd1e4
JB
94362010-09-13 Joel Brobecker <brobecker@adacore.com>
9437
9438 * lynx-i386-low.c: New file.
9439 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9440
47fac8f8
JB
94412010-09-13 Joel Brobecker <brobecker@adacore.com>
9442
9443 * lynx-low.c (ptrace_request_to_str): Remove handling for
9444 request values that have been removed in LynxOS 5.x.
9445
1adfc54d
JB
94462010-09-13 Joel Brobecker <brobecker@adacore.com>
9447
9448 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9449 <ptrace.h>
9450
c2a66c29
NS
94512010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9452
9453 * configure.ac: Add --enable-inprocess-agent option.
9454 * configure: Rebuilt.
9455
32fcada3
YQ
94562010-09-06 Yao Qi <yao@codesourcery.com>
9457
9458 * linux-low.c (linux_kill): Remove unused variable.
9459 (linux_stabilize_threads): Likewise.
9460 * server.c (start_inferior): Likewise.
9461 (queue_stop_reply_callback): Likewise.
9462 * tracepoint.c (do_action_at_tracepoint): Likewise.
9463
0cccb683
YQ
94642010-09-06 Yao Qi <yao@codesourcery.com>
9465
9466 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9467 on return.
9468
423ec54c
JK
94692010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9470
9471 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9472
12ac6819
PA
94732010-09-06 Pedro Alves <pedro@codesourcery.com>
9474
9475 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9476 "$(IPA_DEPFILES)".
9477
8ed54b31
JB
94782010-09-01 Joel Brobecker <brobecker@adacore.com>
9479
9480 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9481 gdbserver/lynx-ppc-low.c: New files.
9482 * Makefile.in (lynx_low_h): New variable.
9483 (lynx-low.o, lynx-ppc-low.o): New rules.
9484 * configure.ac: On LynxOS, link with -lnetinet.
9485 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9486 * configure: regenerate.
9487
bb0116a4
JB
94882010-09-01 Joel Brobecker <brobecker@adacore.com>
9489
9490 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9491 * configure.ac: Add check for vasprintf and vsnprintf.
9492 * configure, config.in: Regenerate.
9493 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9494
a778ab81 94952010-09-01 Joel Brobecker <brobecker@adacore.com>
9496
9497 * gdbreplay.c: Move include of alloca.h up, next to include of
9498 malloc.h.
9499 * server.h: Add include of malloc.h.
9500 * mem-break.c: Remove include of malloc.h.
9501 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9502
8b034a19 95032010-09-01 Joel Brobecker <brobecker@adacore.com>
9504
9505 * Makefile.in (memmem.o): Build with -Wno-error.
9506
95072010-09-01 Joel Brobecker <brobecker@adacore.com>
9508
9509 * utils.c (xsnprintf): Make non-static.
9510 * server.h: Add xsnprintf declaration.
9511 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9512 replace calls to snprintf by calls to xsnprintf throughout.
9513
95142010-09-01 Joel Brobecker <brobecker@adacore.com>
9515
9516 * configure.ac: Add configure check for alloca.
9517 * configure, config.in: Regenerate.
9518 * server.h: Include alloca.h if it exists.
9519 * gdbreplay.c: Include alloca.h if it exists.
9520
1a981360
PA
95212010-08-28 Pedro Alves <pedro@codesourcery.com>
9522
9523 * linux-low.c (__SIGRTMIN): Define if not already defined.
9524 (linux_create_inferior): Check for __ANDROID__ rather than
9525 __SIGRTMIN.
9526 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9527 are already deferred.
9528 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9529 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9530 stopped and already has a pending signal to report.
9531 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9532 a pending signal to report or is moving out of a jump pad.
9533 (linux_init_signals): Check for __ANDROID__ rather than
9534 __SIGRTMIN.
9535
b4d51a55
PA
95362010-08-28 Pedro Alves <pedro@codesourcery.com>
9537
9538 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9539 debug_threads check. Avoid a linear search when not doing debug
9540 output.
9541
ec48365d
PA
95422010-08-27 Pedro Alves <pedro@codesourcery.com>
9543
9544 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9545 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9546 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9547 (process_event): Change local fd's type to gdb_fildes_t.
9548 (create_file_handler): Adjust prototype.
9549 (delete_file_handler): Adjust prototype.
9550 (handle_file_event): Adjust prototype. Use pfildes.
9551 (create_file_event): Adjsut prototype.
9552 * remote-utils.c (remote_desc, listen_desc): Change type to
9553 gdb_fildes_t.
9554 * server.h: New gdb_fildes_t typedef.
9555 [USE_WIN32API]: Include winsock2.h.
9556 (delete_file_handler, add_file_handler): Adjust prototypes.
9557 (pfildes): Declare.
9558 * utils.c (pfildes): New.
9559
854d88f0
PA
95602010-08-27 Pedro Alves <pedro@codesourcery.com>
9561
9562 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9563 * configure: Regenerate.
9564
0146f85b
PA
95652010-08-27 Pedro Alves <pedro@codesourcery.com>
9566
9567 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9568 (linux_done_accessing_memory): ... this.
9569 (linux_target_ops): Adjust.
9570 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9571 * nto-low.c (nto_target_ops): Adjust comment.
9572 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9573 * spu-low.c (spu_target_ops): Adjust comment.
9574 * target.h (target_ops): Rename unprepare_to_access_memory field
9575 to done_accessing_memory.
9576 (unprepare_to_access_memory): Rename to ...
9577 (done_accessing_memory): ... this.
9578
90d74c30
PA
95792010-08-26 Pedro Alves <pedro@codesourcery.com>
9580
9581 * linux-low.c (linux_prepare_to_access_memory): New.
9582 (linux_unprepare_to_access_memory): New.
9583 (linux_target_ops): Install them.
9584 * server.c (read_memory): Rename to ...
9585 (gdb_read_memory): ... this. Use
9586 prepare_to_access_memory/prepare_to_access_memory.
9587 (write_memory): Rename to ...
9588 (gdb_write_memory): ... this. Use
9589 prepare_to_access_memory/prepare_to_access_memory.
9590 (handle_search_memory_1): Adjust.
9591 (process_serial_event): Adjust.
9592 * target.h (struct target_ops): New fields
9593 prepare_to_access_memory and unprepare_to_access_memory.
9594 (prepare_to_access_memory, unprepare_to_access_memory): New.
9595 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9596 prepare_to_access_memory/prepare_to_access_memory.
9597 * nto-low.c (nto_target_ops): Adjust.
9598 * spu-low.c (spu_target_ops): Adjust.
9599 * win32-low.c (win32_target_ops): Adjust.
9600
fd467969
PA
96012010-08-26 Pedro Alves <pedro@codesourcery.com>
9602
9603 * Makefile.in (WARN_CFLAGS): Get it from configure.
9604 (WERROR_CFLAGS): New.
9605 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9606 * configure.ac: Introduce --enable-werror, which adds -Werror to
9607 the compiler command line. Enabled by default. Disable with
9608 --disable-werror. Add -Wdeclaration-after-statement
9609 Wpointer-arith and -Wformat-nonliteral to warning flags.
9610 * configure: Regenerate.
9611
331e2f5f
PA
96122010-08-26 Pedro Alves <pedro@codesourcery.com>
9613
9614 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9615
e581f2b4
PA
96162010-08-26 Pedro Alves <pedro@codesourcery.com>
9617
9618 * gdbreplay.c (remote_error): New.
9619 (gdbchar): New.
9620 (expect): Use gdbchar. Check for error reading from GDB.
9621 Clarify sync error output.
9622 (play): Check for errors writing to GDB.
9623 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9624 * remote-utils.c (getpkt): Check for errors writing to the remote
9625 descriptor.
9626
3c11dd79
PA
96272010-08-25 Pedro Alves <pedro@codesourcery.com>
9628
9629 * linux-low.c (linux_wait_1): Move non-debugging code out of
9630 `debug_threads' control.
9631
d20a8ad9
PA
96322010-08-25 Pedro Alves <pedro@codesourcery.com>
9633
9634 * linux-low.c (linux_wait_1): Don't set last_status here.
9635 * server.c (push_event, queue_stop_reply_callback): Assert we're
9636 not pushing a TARGET_WAITKIND_IGNORE event.
9637 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9638 (myresume, handle_target_event): Set the thread's last_resume_kind
9639 and last_status from the target returned status.
9640
964e4306
PA
96412010-08-25 Pedro Alves <pedro@codesourcery.com>
9642
9643 PR threads/10729
9644
9645 * linux-x86-low.c (update_debug_registers_callback): New.
9646 (i386_dr_low_set_addr): Use it.
9647 (i386_dr_low_get_addr): New.
9648 (i386_dr_low_set_control): Use update_debug_registers_callback.
9649 (i386_dr_low_get_control): New.
9650 (i386_dr_low_get_status): Adjust.
9651 * linux-low.c (linux_stop_lwp): New.
9652 * linux-low.h (linux_stop_lwp): Declare.
9653
9654 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9655 argument instead of a i386_debug_reg_state.
9656 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9657 a i386_debug_reg_state.
9658 (i386_insert_aligned_watchpoint): Adjust.
9659 (i386_remove_aligned_watchpoint): Adjust.
9660 (i386_low_stopped_data_address): Read the debug registers from the
9661 inferior instead of from the mirrors.
9662 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9663 (i386_dr_low_get_addr): Declare.
9664 (i386_dr_low_get_control): Declare.
9665 (i386_dr_low_get_status): Change prototype.
9666
9667 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9668 (i386_dr_low_get_addr): New.
9669 (i386_dr_low_get_control): New.
9670 (i386_dr_low_get_status): Adjust prototype. Return
9671 dr_status_mirror.
9672 (i386_initial_stuff): Clear dr_status_mirror and
9673 dr_control_mirror.
9674 (i386_get_thread_context): Adjust.
9675 (i386_set_thread_context): Adjust.
9676 (i386_thread_added): Adjust.
9677
5f21a75b
PA
96782010-08-24 Pedro Alves <pedro@codesourcery.com>
9679
9680 * linux-low.h (linux_thread_area): Delete declaration.
9681
3e4c1235
TS
96822010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9683
9684 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9685 after its termination.
9686
1971b033
PA
96872010-08-09 Pedro Alves <pedro@codesourcery.com>
9688
9689 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9690 (gdb_wants_all_stopped): Delete.
9691 (linux_wait_1): Don't call them.
9692 * server.c (handle_v_cont): Tag all threads as want-stopped.
9693 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9694 stopped as "client-wants-stopped".
9695
310444ac
PA
96962010-07-31 Pedro Alves <pedro@codesourcery.com>
9697
9698 * Makefile.in (signals_h): New.
9699 (server_h): Depend on it.
9700 (server.o): Don't depend on $(signals_def).
9701 (signals.o): Depend on $(signals_def).
9702
a19cae16
JK
97032010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9704
9705 * Makefile.in (signals_def): New.
9706 (server_h): Append include/gdb/signals.h and signals_def.
9707 (server.o): Append signals_def.
9708
30d50328
JK
97092010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9710
9711 * server.c (handle_target_event): Use target_signal_to_host for
9712 resume_info.sig initialization.
9713 * target.h (struct thread_resume) <sig>: New comment.
9714
5c3216e2
OS
97152010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9716
c6f46ca0
OS
9717 * server.c (handle_query): strcpy() the returned string from paddress()
9718 instead of sprintf().
5c3216e2
OS
9719 * utils.c (paddress): Return phex_nz().
9720
6bd31874
JB
97212010-07-07 Joel Brobecker <brobecker@adacore.com>
9722
9723 * server.c (handle_v_cont): Call mourn_inferior if process
9724 just exited.
9725 (myresume): Likewise.
9726
0fb4aa4b
PA
97272010-07-01 Pedro Alves <pedro@codesourcery.com>
9728
9729 Static tracepoints, and integration with UST.
9730
9731 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9732 * mem-break.c (uninsert_all_breakpoints)
9733 (reinsert_all_breakpoints): New.
9734 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9735 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9736 (gdb_agent_ust_loaded, helper_thread_id)
9737 (gdb_agent_helper_thread_id): New macros.
9738 (struct ipa_sym_addresses): Add addr_ust_loaded,
9739 addr_helper_thread_id, addr_cmd_buf.
9740 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9741 (in_process_agent_loaded_ust): New.
9742 (write_e_ust_not_loaded): New.
9743 (maybe_write_ipa_ust_not_loaded): New.
9744 (struct collect_static_trace_data_action): New.
9745 (enum tracepoint_type) <static_tracepoint>: New.
9746 (struct tracepoint) <handle>: Mention static tracepoints.
9747 (struct static_tracepoint_ctx): New.
9748 (CMD_BUF_SIZE): New.
9749 (add_tracepoint_action): Handle static tracepoint actions.
9750 (unprobe_marker_at): New.
9751 (clear_installed_tracepoints): Handle static tracepoints.
9752 (cmd_qtdp): Handle static tracepoints.
9753 (probe_marker_at): New.
9754 (cmd_qtstart): Handle static tracepoints.
9755 (response_tracepoint): Handle static tracepoints.
9756 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9757 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9758 (get_context_regcache): Handle static tracepoints.
9759 (do_action_at_tracepoint): Handle static tracepoint actions.
9760 (traceframe_find_block_type): Handle static trace data blocks.
9761 (traceframe_read_sdata): New.
9762 (download_tracepoints): Download static tracepoint actions.
9763 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9764 (GDB_PROBE_NAME): New.
9765 (ust_ops): New.
9766 (GET_UST_SYM): New.
9767 (USTF): New.
9768 (dlsym_ust): New.
9769 (ust_marker_to_static_tracepoint): New.
9770 (gdb_probe): New.
9771 (collect_ust_data_at_tracepoint): New.
9772 (gdb_ust_probe): New.
9773 (UNIX_PATH_MAX, SOCK_DIR): New.
9774 (gdb_ust_connect_sync_socket): New.
9775 (resume_thread, stop_thread): New.
9776 (run_inferior_command): New.
9777 (init_named_socket): New.
9778 (gdb_ust_socket_init): New.
9779 (cstr_to_hexstr): New.
9780 (next_st): New.
9781 (first_marker, next_marker): New.
9782 (response_ust_marker): New.
9783 (cmd_qtfstm, cmd_qtsstm): New.
9784 (unprobe_marker_at, probe_marker_at): New.
9785 (cmd_qtstmat, gdb_ust_thread): New.
9786 (gdb_ust_init): New.
9787 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9788 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9789 (ST_REGENTRY): New.
9790 (x86_64_st_collect_regmap): New.
9791 (X86_64_NUM_ST_COLLECT_GREGS): New.
9792 (AMD64_RIP_REGNUM): New.
9793 (supply_static_tracepoint_registers): New.
9794 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9795 (ST_REGENTRY): New.
9796 (i386_st_collect_regmap): New.
9797 (i386_NUM_ST_COLLECT_GREGS): New.
9798 (supply_static_tracepoint_registers): New.
9799 * server.c (handle_query): Handle qXfer:statictrace:read.
9800 <qSupported>: Report support for StaticTracepoints, and
9801 qXfer:statictrace:read features.
9802 * server.h (traceframe_read_sdata)
9803 (supply_static_tracepoint_registers): Declare.
9804 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9805 (unpack_varlen_hex): Include in IPA build.
9806 * Makefile.in (ustlibs, ustinc): New.
9807 (IPA_OBJS): Add remote-utils-ipa.o.
9808 ($(IPA_LIB)): Link -ldl and -lpthread.
9809 (UST_CFLAGS): New.
9810 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9811 * config.in, configure: Regenerate.
9812
9e4344e5
PA
98132010-06-20 Ian Lance Taylor <iant@google.com>
9814 Pedro Alves <pedro@codesourcery.com>
9815
9816 * linux-x86-low.c (always_true): Delete.
9817 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9818 trying to fool the compiler with always_true.
9819
c6beb2cb
PA
98202010-06-20 Pedro Alves <pedro@codesourcery.com>
9821
9822 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9823 conditions in gdbserver.
9824
d2ed6730
UW
98252010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9826
9827 * spu-low.c (spu_read_memory): Wrap around local store limit.
9828 (spu_write_memory): Likewise.
9829
4e29fb54
PA
98302010-06-15 Pedro Alves <pedro@codesourcery.com>
9831
9832 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9833 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9834 LONGEST uses.
9835 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9836 uses.
9837 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9838 uses with LONGEST uses.
9839
6a271cae
PA
98402010-06-14 Stan Shebs <stan@codesourcery.com>
9841 Pedro Alves <pedro@codesourcery.com>
9842
9843 Bytecode compiler.
9844
9845 * linux-x86-low.c: Include limits.h.
9846 (add_insns): New.
9847 (always_true): New.
9848 (EMIT_ASM): New.
9849 (EMIT_ASM32): New.
9850 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9851 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9852 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9853 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9854 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9855 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9856 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9857 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9858 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9859 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9860 (amd64_emit_void_call_2): New.
9861 (amd64_emit_ops): New.
9862 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9863 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9864 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9865 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9866 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9867 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9868 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9869 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9870 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9871 (i386_emit_stack_adjust, i386_emit_int_call_1)
9872 (i386_emit_void_call_2): New.
9873 (i386_emit_ops): New.
9874 (x86_emit_ops): New.
9875 (the_low_target): Install x86_emit_ops.
9876 * server.h (struct emit_ops): New.
9877 (get_raw_reg_func_addr): Declare.
9878 (current_insn_ptr, emit_error): Declare.
9879 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9880 (set_trace_state_variable_value): New defines.
9881 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9882 addr_get_trace_state_variable_value and
9883 addr_set_trace_state_variable_value.
9884 (symbol_list): New fields for get_raw_reg,
9885 get_trace_state_variable_value and set_trace_state_variable_value.
9886 (condfn): New typedef.
9887 (struct tracepoint): New field `compiled_cond'.
9888 (do_action_at_tracepoint): Clear compiled_cond.
9889 (get_trace_state_variable_value, set_trace_state_variable_value):
9890 Export in the IPA.
9891 (condition_true_at_tracepoint): If there's a compiled condition,
9892 run that.
9893 (current_insn_ptr, emit_error): New globals.
9894 (struct bytecode_address): New.
9895 (get_raw_reg_func_addr): New.
9896 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9897 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9898 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9899 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9900 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9901 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9902 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9903 (compile_tracepoint_condition, compile_bytecodes): New.
9904 * target.h (emit_ops): Forward declare.
9905 (struct target_ops): New field emit_ops.
9906 (target_emit_ops): New.
9907 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9908 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9909 * linux-low.c (linux_emit_ops): New.
9910 (linux_target_ops): Install it.
9911 * linux-low.h (struct linux_target_ops): New field emit_ops.
9912
92b72907
UW
99132010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9914
9915 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9916 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9917
fa593d66
PA
99182010-06-01 Pedro Alves <pedro@codesourcery.com>
9919 Stan Shebs <stan@codesourcery.com>
9920
9921 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9922 (all): Depend on $(extra_libraries).
9923 (install-only): Install the IPA.
9924 (IPA_OBJS, IPA_LIB): New.
9925 (clean): Remove the IPA lib.
9926 (IPAGENT_CFLAGS): New.
9927 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9928 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9929 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9930 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9931 * configure.ac: Check for atomic builtins support in the compiler.
9932 (IPA_DEPFILES, extra_libraries): Define.
9933 * configure.srv (ipa_obj): Add description.
9934 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9935 (i[34567]86-*-linux*): Set ipa_obj.
9936 (x86_64-*-linux*): Set ipa_obj.
9937 * linux-low.c (stabilizing_threads): New.
9938 (supports_fast_tracepoints): New.
9939 (linux_detach): Stabilize threads before detaching.
9940 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9941 the lwp is either not stabilizing, or is moving out of a jump pad.
9942 (linux_fast_tracepoint_collecting): New.
9943 (maybe_move_out_of_jump_pad): New.
9944 (enqueue_one_deferred_signal): New.
9945 (dequeue_one_deferred_signal): New.
9946 (linux_wait_for_event_1): If moving out of a jump pad, defer
9947 pending signals to later.
9948 (linux_stabilize_threads): New.
9949 (linux_wait_1): Check if threads need moving out of jump pads, and
9950 do it if so.
9951 (stuck_in_jump_pad_callback): New.
9952 (move_out_of_jump_pad_callback): New.
9953 (lwp_running): New.
9954 (linux_resume_one_lwp): Handle moving out of jump pads.
9955 (linux_set_resume_request): Dequeue deferred signals.
9956 (need_step_over_p): Also step over fast tracepoint jumps.
9957 (start_step_over): Also uninsert fast tracepoint jumps.
9958 (finish_step_over): Also reinsert fast tracepoint jumps.
9959 (linux_install_fast_tracepoint_jump): New.
9960 (linux_target_ops): Install linux_stabilize_threads and
9961 linux_install_fast_tracepoint_jump_pad.
9962 * linux-low.h (linux_target_ops) <get_thread_area,
9963 install_fast_tracepoint_jump_pad>: New fields.
9964 (struct lwp_info) <collecting_fast_tracepoint,
9965 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9966 (linux_get_thread_area): Declare.
9967 * linux-x86-low.c (jump_insn): New.
9968 (x86_get_thread_area): New.
9969 (append_insns): New.
9970 (push_opcode): New.
9971 (amd64_install_fast_tracepoint_jump_pad): New.
9972 (i386_install_fast_tracepoint_jump_pad): New.
9973 (x86_install_fast_tracepoint_jump_pad): New.
9974 (the_low_target): Install x86_get_thread_area and
9975 x86_install_fast_tracepoint_jump_pad.
9976 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9977 (struct fast_tracepoint_jump): New.
9978 (fast_tracepoint_jump_insn): New.
9979 (fast_tracepoint_jump_shadow): New.
9980 (find_fast_tracepoint_jump_at): New.
9981 (fast_tracepoint_jump_here): New.
9982 (delete_fast_tracepoint_jump): New.
9983 (set_fast_tracepoint_jump): New.
9984 (uninsert_fast_tracepoint_jumps_at): New.
9985 (reinsert_fast_tracepoint_jumps_at): New.
9986 (set_breakpoint_at): Use write_inferior_memory.
9987 (uninsert_raw_breakpoint): Use write_inferior_memory.
9988 (check_mem_read): Mask out fast tracepoint jumps.
9989 (check_mem_write): Mask out fast tracepoint jumps.
9990 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9991 (set_fast_tracepoint_jump): Declare.
9992 (delete_fast_tracepoint_jump)
9993 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9994 (reinsert_fast_tracepoint_jumps_at): Declare.
9995 * regcache.c: Don't compile many functions when building the
9996 in-process agent library.
9997 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9998 the register buffer in the heap.
9999 (free_register_cache): If the register buffer isn't owned by the
10000 regcache, don't free it.
10001 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10002 pre-existing register caches.
10003 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10004 type.
10005 (convert_ascii_to_int): : Constify `from' parameter type.
10006 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10007 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10008 the needed buffer in-place.
10009 (relocate_instruction): New.
10010 * server.c (handle_query) <qSymbols>: If the target supports
10011 tracepoints, give it a chance of looking up symbols. Report
10012 support for fast tracepoints.
10013 (handle_status): Stabilize threads.
10014 (process_serial_event): Adjust.
10015 * server.h (struct fast_tracepoint_jump): Forward declare.
10016 (struct process_info) <fast_tracepoint_jumps>: New field.
10017 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10018 (decode_X_packet, decode_M_packet): Adjust.
10019 (relocate_instruction): Declare.
10020 (in_process_agent_loaded): Declare.
10021 (tracepoint_look_up_symbols): Declare.
10022 (struct fast_tpoint_collect_status): Declare.
10023 (fast_tracepoint_collecting): Declare.
10024 (force_unlock_trace_buffer): Declare.
10025 (handle_tracepoint_bkpts): Declare.
10026 (initialize_low_tracepoint)
10027 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10028 * target.h (struct target_ops) <stabilize_threads,
10029 install_fast_tracepoint_jump_pad>: New fields.
10030 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10031 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10032 [HAVE_STDINT_H]: Include stdint.h.
10033 (trace_debug_1): Rename to ...
10034 (trace_vdebug): ... this.
10035 (trace_debug): Rename to ...
10036 (trace_debug_1): ... this. Add `level' parameter.
10037 (trace_debug): New.
10038 (ATTR_USED, ATTR_NOINLINE): New.
10039 (IP_AGENT_EXPORT): New.
10040 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10041 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10042 (about_to_request_buffer_space, trace_buffer_is_full)
10043 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10044 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10045 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10046 (traceframe_write_count, traceframes_created)
10047 (trace_state_variables)
10048 New renaming defines.
10049 (struct ipa_sym_addresses): New.
10050 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10051 (symbol_list): New.
10052 (ipa_sym_addrs): New.
10053 (all_tracepoint_symbols_looked_up): New.
10054 (in_process_agent_loaded): New.
10055 (write_e_ipa_not_loaded): New.
10056 (maybe_write_ipa_not_loaded): New.
10057 (tracepoint_look_up_symbols): New.
10058 (debug_threads) [IN_PROCESS_AGENT]: New.
10059 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10060 (UNKNOWN_SIDE_EFFECTS): New.
10061 (stop_tracing): New.
10062 (flush_trace_buffer): New.
10063 (stop_tracing_bkpt): New.
10064 (flush_trace_buffer_bkpt): New.
10065 (read_inferior_integer): New.
10066 (read_inferior_uinteger): New.
10067 (read_inferior_data_pointer): New.
10068 (write_inferior_data_pointer): New.
10069 (write_inferior_integer): New.
10070 (write_inferior_uinteger): New.
10071 (struct collect_static_trace_data_action): Delete.
10072 (enum tracepoint_type): New.
10073 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10074 <actions_str, step_actions, step_actions_str>: Only include in
10075 GDBserver.
fa593d66
PA
10076 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10077 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10078 (tracepoints): Use IP_AGENT_EXPORT.
10079 (last_tracepoint): Don't include in the IPA.
10080 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10081 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10082 (alloced_trace_state_variables): New.
10083 (trace_state_variables): Use IP_AGENT_EXPORT.
10084 (traceframe_t): Delete unused variable.
10085 (circular_trace_buffer): Don't include in the IPA.
10086 (trace_buffer_start): Delete.
10087 (struct trace_buffer_control): New.
10088 (trace_buffer_free): Delete.
10089 (struct ipa_trace_buffer_control): New.
10090 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10091 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10092 New.
10093 (trace_buffer_ctrl): New.
10094 (TRACE_BUFFER_CTRL_CURR): New.
10095 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10096 Reimplement as macros.
10097 (trace_buffer_wrap): Delete.
10098 (traceframe_write_count, traceframe_read_count)
10099 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10100 (struct tracepoint_hit_ctx) <type>: New field.
10101 (struct fast_tracepoint_ctx): New.
10102 (memory_barrier): New.
10103 (cmpxchg): New.
10104 (record_tracepoint_error): Update atomically in the IPA.
10105 (clear_inferior_trace_buffer): New.
10106 (about_to_request_buffer_space): New.
10107 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10108 updating the same buffer.
10109 (add_tracepoint): Default the tracepoint's type to trap
10110 tracepoint, and orig_size to -1.
10111 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10112 internal variables.
10113 (create_trace_state_variable): New parameter `gdb'. Handle it.
10114 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10115 (cmd_qtdp): Handle fast tracepoints.
10116 (cmd_qtdv): Adjust.
10117 (max_jump_pad_size): New.
10118 (gdb_jump_pad_head): New.
10119 (get_jump_space_head): New.
10120 (claim_jump_space): New.
10121 (sort_tracepoints): New.
10122 (MAX_JUMP_SIZE): New.
10123 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10124 IPA.
10125 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10126 support. Upload fast traceframes, and delete internal IPA
10127 breakpoints.
10128 (stop_tracing_handler): New.
10129 (flush_trace_buffer_handler): New.
10130 (cmd_qtstop): Upload fast tracepoints.
10131 (response_tracepoint): Handle fast tracepoints.
10132 (tracepoint_finished_step): Upload fast traceframes. Set the
10133 tracepoint hit context's tracepoint type.
10134 (handle_tracepoint_bkpts): New.
10135 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10136 type. Add comment about fast tracepoints.
10137 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10138 non-existing action_str field.
10139 (get_context_regcache): Handle fast tracepoints.
10140 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10141 to the regcache.
10142 (fast_tracepoint_from_jump_pad_address): New.
10143 (fast_tracepoint_from_ipa_tpoint_address): New.
10144 (collecting_t): New.
10145 (force_unlock_trace_buffer): New.
10146 (fast_tracepoint_collecting): New.
10147 (collecting): New.
10148 (gdb_collect): New.
10149 (write_inferior_data_ptr): New.
10150 (target_tp_heap): New.
10151 (target_malloc): New.
10152 (download_agent_expr): New.
10153 (UALIGN): New.
10154 (download_tracepoints): New.
10155 (download_trace_state_variables): New.
10156 (upload_fast_traceframes): New.
10157 (IPA_FIRST_TRACEFRAME): New.
10158 (IPA_NEXT_TRACEFRAME_1): New.
10159 (IPA_NEXT_TRACEFRAME): New.
10160 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10161 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10162 (gdb_jump_pad_buffer_end): New.
10163 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10164 (initialize_tracepoint): Adjust.
10165 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10166 buffer. Initialize the low module.
10167 * utils.c (PREFIX, TOOLNAME): New.
10168 (malloc_failure): Use PREFIX.
10169 (error): In the IPA, an error causes an exit.
10170 (fatal, warning): Use PREFIX.
10171 (internal_error): Use TOOLNAME.
10172 (NUMCELLS): Increase to 10.
10173 * configure, config.in: Regenerate.
10174
d149dd1d
PA
101752010-06-01 Pedro Alves <pedro@codesourcery.com>
10176
10177 * server.c (handle_query) <qSupported>: Do two passes over the
10178 qSupported string to avoid nesting strtok.
10179
f6528abd
JK
101802010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10181
10182 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10183 (CDEPS): New.
10184 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10185 -Wl,--dynamic-list.
10186 * configure: Regenerate.
10187 * proc-service.list: New.
10188
ca2a87a0
JK
101892010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10190
10191 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10192 New comment.
10193
363a6e9f
OS
101942010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10195
10196 * gdbreplay.c (remote_open): Check error return from socket() call by
10197 its equality to -1 not by it being negative.
10198 * remote-utils.c (remote_open): Likewise.
10199
d23b6cb1
PA
102002010-05-23 Pedro Alves <pedro@codesourcery.com>
10201
10202 * config.h: Regenerate.
10203
28d3cf85
MK
102042010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10205
10206 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10207 doesn't provide PTRACE_GET_THREAD_AREA.
10208
fea36a59
MK
102092010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10210
10211 * linux-m68k-low.c: Include <asm/ptrace.h>
10212 (ps_get_thread_area): Implement.
10213
24b066ba
DE
102142010-05-03 Doug Evans <dje@google.com>
10215
10216 * event-loop.c (struct callback_event): New struct.
10217 (callback_list): New global.
10218 (append_callback_event, delete_callback_event): New functions.
10219 (process_callback): New function.
10220 (start_event_loop): Call it.
10221 * remote-utils.c (NOT_SCHEDULED): Define.
10222 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10223 moved out of readchar.
10224 (readchar): Rewrite. Call reschedule before returning.
10225 (reset_readchar): New function.
10226 (remote_close): Call it.
10227 (process_remaining, reschedule): New functions.
10228 * server.h (callback_handler_func): New typedef.
10229 (append_callback_event, delete_callback_event): Declare.
10230
9836d6ea
PA
102312010-05-03 Pedro Alves <pedro@codesourcery.com>
10232
10233 * proc-service.c (ps_pglobal_lookup): Use
10234 thread_db_look_up_one_symbol.
10235 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10236 parameter. Use it instead of all_symbols_looked_up.
10237 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10238 field.
10239 (all_symbols_looked_up): Don't declare.
10240 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10241 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10242 field.
10243 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10244 Set all_symbols_looked_up here.
10245 (thread_db_look_up_one_symbol): New.
10246 (thread_db_get_tls_address): Adjust.
10247 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10248 thread_db object on the heap, and tentatively set it in the
10249 process structure.
10250 (thread_db_init): Don't set all_symbols_looked_up here.
10251 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10252
7984d532
PA
102532010-05-03 Pedro Alves <pedro@codesourcery.com>
10254
10255 * linux-low.c (linux_kill, linux_detach): Adjust.
10256 (status_pending_p_callback): Remove redundant statement. Check
10257 for !TARGET_WAITIKIND_IGNORE, instead of
10258 TARGET_WAITKIND_STOPPED.
10259 (handle_tracepoints): Make sure LWP is locked. Adjust.
10260 (linux_wait_for_event_1): Adjust.
10261 (linux_cancel_breakpoints): New.
10262 (unsuspend_one_lwp): New.
10263 (unsuspend_all_lwps): New.
10264 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10265 (send_sigstop_callback): Change return type to int, add new
10266 `except' parameter and handle it.
10267 (suspend_and_send_sigstop_callback): New.
10268 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10269 pass them down. If SUSPEND, also increment the lwp's suspend
10270 count.
10271 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10272 (need_step_over_p): Don't consider suspended LWPs.
10273 (start_step_over): Adjust.
10274 (proceed_one_lwp): Change return type to int, add new `except'
10275 parameter and handle it.
10276 (unsuspend_and_proceed_one_lwp): New.
10277 (proceed_all_lwps): Use find_inferior instead of
10278 for_each_inferior.
10279 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10280 also decrement the suspend count of LWPs. Pass `except' down,
10281 instead of hacking its suspend count.
10282 (linux_pause_all): Add `freeze' parameter. Adjust.
10283 (linux_unpause_all): New.
10284 (linux_target_ops): Install linux_unpause_all.
10285 * server.c (handle_status): Adjust.
10286 * target.h (struct target_ops): New fields `unpause_all' and
10287 `cancel_breakpoints'. Add new parameter to `pause_all'.
10288 (pause_all): Add new `freeze' parameter.
10289 (unpause_all): New.
10290 (cancel_breakpoints): New.
10291 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10292 cancel breakpoints.
10293 (cmd_qtstart): Pause threads.
10294 (stop_tracing): Pause threads, and cancel breakpoints.
10295 * win32-low.c (win32_target_ops): Adjust.
10296
e471f25b
PA
102972010-05-03 Pedro Alves <pedro@codesourcery.com>
10298
10299 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10300 the inferior right away from here...
10301 (linux_wait_1): ... to here, and adjust to check the thread's
10302 last_resume_kind instead of the lwp's step or stop_expected flags.
10303
1915ef4f
PA
103042010-05-02 Pedro Alves <pedro@codesourcery.com>
10305
10306 * README: Use consistent `GDB' and `GDBserver' spellings.
10307
f9e39928
PA
103082010-05-02 Pedro Alves <pedro@codesourcery.com>
10309
10310 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10311 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10312 (linux_detach_one_lwp): Assume the lwp is stopped.
10313 (any_thread_of): Delete.
10314 (linux_detach): Stop all lwps here. Don't blindly delete all
10315 breakpoints.
10316 (delete_lwp_callback): New.
10317 (linux_mourn): Delete all lwps of the process that is gone.
10318 (linux_wait_1): Don't delete the last lwp of the process here.
10319 * mem-break.h (mark_breakpoints_out): Declare.
10320 * mem-break.c (mark_breakpoints_out): New.
10321 (free_all_breakpoints): Use it.
10322 * server.c (handle_target_event): If the process is gone, mark
10323 breakpoints out.
10324 * thread-db.c (struct thread_db) <create_bp>: New field.
10325 (thread_db_enable_reporting): Fix prototype. Store a thread event
10326 breakpoint reference in the thread_db struct.
10327 (thread_db_load_search): Clear the thread_db object.
10328 (try_thread_db_load_1): Ditto.
10329 (switch_to_process): New.
10330 (disable_thread_event_reporting): Use it.
10331 (remove_thread_event_breakpoints): New.
10332 (thread_db_detach, thread_db_mourn): Use it.
10333
1e7fc18c
PA
103342010-05-01 Pedro Alves <pedro@codesourcery.com>
10335
10336 * linux-low.c (linux_enable_event_reporting): New.
10337 (linux_wait_for_event_1, handle_extended_wait): Use it.
10338
02fc4de7
PA
103392010-04-30 Pedro Alves <pedro@codesourcery.com>
10340
10341 * linux-low.c (linux_kill_one_lwp, linux_kill)
10342 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10343 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10344 SIGSTOP even if the LWP is stopped.
10345 (send_sigstop_callback): New.
10346 (stop_all_lwps): Use send_sigstop_callback instead.
10347 (linux_resume_one_thread): Adjust.
10348 (proceed_one_lwp): Still proceed an LWP that the client has
10349 requested to stop, if we haven't reported it as stopped yet. Make
10350 sure that LWPs the client want stopped, have a pending SIGSTOP.
10351
bc3b5632
DE
103522010-04-26 Doug Evans <dje@google.com>
10353
ae1ada35
DE
10354 * server.c (handle_general_set): Make static.
10355
bc3b5632
DE
10356 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10357 Print received char after testing for error/eof instead of before.
10358 (input_interrupt): Tweak comment.
10359
65730243
DE
103602010-04-23 Doug Evans <dje@google.com>
10361
10362 * server.c (start_inferior): Print inferior argv if --debug.
10363
a8ae7dc0
AR
103642010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10365
10366 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10367 * nto-x86-low.c: Include server.h
10368
1c07cc19
PM
103692010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10370
10371 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10372 be consistent with other sources of this directory.
10373 (init_registers_amd64): Correct name of source file of this function
10374 in the comment.
10375
e0a61e09
PM
103762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10377
10378 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10379 64-bit executables.
10380
54709339
PM
103812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10382
10383 * win32-i386-low.c: Add 64-bit support.
10384 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10385 (init_registers_amd64): Declare.
10386 (mappings): Add 64-bit version of array.
10387 (init_windows_x86): New function.
10388 (the_low_target): Change init_arch field to init_windows_x86.
10389
e8f0053d
PM
103902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10391
10392 * win32-low.c: Adapt to support also 64-bit architecture.
10393 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10394 (get_image_name): Use SIZE_T type for local variable `done'.
10395 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10396 (toolhelp_get_dll_name): Idem.
10397 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10398 Use uintptr_t typecast to avoid warning.
10399 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10400 (handle_exception): Use phex_nz to avoid warning.
10401 (win32_wait): Remove unused local variable `process'.
10402
c481e77e
PM
104032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10404
10405 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10406 `amd64-avx.o'.
10407
12ea4b69
PM
104082010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10409
10410 * configure.ac: Use `ws2_32' library for srv_mingw.
10411 * configure: Regenerate.
10412 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10413 * remote-utils.c: Likewise.
10414
f6d1620c
L
104152010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10416
10417 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10418 if __x86_64__ is defined.
10419
8e642873
PM
104202010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10421
10422 * configure: Regenerate.
10423
711e434b
PM
104242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10425
10426 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10427 * target.h (target_ops): New get_tib_address field.
10428 * win32-low.h (win32_thread_info): Add thread_local_base field.
10429 * win32-low.c (child_add_thread): Add tlb argument.
10430 Set thread_local_base field to TLB.
10431 (get_child_debug_event): Adapt to child_add_thread change.
10432 (win32_get_tib_address): New function.
10433 (win32_target_ops): Set get_tib_address field to
10434 win32_get_tib_address.
10435 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10436
505106cd
PA
104372010-04-12 Pedro Alves <pedro@codesourcery.com>
10438
505106cd
PA
10439 * linux-low.c (linux_mourn): Also remove the process.
10440 * server.c (handle_target_event): Don't remove the process here.
10441 * nto-low.c (nto_mourn): New.
10442 (nto_target_ops): Install it.
10443 * spu-low.c (spu_mourn): New.
10444 (spu_target_ops): Install it.
10445 * win32-low.c (win32_mourn): New.
10446 (win32_target_ops): Install it.
10447
e8470a06
PA
104482010-04-12 Pedro Alves <pedro@codesourcery.com>
10449
10450 * server.h (buffer_xml_printf): Remove redundant `;'.
10451
45ba0d02
PA
104522010-04-12 Pedro Alves <pedro@codesourcery.com>
10453
10454 * regcache.c (set_register_cache): Invalidate regcaches before
10455 changing the register cache layout.
10456 (regcache_invalidate_one): Allow a NULL regcache.
10457 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10458 regcaches before changing the register cache layout or the target
10459 regsets.
10460
59e04013
L
104612010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10462
10463 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10464 variable warning on Linux/x86-64.
10465
8336d594
PA
104662010-04-11 Pedro Alves <pedro@codesourcery.com>
10467
10468 GDBserver disconnected tracing support.
10469
10470 * linux-low.c (linux_remove_process): Delete.
10471 (add_lwp): Don't set last_resume_kind here.
10472 (linux_kill): Use `mourn'.
10473 (linux_detach): Use `thread_db_detach', and `mourn'.
10474 (linux_mourn): New.
10475 (linux_attach_lwp_1): Adjust comment.
10476 (linux_attach): last_resume_kind moved the thread_info; adjust.
10477 (status_pending_p_callback): Adjust.
10478 (linux_wait_for_event_1): Adjust.
10479 (count_events_callback, select_singlestep_lwp_callback)
10480 (select_event_lwp_callback, cancel_breakpoints_callback)
10481 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10482 (proceed_one_lwp): Adjust.
10483 (linux_async): Add debug output.
10484 (linux_thread_stopped): New.
10485 (linux_pause_all): New.
10486 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10487 linux_pause_all.
10488 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10489 (thread_db_free): Delete declaration.
10490 (thread_db_detach, thread_db_mourn): Declare.
10491 * thread-db.c (thread_db_init): Use thread_db_mourn.
10492 (thread_db_free): Delete, split in two.
10493 (disable_thread_event_reporting): New.
10494 (thread_db_detach): New.
10495 (thread_db_mourn): New.
10496
10497 * server.h (struct thread_info) <last_resume_kind>: New field.
10498 <attached>: Add comment.
10499 <gdb_detached>: New field.
10500 (handler_func): Change return type to int.
10501 (handle_serial_event, handle_target_event): Ditto.
10502 (gdb_connected): Declare.
10503 (tracing): Delete.
10504 (disconnected_tracing): Declare.
10505 (stop_tracing): Declare.
10506
10507 * server.c (handle_query) <qSupported>: Report support for
10508 disconnected tracing.
10509 (queue_stop_reply_callback): Account for running threads.
10510 (gdb_wants_thread_stopped): New.
10511 (gdb_wants_all_threads_stopped): New.
10512 (gdb_reattached_process): New.
10513 (handle_status): Clear the `gdb_detached' flag of all processes.
10514 In all-stop, stop all threads.
10515 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10516 (process_serial_event): If the remote connection breaks, or if an
10517 exit was forced with "monitor exit", force an event loop exit.
10518 Handle disconnected tracing on detach.
10519 (handle_serial_event): Adjust.
10520 (handle_target_event): If GDB isn't connected, forward events back
10521 to the inferior, unless the last process exited, in which case,
10522 exit gdbserver. Adjust interface.
10523
10524 * remote-utils.c (remote_open): Don't block in accept. Instead
10525 register an event loop source on the listen socket file
10526 descriptor. Refactor bits into ...
10527 (listen_desc): ... this new global.
10528 (gdb_connected): ... this new function.
10529 (enable_async_notification): ... this new function.
10530 (handle_accept_event): ... this new function.
10531 (remote_close): Clear remote_desc.
10532
10533 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10534
10535 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10536 New fields.
10537 (mourn_inferior): Define.
10538 (target_process_qsupported): Avoid the dangling else problem.
10539 (thread_stopped): Define.
10540 (pause_all): Define.
10541 (target_waitstatus_to_string): Declare.
10542 * target.c (target_waitstatus_to_string): New.
10543
10544 * tracepoint.c (tracing): Make extern.
10545 (disconnected_tracing): New.
10546 (stop_tracing): Make extern. Handle tracing stops due to GDB
10547 disconnecting.
10548 (cmd_qtdisconnected): New.
10549 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10550 (handle_tracepoint_general_set): Handle QTDisconnected.
10551
10552 * event-loop.c (event_handler_func): Change return type to int.
10553 (process_event): Bail out if the event handler wants the event
10554 loop to stop.
10555 (handle_file_event): Ditto.
10556 (start_event_loop): Bail out if the event handler wants the event
10557 loop to stop.
10558
10559 * nto-low.c (nto_target_ops): Adjust.
10560 * spu-low.c (spu_wait): Don't remove the process here.
10561 (spu_target_ops): Adjust.
10562 * win32-low.c (win32_wait): Don't remove the process here.
10563 (win32_target_ops): Adjust.
10564
5d267c4c
PA
105652010-04-11 Pedro Alves <pedro@codesourcery.com>
10566
10567 * regcache.c (realloc_register_cache): Invalidate inferior's
10568 regcache before recreating it.
10569
623ccd72
PA
105702010-04-09 Pedro Alves <pedro@codesourcery.com>
10571
10572 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10573
219f2f23
PA
105742010-04-09 Stan Shebs <stan@codesourcery.com>
10575 Pedro Alves <pedro@codesourcery.com>
10576
10577 * server.h (LONGEST): New.
10578 (struct thread_info) <while_stepping>: New field.
10579 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10580 Declare.
10581 (initialize_tracepoint, handle_tracepoint_general_set)
10582 (handle_tracepoint_query, tracepoint_finished_step)
10583 (tracepoint_was_hit, release_while_stepping_state_list):
10584 (current_traceframe): Declare.
10585 * server.c (handle_general_set): Handle tracepoint packets.
10586 (read_memory): New.
10587 (write_memory): New.
10588 (handle_search_memory_1): Use read_memory.
10589 (handle_query): Report support for conditional tracepoints, trace
10590 state variables, and tracepoint sources. Handle tracepoint
10591 queries.
10592 (main): Initialize the tracepoints module.
10593 (process_serial_event): Handle traceframe reads/writes.
10594
10595 * linux-low.c (handle_tracepoints): New.
10596 (linux_wait_1): Call it.
10597 (linux_resume_one_lwp): Handle while-stepping.
10598 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10599 (linux_target_ops): Install them.
10600 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10601 New field.
10602 * linux-x86-low.c (x86_supports_tracepoints): New.
10603 (the_low_target). Install it.
10604
10605 * mem-break.h (delete_breakpoint): Declare.
10606 * mem-break.c (delete_breakpoint): Make external.
10607
10608 * target.h (struct target_ops): Add `supports_tracepoints',
10609 `read_pc', and `write_pc' fields.
10610 (target_supports_tracepoints): Define.
10611 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10612 (phex_nz): New.
10613
10614 * regcache.h (struct regcache) <registers_owned>: New field.
10615 (init_register_cache, regcache_cpy): Declare.
10616 (regcache_read_pc, regcache_write_pc): Declare.
10617 (register_cache_size): Declare.
10618 (supply_regblock): Declare.
10619 * regcache.c (init_register_cache): New.
10620 (new_register_cache): Use it.
10621 (regcache_cpy): New.
10622 (register_cache_size): New.
10623 (supply_regblock): New.
10624 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10625
219f2f23
PA
10626 * tracepoint.c: New.
10627
10628 * Makefile.in (OBS): Add tracepoint.o.
10629 (tracepoint.o): New rule.
10630
3a13a53b
L
106312010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10632
10633 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10634 (i386-mmx.o): New.
10635 (i386-mmx.c): Likewise.
10636 (i386-mmx-linux.o): Likewise.
10637 (i386-mmx-linux.c): Likewise.
10638
10639 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10640 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10641 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10642 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10643
10644 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10645 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10646 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10647
1570b33e
L
106482010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10649
10650 * Makefile.in (clean): Updated.
10651 (i386-avx.o): New.
10652 (i386-avx.c): Likewise.
10653 (i386-avx-linux.o): Likewise.
10654 (i386-avx-linux.c): Likewise.
10655 (amd64-avx.o): Likewise.
10656 (amd64-avx.c): Likewise.
10657 (amd64-avx-linux.o): Likewise.
10658 (amd64-avx-linux.c): Likewise.
10659
10660 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10661 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10662 (srv_amd64_regobj): Add amd64-avx.o.
10663 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10664 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10665 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10666 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10667 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10668 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10669 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10670
10671 * i387-fp.c: Include "i386-xstate.h".
10672 (i387_xsave): New.
10673 (i387_cache_to_xsave): Likewise.
10674 (i387_xsave_to_cache): Likewise.
10675 (x86_xcr0): Likewise.
10676
10677 * i387-fp.h (i387_cache_to_xsave): Likewise.
10678 (i387_xsave_to_cache): Likewise.
10679 (x86_xcr0): Likewise.
10680
10681 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10682 * linux-crisv32-low.c (target_regsets): Likewise.
10683 * linux-m68k-low.c (target_regsets): Likewise.
10684 * linux-mips-low.c (target_regsets): Likewise.
10685 * linux-ppc-low.c (target_regsets): Likewise.
10686 * linux-s390-low.c (target_regsets): Likewise.
10687 * linux-sh-low.c (target_regsets): Likewise.
10688 * linux-sparc-low.c (target_regsets): Likewise.
10689 * linux-xtensa-low.c (target_regsets): Likewise.
10690
10691 * linux-low.c: Include <sys/uio.h>.
10692 (regsets_fetch_inferior_registers): Support nt_type.
10693 (regsets_store_inferior_registers): Likewise.
10694 (linux_process_qsupported): New.
10695 (linux_target_ops): Add linux_process_qsupported.
10696
10697 * linux-low.h (regset_info): Add nt_type.
10698 (linux_target_ops): Add process_qsupported.
10699
10700 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10701 and <sys/uio.h>.
10702 (init_registers_i386_avx_linux): New.
10703 (init_registers_amd64_avx_linux): Likewise.
10704 (xmltarget_i386_linux_no_xml): Likewise.
10705 (xmltarget_amd64_linux_no_xml): Likewise.
10706 (PTRACE_GETREGSET): Likewise.
10707 (PTRACE_SETREGSET): Likewise.
10708 (x86_fill_xstateregset): Likewise.
10709 (x86_store_xstateregset): Likewise.
10710 (use_xml): Likewise.
10711 (x86_linux_update_xmltarget): Likewise.
10712 (x86_linux_process_qsupported): Likewise.
10713 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10714 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10715 init_registers_i386_linux here. Call
10716 x86_linux_update_xmltarget.
10717 (the_low_target): Add x86_linux_process_qsupported.
10718
10719 * server.c (handle_query): Call target_process_qsupported.
10720
10721 * target.h (target_ops): Add process_qsupported.
10722 (target_process_qsupported): New.
10723
fc7238bb
PA
107242010-04-03 Pedro Alves <pedro@codesourcery.com>
10725
10726 * inferiors.c (add_thread): Set last_status kind to
10727 TARGET_WAITKIND_IGNORE.
10728 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10729 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10730 (linux_wait_1): Move `thread' local definition to block that uses
10731 it. Don't NULL initialize `event_child'.
10732 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10733 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10734 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10735
bdabb078
PA
107362010-04-01 Pedro Alves <pedro@codesourcery.com>
10737
10738 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10739 an extended waitstatus, or by a watchpoint.
10740 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10741 thread was stepping or has been stopped by a watchpoint.
10742
d3bbe7a0
PA
107432010-04-01 Pedro Alves <pedro@codesourcery.com>
10744
10745 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10746 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10747 of another, then delete the previous, and validate all
10748 breakpoints.
10749 (validate_inserted_breakpoint): New.
10750 (delete_disabled_breakpoints): New.
10751 (validate_breakpoints): New.
10752 (check_mem_read): Validate breakpoints before trusting their
10753 shadow. Delete disabled breakpoints.
10754 (check_mem_write): Validate breakpoints before trusting they
10755 should be inserted. Delete disabled breakpoints.
10756 * mem-break.h (validate_breakpoints):
10757 * server.c (handle_query): Validate breakpoints when we see a
10758 qSymbol query.
10759
8b07ae33
PA
107602010-04-01 Pedro Alves <pedro@codesourcery.com>
10761
10762 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10763 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10764 if we could tell there's a GDB breakpoint at stop_pc.
10765 (need_step_over_p): Don't do a step over if we find a GDB
10766 breakpoint at the resume PC.
10767
10768 * mem-break.c (struct raw_breakpoint): New.
10769 (enum bkpt_type): New type `gdb_breakpoint'.
10770 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10771 fields. New field `raw'.
10772 (find_raw_breakpoint_at): New.
10773 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10774 breakpoint instead.
10775 (set_breakpoint_at): Adjust.
10776 (delete_raw_breakpoint): New.
10777 (release_breakpoint): New.
10778 (delete_breakpoint): Rename to...
10779 (delete_breakpoint_1): ... this. Add proc parameter. Use
10780 release_breakpoint. Return ENOENT.
10781 (delete_breakpoint): Reimplement.
10782 (find_breakpoint_at): Delete.
10783 (find_gdb_breakpoint_at): New.
10784 (delete_breakpoint_at): Delete.
10785 (set_gdb_breakpoint_at): New.
10786 (delete_gdb_breakpoint_at): New.
10787 (gdb_breakpoint_here): New.
10788 (set_reinsert_breakpoint): Use release_breakpoint.
10789 (uninsert_breakpoint): Rename to ...
10790 (uninsert_raw_breakpoint): ... this.
10791 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10792 (reinsert_raw_breakpoint): Change parameter type to
10793 raw_breakpoint.
10794 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10795 instead.
10796 (check_breakpoints): Adjust. Use release_breakpoint.
10797 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10798 (breakpoint_inserted_here): Ditto.
10799 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10800 Don't trust the breakpoint's shadow if it is not inserted.
10801 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10802 (delete_all_breakpoints): Adjust.
10803 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10804 use delete_breakpoint_1.
10805
10806 * mem-break.h (breakpoints_supported): Delete declaration.
10807 (set_gdb_breakpoint_at): Declare.
10808 (gdb_breakpoint_here): Declare.
10809 (delete_breakpoint_at): Delete.
10810 (delete_gdb_breakpoint_at): Declare.
10811
10812 * server.h (struct raw_breakpoint): Forward declare.
10813 (struct process_info): New field `raw_breakpoints'.
10814
10815 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10816 breakpoints.
10817
6bf5e0ba
PA
108182010-03-24 Pedro Alves <pedro@codesourcery.com>
10819
10820 * linux-low.c (status_pending_p_callback): Fix comment.
10821 (linux_wait_for_event_1): Move most of the internal breakpoint
10822 handling from here...
10823 (linux_wait_1): ... to here.
10824 (count_events_callback): New.
10825 (select_singlestep_lwp_callback): New.
10826 (select_event_lwp_callback): New.
10827 (cancel_breakpoints_callback): New.
10828 (select_event_lwp): New.
10829 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10830 priority to all LWPs that have had events that should be reported
10831 to the client. Cancel breakpoints when about to reporting the
10832 event to the client, not while stopping lwps. No longer cancel
10833 finished single-steps here.
10834 (cancel_finished_single_step): Delete.
10835 (cancel_finished_single_steps): Delete.
10836
414a389f
PA
108372010-03-24 Pedro Alves <pedro@codesourcery.com>
10838
10839 * mem-break.c (enum bkpt_type): New.
10840 (struct breakpoint): New field `type'.
10841 (set_breakpoint_at): Change return type to struct breakpoint
10842 pointer. Set type to `other_breakpoint' by default.
10843 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10844 in the breakpoint list.
10845 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10846 (reinsert_breakpoint): Rename to ...
10847 (reinsert_raw_breakpoint): ... this.
10848 (reinsert_breakpoints_at): Adjust.
10849 * mem-break.h (struct breakpoint): Declare.
10850 (set_breakpoint_at): Change return type to struct breakpoint
10851 pointer.
10852
2280c721
PA
108532010-03-24 Pedro Alves <pedro@codesourcery.com>
10854
10855 * server.c (handle_query): Assign, not compare.
10856
d50171e4
PA
108572010-03-24 Pedro Alves <pedro@codesourcery.com>
10858
10859 Teach linux gdbserver to step-over-breakpoints.
10860
10861 * linux-low.c (can_hardware_single_step): New.
10862 (supports_breakpoints): New.
10863 (handle_extended_wait): If stopping threads, read the stop pc of
10864 the new cloned LWP.
10865 (get_pc): New.
10866 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10867 low target doesn't support retrieving the PC.
10868 (add_lwp): Set last_resume_kind to resume_continue.
10869 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10870 (linux_attach): Don't clear stop_expected. Set the lwp's
10871 last_resume_kind to resume_stop.
10872 (linux_detach_one_lwp): Don't check for removed breakpoints.
10873 (check_removed_breakpoint): Delete.
10874 (status_pending_p): Rename to ...
10875 (status_pending_p_callback): ... this. Don't check for removed
10876 breakpoints. Don't consider threads that are stopped from GDB's
10877 perspective.
10878 (linux_wait_for_lwp): Always read the stop_pc here.
10879 (cancel_breakpoint): New.
10880 (step_over_bkpt): New global.
10881 (linux_wait_for_event_1): Implement stepping over breakpoints.
10882 (gdb_wants_lwp_stopped): New.
10883 (gdb_wants_all_stopped): New.
10884 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10885 single-step traps here. Store the thread's last reported target
10886 wait status.
10887 (send_sigstop): Don't clear stop_expected. Always set it,
10888 instead.
10889 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10890 (cancel_finished_single_step): New.
10891 (cancel_finished_single_steps): New.
10892 (wait_for_sigstop): Don't cancel finished single-step traps here.
10893 (linux_resume_one_lwp): Don't check for removed breakpoints.
10894 Don't set `step' on non-hardware step archs.
10895 (linux_set_resume_request): Ignore resume_stop requests if already
10896 stopping or stopped. Set the lwp's last_resume_kind.
10897 (resume_status_pending_p): Don't check for removed breakpoints.
10898 (need_step_over_p): New.
10899 (start_step_over): New.
10900 (finish_step_over): New.
10901 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10902 requests. Clear the thread's last reported target waitstatus.
10903 Don't use the `suspended' flag. Don't consider pending breakpoints.
10904 (linux_resume): Start a step-over if necessary.
10905 (proceed_one_lwp): New.
10906 (proceed_all_lwps): New.
10907 (unstop_all_lwps): New.
10908 * linux-low.h (struct lwp_info): Rewrite comment for the
10909 `suspended' flag. Add the `stop_pc' field. Delete the
10910 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10911 Add `'last_resume_kind' and `need_step_over' fields.
10912 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10913 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10914 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10915 (set_raw_breakpoint_at): New.
10916 (set_breakpoint_at): Rewrite to use it.
10917 (reinsert_breakpoint_handler): Delete.
10918 (set_reinsert_breakpoint): New.
10919 (reinsert_breakpoint_by_bp): Delete.
10920 (delete_reinsert_breakpoints): New.
10921 (uninsert_breakpoint): Rewrite.
10922 (uninsert_breakpoints_at): New.
10923 (reinsert_breakpoint): Rewrite.
10924 (reinsert_breakpoints_at): New.
10925 (check_breakpoints): Rewrite.
10926 (breakpoint_here): New.
10927 (breakpoint_inserted_here): New.
10928 (check_mem_read): Adjust.
10929 * mem-break.h (breakpoints_supported, breakpoint_here)
10930 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10931 (reinsert_breakpoint_by_bp): Delete declaration.
10932 (delete_reinsert_breakpoints): Declare.
10933 (reinsert_breakpoint): Delete declaration.
10934 (reinsert_breakpoints_at): Declare.
10935 (uninsert_breakpoint): Delete declaration.
10936 (uninsert_breakpoints_at): Declare.
10937 (check_breakpoints): Adjust prototype.
10938 * server.h: Adjust include order.
10939 (struct thread_info): Declare here. Add a `last_status' field.
10940
30ba68cb
MS
109412010-03-23 Michael Snyder <msnyder@vmware.com>
10942
10943 * server.c (crc32): New function.
10944 (handle_query): Add handling for 'qCRC:' request.
10945
b9a881c2
PA
109462010-03-23 Pedro Alves <pedro@codesourcery.com>
10947
10948 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10949 lwp had been stopped by a watchpoint.
10950
e92d13d5
PA
109512010-03-16 Pedro Alves <pedro@codesourcery.com>
10952
10953 * server.h (internal_error): Declare.
10954 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10955 * utils.c (internal_error): New function.
10956
64daa791
AS
109572010-03-15 Andreas Schwab <schwab@redhat.com>
10958
10959 * configure.srv: Fix typo setting srv_regobj.
10960
f52cd8cd
PA
109612010-03-15 Pedro Alves <pedro@codesourcery.com>
10962
10963 * linux-low.c (fetch_register): Avoid passing a non string literal
10964 format to `error'.
10965 (usr_store_inferior_registers): Ditto.
10966
93ae6fdc
PA
109672010-03-14 Pedro Alves <pedro@codesourcery.com>
10968
10969 * linux-low.c (linux_write_memory): Bail out early if peeking
10970 memory failed.
10971
c3adc08c
PA
109722010-03-14 Pedro Alves <pedro@codesourcery.com>
10973
10974 * linux-low.h (struct lwp_info): New fields
10975 `stopped_by_watchpoint' and `stopped_data_address'.
10976 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10977 here, and cache them in the lwp object.
10978 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10979 directly.
10980 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10981 field.
10982 (linux_stopped_by_watchpoint): Rewrite.
10983 (linux_stopped_data_address): Rewrite.
10984
bce522a2
PA
109852010-03-06 Simo Melenius <simo.melenius@iki.fi>
10986
10987 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10988 switching the current inferior, not before.
10989
90884b2b
L
109902010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10991
10992 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10993 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10994 i386-linux.c and amd64-linux.c.
10995 (reg-i386.o): Removed.
10996 (reg-i386.c): Likewise.
10997 (reg-i386-linux.o): Likewise.
10998 (reg-i386-linux.c): Likewise.
10999 (reg-x86-64.o): Likewise.
11000 (reg-x86-64.c): Likewise.
11001 (reg-x86-64-linux.o): Likewise.
11002 (reg-x86-64-linux.c): Likewise.
11003 (i386.o): New.
11004 (i386.c): Likewise.
11005 (i386-linux.o): Likewise.
11006 (i386-linux.c): Likewise.
11007 (amd64.o): Likewise.
11008 (amd64.c): Likewise.
11009 (amd64-linux.o): Likewise.
11010 (amd64-linux.c): Likewise.
11011
11012 * configure.srv (srv_i386_regobj): New.
11013 (srv_i386_linux_regobj): Likewise.
11014 (srv_amd64_regobj): Likewise.
11015 (srv_amd64_linux_regobj): Likewise.
11016 (srv_i386_32bit_xmlfiles): Likewise.
11017 (srv_i386_64bit_xmlfiles): Likewise.
11018 (srv_i386_xmlfiles): Likewise.
11019 (srv_amd64_xmlfiles): Likewise.
11020 (srv_i386_linux_xmlfiles): Likewise.
11021 (srv_amd64_linux_xmlfiles): Likewise.
11022 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11023 srv_xmlfiles to $srv_i386_xmlfiles.
11024 (i[34567]86-*-mingw32ce*): Likewise.
11025 (i[34567]86-*-mingw*): Likewise.
11026 (i[34567]86-*-nto*): Likewise.
11027 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11028 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11029 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11030 (x86_64-*-linux*): Likewise.
11031
11032 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11033 (init_registers_amd64_linux): New.
11034 (x86_arch_setup): Replace init_registers_x86_64_linux with
11035 init_registers_amd64_linux.
11036
193f13e6
MK
110372010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11038
11039 * configure.ac: Check for libdl. If it is not available link against
11040 static libthread_db.
11041 * configure: Regenerate.
11042
85d721b8
PA
110432010-02-22 Pedro Alves <pedro@codesourcery.com>
11044
11045 PR9605
11046
11047 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11048 handing a read watchpoint.
11049 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11050
6076632b
DE
110512010-02-12 Doug Evans <dje@google.com>
11052
11053 * linux-low.c (linux_supports_tracefork_flag): Document.
11054 (linux_look_up_symbols): Add comment.
11055
3327ccf7
L
110562010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11057
11058 * regcache.c (supply_register): Clear regcache if buf is NULL.
11059
0718675c 110602010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11061 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11062
11063 * inferiors.c (find_inferior): Add function documentation.
11064 (unloaded_dll): Handle the case where the unloaded dll has not
11065 been previously registered in the dll list.
11066
177321bd
DJ
110672010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11068
11069 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11070 (thumb2_breakpoint): New.
11071 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11072
2b009048
DJ
110732010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11074
11075 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11076 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11077 breakpoints.
11078
3be029c7
PA
110792010-01-21 Pedro Alves <pedro@codesourcery.com>
11080
11081 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11082
18f5de3b
JK
110832010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11084
11085 * linux-s390-low.c (s390_collect_ptrace_register)
11086 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11087
3743bb4f
DE
110882010-01-21 Doug Evans <dje@google.com>
11089
14ce3065
DE
11090 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11091 (PTRACE_ARG4_TYPE): New macro.
11092 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11093 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11094 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11095 (usr_store_inferior_registers): Ditto.
11096 (linux_read_memory, linux_write_memory): Ditto.
11097 (linux_test_for_tracefork): Ditto.
11098
3743bb4f
DE
11099 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11100 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11101
8b315be5
PA
111022010-01-21 Pedro Alves <pedro@codesourcery.com>
11103
11104 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11105 target.
11106
85492558
PA
111072010-01-21 Pedro Alves <pedro@codesourcery.com>
11108
11109 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11110 prototype to take a regcache. Adjust.
11111
442ea881
PA
111122010-01-20 Pedro Alves <pedro@codesourcery.com>
11113
11114 * regcache.h (struct thread_info): Forward declare.
11115 (struct regcache): New.
11116 (new_register_cache): Adjust prototype.
11117 (get_thread_regcache): Declare.
11118 (free_register_cache): Adjust prototype.
11119 (registers_to_string, registers_from_string): Ditto.
11120 (supply_register, supply_register_by_name, collect_register)
11121 (collect_register_as_string, collect_register_by_name): Ditto.
11122 * regcache.c (struct inferior_regcache_data): Delete.
11123 (get_regcache): Rename to ...
11124 (get_thread_regcache): ... this. Adjust. Switch inferior before
11125 fetching registers.
11126 (regcache_invalidate_one): Adjust.
11127 (regcache_invalidate): Fix prototype.
11128 (new_register_cache): Return the new register cache.
11129 (free_register_cache): Change prototype.
11130 (realloc_register_cache): Adjust.
11131 (registers_to_string): Change prototype to take a regcache. Adjust.
11132 (registers_from_string): Ditto.
11133 (register_data): Ditto.
11134 (supply_register): Ditto.
11135 (supply_register_by_name): Ditto.
11136 (collect_register): Ditto.
11137 (collect_register_as_string): Ditto.
11138 (collect_register_by_name): Ditto.
11139 * server.c (process_serial_event): Adjust.
11140 * linux-low.h (regset_fill_func, regset_store_func): Change
11141 prototype.
11142 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11143 Change prototype.
11144 * linux-low.c (get_stop_pc): Adjust.
11145 (check_removed_breakpoint): Adjust.
11146 (linux_wait_for_event): Adjust.
11147 (linux_resume_one_lwp): Adjust.
11148 (fetch_register): Add regcache parameter. Adjust.
11149 (usr_store_inferior_registers): Ditto.
11150 (regsets_fetch_inferior_registers): Ditto.
11151 (regsets_store_inferior_registers): Ditto.
11152 (linux_fetch_registers, linux_store_registers): Ditto.
11153 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11154 regcache. Adjust.
43aaf8b6
PA
11155 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11156 Ditto.
442ea881
PA
11157 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11158 prototype to take a regcache.
11159 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11160 * remote-utils.c (convert_ascii_to_int, outreg)
11161 (prepare_resume_reply): Change prototype to take a regcache.
11162 Adjust.
11163 * target.h (struct target_ops) <fetch_registers, store_registers>:
11164 Change prototype to take a regcache.
11165 (fetch_inferior_registers, store_inferior_registers): Change
11166 prototype to take a regcache. Adjust.
11167 * proc-service.c (ps_lgetregs): Adjust.
11168 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11169 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11170 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11171 take a regcache. Adjust.
11172 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11173 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11174 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11175 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11176 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11177 (cris_cannot_fetch_register):
11178 (cris_breakpoint_at): Change prototype to take a regcache.
11179 Adjust.
11180 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11181 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11182 to take a regcache. Adjust.
11183 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11184 Adjust.
11185 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11186 take a regcache. Adjust.
11187 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11188 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11189 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11190 * linux-mips-low.c (mips_get_pc):
11191 (mips_set_pc): Change prototype to take a regcache. Adjust.
11192 (mips_reinsert_addr): Adjust.
11193 (mips_collect_register): Change prototype to take a regcache.
11194 Adjust.
11195 (mips_supply_register):
11196 (mips_collect_register_32bit, mips_supply_register_32bit)
11197 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11198 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11199 * linux-ppc-low.c (ppc_supply_ptrace_register)
11200 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11201 (parse_spufs_run): Adjust.
11202 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11203 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11204 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11205 take a regcache. Adjust.
11206 * linux-s390-low.c (s390_collect_ptrace_register)
11207 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11208 (s390_set_pc): Change prototype to take a regcache. Adjust.
11209 (s390_arch_setup): Adjust.
11210 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11211 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11212 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11213 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11214 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11215 regcache. Adjust.
11216 (sparc_breakpoint_at): Adjust.
11217 * linux-xtensa-low.c (xtensa_fill_gregset):
11218 (xtensa_store_gregset):
11219 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11220 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11221 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11222 prototype to take a regcache. Adjust.
11223 * win32-arm-low.c (arm_fetch_inferior_register)
11224 (arm_store_inferior_register): Change prototype to take a
11225 regcache. Adjust.
11226 * win32-i386-low.c (i386_fetch_inferior_register)
11227 (i386_store_inferior_register): Change prototype to take a
11228 regcache. Adjust.
11229 * win32-low.c (child_fetch_inferior_registers)
11230 (child_store_inferior_registers): Change prototype to take a
11231 regcache. Adjust.
11232 (win32_wait): Adjust.
11233 (win32_fetch_inferior_registers): Change prototype to take a
11234 regcache. Adjust.
11235 (win32_store_inferior_registers): Adjust.
11236 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11237 store_inferior_register>: Change prototype to take a regcache.
11238
60c3d7b0
DE
112392010-01-20 Doug Evans <dje@google.com>
11240
11241 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11242 #ifdef.
11243 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11244 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11245
dc146f7c
VP
112462010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11247
11248 * linux-low.c (linux_core_of_thread): New.
11249 (compare_ints, show_process, list_threads): New.
11250 (linux_qxfer_osdata): Report threads and cores.
11251 (linux_target_op): Register linux_core_of_thread.
11252 * remote-utils.c (prepare_resume_reply): Report the core.
11253 (buffer_xml_printf): Support %d specifier.
11254 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11255 New.
11256 (handle_query): Handle qXfer:threads. Announce availability
11257 thereof.
11258 * target.h (struct target_ops): New field core_of_thread.
11259
7803799a
UW
112602010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11261
11262 * Makefile.in (clean): Remove new generated files.
11263 (reg-s390.o, reg-s390.c): Remove rules.
11264 (reg-s390x.o, reg-s390x.c): Likewise.
11265 (s390-linux32.o, s390-linux32.c): Add rules.
11266 (s390-linux64.o, s390-linux64.c): Likewise.
11267 (s390x-linux64.o, s390x-linux64.c): Likewise.
11268 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11269 * linux-s390-low.c: Include <elf.h>.
11270 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11271 (init_registers_s390): Remove prototype.
11272 (init_registers_s390x): Likewise.
11273 (init_registers_s390_linux32): Add prototype.
11274 (init_registers_s390_linux64): Likewise.
11275 (init_registers_s390x_linux64): Likewise.
11276 (s390_num_regs_3264): New define.
11277 (s390_regmap_3264): New global variable.
11278 (s390_cannot_fetch_register): Remove obsolete check.
11279 (s390_cannot_store_register): Likewise.
11280 (s390_collect_ptrace_register): Handle upper/lower register halves.
11281 (s390_supply_ptrace_register): Likewise.
11282 (s390_fill_gregset): Update to register number changes.
11283 (s390_get_hwcap): New routine.
11284 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11285 Install appropriate regmap and register set.
11286
6e7ffa39
JB
112872010-01-01 Joel Brobecker <brobecker@adacore.com>
11288
11289 * server.c (gdbserver_version): Update copyright year to 2010.
11290 * gdbreplay.c (gdbreplay_version): Likewise.
11291
957f3f49
DE
112922009-12-28 Doug Evans <dje@google.com>
11293
11294 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11295 elf/external.h. Include <elf.h> instead but only if necessary.
11296
ca5c370d
PA
112972009-12-28 Pedro Alves <pedro@codesourcery.com>
11298
11299 * linux-low.c (linux_remove_process): Remove `detaching'
11300 parameter. Don't release/detach from thread_db here.
11301 (linux_kill): Release/detach from thread_db here, ...
11302 (linux_detach): ... and here, before actually detaching.
11303 (linux_wait_1): ... and here, when a process exits.
11304 * thread-db.c (any_thread_of): New.
11305 (thread_db_free): Switch the current inferior to a thread of the
11306 passed in process.
11307
4ee62156
DE
113082009-12-21 Doug Evans <dje@google.com>
11309
d90e6a88
DE
11310 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11311
c5f62d5f
DE
11312 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11313 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11314 warning ifndef __NR_tkill. Move setting of errno there too.
11315 Delete unnecessary resetting of errno after syscall.
11316 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11317
10e86dd7
DE
11318 * configure.ac: Check for dladdr.
11319 * config.in: Regenerate.
11320 * configure: Regenerate.
11321 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11322 (try_thread_db_load): Update.
11323
4ee62156
DE
11324 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11325
00f515da
DE
113262009-12-18 Doug Evans <dje@google.com>
11327
e9464885
DE
11328 * event-loop.c: Include unistd.h if it exists.
11329
07d4f67e
DE
11330 * linux-low.c (my_waitpid): Move definition away from being in
11331 between linux_tracefork_child/linux_test_for_tracefork.
11332
00f515da
DE
11333 * gdb_proc_service.h (psaddr_t): Fix type.
11334 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11335 signature to match glibc.
11336
1de1badb
DE
113372009-12-16 Doug Evans <dje@google.com>
11338
11339 * linux-low.c (linux_read_memory): Fix argument to read.
11340
aeeb81d1
PA
113412009-11-26 Pedro Alves <pedro@codesourcery.com>
11342
11343 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11344 events, don't leave current_inferior pointing at null.
11345
10357975
PA
113462009-11-26 Pedro Alves <pedro@codesourcery.com>
11347
11348 * win32-low.c (LOG): Delete.
11349 (OUTMSG): Output to stderr.
11350 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11351 on compile time LOG macro.
11352 (win32_wait): Fix debug output.
11353
cf6e3471
PA
113542009-11-26 Pedro Alves <pedro@codesourcery.com>
11355
11356 * win32-low.c (win32_add_one_solib): If the dll name is
11357 "ntdll.dll", prepend the system directory to the dll path.
11358
0c85e18e
MK
113592009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11362
9ac544ce 113632009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11364 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11365
11366 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11367 * configure.ac: Check for __mcoldfire__ and set
11368 gdb_cv_m68k_is_coldfire.
11369 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11370 reg-cf.o and reg-m68k.o.
11371 * configure: Regenerated.
11372
fd7dd3e6
PA
113732009-11-16 Pedro Alves <pedro@codesourcery.com>
11374
11375 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11376 Pass it to thread_db_free.
11377 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11378 proper `detaching' argument to linux_remove_process.
11379 * linux-low.h (thread_db_free): Add `detaching' parameter.
11380 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11381 to thread_db_free.
11382 (thread_db_free): Add `detaching' parameter. Only
11383 call td_ta_clear_event if detaching from process.
11384
75aa492e
MK
113852009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11386
11387 * thread-db.c (thread_db_free): Fix typo.
11388
21e1bee4
PP
113892009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11390
11391 PR gdb/10838
11392 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11393
8838b45e
NS
113942009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11395
11396 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11397 with an i686 compiler.
11398 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11399 needed.
11400 * configure: Rebuilt.
11401
8a35fb51
SL
114022009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11403
11404 PR gdb/10783
11405
11406 * server.c (handle_search_memory_1): Correct read_addr initialization
11407 in loop for searching subsequent chunks.
11408
96f15937
PP
114092009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11410
11411 * configure.ac: New --with-libthread-db option.
11412 * thread-db.c: Allow direct dependence on libthread_db.
11413 (thread_db_free): Adjust.
11414 * config.in: Regenerate.
11415 * configure: Likewise.
889bf7c5 11416
5f7d1694
PP
114172009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11418
11419 PR gdb/10757
11420 * thread-db.c (attach_thread): New function.
11421 (maybe_attach_thread): Return success/failure.
11422 (find_new_threads_callback): Adjust.
889bf7c5
PA
11423 (thread_db_find_new_threads): Loop until no new threads.
11424
88e3b899
PA
114252009-10-13 Pedro Alves <pedro@codesourcery.com>
11426
11427 * proc-service.c (ps_lgetregs): Formatting.
11428
cdbfd419
PP
114292009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11430
11431 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11432 * configure.ac: Adjust.
11433 * linux-low.h (struct process_info_private): Move members to struct
11434 thread_db.
11435 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11436 * linux-low.c (linux_remove_process): Adjust.
11437 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11438 * server.c (handle_query): Move code ...
11439 (handle_monitor_command): ... here. New function.
11440 * target.h (struct target_ops): New member.
11441 * thread-db.c (struct thread_db): New.
11442 (libthread_db_search_path): New variable.
11443 (thread_db_create_event, thread_db_enable_reporting)
11444 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11445 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11446 (try_thread_db_load_1, dladdr_to_soname): New functions.
11447 (try_thread_db_load, thread_db_load_search): New functions.
11448 (thread_db_init): Search for libthread_db.
11449 (thread_db_free): New function.
11450 (thread_db_handle_monitor_command): Likewise.
11451 * config.in: Regenerate.
11452 * configure: Regenerate.
889bf7c5 11453
4168d2d6
UW
114542009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11455
11456 * spu-low.c (spu_kill): Wait for inferior to terminate.
11457 Call clear_inferiors.
11458 (spu_detach): Call clear_inferiors.
11459
81ecdfbb
RW
114602009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11461
11462 * aclocal.m4: Regenerate.
11463 * config.in: Likewise.
11464 * configure: Likewise.
11465
0b9ff2c0
UW
114662009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11467
11468 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11469 (parse_spufs_run): New function.
11470 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11471 (ppc_breakpoint_at): Handle SPU breakpoints.
11472
efcbbd14
UW
114732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11474
11475 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11476 (SPUFS_MAGIC): Define.
11477 (spu_enumerate_spu_ids): New function.
11478 (linux_qxfer_spu): New function.
11479 (linux_target_ops): Install linux_qxfer_spu.
11480
f4d9bade
UW
114812009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11482
11483 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11484 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11485 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11486 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11487 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11488 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11489 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11490 (init_registers_powerpc_cell32l): Add prototype.
11491 (init_registers_powerpc_cell64l): Likewise.
11492 (ppc_arch_setup): Detect Cell/B.E. architecture.
11493
96e946ca
RW
114942009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11495
11496 * Makefile.in (datarootdir): New variable.
11497
58d6951d
DJ
114982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11499
11500 * linux-low.c (linux_write_memory): Update debugging output.
11501 * Makefile.in (clean): Add new descriptions.
11502 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11503 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11504 * configure.srv: Add new files for arm*-*-linux*.
11505 * linux-arm-low.c: Add new declarations.
11506 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11507 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11508 (HWCAP_VFPv3D16): New.
11509 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11510 instead of __IWMMXT__.
11511 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11512 (arm_arch_setup): New.
11513 (target_regsets): Remove #ifdef. Add VFP regset.
11514 (the_low_target): Use arm_arch_setup.
11515
12b42a12
DJ
115162009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11519 the main thread again.
11520
ac8c974e
AR
115212009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11522
11523 Adding Neutrino gdbserver.
11524 * configure: Regenerated.
11525 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11526 * configure.srv (i[34567]86-*-nto*): New target.
11527 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11528 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11529 (nto_comctrl) [__QNX__]: New function.
11530 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11531
4424e0c3 115322009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11533
11534 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11535 srv_tgtobj.
11536
912cf4ba
PA
115372009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11538 Pedro Alves <pedro@codesourcery.com>
11539
11540 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11541 don't support CONTEXT_EXTENDED_REGISTERS.
11542 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11543 (the_low_target): Install them.
11544 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11545 failing with ERROR_PIPE_NOT_CONNECTED.
11546
aa5ca48f
DE
115472009-06-30 Doug Evans <dje@google.com>
11548 Pierre Muller <muller@ics.u-strasbg.fr>
11549
11550 Add h/w watchpoint support to x86-linux, win32-i386.
11551 * Makefile.in (SFILES): Add i386-low.c
11552 (i386_low_h): Define.
11553 (i386-low.o): Add dependencies.
11554 (linux-x86-low.o): Add i386-low.h dependency.
11555 (win32-i386-low.o): Ditto.
11556 * i386-low.c: New file.
11557 * i386-low.h: New file.
11558 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11559 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11560 * linux-low.c (linux_add_process): Initialize arch_private.
11561 (linux_remove_process): Free arch_private.
11562 (add_lwp): Initialize arch_private.
11563 (delete_lwp): Free arch_private.
11564 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11565 provided.
11566 * linux-low.h (process_info_private): New member arch_private.
11567 (lwp_info): New member arch_private.
11568 (linux_target_ops): New members new_process, new_thread,
11569 prepare_to_resume.
11570 (ptid_of): New macro.
11571 * linux-x86-low.c: Include stddef.h, i386-low.h.
11572 (arch_process_info): New struct.
11573 (arch_lwp_info): New struct.
11574 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11575 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11576 (i386_dr_low_get_status): New function.
11577 (x86_insert_point, x86_remove_point): New functions.
11578 (x86_stopped_by_watchpoint): New function.
11579 (x86_stopped_data_address): New function.
11580 (x86_linux_new_process, x86_linux_new_thread): New functions.
11581 (x86_linux_prepare_to_resume): New function.
11582 (the_low_target): Add entries for insert_point, remove_point,
11583 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11584 prepare_to_resume.
11585 * server.c (debug_hw_points): New global.
11586 (monitor_show_help): Document set debug-hw-points.
11587 (handle_query): Process "set debug-hw-points".
11588 * server.h (debug_hw_points): Declare.
11589 (paddress): Declare.
11590 * utils.c (NUMCELLS, CELLSIZE): New macros.
11591 (get_sell, xsnprintf, paddress): New functions.
11592 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11593 remove_point, stopped_by_watchpoint, stopped_data_address.
11594 * win32-i386-low.c: Include i386-low.h.
11595 (debug_reg_state): Replaces dr.
11596 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11597 (i386_dr_low_get_status): New function.
11598 (i386_insert_point, i386_remove_point): New functions.
11599 (i386_stopped_by_watchpoint): New function.
11600 (i386_stopped_data_address): New function.
11601 (i386_initial_stuff): Update.
11602 (get_thread_context,set_thread_context,i386_thread_added): Update.
11603 (the_low_target): Add entries for insert_point,
11604 remove_point, stopped_by_watchpoint, stopped_data_address.
11605 * win32-low.c (win32_insert_watchpoint): New function.
11606 (win32_remove_watchpoint): New function.
11607 (win32_stopped_by_watchpoint): New function.
11608 (win32_stopped_data_address): New function.
11609 (win32_target_ops): Add entries for insert_watchpoint,
11610 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11611 * win32-low.h (win32_target_ops): New members insert_point,
11612 remove_point, stopped_by_watchpoint, stopped_data_address.
11613
d993e290
PA
116142009-06-25 Pedro Alves <pedro@codesourcery.com>
11615
11616 * server.c (process_serial_event): Re-return unsupported, not
11617 error, if the type isn't recognized. Re-allow supporting only
11618 insert or remove packets. Also call require_running for
11619 breakpoints. Add missing break statement to default case. Tidy.
11620 * target.h (struct target_ops): Rename insert_watchpoint to
11621 insert_point, and remove_watchpoint to remove_point.
11622
11623 * linux-low.h (struct linux_target_ops): Likewise.
11624 * linux-low.c (linux_insert_watchpoint): Rename to ...
11625 (linux_insert_point): ... this. Adjust.
11626 (linux_remove_watchpoint): Rename to ...
11627 (linux_remove_point): ... this. Adjust.
11628 (linux_target_ops): Adjust.
11629 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11630 (cris_insert_point): ... this.
11631 (cris_remove_watchpoint): Rename to ...
11632 (cris_remove_point): ... this.
11633 (the_low_target): Adjust.
11634
0f54c268
PM
116352009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11636
11637 * server.c (handle_v_kill): Pass signal_pid to
11638 kill_inferior if multi_process is zero.
11639
c6314022
AR
116402009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11641
11642 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11643 * target.h (target_ops): Comment for *_watchpoint to make it clear
11644 the functions can get types '0' and '1'.
11645
4463ce24
AR
116462009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11647
11648 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11649 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11650 * regcache.c (get_regcache): Likewise.
11651 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11652 * win32-low.c (child_fetch_inferior_registers): Remove check for
11653 regno 0.
11654
cf8fd78b
PA
116552009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11656 Pedro Alves <pedro@codesourcery.com>
11657
11658 * target.h (struct target_ops) <supports_multi_process>: New
11659 callback.
11660 (target_supports_multi_process): New.
11661 * server.c (handle_query): Even if GDB reports support, only
11662 enable multi-process if the target also supports it. Report
11663 multi-process support only if the target backend supports it.
11664 * linux-low.c (linux_supports_multi_process): New function.
11665 (linux_target_ops): Install it as target_supports_multi_process
11666 callback.
11667
47c0c975
DE
116682009-05-24 Doug Evans <dje@google.com>
11669
e09875d4
DE
11670 Global renaming of find_thread_pid to find_thread_ptid.
11671 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11672 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11673 All callers updated.
11674
e27d73f6
DE
11675 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11676 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11677 directly.
11678
47c0c975
DE
11679 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11680 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11681 (linux_resume_one_lwp): Ditto.
11682
2acc282a
DE
116832009-05-23 Doug Evans <dje@google.com>
11684
11685 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11686 from struct inferior_list_entry * to struct lwp_info *.
11687 All callers updated.
11688
9f1036c1
DE
116892009-05-13 Doug Evans <dje@google.com>
11690
11691 * linux-x86-low.c: Don't include assert.h.
11692 (x86_siginfo_fixup): Use fatal, not assert.
11693 (x86_arch_setup): Fix comment.
11694
d0722149
DE
116952009-05-12 Doug Evans <dje@google.com>
11696
11697 Biarch support for i386/amd64 gdbserver.
11698 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11699 Add linux-x86-low.c.
11700 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11701 (linux-x86-low.o): Add.
11702 * linux-x86-64-low.c: Delete.
11703 * linux-i386-low.c: Delete.
11704 * linux-x86-low.c: New file.
11705 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11706 linux-x86-low.o.
11707 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11708 linux-x86-low.o.
11709 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11710 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11711 (linux_child_pid_to_exec_file): New function.
11712 (elf_64_header_p, elf_64_file_p): New functions.
11713 (siginfo_fixup): New function.
11714 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11715 give target a chance to convert layout.
11716 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11717 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11718
fdeb2a12
DE
117192009-05-07 Doug Evans <dje@google.com>
11720
11721 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11722 (regsets_store_inferior_registers): Ditto.
11723
a6dbe5df
PA
117242009-05-06 Pedro Alves <pedro@codesourcery.com>
11725
11726 PR server/10048
11727
11728 * linux-low.c (must_set_ptrace_flags): Delete.
11729 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11730 of the global.
11731 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11732 `lwp->must_set_ptrace_flags' instead.
ba42693b 11733 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11734 (linux_wait_1): ... not here.
11735
5091eb23
DE
117362009-04-30 Doug Evans <dje@google.com>
11737
9f767825
DE
11738 * inferiors.c (started_inferior_callback): New function.
11739 (attached_inferior_callback): New function.
11740 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11741 * server.c (print_started_pid, print_attached_pid): New functions.
11742 (detach_or_kill_for_exit): New function.
11743 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11744 * server.h (have_started_inferiors_p): Declare.
11745 (have_attached_inferiors_p): Declare.
11746
5091eb23
DE
11747 * inferiors.c (remove_process): Fix memory leak, free process.
11748 * linux-low.c (linux_remove_process): New function.
11749 (linux_kill): Call it instead of remove_process.
11750 (linux_detach, linux_wait_1): Ditto.
11751
155c8968
PA
117522009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11753
11754 * configure.srv: Add x86 Windows CE target.
11755
7fe519cb
UW
117562009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11757
11758 * inferiors.c (get_thread_process): Make global.
11759 * server.h (get_thread_process): Add prototype.
11760 * thread-db.c (find_one_thread): Use get_thread_process
11761 instead of current_process.
11762 (thread_db_get_tls_address): Do not crash if called when
11763 thread layer is not yet initialized.
11764
5472f405
UW
117652009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11766
11767 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11768 * spu-low.c (current_tid): Rename to ...
11769 (current_ptid): ... this.
11770 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11771 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11772 ptid_get_lwp (current_ptid) instead of current_tid.
11773 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11774 instead of current_tid. Use find_process_pid to verify pid
11775 argument is valid. Pass proper argument to remove_process.
11776 (spu_thread_alive): Compare current_ptid instead of current_tid.
11777 (spu_resume): Likewise.
11778
55ac2b99
PA
117792009-04-02 Pedro Alves <pedro@codesourcery.com>
11780
11781 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11782 variable.
11783
95954743
PA
117842009-04-01 Pedro Alves <pedro@codesourcery.com>
11785
11786 Implement the multiprocess extensions, and add linux multiprocess
11787 support.
11788
11789 * server.h (ULONGEST): Declare.
11790 (struct ptid, ptid_t): New.
11791 (minus_one_ptid, null_ptid): Declare.
11792 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11793 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11794 (struct inferior_list_entry): Change `id' type from unsigned from
11795 to ptid_t.
11796 (struct sym_cache, struct breakpoint, struct
11797 process_info_private): Forward declare.
11798 (struct process_info): Declare.
11799 (current_process): Declare.
11800 (all_processes): Declare.
11801 (initialize_inferiors): Declare.
11802 (add_thread): Adjust to use ptid_t.
11803 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11804 (add_process, remove_process, find_thread_pid): Declare.
11805 (find_inferior_id): Adjust to use ptid_t.
11806 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11807 (multi_process): Declare.
11808 (push_event): Adjust to use ptid_t.
11809 (read_ptid, write_ptid): Declare.
11810 (prepare_resume_reply): Adjust to use ptid_t.
11811 (clear_symbol_cache): Declare.
11812 * inferiors.c (all_processes): New.
11813 (null_ptid, minus_one_ptid): New.
11814 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11815 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11816 (add_thread): Change unsigned long to ptid. Remove gdb_id
11817 parameter. Adjust.
11818 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11819 (gdb_id_to_thread): Rename to ...
11820 (find_thread_pid): ... this. Change unsigned long to ptid.
11821 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11822 (loaded_dll, pull_pid_from_list): Adjust.
11823 (add_process, remove_process, find_process_pid)
11824 (get_thread_process, current_process, initialize_inferiors): New.
11825 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11826 (struct target_waitstatus) <related_pid>: Ditto.
11827 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11828 return type to int.
11829 (struct target_ops) <join>: Add `pid' argument.
11830 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11831 (struct target_ops) <wait>: Add `ptid' field. Change return type
11832 to ptid.
11833 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11834 (mywait): Add `ptid' argument. Change return type to ptid_t.
11835 (target_pid_to_str): Declare.
11836 * target.c (set_desired_inferior): Adjust to use ptids.
11837 (mywait): Add new `ptid' argument. Adjust.
11838 (target_pid_to_str): New.
11839 * mem-break.h (free_all_breakpoints): Declare.
11840 * mem-break.c (breakpoints): Delelete.
11841 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11842 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11843 to use per-process breakpoint list.
11844 (free_all_breakpoints): New.
11845 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11846 (symbol_cache, all_symbols_looked_up): Delete.
11847 (hexchars): New.
11848 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11849 read_ptid): New.
11850 (prepare_resume_reply): Change ptid argument's type from unsigned
11851 long to ptid_t. Adjust. Implement W;process and X;process.
11852 (free_sym_cache, clear_symbol_cache): New.
11853 (look_up_one_symbol): Adjust to per-process symbol cache. *
11854 * server.c (cont_thread, general_thread, step_thread): Change type
11855 to ptid_t.
11856 (attached): Delete.
11857 (multi_process): New.
11858 (last_ptid): Change type to ptid_t.
11859 (struct vstop_notif) <ptid>: Change type to ptid_t.
11860 (queue_stop_reply, push_event): Change `ptid' argument's type to
11861 ptid_t.
11862 (discard_queued_stop_replies): Add `pid' argument.
11863 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11864 changes. Don't reference the `attached' global.
11865 (attach_inferior): Adjust to mywait interface changes.
11866 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11867 features. Handle and report "multiprocess+". Handle
11868 "qAttached:PID".
11869 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11870 changes.
11871 (handle_v_kill): New.
11872 (handle_v_stopped): Adjust to use target_pid_to_str.
11873 (handle_v_requests): Allow multiple attaches and runs when
11874 multiprocess extensions are in effect. Handle "vKill".
11875 (myresume): Adjust to use ptids.
11876 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11877 (handle_status): Adjust to discard_queued_stop_replies interface
11878 change.
11879 (first_thread_of, kill_inferior_callback)
11880 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11881 (main): Call initialize_inferiors. Adjust to use ptids, killing
11882 and detaching from all inferiors. Handle multiprocess packet
11883 variants.
11884 * linux-low.h: Include gdb_proc_service.h.
11885 (struct process_info_private): New.
11886 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11887 <lwpid_of>: Use ptid_get_lwp.
11888 (get_lwp_thread): Adjust.
11889 (struct lwp_info): Add `dead' member.
11890 (find_lwp_pid): Declare.
11891 * linux-low.c (thread_db_active): Delete.
11892 (new_inferior): Adjust comment.
11893 (inferior_pid): Delete.
11894 (linux_add_process): New.
11895 (handle_extended_wait): Adjust.
11896 (add_lwp): Change unsigned long to ptid.
11897 (linux_create_inferior): Add process to processes table. Adjust
11898 to use ptids. Don't set new_inferior here.
11899 (linux_attach_lwp): Rename to ...
11900 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11901 it. Adjust to use ptids.
11902 (linux_attach_lwp): New.
11903 (linux_attach): Add process to processes table. Don't set
11904 new_inferior here.
11905 (struct counter): New.
11906 (second_thread_of_pid_p, last_thread_of_process_p): New.
11907 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11908 multiple processes.
11909 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11910 processes. Remove process from process table.
11911 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11912 to multiple processes.
11913 (any_thread_of): New.
11914 (linux_detach): Add `pid' argument, and handle it. Remove process
11915 from processes table.
11916 (linux_join): Add `pid' argument. Handle it.
11917 (linux_thread_alive): Change unsighed long argument to ptid_t.
11918 Consider dead lwps as not being alive.
11919 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11920 threads we're not interested in.
11921 (same_lwp, find_lwp_pid): New.
11922 (linux_wait_for_lwp): Change `pid' argument's type from int to
11923 ptid_t. Adjust.
11924 (linux_wait_for_event): Rename to ...
11925 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11926 from int to ptid_t. Adjust.
11927 (linux_wait_for_event): New.
11928 (linux_wait_1): Add `ptid' argument. Change return type to
11929 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11930 that exit from the process table.
11931 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11932 Adjust.
11933 (mark_lwp_dead): New.
11934 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11935 stopping all threads, mark its main lwp as dead.
11936 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11937 ptids.
11938 (fetch_register, usr_store_inferior_registers)
11939 (regsets_fetch_inferior_registers)
11940 (regsets_store_inferior_registers, linux_read_memory)
11941 (linux_write_memory): Inline `inferior_pid'.
11942 (linux_look_up_symbols): Adjust to use per-process
11943 `thread_db_active'.
11944 (linux_request_interrupt): Adjust to use ptids.
11945 (linux_read_auxv): Inline `inferior_pid'.
11946 (initialize_low): Don't reference thread_db_active.
11947 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11948 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11949 (ps_getpid): Return the pid of the current inferior.
11950 * thread-db.c (proc_handle, thread_agent): Delete.
11951 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11952 per-process data.
11953 (find_one_thread): Change argument type to ptid_t. Adjust to
11954 per-process data.
11955 (maybe_attach_thread): Adjust to per-process data and ptids.
11956 (thread_db_find_new_threads): Ditto.
11957 (thread_db_init): Ditto.
11958 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11959 processes table. Adjust to use ptids.
11960 (spu_kill, spu_detach): Adjust interface. Remove process from
11961 processes table.
11962 (spu_join, spu_thread_alive): Adjust interface.
11963 (spu_wait): Adjust interface. Remove process from processes
11964 table. Adjust to use ptids.
11965 * win32-low.c (current_inferior_tid): Delete.
11966 (current_inferior_ptid): New.
11967 (debug_event_ptid): New.
11968 (thread_rec): Take a ptid. Adjust.
11969 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11970 (child_delete_thread): Ditto.
11971 (do_initial_child_stuff): Add `attached' argument. Add process to
11972 processes table.
11973 (child_fetch_inferior_registers, child_store_inferior_registers):
11974 Adjust.
11975 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11976 (win32_attach): Pass 1 to do_initial_child_stuff.
11977 (win32_kill): Adjust interface. Remove process from processes
11978 table.
11979 (win32_detach): Ditto.
11980 (win32_join): Adjust interface.
11981 (win32_thread_alive): Take a ptid.
11982 (win32_resume): Adjust to use ptids.
11983 (get_child_debug_event): Ditto.
11984 (win32_wait): Adjust interface. Remove exiting process from
11985 processes table.
11986
bd99dc85
PA
119872009-04-01 Pedro Alves <pedro@codesourcery.com>
11988
11989 Non-stop mode support.
11990
11991 * server.h (non_stop): Declare.
11992 (gdb_client_data, handler_func): Declare.
11993 (delete_file_handler, add_file_handler, start_event_loop):
11994 Declare.
11995 (handle_serial_event, handle_target_event, push_event)
11996 (putpkt_notif): Declare.
11997 * target.h (enum resume_kind): New.
11998 (struct thread_resume): Replace `step' field by `kind' field.
11999 (TARGET_WNOHANG): Define.
12000 (struct target_ops) <wait>: Add `options' argument.
12001 <supports_non_stop, async, start_non_stop>: New fields.
12002 (target_supports_non_stop, target_async): New.
12003 (start_non_stop): Declare.
12004 (mywait): Add `options' argument.
12005 * target.c (mywait): Add `options' argument. Print child exit
12006 notifications here.
12007 (start_non_stop): New.
12008 * server.c (non_stop, own_buf, mem_buf): New globals.
12009 (struct vstop_notif): New.
12010 (notif_queue): New global.
12011 (queue_stop_reply, push_event, discard_queued_stop_replies)
12012 (send_next_stop_reply): New.
12013 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12014 interface changes.
12015 (attach_inferior): In non-stop mode, don't wait for the target
12016 here.
12017 (handle_general_set): Handle QNonStop.
12018 (handle_query): When handling qC, return the current general
12019 thread, instead of the first thread of the list.
12020 (handle_query): If the backend supports non-stop mode, include
12021 QNonStop+ in the qSupported query response.
12022 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12023 and non-stop mode.
12024 (handle_v_attach, handle_v_run): Handle non-stop mode.
12025 (handle_v_stopped): New.
12026 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12027 (myresume): Adjust to use resume_kind. Handle non-stop.
12028 (queue_stop_reply_callback): New.
12029 (handle_status): Handle non-stop mode.
12030 (main): Clear non_stop flag on reconnection. Use the event-loop.
12031 Refactor serial protocol handling from here ...
12032 (process_serial_event): ... to this new function. When GDB
12033 selects any thread, select one here. In non-stop mode, wait until
12034 GDB acks all pending events before exiting.
12035 (handle_serial_event, handle_target_event): New.
12036 * remote-utils.c (remote_open): Install remote_desc in the event
12037 loop.
12038 (remote_close): Remove remote_desc from the event loop.
12039 (putpkt_binary): Rename to...
12040 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12041 (putpkt_binary): New as wrapper around putpkt_binary_1.
12042 (putpkt_notif): New.
12043 (prepare_resume_reply): In non-stop mode, don't change the
12044 general_thread.
12045 * event-loop.c: New.
12046 * Makefile.in (OBJ): Add event-loop.o.
12047 (event-loop.o): New rule.
12048
12049 * linux-low.h (pid_of): Moved here.
12050 (lwpid_of): New.
12051 (get_lwp_thread): Use lwpid_of.
12052 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12053 * linux-low.c (pid_of): Delete.
12054 (inferior_pid): Use lwpid_of.
12055 (linux_event_pipe): New.
12056 (target_is_async_p): New.
12057 (delete_lwp): New.
12058 (handle_extended_wait): Use lwpid_of.
12059 (add_lwp): Don't set lwpid field.
12060 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12061 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12062 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12063 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12064 first. Adjust to linux_wait_for_event interface changes. Use
12065 lwpid_of.
12066 (linux_detach): Don't delete the main lwp here.
12067 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12068 (status_pending_p): Don't consider explicitly suspended lwps.
12069 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12070 pointer. Add OPTIONS argument. Change return type to int. Use
12071 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12072 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12073 pointer. Add status pointer argument. Return a pid instead of a
12074 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12075 changes. In non-stop mode, don't switch to a random thread.
12076 (linux_wait): Rename to...
12077 (linux_wait_1): ... this. Add target_options argument, and handle
12078 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12079 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12080 clean exit and signal exit code. Don't stop all threads in
12081 non-stop mode. In all-stop mode, only stop all threads when
12082 reporting a stop to GDB. Handle explicit thread stop requests.
12083 (async_file_flush, async_file_mark): New.
12084 (linux_wait): New.
12085 (send_sigstop): Use lwpid_of.
12086 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12087 interface changes. In non-stop mode, don't switch to a random
12088 thread.
12089 (linux_resume_one_lwp): Use lwpid_of.
12090 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12091 (linux_resume_one_thread): ... this. Handle resume_stop. In
12092 non-stop mode, don't look for pending flag in all threads.
12093 (resume_status_pending_p): Don't consider explicitly suspended
12094 threads.
12095 (my_waitpid): Reimplement. Emulate __WALL.
12096 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12097 Use lwpid_of.
12098 (sigchld_handler, linux_supports_non_stop, linux_async)
12099 (linux_start_non_stop): New.
12100 (linux_target_ops): Register linux_supports_non_stop, linux_async
12101 and linux_start_non_stop.
12102 (initialize_low): Install SIGCHLD handler.
12103 * thread-db.c (thread_db_create_event, find_one_thread)
12104 (thread_db_get_tls_address): Use lwpid_of.
12105 * win32-low.c (win32_detach): Adjust to use resume_kind.
12106 (win32_wait): Add `options' argument.
12107 * spu-low.c (spu_resume): Adjust to use resume_kind.
12108 (spu_wait): Add `options' argument.
12109
5b1c542e
PA
121102009-04-01 Pedro Alves <pedro@codesourcery.com>
12111
12112 Decouple target code from remote protocol.
12113
12114 * target.h (enum target_waitkind): New.
12115 (struct target_waitstatus): New.
12116 (struct target_ops) <wait>: Return an unsigned long. Take a
12117 target_waitstatus pointer instead of a char pointer.
12118 (mywait): Likewise.
12119 * target.c (mywait): Change prototype to return an unsigned long.
12120 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12121 * server.h (thread_from_wait, old_thread_from_wait): Delete
12122 declarations.
12123 (prepare_resume_reply): Change prototype to take a
12124 target_waitstatus.
12125 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12126 (last_status, last_ptid): New.
12127 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12128 pid instead of a signal.
12129 (attach_inferior): Remove "status" and "signal" parameters.
12130 Adjust.
12131 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12132 not as an address.
12133 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12134 (handle_v_requests, myresume): Remove "status" and "signal"
12135 parameters. Adjust.
12136 (handle_status): New.
12137 (main): Delete local `status'. Adjust.
12138 * remote-utils.c: Include target.h.
12139 (prepare_resume_reply): Change prototype to take a
12140 target_waitstatus. Adjust.
12141
12142 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12143 interface.
12144 * spu-low.c (spu_wait): Adjust.
12145 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12146 Delete.
12147 (win32_wait): Adjust.
12148
2bd7c093
PA
121492009-04-01 Pedro Alves <pedro@codesourcery.com>
12150
12151 * target.h (struct thread_resume): Delete leave_stopped member.
12152 (struct target_ops): Add a `n' argument to the `resume' callback.
12153 * server.c (start_inferior): Adjust.
12154 (handle_v_cont, myresume): Adjust.
12155 * linux-low.c (check_removed_breakpoint): Adjust to resume
12156 interface change, and to removed leave_stopped field.
12157 (resume_ptr): Delete.
12158 (struct thread_resume_array): New.
12159 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12160 resume interface change.
12161 (linux_continue_one_thread, linux_queue_one_thread)
12162 (resume_status_pending_p): Check if the resume field is NULL
12163 instead of checking the leave_stopped member.
12164 (linux_resume): Adjust to the target resume interface change.
12165 * spu-low.c (spu_resume): Adjust to the target resume interface
12166 change.
12167 * win32-low.c (win32_detach, win32_resume): Ditto.
12168
c35fafde
PA
121692009-04-01 Pedro Alves <pedro@codesourcery.com>
12170
12171 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12172 flag.
12173 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12174 pending.
12175 (linux_continue_one_thread): Only preserve the stepping flag if
12176 there's a pending breakpoint.
12177
0a59d50b
PA
121782009-03-31 Pedro Alves <pedro@codesourcery.com>
12179
12180 * server.c (main): After the inferior having exited, call
12181 remote_close before exiting gdbserver.
12182
f04c6d38
TJB
121832009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12184
12185 Fix size of FPSCR in Power 7 processors.
12186 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12187 (PPC_FEATURE_HAS_DFP): New #define.
12188 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12189 size of the FPSCR.
12190
78e5cee6
PA
121912009-03-23 Pedro Alves <pedro@codesourcery.com>
12192
12193 * server.c (handle_query) Whitespace and formatting.
12194
1b3f6016
PA
121952009-03-22 Pedro Alves <pedro@codesourcery.com>
12196
12197 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12198 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12199 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12200 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12201 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12202 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12203 Makefile.in, configure.ac: Fix whitespace throughout.
12204 * configure: Regenerate.
12205
a07b2135
PA
122062009-03-22 Pedro Alves <pedro@codesourcery.com>
12207
12208 * inferiors.c (find_inferior): Make it safe for the callback
12209 function to delete the currently iterated inferior.
12210
67cc2626
PA
122112009-03-22 Pedro Alves <pedro@codesourcery.com>
12212
12213 * Makefile.in (linuw_low_h): Move higher.
12214 (thread-db.o): Depend on $(linux_low_h).
12215
54a0b537
PA
122162009-03-17 Pedro Alves <pedro@codesourcery.com>
12217
12218 Rename "process" to "lwp" throughout.
12219
12220 * linux-low.c (all_processes): Rename to...
12221 (all_lwps): ... this.
12222 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12223 (add_process): Rename to ...
12224 (add_lwp): ... this. Adjust.
12225 (linux_create_inferior): Adjust.
12226 (linux_attach_lwp): Adjust.
12227 (linux_attach): Adjust.
12228 (linux_kill_one_process): Rename to ...
12229 (linux_kill_one_lwp): ... this. Adjust.
12230 (linux_kill): Adjust.
12231 (linux_detach_one_process): Rename to ...
12232 (linux_detach_one_lwp): ... this. Adjust.
12233 (linux_detach): Adjust.
12234 (check_removed_breakpoint): Adjust.
12235 (status_pending_p): Adjust.
12236 (linux_wait_for_process): Rename to ...
12237 (linux_wait_for_lwp): ... this. Adjust.
12238 (linux_wait_for_event): Adjust.
12239 (send_sigstop): Adjust.
12240 (wait_for_sigstop): Adjust.
12241 (stop_all_processes): Rename to ...
12242 (stop_all_lwps): ... this.
12243 (linux_resume_one_process): Rename to ...
12244 (linux_resume_one_lwp): ... this. Adjust.
12245 (linux_set_resume_request, linux_continue_one_thread)
12246 (linux_queue_one_thread, resume_status_pending_p)
12247 (usr_store_inferior_registers, regsets_store_inferior_registers)
12248 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12249 Adjust.
12250 * linux-low.h (get_process): Rename to ...
12251 (get_lwp): ... this. Adjust.
12252 (get_thread_process): Rename to ...
12253 (get_thread_lwp): ... this. Adjust.
12254 (get_process_thread): Rename to ...
12255 (get_lwp_thread): ... this. Adjust.
12256 (struct process_info): Rename to ...
12257 (struct lwp_info): ... this.
12258 (all_processes): Rename to ...
12259 (all_lwps): ... this.
12260 * proc-service.c (ps_lgetregs): Adjust.
12261 * thread-db.c (thread_db_create_event, find_one_thread)
12262 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12263
0b16c5cf
PA
122642009-03-14 Pedro Alves <pedro@codesourcery.com>
12265
12266 * server.c (handle_query): Handle "qAttached".
12267
32de4b9d
NS
122682009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12269
12270 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12271 GPLv3, update license URL.
12272
2aecd87f
DE
122732009-03-01 Doug Evans <dje@google.com>
12274
93efd302 12275 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12276 (server_h): Add gdb_signals.h.
12277 (signals.o): Update.
12278 * server.h (target_signal_from_host,target_signal_to_host_p)
12279 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12280
86b1f9c5
PM
122812009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12282
12283 * remote-utils.c (getpkt): Also generate remote-debug
12284 information if noack_mode is set.
12285
4aa995e1
PA
122862009-02-06 Pedro Alves <pedro@codesourcery.com>
12287
12288 * server.c (handle_query): Report qXfer:siginfo:read and
12289 qXfer:siginfo:write as supported and handle them.
12290 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12291 * linux-low.c (linux_xfer_siginfo): New.
12292 (linux_target_ops): Set it.
12293
62709adf
PA
122942009-01-26 Pedro Alves <pedro@codesourcery.com>
12295
12296 * server.c (gdbserver_usage): Mention --remote-debug.
12297 (main): Accept '--remote-debug' switch.
12298
aef93bd7
DE
122992009-01-18 Doug Evans <dje@google.com>
12300
12301 * regcache.c (new_register_cache): No need to check result of xcalloc.
12302 * server.c (handle_search_memory): Back out calls to xmalloc,
12303 result is checked and error is returned to user upon failure.
12304 (handle_query): Ditto. Add more checks for result of malloc.
12305 (handle_v_cont): Check result of malloc, report error back to
12306 user upon failure.
12307 (handle_v_run): Ditto. Call freeargv.
12308 * server.h (freeargv): Declare.
12309 * utils.c (freeargv): New fn.
12310
54363045
DE
123112009-01-15 Doug Evans <dje@google.com>
12312
f626972c
DE
12313 * gdbreplay.c (perror_with_name): Make arg const char *.
12314 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12315 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12316 * utils.c (perror_with_name): Make arg const char *.
54363045 12317
18aae699
PA
123182009-01-14 Pedro Alves <pedro@codesourcery.com>
12319
12320 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12321 when handling a EXIT_PROCESS_DEBUG_EVENT.
12322
ff703abe
JB
123232009-01-06 Joel Brobecker <brobecker@adacore.com>
12324
12325 * gdbreplay.c (gdbreplay_version): Update copyright year.
12326 * server.c (gdbserver_version): Likewise.
12327
f21cc1a2 123282009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12329
12330 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12331 (handle_extended_wait): Improve comment.
0e21c1ec 12332
bca929d3
DE
123332008-12-13 Doug Evans <dje@google.com>
12334
12335 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12336 * server.h (ATTR_MALLOC): New macro.
12337 (xmalloc,xcalloc,xstrdup): Declare.
12338 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12339 * inferiors.c: Ditto.
12340 * linux-low.c: Ditto.
12341 * mem-break.c: Ditto.
12342 * regcache.c: Ditto.
12343 * remote-utils.c: Ditto.
12344 * server.c: Ditto.
12345 * target.c: Ditto.
12346 * win32-low.c: Ditto.
12347
97438e3f
DE
123482008-12-12 Doug Evans <dje@google.com>
12349
896c7fbb
DE
12350 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12351 in debugging printf.
12352
97438e3f
DE
12353 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12354
e3b886f8
DE
123552008-12-09 Doug Evans <dje@google.com>
12356
12357 * linux-low.h (struct process_info): Delete member tid, unused.
12358 * thread-db.c (find_one_thread): Update.
12359 (maybe_attach_thread): Update.
12360
07e059b5
VP
123612008-12-02 Pedro Alves <pedro@codesourcery.com>
12362
889bf7c5
PA
12363 * target.h (struct target_ops): Add qxfer_osdata member.
12364 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12365 and dirent.h.
12366 (linux_qxfer_osdata): New functions.
12367 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12368 callback.
12369 * server.c (handle_query): Handle "qXfer:osdata:read:".
12370 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12371 (buffer_xml_printf): New functions.
12372 * server.h (struct buffer): New.
12373 (buffer_grow_str, buffer_grow_str0): New macros.
12374 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12375 (buffer_xml_printf): Declare.
07e059b5 12376
4cab47ab
DE
123772008-11-24 Doug Evans <dje@google.com>
12378
12379 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12380
f142445f
DJ
123812008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12382
12383 * server.c (handle_v_run): Always use the supplied argument list.
12384
d0107bb6 123852008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12386
d0107bb6
BW
12387 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12388 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12389
2c4ad781
TJB
123902008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12391
12392 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12393 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12394 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12395 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12396 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12397 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12398 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12399 XML target descriptions.
12400 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12401 when inferior is running on an ISA 2.05 or later processor. Add
12402 special case to return offset for full 64-bit slot of FPSCR when
12403 in 32-bits.
12404
dfb64f85
DJ
124052008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12406
12407 * Makefile.in (SFILES, clean): Added sparc64 files.
12408 (reg-sparc64.o, reg-sparc64.c): New.
12409 * configure.srv (sparc*-*-linux*): New configuration.
12410 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12411 syscall arguments for SPARC.
12412 (regsets_store_inferior_registers): Likewise.
12413 * linux-sparc-low.c: New file.
12414
66b6e1dd
DE
124152008-10-21 Doug Evans <dje@google.com>
12416
12417 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12418 (READLINE_DIR,READLINE_DEP): Delete.
12419 (INTERNAL_CFLAGS): Update.
12420 (LINTFLAGS): Update.
12421
9b710a42
PA
124222008-10-10 Pedro Alves <pedro@codesourcery.com>
12423
12424 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12425 whole argv from the last run, not just argv[0].
12426
5822d809
PA
124272008-09-08 Pedro Alves <pedro@codesourcery.com>
12428
12429 * regcache.c (new_register_cache): Return NULL if the register
12430 cache size isn't known yet.
12431 (free_register_cache): Avoid dereferencing a NULL regcache.
12432
74aac56f
DJ
124332008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12434
12435 * configure.srv: Merge MIPS and MIPS64.
12436
400b20f5
MR
124372008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12438
12439 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12440
677c5bb1
LM
124412008-08-18 Luis Machado <luisgpm@br.ibm.com>
12442
12443 * Makefile.in: Add required vsx dependencies.
12444
12445 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12446 Declare init_registers_powerpc_vsx32l.
12447 Declare init_registers_powerpc_vsx64l.
12448 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12449 (ppc_arch_setup): Check for VSX in hwcap.
12450 (ppc_fill_vsxregset): New function.
12451 (ppc_store_vsxregset): New function.
12452 Add new VSX entry in regset_info target_regsets.
12453
12454 * configure.srv: Add new VSX dependencies.
12455
a6f3e723
SL
124562008-08-12 Pedro Alves <pedro@codesourcery.com>
12457
12458 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12459 (remote_open): Set or clear transport_is_reliable.
12460 (putpkt_binary): Don't expect acks in noack mode.
12461 (getpkt): Don't send ack/nac in noack mode.
12462 * server.c (handle_general_set): Handle QStartNoAckMode.
12463 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12464 qSupported.
12465 (main): Reset noack_mode on every connection.
12466 * server.h (noack_mode): Declare.
12467
a417dc56
RW
124682008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12469
12470 * Makefile.in (GDBREPLAY_OBS): New variable.
12471 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12472
3221518c
UW
124732008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12474 Daniel Jacobowitz <dan@codesourcery.com>
12475
12476 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12477 (usr_store_inferior_registers): Likewise.
12478 (regsets_store_inferior_registers): Likewise.
12479
ec56be1b
PA
124802008-07-31 Rolf Jansen <rj@surtec.com>
12481 Pedro Alves <pedro@codesourcery.com>
12482
12483 * configure.ac: Check for memmem declaration.
12484 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12485 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12486 (disable_packet_qfThreadInfo): Unconditionally compile.
12487 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12488 * configure, config.in: Regenerate.
12489
2fe5e3ff
DE
124902008-07-28 Doug Kwan <dougkwan@google.com>
12491
12492 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12493 (linux_write_memory): Remove declaration of errno.
12494
836acd6d
UW
124952008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12496
12497 * linux-low.c (handle_extended_wait): Do not use "status"
12498 variable uninitialized.
12499
aeba519e
PA
125002008-07-07 Pedro Alves <pedro@codesourcery.com>
12501
12502 * server.c (handle_v_attach): Inhibit reporting dll changes.
12503
db42f210
PA
125042008-06-27 Pedro Alves <pedro@codesourcery.com>
12505
12506 * remote-utils.c (prepare_resume_reply): If requested, don't
12507 output "thread:TID" in the T stop reply.
12508
12509 * server.c (disable_packet_vCont, disable_packet_Tthread)
12510 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12511 (handle_query): If requested, disable support for qC, qfThreadInfo
12512 and qsThreadInfo.
12513 (handle_v_requests): If requested, disable support for vCont.
12514 (gdbserver_show_disableable): New.
12515 (main): Handle --disable-packet and --disable-packet=LIST.
12516
12517 * server.h (disable_packet_vCont, disable_packet_Tthread)
12518 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12519
8e4c5421
CD
125202008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12521
12522 * server.c (gdbserver_usage): Mention --version.
12523
6e23a804
DJ
125242008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12525
12526 * Makefile.in (gdbreplay.o): New rule.
12527
90aa6a40
JM
125282008-06-06 Joseph Myers <joseph@codesourcery.com>
12529
12530 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12531 message, not gdbserver.
12532
c16158bc 125332008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12534 Nathan Sidwell <nathan@codesourcery.com>
12535 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12536
12537 * acinclude.m4: Include ../../config/acx.m4.
12538 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12539 * configure, config.in: Regenerate.
12540 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12541 * server.c (gdbserver_version): Print PKGVERSION.
12542 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12543 (main): Adjust gdbserver_usage calls.
12544 * gdbreplay.c (version, host_name): Add declarations.
12545 (gdbreplay_version, gdbreplay_usage): New.
12546 (main): Accept --version and --help options.
12547
aeb75bf5
DJ
125482008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12549
12550 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12551 (arm_breakpoint_at): Handle Thumb.
12552 (the_low_target): Add comment.
12553
76b233dd
UW
125542008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12555
12556 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12557
08388c79
DE
125582008-05-09 Doug Evans <dje@google.com>
12559
a3c83fae
DE
12560 * server.h (decode_search_memory_packet): Declare.
12561 * remote-utils.c (decode_search_memory_packet): New fn.
12562 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12563 (handle_search_memory): New fn.
12564 (handle_query): Process qSearch:memory packets.
12565
bb9c3d36
UW
125662008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12567
12568 * regcache.c (registers_length): Remove.
12569 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12570 full register packet.
12571 * regcache.h (registers_length): Remove prototype.
12572 * server.h (PBUFSIZ): Define to 16384.
12573
7284e1be
UW
125742008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12575
12576 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12577 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12578 powerpc-64l.o, and powerpc-altivec64l.o.
12579 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12580 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12581 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12582 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12583 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12584 to srv_xmlfiles.
12585
12586 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12587 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12588 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12589 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12590 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12591 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12592 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12593 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12594 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12595 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12596 (clean): Update.
12597
12598 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12599 (init_registers_powerpc_32l): ... this new prototype.
12600 (init_registers_powerpc_32): Remove, replace by ...
12601 (init_registers_powerpc_altivec32l): ... this new prototype.
12602 (init_registers_powerpc_e500): Remove, replace by ...
12603 (init_registers_powerpc_e500l): ... this new prototype.
12604 (init_registers_ppc64): Remove, replace by ...
12605 (init_registers_powerpc_64l): ... this new prototype.
12606 (init_registers_powerpc_64): Remove, replace by ...
12607 (init_registers_powerpc_altivec64l): ... this new prototype.
12608 (ppc_num_regs): Set to 73.
12609 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12610 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12611 (ppc_cannot_store_register): Handle orig_r3 and trap.
12612 (ppc_arch_setup): Update init_registers_... calls.
12613 (ppc_fill_gregset): Handle orig_r3 and trap.
12614
12615 * inferiors.c (clear_inferiors): Reset current_inferior.
12616
fdc59709
PB
126172008-04-23 Paolo Bonzini <bonzini@gnu.org>
12618
889bf7c5
PA
12619 * acinclude.m4: Add override.m4.
12620 * configure: Regenerate.
fdc59709 12621
c9b2f845
UW
126222008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12623
12624 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12625 initial call to init_register_ppc64.
12626
550512b8
UW
126272008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12628
43aaf8b6
PA
12629 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12630 single powerpc*-*-linux* case.
550512b8
UW
12631 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12632
b6430ec3
UW
126332008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12634
12635 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12636 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12637 from reg_xmlfiles.
12638 * linux-ppc-low.c: Include <elf.h>.
12639 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12640 (ppc_hwcap): New global variable.
12641 (ppc_regmap): Remove __SPE__ #ifdef sections.
12642 (ppc_regmap_e500): New global variable.
12643 (ppc_cannot_store_register): Update __SPE__ special case.
12644 (ppc_get_hwcap): New function.
12645 (ppc_arch_setup): Use it to determine whether inferior supports
12646 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12647 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12648 Do not access registers if target does not support AltiVec.
12649 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12650 Do not access registers if target does not support SPE.
12651 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12652
52fa2412
UW
126532008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12654
12655 * linux-low.c (disabled_regsets, num_regsets): New.
12656 (use_regsets_p): Delete.
12657 (linux_wait_for_process): Clear disabled_regsets.
12658 (regsets_fetch_inferior_registers): Check and set it.
12659 (regsets_store_inferior_registers): Likewise.
12660 (linux_fetch_registers, linux_store_registers): Do not use
12661 use_regsets_p.
12662 (initialize_low): Allocate disabled_regsets.
12663
e28b3332
DJ
126642008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12665
12666 * Makefile.in (LIBOBJS): New.
12667 (OBS): Use LIBOBJS.
12668 (memmem.o): New rule.
12669 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12670 * configure: Regenerated.
12671
4536995d
UW
126722008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12673
12674 * server.c (handle_query): Never return "unsupported" for
12675 qXfer:features:read queries.
12676
221c031f
UW
126772008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12678
12679 * server.c (get_features_xml): Fix inverted condition.
12680 (handle_query): Always support qXfer:feature:read.
12681
ccd213ac
DJ
126822008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12683
12684 * server.c (wrapper_argv): New.
12685 (start_inferior): Handle wrapper_argv. If set, expect an extra
12686 trap.
12687 (gdbserver_usage): Document --wrapper.
12688 (main): Parse --wrapper.
12689
6fe305f7
UW
126902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12691
12692 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12693 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12694 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12695 (ppc_set_pc): Likewise.
12696 (ppc_arch_setup): New function.
12697 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12698 of collect_register.
889bf7c5 12699 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12700
5b0a002e
UW
127012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12702
12703 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12704 instead of linux-ppc64-low.o.
12705 * linux-ppc64-low.c: Remove file.
12706 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12707 (linux-ppc64-low.o): Remove rule.
12708
12709 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12710 (init_registers_powerpc_64): Likewise.
12711 (ppc_regmap): Conditionally define depending on __powerpc64__.
12712 (ppc_cannot_store_register): Do not special-case "fpscr" when
12713 compiled on __powerpc64__.
12714 (ppc_collect_ptrace_register): New function.
12715 (ppc_supply_ptrace_register): New function.
12716 (ppc_breakpoint): Change type to "unsigned int".
12717 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12718 (the_low_target): Conditionally provide initializers for the
889bf7c5 12719 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12720 collect_ptrace_register and supply_ptrace_register members.
12721
9b4b61c8
UW
127222008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12723
12724 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12725 * server.c (gdbserver_xmltarget): Define.
12726 (get_features_xml): Use it to replace "target.xml" and arch_string.
12727
12728 * configure.srv: Remove srv_xmltarget. Add XML files that were
12729 mentioned there to srv_xmlfiles instead. Remove conditional tests
12730 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12731 srv_xmlfiles and srv_regobj to include all possible choices.
12732 * configure.ac (srv_xmltarget): Remove.
12733 (srv_xmlfiles): Do not add "target.xml".
12734 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12735 checks for supplementary target information.
12736 * configure: Regenerate.
12737 * Makefile.in (XML_TARGET): Remove.
12738 (target.xml): Remove rule.
12739 (clean): Do not clean up target.xml.
12740 (.PRECIOUS): Do not mention target.xml.
12741
12742 * target.h (struct target_ops): Remove arch_string member.
12743 * linux-low.c (linux_arch_string): Remove.
12744 (linux_target_ops): Remove arch_string initializer.
12745 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12746 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12747 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12748 * spu-low.c (spu_arch_string): Remove.
12749 (spu_target_ops): Remove arch_string initializer.
12750 * win32-low.c (win32_arch_string): Remove.
12751 (win32_target_ops): Remove arch_string initializer.
12752 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12753 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12754 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12755
ee1a7ae4
UW
127562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12757
12758 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12759 by collect_ptrace_register and supply_ptrace_register hooks.
12760 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12761 instead of checking for the_low_target.left_pad_xfer.
12762 (usr_store_inferior_registers): Use collect_ptrace_register callback
12763 instead of checking for the_low_target.left_pad_xfer.
12764
12765 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12766 (s390_supply_ptrace_register): Likewise.
12767 (s390_fill_gregset): Call s390_collect_ptrace_register.
12768 (the_low_target): Update.
12769
12770 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12771 (ppc_supply_ptrace_register): Likewise.
12772 (the_low_target): Update.
12773
12774 * linux-i386-low.c (the_low_target): Update.
12775 * linux-x86-64-low.c (the_low_target): Update.
12776
d61ddec4
UW
127772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12778
12779 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12780 reg-s390.o and reg-s390x.o.
12781
12782 * linux-low.c (new_inferior): New global variable.
12783 (linux_create_inferior, linux_attach): Set it.
12784 (linux_wait_for_process): Call the_low_target.arch_setup after the
12785 target has stopped for the first time.
12786 (initialize_low): Do not call the_low_target.arch_setup.
12787
12788 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12789 (s390_set_pc): Likewise.
12790 (s390_arch_setup): New function.
12791 (the_low_target): Use s390_arch_setup as arch_setup routine.
12792
12793 * regcache.c (realloc_register_cache): New function.
12794 (set_register_cache): Call it for each existing regcache.
12795
d05b4ac3
UW
127962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12797
12798 * server.h (init_registers): Remove prototype.
12799
12800 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12801 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12802 instead of init_registers ().
12803 * linux-arm-low.c (init_registers_arm): Add prototype.
12804 (init_registers_arm_with_iwmmxt): Likewise.
12805 (the_low_target): Add initializer for arch_setup field.
12806 * linux-cris-low.c (init_registers_cris): Add prototype.
12807 (the_low_target): Add initializer for arch_setup field.
12808 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12809 (the_low_target): Add initializer for arch_setup field.
12810 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12811 (the_low_target): Add initializer for arch_setup field.
12812 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12813 (the_low_target): Add initializer for arch_setup field.
12814 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12815 (the_low_target): Add initializer for arch_setup field.
12816 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12817 (the_low_target): Add initializer for arch_setup field.
12818 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12819 (init_registers_mips64_linux): Likewise.
12820 (the_low_target): Add initializer for arch_setup field.
12821 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12822 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12823 (the_low_target): Add initializer for arch_setup field.
12824 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12825 (init_registers_powerpc_64): Likewise.
12826 (the_low_target): Add initializer for arch_setup field.
12827 * linux-s390-low.c (init_registers_s390): Add prototype.
12828 (init_registers_s390x): Likewise.
12829 (the_low_target): Add initializer for arch_setup field.
12830 * linux-sh-low.c (init_registers_sh): Add prototype.
12831 (the_low_target): Add initializer for arch_setup field.
12832 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12833 (the_low_target): Add initializer for arch_setup field.
12834 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12835 (the_low_target): Add initializer for arch_setup field.
12836
12837 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12838 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12839 instead of init_registers ().
12840 * win32-arm-low.c (init_registers_arm): Add prototype.
12841 (the_low_target): Add initializer for arch_setup field.
12842 * win32-i386-low.c (init_registers_i386): Add prototype.
12843 (the_low_target): Add initializer for arch_setup field.
12844
12845 * spu-low.c (init_registers_spu): Add prototype.
12846 (initialize_low): Call initialie_registers_spu () instead of
12847 initialize_registers ().
12848
fd96d250
PA
128492008-02-19 Pedro Alves <pedro@codesourcery.com>
12850
12851 * server.c (handle_v_requests): When handling the vRun and vAttach
12852 packets, if already debugging a process, don't kill it. Return an
12853 error instead.
12854
d41b6bb4
DJ
128552008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * server.c (handle_query): Correct length check.
12858
5ac588cf
PA
128592008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12860
12861 * win32-low.c (do_initial_child_stuff): Add process handle
12862 parameter. Set current_process_handle and current_process_id from the
12863 parameters. Clear globals.
12864 (win32_create_inferior): Don't set current_process_handle and
12865 current_process_id here. Instead pass them on the call to
12866 do_initial_child_stuff.
12867 (win32_attach): Likewise.
12868 (win32_clear_inferiors): New.
12869 (win32_kill): Don't close the current process handle or the
12870 current thread handle here. Instead call win32_clear_inferiors.
12871 (win32_detach): Don't open a new handle to the process. Call
12872 win32_clear_inferiors.
12873 (win32_join): Don't rely on current_process_handle; open a new
12874 handle using the process id.
12875 (win32_wait): Call win32_clear_inferiors when the inferior process
12876 has exited.
12877
ecd7ecbc
DJ
128782008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12879
12880 * server.c (monitor_show_help): Add "exit".
12881
1525d545
MG
128822008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12883
ecd7ecbc 12884 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12885 (clean): Add reg-xtensa.c.
12886 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12887 * configure.srv (xtensa*-*-linux*) New target.
12888 * linux-xtensa-low.c: New.
12889 * xtensa-xtregs.c: New.
1525d545 12890
59a016f0
PA
128912008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12892
12893 * hostio.c: Don't include errno.h.
12894 (errno_to_fileio_errno): Move to hostio-errno.
12895 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12896 error number outputting to the target->hostio_last_error callback.
12897 (hostio_packet_error): Use FILEIO_EINVAL directly.
12898 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12899 calls to hostio_error.
12900 * hostio-errno.c: New.
12901 * server.h (hostio_last_error_from_errno): Declare.
12902 * target.h (target_ops): Add hostio_last_error member.
12903 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12904 as hostio_last_error handler.
889bf7c5 12905 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12906 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12907 (wince_hostio_last_error): New functions.
12908 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12909 as hostio_last_error handler.
12910 (win32_target_ops) [!_WIN32_WCE]: Register
12911 hostio_last_error_from_errno as hostio_last_error handler.
12912 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12913 (hostio-errno.o): New rule.
12914 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12915 * configure.srv (srv_hostio_err_objs): New variable. Default to
12916 hostio-errno.o.
12917 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12918 * configure: Regenerate.
12919
2d717e4f
DJ
129202008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12921
12922 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12923 (linux_kill, linux_detach): Clean up the process list.
12924 * remote-utils.c (remote_open): Improve port number parsing.
12925 (putpkt_binary, input_interrupt): Only send interrupts if the target
12926 is running.
12927 * server.c (extended_protocol): Make static.
12928 (attached): Define earlier.
12929 (exit_requested, response_needed, program_argv): New variables.
12930 (target_running): New.
12931 (start_inferior): Clear attached here.
12932 (attach_inferior): Set attached here.
12933 (require_running): Define.
12934 (handle_query): Use require_running and target_running. Implement
12935 "monitor exit".
12936 (handle_v_attach, handle_v_run): New.
12937 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12938 (gdbserver_usage): Update.
12939 (main): Redo argument parsing. Handle --debug and --multi. Handle
12940 --attach along with other options or after the port. Save
12941 program_argv. Support no initial program. Resynchronize
12942 communication with GDB after an error. Handle "monitor exit".
12943 Use require_running and target_running. Always allow the extended
12944 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12945 restart in extended mode.
12946 * README: Refer to the GDB manual. Update --attach usage.
12947
7407e2de
AS
129482007-12-20 Andreas Schwab <schwab@suse.de>
12949
12950 * linux-low.c (STACK_SIZE): Define.
12951 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12952 (linux_test_for_tracefork): Likewise.
12953
b65d95c5
DJ
129542007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12955
12956 * linux-low.c (linux_wait_for_event): Update messages. Do not
12957 reinsert auto-delete breakpoints.
12958 * mem-break.c (struct breakpoint): Change return type of handler to
12959 int.
12960 (set_breakpoint_at): Update handler type.
12961 (reinsert_breakpoint_handler): Return 1 instead of calling
12962 delete_breakpoint.
12963 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12964 setting a new one.
12965 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12966 * mem-break.h (set_breakpoint_at): Update handler type.
12967 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12968 * win32-low.c (auto_delete_breakpoint): New.
12969 (get_child_debug_event): Use it.
12970
4e799345
DJ
129712007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12972
12973 * configure.ac: Check for pread and pwrite.
12974 * hostio.c (handle_pread): Fall back to lseek and read.
12975 (handle_pwrite): Fall back to lseek and write.
12976 * config.in, configure: Regenerated.
12977
27524b67
DJ
129782007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12979
12980 * server.c (myresume): Add own_buf argument.
12981 (main): Update calls.
12982
a20d5e98
DJ
129832007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12984
12985 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12986 * remote-utils.c (remote_open): Do not call disable_async_io.
12987 (block_async_io): Delete.
12988 (unblock_async_io): Make static.
12989 (initialize_async_io): New.
12990 * server.c (handle_v_cont): Handle async I/O here.
12991 (myresume): Likewise. Move other common resume tasks here...
12992 (main): ... from here. Call initialize_async_io. Disable async
12993 I/O before the main loop.
12994 * server.h (initialize_async_io): Declare.
12995 (block_async_io, unblock_async_io): Delete prototypes.
12996 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12997
b79d787e
DJ
129982007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12999
13000 * remote-utils.c (readchar): Allow binary data in received messages.
13001
d97903b2
PA
130022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13003
13004 * win32-low.c (attaching): New global.
13005 (win32_create_inferior): Clear the `attaching' global.
13006 (win32_attach): Set the `attaching' global.
13007 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13008 attaching. Only set a breakpoint at the entry point if not
13009 attaching.
13010
311de423
PA
130112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13012
13013 * server.c (main): Don't report dll events on the initial
13014 connection on attaches.
13015
6c2d16d2
PA
130162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13017
13018 * server.c (main): Relax numerical bases supported for the pid of
13019 the --attach command line argument.
13020
5ca906e6
PA
130212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13022
13023 * win32-low.c (win32_attach): Call OpenProcess before
13024 DebugActiveProcess, not after. Add last error output to error
13025 call.
13026
9c6c8194
PA
130272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13028
13029 * win32-low.c (win32_get_thread_context)
13030 (win32_set_thread_context): New functions.
13031 (thread_rec): Use win32_get_thread_context.
13032 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13033 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13034 field.
13035
4d5d1aaa
PA
130362007-12-03 Leo Zayas
13037 Pedro Alves <pedro_alves@portugalmail.pt>
13038
13039 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13040 global variables.
13041 (child_add_thread): Minor cleanup.
13042 (child_continue): Resume artificially suspended threads before
13043 calling ContinueDebugEvent.
13044 (suspend_one_thread): New.
13045 (fake_breakpoint_event): New.
13046 (get_child_debug_event): Change return type to int. Check here if
13047 gdb sent an interrupt request. If a soft interrupt was requested,
13048 fake a breakpoint event. Return 0 if there is no event to handle,
13049 and 1 otherwise.
13050 (win32_wait): Don't check here if gdb sent an interrupt request.
13051 Ensure there is a valid event to handle.
13052 (win32_request_interrupt): Add soft interruption method as last
13053 resort.
13054
c436e841
PA
130552007-12-03 Leo Zayas
13056 Pedro Alves <pedro_alves@portugalmail.pt>
13057
13058 * win32-low.h (win32_thread_info): Add descriptions to the
13059 structure members. Replace `suspend_count' counter by a
13060 `suspended' flag.
13061 * win32-low.c (thread_rec): Update condition of when to get the
13062 context from the inferior. Rely on ContextFlags being set if it
13063 has already been retrieved. Only suspend the inferior thread if
13064 we haven't already. Warn if that fails.
13065 (continue_one_thread): s/suspend_count/suspended/. Only call
13066 ResumeThread once. Warn if that fails.
13067
e7b5fa67
PA
130682007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13069
13070 * win32-low.c (win32_wait): Don't read from the inferior when it
13071 has already exited.
13072
a385171d
PA
130732007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13074
13075 * Makefile.in (win32_low_h): New variable.
13076 (win32-low.o): Add dependency on $(win32_low_h).
13077 (win32-arm-low.o, win32-i386-low.o): New rules.
13078
f80c84b3
DJ
130792007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13080
13081 * hostio.c: Correct copyright year.
13082
a6b151f1
DJ
130832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13084
13085 * Makefile.in (OBS): Add hostio.o.
13086 (hostio.o): New rule.
13087 * server.h (handle_vFile): Declare.
13088 * hostio.c: New file.
13089 * server.c (handle_v_requests): Take packet_len and new_packet_len
13090 for binary packets. Call handle_vFile.
13091 (main): Update call to handle_v_requests.
13092
f9387fc3
DJ
130932007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13094
13095 * linux-low.c: Include <sched.h>.
13096
51c2684e
DJ
130972007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13098
13099 * linux-low.c (linux_tracefork_grandchild): New.
13100 (linux_tracefork_child): Use clone.
13101 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13102
75f83163
JB
131032007-10-31 Joel Brobecker <brobecker@adacore.com>
13104
13105 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13106
da5898ce
DJ
131072007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13108
13109 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13110
24a09b5f
DJ
131112007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13112
13113 * inferiors.c (change_inferior_id): Delete.
13114 (add_pid_to_list, pull_pid_from_list): New.
13115 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13116 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13117 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13118 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13119 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13120 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13121 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13122 (using_threads): Always set to 1.
13123 (handle_extended_wait): New.
13124 (add_process): Do not set TID.
13125 (linux_create_inferior): Set must_set_ptrace_flags.
13126 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13127 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13128 (linux_thread_alive): Rename TID argument to LWPID.
13129 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13130 (linux_wait_for_event): Do not use TID or check using_threads. Update
13131 call to dead_thread_notify. Call handle_extended_wait.
13132 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13133 (send_sigstop): Delete sigstop_sent.
13134 (wait_for_sigstop): Avoid TID.
13135 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13136 (linux_test_for_tracefork): New.
13137 (linux_lookup_signals): Use thread_db_active and
13138 linux_supports_tracefork_flag.
13139 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13140 * linux-low.h (get_process_thread): Avoid TID.
13141 (struct process_ifo): Move thread_known and tid to the end. Remove
13142 sigstop_sent.
13143 (linux_attach_lwp, thread_db_init): Update prototypes.
13144 * server.h (change_inferior_id): Delete prototype.
13145 (add_pid_to_list, pull_pid_from_list): New prototypes.
13146 * thread-db.c (thread_db_use_events): New.
13147 (find_first_thread): Rename to...
13148 (find_one_thread): ...this. Update callers and messages. Do not
13149 call fatal. Check thread_db_use_events. Do not call
13150 change_inferior_id or new_thread_notify.
13151 (maybe_attach_thread): Update. Do not call new_thread_notify.
13152 (thread_db_init): Set thread_db_use_events. Check use_events.
13153 * utils.c (fatal, warning): Correct message prefix.
13154
30ed0a8f
DJ
131552007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * Makefile.in (clean): Remove new files.
13158 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13159 (powerpc-64.o, powerpc-64.c): New rules.
13160 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13161 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13162 with SPE.
13163 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13164 SPE targets.
13165 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13166 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13167 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13168 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13169 (target_regsets): Add AltiVec and SPE register sets.
13170 * configure.ac: Check for AltiVec and SPE.
13171 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13172 (ppc_fill_vrregset, ppc_store_vrregset): New.
13173 (target_regsets): Add AltiVec register set.
13174 * configure: Regenerated.
13175
fd462a61
DJ
131762007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13177
13178 * linux-low.c (O_LARGEFILE): Define.
13179 (linux_read_memory): Use /proc/PID/mem.
13180 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13181 * configure, config.in: Regenerated.
13182
69f223ed
DJ
131832007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13184
13185 * linux-low.c (linux_wait_for_event): Do not pass signals while
13186 single-stepping.
13187
aec18585
PA
131882007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13189
13190 * win32-low.c (create_process): New.
13191 (win32_create_inferior): Use create_process instead of
13192 CreateProcess. If create_process failed retry appending an ".exe"
13193 suffix. Store the GetLastError result immediatelly after
13194 create_process calls and use it on the call to error.
13195
34d86ddd
PA
131962007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13197
13198 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13199
5a0e3bd0
JB
132002007-08-23 Joel Brobecker <brobecker@adacore.com>
13201
13202 * configure.ac: Switch license to GPLv3.
13203
f88c79e6
MS
132042007-08-01 Michael Snyder <msnyder@access-company.com>
13205
13206 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13207
6b3d9b83
PA
132082007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13209
13210 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13211 typedef.
13212 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13213 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13214 CloseToolhelp32Snapshot.
13215 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13216 CloseToolhelp32Snapshot.
13217
c588c53c
MS
132182007-07-27 Michael Snyder <michael.snyder@access-company.com>
13219
13220 * server.c (main): Check for inferior exit before main loop.
13221
aa0403d9
PA
132222007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13223
13224 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13225 instead of on tmp_desc.
13226
255e7678
DJ
132272007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13228 Daniel Jacobowitz <dan@codesourcery.com>
13229
13230 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13231 (add_thread): Minor cleanups.
13232 (clear_inferiors): Move lower in the file. Clear the DLL
13233 list.
13234 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13235 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13236 (xml_escape_text): New.
13237 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13238 for qSupported.
13239 (handle_v_cont): Report errors.
13240 (gdbserver_version): Update.
13241 (main): Correct size of own_buf. Do not report initial DLL events.
13242 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13243 (unloaded_dll, xml_escape_text): New.
13244 * win32-low.c (enum target_waitkind): Update comments.
13245 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13246 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13247 (win32_EnumProcessModules, win32_GetModuleInformation)
13248 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13249 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13250 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13251 (win32_Module32First, win32_Module32Next, load_toolhelp)
13252 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13253 (get_child_debug_event): Handle DLL events.
13254 (win32_wait): Likewise.
13255
0d37add9
DJ
132562007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13257
13258 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13259 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13260
45e2715e
PA
132612007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13262
13263 * win32-low.c (handle_output_debug_string): Ignore event if not
13264 waiting.
13265
c5674cf1
PA
132662007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13267
13268 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13269
2bbe3cc1
DJ
132702007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13271
13272 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13273
ae13219e
DJ
132742007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * inferiors.c (change_inferior_id): Add comment.
13277 * linux-low.c (check_removed_breakpoint): Add an early
13278 prototype. Improve debug output.
13279 (linux_attach): Doc update.
13280 (linux_detach_one_process, linux_detach): Clean up before releasing
13281 each process.
13282 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13283 * linux-low.h (struct process_info): Doc improvement.
13284 * mem-break.c (delete_all_breakpoints): New.
13285 * mem-break.h (delete_all_breakpoints): New prototype.
13286 * thread-db.c (find_first_thread): New.
13287 (thread_db_create_event): Call it instead of
13288 thread_db_find_new_threads. Clean up unused variables.
13289 (maybe_attach_thread): Remove first thread handling.
13290 (thread_db_find_new_threads): Use find_first_thread.
13291 (thread_db_get_tls_address): Likewise.
13292
4105de34
DJ
132932007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13294
13295 * thread-db.c (thread_db_find_new_threads): Add prototype.
13296 (thread_db_create_event): Check for the main thread before adding
13297 a new thread.
13298 (maybe_attach_thread): Only enable event reporting if TID == 0.
13299 (thread_db_get_tls_address): Check for new threads.
13300
2b876972
DJ
133012007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13302
13303 * linux-low.c (linux_create_inferior): Try execv before execvp.
13304 * spu-low.c (spu_create_inferior): Likewise.
13305
7a245884
DJ
133062007-06-13 Mike Frysinger <vapier@gentoo.org>
13307
13308 * linux-low.c (linux_create_inferior): Change execv to execvp.
13309 * spu-low.c (spu_create_inferior): Likewies.
13310
117ce543
DJ
133112007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13312
13313 * Makefile.in (clean): Clean new files instead of deleted ones.
13314 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13315 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13316 rules.
13317 * configure.srv: Specify XML files and new regformats for MIPS and
13318 MIPS64 GNU/Linux.
13319 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13320 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13321 an entry for the restart register.
13322 (mips_cannot_fetch_register, mips_cannot_store_register)
13323 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13324 register names to match the XML descriptions.
13325 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13326 restart register instead of $0.
13327
0e7f50da
UW
133282007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13329 Markus Deuling <deuling@de.ibm.com>
13330
13331 * remote-utils.c (decode_xfer_write): New function.
13332 * server.h (decode_xfer_write): Add prototype.
13333 * server.c (handle_query): Add PACKET_LEN argument. Support
13334 qXfer:spu:read and qXfer:spu:write packets.
13335 (main): Pass packet_len to handle_query.
13336 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13337 * target.h (target_ops): Add qxfer_spu.
13338
374c1d38
UW
133392007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13340
13341 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13342 accessing non-seekable spufs files.
13343
bb63802a
UW
133442007-05-16 Markus Deuling <deuling@de.ibm.com>
13345
889bf7c5 13346 * server.c (handle_query): Add reply for qC packet.
bb63802a 13347
7390519e
PA
133482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13349 Leo Zayas <lerele@champenstudios@com>
13350
13351 * server.h (check_remote_input_interrupt_request): New function.
13352 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13353 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13354 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13355 (check_remote_input_interrupt_request): New function.
13356 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13357 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13358 winapi_GenerateConsoleCtrlEvent): New typedefs.
13359 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13360 to 250 ms.
13361 (win32_wait): Check for remote interrupt request
13362 with check_remote_input_interrupt_request.
13363 (win32_request_interrupt): New function.
13364 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13365
34b34921
PA
133662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13367
13368 * win32-low.c (debug_registers_changed,
13369 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13370 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13371 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13372 (thread_rec): Get context using the low target.
13373 (child_add_thread): Call thread_added on the low target,
13374 which does the same thing.
13375 (regptr): Delete.
13376 (do_initial_child_stuff): Remove debug registers references.
13377 Set context using the low target. Resume threads after
13378 setting the contexts.
13379 (child_continue): Remove dead variable. Remove debug
13380 registers references.
13381 (child_fetch_inferior_registers): Go through the low target.
13382 (do_child_store_inferior_registers): Remove.
13383 (child_store_inferior_registers): Go through the low target.
13384 (win32_resume): Remove debug registers references.
13385 Set context using the low target.
13386 (handle_exception): Change return type to void. Don't record
13387 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13388 first chance exception.
889bf7c5 13389 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13390 goto loop. Always return after waiting for debug event.
13391 (win32_wait): Convert to switch statement. Handle spurious
13392 events.
13393
13394 * win32-i386-low.c (debug_registers_changed,
13395 debug_registers_used): New.
13396 (initial_stuff): Rename to ...
13397 (i386_initial_stuff): ... this. Clear debug registers
13398 state variables.
13399 (store_debug_registers): Delete.
13400 (i386_get_thread_context): New.
13401 (load_debug_registers): Delete.
13402 (i386_set_thread_context): New.
13403 (i386_thread_added): New.
13404 (single_step): Rename to ...
13405 (i386_single_step): ... this.
13406 (do_fetch_inferior_registers): Rename to ...
13407 (i386_fetch_inferior_register): ... this.
13408 (i386_store_inferior_register): New.
13409 (the_low_target): Adapt to new interface.
13410
13411 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13412 (arm_get_thread_context): New.
13413 (arm_set_thread_context): New.
13414 (regptr): New.
13415 (do_fetch_inferior_registers): Rename to ...
13416 (arm_fetch_inferior_register): ... this.
13417 (arm_store_inferior_register): New.
13418 (arm_wince_breakpoint): Reimplement as unsigned long.
13419 (arm_wince_breakpoint_len): Define.
13420 (the_low_target): Adapt to new interface.
13421
13422 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13423 load_debug_registers. Add get_thread_context, set_thread_context,
13424 thread_added and store_inferior_register. Rename
13425 fetch_inferior_registers to fetch_inferior_register.
13426 (regptr): Remove declaration.
13427
dd6953e1
PA
134282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13429
13430 * linux-low.c (linux_detach): Change return type to int. Return 0.
13431 * spu-low.c (spu_detach): Likewise.
13432
444d6139
PA
134332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13434
13435 * target.h (target_ops): Change return type of detach to int.
13436 Add join.
13437 (join_inferior): New.
13438 * server.c (main): Don't skip detach support on mingw32.
13439 If the inferior doesn't support detaching return error.
13440 Call join_inferior instead of using waitpid.
13441 * linux-low.c (linux_join): New.
13442 (linux_target_op): Add linux_join.
13443 * spu-low.c (spu_join): New.
13444 (spu_target_ops): Add spu_join.
13445 * win32-low.c (win32_detach): Adapt to new interface.
13446 Reopen current_process_handle before detaching. Issue a child
13447 resume before detaching.
13448 (win32_join): New.
13449 (win32_target_op): Add win32_join.
13450
1d5315fe
PA
134512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13452
13453 * win32-low.c (win32-attach): Fix return value.
13454 * target.h (target_ops): Describe ATTACH return values.
13455
bf914831
PA
134562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13457
13458 * win32-low.c (GETPROCADDRESS): Define.
13459 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13460 (winapi_DebugSetProcessKillOnExit): Likewise.
13461 (win32_create_inferior): Force usage of ansi CreateProcessA.
13462 (win32_attach): Use GETPROCADDRESS.
13463 (win32_detach): Likewise.
13464
f72f3e60
PA
134652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13466
13467 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13468
ed50f18f
PA
134692007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * win32-low.c: Commit leftover changes from 2007-03-29.
13472
0c2ead7e
DJ
134732007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13474
13475 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13476 fields short instead of int. Add explicit padding.
13477 (i387_cache_to_fsave): Remove unnecessary casts.
13478 (i387_fsave_to_cache): Doc fix.
13479 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13480
73725ff3
DJ
134812007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13482
13483 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13484 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13485
d99f33d8
PA
134862007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13487
13488 * configure.srv (arm*-*-mingw32ce*): Move near the other
13489 arm targets.
13490
68070c10
PA
134912007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13492
2482afc6 13493 * configure.ac: Add errno checking.
68070c10
PA
13494 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13495 sys/file.h and malloc.h.
13496 (AC_CHECK_DECLS): Add perror.
13497 (srv_mingwce): Handle.
2482afc6 13498 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13499 win32-i386-low.o to srv_tgtobj.
13500 (i[34567]86-*-mingw*): Likewise.
13501 (arm*-*-mingw32ce*): Add case.
13502 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13503 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13504 [__MINGW32CE__] (strerror): New function.
13505 [__MINGW32CE__] (errno): Define to GetLastError.
13506 [__MINGW32CE__] (COUNTOF): New macro.
13507 (remote_open): Remove extra close call.
13508 * mem-break.c (delete_breakpoint_at): New function.
13509 * mem-break.h (delete_breakpoint_at): Declare.
13510 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13511 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13512 [USE_WIN32API] (read, write): Add char* casts.
13513 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13514 * server.h: Include wincecompat.h on Windows CE.
13515 [HAVE_ERRNO_H]: Check.
13516 (perror): Declare if not declared.
13517 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13518 (perror_with_name): Remove errno declaration.
13519 * wincecompat.h: New.
13520 * wincecompat.c: New.
13521 * win32-low.h: New.
13522 * win32-arm-low.c: New.
13523 * win32-i386-low.c: New.
13524 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13525 (OUTMSG2): Make it safe.
13526 (_T): New macro.
13527 (COUNTOF): New macro.
13528 (NUM_REGS): Get it from the low target.
13529 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13530 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13531 (thread_rec): Let low target handle debug registers.
13532 (child_add_thread): Likewise.
13533 (child_init_thread_list): Likewise.
13534 (continue_one_thread): Likewise.
13535 (regptr): New.
13536 (do_child_fetch_inferior_registers): Move to ...
13537 * win32-i386-low.c: ... here, and rename to ...
13538 (do_fetch_inferior_registers): ... this.
889bf7c5 13539 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13540 Go through the low target.
13541 (do_child_store_inferior_registers): Use regptr.
13542 (strwinerror): New function.
13543 (win32_create_inferior): Handle Windows CE.
13544 Use strwinerror instead of strerror on Windows error
13545 codes. Add program to the error output.
13546 Don't close the main thread handle on Windows CE.
13547 (win32_attach): Use coredll.dll on Windows CE.
13548 (win32_kill): Close current process and current
13549 thread handles.
13550 (win32_detach): Use coredll.dll on Windows CE.
13551 (win32_resume): Let low target handle debug registers, and
13552 step request.
13553 (handle_exception): Add/Remove initial breakpoint. Avoid
13554 non-existant WSTOPSIG on Windows CE.
13555 (win32_read_inferior_memory): Cast to remove warning.
13556 (win32_arch_string): Go through the low target.
13557 (initialize_low): Call set_breakpoint_data with the low
13558 target's breakpoint.
13559 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13560 FOP_REGNUM, mappings): Move to ...
13561 * win32-i386-low.c: ... here.
13562 * win32-low.c (win32_thread_info): Move to ...
13563 * win32-low.h: ... here.
13564 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13565 win32-arm-low.c and wincecompat.c.
13566 (all:): Add $EXEEXT.
13567 (install-only:): Likewise.
13568 (gdbserver:): Likewise.
13569 (gdbreplay:): Likewise.
13570 * config.in: Regenerate.
13571 * configure: Regenerate.
13572
41093d81
PA
135732007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13574
13575 * win32-low.c: Rename typedef thread_info to
13576 win32_thread_info throughout.
13577
544afa54
PA
135782007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13579
13580 * win32-i386-low.c: Rename to ...
13581 * win32-low.c: ... this.
13582 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13583 * Makefile.in: Likewise.
13584
bce7165d
PA
135852007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13586
13587 * remote-utils.c (monitor_output): Constify msg parameter.
13588 * server.h (monitor_output): Likewise.
13589 * win32-i386-low.c (handle_output_debug_string): New.
13590 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13591 handle_output_debug_string.
13592 (get_child_debug_event): Likewise.
13593
506c7aa0
DJ
135942007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13595
13596 * server.c (main): Correct strtoul check.
13597
42c81e2a
DJ
135982007-03-27 Jon Ringle <jon@ringle.org>
13599
13600 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13601
9453113a
DJ
136022007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13603
13604 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13605
64a69107
DJ
136062007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13607
13608 * terminal.h: Check HAVE_SGTTY_H.
13609
136102007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13611
13612 * remote-utils.c (remote_open): Print out the assigned port number.
13613
c74d0ad8
DJ
136142007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13615
13616 * remote-utils.c (monitor_output): New function.
13617 * server.c (debug_threads): Define here.
13618 (monitor_show_help): New function.
13619 (handle_query): Handle qRcmd.
13620 (main): Do not handle 'd' packet.
13621 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13622 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13623 of debug_threads.
13624
de7c3b4a
PA
136252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13626
13627 * Makefile.in (EXEEXT): New.
13628 (clean): Use $(EXEEXT).
13629
ef57601b
PA
136302007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13631
13632 * target.h (target_ops): Rename send_signal to request_interrupt,
13633 and remove enum target_signal parameter.
13634 * linux-low.c (linux_request_interrupt): Rename from
13635 linux_send_signal, and always send SIGINT.
13636 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13637 and always send SIGINT.
13638 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13639 of send_signal.
13640 (input_interrupt): Likewise.
13641
820f2bda
PA
136422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13643
13644 * server.c (get_features_xml): Check if target implemented
13645 arch_string.
13646 * win32-i386-low.c (win32_arch_string): New.
13647 (win32_target_ops): Add win32_arch_string as arch_string member.
13648
ab39bf24
UW
136492007-02-22 Markus Deuling <deuling@de.ibm.com>
13650
13651 * spu-low.c (spu_arch_string): New.
13652 (spu_target_ops): Add spu_arch_string.
13653
61ff6e04
DJ
136542007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13655
13656 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13657 * configure.ac: Do not check for terminal.h.
13658 * configure, config.in: Regenerated.
13659
fb1e4ffc
DJ
136602007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13661
13662 * Makefile.in (OBS): Add $(XML_BUILTIN).
13663 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13664 (clean): Update.
13665 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13666 (arm-with-iwmmxt.c): New.
13667 * config.in, configure: Regenerate.
13668 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13669 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13670 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13671 (arm*-*-linux*): Add iWMMXt and regset support.
13672 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13673 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13674 (arm_store_wmmxregset, target_regsets): New.
13675 * server.c (get_features_xml): Take annex argument. Check builtin
13676 XML documents.
13677 (handle_query): Handle multiple annexes.
13678
0f48aa01
DJ
136792007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13680
13681 * remote-utils.c [USE_WIN32API] (read, write): Define.
13682 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13683 write.
13684
23181151
DJ
136852007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13686
13687 * linux-i386-low.c (the_low_target): Set arch_string.
13688 * linux-x86-64-low.c (the_low_target): Likewise.
13689 * linux-low.c (linux_arch_string): New.
13690 (linux_target_ops): Add it.
13691 * linux-low.h (struct linux_target_ops): Add arch_string.
13692 * server.c (write_qxfer_response): Use const void * for DATA.
13693 (get_features_xml): New.
13694 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13695 * target.h (struct target_ops): Add arch_string method.
13696
9d606399
DJ
136972007-01-03 Denis Pilat <denis.pilat@st.com>
13698 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * linux-low.c (linux_kill): Handle being called with no threads.
13701 * win32-i386-low.c (win32_kill): Likewise.
13702 (get_child_debug_event): Clear current_process_handle.
13703
137042006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13705 Daniel Jacobowitz <dan@codesourcery.com>
13706
13707 * remote-utils.c (remote_open): Check the type of specified
13708 serial port devices before opening them.
13709 * server.c (main): Kill the inferior if an error occurs during
13710 the first remote_open.
13711
a5e13d24
DJ
137122006-12-05 Markus Deuling <deuling@de.ibm.com>
13713
13714 * README: Update supported targets.
13715
186947f7
DJ
137162006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13717
13718 * Makefile.in (clean): Remove reg-mips64.c.
13719 (reg-mips64.c, reg-mips64.o): New rules.
13720 * configure.srv: Handle mips64. Include regset support for mips.
13721 * linux-mips-low.c (union mips_register): New.
13722 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13723 (mips_breakpoint, mips_breakpoint_at): Use int.
13724 (mips_collect_register, mips_supply_register)
13725 (mips_collect_register_32bit, mips_supply_register_32bit)
13726 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13727 (mips_store_fpregset, target_regsets): New.
13728 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13729
a13e2c95
UW
137302006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13731
13732 * configure.srv: Add target "spu*-*-*".
13733 * Makefile.in (clean): Remove reg-spu.c.
13734 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13735 * spu-low.c: New file.
13736
cb7283db
DJ
137372006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * configure.ac: Correct td_thr_tls_get_addr test.
13740 * configure: Regenerated.
13741
89be2091
DJ
137422006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * linux-low.c (linux_wait_for_event): Reformat. Use the
13745 pass_signals array.
13746 * remote-utils.c (decode_address_to_semicolon): New.
13747 * server.c (pass_signals, handle_general_set): New.
13748 (handle_query): Mention QPassSignals for qSupported.
13749 (main): Call handle_general_set.
13750 * server.h (pass_signals, decode_address_to_semicolon): New.
13751
000ef4f0
DJ
137522006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * server.c (handle_query): Correct error handling for read_auxv.
13755
b7149293
UW
137562005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13757
13758 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13759 and srv_linux_thread_db to yes.
13760 * linux-s390-low.c (s390_fill_gregset): New function.
13761 (target_regsets): Define data structure.
13762
dae5f5cf
DJ
137632006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13764
13765 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13766 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13767 * config.in, configure: Regenerated.
13768 * inferiors.c (gdb_id_to_thread): New function.
13769 (gdb_id_to_thread_id): Use it.
13770 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13771 * linux-low.h (struct process_info): Add th member.
13772 (thread_db_get_tls_address): New prototype.
13773 * remote-utils.c (decode_address): Make non-static.
13774 * server.c (handle_query): Handle qGetTLSAddr.
13775 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13776 * target.h (struct target_ops): Add get_tls_address.
13777 * thread-db.c (maybe_attach_thread): Save the thread handle.
13778 (thread_db_get_tls_address): New.
13779
32ca6d61
DJ
137802006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13781
13782 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13783 (linux_resume_one_process): Take a siginfo_t *. Update all
13784 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13785 (struct pending_signals): Add a siginfo_t.
13786 (linux_wait_for_process): Always set last_status.
13787 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13788 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13789 * linux-low.h (struct process_info): Add last_status.
13790
5ffff7c1
DJ
137912006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13792
13793 * remote-utils.c (try_rle): New function.
13794 (putpkt_binary): Use it.
13795
8695c747
DJ
137962006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13797
13798 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13799 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13800 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13801 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13802 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13803 point registers.
13804
290fadea
RS
138052006-08-08 Richard Sandiford <richard@codesourcery.com>
13806
13807 * server.c (terminal_fd): New variable.
13808 (old_foreground_pgrp): Likewise.
13809 (restore_old_foreground_pgrp): New function.
13810 (start_inferior): Record the terminal file descriptor in terminal_fd
13811 and its original foreground group in old_foreground_pgrp. Register
13812 restore_old_foreground_pgrp with atexit().
13813
9f2e1e63
DJ
138142006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * server.c (handle_query): Correct qPart to qXfer.
13817
b80864fb
DJ
138182006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * configure.ac: Check for more headers which are missing on
13821 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13822 * configure.srv: Add Cygwin and mingw32.
13823 * remote-utils.c: Don't include headers unconditionally which
13824 are missing on mingw32. Include <winsock.h> for mingw32.
13825 (remote_open): Adjust for mingw32 support. Flush
13826 standard error after writing to it.
13827 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13828 (unblock_async_io, enable_async_io, disable_async_io)
13829 (readchar, getpkt): Update for Winsock support.
13830 (prepare_resume_reply): Expect a protocol signal number.
13831 * server.c: Disable <sys/wait.h> on mingw32.
13832 (start_inferior): Adjust for mingw32 support. Flush
13833 standard error after writing to it.
13834 (attach_inferior): Likewise. Use protocol signal
13835 numbers.
13836 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13837 and names.
13838 * win32-i386-low.c: New file.
13839 * Makefile.in (XM_CLIBS): Set.
13840 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13841 (win32-i386-low.o): New dependency rule.
13842 * linux-low.c (linux_wait): Use target signal numbers.
13843 * target.h (struct target_ops): Doc fix.
13844 * server.h (target_signal_to_name): New prototype.
13845 * gdbreplay.c: Don't include headers unconditionally which
13846 are missing on mingw32. Include <winsock.h> for mingw32.
13847 (remote_close, remote_open): Adjust for Winsock support.
13848 * configure, config.in: Regenerated.
13849
0876f84a
DJ
138502006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13851
13852 * server.c (decode_xfer_read, write_qxfer_response): New.
13853 (handle_query): Take a packet length argument. Handle
13854 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13855 the qSupported response.
13856 (main): Update call to handle_query.
13857
01f9e8fa
DJ
138582006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13859
13860 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13861 (putpkt_binary): Renamed from putpkt and adjusted for binary
13862 data.
13863 (putpkt): New wrapper for putpkt_binary.
13864 (readchar): Don't mask off the high bit.
13865 (decode_X_packet): New function.
13866 * server.c (main): Call putpkt_binary if a handler sets the packet
13867 length. Save the length of the incoming packet. Handle 'X'.
13868 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13869
be2a5f71
DJ
138702006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * server.c (handle_query): Handle qSupported.
13873
ea025f5f
DJ
138742006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * remote-utils.c (all_symbols_looked_up): New variable.
13877 (look_up_one_symbol): Check it.
13878 * server.h (look_up_one_symbol): New declaration.
13879 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13880
9308fc88
DJ
138812006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13882
13883 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13884 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13885 (PTRACE_GET_THREAD_AREA): Define.
13886 (ps_get_thread_area): New function.
13887
52fb6437
NS
138882006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13889
13890 * configure.srv (m68k*-*-uclinux*): New target.
13891 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13892 (linux_resume_one_process): Remove extraneous cast.
13893 (linux_read_offsets): New.
13894 (linux_target_op): Add linux_read_offsets on mmuless systems.
13895 * server.c (handle_query): Add qOffsets logic.
13896 * target.h (struct target_ops): Add read_offsets.
13897
21b0f40c
DJ
138982006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13899
13900 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13901 (PTRACE_GET_THREAD_AREA): Define.
13902 (ps_get_thread_area): New function.
13903 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13904 (linux-x86-64-low.o): Update.
13905
0050a760
DJ
139062006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13907
13908 * configure.ac: Remove checks for prfpregset_t.
13909 * gdb_proc_service.h: New file.
13910 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13911 new "gdb_proc_service.h".
13912 * proc-service.c: Likewise.
13913 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13914 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13915 * Makefile.in (gdb_proc_service_h): Updated.
13916 * configure, config.in: Regenerated.
13917
b92a518e
DJ
139182006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13919
13920 * remote-utils.c (prepare_resume_reply): Move declaration
13921 of gdb_id_from_wait to the top of the block.
13922
545587ee
DJ
139232006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13924
13925 * linux-low.c (regsets_store_inferior_registers): Read the regset
13926 from the target before filling it.
13927
9db87ebd
DJ
139282006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * server.c (attach_inferior): Return SIGTRAP for a successful
13931 attach.
13932
dd24457d
DJ
139332006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13934
13935 * Makefile.in (OBS): Add version.o.
13936 (STAGESTUFF): Delete.
13937 (version.o): Add dependencies.
13938 (version.c): Replace rule.
13939 (clean): Remove version.c.
13940 * server.c (gdbserver_version): New.
13941 (gdbserver_usage): Use printf.
13942 (main): Handle --version and --help.
13943 * server.h (version, host_name): Add declarations.
13944
6f0f660e
EZ
139452005-12-23 Eli Zaretskii <eliz@gnu.org>
13946
889bf7c5
PA
13947 * linux-arm-low.c:
13948 * linux-arm-low.c:
13949 * inferiors.c:
13950 * i387-fp.h:
13951 * i387-fp.c:
13952 * gdbreplay.c:
13953 * regcache.c:
13954 * proc-service.c:
13955 * mem-break.h:
13956 * mem-break.c:
13957 * linux-x86-64-low.c:
13958 * linux-sh-low.c:
13959 * linux-s390-low.c:
13960 * linux-ppc64-low.c:
13961 * linux-ppc-low.c:
13962 * linux-mips-low.c:
13963 * linux-m68k-low.c:
13964 * linux-m32r-low.c:
13965 * linux-low.h:
13966 * linux-low.c:
13967 * linux-ia64-low.c:
13968 * linux-i386-low.c:
13969 * linux-crisv32-low.c:
13970 * thread-db.c:
13971 * terminal.h:
13972 * target.h:
13973 * target.c:
13974 * server.h:
13975 * server.c:
13976 * remote-utils.c:
13977 * regcache.h:
13978 * utils.c:
13979 * Makefile.in:
13980 * configure.ac:
6f0f660e
EZ
13981 * gdbserver.1: Add (C) after Copyright. Update the FSF
13982 address.
13983
9d1fb177
DJ
139842005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13985
13986 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13987 (arm_breakpoint_at): Recognize both breakpoints.
13988 (the_low_target): Use the correct breakpoint instruction.
13989
011a70c2
DJ
139902005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13993 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13994 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13995 (the_low_target): Update.
13996
7fb85e41
AS
139972005-10-25 Andreas Schwab <schwab@suse.de>
13998
13999 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14000
14001 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14002 (ia64_num_regs): Reduce to 462.
14003
3db0444b
DJ
140042005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * acinclude.m4: Correct quoting.
14007 * aclocal.m4: Regenerated.
14008
14009 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14010 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14011 (thread_db_init): Call thread_db_err_str.
14012 * configure.ac: Check for TD_VERSION.
14013 * config.in, configure: Regenerated.
14014
bee0189a
DJ
140152005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14016
14017 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14018
e9d25b98
DJ
140192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14020
14021 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14022 is not available. Define HAVE_PTRACE_GETREGS if it is.
14023 * config.in, configure: Regenerated.
14024 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14025 * linux-i386-low.c, linux-m68k-low.c: Update to use
14026 HAVE_PTRACE_GETREGS.
14027 * linux-low.c (regsets_fetch_inferior_registers)
14028 (regsets_store_inferior_registers): Only return 0 if we processed
14029 GENERAL_REGS.
14030 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14031 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14032
a06660f7
DJ
140332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * inferiors.c (struct thread_info): Add gdb_id.
14036 (add_thread): Add gdb_id argument.
14037 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14038 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14039 calls to add_thread.
14040 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14041 * server.c (handle_query): Use thread_to_gdb_id.
14042 (handle_v_cont, main): Use gdb_id_to_thread_id.
14043 * server.h (add_thread): Update prototype.
14044 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14045 prototypes.
14046
5a1f5858
DJ
140472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14050 left-padded registers.
14051 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14052 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14053
e122f1f5
SE
140542005-07-01 Steve Ellcey <sje@cup.hp.com>
14055
14056 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14057 * configure: Regenerate.
14058 * config.in: Regenerate.
14059 * server.h (NEED_DECLARATION_STRERROR):
14060 Replace with !HAVE_DECL_STRERROR.
14061
d592fa2f
DJ
140622005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14063
14064 * linux-low.c (linux_wait, linux_send_signal): Don't test
14065 an unsigned long variable for > 0 if it could be MAX_ULONG.
14066 * server.c (myresume): Likewise.
14067 * target.c (set_desired_inferior): Likewise.
14068
ccbd4912
MK
140692005-06-13 Mark Kettenis <kettenis@gnu.org>
14070
14071 * configure.ac: Simplify and improve check for socklen_t.
14072 * configure, config.in: Regenerate.
14073
f450004a
DJ
140742005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14075
14076 * acconfig.h: Remove.
14077 * configure.ac: Add a test for socklen_t. Use three-argument
14078 AC_DEFINE throughout.
14079 * config.in: Regenerated using autoheader 2.59.
14080 * configure: Regenerated.
14081
14082 * gdbreplay.c (socklen_t): Provide a default.
14083 (remote_open): Use socklen_t.
14084 * remote-utils.c (socklen_t): Provide a default.
14085 (remote_open): Use socklen_t.
14086 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14087 unsigned char.
14088
14089 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14090 char for buffers.
14091 * linux-low.c (linux_read_memory, linux_write_memory)
14092 (linux_read_auxv): Likewise.
14093 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14094 (check_mem_write): Likewise.
14095 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14096 Likewise.
14097 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14098 (registers_from_string, register_data): Likewise.
14099 * server.c (handle_query, main): Likewise.
14100 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14101 (decode_M_packet): Likewise.
14102 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14103 * target.h (struct target_ops): Update read_memory, write_memory,
14104 and read_auxv.
14105 (read_inferior_memory, write_inferior_memory): Update.
14106 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14107 to unsigned char *.
14108 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14109 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14110 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14111 linux-s390-low.c, linux-sh-low.c: Update for changes in
14112 read_inferior_memory and the_low_target->breakpoint.
14113
eee84df1
DJ
141142005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14115
14116 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14117 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14118 * configure.srv: Add powerpc64-*-linux*.
14119 * linux-ppc64-low.c: New file.
14120
45b134e5
OF
141212005-05-23 Orjan Friberg <orjanf@axis.com>
14122
14123 * linux-cris-low.c: New file with support for CRIS.
14124 * linux-crisv32-low.c: Ditto for CRISv32.
14125 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14126 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14127 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14128 reg-crisv32.o, and reg-crisv32.c to make rules.
14129 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14130 recognized targets.
14131
48d93c75
UW
141322005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14133
14134 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14135 of sizeof (PTRACE_XFER_TYPE).
14136 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14137
e013ee27
OF
141382005-05-12 Orjan Friberg <orjanf@axis.com>
14139
889bf7c5 14140 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14141 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14142 pointers for hardware watchpoint support.
14143 * linux-low.h (struct linux_target_ops): Ditto.
14144 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14145 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14146 to linux_target_ops.
14147 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14148 reply packet.
14149 * server.c (main): Recognize 'Z' and 'z' packets.
14150
b0ded00b
UW
141512005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14152
14153 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14154 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14155 (the_low_target): Add new members.
14156
8643e2ad
DJ
141572005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * proc-service.c (ps_lgetregs): Search all_processes instead of
14160 all_threads.
14161
fc620387
DJ
141622005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14163
14164 * server.c (start_inferior): Change return type to int.
14165 (attach_inferior): Change sigptr to int *.
14166 (handle_v_cont, handle_v_requests): Change signal to int *.
14167 (main): Change signal to int.
14168
141692005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14170
14171 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14172 * configure.srv: Add m32r*-*-linux*.
14173 * linux-m32r-low.c: New file.
14174
e0e76420
DJ
141752005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14178
a1928bad
DJ
141792005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14180
14181 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14182 Take unsigned long arguments for PIDs.
14183 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14184 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14185 (wait_for_sigstop, linux_resume_one_process)
14186 (regsets_fetch_inferior_registers, linux_send_signal)
14187 (linux_read_auxv): Likewise. Update the types of variables holding
14188 PIDs. Update format string specifiers.
14189 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14190 * remote-utils.c (prepare_resume_reply): Likewise.
14191 * server.c (cont_thread, general_thread, step_thread)
14192 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14193 unsigned long.
14194 (handle_query): Update format specifiers.
14195 (handle_v_cont, main): Use strtoul for thread IDs.
14196 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14197 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14198 (general_thread, step_thread, thread_from_wait)
14199 (old_thread_from_wait): Update.
14200 * target.h (struct thread_resume): Use unsigned long for THREAD.
14201 (struct target_ops): Use unsigned long for arguments to attach and
14202 thread_alive.
14203
dcdb98d2
DJ
142042005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * acinclude.m4: Include bfd/bfd.m4 directly.
14207 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14208 <agriffis@toolchain.org>.
14209 * aclocal.m4, configure: Regenerated.
14210
bec39cab
AC
142112005-01-07 Andrew Cagney <cagney@gnu.org>
14212
14213 * configure.ac: Rename configure.in, require autoconf 2.59.
14214 * configure: Re-generate.
14215
434c4c77
DJ
142162004-12-08 Daniel Jacobowitz <dan@debian.org>
14217
14218 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14219 LIBS when finished.
14220 * aclocal.m4: Regenerated.
14221 * configure: Regenerated.
14222
db1d3e1b
AS
142232004-11-21 Andreas Schwab <schwab@suse.de>
14224
14225 * linux-m68k-low.c (m68k_num_gregs): Define.
14226 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14227 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14228 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14229 (m68k_breakpoint_at): New. Add to the_low_target.
14230
14231 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14232 srv_linux_thread_db to yes.
14233
43360365
JB
142342004-10-20 Joel Brobecker <brobecker@gnat.com>
14235
14236 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14237 (ARCH_SET_FS): Likewise.
14238 (ARCH_GET_FS): Likewise.
14239 (ARCH_GET_GS): Likewise.
14240
fd500816
DJ
142412004-10-16 Daniel Jacobowitz <dan@debian.org>
14242
14243 * linux-i386-low.c (ps_get_thread_area): New.
14244 * linux-x86-64-low.c (ps_get_thread_area): New.
14245 * linux-low.c: Include <sys/syscall.h>.
14246 (linux_kill_one_process): Don't kill the first thread here.
14247 (linux_kill): Kill the first thread here.
14248 (kill_lwp): New function.
14249 (send_sigstop, linux_send_signal): Use it.
14250 * proc-service.c: Clean up #ifdefs.
14251 (fpregset_info): Delete.
14252 (ps_lgetregs): Update and enable implementation.
14253 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14254 implementations.
14255 * remote-utils.c (struct sym_cache, symbol_cache): New.
14256 (input_interrupt): Print a clearer message.
14257 (async_io_enabled): New variable.
14258 (enable_async_io, disable_async_io): Use it. Update comments.
14259 (look_up_one_symbol): Use the symbol cache.
14260 * thread-db.c (thread_db_look_up_symbols): New function.
14261 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14262
f6de3c42
DJ
142632004-10-16 Daniel Jacobowitz <dan@debian.org>
14264
14265 * configure.in: Test for -rdynamic.
14266 * configure: Regenerated.
14267 * Makefile (INTERNAL_LDFLAGS): New.
14268 (gdbserver, gdbreplay): Use it.
14269
2c0fc042
AC
142702004-09-02 Andrew Cagney <cagney@gnu.org>
14271
14272 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14273
075b3282
DJ
142742004-03-23 Daniel Jacobowitz <drow@mvista.com>
14275
14276 * linux-low.c (linux_wait): Clear all_processes list also.
14277
fa6a77dc
DJ
142782004-03-12 Daniel Jacobowitz <drow@mvista.com>
14279
14280 * linux-low.c: Include <errno.h>. Remove extern declaration of
14281 errno.
14282
6d782a97
DJ
142832004-03-12 Daniel Jacobowitz <drow@mvista.com>
14284
14285 * gdbreplay.c, server.h, utils.c: Update copyright years.
14286
3a7fb99b
DJ
142872004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14288
14289 * server.c (main): Print child status or termination signal from
14290 variable 'signal', not 'sig'.
14291
c3e735a6
DJ
142922004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14293
14294 * linux-low.c (linux_read_memory): Change return type to
14295 int. Check for and return error from ptrace().
14296 * target.c (read_inferior_memory): Change return type to int. Pass
14297 back return status from the_target->read_memory().
14298 * target.h (struct target_ops): Adapt *read_memory() prototype.
14299 Update comment.
14300 (read_inferior_memory): Adapt prototype.
14301 * server.c (main): Return an error packet if
14302 read_inferior_memory() returns an error.
14303
a59d1c82
DJ
143042004-03-04 Daniel Jacobowitz <drow@mvista.com>
14305
14306 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14307 Unify with other clean targets.
14308
dc3f8883
DJ
143092004-02-29 Daniel Jacobowitz <drow@mvista.com>
14310
14311 * server.c (handle_v_cont): Call set_desired_inferior.
14312
89a208da
DJ
143132004-02-29 Daniel Jacobowitz <drow@mvista.com>
14314
14315 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14316
62ea82f5
DJ
143172004-02-29 Daniel Jacobowitz <drow@mvista.com>
14318
14319 * linux-low.c (linux_wait): Unblock async I/O.
14320 (linux_resume): Block and enable async I/O.
14321 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14322 * server.h (block_async_io, unblock_async_io): Add prototypes.
14323
6910d122
DJ
143242004-02-29 Daniel Jacobowitz <drow@mvista.com>
14325
14326 * remote-utils.c (remote_open): Print a status notice after
14327 opening a TCP port.
14328 * server.c (attach_inferior): Print a status notice after
14329 attaching.
14330
143312004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14332
14333 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14334
c89dc5d4
DJ
143352004-02-26 Daniel Jacobowitz <drow@mvista.com>
14336
14337 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14338 error packet.
14339 * server.c, target.h: Update copyright years.
14340
4b8dad4a
RM
143412004-02-25 Roland McGrath <roland@redhat.com>
14342
14343 * target.h (struct target_ops): New member `read_auxv'.
14344 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14345 * linux-low.c (linux_read_auxv): New function.
14346 (linux_target_ops): Initialize `read_auxv' member to that.
14347
d7446758
JB
143482004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14349
14350 Committed by Jim Blandy <jimb@redhat.com>.
14351
14352 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14353 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14354 instead of GPR_SIZE to distiguish s390 and s390x targets.
14355
5544ad89
DJ
143562004-01-31 Daniel Jacobowitz <drow@mvista.com>
14357
14358 * linux-low.c: Update copyright year.
14359 (check_removed_breakpoint): Clear pending_is_breakpoint.
14360 (linux_set_resume_request, linux_queue_one_thread)
14361 (resume_status_pending_p): New functions.
14362 (linux_continue_one_thread): Use process->resume.
14363 (linux_resume): Only resume threads if there are no pending events.
14364 * linux-low.h (struct process_info): Add resume request
14365 pointer.
14366
2a68b70e
DJ
143672004-01-30 Daniel Jacobowitz <drow@mvista.com>
14368
14369 * regcache.c (new_register_cache): Clear the allocated register
14370 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14371
64386c31
DJ
143722003-10-13 Daniel Jacobowitz <drow@mvista.com>
14373
14374 * linux-low.c (linux_resume): Take a struct thread_resume *
14375 argument.
14376 (linux_wait): Update call.
14377 (resume_ptr): New static variable.
14378 (linux_continue_one_thread): Renamed from
14379 linux_continue_one_process. Use resume_ptr.
14380 (linux_resume): Use linux_continue_one_thread.
14381 * server.c (handle_v_cont, handle_v_requests): New functions.
14382 (myresume): New function.
14383 (main): Handle 'v' case.
14384 * target.h (struct thread_resume): New type.
14385 (struct target_ops): Change argument of "resume" to struct
14386 thread_resume *.
14387 (myresume): Delete macro.
14388
c938e9b0
L
143892003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14390
14391 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14392 (uninstall): Support DESTDIR.
14393
7f313d07
BC
14394Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14395
14396 * configure.srv: Add xscale*linux copy of arm*linux entry.
14397
3b2fc2ea
DJ
143982003-07-24 Daniel Jacobowitz <drow@mvista.com>
14399
14400 * linux-arm-low.c (arm_reinsert_addr): New function.
14401 (the_low_target): Add arm_reinsert_addr.
14402
1c0a559e
MK
144032003-07-08 Mark Kettenis <kettenis@gnu.org>
14404
14405 * mem-break.c: Remove whitespace at end of file.
14406
43d5792c
DJ
144072003-06-28 Daniel Jacobowitz <drow@mvista.com>
14408
14409 * configure.in: Check whether we need to prototype strerror.
14410 * server.h: Optionally prototype strerror.
14411 * gdbreplay.c (perror_with_name): Use strerror.
14412 * linux-low.c (linux_attach_lwp): Use strerror.
14413 * utils.c (perror_with_name): Use strerror.
14414 * config.in, configure: Regenerated.
14415
c8a86edf
DJ
144162003-06-28 Daniel Jacobowitz <drow@mvista.com>
14417
14418 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14419 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14420
73d37363
DJ
144212003-06-20 Daniel Jacobowitz <drow@mvista.com>
14422
14423 * Makefile.in (SFILES): Update.
14424 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14425 low-sun3.c: Remove files.
14426
6ad8ae5c
DJ
144272003-06-17 Daniel Jacobowitz <drow@mvista.com>
14428
14429 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14430 (linux_detach_one_process, linux_detach): New functions.
14431 (linux_target_ops): Add linux_detach.
14432 * server.c (main): Handle 'D' packet.
14433 * target.h (struct target_ops): Add "detach" member.
14434 (detach_inferior): Define.
14435
1581182a
MK
144362003-06-13 Mark Kettenis <kettenis@gnu.org>
14437
14438 From Kelley Cook <kelleycook@wideopenwest.com>:
14439 * configure.srv: Accept i[34567]86 variants.
14440
e5379b03
DJ
144412003-06-05 Daniel Jacobowitz <drow@mvista.com>
14442
14443 * linux-low.c (linux_wait_for_event): Correct comment typos.
14444 (linux_resume_one_process): Call check_removed_breakpoint.
14445 (linux_send_signal): New function.
14446 (linux_target_ops): Add linux_send_signal.
14447 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14448 of kill.
14449 * target.h (struct target_ops): Add send_signal.
14450
2ff29de4
JB
144512003-05-29 Jim Blandy <jimb@redhat.com>
14452
14453 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14454 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14455 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14456 away part of the register's value.
14457
254787d4
DJ
144582003-03-26 Daniel Jacobowitz <drow@mvista.com>
14459
14460 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14461 (linux_wait_for_event, linux_init_signals): Likewise.
14462
94e10508
DJ
144632003-03-17 Daniel Jacobowitz <drow@mvista.com>
14464
14465 * configure.in: Check for stdlib.h.
14466 * configure: Regenerated.
14467 * config.in: Regenerated.
14468
4c0711e0
DJ
144692003-01-04 Andreas Schwab <schwab@suse.de>
14470
14471 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14472
ef66e766
AC
144732003-01-02 Andrew Cagney <ac131313@redhat.com>
14474
14475 * Makefile.in: Remove obsolete code.
14476
a1358604
DJ
144772002-11-20 Daniel Jacobowitz <drow@mvista.com>
14478
14479 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14480 defined(PT_FPR0_HI).
14481
23ce3b1c
DJ
144822002-11-17 Stuart Hughes <seh@zee2.com>
14483
14484 * linux-arm-low.c (arm_num_regs): Increase.
14485 (arm_regmap): Include status register.
14486
144872002-11-17 Daniel Jacobowitz <drow@mvista.com>
14488
14489 * linux-low.c (register_addr): Remove incorrect -1 check.
14490
a9fa9f7d
DJ
144912002-08-29 Daniel Jacobowitz <drow@mvista.com>
14492
14493 * linux-low.c (linux_create_inferior): Call setpgid. Return
14494 the new PID.
14495 (unstopped_p, linux_signal_pid): Remove.
14496 (linux_target_ops): Remove linux_signal_pid.
14497 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14498 global instead of target method.
14499 * target.h (struct target_ops): Remove signal_pid. Update comment
14500 for create_inferior.
14501 * server.c (signal_pid): New variable.
14502 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14503 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14504 (attach_inferior): Set signal_pid.
14505
17574093
DJ
145062002-08-23 Daniel Jacobowitz <drow@mvista.com>
14507
14508 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14509
145102002-08-20 Jim Blandy <jimb@redhat.com>
14511
14512 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14513 default for this.
14514
145152002-08-01 Andrew Cagney <cagney@redhat.com>
14516
14517 * Makefile.in: Make chill references obsolete.
14518
145192002-07-24 Kevin Buettner <kevinb@redhat.com>
14520
14521 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14522 * configure: Regenerate.
14523 * config.in: Regenerate.
14524
145252002-07-09 David O'Brien <obrien@FreeBSD.org>
14526
14527 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14528 (perror_with_name, remote_close, remote_open, expect, play): Static.
14529
145302002-07-04 Michal Ludvig <mludvig@suse.cz>
14531
4b8dad4a 14532 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14533 byte offsets instead of an array of indexes.
14534 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14535
145362002-06-13 Daniel Jacobowitz <drow@mvista.com>
14537
14538 * regcache.c: Add comment.
14539
145402002-06-11 Daniel Jacobowitz <drow@mvista.com>
14541
14542 * thread-db.c: New file.
14543 * proc-service.c: New file.
14544 * acinclude.m4: New file.
14545 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14546 proc-service.o, and thread-db.o.
14547 (linux-low.o): Add USE_THREAD_DB.
14548 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14549 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14550 * aclocal.m4: Regenerated.
14551 * config.in: Regenerated.
14552 * configure: Regenerated.
14553 * configure.in: Check for proc_service.h, sys/procfs.h,
14554 thread_db.h, and linux/elf.h headrs.
14555 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14556 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14557 Check for -lthread_db and thread support.
14558 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14559 PowerPC, and SuperH.
14560 * i387-fp.c: Constify arguments.
14561 * i387-fp.h: Likewise.
14562 * inferiors.c: (struct thread_info): Renamed from
14563 `struct inferior_info'. Remove PID member. Use generic inferior
14564 list header. All uses updated.
14565 (inferiors, signal_pid): Removed.
14566 (all_threads): New variable.
14567 (get_thread): Define.
14568 (add_inferior_to_list): New function.
14569 (for_each_inferior): New function.
14570 (change_inferior_id): New function.
14571 (add_inferior): Removed.
14572 (remove_inferior): New function.
14573 (add_thread): New function.
14574 (free_one_thread): New function.
14575 (remove_thread): New function.
14576 (clear_inferiors): Use for_each_inferior and free_one_thread.
14577 (find_inferior): New function.
14578 (find_inferior_id): New function.
14579 (inferior_target_data): Update argument type.
14580 (set_inferior_target_data): Likewise.
14581 (inferior_regcache_data): Likewise.
14582 (set_inferior_regcache_data): Likewise.
14583 * linux-low.c (linux_bp_reinsert): Remove.
14584 (all_processes, stopping_threads, using_thrads)
14585 (struct pending_signals, debug_threads, pid_of): New.
14586 (inferior_pid): Replace with macro.
14587 (struct inferior_linux_data): Remove.
14588 (get_stop_pc, add_process): New functions.
14589 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14590 Use add_process and add_thread.
14591 (linux_attach_lwp): New function, based on old linux_attach. Use
14592 add_process and add_thread. Set stop_expected for new threads.
14593 (linux_attach): New function.
14594 (linux_kill_one_process): New function.
14595 (linux_kill): Kill all LWPs.
14596 (linux_thread_alive): Use find_inferior_id.
14597 (check_removed_breakpoints, status_pending_p): New functions.
14598 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14599 Update. Use WNOHANG. Wait for cloned processes also. Update process
14600 struct for the found process.
14601 (linux_wait_for_event): New function.
14602 (linux_wait): Use it. Support LWPs.
14603 (send_sigstop, wait_for_sigstop, stop_all_processes)
14604 (linux_resume_one_process, linux_continue_one_process): New functions.
14605 (linux_resume): Support LWPs.
14606 (REGISTER_RAW_SIZE): Remove.
14607 (fetch_register): Use register_size instead. Call supply_register.
14608 (usr_store_inferior_registers): Likewise. Call collect_register.
14609 Fix recursive case.
14610 (regsets_fetch_inferior_registers): Improve error message.
14611 (regsets_store_inferior_registers): Add debugging.
14612 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14613 (unstopped_p, linux_signal_pid): New functions.
14614 (linux_target_ops): Add linux_signal_pid.
14615 (linux_init_signals): New function.
14616 (initialize_low): Call it. Initialize using_threads.
14617 * regcache.c (inferior_regcache_data): Add valid
14618 flag.
14619 (get_regcache): Fetch registers lazily. Add fetch argument
14620 and update all callers.
14621 (regcache_invalidate_one, regcache_invalidate): New
14622 functions.
14623 (new_register_cache): Renamed from create_register_cache.
14624 Return the new regcache.
14625 (free_register_cache): Change argument to a void *.
14626 (registers_to_string, registers_from_string): Call get_regcache
14627 with fetch flag set.
14628 (register_data): Make static. Pass fetch flag to get_regcache.
14629 (supply_register): Call get_regcache with fetch flag clear.
14630 (collect_register): Call get_regcache with fetch flag set.
14631 (collect_register_as_string): New function.
14632 * regcache.h: Update.
14633 * remote-utils.c (putpkt): Flush after debug output and use
14634 stderr.
14635 Handle input interrupts while waiting for an ACK.
14636 (input_interrupt): Use signal_pid method.
14637 (getpkt): Flush after debug output and use stderr.
14638 (outreg): Use collect_register_as_string.
14639 (new_thread_notify, dead_thread_notify): New functions.
14640 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14641 and general_thread.
14642 (look_up_one_symbol): Flush after debug output.
14643 * server.c (step_thread, server_waiting): New variables.
14644 (start_inferior): Don't use signal_pid. Update call to mywait.
14645 (attach_inferior): Update call to mywait.
14646 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14647 (main): Don't fetch/store registers explicitly. Use
14648 set_desired_inferior. Support proposed ``Hs'' packet. Update
14649 calls to mywait.
14650 * server.h: Update.
14651 (struct inferior_list, struct_inferior_list_entry): New.
14652 * target.c (set_desired_inferior): New.
14653 (write_inferior_memory): Constify.
14654 (mywait): New function.
14655 * target.h: Update.
14656 (struct target_ops): New signal_pid method.
14657 (mywait): Removed macro, added prototype.
14658
14659 * linux-low.h (regset_func): Removed.
14660 (regset_fill_func, regset_store_func): New.
14661 (enum regset_type): New.
14662 (struct regset_info): Add type field. Use new operation types.
14663 (struct linux_target_ops): stop_pc renamed to get_pc.
14664 Add decr_pc_after_break and breakpoint_at.
14665 (get_process, get_thread_proess, get_process_thread)
14666 (strut process_info, all_processes, linux_attach_lwp)
14667 (thread_db_init): New.
14668
14669 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14670 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14671 (the_low_target): Add new members.
14672 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14673 (i386_store_fpxregset): Constify.
14674 (target_regsets): Add new kind identifier.
14675 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14676 (i386_set_pc): Add debugging.
14677 (i386_breakpoint_at): New function.
14678 (the_low_target): Add new members.
14679 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14680 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14681 (mips_breakpoint_at): New.
14682 (the_low_target): Add new members.
14683 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14684 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14685 (the_low_target): Add new members.
14686 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14687 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14688 (the_low_target): Add new members.
14689 * linux-x86-64-low.c (target_regsets): Add new kind
14690 identifier.
14691
146922002-05-15 Daniel Jacobowitz <drow@mvista.com>
14693
14694 From Martin Pool <mbp@samba.org>:
14695 * server.c (gdbserver_usage): New function.
14696 (main): Call it.
14697
146982002-05-14 Daniel Jacobowitz <drow@mvista.com>
14699
14700 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14701 stop_at -> stop_pc.
14702
147032002-05-04 Andrew Cagney <ac131313@redhat.com>
14704
14705 * Makefile.in: Remove obsolete code.
14706
147072002-04-24 Michal Ludvig <mludvig@suse.cz>
14708
14709 * linux-low.c (regsets_fetch_inferior_registers),
14710 (regsets_store_inferior_registers): Removed cast to int from
14711 ptrace() calls.
14712 * regcache.h: Added declaration of struct inferior_info.
14713
147142002-04-20 Daniel Jacobowitz <drow@mvista.com>
14715
14716 * inferiors.c (struct inferior_info): Add regcache_data.
14717 (add_inferior): Call create_register_cache.
14718 (clear_inferiors): Call free_register_cache.
14719 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14720 * regcache.c (struct inferior_regcache_data): New.
14721 (registers): Remove.
14722 (get_regcache): New function.
14723 (create_register_cache, free_register_cache): New functions.
14724 (set_register_cache): Don't initialize the register cache here.
14725 (registers_to_string, registers_from_string, register_data): Call
14726 get_regcache.
14727 * regcache.h: Add prototypes.
14728 * server.h: Likewise.
14729
147302002-04-20 Daniel Jacobowitz <drow@mvista.com>
14731
14732 * mem-break.c: New file.
14733 * mem-break.h: New file.
14734 * Makefile.in: Add mem-break.o rule; update server.h
14735 dependencies.
14736 * inferiors.c (struct inferior_info): Add target_data
14737 member.
14738 (clear_inferiors): Free target_data member if set.
14739 (inferior_target_data, set_inferior_target_data): New functions.
14740 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14741 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14742 * linux-low.c (linux_bp_reinsert): New variable.
14743 (struct inferior_linux_data): New.
14744 (linux_create_inferior): Use set_inferior_target_data.
14745 (linux_attach): Likewise. Call add_inferior.
14746 (linux_wait_for_one_inferior): New function.
14747 (linux_wait): Call it.
14748 (linux_write_memory): Add const.
14749 (initialize_low): Call set_breakpoint_data.
14750 * linux-low.h (struct linux_target_ops): Add breakpoint
14751 handling members.
14752 * server.c (attach_inferior): Remove extra add_inferior
14753 call.
14754 * server.h: Include mem-break.h. Update inferior.c
14755 prototypes.
14756 * target.c (read_inferior_memory)
14757 (write_inferior_memory): New functions.
14758 * target.h (read_inferior_memory)
14759 (write_inferior_memory): Change macros to prototypes.
14760 (struct target_ops): Update comments. Add const to write_memory
14761 definition.
14762
147632002-04-11 Daniel Jacobowitz <drow@mvista.com>
14764
14765 * linux-low.c (usr_store_inferior_registers): Support
14766 registers which are allowed to fail to store.
14767 * linux-low.h (linux_target_ops): Likewise.
14768 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14769 (ppc_cannot_store_register): FPSCR may not be storable.
14770
147712002-04-09 Daniel Jacobowitz <drow@mvista.com>
14772
14773 * server.h: Include <string.h> if HAVE_STRING_H.
14774 * ChangeLog: Correct paths in last ChangeLog entry.
14775
147762002-04-09 Daniel Jacobowitz <drow@mvista.com>
14777
14778 * linux-low.h: Remove obsolete prototypes.
14779 (struct linux_target_ops): New.
14780 (extern the_low_target): New.
14781 * linux-low.c (num_regs, regmap): Remove declarations.
14782 (register_addr): Use the_low_target explicitly.
14783 (fetch_register): Likewise.
14784 (usr_fetch_inferior_registers): Likewise.
14785 (usr_store_inferior_registers): Likewise.
14786 * linux-arm-low.c (num_regs): Remove.
14787 (arm_num_regs): Define.
14788 (arm_regmap): Renamed from regmap, made static.
14789 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14790 made static.
14791 (arm_cannot_store_register): Renamed from cannot_store_register,
14792 made static.
14793 (the_low_target): New.
14794 * linux-i386-low.c (num_regs): Remove.
14795 (i386_num_regs): Define.
14796 (i386_regmap): Renamed from regmap, made static.
14797 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14798 made static.
14799 (i386_cannot_store_register): Renamed from cannot_store_register,
14800 made static.
14801 (the_low_target): New.
14802 * linux-ia64-low.c (num_regs): Remove.
14803 (ia64_num_regs): Define.
14804 (ia64_regmap): Renamed from regmap, made static.
14805 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14806 made static.
14807 (ia64_cannot_store_register): Renamed from cannot_store_register,
14808 made static.
14809 (the_low_target): New.
14810 * linux-m68k-low.c (num_regs): Remove.
14811 (m68k_num_regs): Define.
14812 (m68k_regmap): Renamed from regmap, made static.
14813 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14814 made static.
14815 (m68k_cannot_store_register): Renamed from cannot_store_register,
14816 made static.
14817 (the_low_target): New.
14818 * linux-mips-low.c (num_regs): Remove.
14819 (mips_num_regs): Define.
14820 (mips_regmap): Renamed from regmap, made static.
14821 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14822 made static.
14823 (mips_cannot_store_register): Renamed from cannot_store_register,
14824 made static.
14825 (the_low_target): New.
14826 * linux-ppc-low.c (num_regs): Remove.
14827 (ppc_num_regs): Define.
14828 (ppc_regmap): Renamed from regmap, made static.
14829 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14830 made static.
14831 (ppc_cannot_store_register): Renamed from cannot_store_register,
14832 made static.
14833 (the_low_target): New.
14834 * linux-s390-low.c (num_regs): Remove.
14835 (s390_num_regs): Define.
14836 (s390_regmap): Renamed from regmap, made static.
14837 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14838 made static.
14839 (s390_cannot_store_register): Renamed from cannot_store_register,
14840 made static.
14841 (the_low_target): New.
14842 * linux-sh-low.c (num_regs): Remove.
14843 (sh_num_regs): Define.
14844 (sh_regmap): Renamed from regmap, made static.
14845 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14846 made static.
14847 (sh_cannot_store_register): Renamed from cannot_store_register,
14848 made static.
14849 (the_low_target): New.
14850 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14851 (the_low_target): New.
14852
148532002-04-09 Daniel Jacobowitz <drow@mvista.com>
14854
14855 * Makefile.in: Add stamp-h target.
14856 * configure.in: Create stamp-h.
14857 * configure: Regenerated.
14858
148592002-04-09 Daniel Jacobowitz <drow@mvista.com>
14860
14861 * inferiors.c: New file.
14862 * target.c: New file.
14863 * target.h: New file.
14864 * Makefile.in: Add target.o and inferiors.o. Update
14865 dependencies.
14866 * linux-low.c (inferior_pid): New static variable,
14867 moved from server.c.
14868 (linux_create_inferior): Renamed from create_inferior.
14869 Call add_inferior. Return 0 on success instead of a PID.
14870 (linux_attach): Renamed from myattach.
14871 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14872 (linux_thread_alive): Renamed from mythread_alive.
14873 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14874 child dies.
14875 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14876 (regsets_store_inferior_registers): Correct error message.
14877 Add missing ``return 0''.
14878 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14879 (linux_store_registers): Renamed from store_inferior_registers.
14880 (linux_read_memory): Renamed from read_inferior_memory.
14881 (linux_write_memory): Renamed from write_inferior_memory.
14882 (linux_target_ops): New structure.
14883 (initialize_low): Call set_target_ops ().
14884 * remote-utils.c (unhexify): New function.
14885 (hexify): New function.
14886 (input_interrupt): Send signals to ``signal_pid''.
14887 * server.c (inferior_pid): Remove.
14888 (start_inferior): Update create_inferior call.
14889 (attach_inferior): Call add_inferior.
14890 (handle_query): New function.
14891 (main): Call handle_query for `q' packets.
14892 * server.h: Include "target.h". Remove obsolete prototypes.
14893 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14894
148952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * Makefile.in: Add WARN_CFLAGS. Update configury
14898 dependencies.
14899 * configure.in: Check for <string.h>
14900 * configure: Regenerate.
14901 * config.in: Regenerate.
14902 * gdbreplay.c: Include needed system headers.
14903 (remote_open): Remove strchr prototype.
14904 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14905 * regcache.c (supply_register): Change buf argument to const void *.
14906 (supply_register_by_name): Likewise.
14907 (collect_register): Change buf argument to void *.
14908 (collect_register_by_name): Likewise.
14909 * regcache.h: Add missing prototypes.
14910 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14911 * server.c (handle_query): New function.
14912 (attached): New static variable, moved out of main.
14913 (main): Quiet longjmp clobber warnings.
14914 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14915 * utils.c (error): Remove NORETURN.
14916 (fatal): Likewise.
This page took 1.825202 seconds and 4 git commands to generate.